2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 /// <summary>Efl graphics interface
14 /// (Since EFL 1.22)</summary>
15 [Efl.Gfx.IEntityConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface IEntity :
18 Efl.Eo.IWrapper, IDisposable
20 /// <summary>Retrieves the position of the given canvas object.
21 /// (Since EFL 1.22)</summary>
22 /// <returns>A 2D coordinate in pixel units.</returns>
23 Eina.Position2D GetPosition();
24 /// <summary>Moves the given canvas object to the given location inside its canvas' viewport. If unchanged this call may be entirely skipped, but if changed this will trigger move events, as well as potential pointer,in or pointer,out events.
25 /// (Since EFL 1.22)</summary>
26 /// <param name="pos">A 2D coordinate in pixel units.</param>
27 void SetPosition(Eina.Position2D pos);
28 /// <summary>Retrieves the (rectangular) size of the given Evas object.
29 /// (Since EFL 1.22)</summary>
30 /// <returns>A 2D size in pixel units.</returns>
31 Eina.Size2D GetSize();
32 /// <summary>Changes the size of the given object.
33 /// Note that setting the actual size of an object might be the job of its container, so this function might have no effect. Look at <see cref="Efl.Gfx.IHint"/> instead, when manipulating widgets.
34 /// (Since EFL 1.22)</summary>
35 /// <param name="size">A 2D size in pixel units.</param>
36 void SetSize(Eina.Size2D size);
37 /// <summary>Rectangular geometry that combines both position and size.
38 /// (Since EFL 1.22)</summary>
39 /// <returns>The X,Y position and W,H size, in pixels.</returns>
40 Eina.Rect GetGeometry();
41 /// <summary>Rectangular geometry that combines both position and size.
42 /// (Since EFL 1.22)</summary>
43 /// <param name="rect">The X,Y position and W,H size, in pixels.</param>
44 void SetGeometry(Eina.Rect rect);
45 /// <summary>Retrieves whether or not the given canvas object is visible.
46 /// (Since EFL 1.22)</summary>
47 /// <returns><c>true</c> if to make the object visible, <c>false</c> otherwise</returns>
49 /// <summary>Shows or hides this object.
50 /// (Since EFL 1.22)</summary>
51 /// <param name="v"><c>true</c> if to make the object visible, <c>false</c> otherwise</param>
52 void SetVisible(bool v);
53 /// <summary>Gets an object's scaling factor.
54 /// (Since EFL 1.22)</summary>
55 /// <returns>The scaling factor (the default value is 0.0, meaning individual scaling is not set)</returns>
57 /// <summary>Sets the scaling factor of an object.
58 /// (Since EFL 1.22)</summary>
59 /// <param name="scale">The scaling factor (the default value is 0.0, meaning individual scaling is not set)</param>
60 void SetScale(double scale);
61 /// <summary>Object's visibility state changed, the event value is the new state.
62 /// (Since EFL 1.22)</summary>
63 /// <value><see cref="Efl.Gfx.IEntityVisibilityChangedEvt_Args"/></value>
64 event EventHandler<Efl.Gfx.IEntityVisibilityChangedEvt_Args> VisibilityChangedEvt;
65 /// <summary>Object was moved, its position during the event is the new one.
66 /// (Since EFL 1.22)</summary>
67 /// <value><see cref="Efl.Gfx.IEntityPositionChangedEvt_Args"/></value>
68 event EventHandler<Efl.Gfx.IEntityPositionChangedEvt_Args> PositionChangedEvt;
69 /// <summary>Object was resized, its size during the event is the new one.
70 /// (Since EFL 1.22)</summary>
71 /// <value><see cref="Efl.Gfx.IEntitySizeChangedEvt_Args"/></value>
72 event EventHandler<Efl.Gfx.IEntitySizeChangedEvt_Args> SizeChangedEvt;
73 /// <summary>The 2D position of a canvas object.
74 /// The position is absolute, in pixels, relative to the top-left corner of the window, within its border decorations (application space).
75 /// (Since EFL 1.22)</summary>
76 /// <value>A 2D coordinate in pixel units.</value>
77 Eina.Position2D Position {
81 /// <summary>The 2D size of a canvas object.
82 /// (Since EFL 1.22)</summary>
83 /// <value>A 2D size in pixel units.</value>
88 /// <summary>Rectangular geometry that combines both position and size.
89 /// (Since EFL 1.22)</summary>
90 /// <value>The X,Y position and W,H size, in pixels.</value>
95 /// <summary>The visibility of a canvas object.
96 /// All canvas objects will become visible by default just before render. This means that it is not required to call <see cref="Efl.Gfx.IEntity.SetVisible"/> after creating an object unless you want to create it without showing it. Note that this behavior is new since 1.21, and only applies to canvas objects created with the EO API (i.e. not the legacy C-only API). Other types of Gfx objects may or may not be visible by default.
98 /// Note that many other parameters can prevent a visible object from actually being "visible" on screen. For instance if its color is fully transparent, or its parent is hidden, or it is clipped out, etc...
99 /// (Since EFL 1.22)</summary>
100 /// <value><c>true</c> if to make the object visible, <c>false</c> otherwise</value>
105 /// <summary>The scaling factor of an object.
106 /// This property is an individual scaling factor on the object (Edje or UI widget). This property (or Edje's global scaling factor, when applicable), will affect this object's part sizes. If scale is not zero, than the individual scaling will override any global scaling set, for the object obj's parts. Set it back to zero to get the effects of the global scaling again.
108 /// Warning: In Edje, only parts which, at EDC level, had the "scale" property set to 1, will be affected by this function. Check the complete "syntax reference" for EDC files.
109 /// (Since EFL 1.22)</summary>
110 /// <value>The scaling factor (the default value is 0.0, meaning individual scaling is not set)</value>
116 /// <summary>Event argument wrapper for event <see cref="Efl.Gfx.IEntity.VisibilityChangedEvt"/>.</summary>
117 [Efl.Eo.BindingEntity]
118 public class IEntityVisibilityChangedEvt_Args : EventArgs {
119 /// <summary>Actual event payload.</summary>
120 /// <value>Object's visibility state changed, the event value is the new state.</value>
121 public bool arg { get; set; }
123 /// <summary>Event argument wrapper for event <see cref="Efl.Gfx.IEntity.PositionChangedEvt"/>.</summary>
124 [Efl.Eo.BindingEntity]
125 public class IEntityPositionChangedEvt_Args : EventArgs {
126 /// <summary>Actual event payload.</summary>
127 /// <value>Object was moved, its position during the event is the new one.</value>
128 public Eina.Position2D arg { get; set; }
130 /// <summary>Event argument wrapper for event <see cref="Efl.Gfx.IEntity.SizeChangedEvt"/>.</summary>
131 [Efl.Eo.BindingEntity]
132 public class IEntitySizeChangedEvt_Args : EventArgs {
133 /// <summary>Actual event payload.</summary>
134 /// <value>Object was resized, its size during the event is the new one.</value>
135 public Eina.Size2D arg { get; set; }
137 /// <summary>Efl graphics interface
138 /// (Since EFL 1.22)</summary>
139 sealed public class IEntityConcrete :
144 /// <summary>Pointer to the native class description.</summary>
145 public override System.IntPtr NativeClass
149 if (((object)this).GetType() == typeof(IEntityConcrete))
151 return GetEflClassStatic();
155 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
160 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
161 /// Do not call this constructor directly.</summary>
162 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
163 private IEntityConcrete(ConstructingHandle ch) : base(ch)
167 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
168 efl_gfx_entity_interface_get();
169 /// <summary>Initializes a new instance of the <see cref="IEntity"/> class.
170 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
171 /// <param name="wh">The native pointer to be wrapped.</param>
172 private IEntityConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
176 /// <summary>Object's visibility state changed, the event value is the new state.
177 /// (Since EFL 1.22)</summary>
178 /// <value><see cref="Efl.Gfx.IEntityVisibilityChangedEvt_Args"/></value>
179 public event EventHandler<Efl.Gfx.IEntityVisibilityChangedEvt_Args> VisibilityChangedEvt
183 lock (eflBindingEventLock)
185 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
187 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
190 Efl.Gfx.IEntityVisibilityChangedEvt_Args args = new Efl.Gfx.IEntityVisibilityChangedEvt_Args();
191 args.arg = Marshal.ReadByte(evt.Info) != 0;
194 value?.Invoke(obj, args);
198 Eina.Log.Error(e.ToString());
199 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
204 string key = "_EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED";
205 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
211 lock (eflBindingEventLock)
213 string key = "_EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED";
214 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
218 /// <summary>Method to raise event VisibilityChangedEvt.</summary>
219 public void OnVisibilityChangedEvt(Efl.Gfx.IEntityVisibilityChangedEvt_Args e)
221 var key = "_EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED";
222 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
223 if (desc == IntPtr.Zero)
225 Eina.Log.Error($"Failed to get native event {key}");
229 IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg ? (byte) 1 : (byte) 0);
232 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
236 Marshal.FreeHGlobal(info);
239 /// <summary>Object was moved, its position during the event is the new one.
240 /// (Since EFL 1.22)</summary>
241 /// <value><see cref="Efl.Gfx.IEntityPositionChangedEvt_Args"/></value>
242 public event EventHandler<Efl.Gfx.IEntityPositionChangedEvt_Args> PositionChangedEvt
246 lock (eflBindingEventLock)
248 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
250 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
253 Efl.Gfx.IEntityPositionChangedEvt_Args args = new Efl.Gfx.IEntityPositionChangedEvt_Args();
257 value?.Invoke(obj, args);
261 Eina.Log.Error(e.ToString());
262 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
267 string key = "_EFL_GFX_ENTITY_EVENT_POSITION_CHANGED";
268 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
274 lock (eflBindingEventLock)
276 string key = "_EFL_GFX_ENTITY_EVENT_POSITION_CHANGED";
277 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
281 /// <summary>Method to raise event PositionChangedEvt.</summary>
282 public void OnPositionChangedEvt(Efl.Gfx.IEntityPositionChangedEvt_Args e)
284 var key = "_EFL_GFX_ENTITY_EVENT_POSITION_CHANGED";
285 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
286 if (desc == IntPtr.Zero)
288 Eina.Log.Error($"Failed to get native event {key}");
292 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
295 Marshal.StructureToPtr(e.arg, info, false);
296 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
300 Marshal.FreeHGlobal(info);
303 /// <summary>Object was resized, its size during the event is the new one.
304 /// (Since EFL 1.22)</summary>
305 /// <value><see cref="Efl.Gfx.IEntitySizeChangedEvt_Args"/></value>
306 public event EventHandler<Efl.Gfx.IEntitySizeChangedEvt_Args> SizeChangedEvt
310 lock (eflBindingEventLock)
312 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
314 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
317 Efl.Gfx.IEntitySizeChangedEvt_Args args = new Efl.Gfx.IEntitySizeChangedEvt_Args();
321 value?.Invoke(obj, args);
325 Eina.Log.Error(e.ToString());
326 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
331 string key = "_EFL_GFX_ENTITY_EVENT_SIZE_CHANGED";
332 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
338 lock (eflBindingEventLock)
340 string key = "_EFL_GFX_ENTITY_EVENT_SIZE_CHANGED";
341 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
345 /// <summary>Method to raise event SizeChangedEvt.</summary>
346 public void OnSizeChangedEvt(Efl.Gfx.IEntitySizeChangedEvt_Args e)
348 var key = "_EFL_GFX_ENTITY_EVENT_SIZE_CHANGED";
349 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
350 if (desc == IntPtr.Zero)
352 Eina.Log.Error($"Failed to get native event {key}");
356 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
359 Marshal.StructureToPtr(e.arg, info, false);
360 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
364 Marshal.FreeHGlobal(info);
367 /// <summary>Retrieves the position of the given canvas object.
368 /// (Since EFL 1.22)</summary>
369 /// <returns>A 2D coordinate in pixel units.</returns>
370 public Eina.Position2D GetPosition() {
371 var _ret_var = Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_position_get_ptr.Value.Delegate(this.NativeHandle);
372 Eina.Error.RaiseIfUnhandledException();
375 /// <summary>Moves the given canvas object to the given location inside its canvas' viewport. If unchanged this call may be entirely skipped, but if changed this will trigger move events, as well as potential pointer,in or pointer,out events.
376 /// (Since EFL 1.22)</summary>
377 /// <param name="pos">A 2D coordinate in pixel units.</param>
378 public void SetPosition(Eina.Position2D pos) {
379 Eina.Position2D.NativeStruct _in_pos = pos;
380 Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_position_set_ptr.Value.Delegate(this.NativeHandle,_in_pos);
381 Eina.Error.RaiseIfUnhandledException();
383 /// <summary>Retrieves the (rectangular) size of the given Evas object.
384 /// (Since EFL 1.22)</summary>
385 /// <returns>A 2D size in pixel units.</returns>
386 public Eina.Size2D GetSize() {
387 var _ret_var = Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_size_get_ptr.Value.Delegate(this.NativeHandle);
388 Eina.Error.RaiseIfUnhandledException();
391 /// <summary>Changes the size of the given object.
392 /// Note that setting the actual size of an object might be the job of its container, so this function might have no effect. Look at <see cref="Efl.Gfx.IHint"/> instead, when manipulating widgets.
393 /// (Since EFL 1.22)</summary>
394 /// <param name="size">A 2D size in pixel units.</param>
395 public void SetSize(Eina.Size2D size) {
396 Eina.Size2D.NativeStruct _in_size = size;
397 Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_size_set_ptr.Value.Delegate(this.NativeHandle,_in_size);
398 Eina.Error.RaiseIfUnhandledException();
400 /// <summary>Rectangular geometry that combines both position and size.
401 /// (Since EFL 1.22)</summary>
402 /// <returns>The X,Y position and W,H size, in pixels.</returns>
403 public Eina.Rect GetGeometry() {
404 var _ret_var = Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_geometry_get_ptr.Value.Delegate(this.NativeHandle);
405 Eina.Error.RaiseIfUnhandledException();
408 /// <summary>Rectangular geometry that combines both position and size.
409 /// (Since EFL 1.22)</summary>
410 /// <param name="rect">The X,Y position and W,H size, in pixels.</param>
411 public void SetGeometry(Eina.Rect rect) {
412 Eina.Rect.NativeStruct _in_rect = rect;
413 Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_geometry_set_ptr.Value.Delegate(this.NativeHandle,_in_rect);
414 Eina.Error.RaiseIfUnhandledException();
416 /// <summary>Retrieves whether or not the given canvas object is visible.
417 /// (Since EFL 1.22)</summary>
418 /// <returns><c>true</c> if to make the object visible, <c>false</c> otherwise</returns>
419 public bool GetVisible() {
420 var _ret_var = Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_visible_get_ptr.Value.Delegate(this.NativeHandle);
421 Eina.Error.RaiseIfUnhandledException();
424 /// <summary>Shows or hides this object.
425 /// (Since EFL 1.22)</summary>
426 /// <param name="v"><c>true</c> if to make the object visible, <c>false</c> otherwise</param>
427 public void SetVisible(bool v) {
428 Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_visible_set_ptr.Value.Delegate(this.NativeHandle,v);
429 Eina.Error.RaiseIfUnhandledException();
431 /// <summary>Gets an object's scaling factor.
432 /// (Since EFL 1.22)</summary>
433 /// <returns>The scaling factor (the default value is 0.0, meaning individual scaling is not set)</returns>
434 public double GetScale() {
435 var _ret_var = Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_scale_get_ptr.Value.Delegate(this.NativeHandle);
436 Eina.Error.RaiseIfUnhandledException();
439 /// <summary>Sets the scaling factor of an object.
440 /// (Since EFL 1.22)</summary>
441 /// <param name="scale">The scaling factor (the default value is 0.0, meaning individual scaling is not set)</param>
442 public void SetScale(double scale) {
443 Efl.Gfx.IEntityConcrete.NativeMethods.efl_gfx_entity_scale_set_ptr.Value.Delegate(this.NativeHandle,scale);
444 Eina.Error.RaiseIfUnhandledException();
446 /// <summary>The 2D position of a canvas object.
447 /// The position is absolute, in pixels, relative to the top-left corner of the window, within its border decorations (application space).
448 /// (Since EFL 1.22)</summary>
449 /// <value>A 2D coordinate in pixel units.</value>
450 public Eina.Position2D Position {
451 get { return GetPosition(); }
452 set { SetPosition(value); }
454 /// <summary>The 2D size of a canvas object.
455 /// (Since EFL 1.22)</summary>
456 /// <value>A 2D size in pixel units.</value>
457 public Eina.Size2D Size {
458 get { return GetSize(); }
459 set { SetSize(value); }
461 /// <summary>Rectangular geometry that combines both position and size.
462 /// (Since EFL 1.22)</summary>
463 /// <value>The X,Y position and W,H size, in pixels.</value>
464 public Eina.Rect Geometry {
465 get { return GetGeometry(); }
466 set { SetGeometry(value); }
468 /// <summary>The visibility of a canvas object.
469 /// All canvas objects will become visible by default just before render. This means that it is not required to call <see cref="Efl.Gfx.IEntity.SetVisible"/> after creating an object unless you want to create it without showing it. Note that this behavior is new since 1.21, and only applies to canvas objects created with the EO API (i.e. not the legacy C-only API). Other types of Gfx objects may or may not be visible by default.
471 /// Note that many other parameters can prevent a visible object from actually being "visible" on screen. For instance if its color is fully transparent, or its parent is hidden, or it is clipped out, etc...
472 /// (Since EFL 1.22)</summary>
473 /// <value><c>true</c> if to make the object visible, <c>false</c> otherwise</value>
474 public bool Visible {
475 get { return GetVisible(); }
476 set { SetVisible(value); }
478 /// <summary>The scaling factor of an object.
479 /// This property is an individual scaling factor on the object (Edje or UI widget). This property (or Edje's global scaling factor, when applicable), will affect this object's part sizes. If scale is not zero, than the individual scaling will override any global scaling set, for the object obj's parts. Set it back to zero to get the effects of the global scaling again.
481 /// Warning: In Edje, only parts which, at EDC level, had the "scale" property set to 1, will be affected by this function. Check the complete "syntax reference" for EDC files.
482 /// (Since EFL 1.22)</summary>
483 /// <value>The scaling factor (the default value is 0.0, meaning individual scaling is not set)</value>
484 public double Scale {
485 get { return GetScale(); }
486 set { SetScale(value); }
488 private static IntPtr GetEflClassStatic()
490 return Efl.Gfx.IEntityConcrete.efl_gfx_entity_interface_get();
492 /// <summary>Wrapper for native methods and virtual method delegates.
493 /// For internal use by generated code only.</summary>
494 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
496 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
497 /// <summary>Gets the list of Eo operations to override.</summary>
498 /// <returns>The list of Eo operations to be overload.</returns>
499 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
501 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
502 var methods = Efl.Eo.Globals.GetUserMethods(type);
504 if (efl_gfx_entity_position_get_static_delegate == null)
506 efl_gfx_entity_position_get_static_delegate = new efl_gfx_entity_position_get_delegate(position_get);
509 if (methods.FirstOrDefault(m => m.Name == "GetPosition") != null)
511 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_position_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_position_get_static_delegate) });
514 if (efl_gfx_entity_position_set_static_delegate == null)
516 efl_gfx_entity_position_set_static_delegate = new efl_gfx_entity_position_set_delegate(position_set);
519 if (methods.FirstOrDefault(m => m.Name == "SetPosition") != null)
521 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_position_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_position_set_static_delegate) });
524 if (efl_gfx_entity_size_get_static_delegate == null)
526 efl_gfx_entity_size_get_static_delegate = new efl_gfx_entity_size_get_delegate(size_get);
529 if (methods.FirstOrDefault(m => m.Name == "GetSize") != null)
531 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_size_get_static_delegate) });
534 if (efl_gfx_entity_size_set_static_delegate == null)
536 efl_gfx_entity_size_set_static_delegate = new efl_gfx_entity_size_set_delegate(size_set);
539 if (methods.FirstOrDefault(m => m.Name == "SetSize") != null)
541 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_size_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_size_set_static_delegate) });
544 if (efl_gfx_entity_geometry_get_static_delegate == null)
546 efl_gfx_entity_geometry_get_static_delegate = new efl_gfx_entity_geometry_get_delegate(geometry_get);
549 if (methods.FirstOrDefault(m => m.Name == "GetGeometry") != null)
551 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_geometry_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_geometry_get_static_delegate) });
554 if (efl_gfx_entity_geometry_set_static_delegate == null)
556 efl_gfx_entity_geometry_set_static_delegate = new efl_gfx_entity_geometry_set_delegate(geometry_set);
559 if (methods.FirstOrDefault(m => m.Name == "SetGeometry") != null)
561 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_geometry_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_geometry_set_static_delegate) });
564 if (efl_gfx_entity_visible_get_static_delegate == null)
566 efl_gfx_entity_visible_get_static_delegate = new efl_gfx_entity_visible_get_delegate(visible_get);
569 if (methods.FirstOrDefault(m => m.Name == "GetVisible") != null)
571 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_visible_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_visible_get_static_delegate) });
574 if (efl_gfx_entity_visible_set_static_delegate == null)
576 efl_gfx_entity_visible_set_static_delegate = new efl_gfx_entity_visible_set_delegate(visible_set);
579 if (methods.FirstOrDefault(m => m.Name == "SetVisible") != null)
581 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_visible_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_visible_set_static_delegate) });
584 if (efl_gfx_entity_scale_get_static_delegate == null)
586 efl_gfx_entity_scale_get_static_delegate = new efl_gfx_entity_scale_get_delegate(scale_get);
589 if (methods.FirstOrDefault(m => m.Name == "GetScale") != null)
591 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_scale_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_scale_get_static_delegate) });
594 if (efl_gfx_entity_scale_set_static_delegate == null)
596 efl_gfx_entity_scale_set_static_delegate = new efl_gfx_entity_scale_set_delegate(scale_set);
599 if (methods.FirstOrDefault(m => m.Name == "SetScale") != null)
601 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_entity_scale_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_entity_scale_set_static_delegate) });
606 /// <summary>Returns the Eo class for the native methods of this class.</summary>
607 /// <returns>The native class pointer.</returns>
608 public override IntPtr GetEflClass()
610 return Efl.Gfx.IEntityConcrete.efl_gfx_entity_interface_get();
613 #pragma warning disable CA1707, CS1591, SA1300, SA1600
616 private delegate Eina.Position2D.NativeStruct efl_gfx_entity_position_get_delegate(System.IntPtr obj, System.IntPtr pd);
619 public delegate Eina.Position2D.NativeStruct efl_gfx_entity_position_get_api_delegate(System.IntPtr obj);
621 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_position_get_api_delegate> efl_gfx_entity_position_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_position_get_api_delegate>(Module, "efl_gfx_entity_position_get");
623 private static Eina.Position2D.NativeStruct position_get(System.IntPtr obj, System.IntPtr pd)
625 Eina.Log.Debug("function efl_gfx_entity_position_get was called");
626 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
629 Eina.Position2D _ret_var = default(Eina.Position2D);
632 _ret_var = ((IEntity)ws.Target).GetPosition();
636 Eina.Log.Warning($"Callback error: {e.ToString()}");
637 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
645 return efl_gfx_entity_position_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
649 private static efl_gfx_entity_position_get_delegate efl_gfx_entity_position_get_static_delegate;
652 private delegate void efl_gfx_entity_position_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Position2D.NativeStruct pos);
655 public delegate void efl_gfx_entity_position_set_api_delegate(System.IntPtr obj, Eina.Position2D.NativeStruct pos);
657 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_position_set_api_delegate> efl_gfx_entity_position_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_position_set_api_delegate>(Module, "efl_gfx_entity_position_set");
659 private static void position_set(System.IntPtr obj, System.IntPtr pd, Eina.Position2D.NativeStruct pos)
661 Eina.Log.Debug("function efl_gfx_entity_position_set was called");
662 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
665 Eina.Position2D _in_pos = pos;
669 ((IEntity)ws.Target).SetPosition(_in_pos);
673 Eina.Log.Warning($"Callback error: {e.ToString()}");
674 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
681 efl_gfx_entity_position_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), pos);
685 private static efl_gfx_entity_position_set_delegate efl_gfx_entity_position_set_static_delegate;
688 private delegate Eina.Size2D.NativeStruct efl_gfx_entity_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
691 public delegate Eina.Size2D.NativeStruct efl_gfx_entity_size_get_api_delegate(System.IntPtr obj);
693 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_size_get_api_delegate> efl_gfx_entity_size_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_size_get_api_delegate>(Module, "efl_gfx_entity_size_get");
695 private static Eina.Size2D.NativeStruct size_get(System.IntPtr obj, System.IntPtr pd)
697 Eina.Log.Debug("function efl_gfx_entity_size_get was called");
698 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
701 Eina.Size2D _ret_var = default(Eina.Size2D);
704 _ret_var = ((IEntity)ws.Target).GetSize();
708 Eina.Log.Warning($"Callback error: {e.ToString()}");
709 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
717 return efl_gfx_entity_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
721 private static efl_gfx_entity_size_get_delegate efl_gfx_entity_size_get_static_delegate;
724 private delegate void efl_gfx_entity_size_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct size);
727 public delegate void efl_gfx_entity_size_set_api_delegate(System.IntPtr obj, Eina.Size2D.NativeStruct size);
729 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_size_set_api_delegate> efl_gfx_entity_size_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_size_set_api_delegate>(Module, "efl_gfx_entity_size_set");
731 private static void size_set(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct size)
733 Eina.Log.Debug("function efl_gfx_entity_size_set was called");
734 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
737 Eina.Size2D _in_size = size;
741 ((IEntity)ws.Target).SetSize(_in_size);
745 Eina.Log.Warning($"Callback error: {e.ToString()}");
746 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
753 efl_gfx_entity_size_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), size);
757 private static efl_gfx_entity_size_set_delegate efl_gfx_entity_size_set_static_delegate;
760 private delegate Eina.Rect.NativeStruct efl_gfx_entity_geometry_get_delegate(System.IntPtr obj, System.IntPtr pd);
763 public delegate Eina.Rect.NativeStruct efl_gfx_entity_geometry_get_api_delegate(System.IntPtr obj);
765 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_geometry_get_api_delegate> efl_gfx_entity_geometry_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_geometry_get_api_delegate>(Module, "efl_gfx_entity_geometry_get");
767 private static Eina.Rect.NativeStruct geometry_get(System.IntPtr obj, System.IntPtr pd)
769 Eina.Log.Debug("function efl_gfx_entity_geometry_get was called");
770 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
773 Eina.Rect _ret_var = default(Eina.Rect);
776 _ret_var = ((IEntity)ws.Target).GetGeometry();
780 Eina.Log.Warning($"Callback error: {e.ToString()}");
781 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
789 return efl_gfx_entity_geometry_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
793 private static efl_gfx_entity_geometry_get_delegate efl_gfx_entity_geometry_get_static_delegate;
796 private delegate void efl_gfx_entity_geometry_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Rect.NativeStruct rect);
799 public delegate void efl_gfx_entity_geometry_set_api_delegate(System.IntPtr obj, Eina.Rect.NativeStruct rect);
801 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_geometry_set_api_delegate> efl_gfx_entity_geometry_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_geometry_set_api_delegate>(Module, "efl_gfx_entity_geometry_set");
803 private static void geometry_set(System.IntPtr obj, System.IntPtr pd, Eina.Rect.NativeStruct rect)
805 Eina.Log.Debug("function efl_gfx_entity_geometry_set was called");
806 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
809 Eina.Rect _in_rect = rect;
813 ((IEntity)ws.Target).SetGeometry(_in_rect);
817 Eina.Log.Warning($"Callback error: {e.ToString()}");
818 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
825 efl_gfx_entity_geometry_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), rect);
829 private static efl_gfx_entity_geometry_set_delegate efl_gfx_entity_geometry_set_static_delegate;
831 [return: MarshalAs(UnmanagedType.U1)]
832 private delegate bool efl_gfx_entity_visible_get_delegate(System.IntPtr obj, System.IntPtr pd);
834 [return: MarshalAs(UnmanagedType.U1)]
835 public delegate bool efl_gfx_entity_visible_get_api_delegate(System.IntPtr obj);
837 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_visible_get_api_delegate> efl_gfx_entity_visible_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_visible_get_api_delegate>(Module, "efl_gfx_entity_visible_get");
839 private static bool visible_get(System.IntPtr obj, System.IntPtr pd)
841 Eina.Log.Debug("function efl_gfx_entity_visible_get was called");
842 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
845 bool _ret_var = default(bool);
848 _ret_var = ((IEntity)ws.Target).GetVisible();
852 Eina.Log.Warning($"Callback error: {e.ToString()}");
853 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
861 return efl_gfx_entity_visible_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
865 private static efl_gfx_entity_visible_get_delegate efl_gfx_entity_visible_get_static_delegate;
868 private delegate void efl_gfx_entity_visible_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool v);
871 public delegate void efl_gfx_entity_visible_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool v);
873 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_visible_set_api_delegate> efl_gfx_entity_visible_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_visible_set_api_delegate>(Module, "efl_gfx_entity_visible_set");
875 private static void visible_set(System.IntPtr obj, System.IntPtr pd, bool v)
877 Eina.Log.Debug("function efl_gfx_entity_visible_set was called");
878 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
884 ((IEntity)ws.Target).SetVisible(v);
888 Eina.Log.Warning($"Callback error: {e.ToString()}");
889 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
896 efl_gfx_entity_visible_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), v);
900 private static efl_gfx_entity_visible_set_delegate efl_gfx_entity_visible_set_static_delegate;
903 private delegate double efl_gfx_entity_scale_get_delegate(System.IntPtr obj, System.IntPtr pd);
906 public delegate double efl_gfx_entity_scale_get_api_delegate(System.IntPtr obj);
908 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_scale_get_api_delegate> efl_gfx_entity_scale_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_scale_get_api_delegate>(Module, "efl_gfx_entity_scale_get");
910 private static double scale_get(System.IntPtr obj, System.IntPtr pd)
912 Eina.Log.Debug("function efl_gfx_entity_scale_get was called");
913 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
916 double _ret_var = default(double);
919 _ret_var = ((IEntity)ws.Target).GetScale();
923 Eina.Log.Warning($"Callback error: {e.ToString()}");
924 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
932 return efl_gfx_entity_scale_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
936 private static efl_gfx_entity_scale_get_delegate efl_gfx_entity_scale_get_static_delegate;
939 private delegate void efl_gfx_entity_scale_set_delegate(System.IntPtr obj, System.IntPtr pd, double scale);
942 public delegate void efl_gfx_entity_scale_set_api_delegate(System.IntPtr obj, double scale);
944 public static Efl.Eo.FunctionWrapper<efl_gfx_entity_scale_set_api_delegate> efl_gfx_entity_scale_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_entity_scale_set_api_delegate>(Module, "efl_gfx_entity_scale_set");
946 private static void scale_set(System.IntPtr obj, System.IntPtr pd, double scale)
948 Eina.Log.Debug("function efl_gfx_entity_scale_set was called");
949 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
955 ((IEntity)ws.Target).SetScale(scale);
959 Eina.Log.Warning($"Callback error: {e.ToString()}");
960 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
967 efl_gfx_entity_scale_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), scale);
971 private static efl_gfx_entity_scale_set_delegate efl_gfx_entity_scale_set_static_delegate;
973 #pragma warning restore CA1707, CS1591, SA1300, SA1600
982 #pragma warning disable CS1591
983 public static class Efl_GfxIEntityConcrete_ExtensionMethods {
984 public static Efl.BindableProperty<Eina.Position2D> Position<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Gfx.IEntity, T>magic = null) where T : Efl.Gfx.IEntity {
985 return new Efl.BindableProperty<Eina.Position2D>("position", fac);
988 public static Efl.BindableProperty<Eina.Size2D> Size<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Gfx.IEntity, T>magic = null) where T : Efl.Gfx.IEntity {
989 return new Efl.BindableProperty<Eina.Size2D>("size", fac);
992 public static Efl.BindableProperty<Eina.Rect> Geometry<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Gfx.IEntity, T>magic = null) where T : Efl.Gfx.IEntity {
993 return new Efl.BindableProperty<Eina.Rect>("geometry", fac);
996 public static Efl.BindableProperty<bool> Visible<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Gfx.IEntity, T>magic = null) where T : Efl.Gfx.IEntity {
997 return new Efl.BindableProperty<bool>("visible", fac);
1000 public static Efl.BindableProperty<double> Scale<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Gfx.IEntity, T>magic = null) where T : Efl.Gfx.IEntity {
1001 return new Efl.BindableProperty<double>("scale", fac);
1005 #pragma warning restore CS1591