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 public new static System.IntPtr klass = System.IntPtr.Zero;
13 public new static Efl.Ui.Focus.UtilNativeInherit nativeInherit = new Efl.Ui.Focus.UtilNativeInherit();
14 ///<summary>Pointer to the native class description.</summary>
15 public override System.IntPtr NativeClass {
17 if (((object)this).GetType() == typeof (Util))
18 return Efl.Ui.Focus.UtilNativeInherit.GetEflClassStatic();
20 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
23 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
24 efl_ui_focus_util_class_get();
25 ///<summary>Creates a new instance.</summary>
26 ///<param name="parent">Parent instance.</param>
27 public Util(Efl.Object parent= null
29 base(efl_ui_focus_util_class_get(), typeof(Util), parent)
31 FinishInstantiation();
33 ///<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>
34 public Util(System.IntPtr raw) : base(raw)
36 register_event_proxies();
38 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
39 protected Util(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
40 ///<summary>Casts obj into an instance of this type.</summary>
41 public new static Util static_cast(Efl.Object obj)
44 throw new System.ArgumentNullException("obj");
45 return new Util(obj.NativeHandle);
47 ///<summary>Verifies if the given object is equal to this one.</summary>
48 public override bool Equals(object obj)
50 var other = obj as Efl.Object;
53 return this.NativeHandle == other.NativeHandle;
55 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
56 public override int GetHashCode()
58 return this.NativeHandle.ToInt32();
60 ///<summary>Turns the native pointer into a string representation.</summary>
61 public override String ToString()
63 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
65 protected override void register_event_proxies()
67 base.register_event_proxies();
69 /// <summary>Focus helper method</summary>
70 /// <param name="focus_elem">Focus element</param>
71 /// <returns></returns>
72 public static void Focus( Efl.Ui.Focus.Object focus_elem) {
73 Efl.Ui.Focus.UtilNativeInherit.efl_ui_focus_util_focus_ptr.Value.Delegate( focus_elem);
74 Eina.Error.RaiseIfUnhandledException();
76 /// <summary>Get the highest manager in the redirect property</summary>
77 /// <param name="manager"></param>
78 /// <returns></returns>
79 public static Efl.Ui.Focus.Manager ActiveManager( Efl.Ui.Focus.Manager manager) {
80 var _ret_var = Efl.Ui.Focus.UtilNativeInherit.efl_ui_focus_util_active_manager_ptr.Value.Delegate( manager);
81 Eina.Error.RaiseIfUnhandledException();
84 /// <summary></summary>
85 /// <param name="dir"></param>
86 /// <returns></returns>
87 public static Efl.Ui.Focus.Direction DirectionComplement( Efl.Ui.Focus.Direction dir) {
88 var _ret_var = Efl.Ui.Focus.UtilNativeInherit.efl_ui_focus_util_direction_complement_ptr.Value.Delegate( dir);
89 Eina.Error.RaiseIfUnhandledException();
92 private static new IntPtr GetEflClassStatic()
94 return Efl.Ui.Focus.Util.efl_ui_focus_util_class_get();
97 public class UtilNativeInherit : Efl.ObjectNativeInherit{
98 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
99 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
101 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
102 descs.AddRange(base.GetEoOps(type));
105 public override IntPtr GetEflClass()
107 return Efl.Ui.Focus.Util.efl_ui_focus_util_class_get();
109 public static new IntPtr GetEflClassStatic()
111 return Efl.Ui.Focus.Util.efl_ui_focus_util_class_get();
115 private delegate void efl_ui_focus_util_focus_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.ObjectConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.Object focus_elem);
118 public delegate void efl_ui_focus_util_focus_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.ObjectConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.Object focus_elem);
119 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");
120 private static void focus(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Focus.Object focus_elem)
122 Eina.Log.Debug("function efl_ui_focus_util_focus was called");
123 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
124 if(wrapper != null) {
127 Util.Focus( focus_elem);
128 } catch (Exception e) {
129 Eina.Log.Warning($"Callback error: {e.ToString()}");
130 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
133 efl_ui_focus_util_focus_ptr.Value.Delegate( focus_elem);
138 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.ManagerConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Ui.Focus.Manager efl_ui_focus_util_active_manager_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.ManagerConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.Manager manager);
141 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.ManagerConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Ui.Focus.Manager efl_ui_focus_util_active_manager_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.Focus.ManagerConcrete, Efl.Eo.NonOwnTag>))] Efl.Ui.Focus.Manager manager);
142 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");
143 private static Efl.Ui.Focus.Manager active_manager(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Focus.Manager manager)
145 Eina.Log.Debug("function efl_ui_focus_util_active_manager was called");
146 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
147 if(wrapper != null) {
148 Efl.Ui.Focus.Manager _ret_var = default(Efl.Ui.Focus.Manager);
150 _ret_var = Util.ActiveManager( manager);
151 } catch (Exception e) {
152 Eina.Log.Warning($"Callback error: {e.ToString()}");
153 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
157 return efl_ui_focus_util_active_manager_ptr.Value.Delegate( manager);
162 private delegate Efl.Ui.Focus.Direction efl_ui_focus_util_direction_complement_delegate( Efl.Ui.Focus.Direction dir);
165 public delegate Efl.Ui.Focus.Direction efl_ui_focus_util_direction_complement_api_delegate( Efl.Ui.Focus.Direction dir);
166 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");
167 private static Efl.Ui.Focus.Direction direction_complement(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Focus.Direction dir)
169 Eina.Log.Debug("function efl_ui_focus_util_direction_complement was called");
170 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
171 if(wrapper != null) {
172 Efl.Ui.Focus.Direction _ret_var = default(Efl.Ui.Focus.Direction);
174 _ret_var = Util.DirectionComplement( dir);
175 } catch (Exception e) {
176 Eina.Log.Warning($"Callback error: {e.ToString()}");
177 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
181 return efl_ui_focus_util_direction_complement_ptr.Value.Delegate( dir);