2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 namespace PositionManager {
15 /// <param name="range">The range of items to fill into @.memory. The length of memory must be bigger or equal to the requested items</param>
16 /// <param name="memory">The slice to fill the information in, the full slice will be filled if there are enough items</param>
17 [Efl.Eo.BindingEntity]
18 public delegate Efl.Ui.PositionManager.ObjectBatchResult ObjectBatchCallback(Efl.Ui.PositionManager.RequestRange range, Eina.RwSlice memory);
19 public delegate Efl.Ui.PositionManager.ObjectBatchResult.NativeStruct ObjectBatchCallbackInternal(IntPtr data, Efl.Ui.PositionManager.RequestRange.NativeStruct range, Eina.RwSlice memory);
20 internal class ObjectBatchCallbackWrapper : IDisposable
23 private ObjectBatchCallbackInternal _cb;
24 private IntPtr _cb_data;
25 private EinaFreeCb _cb_free_cb;
27 internal ObjectBatchCallbackWrapper (ObjectBatchCallbackInternal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb)
30 this._cb_data = _cb_data;
31 this._cb_free_cb = _cb_free_cb;
34 ~ObjectBatchCallbackWrapper()
39 protected virtual void Dispose(bool disposing)
41 if (this._cb_free_cb != null)
45 this._cb_free_cb(this._cb_data);
49 Efl.Eo.Globals.ThreadSafeFreeCbExec(this._cb_free_cb, this._cb_data);
51 this._cb_free_cb = null;
52 this._cb_data = IntPtr.Zero;
60 GC.SuppressFinalize(this);
63 internal Efl.Ui.PositionManager.ObjectBatchResult ManagedCb(Efl.Ui.PositionManager.RequestRange range, Eina.RwSlice memory)
65 Efl.Ui.PositionManager.RequestRange.NativeStruct _in_range = range;
66 var _ret_var = _cb(_cb_data, _in_range, memory);
67 Eina.Error.RaiseIfUnhandledException();
71 internal static Efl.Ui.PositionManager.ObjectBatchResult.NativeStruct Cb(IntPtr cb_data, Efl.Ui.PositionManager.RequestRange.NativeStruct range, Eina.RwSlice memory)
73 GCHandle handle = GCHandle.FromIntPtr(cb_data);
74 ObjectBatchCallback cb = (ObjectBatchCallback)handle.Target;
75 Efl.Ui.PositionManager.RequestRange _in_range = range;
76 Efl.Ui.PositionManager.ObjectBatchResult _ret_var = default(Efl.Ui.PositionManager.ObjectBatchResult);
78 _ret_var = cb(_in_range, memory);
79 } catch (Exception e) {
80 Eina.Log.Warning($"Callback error: {e.ToString()}");
81 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
96 namespace PositionManager {
98 /// <param name="conf">The configution for this call</param>
99 /// <param name="memory">The slice to fill the information in, the full slice will be filled if there are enough items</param>
100 [Efl.Eo.BindingEntity]
101 public delegate Efl.Ui.PositionManager.SizeBatchResult SizeBatchCallback(Efl.Ui.PositionManager.SizeCallConfig conf, Eina.RwSlice memory);
102 public delegate Efl.Ui.PositionManager.SizeBatchResult.NativeStruct SizeBatchCallbackInternal(IntPtr data, Efl.Ui.PositionManager.SizeCallConfig.NativeStruct conf, Eina.RwSlice memory);
103 internal class SizeBatchCallbackWrapper : IDisposable
106 private SizeBatchCallbackInternal _cb;
107 private IntPtr _cb_data;
108 private EinaFreeCb _cb_free_cb;
110 internal SizeBatchCallbackWrapper (SizeBatchCallbackInternal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb)
113 this._cb_data = _cb_data;
114 this._cb_free_cb = _cb_free_cb;
117 ~SizeBatchCallbackWrapper()
122 protected virtual void Dispose(bool disposing)
124 if (this._cb_free_cb != null)
128 this._cb_free_cb(this._cb_data);
132 Efl.Eo.Globals.ThreadSafeFreeCbExec(this._cb_free_cb, this._cb_data);
134 this._cb_free_cb = null;
135 this._cb_data = IntPtr.Zero;
140 public void Dispose()
143 GC.SuppressFinalize(this);
146 internal Efl.Ui.PositionManager.SizeBatchResult ManagedCb(Efl.Ui.PositionManager.SizeCallConfig conf, Eina.RwSlice memory)
148 Efl.Ui.PositionManager.SizeCallConfig.NativeStruct _in_conf = conf;
149 var _ret_var = _cb(_cb_data, _in_conf, memory);
150 Eina.Error.RaiseIfUnhandledException();
154 internal static Efl.Ui.PositionManager.SizeBatchResult.NativeStruct Cb(IntPtr cb_data, Efl.Ui.PositionManager.SizeCallConfig.NativeStruct conf, Eina.RwSlice memory)
156 GCHandle handle = GCHandle.FromIntPtr(cb_data);
157 SizeBatchCallback cb = (SizeBatchCallback)handle.Target;
158 Efl.Ui.PositionManager.SizeCallConfig _in_conf = conf;
159 Efl.Ui.PositionManager.SizeBatchResult _ret_var = default(Efl.Ui.PositionManager.SizeBatchResult);
161 _ret_var = cb(_in_conf, memory);
162 } catch (Exception e) {
163 Eina.Log.Warning($"Callback error: {e.ToString()}");
164 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
179 namespace PositionManager {
181 /// <summary>Interface for abstracting the data access of the position managers.
182 /// The idea here is that a data-provider, calls <see cref="Efl.Ui.PositionManager.IDataAccessV1.SetDataAccess"/> on the positon manager object and passes the functions that are defined here. At any pointer later in time, the position manager can call these function callbacks to get sizes or objects. A data-provider should always fill all requested items. If a item is not available <c>null</c> is inserted. If a size is not available, a as-close-as-possible approximation should be inserted. The Size callback is equipped with a parameter for if this is a caching request or not. This flag can be used to differentiate between two usecases. The size can be requested for building up a cache over all items. The size can also be requested for applying it to the object. The data-provider might needs to do heavy loading for getting the right size available, in case of a cache build up the as-close-as-possible aproximation is enough there. If it is real placement, the size should be correct. If a size changes after it was returned due to batching, this change still should be annonced with the <see cref="Efl.Ui.PositionManager.IEntity.ItemSizeChanged"/> function.
184 /// The depth of the items is used to express a hierachical structure on the items themselves. Any given depth might or might not have a <c>depth_leader</c>. A group is ended when there is either a lower depth, or another depth_leader.</summary>
185 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
186 [Efl.Ui.PositionManager.IDataAccessV1Concrete.NativeMethods]
187 [Efl.Eo.BindingEntity]
188 public interface IDataAccessV1 :
189 Efl.Eo.IWrapper, IDisposable
191 /// <summary>This gives access to items to be managed. The manager reads this information and modifies the retrieved items' positions and sizes.
192 /// <c>obj_access</c> gives access to the graphical entitites to manage. Some of them might be NULL, meaning they are not yet ready to be displayed. Their size in the <c>size_access</c> array will be correct, though, so other entities can still be positioned correctly. Typically, only entities inside the viewport will be retrieved.
194 /// <c>size_access</c> gives access to the 2D sizes for the items to manage. All sizes will always be valid, and might change over time (indicated through the <see cref="Efl.Ui.PositionManager.IEntity.ItemSizeChanged"/> method). The whole range might need to be traversed in order to calculate the position of all items in some arrangements.
196 /// You can access a batch of objects or sizes by calling the here passed function callbacks. Further details can be found at the function definitions.</summary>
197 /// <param name="obj_access">Function callback for canvas objects, even if the start_id is valid, the returned objects may be NULL.</param>
198 /// <param name="size_access">Function callback for the size, returned values are always valid, but might be changed later on.</param>
199 /// <param name="size">valid size for start_id, 0 <= i < size</param>
200 void SetDataAccess(Efl.Ui.PositionManager.ObjectBatchCallback obj_access, Efl.Ui.PositionManager.SizeBatchCallback size_access, int size);
201 /// <summary>This gives access to items to be managed. The manager reads this information and modifies the retrieved items' positions and sizes.
202 /// <c>obj_access</c> gives access to the graphical entitites to manage. Some of them might be NULL, meaning they are not yet ready to be displayed. Their size in the <c>size_access</c> array will be correct, though, so other entities can still be positioned correctly. Typically, only entities inside the viewport will be retrieved.
204 /// <c>size_access</c> gives access to the 2D sizes for the items to manage. All sizes will always be valid, and might change over time (indicated through the <see cref="Efl.Ui.PositionManager.IEntity.ItemSizeChanged"/> method). The whole range might need to be traversed in order to calculate the position of all items in some arrangements.
206 /// You can access a batch of objects or sizes by calling the here passed function callbacks. Further details can be found at the function definitions.</summary>
207 /// <value>Function callback for canvas objects, even if the start_id is valid, the returned objects may be NULL.</value>
208 (Efl.Ui.PositionManager.ObjectBatchCallback, Efl.Ui.PositionManager.SizeBatchCallback, int) DataAccess {
212 /// <summary>Interface for abstracting the data access of the position managers.
213 /// The idea here is that a data-provider, calls <see cref="Efl.Ui.PositionManager.IDataAccessV1.SetDataAccess"/> on the positon manager object and passes the functions that are defined here. At any pointer later in time, the position manager can call these function callbacks to get sizes or objects. A data-provider should always fill all requested items. If a item is not available <c>null</c> is inserted. If a size is not available, a as-close-as-possible approximation should be inserted. The Size callback is equipped with a parameter for if this is a caching request or not. This flag can be used to differentiate between two usecases. The size can be requested for building up a cache over all items. The size can also be requested for applying it to the object. The data-provider might needs to do heavy loading for getting the right size available, in case of a cache build up the as-close-as-possible aproximation is enough there. If it is real placement, the size should be correct. If a size changes after it was returned due to batching, this change still should be annonced with the <see cref="Efl.Ui.PositionManager.IEntity.ItemSizeChanged"/> function.
215 /// The depth of the items is used to express a hierachical structure on the items themselves. Any given depth might or might not have a <c>depth_leader</c>. A group is ended when there is either a lower depth, or another depth_leader.</summary>
216 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
217 sealed public class IDataAccessV1Concrete :
222 /// <summary>Pointer to the native class description.</summary>
223 public override System.IntPtr NativeClass
227 if (((object)this).GetType() == typeof(IDataAccessV1Concrete))
229 return GetEflClassStatic();
233 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
238 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
239 /// Do not call this constructor directly.</summary>
240 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
241 private IDataAccessV1Concrete(ConstructingHandle ch) : base(ch)
245 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
246 efl_ui_position_manager_data_access_v1_interface_get();
247 /// <summary>Initializes a new instance of the <see cref="IDataAccessV1"/> class.
248 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
249 /// <param name="wh">The native pointer to be wrapped.</param>
250 private IDataAccessV1Concrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
254 /// <summary>This gives access to items to be managed. The manager reads this information and modifies the retrieved items' positions and sizes.
255 /// <c>obj_access</c> gives access to the graphical entitites to manage. Some of them might be NULL, meaning they are not yet ready to be displayed. Their size in the <c>size_access</c> array will be correct, though, so other entities can still be positioned correctly. Typically, only entities inside the viewport will be retrieved.
257 /// <c>size_access</c> gives access to the 2D sizes for the items to manage. All sizes will always be valid, and might change over time (indicated through the <see cref="Efl.Ui.PositionManager.IEntity.ItemSizeChanged"/> method). The whole range might need to be traversed in order to calculate the position of all items in some arrangements.
259 /// You can access a batch of objects or sizes by calling the here passed function callbacks. Further details can be found at the function definitions.</summary>
260 /// <param name="obj_access">Function callback for canvas objects, even if the start_id is valid, the returned objects may be NULL.</param>
261 /// <param name="size_access">Function callback for the size, returned values are always valid, but might be changed later on.</param>
262 /// <param name="size">valid size for start_id, 0 <= i < size</param>
263 public void SetDataAccess(Efl.Ui.PositionManager.ObjectBatchCallback obj_access, Efl.Ui.PositionManager.SizeBatchCallback size_access, int size) {
264 GCHandle obj_access_handle = GCHandle.Alloc(obj_access);
265 GCHandle size_access_handle = GCHandle.Alloc(size_access);
266 Efl.Ui.PositionManager.IDataAccessV1Concrete.NativeMethods.efl_ui_position_manager_data_access_v1_data_access_set_ptr.Value.Delegate(this.NativeHandle,GCHandle.ToIntPtr(obj_access_handle), Efl.Ui.PositionManager.ObjectBatchCallbackWrapper.Cb, Efl.Eo.Globals.free_gchandle, GCHandle.ToIntPtr(size_access_handle), Efl.Ui.PositionManager.SizeBatchCallbackWrapper.Cb, Efl.Eo.Globals.free_gchandle, size);
267 Eina.Error.RaiseIfUnhandledException();
269 /// <summary>This gives access to items to be managed. The manager reads this information and modifies the retrieved items' positions and sizes.
270 /// <c>obj_access</c> gives access to the graphical entitites to manage. Some of them might be NULL, meaning they are not yet ready to be displayed. Their size in the <c>size_access</c> array will be correct, though, so other entities can still be positioned correctly. Typically, only entities inside the viewport will be retrieved.
272 /// <c>size_access</c> gives access to the 2D sizes for the items to manage. All sizes will always be valid, and might change over time (indicated through the <see cref="Efl.Ui.PositionManager.IEntity.ItemSizeChanged"/> method). The whole range might need to be traversed in order to calculate the position of all items in some arrangements.
274 /// You can access a batch of objects or sizes by calling the here passed function callbacks. Further details can be found at the function definitions.</summary>
275 /// <value>Function callback for canvas objects, even if the start_id is valid, the returned objects may be NULL.</value>
276 public (Efl.Ui.PositionManager.ObjectBatchCallback, Efl.Ui.PositionManager.SizeBatchCallback, int) DataAccess {
277 set { SetDataAccess( value.Item1, value.Item2, value.Item3); }
279 private static IntPtr GetEflClassStatic()
281 return Efl.Ui.PositionManager.IDataAccessV1Concrete.efl_ui_position_manager_data_access_v1_interface_get();
283 /// <summary>Wrapper for native methods and virtual method delegates.
284 /// For internal use by generated code only.</summary>
285 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
287 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
288 /// <summary>Gets the list of Eo operations to override.</summary>
289 /// <returns>The list of Eo operations to be overload.</returns>
290 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
292 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
293 var methods = Efl.Eo.Globals.GetUserMethods(type);
295 if (efl_ui_position_manager_data_access_v1_data_access_set_static_delegate == null)
297 efl_ui_position_manager_data_access_v1_data_access_set_static_delegate = new efl_ui_position_manager_data_access_v1_data_access_set_delegate(data_access_set);
300 if (methods.FirstOrDefault(m => m.Name == "SetDataAccess") != null)
302 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_position_manager_data_access_v1_data_access_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_position_manager_data_access_v1_data_access_set_static_delegate) });
307 /// <summary>Returns the Eo class for the native methods of this class.</summary>
308 /// <returns>The native class pointer.</returns>
309 public override IntPtr GetEflClass()
311 return Efl.Ui.PositionManager.IDataAccessV1Concrete.efl_ui_position_manager_data_access_v1_interface_get();
314 #pragma warning disable CA1707, CS1591, SA1300, SA1600
317 private delegate void efl_ui_position_manager_data_access_v1_data_access_set_delegate(System.IntPtr obj, System.IntPtr pd, IntPtr obj_access_data, Efl.Ui.PositionManager.ObjectBatchCallbackInternal obj_access, EinaFreeCb obj_access_free_cb, IntPtr size_access_data, Efl.Ui.PositionManager.SizeBatchCallbackInternal size_access, EinaFreeCb size_access_free_cb, int size);
320 public delegate void efl_ui_position_manager_data_access_v1_data_access_set_api_delegate(System.IntPtr obj, IntPtr obj_access_data, Efl.Ui.PositionManager.ObjectBatchCallbackInternal obj_access, EinaFreeCb obj_access_free_cb, IntPtr size_access_data, Efl.Ui.PositionManager.SizeBatchCallbackInternal size_access, EinaFreeCb size_access_free_cb, int size);
322 public static Efl.Eo.FunctionWrapper<efl_ui_position_manager_data_access_v1_data_access_set_api_delegate> efl_ui_position_manager_data_access_v1_data_access_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_position_manager_data_access_v1_data_access_set_api_delegate>(Module, "efl_ui_position_manager_data_access_v1_data_access_set");
324 private static void data_access_set(System.IntPtr obj, System.IntPtr pd, IntPtr obj_access_data, Efl.Ui.PositionManager.ObjectBatchCallbackInternal obj_access, EinaFreeCb obj_access_free_cb, IntPtr size_access_data, Efl.Ui.PositionManager.SizeBatchCallbackInternal size_access, EinaFreeCb size_access_free_cb, int size)
326 Eina.Log.Debug("function efl_ui_position_manager_data_access_v1_data_access_set was called");
327 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
330 Efl.Ui.PositionManager.ObjectBatchCallbackWrapper obj_access_wrapper = new Efl.Ui.PositionManager.ObjectBatchCallbackWrapper(obj_access, obj_access_data, obj_access_free_cb);
331 Efl.Ui.PositionManager.SizeBatchCallbackWrapper size_access_wrapper = new Efl.Ui.PositionManager.SizeBatchCallbackWrapper(size_access, size_access_data, size_access_free_cb);
335 ((IDataAccessV1)ws.Target).SetDataAccess(obj_access_wrapper.ManagedCb, size_access_wrapper.ManagedCb, size);
339 Eina.Log.Warning($"Callback error: {e.ToString()}");
340 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
347 efl_ui_position_manager_data_access_v1_data_access_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), obj_access_data, obj_access, obj_access_free_cb, size_access_data, size_access, size_access_free_cb, size);
351 private static efl_ui_position_manager_data_access_v1_data_access_set_delegate efl_ui_position_manager_data_access_v1_data_access_set_static_delegate;
353 #pragma warning restore CA1707, CS1591, SA1300, SA1600
364 #pragma warning disable CS1591
365 public static class Efl_Ui_Position_ManagerIDataAccessV1Concrete_ExtensionMethods {
368 #pragma warning restore CS1591
374 namespace PositionManager {
376 /// <summary>Representing the range of a request.</summary>
377 [StructLayout(LayoutKind.Sequential)]
378 [Efl.Eo.BindingEntity]
379 public struct RequestRange
381 /// <summary>The first item that must be filled into the passed slice.</summary>
382 public uint Start_id;
383 /// <summary>The last item that must be filled into the passed slice.</summary>
385 /// <summary>Constructor for RequestRange.</summary>
386 /// <param name="Start_id">The first item that must be filled into the passed slice.</param>;
387 /// <param name="End_id">The last item that must be filled into the passed slice.</param>;
389 uint Start_id = default(uint),
390 uint End_id = default(uint) )
392 this.Start_id = Start_id;
393 this.End_id = End_id;
396 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
397 /// <param name="ptr">Native pointer to be converted.</param>
398 public static implicit operator RequestRange(IntPtr ptr)
400 var tmp = (RequestRange.NativeStruct)Marshal.PtrToStructure(ptr, typeof(RequestRange.NativeStruct));
404 #pragma warning disable CS1591
406 /// <summary>Internal wrapper for struct RequestRange.</summary>
407 [StructLayout(LayoutKind.Sequential)]
408 public struct NativeStruct
411 public uint Start_id;
414 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
415 public static implicit operator RequestRange.NativeStruct(RequestRange _external_struct)
417 var _internal_struct = new RequestRange.NativeStruct();
418 _internal_struct.Start_id = _external_struct.Start_id;
419 _internal_struct.End_id = _external_struct.End_id;
420 return _internal_struct;
423 /// <summary>Implicit conversion to the managed representation.</summary>
424 public static implicit operator RequestRange(RequestRange.NativeStruct _internal_struct)
426 var _external_struct = new RequestRange();
427 _external_struct.Start_id = _internal_struct.Start_id;
428 _external_struct.End_id = _internal_struct.End_id;
429 return _external_struct;
434 #pragma warning restore CS1591
448 namespace PositionManager {
450 /// <summary>Struct that is getting filled by the object function callback.</summary>
451 [StructLayout(LayoutKind.Sequential)]
452 [Efl.Eo.BindingEntity]
453 public struct ObjectBatchEntity
455 /// <summary>The canvas object.</summary>
456 public Efl.Gfx.IEntity Entity;
457 /// <summary>The depth change in this returned entity. Every Element has a depth, if the parent is <c>null</c> the depth is 0. Every step deeper into the hirachy is exactly one depth deeper. If this depth has been different to the previous item, then this element can be seen as the group leader. The following elements with the same depth are in the same group.</summary>
458 public byte Element_depth;
459 /// <summary><c>true</c> if this is the leader of a group</summary>
460 public bool Depth_leader;
461 /// <summary>Constructor for ObjectBatchEntity.</summary>
462 /// <param name="Entity">The canvas object.</param>;
463 /// <param name="Element_depth">The depth change in this returned entity. Every Element has a depth, if the parent is <c>null</c> the depth is 0. Every step deeper into the hirachy is exactly one depth deeper. If this depth has been different to the previous item, then this element can be seen as the group leader. The following elements with the same depth are in the same group.</param>;
464 /// <param name="Depth_leader"><c>true</c> if this is the leader of a group</param>;
465 public ObjectBatchEntity(
466 Efl.Gfx.IEntity Entity = default(Efl.Gfx.IEntity),
467 byte Element_depth = default(byte),
468 bool Depth_leader = default(bool) )
470 this.Entity = Entity;
471 this.Element_depth = Element_depth;
472 this.Depth_leader = Depth_leader;
475 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
476 /// <param name="ptr">Native pointer to be converted.</param>
477 public static implicit operator ObjectBatchEntity(IntPtr ptr)
479 var tmp = (ObjectBatchEntity.NativeStruct)Marshal.PtrToStructure(ptr, typeof(ObjectBatchEntity.NativeStruct));
483 #pragma warning disable CS1591
485 /// <summary>Internal wrapper for struct ObjectBatchEntity.</summary>
486 [StructLayout(LayoutKind.Sequential)]
487 public struct NativeStruct
489 /// <summary>Internal wrapper for field Entity</summary>
490 public System.IntPtr Entity;
492 public byte Element_depth;
493 /// <summary>Internal wrapper for field Depth_leader</summary>
494 public System.Byte Depth_leader;
495 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
496 public static implicit operator ObjectBatchEntity.NativeStruct(ObjectBatchEntity _external_struct)
498 var _internal_struct = new ObjectBatchEntity.NativeStruct();
499 _internal_struct.Entity = _external_struct.Entity?.NativeHandle ?? System.IntPtr.Zero;
500 _internal_struct.Element_depth = _external_struct.Element_depth;
501 _internal_struct.Depth_leader = _external_struct.Depth_leader ? (byte)1 : (byte)0;
502 return _internal_struct;
505 /// <summary>Implicit conversion to the managed representation.</summary>
506 public static implicit operator ObjectBatchEntity(ObjectBatchEntity.NativeStruct _internal_struct)
508 var _external_struct = new ObjectBatchEntity();
510 _external_struct.Entity = (Efl.Gfx.IEntityConcrete) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Entity);
511 _external_struct.Element_depth = _internal_struct.Element_depth;
512 _external_struct.Depth_leader = _internal_struct.Depth_leader != 0;
513 return _external_struct;
518 #pragma warning restore CS1591
532 namespace PositionManager {
534 /// <summary>Struct that is getting filled by the size function callback.</summary>
535 [StructLayout(LayoutKind.Sequential)]
536 [Efl.Eo.BindingEntity]
537 public struct SizeBatchEntity
539 /// <summary>The size of the element.</summary>
540 /// <value>A 2D size in pixels.</value>
541 public Eina.Size2D Size;
542 /// <summary>The depth change in this returned entity. Every Element has a depth, if the parent is <c>null</c> the depth is 0. Every step deeper into the hirachy is exactly one depth deeper. If this depth has been different to the previous item, then this element can be seen as the group leader. The following elements with the same depth are in the same group.</summary>
543 public byte Element_depth;
544 /// <summary><c>true</c> if this is the leader of a group</summary>
545 public bool Depth_leader;
546 /// <summary>Constructor for SizeBatchEntity.</summary>
547 /// <param name="Size">The size of the element.</param>;
548 /// <param name="Element_depth">The depth change in this returned entity. Every Element has a depth, if the parent is <c>null</c> the depth is 0. Every step deeper into the hirachy is exactly one depth deeper. If this depth has been different to the previous item, then this element can be seen as the group leader. The following elements with the same depth are in the same group.</param>;
549 /// <param name="Depth_leader"><c>true</c> if this is the leader of a group</param>;
550 public SizeBatchEntity(
551 Eina.Size2D Size = default(Eina.Size2D),
552 byte Element_depth = default(byte),
553 bool Depth_leader = default(bool) )
556 this.Element_depth = Element_depth;
557 this.Depth_leader = Depth_leader;
560 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
561 /// <param name="ptr">Native pointer to be converted.</param>
562 public static implicit operator SizeBatchEntity(IntPtr ptr)
564 var tmp = (SizeBatchEntity.NativeStruct)Marshal.PtrToStructure(ptr, typeof(SizeBatchEntity.NativeStruct));
568 #pragma warning disable CS1591
570 /// <summary>Internal wrapper for struct SizeBatchEntity.</summary>
571 [StructLayout(LayoutKind.Sequential)]
572 public struct NativeStruct
575 public Eina.Size2D.NativeStruct Size;
577 public byte Element_depth;
578 /// <summary>Internal wrapper for field Depth_leader</summary>
579 public System.Byte Depth_leader;
580 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
581 public static implicit operator SizeBatchEntity.NativeStruct(SizeBatchEntity _external_struct)
583 var _internal_struct = new SizeBatchEntity.NativeStruct();
584 _internal_struct.Size = _external_struct.Size;
585 _internal_struct.Element_depth = _external_struct.Element_depth;
586 _internal_struct.Depth_leader = _external_struct.Depth_leader ? (byte)1 : (byte)0;
587 return _internal_struct;
590 /// <summary>Implicit conversion to the managed representation.</summary>
591 public static implicit operator SizeBatchEntity(SizeBatchEntity.NativeStruct _internal_struct)
593 var _external_struct = new SizeBatchEntity();
594 _external_struct.Size = _internal_struct.Size;
595 _external_struct.Element_depth = _internal_struct.Element_depth;
596 _external_struct.Depth_leader = _internal_struct.Depth_leader != 0;
597 return _external_struct;
602 #pragma warning restore CS1591
616 namespace PositionManager {
618 /// <summary>Struct returned by the size access callback.</summary>
619 [StructLayout(LayoutKind.Sequential)]
620 [Efl.Eo.BindingEntity]
621 public struct SizeBatchResult
623 /// <summary>The group size of the group where the first item is part of.</summary>
624 /// <value>A 2D size in pixels.</value>
625 public Eina.Size2D Parent_size;
626 /// <summary>The depth of the parent</summary>
627 public byte Parent_depth;
628 /// <summary>The number of items that are filled into the slice.</summary>
629 public uint Filled_items;
630 /// <summary>Constructor for SizeBatchResult.</summary>
631 /// <param name="Parent_size">The group size of the group where the first item is part of.</param>;
632 /// <param name="Parent_depth">The depth of the parent</param>;
633 /// <param name="Filled_items">The number of items that are filled into the slice.</param>;
634 public SizeBatchResult(
635 Eina.Size2D Parent_size = default(Eina.Size2D),
636 byte Parent_depth = default(byte),
637 uint Filled_items = default(uint) )
639 this.Parent_size = Parent_size;
640 this.Parent_depth = Parent_depth;
641 this.Filled_items = Filled_items;
644 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
645 /// <param name="ptr">Native pointer to be converted.</param>
646 public static implicit operator SizeBatchResult(IntPtr ptr)
648 var tmp = (SizeBatchResult.NativeStruct)Marshal.PtrToStructure(ptr, typeof(SizeBatchResult.NativeStruct));
652 #pragma warning disable CS1591
654 /// <summary>Internal wrapper for struct SizeBatchResult.</summary>
655 [StructLayout(LayoutKind.Sequential)]
656 public struct NativeStruct
659 public Eina.Size2D.NativeStruct Parent_size;
661 public byte Parent_depth;
663 public uint Filled_items;
664 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
665 public static implicit operator SizeBatchResult.NativeStruct(SizeBatchResult _external_struct)
667 var _internal_struct = new SizeBatchResult.NativeStruct();
668 _internal_struct.Parent_size = _external_struct.Parent_size;
669 _internal_struct.Parent_depth = _external_struct.Parent_depth;
670 _internal_struct.Filled_items = _external_struct.Filled_items;
671 return _internal_struct;
674 /// <summary>Implicit conversion to the managed representation.</summary>
675 public static implicit operator SizeBatchResult(SizeBatchResult.NativeStruct _internal_struct)
677 var _external_struct = new SizeBatchResult();
678 _external_struct.Parent_size = _internal_struct.Parent_size;
679 _external_struct.Parent_depth = _internal_struct.Parent_depth;
680 _external_struct.Filled_items = _internal_struct.Filled_items;
681 return _external_struct;
686 #pragma warning restore CS1591
700 namespace PositionManager {
702 /// <summary>Struct that is returned by the function callbacks.</summary>
703 [StructLayout(LayoutKind.Sequential)]
704 [Efl.Eo.BindingEntity]
705 public struct SizeCallConfig
707 /// <summary>The range of items to fill into @.memory. The length of memory must be bigger or equal to the requested items</summary>
708 /// <value>Representing the range of a request.</value>
709 public Efl.Ui.PositionManager.RequestRange Range;
710 /// <summary>Indicate if this request is made for caching or displaying. If its for caching, the data-provider will fill in approximations, instead of doing heavy lifting from some backend. If this is not a caching call, the exact size should be requested and delivered at some later point.</summary>
711 public bool Cache_request;
712 /// <summary>Constructor for SizeCallConfig.</summary>
713 /// <param name="Range">The range of items to fill into @.memory. The length of memory must be bigger or equal to the requested items</param>;
714 /// <param name="Cache_request">Indicate if this request is made for caching or displaying. If its for caching, the data-provider will fill in approximations, instead of doing heavy lifting from some backend. If this is not a caching call, the exact size should be requested and delivered at some later point.</param>;
715 public SizeCallConfig(
716 Efl.Ui.PositionManager.RequestRange Range = default(Efl.Ui.PositionManager.RequestRange),
717 bool Cache_request = default(bool) )
720 this.Cache_request = Cache_request;
723 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
724 /// <param name="ptr">Native pointer to be converted.</param>
725 public static implicit operator SizeCallConfig(IntPtr ptr)
727 var tmp = (SizeCallConfig.NativeStruct)Marshal.PtrToStructure(ptr, typeof(SizeCallConfig.NativeStruct));
731 #pragma warning disable CS1591
733 /// <summary>Internal wrapper for struct SizeCallConfig.</summary>
734 [StructLayout(LayoutKind.Sequential)]
735 public struct NativeStruct
738 public Efl.Ui.PositionManager.RequestRange.NativeStruct Range;
739 /// <summary>Internal wrapper for field Cache_request</summary>
740 public System.Byte Cache_request;
741 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
742 public static implicit operator SizeCallConfig.NativeStruct(SizeCallConfig _external_struct)
744 var _internal_struct = new SizeCallConfig.NativeStruct();
745 _internal_struct.Range = _external_struct.Range;
746 _internal_struct.Cache_request = _external_struct.Cache_request ? (byte)1 : (byte)0;
747 return _internal_struct;
750 /// <summary>Implicit conversion to the managed representation.</summary>
751 public static implicit operator SizeCallConfig(SizeCallConfig.NativeStruct _internal_struct)
753 var _external_struct = new SizeCallConfig();
754 _external_struct.Range = _internal_struct.Range;
755 _external_struct.Cache_request = _internal_struct.Cache_request != 0;
756 return _external_struct;
761 #pragma warning restore CS1591
775 namespace PositionManager {
777 /// <summary>Struct returned by the object access callback</summary>
778 [StructLayout(LayoutKind.Sequential)]
779 [Efl.Eo.BindingEntity]
780 public struct ObjectBatchResult
782 /// <summary>The group where the first item is part of</summary>
783 public Efl.Ui.Item Group;
784 /// <summary>The depth of the parent</summary>
785 public byte Parent_depth;
786 /// <summary>The number of items that are filled into the slice</summary>
787 public uint Filled_items;
788 /// <summary>Constructor for ObjectBatchResult.</summary>
789 /// <param name="Group">The group where the first item is part of</param>;
790 /// <param name="Parent_depth">The depth of the parent</param>;
791 /// <param name="Filled_items">The number of items that are filled into the slice</param>;
792 public ObjectBatchResult(
793 Efl.Ui.Item Group = default(Efl.Ui.Item),
794 byte Parent_depth = default(byte),
795 uint Filled_items = default(uint) )
798 this.Parent_depth = Parent_depth;
799 this.Filled_items = Filled_items;
802 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
803 /// <param name="ptr">Native pointer to be converted.</param>
804 public static implicit operator ObjectBatchResult(IntPtr ptr)
806 var tmp = (ObjectBatchResult.NativeStruct)Marshal.PtrToStructure(ptr, typeof(ObjectBatchResult.NativeStruct));
810 #pragma warning disable CS1591
812 /// <summary>Internal wrapper for struct ObjectBatchResult.</summary>
813 [StructLayout(LayoutKind.Sequential)]
814 public struct NativeStruct
816 /// <summary>Internal wrapper for field Group</summary>
817 public System.IntPtr Group;
819 public byte Parent_depth;
821 public uint Filled_items;
822 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
823 public static implicit operator ObjectBatchResult.NativeStruct(ObjectBatchResult _external_struct)
825 var _internal_struct = new ObjectBatchResult.NativeStruct();
826 _internal_struct.Group = _external_struct.Group?.NativeHandle ?? System.IntPtr.Zero;
827 _internal_struct.Parent_depth = _external_struct.Parent_depth;
828 _internal_struct.Filled_items = _external_struct.Filled_items;
829 return _internal_struct;
832 /// <summary>Implicit conversion to the managed representation.</summary>
833 public static implicit operator ObjectBatchResult(ObjectBatchResult.NativeStruct _internal_struct)
835 var _external_struct = new ObjectBatchResult();
837 _external_struct.Group = (Efl.Ui.Item) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Group);
838 _external_struct.Parent_depth = _internal_struct.Parent_depth;
839 _external_struct.Filled_items = _internal_struct.Filled_items;
840 return _external_struct;
845 #pragma warning restore CS1591