summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/eo_mono')
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs5
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs16
2 files changed, 18 insertions, 3 deletions
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 03edea0..c2ee5e2 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -67,15 +67,14 @@ public abstract class EoWrapper : IWrapper, IDisposable
67 /// Internal usage: Constructor to actually call the native library constructors. C# subclasses 67 /// Internal usage: Constructor to actually call the native library constructors. C# subclasses
68 /// must use the public constructor only.</summary> 68 /// must use the public constructor only.</summary>
69 /// <param name="baseKlass">The pointer to the base native Eo class.</param> 69 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
70 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
71 /// <param name="parent">The Efl.Object parent of this instance.</param> 70 /// <param name="parent">The Efl.Object parent of this instance.</param>
72 /// <param name="file">Name of the file from where the constructor is called.</param> 71 /// <param name="file">Name of the file from where the constructor is called.</param>
73 /// <param name="line">Number of the line from where the constructor is called.</param> 72 /// <param name="line">Number of the line from where the constructor is called.</param>
74 protected EoWrapper(IntPtr baseKlass, System.Type managedType, Efl.Object parent, 73 protected EoWrapper(IntPtr baseKlass, Efl.Object parent,
75 [CallerFilePath] string file = null, 74 [CallerFilePath] string file = null,
76 [CallerLineNumber] int line = 0) 75 [CallerLineNumber] int line = 0)
77 { 76 {
78 generated = ((object)this).GetType() == managedType; 77 generated = Efl.Eo.BindingEntity.IsBindingEntity(((object)this).GetType());
79 IntPtr actual_klass = baseKlass; 78 IntPtr actual_klass = baseKlass;
80 if (!generated) 79 if (!generated)
81 { 80 {
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index 833ae78..09c82a7 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -775,6 +775,22 @@ public class PrivateNativeClass : NativeClass
775 } 775 }
776} 776}
777 777
778[System.AttributeUsage(System.AttributeTargets.Class |
779 System.AttributeTargets.Interface |
780 System.AttributeTargets.Enum |
781 System.AttributeTargets.Delegate |
782 System.AttributeTargets.Struct,
783 AllowMultiple = false,
784 Inherited = false)
785]
786public class BindingEntity: System.Attribute
787{
788 public static bool IsBindingEntity(System.Type t)
789 {
790 return Attribute.GetCustomAttribute(t, typeof(BindingEntity), false) != null;
791 }
792}
793
778public interface IWrapper 794public interface IWrapper
779{ 795{
780 /// <summary>Pointer to internal Eo instance.</summary> 796 /// <summary>Pointer to internal Eo instance.</summary>