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>Common APIs for all 2D images that can be rendered on the canvas.</summary>
13 [Efl.Gfx.IImageConcrete.NativeMethods]
14 public interface IImage :
15 Efl.Eo.IWrapper, IDisposable
17 /// <summary>Whether to use high-quality image scaling algorithm for this image.
18 /// When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
20 /// <c>true</c> by default</summary>
21 /// <returns>Whether to use smooth scale or not.</returns>
22 bool GetSmoothScale();
23 /// <summary>Whether to use high-quality image scaling algorithm for this image.
24 /// When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
26 /// <c>true</c> by default</summary>
27 /// <param name="smooth_scale">Whether to use smooth scale or not.</param>
28 void SetSmoothScale(bool smooth_scale);
29 /// <summary>Control how the image is scaled.</summary>
30 /// <returns>Image scale type</returns>
31 Efl.Gfx.ImageScaleType GetScaleType();
32 /// <summary>Control how the image is scaled.</summary>
33 /// <param name="scale_type">Image scale type</param>
34 void SetScaleType(Efl.Gfx.ImageScaleType scale_type);
35 /// <summary>Returns 1.0 if not applicable (eg. height = 0).</summary>
36 /// <returns>The image's ratio.</returns>
38 /// <summary>Dimensions of this image's border, a region that does not scale with the center area.
39 /// When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
41 /// The units used for <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> are canvas units (pixels).
43 /// Note: The border region itself may be scaled by the <see cref="Efl.Gfx.IImage.SetBorderScale"/> function.
45 /// Note: By default, image objects have no borders set, i.e. <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> start as 0.
47 /// Note: Similar to the concepts of 9-patch images or cap insets.</summary>
48 /// <param name="l">The border's left width.</param>
49 /// <param name="r">The border's right width.</param>
50 /// <param name="t">The border's top height.</param>
51 /// <param name="b">The border's bottom height.</param>
52 void GetBorder(out int l, out int r, out int t, out int b);
53 /// <summary>Dimensions of this image's border, a region that does not scale with the center area.
54 /// When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
56 /// The units used for <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> are canvas units (pixels).
58 /// Note: The border region itself may be scaled by the <see cref="Efl.Gfx.IImage.SetBorderScale"/> function.
60 /// Note: By default, image objects have no borders set, i.e. <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> start as 0.
62 /// Note: Similar to the concepts of 9-patch images or cap insets.</summary>
63 /// <param name="l">The border's left width.</param>
64 /// <param name="r">The border's right width.</param>
65 /// <param name="t">The border's top height.</param>
66 /// <param name="b">The border's bottom height.</param>
67 void SetBorder(int l, int r, int t, int b);
68 /// <summary>Scaling factor applied to the image borders.
69 /// This value multiplies the size of the <see cref="Efl.Gfx.IImage.GetBorder"/> when scaling an object.
71 /// Default value is 1.0 (no scaling).</summary>
72 /// <returns>The scale factor.</returns>
73 double GetBorderScale();
74 /// <summary>Scaling factor applied to the image borders.
75 /// This value multiplies the size of the <see cref="Efl.Gfx.IImage.GetBorder"/> when scaling an object.
77 /// Default value is 1.0 (no scaling).</summary>
78 /// <param name="scale">The scale factor.</param>
79 void SetBorderScale(double scale);
80 /// <summary>Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it.
81 /// This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in <see cref="Efl.Gfx.BorderFillMode"/>. By center we mean the complementary part of that defined by <see cref="Efl.Gfx.IImage.GetBorder"/>. This is very useful for making frames and decorations. You would most probably also be using a filled image (as in <see cref="Efl.Gfx.IFill.FillAuto"/>) to use as a frame.
83 /// The default value is <see cref="Efl.Gfx.BorderFillMode.Default"/>, ie. render and scale the center area, respecting its transparency.</summary>
84 /// <returns>Fill mode of the center region.</returns>
85 Efl.Gfx.BorderFillMode GetBorderCenterFill();
86 /// <summary>Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it.
87 /// This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in <see cref="Efl.Gfx.BorderFillMode"/>. By center we mean the complementary part of that defined by <see cref="Efl.Gfx.IImage.GetBorder"/>. This is very useful for making frames and decorations. You would most probably also be using a filled image (as in <see cref="Efl.Gfx.IFill.FillAuto"/>) to use as a frame.
89 /// The default value is <see cref="Efl.Gfx.BorderFillMode.Default"/>, ie. render and scale the center area, respecting its transparency.</summary>
90 /// <param name="fill">Fill mode of the center region.</param>
91 void SetBorderCenterFill(Efl.Gfx.BorderFillMode fill);
92 /// <summary>This represents the size of the original image in pixels.
93 /// This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
95 /// This is a read-only property, and may return 0x0.</summary>
96 /// <returns>The size in pixels.</returns>
97 Eina.Size2D GetImageSize();
98 /// <summary>Get the content hint setting of a given image object of the canvas.
99 /// This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.</summary>
100 /// <returns>Dynamic or static content hint, see <see cref="Efl.Gfx.ImageContentHint"/></returns>
101 Efl.Gfx.ImageContentHint GetContentHint();
102 /// <summary>Set the content hint setting of a given image object of the canvas.
103 /// This function sets the content hint value of the given image of the canvas. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need zero copies at texture upload time, which is an "expensive" operation.</summary>
104 /// <param name="hint">Dynamic or static content hint, see <see cref="Efl.Gfx.ImageContentHint"/></param>
105 void SetContentHint(Efl.Gfx.ImageContentHint hint);
106 /// <summary>Get the scale hint of a given image of the canvas.
107 /// This function returns the scale hint value of the given image object of the canvas.</summary>
108 /// <returns>Scalable or static size hint, see <see cref="Efl.Gfx.ImageScaleHint"/></returns>
109 Efl.Gfx.ImageScaleHint GetScaleHint();
110 /// <summary>Set the scale hint of a given image of the canvas.
111 /// This function sets the scale hint value of the given image object in the canvas, which will affect how Evas is to cache scaled versions of its original source image.</summary>
112 /// <param name="hint">Scalable or static size hint, see <see cref="Efl.Gfx.ImageScaleHint"/></param>
113 void SetScaleHint(Efl.Gfx.ImageScaleHint hint);
114 /// <summary>Gets the (last) file loading error for a given object.</summary>
115 /// <returns>The load error code.</returns>
116 Eina.Error GetImageLoadError();
117 /// <summary>Image data has been preloaded.</summary>
118 event EventHandler ImagePreloadEvt;
119 /// <summary>Image was resized (its pixel data).</summary>
120 event EventHandler ImageResizeEvt;
121 /// <summary>Image data has been unloaded (by some mechanism in EFL that threw out the original image data).</summary>
122 event EventHandler ImageUnloadEvt;
123 /// <summary>Whether to use high-quality image scaling algorithm for this image.
124 /// When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
126 /// <c>true</c> by default</summary>
127 /// <value>Whether to use smooth scale or not.</value>
132 /// <summary>Control how the image is scaled.</summary>
133 /// <value>Image scale type</value>
134 Efl.Gfx.ImageScaleType ScaleType {
138 /// <summary>The native width/height ratio of the image.</summary>
139 /// <value>The image's ratio.</value>
143 /// <summary>Scaling factor applied to the image borders.
144 /// This value multiplies the size of the <see cref="Efl.Gfx.IImage.GetBorder"/> when scaling an object.
146 /// Default value is 1.0 (no scaling).</summary>
147 /// <value>The scale factor.</value>
152 /// <summary>Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it.
153 /// This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in <see cref="Efl.Gfx.BorderFillMode"/>. By center we mean the complementary part of that defined by <see cref="Efl.Gfx.IImage.GetBorder"/>. This is very useful for making frames and decorations. You would most probably also be using a filled image (as in <see cref="Efl.Gfx.IFill.FillAuto"/>) to use as a frame.
155 /// The default value is <see cref="Efl.Gfx.BorderFillMode.Default"/>, ie. render and scale the center area, respecting its transparency.</summary>
156 /// <value>Fill mode of the center region.</value>
157 Efl.Gfx.BorderFillMode BorderCenterFill {
161 /// <summary>This represents the size of the original image in pixels.
162 /// This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
164 /// This is a read-only property, and may return 0x0.</summary>
165 /// <value>The size in pixels.</value>
166 Eina.Size2D ImageSize {
169 /// <summary>Get the content hint setting of a given image object of the canvas.
170 /// This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.</summary>
171 /// <value>Dynamic or static content hint, see <see cref="Efl.Gfx.ImageContentHint"/></value>
172 Efl.Gfx.ImageContentHint ContentHint {
176 /// <summary>Get the scale hint of a given image of the canvas.
177 /// This function returns the scale hint value of the given image object of the canvas.</summary>
178 /// <value>Scalable or static size hint, see <see cref="Efl.Gfx.ImageScaleHint"/></value>
179 Efl.Gfx.ImageScaleHint ScaleHint {
183 /// <summary>Gets the (last) file loading error for a given object.</summary>
184 /// <value>The load error code.</value>
185 Eina.Error ImageLoadError {
189 /// <summary>Common APIs for all 2D images that can be rendered on the canvas.</summary>
190 sealed public class IImageConcrete :
195 ///<summary>Pointer to the native class description.</summary>
196 public override System.IntPtr NativeClass
200 if (((object)this).GetType() == typeof(IImageConcrete))
202 return GetEflClassStatic();
206 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
211 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
212 efl_gfx_image_interface_get();
213 /// <summary>Initializes a new instance of the <see cref="IImage"/> class.
214 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
215 private IImageConcrete(System.IntPtr raw) : base(raw)
219 /// <summary>Image data has been preloaded.</summary>
220 public event EventHandler ImagePreloadEvt
226 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
228 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
231 EventArgs args = EventArgs.Empty;
234 value?.Invoke(obj, args);
238 Eina.Log.Error(e.ToString());
239 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
244 string key = "_EFL_GFX_IMAGE_EVENT_IMAGE_PRELOAD";
245 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
253 string key = "_EFL_GFX_IMAGE_EVENT_IMAGE_PRELOAD";
254 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
258 ///<summary>Method to raise event ImagePreloadEvt.</summary>
259 public void OnImagePreloadEvt(EventArgs e)
261 var key = "_EFL_GFX_IMAGE_EVENT_IMAGE_PRELOAD";
262 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
263 if (desc == IntPtr.Zero)
265 Eina.Log.Error($"Failed to get native event {key}");
269 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
271 /// <summary>Image was resized (its pixel data).</summary>
272 public event EventHandler ImageResizeEvt
278 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
280 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
283 EventArgs args = EventArgs.Empty;
286 value?.Invoke(obj, args);
290 Eina.Log.Error(e.ToString());
291 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
296 string key = "_EFL_GFX_IMAGE_EVENT_IMAGE_RESIZE";
297 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
305 string key = "_EFL_GFX_IMAGE_EVENT_IMAGE_RESIZE";
306 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
310 ///<summary>Method to raise event ImageResizeEvt.</summary>
311 public void OnImageResizeEvt(EventArgs e)
313 var key = "_EFL_GFX_IMAGE_EVENT_IMAGE_RESIZE";
314 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
315 if (desc == IntPtr.Zero)
317 Eina.Log.Error($"Failed to get native event {key}");
321 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
323 /// <summary>Image data has been unloaded (by some mechanism in EFL that threw out the original image data).</summary>
324 public event EventHandler ImageUnloadEvt
330 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
332 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
335 EventArgs args = EventArgs.Empty;
338 value?.Invoke(obj, args);
342 Eina.Log.Error(e.ToString());
343 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
348 string key = "_EFL_GFX_IMAGE_EVENT_IMAGE_UNLOAD";
349 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
357 string key = "_EFL_GFX_IMAGE_EVENT_IMAGE_UNLOAD";
358 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
362 ///<summary>Method to raise event ImageUnloadEvt.</summary>
363 public void OnImageUnloadEvt(EventArgs e)
365 var key = "_EFL_GFX_IMAGE_EVENT_IMAGE_UNLOAD";
366 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
367 if (desc == IntPtr.Zero)
369 Eina.Log.Error($"Failed to get native event {key}");
373 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
375 /// <summary>Whether to use high-quality image scaling algorithm for this image.
376 /// When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
378 /// <c>true</c> by default</summary>
379 /// <returns>Whether to use smooth scale or not.</returns>
380 public bool GetSmoothScale() {
381 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_smooth_scale_get_ptr.Value.Delegate(this.NativeHandle);
382 Eina.Error.RaiseIfUnhandledException();
385 /// <summary>Whether to use high-quality image scaling algorithm for this image.
386 /// When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
388 /// <c>true</c> by default</summary>
389 /// <param name="smooth_scale">Whether to use smooth scale or not.</param>
390 public void SetSmoothScale(bool smooth_scale) {
391 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_smooth_scale_set_ptr.Value.Delegate(this.NativeHandle,smooth_scale);
392 Eina.Error.RaiseIfUnhandledException();
394 /// <summary>Control how the image is scaled.</summary>
395 /// <returns>Image scale type</returns>
396 public Efl.Gfx.ImageScaleType GetScaleType() {
397 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_scale_type_get_ptr.Value.Delegate(this.NativeHandle);
398 Eina.Error.RaiseIfUnhandledException();
401 /// <summary>Control how the image is scaled.</summary>
402 /// <param name="scale_type">Image scale type</param>
403 public void SetScaleType(Efl.Gfx.ImageScaleType scale_type) {
404 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_scale_type_set_ptr.Value.Delegate(this.NativeHandle,scale_type);
405 Eina.Error.RaiseIfUnhandledException();
407 /// <summary>Returns 1.0 if not applicable (eg. height = 0).</summary>
408 /// <returns>The image's ratio.</returns>
409 public double GetRatio() {
410 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_ratio_get_ptr.Value.Delegate(this.NativeHandle);
411 Eina.Error.RaiseIfUnhandledException();
414 /// <summary>Dimensions of this image's border, a region that does not scale with the center area.
415 /// When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
417 /// The units used for <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> are canvas units (pixels).
419 /// Note: The border region itself may be scaled by the <see cref="Efl.Gfx.IImage.SetBorderScale"/> function.
421 /// Note: By default, image objects have no borders set, i.e. <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> start as 0.
423 /// Note: Similar to the concepts of 9-patch images or cap insets.</summary>
424 /// <param name="l">The border's left width.</param>
425 /// <param name="r">The border's right width.</param>
426 /// <param name="t">The border's top height.</param>
427 /// <param name="b">The border's bottom height.</param>
428 public void GetBorder(out int l, out int r, out int t, out int b) {
429 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_border_get_ptr.Value.Delegate(this.NativeHandle,out l, out r, out t, out b);
430 Eina.Error.RaiseIfUnhandledException();
432 /// <summary>Dimensions of this image's border, a region that does not scale with the center area.
433 /// When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
435 /// The units used for <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> are canvas units (pixels).
437 /// Note: The border region itself may be scaled by the <see cref="Efl.Gfx.IImage.SetBorderScale"/> function.
439 /// Note: By default, image objects have no borders set, i.e. <c>l</c>, <c>r</c>, <c>t</c> and <c>b</c> start as 0.
441 /// Note: Similar to the concepts of 9-patch images or cap insets.</summary>
442 /// <param name="l">The border's left width.</param>
443 /// <param name="r">The border's right width.</param>
444 /// <param name="t">The border's top height.</param>
445 /// <param name="b">The border's bottom height.</param>
446 public void SetBorder(int l, int r, int t, int b) {
447 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_border_set_ptr.Value.Delegate(this.NativeHandle,l, r, t, b);
448 Eina.Error.RaiseIfUnhandledException();
450 /// <summary>Scaling factor applied to the image borders.
451 /// This value multiplies the size of the <see cref="Efl.Gfx.IImage.GetBorder"/> when scaling an object.
453 /// Default value is 1.0 (no scaling).</summary>
454 /// <returns>The scale factor.</returns>
455 public double GetBorderScale() {
456 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_border_scale_get_ptr.Value.Delegate(this.NativeHandle);
457 Eina.Error.RaiseIfUnhandledException();
460 /// <summary>Scaling factor applied to the image borders.
461 /// This value multiplies the size of the <see cref="Efl.Gfx.IImage.GetBorder"/> when scaling an object.
463 /// Default value is 1.0 (no scaling).</summary>
464 /// <param name="scale">The scale factor.</param>
465 public void SetBorderScale(double scale) {
466 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_border_scale_set_ptr.Value.Delegate(this.NativeHandle,scale);
467 Eina.Error.RaiseIfUnhandledException();
469 /// <summary>Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it.
470 /// This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in <see cref="Efl.Gfx.BorderFillMode"/>. By center we mean the complementary part of that defined by <see cref="Efl.Gfx.IImage.GetBorder"/>. This is very useful for making frames and decorations. You would most probably also be using a filled image (as in <see cref="Efl.Gfx.IFill.FillAuto"/>) to use as a frame.
472 /// The default value is <see cref="Efl.Gfx.BorderFillMode.Default"/>, ie. render and scale the center area, respecting its transparency.</summary>
473 /// <returns>Fill mode of the center region.</returns>
474 public Efl.Gfx.BorderFillMode GetBorderCenterFill() {
475 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_border_center_fill_get_ptr.Value.Delegate(this.NativeHandle);
476 Eina.Error.RaiseIfUnhandledException();
479 /// <summary>Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it.
480 /// This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in <see cref="Efl.Gfx.BorderFillMode"/>. By center we mean the complementary part of that defined by <see cref="Efl.Gfx.IImage.GetBorder"/>. This is very useful for making frames and decorations. You would most probably also be using a filled image (as in <see cref="Efl.Gfx.IFill.FillAuto"/>) to use as a frame.
482 /// The default value is <see cref="Efl.Gfx.BorderFillMode.Default"/>, ie. render and scale the center area, respecting its transparency.</summary>
483 /// <param name="fill">Fill mode of the center region.</param>
484 public void SetBorderCenterFill(Efl.Gfx.BorderFillMode fill) {
485 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_border_center_fill_set_ptr.Value.Delegate(this.NativeHandle,fill);
486 Eina.Error.RaiseIfUnhandledException();
488 /// <summary>This represents the size of the original image in pixels.
489 /// This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
491 /// This is a read-only property, and may return 0x0.</summary>
492 /// <returns>The size in pixels.</returns>
493 public Eina.Size2D GetImageSize() {
494 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_size_get_ptr.Value.Delegate(this.NativeHandle);
495 Eina.Error.RaiseIfUnhandledException();
498 /// <summary>Get the content hint setting of a given image object of the canvas.
499 /// This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.</summary>
500 /// <returns>Dynamic or static content hint, see <see cref="Efl.Gfx.ImageContentHint"/></returns>
501 public Efl.Gfx.ImageContentHint GetContentHint() {
502 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_content_hint_get_ptr.Value.Delegate(this.NativeHandle);
503 Eina.Error.RaiseIfUnhandledException();
506 /// <summary>Set the content hint setting of a given image object of the canvas.
507 /// This function sets the content hint value of the given image of the canvas. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need zero copies at texture upload time, which is an "expensive" operation.</summary>
508 /// <param name="hint">Dynamic or static content hint, see <see cref="Efl.Gfx.ImageContentHint"/></param>
509 public void SetContentHint(Efl.Gfx.ImageContentHint hint) {
510 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_content_hint_set_ptr.Value.Delegate(this.NativeHandle,hint);
511 Eina.Error.RaiseIfUnhandledException();
513 /// <summary>Get the scale hint of a given image of the canvas.
514 /// This function returns the scale hint value of the given image object of the canvas.</summary>
515 /// <returns>Scalable or static size hint, see <see cref="Efl.Gfx.ImageScaleHint"/></returns>
516 public Efl.Gfx.ImageScaleHint GetScaleHint() {
517 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_scale_hint_get_ptr.Value.Delegate(this.NativeHandle);
518 Eina.Error.RaiseIfUnhandledException();
521 /// <summary>Set the scale hint of a given image of the canvas.
522 /// This function sets the scale hint value of the given image object in the canvas, which will affect how Evas is to cache scaled versions of its original source image.</summary>
523 /// <param name="hint">Scalable or static size hint, see <see cref="Efl.Gfx.ImageScaleHint"/></param>
524 public void SetScaleHint(Efl.Gfx.ImageScaleHint hint) {
525 Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_scale_hint_set_ptr.Value.Delegate(this.NativeHandle,hint);
526 Eina.Error.RaiseIfUnhandledException();
528 /// <summary>Gets the (last) file loading error for a given object.</summary>
529 /// <returns>The load error code.</returns>
530 public Eina.Error GetImageLoadError() {
531 var _ret_var = Efl.Gfx.IImageConcrete.NativeMethods.efl_gfx_image_load_error_get_ptr.Value.Delegate(this.NativeHandle);
532 Eina.Error.RaiseIfUnhandledException();
535 /// <summary>Whether to use high-quality image scaling algorithm for this image.
536 /// When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
538 /// <c>true</c> by default</summary>
539 /// <value>Whether to use smooth scale or not.</value>
540 public bool SmoothScale {
541 get { return GetSmoothScale(); }
542 set { SetSmoothScale(value); }
544 /// <summary>Control how the image is scaled.</summary>
545 /// <value>Image scale type</value>
546 public Efl.Gfx.ImageScaleType ScaleType {
547 get { return GetScaleType(); }
548 set { SetScaleType(value); }
550 /// <summary>The native width/height ratio of the image.</summary>
551 /// <value>The image's ratio.</value>
552 public double Ratio {
553 get { return GetRatio(); }
555 /// <summary>Scaling factor applied to the image borders.
556 /// This value multiplies the size of the <see cref="Efl.Gfx.IImage.GetBorder"/> when scaling an object.
558 /// Default value is 1.0 (no scaling).</summary>
559 /// <value>The scale factor.</value>
560 public double BorderScale {
561 get { return GetBorderScale(); }
562 set { SetBorderScale(value); }
564 /// <summary>Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it.
565 /// This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in <see cref="Efl.Gfx.BorderFillMode"/>. By center we mean the complementary part of that defined by <see cref="Efl.Gfx.IImage.GetBorder"/>. This is very useful for making frames and decorations. You would most probably also be using a filled image (as in <see cref="Efl.Gfx.IFill.FillAuto"/>) to use as a frame.
567 /// The default value is <see cref="Efl.Gfx.BorderFillMode.Default"/>, ie. render and scale the center area, respecting its transparency.</summary>
568 /// <value>Fill mode of the center region.</value>
569 public Efl.Gfx.BorderFillMode BorderCenterFill {
570 get { return GetBorderCenterFill(); }
571 set { SetBorderCenterFill(value); }
573 /// <summary>This represents the size of the original image in pixels.
574 /// This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
576 /// This is a read-only property, and may return 0x0.</summary>
577 /// <value>The size in pixels.</value>
578 public Eina.Size2D ImageSize {
579 get { return GetImageSize(); }
581 /// <summary>Get the content hint setting of a given image object of the canvas.
582 /// This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.</summary>
583 /// <value>Dynamic or static content hint, see <see cref="Efl.Gfx.ImageContentHint"/></value>
584 public Efl.Gfx.ImageContentHint ContentHint {
585 get { return GetContentHint(); }
586 set { SetContentHint(value); }
588 /// <summary>Get the scale hint of a given image of the canvas.
589 /// This function returns the scale hint value of the given image object of the canvas.</summary>
590 /// <value>Scalable or static size hint, see <see cref="Efl.Gfx.ImageScaleHint"/></value>
591 public Efl.Gfx.ImageScaleHint ScaleHint {
592 get { return GetScaleHint(); }
593 set { SetScaleHint(value); }
595 /// <summary>Gets the (last) file loading error for a given object.</summary>
596 /// <value>The load error code.</value>
597 public Eina.Error ImageLoadError {
598 get { return GetImageLoadError(); }
600 private static IntPtr GetEflClassStatic()
602 return Efl.Gfx.IImageConcrete.efl_gfx_image_interface_get();
604 /// <summary>Wrapper for native methods and virtual method delegates.
605 /// For internal use by generated code only.</summary>
606 public class NativeMethods : Efl.Eo.NativeClass
608 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
609 /// <summary>Gets the list of Eo operations to override.</summary>
610 /// <returns>The list of Eo operations to be overload.</returns>
611 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
613 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
614 var methods = Efl.Eo.Globals.GetUserMethods(type);
616 if (efl_gfx_image_smooth_scale_get_static_delegate == null)
618 efl_gfx_image_smooth_scale_get_static_delegate = new efl_gfx_image_smooth_scale_get_delegate(smooth_scale_get);
621 if (methods.FirstOrDefault(m => m.Name == "GetSmoothScale") != null)
623 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_smooth_scale_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_smooth_scale_get_static_delegate) });
626 if (efl_gfx_image_smooth_scale_set_static_delegate == null)
628 efl_gfx_image_smooth_scale_set_static_delegate = new efl_gfx_image_smooth_scale_set_delegate(smooth_scale_set);
631 if (methods.FirstOrDefault(m => m.Name == "SetSmoothScale") != null)
633 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_smooth_scale_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_smooth_scale_set_static_delegate) });
636 if (efl_gfx_image_scale_type_get_static_delegate == null)
638 efl_gfx_image_scale_type_get_static_delegate = new efl_gfx_image_scale_type_get_delegate(scale_type_get);
641 if (methods.FirstOrDefault(m => m.Name == "GetScaleType") != null)
643 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_scale_type_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_scale_type_get_static_delegate) });
646 if (efl_gfx_image_scale_type_set_static_delegate == null)
648 efl_gfx_image_scale_type_set_static_delegate = new efl_gfx_image_scale_type_set_delegate(scale_type_set);
651 if (methods.FirstOrDefault(m => m.Name == "SetScaleType") != null)
653 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_scale_type_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_scale_type_set_static_delegate) });
656 if (efl_gfx_image_ratio_get_static_delegate == null)
658 efl_gfx_image_ratio_get_static_delegate = new efl_gfx_image_ratio_get_delegate(ratio_get);
661 if (methods.FirstOrDefault(m => m.Name == "GetRatio") != null)
663 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_ratio_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_ratio_get_static_delegate) });
666 if (efl_gfx_image_border_get_static_delegate == null)
668 efl_gfx_image_border_get_static_delegate = new efl_gfx_image_border_get_delegate(border_get);
671 if (methods.FirstOrDefault(m => m.Name == "GetBorder") != null)
673 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_border_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_border_get_static_delegate) });
676 if (efl_gfx_image_border_set_static_delegate == null)
678 efl_gfx_image_border_set_static_delegate = new efl_gfx_image_border_set_delegate(border_set);
681 if (methods.FirstOrDefault(m => m.Name == "SetBorder") != null)
683 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_border_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_border_set_static_delegate) });
686 if (efl_gfx_image_border_scale_get_static_delegate == null)
688 efl_gfx_image_border_scale_get_static_delegate = new efl_gfx_image_border_scale_get_delegate(border_scale_get);
691 if (methods.FirstOrDefault(m => m.Name == "GetBorderScale") != null)
693 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_border_scale_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_border_scale_get_static_delegate) });
696 if (efl_gfx_image_border_scale_set_static_delegate == null)
698 efl_gfx_image_border_scale_set_static_delegate = new efl_gfx_image_border_scale_set_delegate(border_scale_set);
701 if (methods.FirstOrDefault(m => m.Name == "SetBorderScale") != null)
703 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_border_scale_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_border_scale_set_static_delegate) });
706 if (efl_gfx_image_border_center_fill_get_static_delegate == null)
708 efl_gfx_image_border_center_fill_get_static_delegate = new efl_gfx_image_border_center_fill_get_delegate(border_center_fill_get);
711 if (methods.FirstOrDefault(m => m.Name == "GetBorderCenterFill") != null)
713 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_border_center_fill_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_border_center_fill_get_static_delegate) });
716 if (efl_gfx_image_border_center_fill_set_static_delegate == null)
718 efl_gfx_image_border_center_fill_set_static_delegate = new efl_gfx_image_border_center_fill_set_delegate(border_center_fill_set);
721 if (methods.FirstOrDefault(m => m.Name == "SetBorderCenterFill") != null)
723 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_border_center_fill_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_border_center_fill_set_static_delegate) });
726 if (efl_gfx_image_size_get_static_delegate == null)
728 efl_gfx_image_size_get_static_delegate = new efl_gfx_image_size_get_delegate(image_size_get);
731 if (methods.FirstOrDefault(m => m.Name == "GetImageSize") != null)
733 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_size_get_static_delegate) });
736 if (efl_gfx_image_content_hint_get_static_delegate == null)
738 efl_gfx_image_content_hint_get_static_delegate = new efl_gfx_image_content_hint_get_delegate(content_hint_get);
741 if (methods.FirstOrDefault(m => m.Name == "GetContentHint") != null)
743 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_content_hint_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_content_hint_get_static_delegate) });
746 if (efl_gfx_image_content_hint_set_static_delegate == null)
748 efl_gfx_image_content_hint_set_static_delegate = new efl_gfx_image_content_hint_set_delegate(content_hint_set);
751 if (methods.FirstOrDefault(m => m.Name == "SetContentHint") != null)
753 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_content_hint_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_content_hint_set_static_delegate) });
756 if (efl_gfx_image_scale_hint_get_static_delegate == null)
758 efl_gfx_image_scale_hint_get_static_delegate = new efl_gfx_image_scale_hint_get_delegate(scale_hint_get);
761 if (methods.FirstOrDefault(m => m.Name == "GetScaleHint") != null)
763 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_scale_hint_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_scale_hint_get_static_delegate) });
766 if (efl_gfx_image_scale_hint_set_static_delegate == null)
768 efl_gfx_image_scale_hint_set_static_delegate = new efl_gfx_image_scale_hint_set_delegate(scale_hint_set);
771 if (methods.FirstOrDefault(m => m.Name == "SetScaleHint") != null)
773 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_scale_hint_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_scale_hint_set_static_delegate) });
776 if (efl_gfx_image_load_error_get_static_delegate == null)
778 efl_gfx_image_load_error_get_static_delegate = new efl_gfx_image_load_error_get_delegate(image_load_error_get);
781 if (methods.FirstOrDefault(m => m.Name == "GetImageLoadError") != null)
783 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_image_load_error_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_image_load_error_get_static_delegate) });
788 /// <summary>Returns the Eo class for the native methods of this class.</summary>
789 /// <returns>The native class pointer.</returns>
790 public override IntPtr GetEflClass()
792 return Efl.Gfx.IImageConcrete.efl_gfx_image_interface_get();
795 #pragma warning disable CA1707, CS1591, SA1300, SA1600
797 [return: MarshalAs(UnmanagedType.U1)]
798 private delegate bool efl_gfx_image_smooth_scale_get_delegate(System.IntPtr obj, System.IntPtr pd);
800 [return: MarshalAs(UnmanagedType.U1)]
801 public delegate bool efl_gfx_image_smooth_scale_get_api_delegate(System.IntPtr obj);
803 public static Efl.Eo.FunctionWrapper<efl_gfx_image_smooth_scale_get_api_delegate> efl_gfx_image_smooth_scale_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_smooth_scale_get_api_delegate>(Module, "efl_gfx_image_smooth_scale_get");
805 private static bool smooth_scale_get(System.IntPtr obj, System.IntPtr pd)
807 Eina.Log.Debug("function efl_gfx_image_smooth_scale_get was called");
808 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
811 bool _ret_var = default(bool);
814 _ret_var = ((IImage)ws.Target).GetSmoothScale();
818 Eina.Log.Warning($"Callback error: {e.ToString()}");
819 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
827 return efl_gfx_image_smooth_scale_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
831 private static efl_gfx_image_smooth_scale_get_delegate efl_gfx_image_smooth_scale_get_static_delegate;
834 private delegate void efl_gfx_image_smooth_scale_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool smooth_scale);
837 public delegate void efl_gfx_image_smooth_scale_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool smooth_scale);
839 public static Efl.Eo.FunctionWrapper<efl_gfx_image_smooth_scale_set_api_delegate> efl_gfx_image_smooth_scale_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_smooth_scale_set_api_delegate>(Module, "efl_gfx_image_smooth_scale_set");
841 private static void smooth_scale_set(System.IntPtr obj, System.IntPtr pd, bool smooth_scale)
843 Eina.Log.Debug("function efl_gfx_image_smooth_scale_set was called");
844 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
850 ((IImage)ws.Target).SetSmoothScale(smooth_scale);
854 Eina.Log.Warning($"Callback error: {e.ToString()}");
855 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
862 efl_gfx_image_smooth_scale_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), smooth_scale);
866 private static efl_gfx_image_smooth_scale_set_delegate efl_gfx_image_smooth_scale_set_static_delegate;
869 private delegate Efl.Gfx.ImageScaleType efl_gfx_image_scale_type_get_delegate(System.IntPtr obj, System.IntPtr pd);
872 public delegate Efl.Gfx.ImageScaleType efl_gfx_image_scale_type_get_api_delegate(System.IntPtr obj);
874 public static Efl.Eo.FunctionWrapper<efl_gfx_image_scale_type_get_api_delegate> efl_gfx_image_scale_type_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_scale_type_get_api_delegate>(Module, "efl_gfx_image_scale_type_get");
876 private static Efl.Gfx.ImageScaleType scale_type_get(System.IntPtr obj, System.IntPtr pd)
878 Eina.Log.Debug("function efl_gfx_image_scale_type_get was called");
879 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
882 Efl.Gfx.ImageScaleType _ret_var = default(Efl.Gfx.ImageScaleType);
885 _ret_var = ((IImage)ws.Target).GetScaleType();
889 Eina.Log.Warning($"Callback error: {e.ToString()}");
890 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
898 return efl_gfx_image_scale_type_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
902 private static efl_gfx_image_scale_type_get_delegate efl_gfx_image_scale_type_get_static_delegate;
905 private delegate void efl_gfx_image_scale_type_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.ImageScaleType scale_type);
908 public delegate void efl_gfx_image_scale_type_set_api_delegate(System.IntPtr obj, Efl.Gfx.ImageScaleType scale_type);
910 public static Efl.Eo.FunctionWrapper<efl_gfx_image_scale_type_set_api_delegate> efl_gfx_image_scale_type_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_scale_type_set_api_delegate>(Module, "efl_gfx_image_scale_type_set");
912 private static void scale_type_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.ImageScaleType scale_type)
914 Eina.Log.Debug("function efl_gfx_image_scale_type_set was called");
915 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
921 ((IImage)ws.Target).SetScaleType(scale_type);
925 Eina.Log.Warning($"Callback error: {e.ToString()}");
926 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
933 efl_gfx_image_scale_type_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), scale_type);
937 private static efl_gfx_image_scale_type_set_delegate efl_gfx_image_scale_type_set_static_delegate;
940 private delegate double efl_gfx_image_ratio_get_delegate(System.IntPtr obj, System.IntPtr pd);
943 public delegate double efl_gfx_image_ratio_get_api_delegate(System.IntPtr obj);
945 public static Efl.Eo.FunctionWrapper<efl_gfx_image_ratio_get_api_delegate> efl_gfx_image_ratio_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_ratio_get_api_delegate>(Module, "efl_gfx_image_ratio_get");
947 private static double ratio_get(System.IntPtr obj, System.IntPtr pd)
949 Eina.Log.Debug("function efl_gfx_image_ratio_get was called");
950 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
953 double _ret_var = default(double);
956 _ret_var = ((IImage)ws.Target).GetRatio();
960 Eina.Log.Warning($"Callback error: {e.ToString()}");
961 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
969 return efl_gfx_image_ratio_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
973 private static efl_gfx_image_ratio_get_delegate efl_gfx_image_ratio_get_static_delegate;
976 private delegate void efl_gfx_image_border_get_delegate(System.IntPtr obj, System.IntPtr pd, out int l, out int r, out int t, out int b);
979 public delegate void efl_gfx_image_border_get_api_delegate(System.IntPtr obj, out int l, out int r, out int t, out int b);
981 public static Efl.Eo.FunctionWrapper<efl_gfx_image_border_get_api_delegate> efl_gfx_image_border_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_border_get_api_delegate>(Module, "efl_gfx_image_border_get");
983 private static void border_get(System.IntPtr obj, System.IntPtr pd, out int l, out int r, out int t, out int b)
985 Eina.Log.Debug("function efl_gfx_image_border_get was called");
986 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
989 l = default(int); r = default(int); t = default(int); b = default(int);
992 ((IImage)ws.Target).GetBorder(out l, out r, out t, out b);
996 Eina.Log.Warning($"Callback error: {e.ToString()}");
997 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1004 efl_gfx_image_border_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out l, out r, out t, out b);
1008 private static efl_gfx_image_border_get_delegate efl_gfx_image_border_get_static_delegate;
1011 private delegate void efl_gfx_image_border_set_delegate(System.IntPtr obj, System.IntPtr pd, int l, int r, int t, int b);
1014 public delegate void efl_gfx_image_border_set_api_delegate(System.IntPtr obj, int l, int r, int t, int b);
1016 public static Efl.Eo.FunctionWrapper<efl_gfx_image_border_set_api_delegate> efl_gfx_image_border_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_border_set_api_delegate>(Module, "efl_gfx_image_border_set");
1018 private static void border_set(System.IntPtr obj, System.IntPtr pd, int l, int r, int t, int b)
1020 Eina.Log.Debug("function efl_gfx_image_border_set was called");
1021 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1027 ((IImage)ws.Target).SetBorder(l, r, t, b);
1031 Eina.Log.Warning($"Callback error: {e.ToString()}");
1032 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1039 efl_gfx_image_border_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), l, r, t, b);
1043 private static efl_gfx_image_border_set_delegate efl_gfx_image_border_set_static_delegate;
1046 private delegate double efl_gfx_image_border_scale_get_delegate(System.IntPtr obj, System.IntPtr pd);
1049 public delegate double efl_gfx_image_border_scale_get_api_delegate(System.IntPtr obj);
1051 public static Efl.Eo.FunctionWrapper<efl_gfx_image_border_scale_get_api_delegate> efl_gfx_image_border_scale_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_border_scale_get_api_delegate>(Module, "efl_gfx_image_border_scale_get");
1053 private static double border_scale_get(System.IntPtr obj, System.IntPtr pd)
1055 Eina.Log.Debug("function efl_gfx_image_border_scale_get was called");
1056 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1059 double _ret_var = default(double);
1062 _ret_var = ((IImage)ws.Target).GetBorderScale();
1066 Eina.Log.Warning($"Callback error: {e.ToString()}");
1067 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1075 return efl_gfx_image_border_scale_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1079 private static efl_gfx_image_border_scale_get_delegate efl_gfx_image_border_scale_get_static_delegate;
1082 private delegate void efl_gfx_image_border_scale_set_delegate(System.IntPtr obj, System.IntPtr pd, double scale);
1085 public delegate void efl_gfx_image_border_scale_set_api_delegate(System.IntPtr obj, double scale);
1087 public static Efl.Eo.FunctionWrapper<efl_gfx_image_border_scale_set_api_delegate> efl_gfx_image_border_scale_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_border_scale_set_api_delegate>(Module, "efl_gfx_image_border_scale_set");
1089 private static void border_scale_set(System.IntPtr obj, System.IntPtr pd, double scale)
1091 Eina.Log.Debug("function efl_gfx_image_border_scale_set was called");
1092 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1098 ((IImage)ws.Target).SetBorderScale(scale);
1102 Eina.Log.Warning($"Callback error: {e.ToString()}");
1103 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1110 efl_gfx_image_border_scale_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), scale);
1114 private static efl_gfx_image_border_scale_set_delegate efl_gfx_image_border_scale_set_static_delegate;
1117 private delegate Efl.Gfx.BorderFillMode efl_gfx_image_border_center_fill_get_delegate(System.IntPtr obj, System.IntPtr pd);
1120 public delegate Efl.Gfx.BorderFillMode efl_gfx_image_border_center_fill_get_api_delegate(System.IntPtr obj);
1122 public static Efl.Eo.FunctionWrapper<efl_gfx_image_border_center_fill_get_api_delegate> efl_gfx_image_border_center_fill_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_border_center_fill_get_api_delegate>(Module, "efl_gfx_image_border_center_fill_get");
1124 private static Efl.Gfx.BorderFillMode border_center_fill_get(System.IntPtr obj, System.IntPtr pd)
1126 Eina.Log.Debug("function efl_gfx_image_border_center_fill_get was called");
1127 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1130 Efl.Gfx.BorderFillMode _ret_var = default(Efl.Gfx.BorderFillMode);
1133 _ret_var = ((IImage)ws.Target).GetBorderCenterFill();
1137 Eina.Log.Warning($"Callback error: {e.ToString()}");
1138 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1146 return efl_gfx_image_border_center_fill_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1150 private static efl_gfx_image_border_center_fill_get_delegate efl_gfx_image_border_center_fill_get_static_delegate;
1153 private delegate void efl_gfx_image_border_center_fill_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.BorderFillMode fill);
1156 public delegate void efl_gfx_image_border_center_fill_set_api_delegate(System.IntPtr obj, Efl.Gfx.BorderFillMode fill);
1158 public static Efl.Eo.FunctionWrapper<efl_gfx_image_border_center_fill_set_api_delegate> efl_gfx_image_border_center_fill_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_border_center_fill_set_api_delegate>(Module, "efl_gfx_image_border_center_fill_set");
1160 private static void border_center_fill_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.BorderFillMode fill)
1162 Eina.Log.Debug("function efl_gfx_image_border_center_fill_set was called");
1163 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1169 ((IImage)ws.Target).SetBorderCenterFill(fill);
1173 Eina.Log.Warning($"Callback error: {e.ToString()}");
1174 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1181 efl_gfx_image_border_center_fill_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), fill);
1185 private static efl_gfx_image_border_center_fill_set_delegate efl_gfx_image_border_center_fill_set_static_delegate;
1188 private delegate Eina.Size2D.NativeStruct efl_gfx_image_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
1191 public delegate Eina.Size2D.NativeStruct efl_gfx_image_size_get_api_delegate(System.IntPtr obj);
1193 public static Efl.Eo.FunctionWrapper<efl_gfx_image_size_get_api_delegate> efl_gfx_image_size_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_size_get_api_delegate>(Module, "efl_gfx_image_size_get");
1195 private static Eina.Size2D.NativeStruct image_size_get(System.IntPtr obj, System.IntPtr pd)
1197 Eina.Log.Debug("function efl_gfx_image_size_get was called");
1198 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1201 Eina.Size2D _ret_var = default(Eina.Size2D);
1204 _ret_var = ((IImage)ws.Target).GetImageSize();
1208 Eina.Log.Warning($"Callback error: {e.ToString()}");
1209 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1217 return efl_gfx_image_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1221 private static efl_gfx_image_size_get_delegate efl_gfx_image_size_get_static_delegate;
1224 private delegate Efl.Gfx.ImageContentHint efl_gfx_image_content_hint_get_delegate(System.IntPtr obj, System.IntPtr pd);
1227 public delegate Efl.Gfx.ImageContentHint efl_gfx_image_content_hint_get_api_delegate(System.IntPtr obj);
1229 public static Efl.Eo.FunctionWrapper<efl_gfx_image_content_hint_get_api_delegate> efl_gfx_image_content_hint_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_content_hint_get_api_delegate>(Module, "efl_gfx_image_content_hint_get");
1231 private static Efl.Gfx.ImageContentHint content_hint_get(System.IntPtr obj, System.IntPtr pd)
1233 Eina.Log.Debug("function efl_gfx_image_content_hint_get was called");
1234 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1237 Efl.Gfx.ImageContentHint _ret_var = default(Efl.Gfx.ImageContentHint);
1240 _ret_var = ((IImage)ws.Target).GetContentHint();
1244 Eina.Log.Warning($"Callback error: {e.ToString()}");
1245 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1253 return efl_gfx_image_content_hint_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1257 private static efl_gfx_image_content_hint_get_delegate efl_gfx_image_content_hint_get_static_delegate;
1260 private delegate void efl_gfx_image_content_hint_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.ImageContentHint hint);
1263 public delegate void efl_gfx_image_content_hint_set_api_delegate(System.IntPtr obj, Efl.Gfx.ImageContentHint hint);
1265 public static Efl.Eo.FunctionWrapper<efl_gfx_image_content_hint_set_api_delegate> efl_gfx_image_content_hint_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_content_hint_set_api_delegate>(Module, "efl_gfx_image_content_hint_set");
1267 private static void content_hint_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.ImageContentHint hint)
1269 Eina.Log.Debug("function efl_gfx_image_content_hint_set was called");
1270 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1276 ((IImage)ws.Target).SetContentHint(hint);
1280 Eina.Log.Warning($"Callback error: {e.ToString()}");
1281 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1288 efl_gfx_image_content_hint_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), hint);
1292 private static efl_gfx_image_content_hint_set_delegate efl_gfx_image_content_hint_set_static_delegate;
1295 private delegate Efl.Gfx.ImageScaleHint efl_gfx_image_scale_hint_get_delegate(System.IntPtr obj, System.IntPtr pd);
1298 public delegate Efl.Gfx.ImageScaleHint efl_gfx_image_scale_hint_get_api_delegate(System.IntPtr obj);
1300 public static Efl.Eo.FunctionWrapper<efl_gfx_image_scale_hint_get_api_delegate> efl_gfx_image_scale_hint_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_scale_hint_get_api_delegate>(Module, "efl_gfx_image_scale_hint_get");
1302 private static Efl.Gfx.ImageScaleHint scale_hint_get(System.IntPtr obj, System.IntPtr pd)
1304 Eina.Log.Debug("function efl_gfx_image_scale_hint_get was called");
1305 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1308 Efl.Gfx.ImageScaleHint _ret_var = default(Efl.Gfx.ImageScaleHint);
1311 _ret_var = ((IImage)ws.Target).GetScaleHint();
1315 Eina.Log.Warning($"Callback error: {e.ToString()}");
1316 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1324 return efl_gfx_image_scale_hint_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1328 private static efl_gfx_image_scale_hint_get_delegate efl_gfx_image_scale_hint_get_static_delegate;
1331 private delegate void efl_gfx_image_scale_hint_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.ImageScaleHint hint);
1334 public delegate void efl_gfx_image_scale_hint_set_api_delegate(System.IntPtr obj, Efl.Gfx.ImageScaleHint hint);
1336 public static Efl.Eo.FunctionWrapper<efl_gfx_image_scale_hint_set_api_delegate> efl_gfx_image_scale_hint_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_scale_hint_set_api_delegate>(Module, "efl_gfx_image_scale_hint_set");
1338 private static void scale_hint_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.ImageScaleHint hint)
1340 Eina.Log.Debug("function efl_gfx_image_scale_hint_set was called");
1341 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1347 ((IImage)ws.Target).SetScaleHint(hint);
1351 Eina.Log.Warning($"Callback error: {e.ToString()}");
1352 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1359 efl_gfx_image_scale_hint_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), hint);
1363 private static efl_gfx_image_scale_hint_set_delegate efl_gfx_image_scale_hint_set_static_delegate;
1366 private delegate Eina.Error efl_gfx_image_load_error_get_delegate(System.IntPtr obj, System.IntPtr pd);
1369 public delegate Eina.Error efl_gfx_image_load_error_get_api_delegate(System.IntPtr obj);
1371 public static Efl.Eo.FunctionWrapper<efl_gfx_image_load_error_get_api_delegate> efl_gfx_image_load_error_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_image_load_error_get_api_delegate>(Module, "efl_gfx_image_load_error_get");
1373 private static Eina.Error image_load_error_get(System.IntPtr obj, System.IntPtr pd)
1375 Eina.Log.Debug("function efl_gfx_image_load_error_get was called");
1376 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
1379 Eina.Error _ret_var = default(Eina.Error);
1382 _ret_var = ((IImage)ws.Target).GetImageLoadError();
1386 Eina.Log.Warning($"Callback error: {e.ToString()}");
1387 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1395 return efl_gfx_image_load_error_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1399 private static efl_gfx_image_load_error_get_delegate efl_gfx_image_load_error_get_static_delegate;
1401 #pragma warning restore CA1707, CS1591, SA1300, SA1600
1413 /// <summary>How an image's data is to be treated by EFL, for optimization.</summary>
1414 public enum ImageContentHint
1416 /// <summary>No hint on the content (default).</summary>
1418 /// <summary>The content will change over time.</summary>
1420 /// <summary>The content won't change over time.</summary>
1432 /// <summary>How an image's data is to be treated by EFL, with regard to scaling cache.</summary>
1433 public enum ImageScaleHint
1435 /// <summary>No hint on the scaling (default).</summary>
1437 /// <summary>Image will be re-scaled over time, thus turning scaling cache OFF for its data.</summary>
1439 /// <summary>Image will not be re-scaled over time, thus turning scaling cache ON for its data.</summary>
1451 /// <summary>Enumeration that defines scale types of an image.</summary>
1452 public enum ImageScaleType
1454 /// <summary>Scale the image so that it matches the object's area exactly. The image's aspect ratio might be changed.</summary>
1456 /// <summary>Scale the image so that it fits inside the object's area while maintaining the aspect ratio. At least one of the dimensions of the image should be equal to the corresponding dimension of the object.</summary>
1458 /// <summary>Scale the image so that it covers the entire object area while maintaining the aspect ratio. At least one of the dimensions of the image should be equal to the corresponding dimension of the object.</summary>
1460 /// <summary>Tile image at its original size.</summary>
1462 /// <summary>Not scale the image</summary>