1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>APIs representing static data from a group in an edje file.
13 /// (Since EFL 1.22)</summary>
14 [Efl.Layout.IGroupConcrete.NativeMethods]
15 [Efl.Eo.BindingEntity]
16 public interface IGroup :
17 Efl.Eo.IWrapper, IDisposable
19 /// <summary>Gets the minimum size specified -- as an EDC property -- for a given Edje object
20 /// This function retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
22 /// Note: If the <c>min</c> EDC property was not declared for this object, this call will return 0x0.
24 /// Note: On failure, this function also return 0x0.
26 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMax"/>.
27 /// (Since EFL 1.22)</summary>
28 /// <returns>The minimum size as set in EDC.</returns>
29 Eina.Size2D GetGroupSizeMin();
30 /// <summary>Gets the maximum size specified -- as an EDC property -- for a given Edje object
31 /// This function retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
33 /// Note: If the <c>max</c> EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.
35 /// Note: On failure, this function will return 0x0.
37 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMin"/>.
38 /// (Since EFL 1.22)</summary>
39 /// <returns>The maximum size as set in EDC.</returns>
40 Eina.Size2D GetGroupSizeMax();
41 /// <summary>Retrives an EDC data field's value from a given Edje object's group.
42 /// This function fetches an EDC data field's value, which is declared on the objects building EDC file, under its group. EDC data blocks are most commonly used to pass arbitrary parameters from an application's theme to its code.
44 /// EDC data fields always hold strings as values, hence the return type of this function. Check the complete "syntax reference" for EDC files.
46 /// This is how a data item is defined in EDC: collections { group { name: "a_group"; data { item: "key1" "value1"; item: "key2" "value2"; } } }
48 /// Warning: Do not confuse this call with edje_file_data_get(), which queries for a global EDC data field on an EDC declaration file.
49 /// (Since EFL 1.22)</summary>
50 /// <param name="key">The data field's key string</param>
51 /// <returns>The data's value string.</returns>
52 System.String GetGroupData(System.String key);
53 /// <summary>Returns <c>true</c> if the part exists in the EDC group.
54 /// (Since EFL 1.22)</summary>
55 /// <param name="part">The part name to check.</param>
56 /// <returns><c>true</c> if the part exists, <c>false</c> otherwise.</returns>
57 bool GetPartExist(System.String part);
58 /// <summary>Gets the minimum size specified -- as an EDC property -- for a given Edje object
59 /// This function retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
61 /// Note: If the <c>min</c> EDC property was not declared for this object, this call will return 0x0.
63 /// Note: On failure, this function also return 0x0.
65 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMax"/>.
66 /// (Since EFL 1.22)</summary>
67 /// <value>The minimum size as set in EDC.</value>
68 Eina.Size2D GroupSizeMin {
71 /// <summary>Gets the maximum size specified -- as an EDC property -- for a given Edje object
72 /// This function retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
74 /// Note: If the <c>max</c> EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.
76 /// Note: On failure, this function will return 0x0.
78 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMin"/>.
79 /// (Since EFL 1.22)</summary>
80 /// <value>The maximum size as set in EDC.</value>
81 Eina.Size2D GroupSizeMax {
85 /// <summary>APIs representing static data from a group in an edje file.
86 /// (Since EFL 1.22)</summary>
87 sealed public class IGroupConcrete :
92 ///<summary>Pointer to the native class description.</summary>
93 public override System.IntPtr NativeClass
97 if (((object)this).GetType() == typeof(IGroupConcrete))
99 return GetEflClassStatic();
103 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
108 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
109 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
110 private IGroupConcrete(ConstructingHandle ch) : base(ch)
114 [System.Runtime.InteropServices.DllImport(efl.Libs.Edje)] internal static extern System.IntPtr
115 efl_layout_group_interface_get();
116 /// <summary>Initializes a new instance of the <see cref="IGroup"/> class.
117 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
118 /// <param name="wh">The native pointer to be wrapped.</param>
119 private IGroupConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
123 /// <summary>Gets the minimum size specified -- as an EDC property -- for a given Edje object
124 /// This function retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
126 /// Note: If the <c>min</c> EDC property was not declared for this object, this call will return 0x0.
128 /// Note: On failure, this function also return 0x0.
130 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMax"/>.
131 /// (Since EFL 1.22)</summary>
132 /// <returns>The minimum size as set in EDC.</returns>
133 public Eina.Size2D GetGroupSizeMin() {
134 var _ret_var = Efl.Layout.IGroupConcrete.NativeMethods.efl_layout_group_size_min_get_ptr.Value.Delegate(this.NativeHandle);
135 Eina.Error.RaiseIfUnhandledException();
138 /// <summary>Gets the maximum size specified -- as an EDC property -- for a given Edje object
139 /// This function retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
141 /// Note: If the <c>max</c> EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.
143 /// Note: On failure, this function will return 0x0.
145 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMin"/>.
146 /// (Since EFL 1.22)</summary>
147 /// <returns>The maximum size as set in EDC.</returns>
148 public Eina.Size2D GetGroupSizeMax() {
149 var _ret_var = Efl.Layout.IGroupConcrete.NativeMethods.efl_layout_group_size_max_get_ptr.Value.Delegate(this.NativeHandle);
150 Eina.Error.RaiseIfUnhandledException();
153 /// <summary>Retrives an EDC data field's value from a given Edje object's group.
154 /// This function fetches an EDC data field's value, which is declared on the objects building EDC file, under its group. EDC data blocks are most commonly used to pass arbitrary parameters from an application's theme to its code.
156 /// EDC data fields always hold strings as values, hence the return type of this function. Check the complete "syntax reference" for EDC files.
158 /// This is how a data item is defined in EDC: collections { group { name: "a_group"; data { item: "key1" "value1"; item: "key2" "value2"; } } }
160 /// Warning: Do not confuse this call with edje_file_data_get(), which queries for a global EDC data field on an EDC declaration file.
161 /// (Since EFL 1.22)</summary>
162 /// <param name="key">The data field's key string</param>
163 /// <returns>The data's value string.</returns>
164 public System.String GetGroupData(System.String key) {
165 var _ret_var = Efl.Layout.IGroupConcrete.NativeMethods.efl_layout_group_data_get_ptr.Value.Delegate(this.NativeHandle,key);
166 Eina.Error.RaiseIfUnhandledException();
169 /// <summary>Returns <c>true</c> if the part exists in the EDC group.
170 /// (Since EFL 1.22)</summary>
171 /// <param name="part">The part name to check.</param>
172 /// <returns><c>true</c> if the part exists, <c>false</c> otherwise.</returns>
173 public bool GetPartExist(System.String part) {
174 var _ret_var = Efl.Layout.IGroupConcrete.NativeMethods.efl_layout_group_part_exist_get_ptr.Value.Delegate(this.NativeHandle,part);
175 Eina.Error.RaiseIfUnhandledException();
178 /// <summary>Gets the minimum size specified -- as an EDC property -- for a given Edje object
179 /// This function retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
181 /// Note: If the <c>min</c> EDC property was not declared for this object, this call will return 0x0.
183 /// Note: On failure, this function also return 0x0.
185 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMax"/>.
186 /// (Since EFL 1.22)</summary>
187 /// <value>The minimum size as set in EDC.</value>
188 public Eina.Size2D GroupSizeMin {
189 get { return GetGroupSizeMin(); }
191 /// <summary>Gets the maximum size specified -- as an EDC property -- for a given Edje object
192 /// This function retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
194 /// Note: If the <c>max</c> EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.
196 /// Note: On failure, this function will return 0x0.
198 /// See also <see cref="Efl.Layout.IGroup.GetGroupSizeMin"/>.
199 /// (Since EFL 1.22)</summary>
200 /// <value>The maximum size as set in EDC.</value>
201 public Eina.Size2D GroupSizeMax {
202 get { return GetGroupSizeMax(); }
204 private static IntPtr GetEflClassStatic()
206 return Efl.Layout.IGroupConcrete.efl_layout_group_interface_get();
208 /// <summary>Wrapper for native methods and virtual method delegates.
209 /// For internal use by generated code only.</summary>
210 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
212 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Edje);
213 /// <summary>Gets the list of Eo operations to override.</summary>
214 /// <returns>The list of Eo operations to be overload.</returns>
215 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
217 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
218 var methods = Efl.Eo.Globals.GetUserMethods(type);
220 if (efl_layout_group_size_min_get_static_delegate == null)
222 efl_layout_group_size_min_get_static_delegate = new efl_layout_group_size_min_get_delegate(group_size_min_get);
225 if (methods.FirstOrDefault(m => m.Name == "GetGroupSizeMin") != null)
227 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_layout_group_size_min_get"), func = Marshal.GetFunctionPointerForDelegate(efl_layout_group_size_min_get_static_delegate) });
230 if (efl_layout_group_size_max_get_static_delegate == null)
232 efl_layout_group_size_max_get_static_delegate = new efl_layout_group_size_max_get_delegate(group_size_max_get);
235 if (methods.FirstOrDefault(m => m.Name == "GetGroupSizeMax") != null)
237 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_layout_group_size_max_get"), func = Marshal.GetFunctionPointerForDelegate(efl_layout_group_size_max_get_static_delegate) });
240 if (efl_layout_group_data_get_static_delegate == null)
242 efl_layout_group_data_get_static_delegate = new efl_layout_group_data_get_delegate(group_data_get);
245 if (methods.FirstOrDefault(m => m.Name == "GetGroupData") != null)
247 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_layout_group_data_get"), func = Marshal.GetFunctionPointerForDelegate(efl_layout_group_data_get_static_delegate) });
250 if (efl_layout_group_part_exist_get_static_delegate == null)
252 efl_layout_group_part_exist_get_static_delegate = new efl_layout_group_part_exist_get_delegate(part_exist_get);
255 if (methods.FirstOrDefault(m => m.Name == "GetPartExist") != null)
257 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_layout_group_part_exist_get"), func = Marshal.GetFunctionPointerForDelegate(efl_layout_group_part_exist_get_static_delegate) });
262 /// <summary>Returns the Eo class for the native methods of this class.</summary>
263 /// <returns>The native class pointer.</returns>
264 public override IntPtr GetEflClass()
266 return Efl.Layout.IGroupConcrete.efl_layout_group_interface_get();
269 #pragma warning disable CA1707, CS1591, SA1300, SA1600
272 private delegate Eina.Size2D.NativeStruct efl_layout_group_size_min_get_delegate(System.IntPtr obj, System.IntPtr pd);
275 public delegate Eina.Size2D.NativeStruct efl_layout_group_size_min_get_api_delegate(System.IntPtr obj);
277 public static Efl.Eo.FunctionWrapper<efl_layout_group_size_min_get_api_delegate> efl_layout_group_size_min_get_ptr = new Efl.Eo.FunctionWrapper<efl_layout_group_size_min_get_api_delegate>(Module, "efl_layout_group_size_min_get");
279 private static Eina.Size2D.NativeStruct group_size_min_get(System.IntPtr obj, System.IntPtr pd)
281 Eina.Log.Debug("function efl_layout_group_size_min_get was called");
282 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
285 Eina.Size2D _ret_var = default(Eina.Size2D);
288 _ret_var = ((IGroup)ws.Target).GetGroupSizeMin();
292 Eina.Log.Warning($"Callback error: {e.ToString()}");
293 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
301 return efl_layout_group_size_min_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
305 private static efl_layout_group_size_min_get_delegate efl_layout_group_size_min_get_static_delegate;
308 private delegate Eina.Size2D.NativeStruct efl_layout_group_size_max_get_delegate(System.IntPtr obj, System.IntPtr pd);
311 public delegate Eina.Size2D.NativeStruct efl_layout_group_size_max_get_api_delegate(System.IntPtr obj);
313 public static Efl.Eo.FunctionWrapper<efl_layout_group_size_max_get_api_delegate> efl_layout_group_size_max_get_ptr = new Efl.Eo.FunctionWrapper<efl_layout_group_size_max_get_api_delegate>(Module, "efl_layout_group_size_max_get");
315 private static Eina.Size2D.NativeStruct group_size_max_get(System.IntPtr obj, System.IntPtr pd)
317 Eina.Log.Debug("function efl_layout_group_size_max_get was called");
318 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
321 Eina.Size2D _ret_var = default(Eina.Size2D);
324 _ret_var = ((IGroup)ws.Target).GetGroupSizeMax();
328 Eina.Log.Warning($"Callback error: {e.ToString()}");
329 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
337 return efl_layout_group_size_max_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
341 private static efl_layout_group_size_max_get_delegate efl_layout_group_size_max_get_static_delegate;
343 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
344 private delegate System.String efl_layout_group_data_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key);
346 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
347 public delegate System.String efl_layout_group_data_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key);
349 public static Efl.Eo.FunctionWrapper<efl_layout_group_data_get_api_delegate> efl_layout_group_data_get_ptr = new Efl.Eo.FunctionWrapper<efl_layout_group_data_get_api_delegate>(Module, "efl_layout_group_data_get");
351 private static System.String group_data_get(System.IntPtr obj, System.IntPtr pd, System.String key)
353 Eina.Log.Debug("function efl_layout_group_data_get was called");
354 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
357 System.String _ret_var = default(System.String);
360 _ret_var = ((IGroup)ws.Target).GetGroupData(key);
364 Eina.Log.Warning($"Callback error: {e.ToString()}");
365 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
373 return efl_layout_group_data_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key);
377 private static efl_layout_group_data_get_delegate efl_layout_group_data_get_static_delegate;
379 [return: MarshalAs(UnmanagedType.U1)]
380 private delegate bool efl_layout_group_part_exist_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String part);
382 [return: MarshalAs(UnmanagedType.U1)]
383 public delegate bool efl_layout_group_part_exist_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String part);
385 public static Efl.Eo.FunctionWrapper<efl_layout_group_part_exist_get_api_delegate> efl_layout_group_part_exist_get_ptr = new Efl.Eo.FunctionWrapper<efl_layout_group_part_exist_get_api_delegate>(Module, "efl_layout_group_part_exist_get");
387 private static bool part_exist_get(System.IntPtr obj, System.IntPtr pd, System.String part)
389 Eina.Log.Debug("function efl_layout_group_part_exist_get was called");
390 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
393 bool _ret_var = default(bool);
396 _ret_var = ((IGroup)ws.Target).GetPartExist(part);
400 Eina.Log.Warning($"Callback error: {e.ToString()}");
401 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
409 return efl_layout_group_part_exist_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), part);
413 private static efl_layout_group_part_exist_get_delegate efl_layout_group_part_exist_get_static_delegate;
415 #pragma warning restore CA1707, CS1591, SA1300, SA1600