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 input state interface.
14 /// (Since EFL 1.22)</summary>
15 [Efl.Input.IStateConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface IState :
18 Efl.Eo.IWrapper, IDisposable
20 /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...
23 /// <b>This is a BETA method</b>. It can be modified or removed in the future. Do not use it for product development.</summary>
24 /// <param name="mod">The modifier key to test.</param>
25 /// <param name="seat">The seat device, may be <c>null</c></param>
26 /// <returns><c>true</c> if the key modifier is pressed.</returns>
27 bool GetModifierEnabled(Efl.Input.Modifier mod, Efl.Input.Device seat);
28 /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...
31 /// <b>This is a BETA method</b>. It can be modified or removed in the future. Do not use it for product development.</summary>
32 /// <param name="kw_lock">The lock key to test.</param>
33 /// <param name="seat">The seat device, may be <c>null</c></param>
34 /// <returns><c>true</c> if the key lock is on.</returns>
35 bool GetLockEnabled(Efl.Input.Lock kw_lock, Efl.Input.Device seat);
37 /// <summary>Efl input state interface.
38 /// (Since EFL 1.22)</summary>
39 sealed public class IStateConcrete :
44 /// <summary>Pointer to the native class description.</summary>
45 public override System.IntPtr NativeClass
49 if (((object)this).GetType() == typeof(IStateConcrete))
51 return GetEflClassStatic();
55 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
60 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
61 /// Do not call this constructor directly.</summary>
62 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
63 private IStateConcrete(ConstructingHandle ch) : base(ch)
67 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
68 efl_input_state_interface_get();
69 /// <summary>Initializes a new instance of the <see cref="IState"/> class.
70 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
71 /// <param name="wh">The native pointer to be wrapped.</param>
72 private IStateConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
76 /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...
79 /// <b>This is a BETA method</b>. It can be modified or removed in the future. Do not use it for product development.</summary>
80 /// <param name="mod">The modifier key to test.</param>
81 /// <param name="seat">The seat device, may be <c>null</c></param>
82 /// <returns><c>true</c> if the key modifier is pressed.</returns>
83 public bool GetModifierEnabled(Efl.Input.Modifier mod, Efl.Input.Device seat) {
84 var _ret_var = Efl.Input.IStateConcrete.NativeMethods.efl_input_modifier_enabled_get_ptr.Value.Delegate(this.NativeHandle,mod, seat);
85 Eina.Error.RaiseIfUnhandledException();
88 /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...
91 /// <b>This is a BETA method</b>. It can be modified or removed in the future. Do not use it for product development.</summary>
92 /// <param name="kw_lock">The lock key to test.</param>
93 /// <param name="seat">The seat device, may be <c>null</c></param>
94 /// <returns><c>true</c> if the key lock is on.</returns>
95 public bool GetLockEnabled(Efl.Input.Lock kw_lock, Efl.Input.Device seat) {
96 var _ret_var = Efl.Input.IStateConcrete.NativeMethods.efl_input_lock_enabled_get_ptr.Value.Delegate(this.NativeHandle,kw_lock, seat);
97 Eina.Error.RaiseIfUnhandledException();
100 private static IntPtr GetEflClassStatic()
102 return Efl.Input.IStateConcrete.efl_input_state_interface_get();
104 /// <summary>Wrapper for native methods and virtual method delegates.
105 /// For internal use by generated code only.</summary>
106 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
108 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
109 /// <summary>Gets the list of Eo operations to override.</summary>
110 /// <returns>The list of Eo operations to be overload.</returns>
111 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
113 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
114 var methods = Efl.Eo.Globals.GetUserMethods(type);
116 if (efl_input_modifier_enabled_get_static_delegate == null)
118 efl_input_modifier_enabled_get_static_delegate = new efl_input_modifier_enabled_get_delegate(modifier_enabled_get);
121 if (methods.FirstOrDefault(m => m.Name == "GetModifierEnabled") != null)
123 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_modifier_enabled_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_modifier_enabled_get_static_delegate) });
126 if (efl_input_lock_enabled_get_static_delegate == null)
128 efl_input_lock_enabled_get_static_delegate = new efl_input_lock_enabled_get_delegate(lock_enabled_get);
131 if (methods.FirstOrDefault(m => m.Name == "GetLockEnabled") != null)
133 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_lock_enabled_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_lock_enabled_get_static_delegate) });
138 /// <summary>Returns the Eo class for the native methods of this class.</summary>
139 /// <returns>The native class pointer.</returns>
140 public override IntPtr GetEflClass()
142 return Efl.Input.IStateConcrete.efl_input_state_interface_get();
145 #pragma warning disable CA1707, CS1591, SA1300, SA1600
147 [return: MarshalAs(UnmanagedType.U1)]
148 private delegate bool efl_input_modifier_enabled_get_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Input.Modifier mod, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
150 [return: MarshalAs(UnmanagedType.U1)]
151 public delegate bool efl_input_modifier_enabled_get_api_delegate(System.IntPtr obj, Efl.Input.Modifier mod, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
153 public static Efl.Eo.FunctionWrapper<efl_input_modifier_enabled_get_api_delegate> efl_input_modifier_enabled_get_ptr = new Efl.Eo.FunctionWrapper<efl_input_modifier_enabled_get_api_delegate>(Module, "efl_input_modifier_enabled_get");
155 private static bool modifier_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Modifier mod, Efl.Input.Device seat)
157 Eina.Log.Debug("function efl_input_modifier_enabled_get was called");
158 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
161 bool _ret_var = default(bool);
164 _ret_var = ((IState)ws.Target).GetModifierEnabled(mod, seat);
168 Eina.Log.Warning($"Callback error: {e.ToString()}");
169 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
177 return efl_input_modifier_enabled_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), mod, seat);
181 private static efl_input_modifier_enabled_get_delegate efl_input_modifier_enabled_get_static_delegate;
183 [return: MarshalAs(UnmanagedType.U1)]
184 private delegate bool efl_input_lock_enabled_get_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Input.Lock kw_lock, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
186 [return: MarshalAs(UnmanagedType.U1)]
187 public delegate bool efl_input_lock_enabled_get_api_delegate(System.IntPtr obj, Efl.Input.Lock kw_lock, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
189 public static Efl.Eo.FunctionWrapper<efl_input_lock_enabled_get_api_delegate> efl_input_lock_enabled_get_ptr = new Efl.Eo.FunctionWrapper<efl_input_lock_enabled_get_api_delegate>(Module, "efl_input_lock_enabled_get");
191 private static bool lock_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Lock kw_lock, Efl.Input.Device seat)
193 Eina.Log.Debug("function efl_input_lock_enabled_get was called");
194 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
197 bool _ret_var = default(bool);
200 _ret_var = ((IState)ws.Target).GetLockEnabled(kw_lock, seat);
204 Eina.Log.Warning($"Callback error: {e.ToString()}");
205 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
213 return efl_input_lock_enabled_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), kw_lock, seat);
217 private static efl_input_lock_enabled_get_delegate efl_input_lock_enabled_get_static_delegate;
219 #pragma warning restore CA1707, CS1591, SA1300, SA1600
228 #pragma warning disable CS1591
229 public static class Efl_InputIStateConcrete_ExtensionMethods {
233 #pragma warning restore CS1591