2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 /// <summary>Efl Gfx Size Class interface</summary>
14 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
15 [Efl.Gfx.ISizeClassConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface ISizeClass :
18 Efl.Eo.IWrapper, IDisposable
20 /// <summary>Get width and height of size class.
21 /// This function gets width and height for a size class. These values will only be valid until the size class is changed or the edje object is deleted.</summary>
22 /// <param name="size_class">The name of size class</param>
23 /// <param name="minw">minimum width</param>
24 /// <param name="minh">minimum height</param>
25 /// <param name="maxw">maximum width</param>
26 /// <param name="maxh">maximum height</param>
27 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
28 bool GetSizeClass(System.String size_class, out int minw, out int minh, out int maxw, out int maxh);
29 /// <summary>Set width and height of size class.
30 /// This function sets width and height for a size class. This will make all edje parts in the specified object that have the specified size class update their size with given values.</summary>
31 /// <param name="size_class">The name of size class</param>
32 /// <param name="minw">minimum width</param>
33 /// <param name="minh">minimum height</param>
34 /// <param name="maxw">maximum width</param>
35 /// <param name="maxh">maximum height</param>
36 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
37 bool SetSizeClass(System.String size_class, int minw, int minh, int maxw, int maxh);
38 /// <summary>Delete the size class.
39 /// This function deletes any values for the specified size class.
41 /// Deleting the size class will revert it to the values defined by <see cref="Efl.Gfx.ISizeClass.GetSizeClass"/> or the size class defined in the theme file.</summary>
42 /// <param name="size_class">The size class to be deleted.</param>
43 void DelSizeClass(System.String size_class);
45 /// <summary>Efl Gfx Size Class interface</summary>
46 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
47 sealed public class ISizeClassConcrete :
52 /// <summary>Pointer to the native class description.</summary>
53 public override System.IntPtr NativeClass
57 if (((object)this).GetType() == typeof(ISizeClassConcrete))
59 return GetEflClassStatic();
63 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
68 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
69 /// Do not call this constructor directly.</summary>
70 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
71 private ISizeClassConcrete(ConstructingHandle ch) : base(ch)
75 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
76 efl_gfx_size_class_interface_get();
77 /// <summary>Initializes a new instance of the <see cref="ISizeClass"/> class.
78 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
79 /// <param name="wh">The native pointer to be wrapped.</param>
80 private ISizeClassConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
84 /// <summary>Get width and height of size class.
85 /// This function gets width and height for a size class. These values will only be valid until the size class is changed or the edje object is deleted.</summary>
86 /// <param name="size_class">The name of size class</param>
87 /// <param name="minw">minimum width</param>
88 /// <param name="minh">minimum height</param>
89 /// <param name="maxw">maximum width</param>
90 /// <param name="maxh">maximum height</param>
91 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
92 public bool GetSizeClass(System.String size_class, out int minw, out int minh, out int maxw, out int maxh) {
93 var _ret_var = Efl.Gfx.ISizeClassConcrete.NativeMethods.efl_gfx_size_class_get_ptr.Value.Delegate(this.NativeHandle,size_class, out minw, out minh, out maxw, out maxh);
94 Eina.Error.RaiseIfUnhandledException();
97 /// <summary>Set width and height of size class.
98 /// This function sets width and height for a size class. This will make all edje parts in the specified object that have the specified size class update their size with given values.</summary>
99 /// <param name="size_class">The name of size class</param>
100 /// <param name="minw">minimum width</param>
101 /// <param name="minh">minimum height</param>
102 /// <param name="maxw">maximum width</param>
103 /// <param name="maxh">maximum height</param>
104 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
105 public bool SetSizeClass(System.String size_class, int minw, int minh, int maxw, int maxh) {
106 var _ret_var = Efl.Gfx.ISizeClassConcrete.NativeMethods.efl_gfx_size_class_set_ptr.Value.Delegate(this.NativeHandle,size_class, minw, minh, maxw, maxh);
107 Eina.Error.RaiseIfUnhandledException();
110 /// <summary>Delete the size class.
111 /// This function deletes any values for the specified size class.
113 /// Deleting the size class will revert it to the values defined by <see cref="Efl.Gfx.ISizeClass.GetSizeClass"/> or the size class defined in the theme file.</summary>
114 /// <param name="size_class">The size class to be deleted.</param>
115 public void DelSizeClass(System.String size_class) {
116 Efl.Gfx.ISizeClassConcrete.NativeMethods.efl_gfx_size_class_del_ptr.Value.Delegate(this.NativeHandle,size_class);
117 Eina.Error.RaiseIfUnhandledException();
119 private static IntPtr GetEflClassStatic()
121 return Efl.Gfx.ISizeClassConcrete.efl_gfx_size_class_interface_get();
123 /// <summary>Wrapper for native methods and virtual method delegates.
124 /// For internal use by generated code only.</summary>
125 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
127 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
128 /// <summary>Gets the list of Eo operations to override.</summary>
129 /// <returns>The list of Eo operations to be overload.</returns>
130 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
132 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
133 var methods = Efl.Eo.Globals.GetUserMethods(type);
135 if (efl_gfx_size_class_get_static_delegate == null)
137 efl_gfx_size_class_get_static_delegate = new efl_gfx_size_class_get_delegate(size_class_get);
140 if (methods.FirstOrDefault(m => m.Name == "GetSizeClass") != null)
142 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_size_class_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_size_class_get_static_delegate) });
145 if (efl_gfx_size_class_set_static_delegate == null)
147 efl_gfx_size_class_set_static_delegate = new efl_gfx_size_class_set_delegate(size_class_set);
150 if (methods.FirstOrDefault(m => m.Name == "SetSizeClass") != null)
152 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_size_class_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_size_class_set_static_delegate) });
155 if (efl_gfx_size_class_del_static_delegate == null)
157 efl_gfx_size_class_del_static_delegate = new efl_gfx_size_class_del_delegate(size_class_del);
160 if (methods.FirstOrDefault(m => m.Name == "DelSizeClass") != null)
162 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_size_class_del"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_size_class_del_static_delegate) });
167 /// <summary>Returns the Eo class for the native methods of this class.</summary>
168 /// <returns>The native class pointer.</returns>
169 public override IntPtr GetEflClass()
171 return Efl.Gfx.ISizeClassConcrete.efl_gfx_size_class_interface_get();
174 #pragma warning disable CA1707, CS1591, SA1300, SA1600
176 [return: MarshalAs(UnmanagedType.U1)]
177 private delegate bool efl_gfx_size_class_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String size_class, out int minw, out int minh, out int maxw, out int maxh);
179 [return: MarshalAs(UnmanagedType.U1)]
180 public delegate bool efl_gfx_size_class_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String size_class, out int minw, out int minh, out int maxw, out int maxh);
182 public static Efl.Eo.FunctionWrapper<efl_gfx_size_class_get_api_delegate> efl_gfx_size_class_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_size_class_get_api_delegate>(Module, "efl_gfx_size_class_get");
184 private static bool size_class_get(System.IntPtr obj, System.IntPtr pd, System.String size_class, out int minw, out int minh, out int maxw, out int maxh)
186 Eina.Log.Debug("function efl_gfx_size_class_get was called");
187 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
190 minw = default(int); minh = default(int); maxw = default(int); maxh = default(int); bool _ret_var = default(bool);
193 _ret_var = ((ISizeClass)ws.Target).GetSizeClass(size_class, out minw, out minh, out maxw, out maxh);
197 Eina.Log.Warning($"Callback error: {e.ToString()}");
198 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
206 return efl_gfx_size_class_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), size_class, out minw, out minh, out maxw, out maxh);
210 private static efl_gfx_size_class_get_delegate efl_gfx_size_class_get_static_delegate;
212 [return: MarshalAs(UnmanagedType.U1)]
213 private delegate bool efl_gfx_size_class_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String size_class, int minw, int minh, int maxw, int maxh);
215 [return: MarshalAs(UnmanagedType.U1)]
216 public delegate bool efl_gfx_size_class_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String size_class, int minw, int minh, int maxw, int maxh);
218 public static Efl.Eo.FunctionWrapper<efl_gfx_size_class_set_api_delegate> efl_gfx_size_class_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_size_class_set_api_delegate>(Module, "efl_gfx_size_class_set");
220 private static bool size_class_set(System.IntPtr obj, System.IntPtr pd, System.String size_class, int minw, int minh, int maxw, int maxh)
222 Eina.Log.Debug("function efl_gfx_size_class_set was called");
223 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
226 bool _ret_var = default(bool);
229 _ret_var = ((ISizeClass)ws.Target).SetSizeClass(size_class, minw, minh, maxw, maxh);
233 Eina.Log.Warning($"Callback error: {e.ToString()}");
234 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
242 return efl_gfx_size_class_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), size_class, minw, minh, maxw, maxh);
246 private static efl_gfx_size_class_set_delegate efl_gfx_size_class_set_static_delegate;
249 private delegate void efl_gfx_size_class_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String size_class);
252 public delegate void efl_gfx_size_class_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String size_class);
254 public static Efl.Eo.FunctionWrapper<efl_gfx_size_class_del_api_delegate> efl_gfx_size_class_del_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_size_class_del_api_delegate>(Module, "efl_gfx_size_class_del");
256 private static void size_class_del(System.IntPtr obj, System.IntPtr pd, System.String size_class)
258 Eina.Log.Debug("function efl_gfx_size_class_del was called");
259 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
265 ((ISizeClass)ws.Target).DelSizeClass(size_class);
269 Eina.Log.Warning($"Callback error: {e.ToString()}");
270 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
277 efl_gfx_size_class_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), size_class);
281 private static efl_gfx_size_class_del_delegate efl_gfx_size_class_del_static_delegate;
283 #pragma warning restore CA1707, CS1591, SA1300, SA1600
292 #pragma warning disable CS1591
293 public static class Efl_GfxISizeClassConcrete_ExtensionMethods {
296 #pragma warning restore CS1591