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>Low-level proxy image object.
13 /// 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).</summary>
14 [Efl.Canvas.Proxy.NativeMethods]
15 [Efl.Eo.BindingEntity]
16 public class Proxy : Efl.Canvas.ImageInternal
18 ///<summary>Pointer to the native class description.</summary>
19 public override System.IntPtr NativeClass
23 if (((object)this).GetType() == typeof(Proxy))
25 return GetEflClassStatic();
29 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
34 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
35 efl_canvas_proxy_class_get();
36 /// <summary>Initializes a new instance of the <see cref="Proxy"/> class.</summary>
37 /// <param name="parent">Parent instance.</param>
38 public Proxy(Efl.Object parent= null
39 ) : base(efl_canvas_proxy_class_get(), parent)
41 FinishInstantiation();
44 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
45 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
46 protected Proxy(ConstructingHandle ch) : base(ch)
50 /// <summary>Initializes a new instance of the <see cref="Proxy"/> class.
51 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
52 /// <param name="wh">The native pointer to be wrapped.</param>
53 protected Proxy(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
57 /// <summary>Initializes a new instance of the <see cref="Proxy"/> class.
58 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
59 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
60 /// <param name="parent">The Efl.Object parent of this instance.</param>
61 protected Proxy(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
65 /// <summary>The source object for this proxy.
66 /// 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 <see cref="Efl.Canvas.Object"/>. Other effects may be applied to the proxy, such as a map (see <see cref="Efl.Gfx.IMapping"/>) to create a reflection of the original object (for example).
68 /// Any existing source object will be removed after this call.
70 /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing.
72 /// Warning: You cannot set a proxy as another proxy's source.</summary>
73 /// <returns>Source object to use for the proxy.</returns>
74 virtual public Efl.Canvas.Object GetSource() {
75 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)));
76 Eina.Error.RaiseIfUnhandledException();
79 /// <summary>The source object for this proxy.
80 /// 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 <see cref="Efl.Canvas.Object"/>. Other effects may be applied to the proxy, such as a map (see <see cref="Efl.Gfx.IMapping"/>) to create a reflection of the original object (for example).
82 /// Any existing source object will be removed after this call.
84 /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing.
86 /// Warning: You cannot set a proxy as another proxy's source.</summary>
87 /// <param name="src">Source object to use for the proxy.</param>
88 /// <returns>Returns <c>true</c> in case of success.</returns>
89 virtual public bool SetSource(Efl.Canvas.Object src) {
90 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);
91 Eina.Error.RaiseIfUnhandledException();
94 /// <summary>Clip this proxy object with the source object's clipper.
95 /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it.
97 /// <c>true</c> means both objects will share the same clip.</summary>
98 /// <returns>Whether <c>obj</c> is clipped by the source clipper (<c>true</c>) or not (<c>false</c>).</returns>
99 virtual public bool GetSourceClip() {
100 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)));
101 Eina.Error.RaiseIfUnhandledException();
104 /// <summary>Clip this proxy object with the source object's clipper.
105 /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it.
107 /// <c>true</c> means both objects will share the same clip.</summary>
108 /// <param name="source_clip">Whether <c>obj</c> is clipped by the source clipper (<c>true</c>) or not (<c>false</c>).</param>
109 virtual public void SetSourceClip(bool source_clip) {
110 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);
111 Eina.Error.RaiseIfUnhandledException();
113 /// <summary>Defines whether the events on this object are repeated to the source.
114 /// If <c>source</c> is <c>true</c>, it will make events on <c>obj</c> to also be repeated for the source object (see <see cref="Efl.Canvas.Proxy.SetSource"/>). Even the <c>obj</c> and source geometries are different, the event position will be transformed to the source object's space.
116 /// If <c>source</c> is <c>false</c>, events occurring on <c>obj</c> will be processed only on it.</summary>
117 /// <returns>Whether this object should pass events (<c>true</c>) or not (<c>false</c>) to its source.</returns>
118 virtual public bool GetSourceEvents() {
119 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)));
120 Eina.Error.RaiseIfUnhandledException();
123 /// <summary>Defines whether the events on this object are repeated to the source.
124 /// If <c>source</c> is <c>true</c>, it will make events on <c>obj</c> to also be repeated for the source object (see <see cref="Efl.Canvas.Proxy.SetSource"/>). Even the <c>obj</c> and source geometries are different, the event position will be transformed to the source object's space.
126 /// If <c>source</c> is <c>false</c>, events occurring on <c>obj</c> will be processed only on it.</summary>
127 /// <param name="repeat">Whether this object should pass events (<c>true</c>) or not (<c>false</c>) to its source.</param>
128 virtual public void SetSourceEvents(bool repeat) {
129 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);
130 Eina.Error.RaiseIfUnhandledException();
132 /// <summary>The source object for this proxy.
133 /// 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 <see cref="Efl.Canvas.Object"/>. Other effects may be applied to the proxy, such as a map (see <see cref="Efl.Gfx.IMapping"/>) to create a reflection of the original object (for example).
135 /// Any existing source object will be removed after this call.
137 /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing.
139 /// Warning: You cannot set a proxy as another proxy's source.</summary>
140 /// <value>Source object to use for the proxy.</value>
141 public Efl.Canvas.Object Source {
142 get { return GetSource(); }
143 set { SetSource(value); }
145 /// <summary>Clip this proxy object with the source object's clipper.
146 /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it.
148 /// <c>true</c> means both objects will share the same clip.</summary>
149 /// <value>Whether <c>obj</c> is clipped by the source clipper (<c>true</c>) or not (<c>false</c>).</value>
150 public bool SourceClip {
151 get { return GetSourceClip(); }
152 set { SetSourceClip(value); }
154 /// <summary>Defines whether the events on this object are repeated to the source.
155 /// If <c>source</c> is <c>true</c>, it will make events on <c>obj</c> to also be repeated for the source object (see <see cref="Efl.Canvas.Proxy.SetSource"/>). Even the <c>obj</c> and source geometries are different, the event position will be transformed to the source object's space.
157 /// If <c>source</c> is <c>false</c>, events occurring on <c>obj</c> will be processed only on it.</summary>
158 /// <value>Whether this object should pass events (<c>true</c>) or not (<c>false</c>) to its source.</value>
159 public bool SourceEvents {
160 get { return GetSourceEvents(); }
161 set { SetSourceEvents(value); }
163 private static IntPtr GetEflClassStatic()
165 return Efl.Canvas.Proxy.efl_canvas_proxy_class_get();
167 /// <summary>Wrapper for native methods and virtual method delegates.
168 /// For internal use by generated code only.</summary>
169 public new class NativeMethods : Efl.Canvas.ImageInternal.NativeMethods
171 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
172 /// <summary>Gets the list of Eo operations to override.</summary>
173 /// <returns>The list of Eo operations to be overload.</returns>
174 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
176 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
177 var methods = Efl.Eo.Globals.GetUserMethods(type);
179 if (efl_canvas_proxy_source_get_static_delegate == null)
181 efl_canvas_proxy_source_get_static_delegate = new efl_canvas_proxy_source_get_delegate(source_get);
184 if (methods.FirstOrDefault(m => m.Name == "GetSource") != null)
186 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) });
189 if (efl_canvas_proxy_source_set_static_delegate == null)
191 efl_canvas_proxy_source_set_static_delegate = new efl_canvas_proxy_source_set_delegate(source_set);
194 if (methods.FirstOrDefault(m => m.Name == "SetSource") != null)
196 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) });
199 if (efl_canvas_proxy_source_clip_get_static_delegate == null)
201 efl_canvas_proxy_source_clip_get_static_delegate = new efl_canvas_proxy_source_clip_get_delegate(source_clip_get);
204 if (methods.FirstOrDefault(m => m.Name == "GetSourceClip") != null)
206 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) });
209 if (efl_canvas_proxy_source_clip_set_static_delegate == null)
211 efl_canvas_proxy_source_clip_set_static_delegate = new efl_canvas_proxy_source_clip_set_delegate(source_clip_set);
214 if (methods.FirstOrDefault(m => m.Name == "SetSourceClip") != null)
216 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) });
219 if (efl_canvas_proxy_source_events_get_static_delegate == null)
221 efl_canvas_proxy_source_events_get_static_delegate = new efl_canvas_proxy_source_events_get_delegate(source_events_get);
224 if (methods.FirstOrDefault(m => m.Name == "GetSourceEvents") != null)
226 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) });
229 if (efl_canvas_proxy_source_events_set_static_delegate == null)
231 efl_canvas_proxy_source_events_set_static_delegate = new efl_canvas_proxy_source_events_set_delegate(source_events_set);
234 if (methods.FirstOrDefault(m => m.Name == "SetSourceEvents") != null)
236 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) });
239 descs.AddRange(base.GetEoOps(type));
242 /// <summary>Returns the Eo class for the native methods of this class.</summary>
243 /// <returns>The native class pointer.</returns>
244 public override IntPtr GetEflClass()
246 return Efl.Canvas.Proxy.efl_canvas_proxy_class_get();
249 #pragma warning disable CA1707, CS1591, SA1300, SA1600
251 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
252 private delegate Efl.Canvas.Object efl_canvas_proxy_source_get_delegate(System.IntPtr obj, System.IntPtr pd);
254 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
255 public delegate Efl.Canvas.Object efl_canvas_proxy_source_get_api_delegate(System.IntPtr obj);
257 public static Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_get_api_delegate> efl_canvas_proxy_source_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_get_api_delegate>(Module, "efl_canvas_proxy_source_get");
259 private static Efl.Canvas.Object source_get(System.IntPtr obj, System.IntPtr pd)
261 Eina.Log.Debug("function efl_canvas_proxy_source_get was called");
262 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
265 Efl.Canvas.Object _ret_var = default(Efl.Canvas.Object);
268 _ret_var = ((Proxy)ws.Target).GetSource();
272 Eina.Log.Warning($"Callback error: {e.ToString()}");
273 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
281 return efl_canvas_proxy_source_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
285 private static efl_canvas_proxy_source_get_delegate efl_canvas_proxy_source_get_static_delegate;
287 [return: MarshalAs(UnmanagedType.U1)]
288 private delegate bool efl_canvas_proxy_source_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object src);
290 [return: MarshalAs(UnmanagedType.U1)]
291 public delegate bool efl_canvas_proxy_source_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object src);
293 public static Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_set_api_delegate> efl_canvas_proxy_source_set_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_set_api_delegate>(Module, "efl_canvas_proxy_source_set");
295 private static bool source_set(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Object src)
297 Eina.Log.Debug("function efl_canvas_proxy_source_set was called");
298 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
301 bool _ret_var = default(bool);
304 _ret_var = ((Proxy)ws.Target).SetSource(src);
308 Eina.Log.Warning($"Callback error: {e.ToString()}");
309 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317 return efl_canvas_proxy_source_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), src);
321 private static efl_canvas_proxy_source_set_delegate efl_canvas_proxy_source_set_static_delegate;
323 [return: MarshalAs(UnmanagedType.U1)]
324 private delegate bool efl_canvas_proxy_source_clip_get_delegate(System.IntPtr obj, System.IntPtr pd);
326 [return: MarshalAs(UnmanagedType.U1)]
327 public delegate bool efl_canvas_proxy_source_clip_get_api_delegate(System.IntPtr obj);
329 public static Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_clip_get_api_delegate> efl_canvas_proxy_source_clip_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_clip_get_api_delegate>(Module, "efl_canvas_proxy_source_clip_get");
331 private static bool source_clip_get(System.IntPtr obj, System.IntPtr pd)
333 Eina.Log.Debug("function efl_canvas_proxy_source_clip_get was called");
334 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
337 bool _ret_var = default(bool);
340 _ret_var = ((Proxy)ws.Target).GetSourceClip();
344 Eina.Log.Warning($"Callback error: {e.ToString()}");
345 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
353 return efl_canvas_proxy_source_clip_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
357 private static efl_canvas_proxy_source_clip_get_delegate efl_canvas_proxy_source_clip_get_static_delegate;
360 private delegate void efl_canvas_proxy_source_clip_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool source_clip);
363 public delegate void efl_canvas_proxy_source_clip_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool source_clip);
365 public static Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_clip_set_api_delegate> efl_canvas_proxy_source_clip_set_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_clip_set_api_delegate>(Module, "efl_canvas_proxy_source_clip_set");
367 private static void source_clip_set(System.IntPtr obj, System.IntPtr pd, bool source_clip)
369 Eina.Log.Debug("function efl_canvas_proxy_source_clip_set was called");
370 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
376 ((Proxy)ws.Target).SetSourceClip(source_clip);
380 Eina.Log.Warning($"Callback error: {e.ToString()}");
381 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
388 efl_canvas_proxy_source_clip_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), source_clip);
392 private static efl_canvas_proxy_source_clip_set_delegate efl_canvas_proxy_source_clip_set_static_delegate;
394 [return: MarshalAs(UnmanagedType.U1)]
395 private delegate bool efl_canvas_proxy_source_events_get_delegate(System.IntPtr obj, System.IntPtr pd);
397 [return: MarshalAs(UnmanagedType.U1)]
398 public delegate bool efl_canvas_proxy_source_events_get_api_delegate(System.IntPtr obj);
400 public static Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_events_get_api_delegate> efl_canvas_proxy_source_events_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_events_get_api_delegate>(Module, "efl_canvas_proxy_source_events_get");
402 private static bool source_events_get(System.IntPtr obj, System.IntPtr pd)
404 Eina.Log.Debug("function efl_canvas_proxy_source_events_get was called");
405 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
408 bool _ret_var = default(bool);
411 _ret_var = ((Proxy)ws.Target).GetSourceEvents();
415 Eina.Log.Warning($"Callback error: {e.ToString()}");
416 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
424 return efl_canvas_proxy_source_events_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
428 private static efl_canvas_proxy_source_events_get_delegate efl_canvas_proxy_source_events_get_static_delegate;
431 private delegate void efl_canvas_proxy_source_events_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool repeat);
434 public delegate void efl_canvas_proxy_source_events_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool repeat);
436 public static Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_events_set_api_delegate> efl_canvas_proxy_source_events_set_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_proxy_source_events_set_api_delegate>(Module, "efl_canvas_proxy_source_events_set");
438 private static void source_events_set(System.IntPtr obj, System.IntPtr pd, bool repeat)
440 Eina.Log.Debug("function efl_canvas_proxy_source_events_set was called");
441 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
447 ((Proxy)ws.Target).SetSourceEvents(repeat);
451 Eina.Log.Warning($"Callback error: {e.ToString()}");
452 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
459 efl_canvas_proxy_source_events_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), repeat);
463 private static efl_canvas_proxy_source_events_set_delegate efl_canvas_proxy_source_events_set_static_delegate;
465 #pragma warning restore CA1707, CS1591, SA1300, SA1600