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 Canvas Pointer interface
14 /// (Since EFL 1.22)</summary>
15 [Efl.Canvas.IPointerConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface IPointer :
18 Efl.Eo.IWrapper, IDisposable
20 /// <summary>Returns whether the mouse pointer is logically inside the canvas.
21 /// When this function is called it will return a value of either <c>false</c> or <c>true</c>, depending on whether a pointer,in or pointer,out event has been called previously.
23 /// A return value of <c>true</c> indicates the mouse is logically inside the canvas, and <c>false</c> implies it is logically outside the canvas.
25 /// A canvas begins with the mouse being assumed outside (<c>false</c>).
28 /// <b>This is a BETA method</b>. It can be modified or removed in the future. Do not use it for product development.</summary>
29 /// <param name="seat">The seat to consider, if <c>null</c> then the default seat will be used.</param>
30 /// <returns><c>true</c> if the mouse pointer is inside the canvas, <c>false</c> otherwise</returns>
31 bool GetPointerInside(Efl.Input.Device seat);
33 /// <summary>Efl Canvas Pointer interface
34 /// (Since EFL 1.22)</summary>
35 sealed public class IPointerConcrete :
40 /// <summary>Pointer to the native class description.</summary>
41 public override System.IntPtr NativeClass
45 if (((object)this).GetType() == typeof(IPointerConcrete))
47 return GetEflClassStatic();
51 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
56 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
57 /// Do not call this constructor directly.</summary>
58 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
59 private IPointerConcrete(ConstructingHandle ch) : base(ch)
63 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
64 efl_canvas_pointer_interface_get();
65 /// <summary>Initializes a new instance of the <see cref="IPointer"/> class.
66 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
67 /// <param name="wh">The native pointer to be wrapped.</param>
68 private IPointerConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
72 /// <summary>Returns whether the mouse pointer is logically inside the canvas.
73 /// When this function is called it will return a value of either <c>false</c> or <c>true</c>, depending on whether a pointer,in or pointer,out event has been called previously.
75 /// A return value of <c>true</c> indicates the mouse is logically inside the canvas, and <c>false</c> implies it is logically outside the canvas.
77 /// A canvas begins with the mouse being assumed outside (<c>false</c>).
80 /// <b>This is a BETA method</b>. It can be modified or removed in the future. Do not use it for product development.</summary>
81 /// <param name="seat">The seat to consider, if <c>null</c> then the default seat will be used.</param>
82 /// <returns><c>true</c> if the mouse pointer is inside the canvas, <c>false</c> otherwise</returns>
83 public bool GetPointerInside(Efl.Input.Device seat) {
84 var _ret_var = Efl.Canvas.IPointerConcrete.NativeMethods.efl_canvas_pointer_inside_get_ptr.Value.Delegate(this.NativeHandle,seat);
85 Eina.Error.RaiseIfUnhandledException();
88 private static IntPtr GetEflClassStatic()
90 return Efl.Canvas.IPointerConcrete.efl_canvas_pointer_interface_get();
92 /// <summary>Wrapper for native methods and virtual method delegates.
93 /// For internal use by generated code only.</summary>
94 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
96 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
97 /// <summary>Gets the list of Eo operations to override.</summary>
98 /// <returns>The list of Eo operations to be overload.</returns>
99 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
101 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
102 var methods = Efl.Eo.Globals.GetUserMethods(type);
104 if (efl_canvas_pointer_inside_get_static_delegate == null)
106 efl_canvas_pointer_inside_get_static_delegate = new efl_canvas_pointer_inside_get_delegate(pointer_inside_get);
109 if (methods.FirstOrDefault(m => m.Name == "GetPointerInside") != null)
111 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_pointer_inside_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_pointer_inside_get_static_delegate) });
116 /// <summary>Returns the Eo class for the native methods of this class.</summary>
117 /// <returns>The native class pointer.</returns>
118 public override IntPtr GetEflClass()
120 return Efl.Canvas.IPointerConcrete.efl_canvas_pointer_interface_get();
123 #pragma warning disable CA1707, CS1591, SA1300, SA1600
125 [return: MarshalAs(UnmanagedType.U1)]
126 private delegate bool efl_canvas_pointer_inside_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
128 [return: MarshalAs(UnmanagedType.U1)]
129 public delegate bool efl_canvas_pointer_inside_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
131 public static Efl.Eo.FunctionWrapper<efl_canvas_pointer_inside_get_api_delegate> efl_canvas_pointer_inside_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_pointer_inside_get_api_delegate>(Module, "efl_canvas_pointer_inside_get");
133 private static bool pointer_inside_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Device seat)
135 Eina.Log.Debug("function efl_canvas_pointer_inside_get was called");
136 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
139 bool _ret_var = default(bool);
142 _ret_var = ((IPointer)ws.Target).GetPointerInside(seat);
146 Eina.Log.Warning($"Callback error: {e.ToString()}");
147 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
155 return efl_canvas_pointer_inside_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), seat);
159 private static efl_canvas_pointer_inside_get_delegate efl_canvas_pointer_inside_get_static_delegate;
161 #pragma warning restore CA1707, CS1591, SA1300, SA1600
170 #pragma warning disable CS1591
171 public static class Efl_CanvasIPointerConcrete_ExtensionMethods {
174 #pragma warning restore CS1591