1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { namespace Focus {
8 /// <summary>EFL UI Focus Util class</summary>
10 public class Util : Efl.Object, Efl.Eo.IWrapper
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (Util))
16 return Efl.Ui.Focus.UtilNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
22 efl_ui_focus_util_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public Util(Efl.Object parent= null
27 base(efl_ui_focus_util_class_get(), typeof(Util), parent)
29 FinishInstantiation();
31 ///<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>
32 protected Util(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37 protected Util(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38 ///<summary>Verifies if the given object is equal to this one.</summary>
39 public override bool Equals(object obj)
41 var other = obj as Efl.Object;
44 return this.NativeHandle == other.NativeHandle;
46 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47 public override int GetHashCode()
49 return this.NativeHandle.ToInt32();
51 ///<summary>Turns the native pointer into a string representation.</summary>
52 public override String ToString()
54 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
56 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
57 protected override void RegisterEventProxies()
59 base.RegisterEventProxies();
61 /// <summary>Focus helper method</summary>
62 /// <param name="focus_elem">Focus element</param>
63 /// <returns></returns>
64 public static void Focus( Efl.Ui.Focus.IObject focus_elem) {
65 Efl.Ui.Focus.UtilNativeInherit.efl_ui_focus_util_focus_ptr.Value.Delegate( focus_elem);
66 Eina.Error.RaiseIfUnhandledException();
68 /// <summary>Get the highest manager in the redirect property</summary>
69 /// <param name="manager"></param>
70 /// <returns></returns>
71 public static Efl.Ui.Focus.IManager ActiveManager( Efl.Ui.Focus.IManager manager) {
72 var _ret_var = Efl.Ui.Focus.UtilNativeInherit.efl_ui_focus_util_active_manager_ptr.Value.Delegate( manager);
73 Eina.Error.RaiseIfUnhandledException();
76 /// <summary></summary>
77 /// <param name="dir"></param>
78 /// <returns></returns>
79 public static Efl.Ui.Focus.Direction DirectionComplement( Efl.Ui.Focus.Direction dir) {
80 var _ret_var = Efl.Ui.Focus.UtilNativeInherit.efl_ui_focus_util_direction_complement_ptr.Value.Delegate( dir);
81 Eina.Error.RaiseIfUnhandledException();
84 private static IntPtr GetEflClassStatic()
86 return Efl.Ui.Focus.Util.efl_ui_focus_util_class_get();
89 public class UtilNativeInherit : Efl.ObjectNativeInherit{
90 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
91 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
93 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
94 var methods = Efl.Eo.Globals.GetUserMethods(type);
95 descs.AddRange(base.GetEoOps(type));
98 public override IntPtr GetEflClass()
100 return Efl.Ui.Focus.Util.efl_ui_focus_util_class_get();
102 public static new IntPtr GetEflClassStatic()
104 return Efl.Ui.Focus.Util.efl_ui_focus_util_class_get();
108 private delegate void efl_ui_focus_util_focus_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.IObjectConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.IObject focus_elem);
111 public delegate void efl_ui_focus_util_focus_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.IObjectConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.IObject focus_elem);
112 public static Efl.Eo.FunctionWrapper<efl_ui_focus_util_focus_api_delegate> efl_ui_focus_util_focus_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_util_focus_api_delegate>(_Module, "efl_ui_focus_util_focus");
113 private static void focus(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Focus.IObject focus_elem)
115 Eina.Log.Debug("function efl_ui_focus_util_focus was called");
116 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
117 if(wrapper != null) {
120 Util.Focus( focus_elem);
121 } catch (Exception e) {
122 Eina.Log.Warning($"Callback error: {e.ToString()}");
123 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
126 efl_ui_focus_util_focus_ptr.Value.Delegate( focus_elem);
131 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.IManagerConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Ui.Focus.IManager efl_ui_focus_util_active_manager_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.IManagerConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.IManager manager);
134 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.IManagerConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Ui.Focus.IManager efl_ui_focus_util_active_manager_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.IManagerConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.IManager manager);
135 public static Efl.Eo.FunctionWrapper<efl_ui_focus_util_active_manager_api_delegate> efl_ui_focus_util_active_manager_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_util_active_manager_api_delegate>(_Module, "efl_ui_focus_util_active_manager");
136 private static Efl.Ui.Focus.IManager active_manager(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Focus.IManager manager)
138 Eina.Log.Debug("function efl_ui_focus_util_active_manager was called");
139 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
140 if(wrapper != null) {
141 Efl.Ui.Focus.IManager _ret_var = default(Efl.Ui.Focus.IManager);
143 _ret_var = Util.ActiveManager( manager);
144 } catch (Exception e) {
145 Eina.Log.Warning($"Callback error: {e.ToString()}");
146 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
150 return efl_ui_focus_util_active_manager_ptr.Value.Delegate( manager);
155 private delegate Efl.Ui.Focus.Direction efl_ui_focus_util_direction_complement_delegate( Efl.Ui.Focus.Direction dir);
158 public delegate Efl.Ui.Focus.Direction efl_ui_focus_util_direction_complement_api_delegate( Efl.Ui.Focus.Direction dir);
159 public static Efl.Eo.FunctionWrapper<efl_ui_focus_util_direction_complement_api_delegate> efl_ui_focus_util_direction_complement_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_util_direction_complement_api_delegate>(_Module, "efl_ui_focus_util_direction_complement");
160 private static Efl.Ui.Focus.Direction direction_complement(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Focus.Direction dir)
162 Eina.Log.Debug("function efl_ui_focus_util_direction_complement was called");
163 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
164 if(wrapper != null) {
165 Efl.Ui.Focus.Direction _ret_var = default(Efl.Ui.Focus.Direction);
167 _ret_var = Util.DirectionComplement( dir);
168 } catch (Exception e) {
169 Eina.Log.Warning($"Callback error: {e.ToString()}");
170 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
174 return efl_ui_focus_util_direction_complement_ptr.Value.Delegate( dir);