1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>This is the base class for all "Part" handles in Efl.Ui widgets.
9 /// Since objects of this type are returned by <see cref="Efl.Part.GetPart"/>, their lifetime is limited to exactly one function call only. Each widget class should expose more specific types for their API-defined parts.</summary>
10 [WidgetPartNativeInherit]
11 public class WidgetPart : Efl.Object, Efl.Eo.IWrapper
13 public new static System.IntPtr klass = System.IntPtr.Zero;
14 public new static Efl.Ui.WidgetPartNativeInherit nativeInherit = new Efl.Ui.WidgetPartNativeInherit();
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass {
18 if (((object)this).GetType() == typeof (WidgetPart))
19 return Efl.Ui.WidgetPartNativeInherit.GetEflClassStatic();
21 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
24 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
25 efl_ui_widget_part_class_get();
26 ///<summary>Creates a new instance.</summary>
27 ///<param name="parent">Parent instance.</param>
28 public WidgetPart(Efl.Object parent= null
30 base(efl_ui_widget_part_class_get(), typeof(WidgetPart), parent)
32 FinishInstantiation();
34 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
35 public WidgetPart(System.IntPtr raw) : base(raw)
37 register_event_proxies();
39 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
40 protected WidgetPart(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
41 ///<summary>Casts obj into an instance of this type.</summary>
42 public new static WidgetPart static_cast(Efl.Object obj)
45 throw new System.ArgumentNullException("obj");
46 return new WidgetPart(obj.NativeHandle);
48 ///<summary>Verifies if the given object is equal to this one.</summary>
49 public override bool Equals(object obj)
51 var other = obj as Efl.Object;
54 return this.NativeHandle == other.NativeHandle;
56 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
57 public override int GetHashCode()
59 return this.NativeHandle.ToInt32();
61 ///<summary>Turns the native pointer into a string representation.</summary>
62 public override String ToString()
64 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
66 protected override void register_event_proxies()
68 base.register_event_proxies();
70 private static new IntPtr GetEflClassStatic()
72 return Efl.Ui.WidgetPart.efl_ui_widget_part_class_get();
75 public class WidgetPartNativeInherit : Efl.ObjectNativeInherit{
76 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
77 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
79 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
80 descs.AddRange(base.GetEoOps(type));
83 public override IntPtr GetEflClass()
85 return Efl.Ui.WidgetPart.efl_ui_widget_part_class_get();
87 public static new IntPtr GetEflClassStatic()
89 return Efl.Ui.WidgetPart.efl_ui_widget_part_class_get();