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 end part class</summary>
9 [ListDefaultItemPartEndNativeInherit]
10 public class ListDefaultItemPartEnd : Efl.Ui.LayoutPart, Efl.Eo.IWrapper,Efl.IContent
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (ListDefaultItemPartEnd))
16 return Efl.Ui.ListDefaultItemPartEndNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
22 efl_ui_list_default_item_part_end_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public ListDefaultItemPartEnd(Efl.Object parent= null
27 base(efl_ui_list_default_item_part_end_class_get(), typeof(ListDefaultItemPartEnd), parent)
29 FinishInstantiation();
31 ///<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>
32 protected ListDefaultItemPartEnd(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37 protected ListDefaultItemPartEnd(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38 ///<summary>Verifies if the given object is equal to this one.</summary>
39 public override bool Equals(object obj)
41 var other = obj as Efl.Object;
44 return this.NativeHandle == other.NativeHandle;
46 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47 public override int GetHashCode()
49 return this.NativeHandle.ToInt32();
51 ///<summary>Turns the native pointer into a string representation.</summary>
52 public override String ToString()
54 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
56 private static object ContentChangedEvtKey = new object();
57 /// <summary>Sent after the content is set or unset using the current content object.
58 /// (Since EFL 1.22)</summary>
59 public event EventHandler<Efl.IContentContentChangedEvt_Args> ContentChangedEvt
63 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
64 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ContentChangedEvt_delegate)) {
65 eventHandlers.AddHandler(ContentChangedEvtKey , value);
67 Eina.Log.Error($"Error adding proxy for event {key}");
72 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
73 if (RemoveNativeEventHandler(key, this.evt_ContentChangedEvt_delegate)) {
74 eventHandlers.RemoveHandler(ContentChangedEvtKey , value);
76 Eina.Log.Error($"Error removing proxy for event {key}");
80 ///<summary>Method to raise event ContentChangedEvt.</summary>
81 public void On_ContentChangedEvt(Efl.IContentContentChangedEvt_Args e)
83 EventHandler<Efl.IContentContentChangedEvt_Args> evt;
85 evt = (EventHandler<Efl.IContentContentChangedEvt_Args>)eventHandlers[ContentChangedEvtKey];
89 Efl.EventCb evt_ContentChangedEvt_delegate;
90 private void on_ContentChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
92 Efl.IContentContentChangedEvt_Args args = new Efl.IContentContentChangedEvt_Args();
93 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
95 On_ContentChangedEvt(args);
96 } catch (Exception e) {
97 Eina.Log.Error(e.ToString());
98 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
102 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
103 protected override void RegisterEventProxies()
105 base.RegisterEventProxies();
106 evt_ContentChangedEvt_delegate = new Efl.EventCb(on_ContentChangedEvt_NativeCallback);
108 /// <summary>Swallowed sub-object contained in this object.
109 /// (Since EFL 1.22)</summary>
110 /// <returns>The object to swallow.</returns>
111 virtual public Efl.Gfx.IEntity GetContent() {
112 var _ret_var = Efl.IContentNativeInherit.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
113 Eina.Error.RaiseIfUnhandledException();
116 /// <summary>Swallowed sub-object contained in this object.
117 /// (Since EFL 1.22)</summary>
118 /// <param name="content">The object to swallow.</param>
119 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
120 virtual public bool SetContent( Efl.Gfx.IEntity content) {
121 var _ret_var = Efl.IContentNativeInherit.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), content);
122 Eina.Error.RaiseIfUnhandledException();
125 /// <summary>Unswallow the object in the current container and return it.
126 /// (Since EFL 1.22)</summary>
127 /// <returns>Unswallowed object</returns>
128 virtual public Efl.Gfx.IEntity UnsetContent() {
129 var _ret_var = Efl.IContentNativeInherit.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
130 Eina.Error.RaiseIfUnhandledException();
133 /// <summary>Swallowed sub-object contained in this object.
134 /// (Since EFL 1.22)</summary>
135 /// <value>The object to swallow.</value>
136 public Efl.Gfx.IEntity Content {
137 get { return GetContent(); }
138 set { SetContent( value); }
140 private static IntPtr GetEflClassStatic()
142 return Efl.Ui.ListDefaultItemPartEnd.efl_ui_list_default_item_part_end_class_get();
145 public class ListDefaultItemPartEndNativeInherit : Efl.Ui.LayoutPartNativeInherit{
146 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
147 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
149 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
150 var methods = Efl.Eo.Globals.GetUserMethods(type);
151 if (efl_content_get_static_delegate == null)
152 efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
153 if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
154 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)});
155 if (efl_content_set_static_delegate == null)
156 efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
157 if (methods.FirstOrDefault(m => m.Name == "SetContent") != null)
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 if (methods.FirstOrDefault(m => m.Name == "UnsetContent") != null)
162 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)});
163 descs.AddRange(base.GetEoOps(type));
166 public override IntPtr GetEflClass()
168 return Efl.Ui.ListDefaultItemPartEnd.efl_ui_list_default_item_part_end_class_get();
170 public static new IntPtr GetEflClassStatic()
172 return Efl.Ui.ListDefaultItemPartEnd.efl_ui_list_default_item_part_end_class_get();
176 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IEntity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
179 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IEntity efl_content_get_api_delegate(System.IntPtr obj);
180 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");
181 private static Efl.Gfx.IEntity content_get(System.IntPtr obj, System.IntPtr pd)
183 Eina.Log.Debug("function efl_content_get was called");
184 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
185 if(wrapper != null) {
186 Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
188 _ret_var = ((ListDefaultItemPartEnd)wrapper).GetContent();
189 } catch (Exception e) {
190 Eina.Log.Warning($"Callback error: {e.ToString()}");
191 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
195 return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
198 private static efl_content_get_delegate efl_content_get_static_delegate;
201 [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.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
204 [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.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
205 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");
206 private static bool content_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity content)
208 Eina.Log.Debug("function efl_content_set was called");
209 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
210 if(wrapper != null) {
211 bool _ret_var = default(bool);
213 _ret_var = ((ListDefaultItemPartEnd)wrapper).SetContent( content);
214 } catch (Exception e) {
215 Eina.Log.Warning($"Callback error: {e.ToString()}");
216 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
220 return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), content);
223 private static efl_content_set_delegate efl_content_set_static_delegate;
226 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IEntity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
229 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IEntity efl_content_unset_api_delegate(System.IntPtr obj);
230 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");
231 private static Efl.Gfx.IEntity content_unset(System.IntPtr obj, System.IntPtr pd)
233 Eina.Log.Debug("function efl_content_unset was called");
234 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
235 if(wrapper != null) {
236 Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
238 _ret_var = ((ListDefaultItemPartEnd)wrapper).UnsetContent();
239 } catch (Exception e) {
240 Eina.Log.Warning($"Callback error: {e.ToString()}");
241 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
245 return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
248 private static efl_content_unset_delegate efl_content_unset_static_delegate;