1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>Tab_Page internal part class</summary>
9 [TabPagePartTabNativeInherit]
10 public class TabPagePartTab : Efl.Ui.LayoutPart, Efl.Eo.IWrapper,Efl.IText
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (TabPagePartTab))
16 return Efl.Ui.TabPagePartTabNativeInherit.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_tab_page_part_tab_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public TabPagePartTab(Efl.Object parent= null
27 base(efl_ui_tab_page_part_tab_class_get(), typeof(TabPagePartTab), 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 TabPagePartTab(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 TabPagePartTab(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></summary>
62 /// <returns></returns>
63 virtual public System.String GetIcon() {
64 var _ret_var = Efl.Ui.TabPagePartTabNativeInherit.efl_ui_tab_page_part_tab_icon_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
65 Eina.Error.RaiseIfUnhandledException();
68 /// <summary></summary>
69 /// <param name="path"></param>
70 /// <returns></returns>
71 virtual public void SetIcon( System.String path) {
72 Efl.Ui.TabPagePartTabNativeInherit.efl_ui_tab_page_part_tab_icon_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), path);
73 Eina.Error.RaiseIfUnhandledException();
75 /// <summary>Retrieves the text string currently being displayed by the given text object.
76 /// Do not free() the return value.
78 /// See also <see cref="Efl.IText.GetText"/>.
79 /// (Since EFL 1.22)</summary>
80 /// <returns>Text string to display on it.</returns>
81 virtual public System.String GetText() {
82 var _ret_var = Efl.ITextNativeInherit.efl_text_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
83 Eina.Error.RaiseIfUnhandledException();
86 /// <summary>Sets the text string to be displayed by the given text object.
87 /// See also <see cref="Efl.IText.GetText"/>.
88 /// (Since EFL 1.22)</summary>
89 /// <param name="text">Text string to display on it.</param>
90 /// <returns></returns>
91 virtual public void SetText( System.String text) {
92 Efl.ITextNativeInherit.efl_text_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), text);
93 Eina.Error.RaiseIfUnhandledException();
95 /// <summary></summary>
97 public System.String Icon {
98 get { return GetIcon(); }
99 set { SetIcon( value); }
101 private static IntPtr GetEflClassStatic()
103 return Efl.Ui.TabPagePartTab.efl_ui_tab_page_part_tab_class_get();
106 public class TabPagePartTabNativeInherit : Efl.Ui.LayoutPartNativeInherit{
107 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
108 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
110 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
111 var methods = Efl.Eo.Globals.GetUserMethods(type);
112 if (efl_ui_tab_page_part_tab_icon_get_static_delegate == null)
113 efl_ui_tab_page_part_tab_icon_get_static_delegate = new efl_ui_tab_page_part_tab_icon_get_delegate(icon_get);
114 if (methods.FirstOrDefault(m => m.Name == "GetIcon") != null)
115 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_tab_page_part_tab_icon_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_page_part_tab_icon_get_static_delegate)});
116 if (efl_ui_tab_page_part_tab_icon_set_static_delegate == null)
117 efl_ui_tab_page_part_tab_icon_set_static_delegate = new efl_ui_tab_page_part_tab_icon_set_delegate(icon_set);
118 if (methods.FirstOrDefault(m => m.Name == "SetIcon") != null)
119 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_tab_page_part_tab_icon_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_page_part_tab_icon_set_static_delegate)});
120 if (efl_text_get_static_delegate == null)
121 efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
122 if (methods.FirstOrDefault(m => m.Name == "GetText") != null)
123 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_get_static_delegate)});
124 if (efl_text_set_static_delegate == null)
125 efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
126 if (methods.FirstOrDefault(m => m.Name == "SetText") != null)
127 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_set_static_delegate)});
128 descs.AddRange(base.GetEoOps(type));
131 public override IntPtr GetEflClass()
133 return Efl.Ui.TabPagePartTab.efl_ui_tab_page_part_tab_class_get();
135 public static new IntPtr GetEflClassStatic()
137 return Efl.Ui.TabPagePartTab.efl_ui_tab_page_part_tab_class_get();
141 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_ui_tab_page_part_tab_icon_get_delegate(System.IntPtr obj, System.IntPtr pd);
144 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_ui_tab_page_part_tab_icon_get_api_delegate(System.IntPtr obj);
145 public static Efl.Eo.FunctionWrapper<efl_ui_tab_page_part_tab_icon_get_api_delegate> efl_ui_tab_page_part_tab_icon_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_tab_page_part_tab_icon_get_api_delegate>(_Module, "efl_ui_tab_page_part_tab_icon_get");
146 private static System.String icon_get(System.IntPtr obj, System.IntPtr pd)
148 Eina.Log.Debug("function efl_ui_tab_page_part_tab_icon_get was called");
149 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
150 if(wrapper != null) {
151 System.String _ret_var = default(System.String);
153 _ret_var = ((TabPagePartTab)wrapper).GetIcon();
154 } catch (Exception e) {
155 Eina.Log.Warning($"Callback error: {e.ToString()}");
156 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
160 return efl_ui_tab_page_part_tab_icon_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
163 private static efl_ui_tab_page_part_tab_icon_get_delegate efl_ui_tab_page_part_tab_icon_get_static_delegate;
166 private delegate void efl_ui_tab_page_part_tab_icon_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String path);
169 public delegate void efl_ui_tab_page_part_tab_icon_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String path);
170 public static Efl.Eo.FunctionWrapper<efl_ui_tab_page_part_tab_icon_set_api_delegate> efl_ui_tab_page_part_tab_icon_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_tab_page_part_tab_icon_set_api_delegate>(_Module, "efl_ui_tab_page_part_tab_icon_set");
171 private static void icon_set(System.IntPtr obj, System.IntPtr pd, System.String path)
173 Eina.Log.Debug("function efl_ui_tab_page_part_tab_icon_set was called");
174 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
175 if(wrapper != null) {
178 ((TabPagePartTab)wrapper).SetIcon( path);
179 } catch (Exception e) {
180 Eina.Log.Warning($"Callback error: {e.ToString()}");
181 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
184 efl_ui_tab_page_part_tab_icon_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), path);
187 private static efl_ui_tab_page_part_tab_icon_set_delegate efl_ui_tab_page_part_tab_icon_set_static_delegate;
190 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd);
193 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_text_get_api_delegate(System.IntPtr obj);
194 public static Efl.Eo.FunctionWrapper<efl_text_get_api_delegate> efl_text_get_ptr = new Efl.Eo.FunctionWrapper<efl_text_get_api_delegate>(_Module, "efl_text_get");
195 private static System.String text_get(System.IntPtr obj, System.IntPtr pd)
197 Eina.Log.Debug("function efl_text_get was called");
198 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
199 if(wrapper != null) {
200 System.String _ret_var = default(System.String);
202 _ret_var = ((TabPagePartTab)wrapper).GetText();
203 } catch (Exception e) {
204 Eina.Log.Warning($"Callback error: {e.ToString()}");
205 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
209 return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
212 private static efl_text_get_delegate efl_text_get_static_delegate;
215 private delegate void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
218 public delegate void efl_text_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
219 public static Efl.Eo.FunctionWrapper<efl_text_set_api_delegate> efl_text_set_ptr = new Efl.Eo.FunctionWrapper<efl_text_set_api_delegate>(_Module, "efl_text_set");
220 private static void text_set(System.IntPtr obj, System.IntPtr pd, System.String text)
222 Eina.Log.Debug("function efl_text_set was called");
223 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
224 if(wrapper != null) {
227 ((TabPagePartTab)wrapper).SetText( text);
228 } catch (Exception e) {
229 Eina.Log.Warning($"Callback error: {e.ToString()}");
230 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
233 efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), text);
236 private static efl_text_set_delegate efl_text_set_static_delegate;