9f91fdfe4869406017d5bf9943d25602cec349a8
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_input_state.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
11 namespace Input {
12
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
19 {
20     /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...
21 /// (Since EFL 1.22)
22 /// 
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, ...
29 /// (Since EFL 1.22)
30 /// 
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);
36         }
37 /// <summary>Efl input state interface.
38 /// (Since EFL 1.22)</summary>
39 sealed public  class IStateConcrete :
40     Efl.Eo.EoWrapper
41     , IState
42     
43 {
44     /// <summary>Pointer to the native class description.</summary>
45     public override System.IntPtr NativeClass
46     {
47         get
48         {
49             if (((object)this).GetType() == typeof(IStateConcrete))
50             {
51                 return GetEflClassStatic();
52             }
53             else
54             {
55                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
56             }
57         }
58     }
59
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)
64     {
65     }
66
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)
73     {
74     }
75
76     /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...
77     /// (Since EFL 1.22)
78     /// 
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();
86                                         return _ret_var;
87  }
88     /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...
89     /// (Since EFL 1.22)
90     /// 
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();
98                                         return _ret_var;
99  }
100     private static IntPtr GetEflClassStatic()
101     {
102         return Efl.Input.IStateConcrete.efl_input_state_interface_get();
103     }
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
107     {
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)
112         {
113             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
114             var methods = Efl.Eo.Globals.GetUserMethods(type);
115
116             if (efl_input_modifier_enabled_get_static_delegate == null)
117             {
118                 efl_input_modifier_enabled_get_static_delegate = new efl_input_modifier_enabled_get_delegate(modifier_enabled_get);
119             }
120
121             if (methods.FirstOrDefault(m => m.Name == "GetModifierEnabled") != null)
122             {
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) });
124             }
125
126             if (efl_input_lock_enabled_get_static_delegate == null)
127             {
128                 efl_input_lock_enabled_get_static_delegate = new efl_input_lock_enabled_get_delegate(lock_enabled_get);
129             }
130
131             if (methods.FirstOrDefault(m => m.Name == "GetLockEnabled") != null)
132             {
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) });
134             }
135
136             return descs;
137         }
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()
141         {
142             return Efl.Input.IStateConcrete.efl_input_state_interface_get();
143         }
144
145         #pragma warning disable CA1707, CS1591, SA1300, SA1600
146
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);
149
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);
152
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");
154
155         private static bool modifier_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Modifier mod, Efl.Input.Device seat)
156         {
157             Eina.Log.Debug("function efl_input_modifier_enabled_get was called");
158             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
159             if (ws != null)
160             {
161                                                             bool _ret_var = default(bool);
162                 try
163                 {
164                     _ret_var = ((IState)ws.Target).GetModifierEnabled(mod, seat);
165                 }
166                 catch (Exception e)
167                 {
168                     Eina.Log.Warning($"Callback error: {e.ToString()}");
169                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
170                 }
171
172                                         return _ret_var;
173
174             }
175             else
176             {
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);
178             }
179         }
180
181         private static efl_input_modifier_enabled_get_delegate efl_input_modifier_enabled_get_static_delegate;
182
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);
185
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);
188
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");
190
191         private static bool lock_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Lock kw_lock, Efl.Input.Device seat)
192         {
193             Eina.Log.Debug("function efl_input_lock_enabled_get was called");
194             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
195             if (ws != null)
196             {
197                                                             bool _ret_var = default(bool);
198                 try
199                 {
200                     _ret_var = ((IState)ws.Target).GetLockEnabled(kw_lock, seat);
201                 }
202                 catch (Exception e)
203                 {
204                     Eina.Log.Warning($"Callback error: {e.ToString()}");
205                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
206                 }
207
208                                         return _ret_var;
209
210             }
211             else
212             {
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);
214             }
215         }
216
217         private static efl_input_lock_enabled_get_delegate efl_input_lock_enabled_get_static_delegate;
218
219         #pragma warning restore CA1707, CS1591, SA1300, SA1600
220
221 }
222 }
223 }
224
225 }
226
227 #if EFL_BETA
228 #pragma warning disable CS1591
229 public static class Efl_InputIStateConcrete_ExtensionMethods {
230     
231     
232 }
233 #pragma warning restore CS1591
234 #endif