90230c968589c412e075753d004966c32b22cb5f
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_input_state.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Input {
11
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
17 {
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);
30         }
31 /// <summary>Efl input state interface.
32 /// (Since EFL 1.22)</summary>
33 sealed public class IStateConcrete :
34     Efl.Eo.EoWrapper
35     , IState
36     
37 {
38     ///<summary>Pointer to the native class description.</summary>
39     public override System.IntPtr NativeClass
40     {
41         get
42         {
43             if (((object)this).GetType() == typeof(IStateConcrete))
44             {
45                 return GetEflClassStatic();
46             }
47             else
48             {
49                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
50             }
51         }
52     }
53
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)
59     {
60     }
61
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();
70                                         return _ret_var;
71  }
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();
80                                         return _ret_var;
81  }
82     private static IntPtr GetEflClassStatic()
83     {
84         return Efl.Input.IStateConcrete.efl_input_state_interface_get();
85     }
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
89     {
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)
94         {
95             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
96             var methods = Efl.Eo.Globals.GetUserMethods(type);
97
98             if (efl_input_modifier_enabled_get_static_delegate == null)
99             {
100                 efl_input_modifier_enabled_get_static_delegate = new efl_input_modifier_enabled_get_delegate(modifier_enabled_get);
101             }
102
103             if (methods.FirstOrDefault(m => m.Name == "GetModifierEnabled") != null)
104             {
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) });
106             }
107
108             if (efl_input_lock_enabled_get_static_delegate == null)
109             {
110                 efl_input_lock_enabled_get_static_delegate = new efl_input_lock_enabled_get_delegate(lock_enabled_get);
111             }
112
113             if (methods.FirstOrDefault(m => m.Name == "GetLockEnabled") != null)
114             {
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) });
116             }
117
118             return descs;
119         }
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()
123         {
124             return Efl.Input.IStateConcrete.efl_input_state_interface_get();
125         }
126
127         #pragma warning disable CA1707, CS1591, SA1300, SA1600
128
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);
131
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);
134
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");
136
137         private static bool modifier_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Modifier mod, Efl.Input.Device seat)
138         {
139             Eina.Log.Debug("function efl_input_modifier_enabled_get was called");
140             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
141             if (ws != null)
142             {
143                                                             bool _ret_var = default(bool);
144                 try
145                 {
146                     _ret_var = ((IState)ws.Target).GetModifierEnabled(mod, seat);
147                 }
148                 catch (Exception e)
149                 {
150                     Eina.Log.Warning($"Callback error: {e.ToString()}");
151                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
152                 }
153
154                                         return _ret_var;
155
156             }
157             else
158             {
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);
160             }
161         }
162
163         private static efl_input_modifier_enabled_get_delegate efl_input_modifier_enabled_get_static_delegate;
164
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);
167
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);
170
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");
172
173         private static bool lock_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Lock kw_lock, Efl.Input.Device seat)
174         {
175             Eina.Log.Debug("function efl_input_lock_enabled_get was called");
176             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
177             if (ws != null)
178             {
179                                                             bool _ret_var = default(bool);
180                 try
181                 {
182                     _ret_var = ((IState)ws.Target).GetLockEnabled(kw_lock, seat);
183                 }
184                 catch (Exception e)
185                 {
186                     Eina.Log.Warning($"Callback error: {e.ToString()}");
187                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
188                 }
189
190                                         return _ret_var;
191
192             }
193             else
194             {
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);
196             }
197         }
198
199         private static efl_input_lock_enabled_get_delegate efl_input_lock_enabled_get_static_delegate;
200
201         #pragma warning restore CA1707, CS1591, SA1300, SA1600
202
203 }
204 }
205 }
206
207 }
208