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>Efl graphics fill interface</summary>
13 [Efl.Gfx.IFillConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IFill :
16 Efl.Eo.IWrapper, IDisposable
18 /// <summary>Binds the object's <see cref="Efl.Gfx.IFill.Fill"/> property to its actual geometry.
19 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.IFill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
21 /// This property takes precedence over <see cref="Efl.Gfx.IFill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.IFill.Fill"/> should be set.
23 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
24 /// <returns><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</returns>
26 /// <summary>Binds the object's <see cref="Efl.Gfx.IFill.Fill"/> property to its actual geometry.
27 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.IFill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
29 /// This property takes precedence over <see cref="Efl.Gfx.IFill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.IFill.Fill"/> should be set.
31 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
32 /// <param name="filled"><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</param>
33 void SetFillAuto(bool filled);
34 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
35 /// Note that if <c>w</c> or <c>h</c> are smaller than the dimensions of the object, the displayed image will be tiled around the object's area. To have only one copy of the bound image drawn, <c>x</c> and <c>y</c> must be 0 and <c>w</c> and <c>h</c> need to be the exact width and height of the image object itself, respectively.
37 /// Setting this property will reset the <see cref="Efl.Gfx.IFill.FillAuto"/> to <c>false</c>.</summary>
38 /// <returns>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</returns>
40 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
41 /// Note that if <c>w</c> or <c>h</c> are smaller than the dimensions of the object, the displayed image will be tiled around the object's area. To have only one copy of the bound image drawn, <c>x</c> and <c>y</c> must be 0 and <c>w</c> and <c>h</c> need to be the exact width and height of the image object itself, respectively.
43 /// Setting this property will reset the <see cref="Efl.Gfx.IFill.FillAuto"/> to <c>false</c>.</summary>
44 /// <param name="fill">The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</param>
45 void SetFill(Eina.Rect fill);
46 /// <summary>Binds the object's <see cref="Efl.Gfx.IFill.Fill"/> property to its actual geometry.
47 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.IFill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
49 /// This property takes precedence over <see cref="Efl.Gfx.IFill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.IFill.Fill"/> should be set.
51 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
52 /// <value><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</value>
57 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
58 /// Note that if <c>w</c> or <c>h</c> are smaller than the dimensions of the object, the displayed image will be tiled around the object's area. To have only one copy of the bound image drawn, <c>x</c> and <c>y</c> must be 0 and <c>w</c> and <c>h</c> need to be the exact width and height of the image object itself, respectively.
60 /// Setting this property will reset the <see cref="Efl.Gfx.IFill.FillAuto"/> to <c>false</c>.</summary>
61 /// <value>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</value>
67 /// <summary>Efl graphics fill interface</summary>
68 sealed public class IFillConcrete :
73 ///<summary>Pointer to the native class description.</summary>
74 public override System.IntPtr NativeClass
78 if (((object)this).GetType() == typeof(IFillConcrete))
80 return GetEflClassStatic();
84 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
89 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
90 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
91 private IFillConcrete(ConstructingHandle ch) : base(ch)
95 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
96 efl_gfx_fill_interface_get();
97 /// <summary>Initializes a new instance of the <see cref="IFill"/> class.
98 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
99 /// <param name="wh">The native pointer to be wrapped.</param>
100 private IFillConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
104 /// <summary>Binds the object's <see cref="Efl.Gfx.IFill.Fill"/> property to its actual geometry.
105 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.IFill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
107 /// This property takes precedence over <see cref="Efl.Gfx.IFill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.IFill.Fill"/> should be set.
109 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
110 /// <returns><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</returns>
111 public bool GetFillAuto() {
112 var _ret_var = Efl.Gfx.IFillConcrete.NativeMethods.efl_gfx_fill_auto_get_ptr.Value.Delegate(this.NativeHandle);
113 Eina.Error.RaiseIfUnhandledException();
116 /// <summary>Binds the object's <see cref="Efl.Gfx.IFill.Fill"/> property to its actual geometry.
117 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.IFill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
119 /// This property takes precedence over <see cref="Efl.Gfx.IFill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.IFill.Fill"/> should be set.
121 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
122 /// <param name="filled"><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</param>
123 public void SetFillAuto(bool filled) {
124 Efl.Gfx.IFillConcrete.NativeMethods.efl_gfx_fill_auto_set_ptr.Value.Delegate(this.NativeHandle,filled);
125 Eina.Error.RaiseIfUnhandledException();
127 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
128 /// Note that if <c>w</c> or <c>h</c> are smaller than the dimensions of the object, the displayed image will be tiled around the object's area. To have only one copy of the bound image drawn, <c>x</c> and <c>y</c> must be 0 and <c>w</c> and <c>h</c> need to be the exact width and height of the image object itself, respectively.
130 /// Setting this property will reset the <see cref="Efl.Gfx.IFill.FillAuto"/> to <c>false</c>.</summary>
131 /// <returns>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</returns>
132 public Eina.Rect GetFill() {
133 var _ret_var = Efl.Gfx.IFillConcrete.NativeMethods.efl_gfx_fill_get_ptr.Value.Delegate(this.NativeHandle);
134 Eina.Error.RaiseIfUnhandledException();
137 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
138 /// Note that if <c>w</c> or <c>h</c> are smaller than the dimensions of the object, the displayed image will be tiled around the object's area. To have only one copy of the bound image drawn, <c>x</c> and <c>y</c> must be 0 and <c>w</c> and <c>h</c> need to be the exact width and height of the image object itself, respectively.
140 /// Setting this property will reset the <see cref="Efl.Gfx.IFill.FillAuto"/> to <c>false</c>.</summary>
141 /// <param name="fill">The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</param>
142 public void SetFill(Eina.Rect fill) {
143 Eina.Rect.NativeStruct _in_fill = fill;
144 Efl.Gfx.IFillConcrete.NativeMethods.efl_gfx_fill_set_ptr.Value.Delegate(this.NativeHandle,_in_fill);
145 Eina.Error.RaiseIfUnhandledException();
147 /// <summary>Binds the object's <see cref="Efl.Gfx.IFill.Fill"/> property to its actual geometry.
148 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.IFill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
150 /// This property takes precedence over <see cref="Efl.Gfx.IFill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.IFill.Fill"/> should be set.
152 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
153 /// <value><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</value>
154 public bool FillAuto {
155 get { return GetFillAuto(); }
156 set { SetFillAuto(value); }
158 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
159 /// Note that if <c>w</c> or <c>h</c> are smaller than the dimensions of the object, the displayed image will be tiled around the object's area. To have only one copy of the bound image drawn, <c>x</c> and <c>y</c> must be 0 and <c>w</c> and <c>h</c> need to be the exact width and height of the image object itself, respectively.
161 /// Setting this property will reset the <see cref="Efl.Gfx.IFill.FillAuto"/> to <c>false</c>.</summary>
162 /// <value>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</value>
163 public Eina.Rect Fill {
164 get { return GetFill(); }
165 set { SetFill(value); }
167 private static IntPtr GetEflClassStatic()
169 return Efl.Gfx.IFillConcrete.efl_gfx_fill_interface_get();
171 /// <summary>Wrapper for native methods and virtual method delegates.
172 /// For internal use by generated code only.</summary>
173 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
175 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
176 /// <summary>Gets the list of Eo operations to override.</summary>
177 /// <returns>The list of Eo operations to be overload.</returns>
178 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
180 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
181 var methods = Efl.Eo.Globals.GetUserMethods(type);
183 if (efl_gfx_fill_auto_get_static_delegate == null)
185 efl_gfx_fill_auto_get_static_delegate = new efl_gfx_fill_auto_get_delegate(fill_auto_get);
188 if (methods.FirstOrDefault(m => m.Name == "GetFillAuto") != null)
190 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_fill_auto_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_fill_auto_get_static_delegate) });
193 if (efl_gfx_fill_auto_set_static_delegate == null)
195 efl_gfx_fill_auto_set_static_delegate = new efl_gfx_fill_auto_set_delegate(fill_auto_set);
198 if (methods.FirstOrDefault(m => m.Name == "SetFillAuto") != null)
200 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_fill_auto_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_fill_auto_set_static_delegate) });
203 if (efl_gfx_fill_get_static_delegate == null)
205 efl_gfx_fill_get_static_delegate = new efl_gfx_fill_get_delegate(fill_get);
208 if (methods.FirstOrDefault(m => m.Name == "GetFill") != null)
210 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_fill_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_fill_get_static_delegate) });
213 if (efl_gfx_fill_set_static_delegate == null)
215 efl_gfx_fill_set_static_delegate = new efl_gfx_fill_set_delegate(fill_set);
218 if (methods.FirstOrDefault(m => m.Name == "SetFill") != null)
220 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_fill_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_fill_set_static_delegate) });
225 /// <summary>Returns the Eo class for the native methods of this class.</summary>
226 /// <returns>The native class pointer.</returns>
227 public override IntPtr GetEflClass()
229 return Efl.Gfx.IFillConcrete.efl_gfx_fill_interface_get();
232 #pragma warning disable CA1707, CS1591, SA1300, SA1600
234 [return: MarshalAs(UnmanagedType.U1)]
235 private delegate bool efl_gfx_fill_auto_get_delegate(System.IntPtr obj, System.IntPtr pd);
237 [return: MarshalAs(UnmanagedType.U1)]
238 public delegate bool efl_gfx_fill_auto_get_api_delegate(System.IntPtr obj);
240 public static Efl.Eo.FunctionWrapper<efl_gfx_fill_auto_get_api_delegate> efl_gfx_fill_auto_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_fill_auto_get_api_delegate>(Module, "efl_gfx_fill_auto_get");
242 private static bool fill_auto_get(System.IntPtr obj, System.IntPtr pd)
244 Eina.Log.Debug("function efl_gfx_fill_auto_get was called");
245 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
248 bool _ret_var = default(bool);
251 _ret_var = ((IFill)ws.Target).GetFillAuto();
255 Eina.Log.Warning($"Callback error: {e.ToString()}");
256 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
264 return efl_gfx_fill_auto_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
268 private static efl_gfx_fill_auto_get_delegate efl_gfx_fill_auto_get_static_delegate;
271 private delegate void efl_gfx_fill_auto_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool filled);
274 public delegate void efl_gfx_fill_auto_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool filled);
276 public static Efl.Eo.FunctionWrapper<efl_gfx_fill_auto_set_api_delegate> efl_gfx_fill_auto_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_fill_auto_set_api_delegate>(Module, "efl_gfx_fill_auto_set");
278 private static void fill_auto_set(System.IntPtr obj, System.IntPtr pd, bool filled)
280 Eina.Log.Debug("function efl_gfx_fill_auto_set was called");
281 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
287 ((IFill)ws.Target).SetFillAuto(filled);
291 Eina.Log.Warning($"Callback error: {e.ToString()}");
292 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
299 efl_gfx_fill_auto_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), filled);
303 private static efl_gfx_fill_auto_set_delegate efl_gfx_fill_auto_set_static_delegate;
306 private delegate Eina.Rect.NativeStruct efl_gfx_fill_get_delegate(System.IntPtr obj, System.IntPtr pd);
309 public delegate Eina.Rect.NativeStruct efl_gfx_fill_get_api_delegate(System.IntPtr obj);
311 public static Efl.Eo.FunctionWrapper<efl_gfx_fill_get_api_delegate> efl_gfx_fill_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_fill_get_api_delegate>(Module, "efl_gfx_fill_get");
313 private static Eina.Rect.NativeStruct fill_get(System.IntPtr obj, System.IntPtr pd)
315 Eina.Log.Debug("function efl_gfx_fill_get was called");
316 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
319 Eina.Rect _ret_var = default(Eina.Rect);
322 _ret_var = ((IFill)ws.Target).GetFill();
326 Eina.Log.Warning($"Callback error: {e.ToString()}");
327 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
335 return efl_gfx_fill_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
339 private static efl_gfx_fill_get_delegate efl_gfx_fill_get_static_delegate;
342 private delegate void efl_gfx_fill_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Rect.NativeStruct fill);
345 public delegate void efl_gfx_fill_set_api_delegate(System.IntPtr obj, Eina.Rect.NativeStruct fill);
347 public static Efl.Eo.FunctionWrapper<efl_gfx_fill_set_api_delegate> efl_gfx_fill_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_fill_set_api_delegate>(Module, "efl_gfx_fill_set");
349 private static void fill_set(System.IntPtr obj, System.IntPtr pd, Eina.Rect.NativeStruct fill)
351 Eina.Log.Debug("function efl_gfx_fill_set was called");
352 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
355 Eina.Rect _in_fill = fill;
359 ((IFill)ws.Target).SetFill(_in_fill);
363 Eina.Log.Warning($"Callback error: {e.ToString()}");
364 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
371 efl_gfx_fill_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), fill);
375 private static efl_gfx_fill_set_delegate efl_gfx_fill_set_static_delegate;
377 #pragma warning restore CA1707, CS1591, SA1300, SA1600