1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>Efl UI zoom interface</summary>
10 public interface Zoom :
11 Efl.Eo.IWrapper, IDisposable
13 /// <summary>This sets the zoom animation state to on or off for zoomable. The default is off. When <c>paused</c> is <c>true</c>, it will stop zooming using animation on zoom level changes and change instantly, stopping any existing animations that are running.</summary>
14 /// <returns>The paused state.</returns>
15 bool GetZoomAnimation();
16 /// <summary>This sets the zoom animation state to on or off for zoomable. The default is off. When <c>paused</c> is <c>true</c>, it will stop zooming using animation on zoom level changes and change instantly, stopping any existing animations that are running.</summary>
17 /// <param name="paused">The paused state.</param>
18 /// <returns></returns>
19 void SetZoomAnimation( bool paused);
20 /// <summary>Get the zoom level of the photo
21 /// This returns the current zoom level of the zoomable object. Note that if you set the fill mode to other than #EFL_UI_ZOOM_MODE_MANUAL (which is the default), the zoom level may be changed at any time by the zoomable object itself to account for photo size and zoomable viewport size.</summary>
22 /// <returns>The zoom level to set</returns>
23 double GetZoomLevel();
24 /// <summary>Set the zoom level of the photo
25 /// This sets the zoom level. If <c>zoom</c> is 1, it means no zoom. If it's smaller than 1, it means zoom in. If it's bigger than 1, it means zoom out. For example, <c>zoom</c> 1 will be 1:1 pixel for pixel. <c>zoom</c> 2 will be 2:1 (that is 2x2 photo pixels will display as 1 on-screen pixel) which is a zoom out. 4:1 will be 4x4 photo pixels as 1 screen pixel, and so on. The <c>zoom</c> parameter must be greater than 0. It is suggested to stick to powers of 2. (1, 2, 4, 8, 16, 32, etc.).</summary>
26 /// <param name="zoom">The zoom level to set</param>
27 /// <returns></returns>
28 void SetZoomLevel( double zoom);
29 /// <summary>Get the zoom mode
30 /// This gets the current zoom mode of the zoomable object.</summary>
31 /// <returns>The zoom mode.</returns>
32 Efl.Ui.ZoomMode GetZoomMode();
33 /// <summary>Set the zoom mode
34 /// This sets the zoom mode to manual or one of several automatic levels. Manual (EFL_UI_ZOOM_MODE_MANUAL) means that zoom is set manually by <see cref="Efl.Ui.Zoom.SetZoomLevel"/> and will stay at that level until changed by code or until zoom mode is changed. This is the default mode. The Automatic modes will allow the zoomable object to automatically adjust zoom mode based on properties.
36 /// #EFL_UI_ZOOM_MODE_AUTO_FIT) will adjust zoom so the photo fits EXACTLY inside the scroll frame with no pixels outside this region. #EFL_UI_ZOOM_MODE_AUTO_FILL will be similar but ensure no pixels within the frame are left unfilled.</summary>
37 /// <param name="mode">The zoom mode.</param>
38 /// <returns></returns>
39 void SetZoomMode( Efl.Ui.ZoomMode mode);
40 /// <summary>Called when zooming started</summary>
41 event EventHandler ZoomStartEvt;
42 /// <summary>Called when zooming stopped</summary>
43 event EventHandler ZoomStopEvt;
44 /// <summary>Called when zooming changed</summary>
45 event EventHandler ZoomChangeEvt;
46 /// <summary>This sets the zoom animation state to on or off for zoomable. The default is off. When <c>paused</c> is <c>true</c>, it will stop zooming using animation on zoom level changes and change instantly, stopping any existing animations that are running.</summary>
47 /// <value>The paused state.</value>
52 /// <summary>Get the zoom level of the photo
53 /// This returns the current zoom level of the zoomable object. Note that if you set the fill mode to other than #EFL_UI_ZOOM_MODE_MANUAL (which is the default), the zoom level may be changed at any time by the zoomable object itself to account for photo size and zoomable viewport size.</summary>
54 /// <value>The zoom level to set</value>
59 /// <summary>Get the zoom mode
60 /// This gets the current zoom mode of the zoomable object.</summary>
61 /// <value>The zoom mode.</value>
62 Efl.Ui.ZoomMode ZoomMode {
67 /// <summary>Efl UI zoom interface</summary>
68 sealed public class ZoomConcrete :
73 ///<summary>Pointer to the native class description.</summary>
74 public System.IntPtr NativeClass {
76 if (((object)this).GetType() == typeof (ZoomConcrete))
77 return Efl.Ui.ZoomNativeInherit.GetEflClassStatic();
79 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
82 private EventHandlerList eventHandlers = new EventHandlerList();
83 private System.IntPtr handle;
84 ///<summary>Pointer to the native instance.</summary>
85 public System.IntPtr NativeHandle {
86 get { return handle; }
88 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
89 efl_ui_zoom_interface_get();
90 ///<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>
91 public ZoomConcrete(System.IntPtr raw)
94 register_event_proxies();
96 ///<summary>Destructor.</summary>
101 ///<summary>Releases the underlying native instance.</summary>
102 void Dispose(bool disposing)
104 if (handle != System.IntPtr.Zero) {
105 Efl.Eo.Globals.efl_unref(handle);
106 handle = System.IntPtr.Zero;
109 ///<summary>Releases the underlying native instance.</summary>
110 public void Dispose()
113 GC.SuppressFinalize(this);
115 ///<summary>Casts obj into an instance of this type.</summary>
116 public static ZoomConcrete static_cast(Efl.Object obj)
119 throw new System.ArgumentNullException("obj");
120 return new ZoomConcrete(obj.NativeHandle);
122 ///<summary>Verifies if the given object is equal to this one.</summary>
123 public override bool Equals(object obj)
125 var other = obj as Efl.Object;
128 return this.NativeHandle == other.NativeHandle;
130 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
131 public override int GetHashCode()
133 return this.NativeHandle.ToInt32();
135 ///<summary>Turns the native pointer into a string representation.</summary>
136 public override String ToString()
138 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
140 private readonly object eventLock = new object();
141 private Dictionary<string, int> event_cb_count = new Dictionary<string, int>();
142 private bool add_cpp_event_handler(string lib, string key, Efl.EventCb evt_delegate) {
144 if (!event_cb_count.TryGetValue(key, out event_count))
145 event_cb_count[key] = event_count;
146 if (event_count == 0) {
147 IntPtr desc = Efl.EventDescription.GetNative(lib, key);
148 if (desc == IntPtr.Zero) {
149 Eina.Log.Error($"Failed to get native event {key}");
152 bool result = Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);
154 Eina.Log.Error($"Failed to add event proxy for event {key}");
157 Eina.Error.RaiseIfUnhandledException();
159 event_cb_count[key]++;
162 private bool remove_cpp_event_handler(string key, Efl.EventCb evt_delegate) {
164 if (!event_cb_count.TryGetValue(key, out event_count))
165 event_cb_count[key] = event_count;
166 if (event_count == 1) {
167 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
168 if (desc == IntPtr.Zero) {
169 Eina.Log.Error($"Failed to get native event {key}");
172 bool result = Efl.Eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);
174 Eina.Log.Error($"Failed to remove event proxy for event {key}");
177 Eina.Error.RaiseIfUnhandledException();
178 } else if (event_count == 0) {
179 Eina.Log.Error($"Trying to remove proxy for event {key} when there is nothing registered.");
182 event_cb_count[key]--;
185 private static object ZoomStartEvtKey = new object();
186 /// <summary>Called when zooming started</summary>
187 public event EventHandler ZoomStartEvt
191 string key = "_EFL_UI_EVENT_ZOOM_START";
192 if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_ZoomStartEvt_delegate)) {
193 eventHandlers.AddHandler(ZoomStartEvtKey , value);
195 Eina.Log.Error($"Error adding proxy for event {key}");
200 string key = "_EFL_UI_EVENT_ZOOM_START";
201 if (remove_cpp_event_handler(key, this.evt_ZoomStartEvt_delegate)) {
202 eventHandlers.RemoveHandler(ZoomStartEvtKey , value);
204 Eina.Log.Error($"Error removing proxy for event {key}");
208 ///<summary>Method to raise event ZoomStartEvt.</summary>
209 public void On_ZoomStartEvt(EventArgs e)
213 evt = (EventHandler)eventHandlers[ZoomStartEvtKey];
215 evt?.Invoke(this, e);
217 Efl.EventCb evt_ZoomStartEvt_delegate;
218 private void on_ZoomStartEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
220 EventArgs args = EventArgs.Empty;
222 On_ZoomStartEvt(args);
223 } catch (Exception e) {
224 Eina.Log.Error(e.ToString());
225 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
229 private static object ZoomStopEvtKey = new object();
230 /// <summary>Called when zooming stopped</summary>
231 public event EventHandler ZoomStopEvt
235 string key = "_EFL_UI_EVENT_ZOOM_STOP";
236 if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_ZoomStopEvt_delegate)) {
237 eventHandlers.AddHandler(ZoomStopEvtKey , value);
239 Eina.Log.Error($"Error adding proxy for event {key}");
244 string key = "_EFL_UI_EVENT_ZOOM_STOP";
245 if (remove_cpp_event_handler(key, this.evt_ZoomStopEvt_delegate)) {
246 eventHandlers.RemoveHandler(ZoomStopEvtKey , value);
248 Eina.Log.Error($"Error removing proxy for event {key}");
252 ///<summary>Method to raise event ZoomStopEvt.</summary>
253 public void On_ZoomStopEvt(EventArgs e)
257 evt = (EventHandler)eventHandlers[ZoomStopEvtKey];
259 evt?.Invoke(this, e);
261 Efl.EventCb evt_ZoomStopEvt_delegate;
262 private void on_ZoomStopEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
264 EventArgs args = EventArgs.Empty;
266 On_ZoomStopEvt(args);
267 } catch (Exception e) {
268 Eina.Log.Error(e.ToString());
269 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
273 private static object ZoomChangeEvtKey = new object();
274 /// <summary>Called when zooming changed</summary>
275 public event EventHandler ZoomChangeEvt
279 string key = "_EFL_UI_EVENT_ZOOM_CHANGE";
280 if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_ZoomChangeEvt_delegate)) {
281 eventHandlers.AddHandler(ZoomChangeEvtKey , value);
283 Eina.Log.Error($"Error adding proxy for event {key}");
288 string key = "_EFL_UI_EVENT_ZOOM_CHANGE";
289 if (remove_cpp_event_handler(key, this.evt_ZoomChangeEvt_delegate)) {
290 eventHandlers.RemoveHandler(ZoomChangeEvtKey , value);
292 Eina.Log.Error($"Error removing proxy for event {key}");
296 ///<summary>Method to raise event ZoomChangeEvt.</summary>
297 public void On_ZoomChangeEvt(EventArgs e)
301 evt = (EventHandler)eventHandlers[ZoomChangeEvtKey];
303 evt?.Invoke(this, e);
305 Efl.EventCb evt_ZoomChangeEvt_delegate;
306 private void on_ZoomChangeEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
308 EventArgs args = EventArgs.Empty;
310 On_ZoomChangeEvt(args);
311 } catch (Exception e) {
312 Eina.Log.Error(e.ToString());
313 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317 void register_event_proxies()
319 evt_ZoomStartEvt_delegate = new Efl.EventCb(on_ZoomStartEvt_NativeCallback);
320 evt_ZoomStopEvt_delegate = new Efl.EventCb(on_ZoomStopEvt_NativeCallback);
321 evt_ZoomChangeEvt_delegate = new Efl.EventCb(on_ZoomChangeEvt_NativeCallback);
323 /// <summary>This sets the zoom animation state to on or off for zoomable. The default is off. When <c>paused</c> is <c>true</c>, it will stop zooming using animation on zoom level changes and change instantly, stopping any existing animations that are running.</summary>
324 /// <returns>The paused state.</returns>
325 public bool GetZoomAnimation() {
326 var _ret_var = Efl.Ui.ZoomNativeInherit.efl_ui_zoom_animation_get_ptr.Value.Delegate(this.NativeHandle);
327 Eina.Error.RaiseIfUnhandledException();
330 /// <summary>This sets the zoom animation state to on or off for zoomable. The default is off. When <c>paused</c> is <c>true</c>, it will stop zooming using animation on zoom level changes and change instantly, stopping any existing animations that are running.</summary>
331 /// <param name="paused">The paused state.</param>
332 /// <returns></returns>
333 public void SetZoomAnimation( bool paused) {
334 Efl.Ui.ZoomNativeInherit.efl_ui_zoom_animation_set_ptr.Value.Delegate(this.NativeHandle, paused);
335 Eina.Error.RaiseIfUnhandledException();
337 /// <summary>Get the zoom level of the photo
338 /// This returns the current zoom level of the zoomable object. Note that if you set the fill mode to other than #EFL_UI_ZOOM_MODE_MANUAL (which is the default), the zoom level may be changed at any time by the zoomable object itself to account for photo size and zoomable viewport size.</summary>
339 /// <returns>The zoom level to set</returns>
340 public double GetZoomLevel() {
341 var _ret_var = Efl.Ui.ZoomNativeInherit.efl_ui_zoom_level_get_ptr.Value.Delegate(this.NativeHandle);
342 Eina.Error.RaiseIfUnhandledException();
345 /// <summary>Set the zoom level of the photo
346 /// This sets the zoom level. If <c>zoom</c> is 1, it means no zoom. If it's smaller than 1, it means zoom in. If it's bigger than 1, it means zoom out. For example, <c>zoom</c> 1 will be 1:1 pixel for pixel. <c>zoom</c> 2 will be 2:1 (that is 2x2 photo pixels will display as 1 on-screen pixel) which is a zoom out. 4:1 will be 4x4 photo pixels as 1 screen pixel, and so on. The <c>zoom</c> parameter must be greater than 0. It is suggested to stick to powers of 2. (1, 2, 4, 8, 16, 32, etc.).</summary>
347 /// <param name="zoom">The zoom level to set</param>
348 /// <returns></returns>
349 public void SetZoomLevel( double zoom) {
350 Efl.Ui.ZoomNativeInherit.efl_ui_zoom_level_set_ptr.Value.Delegate(this.NativeHandle, zoom);
351 Eina.Error.RaiseIfUnhandledException();
353 /// <summary>Get the zoom mode
354 /// This gets the current zoom mode of the zoomable object.</summary>
355 /// <returns>The zoom mode.</returns>
356 public Efl.Ui.ZoomMode GetZoomMode() {
357 var _ret_var = Efl.Ui.ZoomNativeInherit.efl_ui_zoom_mode_get_ptr.Value.Delegate(this.NativeHandle);
358 Eina.Error.RaiseIfUnhandledException();
361 /// <summary>Set the zoom mode
362 /// This sets the zoom mode to manual or one of several automatic levels. Manual (EFL_UI_ZOOM_MODE_MANUAL) means that zoom is set manually by <see cref="Efl.Ui.Zoom.SetZoomLevel"/> and will stay at that level until changed by code or until zoom mode is changed. This is the default mode. The Automatic modes will allow the zoomable object to automatically adjust zoom mode based on properties.
364 /// #EFL_UI_ZOOM_MODE_AUTO_FIT) will adjust zoom so the photo fits EXACTLY inside the scroll frame with no pixels outside this region. #EFL_UI_ZOOM_MODE_AUTO_FILL will be similar but ensure no pixels within the frame are left unfilled.</summary>
365 /// <param name="mode">The zoom mode.</param>
366 /// <returns></returns>
367 public void SetZoomMode( Efl.Ui.ZoomMode mode) {
368 Efl.Ui.ZoomNativeInherit.efl_ui_zoom_mode_set_ptr.Value.Delegate(this.NativeHandle, mode);
369 Eina.Error.RaiseIfUnhandledException();
371 /// <summary>This sets the zoom animation state to on or off for zoomable. The default is off. When <c>paused</c> is <c>true</c>, it will stop zooming using animation on zoom level changes and change instantly, stopping any existing animations that are running.</summary>
372 /// <value>The paused state.</value>
373 public bool ZoomAnimation {
374 get { return GetZoomAnimation(); }
375 set { SetZoomAnimation( value); }
377 /// <summary>Get the zoom level of the photo
378 /// This returns the current zoom level of the zoomable object. Note that if you set the fill mode to other than #EFL_UI_ZOOM_MODE_MANUAL (which is the default), the zoom level may be changed at any time by the zoomable object itself to account for photo size and zoomable viewport size.</summary>
379 /// <value>The zoom level to set</value>
380 public double ZoomLevel {
381 get { return GetZoomLevel(); }
382 set { SetZoomLevel( value); }
384 /// <summary>Get the zoom mode
385 /// This gets the current zoom mode of the zoomable object.</summary>
386 /// <value>The zoom mode.</value>
387 public Efl.Ui.ZoomMode ZoomMode {
388 get { return GetZoomMode(); }
389 set { SetZoomMode( value); }
392 public class ZoomNativeInherit : Efl.Eo.NativeClass{
393 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
394 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
396 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
397 if (efl_ui_zoom_animation_get_static_delegate == null)
398 efl_ui_zoom_animation_get_static_delegate = new efl_ui_zoom_animation_get_delegate(zoom_animation_get);
399 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_zoom_animation_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_zoom_animation_get_static_delegate)});
400 if (efl_ui_zoom_animation_set_static_delegate == null)
401 efl_ui_zoom_animation_set_static_delegate = new efl_ui_zoom_animation_set_delegate(zoom_animation_set);
402 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_zoom_animation_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_zoom_animation_set_static_delegate)});
403 if (efl_ui_zoom_level_get_static_delegate == null)
404 efl_ui_zoom_level_get_static_delegate = new efl_ui_zoom_level_get_delegate(zoom_level_get);
405 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_zoom_level_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_zoom_level_get_static_delegate)});
406 if (efl_ui_zoom_level_set_static_delegate == null)
407 efl_ui_zoom_level_set_static_delegate = new efl_ui_zoom_level_set_delegate(zoom_level_set);
408 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_zoom_level_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_zoom_level_set_static_delegate)});
409 if (efl_ui_zoom_mode_get_static_delegate == null)
410 efl_ui_zoom_mode_get_static_delegate = new efl_ui_zoom_mode_get_delegate(zoom_mode_get);
411 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_zoom_mode_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_zoom_mode_get_static_delegate)});
412 if (efl_ui_zoom_mode_set_static_delegate == null)
413 efl_ui_zoom_mode_set_static_delegate = new efl_ui_zoom_mode_set_delegate(zoom_mode_set);
414 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_zoom_mode_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_zoom_mode_set_static_delegate)});
417 public override IntPtr GetEflClass()
419 return Efl.Ui.ZoomConcrete.efl_ui_zoom_interface_get();
421 public static IntPtr GetEflClassStatic()
423 return Efl.Ui.ZoomConcrete.efl_ui_zoom_interface_get();
427 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_ui_zoom_animation_get_delegate(System.IntPtr obj, System.IntPtr pd);
430 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_ui_zoom_animation_get_api_delegate(System.IntPtr obj);
431 public static Efl.Eo.FunctionWrapper<efl_ui_zoom_animation_get_api_delegate> efl_ui_zoom_animation_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_zoom_animation_get_api_delegate>(_Module, "efl_ui_zoom_animation_get");
432 private static bool zoom_animation_get(System.IntPtr obj, System.IntPtr pd)
434 Eina.Log.Debug("function efl_ui_zoom_animation_get was called");
435 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
436 if(wrapper != null) {
437 bool _ret_var = default(bool);
439 _ret_var = ((Zoom)wrapper).GetZoomAnimation();
440 } catch (Exception e) {
441 Eina.Log.Warning($"Callback error: {e.ToString()}");
442 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
446 return efl_ui_zoom_animation_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
449 private static efl_ui_zoom_animation_get_delegate efl_ui_zoom_animation_get_static_delegate;
452 private delegate void efl_ui_zoom_animation_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool paused);
455 public delegate void efl_ui_zoom_animation_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool paused);
456 public static Efl.Eo.FunctionWrapper<efl_ui_zoom_animation_set_api_delegate> efl_ui_zoom_animation_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_zoom_animation_set_api_delegate>(_Module, "efl_ui_zoom_animation_set");
457 private static void zoom_animation_set(System.IntPtr obj, System.IntPtr pd, bool paused)
459 Eina.Log.Debug("function efl_ui_zoom_animation_set was called");
460 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
461 if(wrapper != null) {
464 ((Zoom)wrapper).SetZoomAnimation( paused);
465 } catch (Exception e) {
466 Eina.Log.Warning($"Callback error: {e.ToString()}");
467 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
470 efl_ui_zoom_animation_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), paused);
473 private static efl_ui_zoom_animation_set_delegate efl_ui_zoom_animation_set_static_delegate;
476 private delegate double efl_ui_zoom_level_get_delegate(System.IntPtr obj, System.IntPtr pd);
479 public delegate double efl_ui_zoom_level_get_api_delegate(System.IntPtr obj);
480 public static Efl.Eo.FunctionWrapper<efl_ui_zoom_level_get_api_delegate> efl_ui_zoom_level_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_zoom_level_get_api_delegate>(_Module, "efl_ui_zoom_level_get");
481 private static double zoom_level_get(System.IntPtr obj, System.IntPtr pd)
483 Eina.Log.Debug("function efl_ui_zoom_level_get was called");
484 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
485 if(wrapper != null) {
486 double _ret_var = default(double);
488 _ret_var = ((Zoom)wrapper).GetZoomLevel();
489 } catch (Exception e) {
490 Eina.Log.Warning($"Callback error: {e.ToString()}");
491 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
495 return efl_ui_zoom_level_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
498 private static efl_ui_zoom_level_get_delegate efl_ui_zoom_level_get_static_delegate;
501 private delegate void efl_ui_zoom_level_set_delegate(System.IntPtr obj, System.IntPtr pd, double zoom);
504 public delegate void efl_ui_zoom_level_set_api_delegate(System.IntPtr obj, double zoom);
505 public static Efl.Eo.FunctionWrapper<efl_ui_zoom_level_set_api_delegate> efl_ui_zoom_level_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_zoom_level_set_api_delegate>(_Module, "efl_ui_zoom_level_set");
506 private static void zoom_level_set(System.IntPtr obj, System.IntPtr pd, double zoom)
508 Eina.Log.Debug("function efl_ui_zoom_level_set was called");
509 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
510 if(wrapper != null) {
513 ((Zoom)wrapper).SetZoomLevel( zoom);
514 } catch (Exception e) {
515 Eina.Log.Warning($"Callback error: {e.ToString()}");
516 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
519 efl_ui_zoom_level_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), zoom);
522 private static efl_ui_zoom_level_set_delegate efl_ui_zoom_level_set_static_delegate;
525 private delegate Efl.Ui.ZoomMode efl_ui_zoom_mode_get_delegate(System.IntPtr obj, System.IntPtr pd);
528 public delegate Efl.Ui.ZoomMode efl_ui_zoom_mode_get_api_delegate(System.IntPtr obj);
529 public static Efl.Eo.FunctionWrapper<efl_ui_zoom_mode_get_api_delegate> efl_ui_zoom_mode_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_zoom_mode_get_api_delegate>(_Module, "efl_ui_zoom_mode_get");
530 private static Efl.Ui.ZoomMode zoom_mode_get(System.IntPtr obj, System.IntPtr pd)
532 Eina.Log.Debug("function efl_ui_zoom_mode_get was called");
533 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
534 if(wrapper != null) {
535 Efl.Ui.ZoomMode _ret_var = default(Efl.Ui.ZoomMode);
537 _ret_var = ((Zoom)wrapper).GetZoomMode();
538 } catch (Exception e) {
539 Eina.Log.Warning($"Callback error: {e.ToString()}");
540 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
544 return efl_ui_zoom_mode_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
547 private static efl_ui_zoom_mode_get_delegate efl_ui_zoom_mode_get_static_delegate;
550 private delegate void efl_ui_zoom_mode_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Ui.ZoomMode mode);
553 public delegate void efl_ui_zoom_mode_set_api_delegate(System.IntPtr obj, Efl.Ui.ZoomMode mode);
554 public static Efl.Eo.FunctionWrapper<efl_ui_zoom_mode_set_api_delegate> efl_ui_zoom_mode_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_zoom_mode_set_api_delegate>(_Module, "efl_ui_zoom_mode_set");
555 private static void zoom_mode_set(System.IntPtr obj, System.IntPtr pd, Efl.Ui.ZoomMode mode)
557 Eina.Log.Debug("function efl_ui_zoom_mode_set was called");
558 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
559 if(wrapper != null) {
562 ((Zoom)wrapper).SetZoomMode( mode);
563 } catch (Exception e) {
564 Eina.Log.Warning($"Callback error: {e.ToString()}");
565 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
568 efl_ui_zoom_mode_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), mode);
571 private static efl_ui_zoom_mode_set_delegate efl_ui_zoom_mode_set_static_delegate;
574 namespace Efl { namespace Ui {
575 /// <summary>Types of zoom available.</summary>
578 /// <summary>Zoom controlled normally by efl_ui_zoom_set</summary>
580 /// <summary>Zoom until photo fits in zoomable object</summary>
582 /// <summary>Zoom until photo fills zoomable object</summary>
584 /// <summary>Zoom in until photo fits in zoomable object</summary>
586 /// <summary>Sentinel value to indicate last enum field during iteration</summary>