[EflSharp] Introduce EflSharp project (#749)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / 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.ComponentModel;
7 namespace Efl { namespace Input { 
8 /// <summary>Efl input state interface</summary>
9 [StateNativeInherit]
10 public interface State : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...</summary>
14 /// <param name="mod">The modifier key to test.</param>
15 /// <param name="seat">The seat device, may be <c>null</c></param>
16 /// <returns><c>true</c> if the key modifier is pressed.</returns>
17 bool GetModifierEnabled( Efl.Input.Modifier mod,  Efl.Input.Device seat);
18    /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...</summary>
19 /// <param name="kw_lock">The lock key to test.</param>
20 /// <param name="seat">The seat device, may be <c>null</c></param>
21 /// <returns><c>true</c> if the key lock is on.</returns>
22 bool GetLockEnabled( Efl.Input.Lock kw_lock,  Efl.Input.Device seat);
23       }
24 /// <summary>Efl input state interface</summary>
25 sealed public class StateConcrete : 
26
27 State
28    
29 {
30    ///<summary>Pointer to the native class description.</summary>
31    public System.IntPtr NativeClass {
32       get {
33          if (((object)this).GetType() == typeof (StateConcrete))
34             return Efl.Input.StateNativeInherit.GetEflClassStatic();
35          else
36             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
37       }
38    }
39    private  System.IntPtr handle;
40    ///<summary>Pointer to the native instance.</summary>
41    public System.IntPtr NativeHandle {
42       get { return handle; }
43    }
44    [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
45       efl_input_state_interface_get();
46    ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
47    public StateConcrete(System.IntPtr raw)
48    {
49       handle = raw;
50       register_event_proxies();
51    }
52    ///<summary>Destructor.</summary>
53    ~StateConcrete()
54    {
55       Dispose(false);
56    }
57    ///<summary>Releases the underlying native instance.</summary>
58    void Dispose(bool disposing)
59    {
60       if (handle != System.IntPtr.Zero) {
61          Efl.Eo.Globals.efl_unref(handle);
62          handle = System.IntPtr.Zero;
63       }
64    }
65    ///<summary>Releases the underlying native instance.</summary>
66    public void Dispose()
67    {
68       Dispose(true);
69       GC.SuppressFinalize(this);
70    }
71    ///<summary>Casts obj into an instance of this type.</summary>
72    public static StateConcrete static_cast(Efl.Object obj)
73    {
74       if (obj == null)
75          throw new System.ArgumentNullException("obj");
76       return new StateConcrete(obj.NativeHandle);
77    }
78    ///<summary>Verifies if the given object is equal to this one.</summary>
79    public override bool Equals(object obj)
80    {
81       var other = obj as Efl.Object;
82       if (other == null)
83          return false;
84       return this.NativeHandle == other.NativeHandle;
85    }
86    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
87    public override int GetHashCode()
88    {
89       return this.NativeHandle.ToInt32();
90    }
91    ///<summary>Turns the native pointer into a string representation.</summary>
92    public override String ToString()
93    {
94       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
95    }
96     void register_event_proxies()
97    {
98    }
99    /// <summary>Indicates whether a key modifier is on, such as Ctrl, Shift, ...</summary>
100    /// <param name="mod">The modifier key to test.</param>
101    /// <param name="seat">The seat device, may be <c>null</c></param>
102    /// <returns><c>true</c> if the key modifier is pressed.</returns>
103    public bool GetModifierEnabled( Efl.Input.Modifier mod,  Efl.Input.Device seat) {
104                                            var _ret_var = Efl.Input.StateNativeInherit.efl_input_modifier_enabled_get_ptr.Value.Delegate(this.NativeHandle, mod,  seat);
105       Eina.Error.RaiseIfUnhandledException();
106                               return _ret_var;
107  }
108    /// <summary>Indicates whether a key lock is on, such as NumLock, CapsLock, ...</summary>
109    /// <param name="kw_lock">The lock key to test.</param>
110    /// <param name="seat">The seat device, may be <c>null</c></param>
111    /// <returns><c>true</c> if the key lock is on.</returns>
112    public bool GetLockEnabled( Efl.Input.Lock kw_lock,  Efl.Input.Device seat) {
113                                            var _ret_var = Efl.Input.StateNativeInherit.efl_input_lock_enabled_get_ptr.Value.Delegate(this.NativeHandle, kw_lock,  seat);
114       Eina.Error.RaiseIfUnhandledException();
115                               return _ret_var;
116  }
117 }
118 public class StateNativeInherit  : Efl.Eo.NativeClass{
119    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
120    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
121    {
122       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
123       if (efl_input_modifier_enabled_get_static_delegate == null)
124       efl_input_modifier_enabled_get_static_delegate = new efl_input_modifier_enabled_get_delegate(modifier_enabled_get);
125       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)
127       efl_input_lock_enabled_get_static_delegate = new efl_input_lock_enabled_get_delegate(lock_enabled_get);
128       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)});
129       return descs;
130    }
131    public override IntPtr GetEflClass()
132    {
133       return Efl.Input.StateConcrete.efl_input_state_interface_get();
134    }
135    public static  IntPtr GetEflClassStatic()
136    {
137       return Efl.Input.StateConcrete.efl_input_state_interface_get();
138    }
139
140
141     [return: MarshalAs(UnmanagedType.U1)] 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.MarshalTest<Efl.Input.Device, Efl.Eo.NonOwnTag>))]  Efl.Input.Device seat);
142
143
144     [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_input_modifier_enabled_get_api_delegate(System.IntPtr obj,   Efl.Input.Modifier mod, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Input.Device, Efl.Eo.NonOwnTag>))]  Efl.Input.Device seat);
145     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");
146     private static bool modifier_enabled_get(System.IntPtr obj, System.IntPtr pd,  Efl.Input.Modifier mod,  Efl.Input.Device seat)
147    {
148       Eina.Log.Debug("function efl_input_modifier_enabled_get was called");
149       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
150       if(wrapper != null) {
151                                                       bool _ret_var = default(bool);
152          try {
153             _ret_var = ((State)wrapper).GetModifierEnabled( mod,  seat);
154          } catch (Exception e) {
155             Eina.Log.Warning($"Callback error: {e.ToString()}");
156             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
157          }
158                               return _ret_var;
159       } else {
160          return efl_input_modifier_enabled_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  mod,  seat);
161       }
162    }
163    private static efl_input_modifier_enabled_get_delegate efl_input_modifier_enabled_get_static_delegate;
164
165
166     [return: MarshalAs(UnmanagedType.U1)] 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.MarshalTest<Efl.Input.Device, Efl.Eo.NonOwnTag>))]  Efl.Input.Device seat);
167
168
169     [return: MarshalAs(UnmanagedType.U1)] 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.MarshalTest<Efl.Input.Device, Efl.Eo.NonOwnTag>))]  Efl.Input.Device seat);
170     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");
171     private static bool lock_enabled_get(System.IntPtr obj, System.IntPtr pd,  Efl.Input.Lock kw_lock,  Efl.Input.Device seat)
172    {
173       Eina.Log.Debug("function efl_input_lock_enabled_get was called");
174       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
175       if(wrapper != null) {
176                                                       bool _ret_var = default(bool);
177          try {
178             _ret_var = ((State)wrapper).GetLockEnabled( kw_lock,  seat);
179          } catch (Exception e) {
180             Eina.Log.Warning($"Callback error: {e.ToString()}");
181             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
182          }
183                               return _ret_var;
184       } else {
185          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);
186       }
187    }
188    private static efl_input_lock_enabled_get_delegate efl_input_lock_enabled_get_static_delegate;
189 }
190 } }