#define EFL_BETA #pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.Threading; using System.ComponentModel; namespace Efl { namespace Canvas { /// Low-level proxy image object. /// A proxy is a special kind of image containing the pixels from a source object attached to it. It can be used to apply some sort of image transformation to any object (eg. filters, map or zoom). /// This is a BETA class. It can be modified or removed in the future. Do not use it for product development. [Efl.Canvas.Proxy.NativeMethods] [Efl.Eo.BindingEntity] public class Proxy : Efl.Canvas.ImageInternal { /// Pointer to the native class description. public override System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(Proxy)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr efl_canvas_proxy_class_get(); /// Initializes a new instance of the class. /// Parent instance. public Proxy(Efl.Object parent= null ) : base(efl_canvas_proxy_class_get(), parent) { FinishInstantiation(); } /// Subclasses should override this constructor if they are expected to be instantiated from native code. /// Do not call this constructor directly. /// Tag struct storing the native handle of the object being constructed. protected Proxy(ConstructingHandle ch) : base(ch) { } /// Initializes a new instance of the class. /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. /// The native pointer to be wrapped. protected Proxy(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } /// Initializes a new instance of the class. /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly. /// The pointer to the base native Eo class. /// The Efl.Object parent of this instance. protected Proxy(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent) { } /// The source object for this proxy. /// The proxy object will mirror the rendering contents of a given source object in its drawing region, without affecting that source in any way. The source must be another valid . Other effects may be applied to the proxy, such as a map (see ) to create a reflection of the original object (for example). /// /// Any existing source object will be removed after this call. /// /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing. /// /// Warning: You cannot set a proxy as another proxy's source. /// Source object to use for the proxy. virtual public Efl.Canvas.Object GetSource() { var _ret_var = Efl.Canvas.Proxy.NativeMethods.efl_canvas_proxy_source_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// The source object for this proxy. /// The proxy object will mirror the rendering contents of a given source object in its drawing region, without affecting that source in any way. The source must be another valid . Other effects may be applied to the proxy, such as a map (see ) to create a reflection of the original object (for example). /// /// Any existing source object will be removed after this call. /// /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing. /// /// Warning: You cannot set a proxy as another proxy's source. /// Source object to use for the proxy. /// Returns true in case of success. virtual public bool SetSource(Efl.Canvas.Object src) { var _ret_var = Efl.Canvas.Proxy.NativeMethods.efl_canvas_proxy_source_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),src); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Clip this proxy object with the source object's clipper. /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it. /// /// true means both objects will share the same clip. /// Whether obj is clipped by the source clipper (true) or not (false). virtual public bool GetSourceClip() { var _ret_var = Efl.Canvas.Proxy.NativeMethods.efl_canvas_proxy_source_clip_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Clip this proxy object with the source object's clipper. /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it. /// /// true means both objects will share the same clip. /// Whether obj is clipped by the source clipper (true) or not (false). virtual public void SetSourceClip(bool source_clip) { Efl.Canvas.Proxy.NativeMethods.efl_canvas_proxy_source_clip_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),source_clip); Eina.Error.RaiseIfUnhandledException(); } /// Defines whether the events on this object are repeated to the source. /// If source is true, it will make events on obj to also be repeated for the source object (see ). Even the obj and source geometries are different, the event position will be transformed to the source object's space. /// /// If source is false, events occurring on obj will be processed only on it. /// Whether this object should pass events (true) or not (false) to its source. virtual public bool GetSourceEvents() { var _ret_var = Efl.Canvas.Proxy.NativeMethods.efl_canvas_proxy_source_events_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Defines whether the events on this object are repeated to the source. /// If source is true, it will make events on obj to also be repeated for the source object (see ). Even the obj and source geometries are different, the event position will be transformed to the source object's space. /// /// If source is false, events occurring on obj will be processed only on it. /// Whether this object should pass events (true) or not (false) to its source. virtual public void SetSourceEvents(bool repeat) { Efl.Canvas.Proxy.NativeMethods.efl_canvas_proxy_source_events_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),repeat); Eina.Error.RaiseIfUnhandledException(); } /// The source object for this proxy. /// The proxy object will mirror the rendering contents of a given source object in its drawing region, without affecting that source in any way. The source must be another valid . Other effects may be applied to the proxy, such as a map (see ) to create a reflection of the original object (for example). /// /// Any existing source object will be removed after this call. /// /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing. /// /// Warning: You cannot set a proxy as another proxy's source. /// Source object to use for the proxy. public Efl.Canvas.Object Source { get { return GetSource(); } set { SetSource(value); } } /// Clip this proxy object with the source object's clipper. /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it. /// /// true means both objects will share the same clip. /// Whether obj is clipped by the source clipper (true) or not (false). public bool SourceClip { get { return GetSourceClip(); } set { SetSourceClip(value); } } /// Defines whether the events on this object are repeated to the source. /// If source is true, it will make events on obj to also be repeated for the source object (see ). Even the obj and source geometries are different, the event position will be transformed to the source object's space. /// /// If source is false, events occurring on obj will be processed only on it. /// Whether this object should pass events (true) or not (false) to its source. public bool SourceEvents { get { return GetSourceEvents(); } set { SetSourceEvents(value); } } private static IntPtr GetEflClassStatic() { return Efl.Canvas.Proxy.efl_canvas_proxy_class_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public new class NativeMethods : Efl.Canvas.ImageInternal.NativeMethods { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas); /// Gets the list of Eo operations to override. /// The list of Eo operations to be overload. public override System.Collections.Generic.List GetEoOps(System.Type type) { var descs = new System.Collections.Generic.List(); var methods = Efl.Eo.Globals.GetUserMethods(type); if (efl_canvas_proxy_source_get_static_delegate == null) { efl_canvas_proxy_source_get_static_delegate = new efl_canvas_proxy_source_get_delegate(source_get); } if (methods.FirstOrDefault(m => m.Name == "GetSource") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_get_static_delegate) }); } if (efl_canvas_proxy_source_set_static_delegate == null) { efl_canvas_proxy_source_set_static_delegate = new efl_canvas_proxy_source_set_delegate(source_set); } if (methods.FirstOrDefault(m => m.Name == "SetSource") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_set_static_delegate) }); } if (efl_canvas_proxy_source_clip_get_static_delegate == null) { efl_canvas_proxy_source_clip_get_static_delegate = new efl_canvas_proxy_source_clip_get_delegate(source_clip_get); } if (methods.FirstOrDefault(m => m.Name == "GetSourceClip") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_clip_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_clip_get_static_delegate) }); } if (efl_canvas_proxy_source_clip_set_static_delegate == null) { efl_canvas_proxy_source_clip_set_static_delegate = new efl_canvas_proxy_source_clip_set_delegate(source_clip_set); } if (methods.FirstOrDefault(m => m.Name == "SetSourceClip") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_clip_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_clip_set_static_delegate) }); } if (efl_canvas_proxy_source_events_get_static_delegate == null) { efl_canvas_proxy_source_events_get_static_delegate = new efl_canvas_proxy_source_events_get_delegate(source_events_get); } if (methods.FirstOrDefault(m => m.Name == "GetSourceEvents") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_events_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_events_get_static_delegate) }); } if (efl_canvas_proxy_source_events_set_static_delegate == null) { efl_canvas_proxy_source_events_set_static_delegate = new efl_canvas_proxy_source_events_set_delegate(source_events_set); } if (methods.FirstOrDefault(m => m.Name == "SetSourceEvents") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_events_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_events_set_static_delegate) }); } descs.AddRange(base.GetEoOps(type)); return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.Canvas.Proxy.efl_canvas_proxy_class_get(); } #pragma warning disable CA1707, CS1591, SA1300, SA1600 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] private delegate Efl.Canvas.Object efl_canvas_proxy_source_get_delegate(System.IntPtr obj, System.IntPtr pd); [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] public delegate Efl.Canvas.Object efl_canvas_proxy_source_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_canvas_proxy_source_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_proxy_source_get"); private static Efl.Canvas.Object source_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_canvas_proxy_source_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Efl.Canvas.Object _ret_var = default(Efl.Canvas.Object); try { _ret_var = ((Proxy)ws.Target).GetSource(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_canvas_proxy_source_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_canvas_proxy_source_get_delegate efl_canvas_proxy_source_get_static_delegate; [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_proxy_source_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] Efl.Canvas.Object src); [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_proxy_source_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] Efl.Canvas.Object src); public static Efl.Eo.FunctionWrapper efl_canvas_proxy_source_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_proxy_source_set"); private static bool source_set(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Object src) { Eina.Log.Debug("function efl_canvas_proxy_source_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { bool _ret_var = default(bool); try { _ret_var = ((Proxy)ws.Target).SetSource(src); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_canvas_proxy_source_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), src); } } private static efl_canvas_proxy_source_set_delegate efl_canvas_proxy_source_set_static_delegate; [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_proxy_source_clip_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_proxy_source_clip_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_canvas_proxy_source_clip_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_proxy_source_clip_get"); private static bool source_clip_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_canvas_proxy_source_clip_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { bool _ret_var = default(bool); try { _ret_var = ((Proxy)ws.Target).GetSourceClip(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_canvas_proxy_source_clip_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_canvas_proxy_source_clip_get_delegate efl_canvas_proxy_source_clip_get_static_delegate; private delegate void efl_canvas_proxy_source_clip_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool source_clip); public delegate void efl_canvas_proxy_source_clip_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool source_clip); public static Efl.Eo.FunctionWrapper efl_canvas_proxy_source_clip_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_proxy_source_clip_set"); private static void source_clip_set(System.IntPtr obj, System.IntPtr pd, bool source_clip) { Eina.Log.Debug("function efl_canvas_proxy_source_clip_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((Proxy)ws.Target).SetSourceClip(source_clip); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_canvas_proxy_source_clip_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), source_clip); } } private static efl_canvas_proxy_source_clip_set_delegate efl_canvas_proxy_source_clip_set_static_delegate; [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_proxy_source_events_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_proxy_source_events_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_canvas_proxy_source_events_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_proxy_source_events_get"); private static bool source_events_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_canvas_proxy_source_events_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { bool _ret_var = default(bool); try { _ret_var = ((Proxy)ws.Target).GetSourceEvents(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_canvas_proxy_source_events_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_canvas_proxy_source_events_get_delegate efl_canvas_proxy_source_events_get_static_delegate; private delegate void efl_canvas_proxy_source_events_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool repeat); public delegate void efl_canvas_proxy_source_events_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool repeat); public static Efl.Eo.FunctionWrapper efl_canvas_proxy_source_events_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_proxy_source_events_set"); private static void source_events_set(System.IntPtr obj, System.IntPtr pd, bool repeat) { Eina.Log.Debug("function efl_canvas_proxy_source_events_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((Proxy)ws.Target).SetSourceEvents(repeat); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_canvas_proxy_source_events_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), repeat); } } private static efl_canvas_proxy_source_events_set_delegate efl_canvas_proxy_source_events_set_static_delegate; #pragma warning restore CA1707, CS1591, SA1300, SA1600 } } } } #if EFL_BETA #pragma warning disable CS1591 public static class Efl_CanvasProxy_ExtensionMethods { public static Efl.BindableProperty Source(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.Canvas.Proxy { return new Efl.BindableProperty("source", fac); } public static Efl.BindableProperty SourceClip(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.Canvas.Proxy { return new Efl.BindableProperty("source_clip", fac); } public static Efl.BindableProperty SourceEvents(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.Canvas.Proxy { return new Efl.BindableProperty("source_events", fac); } } #pragma warning restore CS1591 #endif