1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Canvas {
8 /// <summary>EFL Gesture abstract class</summary>
10 public abstract class Gesture : Efl.Object, Efl.Eo.IWrapper
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (Gesture))
16 return Efl.Canvas.GestureNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
22 efl_canvas_gesture_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public Gesture(Efl.Object parent= null
27 base(efl_canvas_gesture_class_get(), typeof(Gesture), parent)
29 FinishInstantiation();
31 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
32 protected Gesture(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 [Efl.Eo.PrivateNativeClass]
37 private class GestureRealized : Gesture
39 private GestureRealized(IntPtr ptr) : base(ptr)
43 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
44 protected Gesture(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
45 ///<summary>Verifies if the given object is equal to this one.</summary>
46 public override bool Equals(object obj)
48 var other = obj as Efl.Object;
51 return this.NativeHandle == other.NativeHandle;
53 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
54 public override int GetHashCode()
56 return this.NativeHandle.ToInt32();
58 ///<summary>Turns the native pointer into a string representation.</summary>
59 public override String ToString()
61 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
63 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
64 protected override void RegisterEventProxies()
66 base.RegisterEventProxies();
68 /// <summary>This property holds the type of the gesture.</summary>
69 /// <returns>gesture type</returns>
70 virtual public Efl.EventDescription GetType() {
71 var _ret_var = Efl.Canvas.GestureNativeInherit.efl_gesture_type_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
72 Eina.Error.RaiseIfUnhandledException();
73 var __ret_tmp = Eina.PrimitiveConversion.PointerToManaged<Efl.EventDescription>(_ret_var);
77 /// <summary>This property holds the current state of the gesture.</summary>
78 /// <returns>gesture state</returns>
79 virtual public Efl.Canvas.GestureState GetState() {
80 var _ret_var = Efl.Canvas.GestureNativeInherit.efl_gesture_state_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
81 Eina.Error.RaiseIfUnhandledException();
84 /// <summary>This property holds the current state of the gesture.</summary>
85 /// <param name="state">gesture state</param>
86 /// <returns></returns>
87 virtual public void SetState( Efl.Canvas.GestureState state) {
88 Efl.Canvas.GestureNativeInherit.efl_gesture_state_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), state);
89 Eina.Error.RaiseIfUnhandledException();
91 /// <summary>This property holds the hotspot of the current gesture.</summary>
92 /// <returns>hotspot co-ordinate</returns>
93 virtual public Eina.Vector2 GetHotspot() {
94 var _ret_var = Efl.Canvas.GestureNativeInherit.efl_gesture_hotspot_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
95 Eina.Error.RaiseIfUnhandledException();
98 /// <summary>This property holds the hotspot of the current gesture.</summary>
99 /// <param name="hotspot">hotspot co-ordinate</param>
100 /// <returns></returns>
101 virtual public void SetHotspot( Eina.Vector2 hotspot) {
102 Eina.Vector2.NativeStruct _in_hotspot = hotspot;
103 Efl.Canvas.GestureNativeInherit.efl_gesture_hotspot_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), _in_hotspot);
104 Eina.Error.RaiseIfUnhandledException();
106 /// <summary>This property holds the type of the gesture.</summary>
107 /// <value>gesture type</value>
108 public Efl.EventDescription Type {
109 get { return GetType(); }
111 /// <summary>This property holds the current state of the gesture.</summary>
112 /// <value>gesture state</value>
113 public Efl.Canvas.GestureState State {
114 get { return GetState(); }
115 set { SetState( value); }
117 /// <summary>This property holds the hotspot of the current gesture.</summary>
118 /// <value>hotspot co-ordinate</value>
119 public Eina.Vector2 Hotspot {
120 get { return GetHotspot(); }
121 set { SetHotspot( value); }
123 private static IntPtr GetEflClassStatic()
125 return Efl.Canvas.Gesture.efl_canvas_gesture_class_get();
128 public class GestureNativeInherit : Efl.ObjectNativeInherit{
129 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
130 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
132 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
133 var methods = Efl.Eo.Globals.GetUserMethods(type);
134 if (efl_gesture_type_get_static_delegate == null)
135 efl_gesture_type_get_static_delegate = new efl_gesture_type_get_delegate(type_get);
136 if (methods.FirstOrDefault(m => m.Name == "GetType") != null)
137 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gesture_type_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_type_get_static_delegate)});
138 if (efl_gesture_state_get_static_delegate == null)
139 efl_gesture_state_get_static_delegate = new efl_gesture_state_get_delegate(state_get);
140 if (methods.FirstOrDefault(m => m.Name == "GetState") != null)
141 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gesture_state_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_state_get_static_delegate)});
142 if (efl_gesture_state_set_static_delegate == null)
143 efl_gesture_state_set_static_delegate = new efl_gesture_state_set_delegate(state_set);
144 if (methods.FirstOrDefault(m => m.Name == "SetState") != null)
145 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gesture_state_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_state_set_static_delegate)});
146 if (efl_gesture_hotspot_get_static_delegate == null)
147 efl_gesture_hotspot_get_static_delegate = new efl_gesture_hotspot_get_delegate(hotspot_get);
148 if (methods.FirstOrDefault(m => m.Name == "GetHotspot") != null)
149 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gesture_hotspot_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_hotspot_get_static_delegate)});
150 if (efl_gesture_hotspot_set_static_delegate == null)
151 efl_gesture_hotspot_set_static_delegate = new efl_gesture_hotspot_set_delegate(hotspot_set);
152 if (methods.FirstOrDefault(m => m.Name == "SetHotspot") != null)
153 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gesture_hotspot_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_hotspot_set_static_delegate)});
154 descs.AddRange(base.GetEoOps(type));
157 public override IntPtr GetEflClass()
159 return Efl.Canvas.Gesture.efl_canvas_gesture_class_get();
161 public static new IntPtr GetEflClassStatic()
163 return Efl.Canvas.Gesture.efl_canvas_gesture_class_get();
167 private delegate System.IntPtr efl_gesture_type_get_delegate(System.IntPtr obj, System.IntPtr pd);
170 public delegate System.IntPtr efl_gesture_type_get_api_delegate(System.IntPtr obj);
171 public static Efl.Eo.FunctionWrapper<efl_gesture_type_get_api_delegate> efl_gesture_type_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_type_get_api_delegate>(_Module, "efl_gesture_type_get");
172 private static System.IntPtr type_get(System.IntPtr obj, System.IntPtr pd)
174 Eina.Log.Debug("function efl_gesture_type_get was called");
175 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
176 if(wrapper != null) {
177 Efl.EventDescription _ret_var = default(Efl.EventDescription);
179 _ret_var = ((Gesture)wrapper).GetType();
180 } catch (Exception e) {
181 Eina.Log.Warning($"Callback error: {e.ToString()}");
182 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
184 return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var);
186 return efl_gesture_type_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
189 private static efl_gesture_type_get_delegate efl_gesture_type_get_static_delegate;
192 private delegate Efl.Canvas.GestureState efl_gesture_state_get_delegate(System.IntPtr obj, System.IntPtr pd);
195 public delegate Efl.Canvas.GestureState efl_gesture_state_get_api_delegate(System.IntPtr obj);
196 public static Efl.Eo.FunctionWrapper<efl_gesture_state_get_api_delegate> efl_gesture_state_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_state_get_api_delegate>(_Module, "efl_gesture_state_get");
197 private static Efl.Canvas.GestureState state_get(System.IntPtr obj, System.IntPtr pd)
199 Eina.Log.Debug("function efl_gesture_state_get was called");
200 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
201 if(wrapper != null) {
202 Efl.Canvas.GestureState _ret_var = default(Efl.Canvas.GestureState);
204 _ret_var = ((Gesture)wrapper).GetState();
205 } catch (Exception e) {
206 Eina.Log.Warning($"Callback error: {e.ToString()}");
207 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
211 return efl_gesture_state_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
214 private static efl_gesture_state_get_delegate efl_gesture_state_get_static_delegate;
217 private delegate void efl_gesture_state_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.GestureState state);
220 public delegate void efl_gesture_state_set_api_delegate(System.IntPtr obj, Efl.Canvas.GestureState state);
221 public static Efl.Eo.FunctionWrapper<efl_gesture_state_set_api_delegate> efl_gesture_state_set_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_state_set_api_delegate>(_Module, "efl_gesture_state_set");
222 private static void state_set(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.GestureState state)
224 Eina.Log.Debug("function efl_gesture_state_set was called");
225 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
226 if(wrapper != null) {
229 ((Gesture)wrapper).SetState( state);
230 } catch (Exception e) {
231 Eina.Log.Warning($"Callback error: {e.ToString()}");
232 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
235 efl_gesture_state_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), state);
238 private static efl_gesture_state_set_delegate efl_gesture_state_set_static_delegate;
241 private delegate Eina.Vector2.NativeStruct efl_gesture_hotspot_get_delegate(System.IntPtr obj, System.IntPtr pd);
244 public delegate Eina.Vector2.NativeStruct efl_gesture_hotspot_get_api_delegate(System.IntPtr obj);
245 public static Efl.Eo.FunctionWrapper<efl_gesture_hotspot_get_api_delegate> efl_gesture_hotspot_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_hotspot_get_api_delegate>(_Module, "efl_gesture_hotspot_get");
246 private static Eina.Vector2.NativeStruct hotspot_get(System.IntPtr obj, System.IntPtr pd)
248 Eina.Log.Debug("function efl_gesture_hotspot_get was called");
249 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
250 if(wrapper != null) {
251 Eina.Vector2 _ret_var = default(Eina.Vector2);
253 _ret_var = ((Gesture)wrapper).GetHotspot();
254 } catch (Exception e) {
255 Eina.Log.Warning($"Callback error: {e.ToString()}");
256 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
260 return efl_gesture_hotspot_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
263 private static efl_gesture_hotspot_get_delegate efl_gesture_hotspot_get_static_delegate;
266 private delegate void efl_gesture_hotspot_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Vector2.NativeStruct hotspot);
269 public delegate void efl_gesture_hotspot_set_api_delegate(System.IntPtr obj, Eina.Vector2.NativeStruct hotspot);
270 public static Efl.Eo.FunctionWrapper<efl_gesture_hotspot_set_api_delegate> efl_gesture_hotspot_set_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_hotspot_set_api_delegate>(_Module, "efl_gesture_hotspot_set");
271 private static void hotspot_set(System.IntPtr obj, System.IntPtr pd, Eina.Vector2.NativeStruct hotspot)
273 Eina.Log.Debug("function efl_gesture_hotspot_set was called");
274 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
275 if(wrapper != null) {
276 Eina.Vector2 _in_hotspot = hotspot;
279 ((Gesture)wrapper).SetHotspot( _in_hotspot);
280 } catch (Exception e) {
281 Eina.Log.Warning($"Callback error: {e.ToString()}");
282 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
285 efl_gesture_hotspot_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), hotspot);
288 private static efl_gesture_hotspot_set_delegate efl_gesture_hotspot_set_static_delegate;