#pragma warning disable CS1591
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
namespace Efl { namespace Input {
/// Efl input state interface
[StateNativeInherit]
public interface State :
Efl.Eo.IWrapper, IDisposable
{
/// Indicates whether a key modifier is on, such as Ctrl, Shift, ...
/// The modifier key to test.
/// The seat device, may be null
/// true if the key modifier is pressed.
bool GetModifierEnabled( Efl.Input.Modifier mod, Efl.Input.Device seat);
/// Indicates whether a key lock is on, such as NumLock, CapsLock, ...
/// The lock key to test.
/// The seat device, may be null
/// true if the key lock is on.
bool GetLockEnabled( Efl.Input.Lock kw_lock, Efl.Input.Device seat);
}
/// Efl input state interface
sealed public class StateConcrete :
State
{
///Pointer to the native class description.
public System.IntPtr NativeClass {
get {
if (((object)this).GetType() == typeof (StateConcrete))
return Efl.Input.StateNativeInherit.GetEflClassStatic();
else
return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
}
}
private System.IntPtr handle;
///Pointer to the native instance.
public System.IntPtr NativeHandle {
get { return handle; }
}
[System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
efl_input_state_interface_get();
///Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
public StateConcrete(System.IntPtr raw)
{
handle = raw;
register_event_proxies();
}
///Destructor.
~StateConcrete()
{
Dispose(false);
}
///Releases the underlying native instance.
void Dispose(bool disposing)
{
if (handle != System.IntPtr.Zero) {
Efl.Eo.Globals.efl_unref(handle);
handle = System.IntPtr.Zero;
}
}
///Releases the underlying native instance.
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
///Casts obj into an instance of this type.
public static StateConcrete static_cast(Efl.Object obj)
{
if (obj == null)
throw new System.ArgumentNullException("obj");
return new StateConcrete(obj.NativeHandle);
}
///Verifies if the given object is equal to this one.
public override bool Equals(object obj)
{
var other = obj as Efl.Object;
if (other == null)
return false;
return this.NativeHandle == other.NativeHandle;
}
///Gets the hash code for this object based on the native pointer it points to.
public override int GetHashCode()
{
return this.NativeHandle.ToInt32();
}
///Turns the native pointer into a string representation.
public override String ToString()
{
return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
}
void register_event_proxies()
{
}
/// Indicates whether a key modifier is on, such as Ctrl, Shift, ...
/// The modifier key to test.
/// The seat device, may be null
/// true if the key modifier is pressed.
public bool GetModifierEnabled( Efl.Input.Modifier mod, Efl.Input.Device seat) {
var _ret_var = Efl.Input.StateNativeInherit.efl_input_modifier_enabled_get_ptr.Value.Delegate(this.NativeHandle, mod, seat);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Indicates whether a key lock is on, such as NumLock, CapsLock, ...
/// The lock key to test.
/// The seat device, may be null
/// true if the key lock is on.
public bool GetLockEnabled( Efl.Input.Lock kw_lock, Efl.Input.Device seat) {
var _ret_var = Efl.Input.StateNativeInherit.efl_input_lock_enabled_get_ptr.Value.Delegate(this.NativeHandle, kw_lock, seat);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
}
public class StateNativeInherit : Efl.Eo.NativeClass{
public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
public override System.Collections.Generic.List GetEoOps(System.Type type)
{
var descs = new System.Collections.Generic.List();
if (efl_input_modifier_enabled_get_static_delegate == null)
efl_input_modifier_enabled_get_static_delegate = new efl_input_modifier_enabled_get_delegate(modifier_enabled_get);
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)});
if (efl_input_lock_enabled_get_static_delegate == null)
efl_input_lock_enabled_get_static_delegate = new efl_input_lock_enabled_get_delegate(lock_enabled_get);
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)});
return descs;
}
public override IntPtr GetEflClass()
{
return Efl.Input.StateConcrete.efl_input_state_interface_get();
}
public static IntPtr GetEflClassStatic()
{
return Efl.Input.StateConcrete.efl_input_state_interface_get();
}
[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 seat);
[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 seat);
public static Efl.Eo.FunctionWrapper efl_input_modifier_enabled_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_input_modifier_enabled_get");
private static bool modifier_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Modifier mod, Efl.Input.Device seat)
{
Eina.Log.Debug("function efl_input_modifier_enabled_get was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
bool _ret_var = default(bool);
try {
_ret_var = ((State)wrapper).GetModifierEnabled( mod, seat);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
} else {
return efl_input_modifier_enabled_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), mod, seat);
}
}
private static efl_input_modifier_enabled_get_delegate efl_input_modifier_enabled_get_static_delegate;
[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 seat);
[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 seat);
public static Efl.Eo.FunctionWrapper efl_input_lock_enabled_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_input_lock_enabled_get");
private static bool lock_enabled_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Lock kw_lock, Efl.Input.Device seat)
{
Eina.Log.Debug("function efl_input_lock_enabled_get was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
bool _ret_var = default(bool);
try {
_ret_var = ((State)wrapper).GetLockEnabled( kw_lock, seat);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
} else {
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);
}
}
private static efl_input_lock_enabled_get_delegate efl_input_lock_enabled_get_static_delegate;
}
} }