2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
11 /// <summary>Efl control interface</summary>
12 /// <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>
13 [Efl.IControlConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IControl :
16 Efl.Eo.IWrapper, IDisposable
18 /// <summary>Control the priority of the object.</summary>
19 /// <returns>The priority of the object</returns>
21 /// <summary>Control the priority of the object.</summary>
22 /// <param name="priority">The priority of the object</param>
23 void SetPriority(int priority);
24 /// <summary>Controls whether the object is suspended or not.</summary>
25 /// <returns>Controls whether the object is suspended or not.</returns>
27 /// <summary>Controls whether the object is suspended or not.</summary>
28 /// <param name="suspend">Controls whether the object is suspended or not.</param>
29 void SetSuspend(bool suspend);
30 /// <summary>Control the priority of the object.</summary>
31 /// <value>The priority of the object</value>
36 /// <summary>Controls whether the object is suspended or not.</summary>
37 /// <value>Controls whether the object is suspended or not.</value>
43 /// <summary>Efl control interface</summary>
44 /// <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>
45 sealed public class IControlConcrete :
50 /// <summary>Pointer to the native class description.</summary>
51 public override System.IntPtr NativeClass
55 if (((object)this).GetType() == typeof(IControlConcrete))
57 return GetEflClassStatic();
61 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
66 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
67 /// Do not call this constructor directly.</summary>
68 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
69 private IControlConcrete(ConstructingHandle ch) : base(ch)
73 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
74 efl_control_interface_get();
75 /// <summary>Initializes a new instance of the <see cref="IControl"/> class.
76 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
77 /// <param name="wh">The native pointer to be wrapped.</param>
78 private IControlConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
82 /// <summary>Control the priority of the object.</summary>
83 /// <returns>The priority of the object</returns>
84 public int GetPriority() {
85 var _ret_var = Efl.IControlConcrete.NativeMethods.efl_control_priority_get_ptr.Value.Delegate(this.NativeHandle);
86 Eina.Error.RaiseIfUnhandledException();
89 /// <summary>Control the priority of the object.</summary>
90 /// <param name="priority">The priority of the object</param>
91 public void SetPriority(int priority) {
92 Efl.IControlConcrete.NativeMethods.efl_control_priority_set_ptr.Value.Delegate(this.NativeHandle,priority);
93 Eina.Error.RaiseIfUnhandledException();
95 /// <summary>Controls whether the object is suspended or not.</summary>
96 /// <returns>Controls whether the object is suspended or not.</returns>
97 public bool GetSuspend() {
98 var _ret_var = Efl.IControlConcrete.NativeMethods.efl_control_suspend_get_ptr.Value.Delegate(this.NativeHandle);
99 Eina.Error.RaiseIfUnhandledException();
102 /// <summary>Controls whether the object is suspended or not.</summary>
103 /// <param name="suspend">Controls whether the object is suspended or not.</param>
104 public void SetSuspend(bool suspend) {
105 Efl.IControlConcrete.NativeMethods.efl_control_suspend_set_ptr.Value.Delegate(this.NativeHandle,suspend);
106 Eina.Error.RaiseIfUnhandledException();
108 /// <summary>Control the priority of the object.</summary>
109 /// <value>The priority of the object</value>
110 public int Priority {
111 get { return GetPriority(); }
112 set { SetPriority(value); }
114 /// <summary>Controls whether the object is suspended or not.</summary>
115 /// <value>Controls whether the object is suspended or not.</value>
116 public bool Suspend {
117 get { return GetSuspend(); }
118 set { SetSuspend(value); }
120 private static IntPtr GetEflClassStatic()
122 return Efl.IControlConcrete.efl_control_interface_get();
124 /// <summary>Wrapper for native methods and virtual method delegates.
125 /// For internal use by generated code only.</summary>
126 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
128 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
129 /// <summary>Gets the list of Eo operations to override.</summary>
130 /// <returns>The list of Eo operations to be overload.</returns>
131 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
133 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
134 var methods = Efl.Eo.Globals.GetUserMethods(type);
136 if (efl_control_priority_get_static_delegate == null)
138 efl_control_priority_get_static_delegate = new efl_control_priority_get_delegate(priority_get);
141 if (methods.FirstOrDefault(m => m.Name == "GetPriority") != null)
143 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_priority_get"), func = Marshal.GetFunctionPointerForDelegate(efl_control_priority_get_static_delegate) });
146 if (efl_control_priority_set_static_delegate == null)
148 efl_control_priority_set_static_delegate = new efl_control_priority_set_delegate(priority_set);
151 if (methods.FirstOrDefault(m => m.Name == "SetPriority") != null)
153 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_priority_set"), func = Marshal.GetFunctionPointerForDelegate(efl_control_priority_set_static_delegate) });
156 if (efl_control_suspend_get_static_delegate == null)
158 efl_control_suspend_get_static_delegate = new efl_control_suspend_get_delegate(suspend_get);
161 if (methods.FirstOrDefault(m => m.Name == "GetSuspend") != null)
163 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_suspend_get"), func = Marshal.GetFunctionPointerForDelegate(efl_control_suspend_get_static_delegate) });
166 if (efl_control_suspend_set_static_delegate == null)
168 efl_control_suspend_set_static_delegate = new efl_control_suspend_set_delegate(suspend_set);
171 if (methods.FirstOrDefault(m => m.Name == "SetSuspend") != null)
173 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_suspend_set"), func = Marshal.GetFunctionPointerForDelegate(efl_control_suspend_set_static_delegate) });
178 /// <summary>Returns the Eo class for the native methods of this class.</summary>
179 /// <returns>The native class pointer.</returns>
180 public override IntPtr GetEflClass()
182 return Efl.IControlConcrete.efl_control_interface_get();
185 #pragma warning disable CA1707, CS1591, SA1300, SA1600
188 private delegate int efl_control_priority_get_delegate(System.IntPtr obj, System.IntPtr pd);
191 public delegate int efl_control_priority_get_api_delegate(System.IntPtr obj);
193 public static Efl.Eo.FunctionWrapper<efl_control_priority_get_api_delegate> efl_control_priority_get_ptr = new Efl.Eo.FunctionWrapper<efl_control_priority_get_api_delegate>(Module, "efl_control_priority_get");
195 private static int priority_get(System.IntPtr obj, System.IntPtr pd)
197 Eina.Log.Debug("function efl_control_priority_get was called");
198 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
201 int _ret_var = default(int);
204 _ret_var = ((IControl)ws.Target).GetPriority();
208 Eina.Log.Warning($"Callback error: {e.ToString()}");
209 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
217 return efl_control_priority_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
221 private static efl_control_priority_get_delegate efl_control_priority_get_static_delegate;
224 private delegate void efl_control_priority_set_delegate(System.IntPtr obj, System.IntPtr pd, int priority);
227 public delegate void efl_control_priority_set_api_delegate(System.IntPtr obj, int priority);
229 public static Efl.Eo.FunctionWrapper<efl_control_priority_set_api_delegate> efl_control_priority_set_ptr = new Efl.Eo.FunctionWrapper<efl_control_priority_set_api_delegate>(Module, "efl_control_priority_set");
231 private static void priority_set(System.IntPtr obj, System.IntPtr pd, int priority)
233 Eina.Log.Debug("function efl_control_priority_set was called");
234 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
240 ((IControl)ws.Target).SetPriority(priority);
244 Eina.Log.Warning($"Callback error: {e.ToString()}");
245 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
252 efl_control_priority_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), priority);
256 private static efl_control_priority_set_delegate efl_control_priority_set_static_delegate;
258 [return: MarshalAs(UnmanagedType.U1)]
259 private delegate bool efl_control_suspend_get_delegate(System.IntPtr obj, System.IntPtr pd);
261 [return: MarshalAs(UnmanagedType.U1)]
262 public delegate bool efl_control_suspend_get_api_delegate(System.IntPtr obj);
264 public static Efl.Eo.FunctionWrapper<efl_control_suspend_get_api_delegate> efl_control_suspend_get_ptr = new Efl.Eo.FunctionWrapper<efl_control_suspend_get_api_delegate>(Module, "efl_control_suspend_get");
266 private static bool suspend_get(System.IntPtr obj, System.IntPtr pd)
268 Eina.Log.Debug("function efl_control_suspend_get was called");
269 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
272 bool _ret_var = default(bool);
275 _ret_var = ((IControl)ws.Target).GetSuspend();
279 Eina.Log.Warning($"Callback error: {e.ToString()}");
280 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
288 return efl_control_suspend_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
292 private static efl_control_suspend_get_delegate efl_control_suspend_get_static_delegate;
295 private delegate void efl_control_suspend_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool suspend);
298 public delegate void efl_control_suspend_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool suspend);
300 public static Efl.Eo.FunctionWrapper<efl_control_suspend_set_api_delegate> efl_control_suspend_set_ptr = new Efl.Eo.FunctionWrapper<efl_control_suspend_set_api_delegate>(Module, "efl_control_suspend_set");
302 private static void suspend_set(System.IntPtr obj, System.IntPtr pd, bool suspend)
304 Eina.Log.Debug("function efl_control_suspend_set was called");
305 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
311 ((IControl)ws.Target).SetSuspend(suspend);
315 Eina.Log.Warning($"Callback error: {e.ToString()}");
316 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
323 efl_control_suspend_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), suspend);
327 private static efl_control_suspend_set_delegate efl_control_suspend_set_static_delegate;
329 #pragma warning restore CA1707, CS1591, SA1300, SA1600
336 #pragma warning disable CS1591
337 public static class EflIControlConcrete_ExtensionMethods {
338 public static Efl.BindableProperty<int> Priority<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.IControl, T>magic = null) where T : Efl.IControl {
339 return new Efl.BindableProperty<int>("priority", fac);
342 public static Efl.BindableProperty<bool> Suspend<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.IControl, T>magic = null) where T : Efl.IControl {
343 return new Efl.BindableProperty<bool>("suspend", fac);
347 #pragma warning restore CS1591