1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl input state interface.
13 /// (Since EFL 1.22)</summary>
14 [Efl.Input.IStateConcrete.NativeMethods]
15 public interface IState :
16 Efl.Eo.IWrapper, IDisposable
18 /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...
19 /// (Since EFL 1.22)</summary>
20 /// <param name="mod">The modifier key to test.</param>
21 /// <param name="seat">The seat device, may be <c>null</c></param>
22 /// <returns><c>true</c> if the key modifier is pressed.</returns>
23 bool GetModifierEnabled(Efl.Input.Modifier mod, Efl.Input.Device seat);
24 /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...
25 /// (Since EFL 1.22)</summary>
26 /// <param name="kw_lock">The lock key to test.</param>
27 /// <param name="seat">The seat device, may be <c>null</c></param>
28 /// <returns><c>true</c> if the key lock is on.</returns>
29 bool GetLockEnabled(Efl.Input.Lock kw_lock, Efl.Input.Device seat);
31 /// <summary>Efl input state interface.
32 /// (Since EFL 1.22)</summary>
33 sealed public class IStateConcrete :
38 ///<summary>Pointer to the native class description.</summary>
39 public override System.IntPtr NativeClass
43 if (((object)this).GetType() == typeof(IStateConcrete))
45 return GetEflClassStatic();
49 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
54 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
55 efl_input_state_interface_get();
56 /// <summary>Initializes a new instance of the <see cref="IState"/> class.
57 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
58 private IStateConcrete(System.IntPtr raw) : base(raw)
62 /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...
63 /// (Since EFL 1.22)</summary>
64 /// <param name="mod">The modifier key to test.</param>
65 /// <param name="seat">The seat device, may be <c>null</c></param>
66 /// <returns><c>true</c> if the key modifier is pressed.</returns>
67 public bool GetModifierEnabled(Efl.Input.Modifier mod, Efl.Input.Device seat) {
68 var _ret_var = Efl.Input.IStateConcrete.NativeMethods.efl_input_modifier_enabled_get_ptr.Value.Delegate(this.NativeHandle,mod, seat);
69 Eina.Error.RaiseIfUnhandledException();
72 /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...
73 /// (Since EFL 1.22)</summary>
74 /// <param name="kw_lock">The lock key to test.</param>
75 /// <param name="seat">The seat device, may be <c>null</c></param>
76 /// <returns><c>true</c> if the key lock is on.</returns>
77 public bool GetLockEnabled(Efl.Input.Lock kw_lock, Efl.Input.Device seat) {
78 var _ret_var = Efl.Input.IStateConcrete.NativeMethods.efl_input_lock_enabled_get_ptr.Value.Delegate(this.NativeHandle,kw_lock, seat);
79 Eina.Error.RaiseIfUnhandledException();
82 private static IntPtr GetEflClassStatic()
84 return Efl.Input.IStateConcrete.efl_input_state_interface_get();
86 /// <summary>Wrapper for native methods and virtual method delegates.
87 /// For internal use by generated code only.</summary>
88 public class NativeMethods : Efl.Eo.NativeClass
90 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
91 /// <summary>Gets the list of Eo operations to override.</summary>
92 /// <returns>The list of Eo operations to be overload.</returns>
93 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
95 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
96 var methods = Efl.Eo.Globals.GetUserMethods(type);
98 if (efl_input_modifier_enabled_get_static_delegate == null)
100 efl_input_modifier_enabled_get_static_delegate = new efl_input_modifier_enabled_get_delegate(modifier_enabled_get);
103 if (methods.FirstOrDefault(m => m.Name == "GetModifierEnabled") != null)
105 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) });
108 if (efl_input_lock_enabled_get_static_delegate == null)
110 efl_input_lock_enabled_get_static_delegate = new efl_input_lock_enabled_get_delegate(lock_enabled_get);
113 if (methods.FirstOrDefault(m => m.Name == "GetLockEnabled") != null)
115 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) });
120 /// <summary>Returns the Eo class for the native methods of this class.</summary>
121 /// <returns>The native class pointer.</returns>
122 public override IntPtr GetEflClass()
124 return Efl.Input.IStateConcrete.efl_input_state_interface_get();
127 #pragma warning disable CA1707, CS1591, SA1300, SA1600
129 [return: MarshalAs(UnmanagedType.U1)]
130 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);
132 [return: MarshalAs(UnmanagedType.U1)]
133 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);
135 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");
137 private static bool modifier_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Modifier mod, Efl.Input.Device seat)
139 Eina.Log.Debug("function efl_input_modifier_enabled_get was called");
140 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
143 bool _ret_var = default(bool);
146 _ret_var = ((IState)ws.Target).GetModifierEnabled(mod, seat);
150 Eina.Log.Warning($"Callback error: {e.ToString()}");
151 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
159 return efl_input_modifier_enabled_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), mod, seat);
163 private static efl_input_modifier_enabled_get_delegate efl_input_modifier_enabled_get_static_delegate;
165 [return: MarshalAs(UnmanagedType.U1)]
166 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);
168 [return: MarshalAs(UnmanagedType.U1)]
169 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);
171 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");
173 private static bool lock_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Lock kw_lock, Efl.Input.Device seat)
175 Eina.Log.Debug("function efl_input_lock_enabled_get was called");
176 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
179 bool _ret_var = default(bool);
182 _ret_var = ((IState)ws.Target).GetLockEnabled(kw_lock, seat);
186 Eina.Log.Warning($"Callback error: {e.ToString()}");
187 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
195 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);
199 private static efl_input_lock_enabled_get_delegate efl_input_lock_enabled_get_static_delegate;
201 #pragma warning restore CA1707, CS1591, SA1300, SA1600