1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Gfx {
8 /// <summary>Efl graphics fill interface</summary>
10 public interface Fill :
11 Efl.Eo.IWrapper, IDisposable
13 /// <summary>Binds the object's <see cref="Efl.Gfx.Fill.Fill"/> property to its actual geometry.
14 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.Fill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
16 /// This property takes precedence over <see cref="Efl.Gfx.Fill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.Fill.Fill"/> should be set.
18 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
19 /// <returns><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</returns>
21 /// <summary>Binds the object's <see cref="Efl.Gfx.Fill.Fill"/> property to its actual geometry.
22 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.Fill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
24 /// This property takes precedence over <see cref="Efl.Gfx.Fill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.Fill.Fill"/> should be set.
26 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
27 /// <param name="filled"><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</param>
28 /// <returns></returns>
29 void SetFillAuto( bool filled);
30 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
31 /// 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.
33 /// Setting this property will reset the <see cref="Efl.Gfx.Fill.FillAuto"/> to <c>false</c>.</summary>
34 /// <returns>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</returns>
36 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
37 /// 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.
39 /// Setting this property will reset the <see cref="Efl.Gfx.Fill.FillAuto"/> to <c>false</c>.</summary>
40 /// <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>
41 /// <returns></returns>
42 void SetFill( Eina.Rect fill);
43 /// <summary>Binds the object's <see cref="Efl.Gfx.Fill.Fill"/> property to its actual geometry.
44 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.Fill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
46 /// This property takes precedence over <see cref="Efl.Gfx.Fill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.Fill.Fill"/> should be set.
48 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
49 /// <value><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</value>
54 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
55 /// 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.
57 /// Setting this property will reset the <see cref="Efl.Gfx.Fill.FillAuto"/> to <c>false</c>.</summary>
58 /// <value>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</value>
64 /// <summary>Efl graphics fill interface</summary>
65 sealed public class FillConcrete :
70 ///<summary>Pointer to the native class description.</summary>
71 public System.IntPtr NativeClass {
73 if (((object)this).GetType() == typeof (FillConcrete))
74 return Efl.Gfx.FillNativeInherit.GetEflClassStatic();
76 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
79 private System.IntPtr handle;
80 ///<summary>Pointer to the native instance.</summary>
81 public System.IntPtr NativeHandle {
82 get { return handle; }
84 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
85 efl_gfx_fill_interface_get();
86 ///<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>
87 public FillConcrete(System.IntPtr raw)
90 register_event_proxies();
92 ///<summary>Destructor.</summary>
97 ///<summary>Releases the underlying native instance.</summary>
98 void Dispose(bool disposing)
100 if (handle != System.IntPtr.Zero) {
101 Efl.Eo.Globals.efl_unref(handle);
102 handle = System.IntPtr.Zero;
105 ///<summary>Releases the underlying native instance.</summary>
106 public void Dispose()
109 GC.SuppressFinalize(this);
111 ///<summary>Casts obj into an instance of this type.</summary>
112 public static FillConcrete static_cast(Efl.Object obj)
115 throw new System.ArgumentNullException("obj");
116 return new FillConcrete(obj.NativeHandle);
118 ///<summary>Verifies if the given object is equal to this one.</summary>
119 public override bool Equals(object obj)
121 var other = obj as Efl.Object;
124 return this.NativeHandle == other.NativeHandle;
126 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
127 public override int GetHashCode()
129 return this.NativeHandle.ToInt32();
131 ///<summary>Turns the native pointer into a string representation.</summary>
132 public override String ToString()
134 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
136 void register_event_proxies()
139 /// <summary>Binds the object's <see cref="Efl.Gfx.Fill.Fill"/> property to its actual geometry.
140 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.Fill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
142 /// This property takes precedence over <see cref="Efl.Gfx.Fill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.Fill.Fill"/> should be set.
144 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
145 /// <returns><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</returns>
146 public bool GetFillAuto() {
147 var _ret_var = Efl.Gfx.FillNativeInherit.efl_gfx_fill_auto_get_ptr.Value.Delegate(this.NativeHandle);
148 Eina.Error.RaiseIfUnhandledException();
151 /// <summary>Binds the object's <see cref="Efl.Gfx.Fill.Fill"/> property to its actual geometry.
152 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.Fill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
154 /// This property takes precedence over <see cref="Efl.Gfx.Fill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.Fill.Fill"/> should be set.
156 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
157 /// <param name="filled"><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</param>
158 /// <returns></returns>
159 public void SetFillAuto( bool filled) {
160 Efl.Gfx.FillNativeInherit.efl_gfx_fill_auto_set_ptr.Value.Delegate(this.NativeHandle, filled);
161 Eina.Error.RaiseIfUnhandledException();
163 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
164 /// 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.
166 /// Setting this property will reset the <see cref="Efl.Gfx.Fill.FillAuto"/> to <c>false</c>.</summary>
167 /// <returns>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</returns>
168 public Eina.Rect GetFill() {
169 var _ret_var = Efl.Gfx.FillNativeInherit.efl_gfx_fill_get_ptr.Value.Delegate(this.NativeHandle);
170 Eina.Error.RaiseIfUnhandledException();
171 return Eina.Rect_StructConversion.ToManaged(_ret_var);
173 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
174 /// 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.
176 /// Setting this property will reset the <see cref="Efl.Gfx.Fill.FillAuto"/> to <c>false</c>.</summary>
177 /// <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>
178 /// <returns></returns>
179 public void SetFill( Eina.Rect fill) {
180 var _in_fill = Eina.Rect_StructConversion.ToInternal(fill);
181 Efl.Gfx.FillNativeInherit.efl_gfx_fill_set_ptr.Value.Delegate(this.NativeHandle, _in_fill);
182 Eina.Error.RaiseIfUnhandledException();
184 /// <summary>Binds the object's <see cref="Efl.Gfx.Fill.Fill"/> property to its actual geometry.
185 /// If <c>true</c>, then every time the object is resized, it will automatically trigger a call to <see cref="Efl.Gfx.Fill.SetFill"/> with the new size (and 0, 0 as source image's origin), so the image will cover the whole object's area.
187 /// This property takes precedence over <see cref="Efl.Gfx.Fill.Fill"/>. If set to <c>false</c>, then <see cref="Efl.Gfx.Fill.Fill"/> should be set.
189 /// This flag is <c>true</c> by default (used to be <c>false</c> with the old APIs, and was known as "filled").</summary>
190 /// <value><c>true</c> to make the fill property follow object size or <c>false</c> otherwise.</value>
191 public bool FillAuto {
192 get { return GetFillAuto(); }
193 set { SetFillAuto( value); }
195 /// <summary>Specifies how to tile an image to fill its rectangle geometry.
196 /// 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.
198 /// Setting this property will reset the <see cref="Efl.Gfx.Fill.FillAuto"/> to <c>false</c>.</summary>
199 /// <value>The top-left corner to start drawing from as well as the size at which the bound image will be displayed.</value>
200 public Eina.Rect Fill {
201 get { return GetFill(); }
202 set { SetFill( value); }
205 public class FillNativeInherit : Efl.Eo.NativeClass{
206 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
207 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
209 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
210 if (efl_gfx_fill_auto_get_static_delegate == null)
211 efl_gfx_fill_auto_get_static_delegate = new efl_gfx_fill_auto_get_delegate(fill_auto_get);
212 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)});
213 if (efl_gfx_fill_auto_set_static_delegate == null)
214 efl_gfx_fill_auto_set_static_delegate = new efl_gfx_fill_auto_set_delegate(fill_auto_set);
215 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)});
216 if (efl_gfx_fill_get_static_delegate == null)
217 efl_gfx_fill_get_static_delegate = new efl_gfx_fill_get_delegate(fill_get);
218 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)});
219 if (efl_gfx_fill_set_static_delegate == null)
220 efl_gfx_fill_set_static_delegate = new efl_gfx_fill_set_delegate(fill_set);
221 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)});
224 public override IntPtr GetEflClass()
226 return Efl.Gfx.FillConcrete.efl_gfx_fill_interface_get();
228 public static IntPtr GetEflClassStatic()
230 return Efl.Gfx.FillConcrete.efl_gfx_fill_interface_get();
234 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_fill_auto_get_delegate(System.IntPtr obj, System.IntPtr pd);
237 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_fill_auto_get_api_delegate(System.IntPtr obj);
238 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");
239 private static bool fill_auto_get(System.IntPtr obj, System.IntPtr pd)
241 Eina.Log.Debug("function efl_gfx_fill_auto_get was called");
242 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
243 if(wrapper != null) {
244 bool _ret_var = default(bool);
246 _ret_var = ((Fill)wrapper).GetFillAuto();
247 } catch (Exception e) {
248 Eina.Log.Warning($"Callback error: {e.ToString()}");
249 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
253 return efl_gfx_fill_auto_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
256 private static efl_gfx_fill_auto_get_delegate efl_gfx_fill_auto_get_static_delegate;
259 private delegate void efl_gfx_fill_auto_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool filled);
262 public delegate void efl_gfx_fill_auto_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool filled);
263 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");
264 private static void fill_auto_set(System.IntPtr obj, System.IntPtr pd, bool filled)
266 Eina.Log.Debug("function efl_gfx_fill_auto_set was called");
267 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
268 if(wrapper != null) {
271 ((Fill)wrapper).SetFillAuto( filled);
272 } catch (Exception e) {
273 Eina.Log.Warning($"Callback error: {e.ToString()}");
274 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
277 efl_gfx_fill_auto_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), filled);
280 private static efl_gfx_fill_auto_set_delegate efl_gfx_fill_auto_set_static_delegate;
283 private delegate Eina.Rect_StructInternal efl_gfx_fill_get_delegate(System.IntPtr obj, System.IntPtr pd);
286 public delegate Eina.Rect_StructInternal efl_gfx_fill_get_api_delegate(System.IntPtr obj);
287 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");
288 private static Eina.Rect_StructInternal fill_get(System.IntPtr obj, System.IntPtr pd)
290 Eina.Log.Debug("function efl_gfx_fill_get was called");
291 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
292 if(wrapper != null) {
293 Eina.Rect _ret_var = default(Eina.Rect);
295 _ret_var = ((Fill)wrapper).GetFill();
296 } catch (Exception e) {
297 Eina.Log.Warning($"Callback error: {e.ToString()}");
298 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
300 return Eina.Rect_StructConversion.ToInternal(_ret_var);
302 return efl_gfx_fill_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
305 private static efl_gfx_fill_get_delegate efl_gfx_fill_get_static_delegate;
308 private delegate void efl_gfx_fill_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Rect_StructInternal fill);
311 public delegate void efl_gfx_fill_set_api_delegate(System.IntPtr obj, Eina.Rect_StructInternal fill);
312 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");
313 private static void fill_set(System.IntPtr obj, System.IntPtr pd, Eina.Rect_StructInternal fill)
315 Eina.Log.Debug("function efl_gfx_fill_set was called");
316 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
317 if(wrapper != null) {
318 var _in_fill = Eina.Rect_StructConversion.ToManaged(fill);
321 ((Fill)wrapper).SetFill( _in_fill);
322 } catch (Exception e) {
323 Eina.Log.Warning($"Callback error: {e.ToString()}");
324 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
327 efl_gfx_fill_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), fill);
330 private static efl_gfx_fill_set_delegate efl_gfx_fill_set_static_delegate;