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>List Default Item internal content of icon part class</summary>
9 [ListDefaultItemPartIconNativeInherit]
10 public class ListDefaultItemPartIcon : Efl.Ui.LayoutPart, Efl.Eo.IWrapper,Efl.Content
12 public new static System.IntPtr klass = System.IntPtr.Zero;
13 public new static Efl.Ui.ListDefaultItemPartIconNativeInherit nativeInherit = new Efl.Ui.ListDefaultItemPartIconNativeInherit();
14 ///<summary>Pointer to the native class description.</summary>
15 public override System.IntPtr NativeClass {
17 if (((object)this).GetType() == typeof (ListDefaultItemPartIcon))
18 return Efl.Ui.ListDefaultItemPartIconNativeInherit.GetEflClassStatic();
20 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
23 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
24 efl_ui_list_default_item_part_icon_class_get();
25 ///<summary>Creates a new instance.</summary>
26 ///<param name="parent">Parent instance.</param>
27 public ListDefaultItemPartIcon(Efl.Object parent= null
29 base(efl_ui_list_default_item_part_icon_class_get(), typeof(ListDefaultItemPartIcon), parent)
31 FinishInstantiation();
33 ///<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>
34 public ListDefaultItemPartIcon(System.IntPtr raw) : base(raw)
36 register_event_proxies();
38 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
39 protected ListDefaultItemPartIcon(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
40 ///<summary>Casts obj into an instance of this type.</summary>
41 public new static ListDefaultItemPartIcon static_cast(Efl.Object obj)
44 throw new System.ArgumentNullException("obj");
45 return new ListDefaultItemPartIcon(obj.NativeHandle);
47 ///<summary>Verifies if the given object is equal to this one.</summary>
48 public override bool Equals(object obj)
50 var other = obj as Efl.Object;
53 return this.NativeHandle == other.NativeHandle;
55 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
56 public override int GetHashCode()
58 return this.NativeHandle.ToInt32();
60 ///<summary>Turns the native pointer into a string representation.</summary>
61 public override String ToString()
63 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
65 private static object ContentChangedEvtKey = new object();
66 /// <summary>Sent after the content is set or unset using the current content object.</summary>
67 public event EventHandler<Efl.ContentContentChangedEvt_Args> ContentChangedEvt
71 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
72 if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_ContentChangedEvt_delegate)) {
73 eventHandlers.AddHandler(ContentChangedEvtKey , value);
75 Eina.Log.Error($"Error adding proxy for event {key}");
80 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
81 if (remove_cpp_event_handler(key, this.evt_ContentChangedEvt_delegate)) {
82 eventHandlers.RemoveHandler(ContentChangedEvtKey , value);
84 Eina.Log.Error($"Error removing proxy for event {key}");
88 ///<summary>Method to raise event ContentChangedEvt.</summary>
89 public void On_ContentChangedEvt(Efl.ContentContentChangedEvt_Args e)
91 EventHandler<Efl.ContentContentChangedEvt_Args> evt;
93 evt = (EventHandler<Efl.ContentContentChangedEvt_Args>)eventHandlers[ContentChangedEvtKey];
97 Efl.EventCb evt_ContentChangedEvt_delegate;
98 private void on_ContentChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
100 Efl.ContentContentChangedEvt_Args args = new Efl.ContentContentChangedEvt_Args();
101 args.arg = new Efl.Gfx.EntityConcrete(evt.Info);
103 On_ContentChangedEvt(args);
104 } catch (Exception e) {
105 Eina.Log.Error(e.ToString());
106 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
110 protected override void register_event_proxies()
112 base.register_event_proxies();
113 evt_ContentChangedEvt_delegate = new Efl.EventCb(on_ContentChangedEvt_NativeCallback);
115 /// <summary>Swallowed sub-object contained in this object.</summary>
116 /// <returns>The object to swallow.</returns>
117 virtual public Efl.Gfx.Entity GetContent() {
118 var _ret_var = Efl.ContentNativeInherit.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
119 Eina.Error.RaiseIfUnhandledException();
122 /// <summary>Swallowed sub-object contained in this object.</summary>
123 /// <param name="content">The object to swallow.</param>
124 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
125 virtual public bool SetContent( Efl.Gfx.Entity content) {
126 var _ret_var = Efl.ContentNativeInherit.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), content);
127 Eina.Error.RaiseIfUnhandledException();
130 /// <summary>Unswallow the object in the current container and return it.</summary>
131 /// <returns>Unswallowed object</returns>
132 virtual public Efl.Gfx.Entity UnsetContent() {
133 var _ret_var = Efl.ContentNativeInherit.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
134 Eina.Error.RaiseIfUnhandledException();
137 /// <summary>Swallowed sub-object contained in this object.</summary>
138 /// <value>The object to swallow.</value>
139 public Efl.Gfx.Entity Content {
140 get { return GetContent(); }
141 set { SetContent( value); }
143 private static new IntPtr GetEflClassStatic()
145 return Efl.Ui.ListDefaultItemPartIcon.efl_ui_list_default_item_part_icon_class_get();
148 public class ListDefaultItemPartIconNativeInherit : Efl.Ui.LayoutPartNativeInherit{
149 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
150 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
152 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
153 if (efl_content_get_static_delegate == null)
154 efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
155 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_content_get_static_delegate)});
156 if (efl_content_set_static_delegate == null)
157 efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
158 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_content_set_static_delegate)});
159 if (efl_content_unset_static_delegate == null)
160 efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
161 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_content_unset_static_delegate)});
162 descs.AddRange(base.GetEoOps(type));
165 public override IntPtr GetEflClass()
167 return Efl.Ui.ListDefaultItemPartIcon.efl_ui_list_default_item_part_icon_class_get();
169 public static new IntPtr GetEflClassStatic()
171 return Efl.Ui.ListDefaultItemPartIcon.efl_ui_list_default_item_part_icon_class_get();
175 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.Entity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
178 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.Entity efl_content_get_api_delegate(System.IntPtr obj);
179 public static Efl.Eo.FunctionWrapper<efl_content_get_api_delegate> efl_content_get_ptr = new Efl.Eo.FunctionWrapper<efl_content_get_api_delegate>(_Module, "efl_content_get");
180 private static Efl.Gfx.Entity content_get(System.IntPtr obj, System.IntPtr pd)
182 Eina.Log.Debug("function efl_content_get was called");
183 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
184 if(wrapper != null) {
185 Efl.Gfx.Entity _ret_var = default(Efl.Gfx.Entity);
187 _ret_var = ((ListDefaultItemPartIcon)wrapper).GetContent();
188 } catch (Exception e) {
189 Eina.Log.Warning($"Callback error: {e.ToString()}");
190 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
194 return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
197 private static efl_content_get_delegate efl_content_get_static_delegate;
200 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.Entity content);
203 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.Entity content);
204 public static Efl.Eo.FunctionWrapper<efl_content_set_api_delegate> efl_content_set_ptr = new Efl.Eo.FunctionWrapper<efl_content_set_api_delegate>(_Module, "efl_content_set");
205 private static bool content_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.Entity content)
207 Eina.Log.Debug("function efl_content_set was called");
208 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
209 if(wrapper != null) {
210 bool _ret_var = default(bool);
212 _ret_var = ((ListDefaultItemPartIcon)wrapper).SetContent( content);
213 } catch (Exception e) {
214 Eina.Log.Warning($"Callback error: {e.ToString()}");
215 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
219 return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), content);
222 private static efl_content_set_delegate efl_content_set_static_delegate;
225 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.Entity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
228 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.Entity efl_content_unset_api_delegate(System.IntPtr obj);
229 public static Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate> efl_content_unset_ptr = new Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate>(_Module, "efl_content_unset");
230 private static Efl.Gfx.Entity content_unset(System.IntPtr obj, System.IntPtr pd)
232 Eina.Log.Debug("function efl_content_unset was called");
233 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
234 if(wrapper != null) {
235 Efl.Gfx.Entity _ret_var = default(Efl.Gfx.Entity);
237 _ret_var = ((ListDefaultItemPartIcon)wrapper).UnsetContent();
238 } catch (Exception e) {
239 Eina.Log.Warning($"Callback error: {e.ToString()}");
240 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
244 return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
247 private static efl_content_unset_delegate efl_content_unset_static_delegate;