1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 [Efl.Ui.ListItem.NativeMethods]
13 public abstract class ListItem : Efl.Ui.Item, Efl.Eo.IWrapper
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass
20 if (((object)this).GetType() == typeof(ListItem))
22 return GetEflClassStatic();
26 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
31 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
32 efl_ui_list_item_class_get();
33 /// <summary>Initializes a new instance of the <see cref="ListItem"/> class.</summary>
34 /// <param name="parent">Parent instance.</param>
35 /// <param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
36 public ListItem(Efl.Object parent
37 , System.String style = null) : base(efl_ui_list_item_class_get(), typeof(ListItem), parent)
39 if (Efl.Eo.Globals.ParamHelperCheck(style))
41 SetStyle(Efl.Eo.Globals.GetParamHelper(style));
44 FinishInstantiation();
47 /// <summary>Initializes a new instance of the <see cref="ListItem"/> class.
48 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
49 /// <param name="raw">The native pointer to be wrapped.</param>
50 protected ListItem(System.IntPtr raw) : base(raw)
54 [Efl.Eo.PrivateNativeClass]
55 private class ListItemRealized : ListItem
57 private ListItemRealized(IntPtr ptr) : base(ptr)
61 /// <summary>Initializes a new instance of the <see cref="ListItem"/> class.
62 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
63 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
64 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
65 /// <param name="parent">The Efl.Object parent of this instance.</param>
66 protected ListItem(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
70 /// <summary>Verifies if the given object is equal to this one.</summary>
71 /// <param name="instance">The object to compare to.</param>
72 /// <returns>True if both objects point to the same native object.</returns>
73 public override bool Equals(object instance)
75 var other = instance as Efl.Object;
80 return this.NativeHandle == other.NativeHandle;
83 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
84 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
85 public override int GetHashCode()
87 return this.NativeHandle.ToInt32();
90 /// <summary>Turns the native pointer into a string representation.</summary>
91 /// <returns>A string with the type and the native pointer for this object.</returns>
92 public override String ToString()
94 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
97 private static IntPtr GetEflClassStatic()
99 return Efl.Ui.ListItem.efl_ui_list_item_class_get();
101 /// <summary>Wrapper for native methods and virtual method delegates.
102 /// For internal use by generated code only.</summary>
103 public new class NativeMethods : Efl.Ui.Item.NativeMethods
105 /// <summary>Gets the list of Eo operations to override.</summary>
106 /// <returns>The list of Eo operations to be overload.</returns>
107 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
109 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
110 descs.AddRange(base.GetEoOps(type));
113 /// <summary>Returns the Eo class for the native methods of this class.</summary>
114 /// <returns>The native class pointer.</returns>
115 public override IntPtr GetEflClass()
117 return Efl.Ui.ListItem.efl_ui_list_item_class_get();
120 #pragma warning disable CA1707, SA1300, SA1600
122 #pragma warning restore CA1707, SA1300, SA1600