lauromoura pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=72da16f6794a688424318c1e22a2b00482acc103
commit 72da16f6794a688424318c1e22a2b00482acc103 Author: Lauro Moura <[email protected]> Date: Mon Oct 28 18:48:26 2019 -0300 mono: encapsulate internal nativemethods Summary: Depends on D10337 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10340 --- src/bin/eolian_mono/eolian/mono/klass.hh | 6 +++--- src/bindings/mono/eo_mono/EoWrapper.cs | 4 ++-- src/bindings/mono/eo_mono/iwrapper.cs | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 8fca7a4ad8..1697ace234 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -422,7 +422,7 @@ struct klass ( indent << lit("/// <summary>Wrapper for native methods and virtual method delegates.\n") << indent << "/// For internal use by generated code only.</summary>\n" - << indent << "public new class " << native_inherit_name << " : " << (root ? "Efl.Eo.EoWrapper.NativeMethods" : base_name) << "\n" + << indent << "internal new class " << native_inherit_name << " : " << (root ? "Efl.Eo.EoWrapper.NativeMethods" : base_name) << "\n" << indent << "{\n" ).generate(sink, attributes::unused, inative_cxt)) return false; @@ -439,7 +439,7 @@ struct klass if(!as_generator( indent << scope_tab << "/// <summary>Gets the list of Eo operations to override.</summary>\n" << indent << scope_tab << "/// <returns>The list of Eo operations to be overload.</returns>\n" - << indent << scope_tab << "public override System.Collections.Generic.List<EflOpDescription> GetEoOps(System.Type type, bool includeInherited)\n" + << indent << scope_tab << "internal override System.Collections.Generic.List<EflOpDescription> GetEoOps(System.Type type, bool includeInherited)\n" << indent << scope_tab << "{\n" << indent << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<EflOpDescription>();\n" ) @@ -489,7 +489,7 @@ struct klass if(!as_generator( indent << scope_tab << "/// <summary>Returns the Eo class for the native methods of this class.</summary>\n" << indent << scope_tab << "/// <returns>The native class pointer.</returns>\n" - << indent << scope_tab << "public override IntPtr GetEflClass()\n" + << indent << scope_tab << "internal override IntPtr GetEflClass()\n" << indent << scope_tab << "{\n" << indent << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" << indent << scope_tab << "}\n\n" diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs index 8f9011cefe..d49a5b5b42 100644 --- a/src/bindings/mono/eo_mono/EoWrapper.cs +++ b/src/bindings/mono/eo_mono/EoWrapper.cs @@ -410,7 +410,7 @@ public abstract class EoWrapper : IWrapper, IDisposable /// <para>For internal use by generated code only.</para> /// <para>Since EFL 1.23.</para> /// </summary> - public abstract class NativeMethods : Efl.Eo.NativeClass + internal abstract class NativeMethods : Efl.Eo.NativeClass { private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor); private static Efl.Eo.NativeModule EoModule = new Efl.Eo.NativeModule("eo"); @@ -421,7 +421,7 @@ public abstract class EoWrapper : IWrapper, IDisposable /// <para>Since EFL 1.23.</para> /// </summary> /// <returns>The list of Eo operations to be overload.</returns> - public override System.Collections.Generic.List<EflOpDescription> GetEoOps(Type type, bool includeInherited) + internal override System.Collections.Generic.List<EflOpDescription> GetEoOps(Type type, bool includeInherited) { var descs = new System.Collections.Generic.List<EflOpDescription>(); diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 3c4b8e0003..32715fa854 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -795,23 +795,23 @@ public static class Config AllowMultiple = false, Inherited = false) ] -public abstract class NativeClass : System.Attribute +abstract class NativeClass : System.Attribute { - public abstract IntPtr GetEflClass(); - public abstract System.Collections.Generic.List<EflOpDescription> GetEoOps(System.Type type, bool includeInherited); + internal abstract IntPtr GetEflClass(); + internal abstract System.Collections.Generic.List<EflOpDescription> GetEoOps(System.Type type, bool includeInherited); } /// <summary>Attribute for private native classes. /// /// <para>For internal usage by generated code only.</para></summary> -public class PrivateNativeClass : NativeClass +class PrivateNativeClass : NativeClass { - public override IntPtr GetEflClass() + internal override IntPtr GetEflClass() { return IntPtr.Zero; } - public override System.Collections.Generic.List<EflOpDescription> GetEoOps(System.Type type, bool includeInherited) + internal override System.Collections.Generic.List<EflOpDescription> GetEoOps(System.Type type, bool includeInherited) { return null; } --
