1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
8 /// <summary>API common to all UI container objects.</summary>
10 public interface IPack :
12 Efl.Eo.IWrapper, IDisposable
14 /// <summary>Alignment of the container within its bounds</summary>
15 /// <param name="align_horiz">Horizontal alignment</param>
16 /// <param name="align_vert">Vertical alignment</param>
17 /// <returns></returns>
18 void GetPackAlign( out double align_horiz, out double align_vert);
19 /// <summary>Alignment of the container within its bounds</summary>
20 /// <param name="align_horiz">Horizontal alignment</param>
21 /// <param name="align_vert">Vertical alignment</param>
22 /// <returns></returns>
23 void SetPackAlign( double align_horiz, double align_vert);
24 /// <summary>Padding between items contained in this object.</summary>
25 /// <param name="pad_horiz">Horizontal padding</param>
26 /// <param name="pad_vert">Vertical padding</param>
27 /// <param name="scalable"><c>true</c> if scalable, <c>false</c> otherwise</param>
28 /// <returns></returns>
29 void GetPackPadding( out double pad_horiz, out double pad_vert, out bool scalable);
30 /// <summary>Padding between items contained in this object.</summary>
31 /// <param name="pad_horiz">Horizontal padding</param>
32 /// <param name="pad_vert">Vertical padding</param>
33 /// <param name="scalable"><c>true</c> if scalable, <c>false</c> otherwise</param>
34 /// <returns></returns>
35 void SetPackPadding( double pad_horiz, double pad_vert, bool scalable);
36 /// <summary>Removes all packed contents, and unreferences them.</summary>
37 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
39 /// <summary>Removes all packed contents, without unreferencing them.
40 /// Use with caution.</summary>
41 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
43 /// <summary>Removes an existing item from the container, without deleting it.</summary>
44 /// <param name="subobj">The unpacked object.</param>
45 /// <returns><c>false</c> if <c>subobj</c> wasn't a child or can't be removed</returns>
46 bool Unpack( Efl.Gfx.IEntity subobj);
47 /// <summary>Adds an item to this container.
48 /// Depending on the container this will either fill in the default spot, replacing any already existing element or append to the end of the container if there is no default part.
50 /// When this container is deleted, it will request deletion of the given <c>subobj</c>. Use <see cref="Efl.IPack.Unpack"/> to remove <c>subobj</c> from this container without deleting it.</summary>
51 /// <param name="subobj">An object to pack.</param>
52 /// <returns><c>false</c> if <c>subobj</c> could not be packed.</returns>
53 bool DoPack( Efl.Gfx.IEntity subobj);
55 /// <summary>API common to all UI container objects.</summary>
56 sealed public class IPackConcrete :
61 ///<summary>Pointer to the native class description.</summary>
62 public System.IntPtr NativeClass {
64 if (((object)this).GetType() == typeof (IPackConcrete))
65 return Efl.IPackNativeInherit.GetEflClassStatic();
67 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
70 private EventHandlerList eventHandlers = new EventHandlerList();
71 private System.IntPtr handle;
72 ///<summary>Pointer to the native instance.</summary>
73 public System.IntPtr NativeHandle {
74 get { return handle; }
76 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
77 efl_pack_interface_get();
78 ///<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>
79 private IPackConcrete(System.IntPtr raw)
82 RegisterEventProxies();
84 ///<summary>Destructor.</summary>
89 ///<summary>Releases the underlying native instance.</summary>
90 void Dispose(bool disposing)
92 if (handle != System.IntPtr.Zero) {
93 Efl.Eo.Globals.efl_unref(handle);
94 handle = System.IntPtr.Zero;
97 ///<summary>Releases the underlying native instance.</summary>
101 GC.SuppressFinalize(this);
103 ///<summary>Verifies if the given object is equal to this one.</summary>
104 public override bool Equals(object obj)
106 var other = obj as Efl.Object;
109 return this.NativeHandle == other.NativeHandle;
111 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
112 public override int GetHashCode()
114 return this.NativeHandle.ToInt32();
116 ///<summary>Turns the native pointer into a string representation.</summary>
117 public override String ToString()
119 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
121 private readonly object eventLock = new object();
122 private Dictionary<string, int> event_cb_count = new Dictionary<string, int>();
123 ///<summary>Adds a new event handler, registering it to the native event. For internal use only.</summary>
124 ///<param name="lib">The name of the native library definining the event.</param>
125 ///<param name="key">The name of the native event.</param>
126 ///<param name="evt_delegate">The delegate to be called on event raising.</param>
127 ///<returns>True if the delegate was successfully registered.</returns>
128 private bool AddNativeEventHandler(string lib, string key, Efl.EventCb evt_delegate) {
130 if (!event_cb_count.TryGetValue(key, out event_count))
131 event_cb_count[key] = event_count;
132 if (event_count == 0) {
133 IntPtr desc = Efl.EventDescription.GetNative(lib, key);
134 if (desc == IntPtr.Zero) {
135 Eina.Log.Error($"Failed to get native event {key}");
138 bool result = Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);
140 Eina.Log.Error($"Failed to add event proxy for event {key}");
143 Eina.Error.RaiseIfUnhandledException();
145 event_cb_count[key]++;
148 ///<summary>Removes the given event handler for the given event. For internal use only.</summary>
149 ///<param name="key">The name of the native event.</param>
150 ///<param name="evt_delegate">The delegate to be removed.</param>
151 ///<returns>True if the delegate was successfully registered.</returns>
152 private bool RemoveNativeEventHandler(string key, Efl.EventCb evt_delegate) {
154 if (!event_cb_count.TryGetValue(key, out event_count))
155 event_cb_count[key] = event_count;
156 if (event_count == 1) {
157 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
158 if (desc == IntPtr.Zero) {
159 Eina.Log.Error($"Failed to get native event {key}");
162 bool result = Efl.Eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);
164 Eina.Log.Error($"Failed to remove event proxy for event {key}");
167 Eina.Error.RaiseIfUnhandledException();
168 } else if (event_count == 0) {
169 Eina.Log.Error($"Trying to remove proxy for event {key} when there is nothing registered.");
172 event_cb_count[key]--;
175 private static object ContentAddedEvtKey = new object();
176 /// <summary>Sent after a new item was added.
177 /// (Since EFL 1.22)</summary>
178 public event EventHandler<Efl.IContainerContentAddedEvt_Args> ContentAddedEvt
182 string key = "_EFL_CONTAINER_EVENT_CONTENT_ADDED";
183 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ContentAddedEvt_delegate)) {
184 eventHandlers.AddHandler(ContentAddedEvtKey , value);
186 Eina.Log.Error($"Error adding proxy for event {key}");
191 string key = "_EFL_CONTAINER_EVENT_CONTENT_ADDED";
192 if (RemoveNativeEventHandler(key, this.evt_ContentAddedEvt_delegate)) {
193 eventHandlers.RemoveHandler(ContentAddedEvtKey , value);
195 Eina.Log.Error($"Error removing proxy for event {key}");
199 ///<summary>Method to raise event ContentAddedEvt.</summary>
200 public void On_ContentAddedEvt(Efl.IContainerContentAddedEvt_Args e)
202 EventHandler<Efl.IContainerContentAddedEvt_Args> evt;
204 evt = (EventHandler<Efl.IContainerContentAddedEvt_Args>)eventHandlers[ContentAddedEvtKey];
206 evt?.Invoke(this, e);
208 Efl.EventCb evt_ContentAddedEvt_delegate;
209 private void on_ContentAddedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
211 Efl.IContainerContentAddedEvt_Args args = new Efl.IContainerContentAddedEvt_Args();
212 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
214 On_ContentAddedEvt(args);
215 } catch (Exception e) {
216 Eina.Log.Error(e.ToString());
217 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
221 private static object ContentRemovedEvtKey = new object();
222 /// <summary>Sent after an item was removed, before unref.
223 /// (Since EFL 1.22)</summary>
224 public event EventHandler<Efl.IContainerContentRemovedEvt_Args> ContentRemovedEvt
228 string key = "_EFL_CONTAINER_EVENT_CONTENT_REMOVED";
229 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ContentRemovedEvt_delegate)) {
230 eventHandlers.AddHandler(ContentRemovedEvtKey , value);
232 Eina.Log.Error($"Error adding proxy for event {key}");
237 string key = "_EFL_CONTAINER_EVENT_CONTENT_REMOVED";
238 if (RemoveNativeEventHandler(key, this.evt_ContentRemovedEvt_delegate)) {
239 eventHandlers.RemoveHandler(ContentRemovedEvtKey , value);
241 Eina.Log.Error($"Error removing proxy for event {key}");
245 ///<summary>Method to raise event ContentRemovedEvt.</summary>
246 public void On_ContentRemovedEvt(Efl.IContainerContentRemovedEvt_Args e)
248 EventHandler<Efl.IContainerContentRemovedEvt_Args> evt;
250 evt = (EventHandler<Efl.IContainerContentRemovedEvt_Args>)eventHandlers[ContentRemovedEvtKey];
252 evt?.Invoke(this, e);
254 Efl.EventCb evt_ContentRemovedEvt_delegate;
255 private void on_ContentRemovedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
257 Efl.IContainerContentRemovedEvt_Args args = new Efl.IContainerContentRemovedEvt_Args();
258 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
260 On_ContentRemovedEvt(args);
261 } catch (Exception e) {
262 Eina.Log.Error(e.ToString());
263 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
267 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
268 void RegisterEventProxies()
270 evt_ContentAddedEvt_delegate = new Efl.EventCb(on_ContentAddedEvt_NativeCallback);
271 evt_ContentRemovedEvt_delegate = new Efl.EventCb(on_ContentRemovedEvt_NativeCallback);
273 /// <summary>Alignment of the container within its bounds</summary>
274 /// <param name="align_horiz">Horizontal alignment</param>
275 /// <param name="align_vert">Vertical alignment</param>
276 /// <returns></returns>
277 public void GetPackAlign( out double align_horiz, out double align_vert) {
278 Efl.IPackNativeInherit.efl_pack_align_get_ptr.Value.Delegate(this.NativeHandle, out align_horiz, out align_vert);
279 Eina.Error.RaiseIfUnhandledException();
281 /// <summary>Alignment of the container within its bounds</summary>
282 /// <param name="align_horiz">Horizontal alignment</param>
283 /// <param name="align_vert">Vertical alignment</param>
284 /// <returns></returns>
285 public void SetPackAlign( double align_horiz, double align_vert) {
286 Efl.IPackNativeInherit.efl_pack_align_set_ptr.Value.Delegate(this.NativeHandle, align_horiz, align_vert);
287 Eina.Error.RaiseIfUnhandledException();
289 /// <summary>Padding between items contained in this object.</summary>
290 /// <param name="pad_horiz">Horizontal padding</param>
291 /// <param name="pad_vert">Vertical padding</param>
292 /// <param name="scalable"><c>true</c> if scalable, <c>false</c> otherwise</param>
293 /// <returns></returns>
294 public void GetPackPadding( out double pad_horiz, out double pad_vert, out bool scalable) {
295 Efl.IPackNativeInherit.efl_pack_padding_get_ptr.Value.Delegate(this.NativeHandle, out pad_horiz, out pad_vert, out scalable);
296 Eina.Error.RaiseIfUnhandledException();
298 /// <summary>Padding between items contained in this object.</summary>
299 /// <param name="pad_horiz">Horizontal padding</param>
300 /// <param name="pad_vert">Vertical padding</param>
301 /// <param name="scalable"><c>true</c> if scalable, <c>false</c> otherwise</param>
302 /// <returns></returns>
303 public void SetPackPadding( double pad_horiz, double pad_vert, bool scalable) {
304 Efl.IPackNativeInherit.efl_pack_padding_set_ptr.Value.Delegate(this.NativeHandle, pad_horiz, pad_vert, scalable);
305 Eina.Error.RaiseIfUnhandledException();
307 /// <summary>Removes all packed contents, and unreferences them.</summary>
308 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
309 public bool ClearPack() {
310 var _ret_var = Efl.IPackNativeInherit.efl_pack_clear_ptr.Value.Delegate(this.NativeHandle);
311 Eina.Error.RaiseIfUnhandledException();
314 /// <summary>Removes all packed contents, without unreferencing them.
315 /// Use with caution.</summary>
316 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
317 public bool UnpackAll() {
318 var _ret_var = Efl.IPackNativeInherit.efl_pack_unpack_all_ptr.Value.Delegate(this.NativeHandle);
319 Eina.Error.RaiseIfUnhandledException();
322 /// <summary>Removes an existing item from the container, without deleting it.</summary>
323 /// <param name="subobj">The unpacked object.</param>
324 /// <returns><c>false</c> if <c>subobj</c> wasn't a child or can't be removed</returns>
325 public bool Unpack( Efl.Gfx.IEntity subobj) {
326 var _ret_var = Efl.IPackNativeInherit.efl_pack_unpack_ptr.Value.Delegate(this.NativeHandle, subobj);
327 Eina.Error.RaiseIfUnhandledException();
330 /// <summary>Adds an item to this container.
331 /// Depending on the container this will either fill in the default spot, replacing any already existing element or append to the end of the container if there is no default part.
333 /// When this container is deleted, it will request deletion of the given <c>subobj</c>. Use <see cref="Efl.IPack.Unpack"/> to remove <c>subobj</c> from this container without deleting it.</summary>
334 /// <param name="subobj">An object to pack.</param>
335 /// <returns><c>false</c> if <c>subobj</c> could not be packed.</returns>
336 public bool DoPack( Efl.Gfx.IEntity subobj) {
337 var _ret_var = Efl.IPackNativeInherit.efl_pack_ptr.Value.Delegate(this.NativeHandle, subobj);
338 Eina.Error.RaiseIfUnhandledException();
341 /// <summary>Begin iterating over this object's contents.
342 /// (Since EFL 1.22)</summary>
343 /// <returns>Iterator to object content</returns>
344 public Eina.Iterator<Efl.Gfx.IEntity> ContentIterate() {
345 var _ret_var = Efl.IContainerNativeInherit.efl_content_iterate_ptr.Value.Delegate(this.NativeHandle);
346 Eina.Error.RaiseIfUnhandledException();
347 return new Eina.Iterator<Efl.Gfx.IEntity>(_ret_var, true, false);
349 /// <summary>Returns the number of UI elements packed in this container.
350 /// (Since EFL 1.22)</summary>
351 /// <returns>Number of packed UI elements</returns>
352 public int ContentCount() {
353 var _ret_var = Efl.IContainerNativeInherit.efl_content_count_ptr.Value.Delegate(this.NativeHandle);
354 Eina.Error.RaiseIfUnhandledException();
357 private static IntPtr GetEflClassStatic()
359 return Efl.IPackConcrete.efl_pack_interface_get();
362 public class IPackNativeInherit : Efl.Eo.NativeClass{
363 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
364 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
366 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
367 var methods = Efl.Eo.Globals.GetUserMethods(type);
368 if (efl_pack_align_get_static_delegate == null)
369 efl_pack_align_get_static_delegate = new efl_pack_align_get_delegate(pack_align_get);
370 if (methods.FirstOrDefault(m => m.Name == "GetPackAlign") != null)
371 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_align_get"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_align_get_static_delegate)});
372 if (efl_pack_align_set_static_delegate == null)
373 efl_pack_align_set_static_delegate = new efl_pack_align_set_delegate(pack_align_set);
374 if (methods.FirstOrDefault(m => m.Name == "SetPackAlign") != null)
375 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_align_set"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_align_set_static_delegate)});
376 if (efl_pack_padding_get_static_delegate == null)
377 efl_pack_padding_get_static_delegate = new efl_pack_padding_get_delegate(pack_padding_get);
378 if (methods.FirstOrDefault(m => m.Name == "GetPackPadding") != null)
379 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_padding_get"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_padding_get_static_delegate)});
380 if (efl_pack_padding_set_static_delegate == null)
381 efl_pack_padding_set_static_delegate = new efl_pack_padding_set_delegate(pack_padding_set);
382 if (methods.FirstOrDefault(m => m.Name == "SetPackPadding") != null)
383 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_padding_set"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_padding_set_static_delegate)});
384 if (efl_pack_clear_static_delegate == null)
385 efl_pack_clear_static_delegate = new efl_pack_clear_delegate(pack_clear);
386 if (methods.FirstOrDefault(m => m.Name == "ClearPack") != null)
387 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_clear"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_clear_static_delegate)});
388 if (efl_pack_unpack_all_static_delegate == null)
389 efl_pack_unpack_all_static_delegate = new efl_pack_unpack_all_delegate(unpack_all);
390 if (methods.FirstOrDefault(m => m.Name == "UnpackAll") != null)
391 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_unpack_all"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_unpack_all_static_delegate)});
392 if (efl_pack_unpack_static_delegate == null)
393 efl_pack_unpack_static_delegate = new efl_pack_unpack_delegate(unpack);
394 if (methods.FirstOrDefault(m => m.Name == "Unpack") != null)
395 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack_unpack"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_unpack_static_delegate)});
396 if (efl_pack_static_delegate == null)
397 efl_pack_static_delegate = new efl_pack_delegate(pack);
398 if (methods.FirstOrDefault(m => m.Name == "DoPack") != null)
399 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_pack"), func = Marshal.GetFunctionPointerForDelegate(efl_pack_static_delegate)});
400 if (efl_content_iterate_static_delegate == null)
401 efl_content_iterate_static_delegate = new efl_content_iterate_delegate(content_iterate);
402 if (methods.FirstOrDefault(m => m.Name == "ContentIterate") != null)
403 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_iterate"), func = Marshal.GetFunctionPointerForDelegate(efl_content_iterate_static_delegate)});
404 if (efl_content_count_static_delegate == null)
405 efl_content_count_static_delegate = new efl_content_count_delegate(content_count);
406 if (methods.FirstOrDefault(m => m.Name == "ContentCount") != null)
407 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_count"), func = Marshal.GetFunctionPointerForDelegate(efl_content_count_static_delegate)});
410 public override IntPtr GetEflClass()
412 return Efl.IPackConcrete.efl_pack_interface_get();
414 public static IntPtr GetEflClassStatic()
416 return Efl.IPackConcrete.efl_pack_interface_get();
420 private delegate void efl_pack_align_get_delegate(System.IntPtr obj, System.IntPtr pd, out double align_horiz, out double align_vert);
423 public delegate void efl_pack_align_get_api_delegate(System.IntPtr obj, out double align_horiz, out double align_vert);
424 public static Efl.Eo.FunctionWrapper<efl_pack_align_get_api_delegate> efl_pack_align_get_ptr = new Efl.Eo.FunctionWrapper<efl_pack_align_get_api_delegate>(_Module, "efl_pack_align_get");
425 private static void pack_align_get(System.IntPtr obj, System.IntPtr pd, out double align_horiz, out double align_vert)
427 Eina.Log.Debug("function efl_pack_align_get was called");
428 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
429 if(wrapper != null) {
430 align_horiz = default(double); align_vert = default(double);
432 ((IPack)wrapper).GetPackAlign( out align_horiz, out align_vert);
433 } catch (Exception e) {
434 Eina.Log.Warning($"Callback error: {e.ToString()}");
435 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
438 efl_pack_align_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out align_horiz, out align_vert);
441 private static efl_pack_align_get_delegate efl_pack_align_get_static_delegate;
444 private delegate void efl_pack_align_set_delegate(System.IntPtr obj, System.IntPtr pd, double align_horiz, double align_vert);
447 public delegate void efl_pack_align_set_api_delegate(System.IntPtr obj, double align_horiz, double align_vert);
448 public static Efl.Eo.FunctionWrapper<efl_pack_align_set_api_delegate> efl_pack_align_set_ptr = new Efl.Eo.FunctionWrapper<efl_pack_align_set_api_delegate>(_Module, "efl_pack_align_set");
449 private static void pack_align_set(System.IntPtr obj, System.IntPtr pd, double align_horiz, double align_vert)
451 Eina.Log.Debug("function efl_pack_align_set was called");
452 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
453 if(wrapper != null) {
456 ((IPack)wrapper).SetPackAlign( align_horiz, align_vert);
457 } catch (Exception e) {
458 Eina.Log.Warning($"Callback error: {e.ToString()}");
459 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
462 efl_pack_align_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), align_horiz, align_vert);
465 private static efl_pack_align_set_delegate efl_pack_align_set_static_delegate;
468 private delegate void efl_pack_padding_get_delegate(System.IntPtr obj, System.IntPtr pd, out double pad_horiz, out double pad_vert, [MarshalAs(UnmanagedType.U1)] out bool scalable);
471 public delegate void efl_pack_padding_get_api_delegate(System.IntPtr obj, out double pad_horiz, out double pad_vert, [MarshalAs(UnmanagedType.U1)] out bool scalable);
472 public static Efl.Eo.FunctionWrapper<efl_pack_padding_get_api_delegate> efl_pack_padding_get_ptr = new Efl.Eo.FunctionWrapper<efl_pack_padding_get_api_delegate>(_Module, "efl_pack_padding_get");
473 private static void pack_padding_get(System.IntPtr obj, System.IntPtr pd, out double pad_horiz, out double pad_vert, out bool scalable)
475 Eina.Log.Debug("function efl_pack_padding_get was called");
476 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
477 if(wrapper != null) {
478 pad_horiz = default(double); pad_vert = default(double); scalable = default(bool);
480 ((IPack)wrapper).GetPackPadding( out pad_horiz, out pad_vert, out scalable);
481 } catch (Exception e) {
482 Eina.Log.Warning($"Callback error: {e.ToString()}");
483 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
486 efl_pack_padding_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out pad_horiz, out pad_vert, out scalable);
489 private static efl_pack_padding_get_delegate efl_pack_padding_get_static_delegate;
492 private delegate void efl_pack_padding_set_delegate(System.IntPtr obj, System.IntPtr pd, double pad_horiz, double pad_vert, [MarshalAs(UnmanagedType.U1)] bool scalable);
495 public delegate void efl_pack_padding_set_api_delegate(System.IntPtr obj, double pad_horiz, double pad_vert, [MarshalAs(UnmanagedType.U1)] bool scalable);
496 public static Efl.Eo.FunctionWrapper<efl_pack_padding_set_api_delegate> efl_pack_padding_set_ptr = new Efl.Eo.FunctionWrapper<efl_pack_padding_set_api_delegate>(_Module, "efl_pack_padding_set");
497 private static void pack_padding_set(System.IntPtr obj, System.IntPtr pd, double pad_horiz, double pad_vert, bool scalable)
499 Eina.Log.Debug("function efl_pack_padding_set was called");
500 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
501 if(wrapper != null) {
504 ((IPack)wrapper).SetPackPadding( pad_horiz, pad_vert, scalable);
505 } catch (Exception e) {
506 Eina.Log.Warning($"Callback error: {e.ToString()}");
507 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
510 efl_pack_padding_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), pad_horiz, pad_vert, scalable);
513 private static efl_pack_padding_set_delegate efl_pack_padding_set_static_delegate;
516 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_pack_clear_delegate(System.IntPtr obj, System.IntPtr pd);
519 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_pack_clear_api_delegate(System.IntPtr obj);
520 public static Efl.Eo.FunctionWrapper<efl_pack_clear_api_delegate> efl_pack_clear_ptr = new Efl.Eo.FunctionWrapper<efl_pack_clear_api_delegate>(_Module, "efl_pack_clear");
521 private static bool pack_clear(System.IntPtr obj, System.IntPtr pd)
523 Eina.Log.Debug("function efl_pack_clear was called");
524 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
525 if(wrapper != null) {
526 bool _ret_var = default(bool);
528 _ret_var = ((IPack)wrapper).ClearPack();
529 } catch (Exception e) {
530 Eina.Log.Warning($"Callback error: {e.ToString()}");
531 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
535 return efl_pack_clear_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
538 private static efl_pack_clear_delegate efl_pack_clear_static_delegate;
541 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_pack_unpack_all_delegate(System.IntPtr obj, System.IntPtr pd);
544 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_pack_unpack_all_api_delegate(System.IntPtr obj);
545 public static Efl.Eo.FunctionWrapper<efl_pack_unpack_all_api_delegate> efl_pack_unpack_all_ptr = new Efl.Eo.FunctionWrapper<efl_pack_unpack_all_api_delegate>(_Module, "efl_pack_unpack_all");
546 private static bool unpack_all(System.IntPtr obj, System.IntPtr pd)
548 Eina.Log.Debug("function efl_pack_unpack_all was called");
549 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
550 if(wrapper != null) {
551 bool _ret_var = default(bool);
553 _ret_var = ((IPack)wrapper).UnpackAll();
554 } catch (Exception e) {
555 Eina.Log.Warning($"Callback error: {e.ToString()}");
556 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
560 return efl_pack_unpack_all_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
563 private static efl_pack_unpack_all_delegate efl_pack_unpack_all_static_delegate;
566 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_pack_unpack_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity subobj);
569 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_pack_unpack_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity subobj);
570 public static Efl.Eo.FunctionWrapper<efl_pack_unpack_api_delegate> efl_pack_unpack_ptr = new Efl.Eo.FunctionWrapper<efl_pack_unpack_api_delegate>(_Module, "efl_pack_unpack");
571 private static bool unpack(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity subobj)
573 Eina.Log.Debug("function efl_pack_unpack was called");
574 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
575 if(wrapper != null) {
576 bool _ret_var = default(bool);
578 _ret_var = ((IPack)wrapper).Unpack( subobj);
579 } catch (Exception e) {
580 Eina.Log.Warning($"Callback error: {e.ToString()}");
581 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
585 return efl_pack_unpack_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), subobj);
588 private static efl_pack_unpack_delegate efl_pack_unpack_static_delegate;
591 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_pack_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity subobj);
594 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_pack_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity subobj);
595 public static Efl.Eo.FunctionWrapper<efl_pack_api_delegate> efl_pack_ptr = new Efl.Eo.FunctionWrapper<efl_pack_api_delegate>(_Module, "efl_pack");
596 private static bool pack(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity subobj)
598 Eina.Log.Debug("function efl_pack was called");
599 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
600 if(wrapper != null) {
601 bool _ret_var = default(bool);
603 _ret_var = ((IPack)wrapper).DoPack( subobj);
604 } catch (Exception e) {
605 Eina.Log.Warning($"Callback error: {e.ToString()}");
606 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
610 return efl_pack_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), subobj);
613 private static efl_pack_delegate efl_pack_static_delegate;
616 private delegate System.IntPtr efl_content_iterate_delegate(System.IntPtr obj, System.IntPtr pd);
619 public delegate System.IntPtr efl_content_iterate_api_delegate(System.IntPtr obj);
620 public static Efl.Eo.FunctionWrapper<efl_content_iterate_api_delegate> efl_content_iterate_ptr = new Efl.Eo.FunctionWrapper<efl_content_iterate_api_delegate>(_Module, "efl_content_iterate");
621 private static System.IntPtr content_iterate(System.IntPtr obj, System.IntPtr pd)
623 Eina.Log.Debug("function efl_content_iterate was called");
624 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
625 if(wrapper != null) {
626 Eina.Iterator<Efl.Gfx.IEntity> _ret_var = default(Eina.Iterator<Efl.Gfx.IEntity>);
628 _ret_var = ((IPack)wrapper).ContentIterate();
629 } catch (Exception e) {
630 Eina.Log.Warning($"Callback error: {e.ToString()}");
631 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
633 _ret_var.Own = false; return _ret_var.Handle;
635 return efl_content_iterate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
638 private static efl_content_iterate_delegate efl_content_iterate_static_delegate;
641 private delegate int efl_content_count_delegate(System.IntPtr obj, System.IntPtr pd);
644 public delegate int efl_content_count_api_delegate(System.IntPtr obj);
645 public static Efl.Eo.FunctionWrapper<efl_content_count_api_delegate> efl_content_count_ptr = new Efl.Eo.FunctionWrapper<efl_content_count_api_delegate>(_Module, "efl_content_count");
646 private static int content_count(System.IntPtr obj, System.IntPtr pd)
648 Eina.Log.Debug("function efl_content_count was called");
649 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
650 if(wrapper != null) {
651 int _ret_var = default(int);
653 _ret_var = ((IPack)wrapper).ContentCount();
654 } catch (Exception e) {
655 Eina.Log.Warning($"Callback error: {e.ToString()}");
656 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
660 return efl_content_count_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
663 private static efl_content_count_delegate efl_content_count_static_delegate;