1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Canvas {
8 /// <summary>Low-level proxy image object.
9 /// 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>
11 public class Proxy : Efl.Canvas.ImageInternal, Efl.Eo.IWrapper
13 public new static System.IntPtr klass = System.IntPtr.Zero;
14 public new static Efl.Canvas.ProxyNativeInherit nativeInherit = new Efl.Canvas.ProxyNativeInherit();
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass {
18 if (((object)this).GetType() == typeof (Proxy))
19 return Efl.Canvas.ProxyNativeInherit.GetEflClassStatic();
21 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
24 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
25 efl_canvas_proxy_class_get();
26 ///<summary>Creates a new instance.</summary>
27 ///<param name="parent">Parent instance.</param>
28 public Proxy(Efl.Object parent= null
30 base(efl_canvas_proxy_class_get(), typeof(Proxy), parent)
32 FinishInstantiation();
34 ///<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>
35 public Proxy(System.IntPtr raw) : base(raw)
37 register_event_proxies();
39 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
40 protected Proxy(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
41 ///<summary>Casts obj into an instance of this type.</summary>
42 public new static Proxy static_cast(Efl.Object obj)
45 throw new System.ArgumentNullException("obj");
46 return new Proxy(obj.NativeHandle);
48 ///<summary>Verifies if the given object is equal to this one.</summary>
49 public override bool Equals(object obj)
51 var other = obj as Efl.Object;
54 return this.NativeHandle == other.NativeHandle;
56 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
57 public override int GetHashCode()
59 return this.NativeHandle.ToInt32();
61 ///<summary>Turns the native pointer into a string representation.</summary>
62 public override String ToString()
64 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
66 protected override void register_event_proxies()
68 base.register_event_proxies();
70 /// <summary>The source object for this proxy.
71 /// 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.Mapping"/>) to create a reflection of the original object (for example).
73 /// Any existing source object will be removed after this call.
75 /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing.
77 /// Warning: You cannot set a proxy as another proxy's source.</summary>
78 /// <returns>Source object to use for the proxy.</returns>
79 virtual public Efl.Canvas.Object GetSource() {
80 var _ret_var = Efl.Canvas.ProxyNativeInherit.efl_canvas_proxy_source_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
81 Eina.Error.RaiseIfUnhandledException();
84 /// <summary>The source object for this proxy.
85 /// 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.Mapping"/>) to create a reflection of the original object (for example).
87 /// Any existing source object will be removed after this call.
89 /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing.
91 /// Warning: You cannot set a proxy as another proxy's source.</summary>
92 /// <param name="src">Source object to use for the proxy.</param>
93 /// <returns>Returns <c>true</c> in case of success.</returns>
94 virtual public bool SetSource( Efl.Canvas.Object src) {
95 var _ret_var = Efl.Canvas.ProxyNativeInherit.efl_canvas_proxy_source_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), src);
96 Eina.Error.RaiseIfUnhandledException();
99 /// <summary>Clip this proxy object with the source object's clipper.
100 /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it.
102 /// <c>true</c> means both objects will share the same clip.
104 /// <returns>Whether <c>obj</c> is clipped by the source clipper (<c>true</c>) or not (<c>false</c>).</returns>
105 virtual public bool GetSourceClip() {
106 var _ret_var = Efl.Canvas.ProxyNativeInherit.efl_canvas_proxy_source_clip_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
107 Eina.Error.RaiseIfUnhandledException();
110 /// <summary>Clip this proxy object with the source object's clipper.
111 /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it.
113 /// <c>true</c> means both objects will share the same clip.
115 /// <param name="source_clip">Whether <c>obj</c> is clipped by the source clipper (<c>true</c>) or not (<c>false</c>).</param>
116 /// <returns></returns>
117 virtual public void SetSourceClip( bool source_clip) {
118 Efl.Canvas.ProxyNativeInherit.efl_canvas_proxy_source_clip_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), source_clip);
119 Eina.Error.RaiseIfUnhandledException();
121 /// <summary>Defines whether the events on this object are repeated to the source.
122 /// 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.
124 /// If <c>source</c> is <c>false</c>, events occurring on <c>obj</c> will be processed only on it.
126 /// <returns>Whether this object should pass events (<c>true</c>) or not (<c>false</c>) to its source.</returns>
127 virtual public bool GetSourceEvents() {
128 var _ret_var = Efl.Canvas.ProxyNativeInherit.efl_canvas_proxy_source_events_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
129 Eina.Error.RaiseIfUnhandledException();
132 /// <summary>Defines whether the events on this object are repeated to the source.
133 /// 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.
135 /// If <c>source</c> is <c>false</c>, events occurring on <c>obj</c> will be processed only on it.
137 /// <param name="repeat">Whether this object should pass events (<c>true</c>) or not (<c>false</c>) to its source.</param>
138 /// <returns></returns>
139 virtual public void SetSourceEvents( bool repeat) {
140 Efl.Canvas.ProxyNativeInherit.efl_canvas_proxy_source_events_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), repeat);
141 Eina.Error.RaiseIfUnhandledException();
143 /// <summary>The source object for this proxy.
144 /// 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.Mapping"/>) to create a reflection of the original object (for example).
146 /// Any existing source object will be removed after this call.
148 /// Note: This property should be set as soon as creating a proxy object, otherwise the proxy will do nothing.
150 /// Warning: You cannot set a proxy as another proxy's source.</summary>
151 /// <value>Source object to use for the proxy.</value>
152 public Efl.Canvas.Object Source {
153 get { return GetSource(); }
154 set { SetSource( value); }
156 /// <summary>Clip this proxy object with the source object's clipper.
157 /// Use this if you want to overlay an existing object with its proxy, and apply some sort of transformation on it.
159 /// <c>true</c> means both objects will share the same clip.
161 /// <value>Whether <c>obj</c> is clipped by the source clipper (<c>true</c>) or not (<c>false</c>).</value>
162 public bool SourceClip {
163 get { return GetSourceClip(); }
164 set { SetSourceClip( value); }
166 /// <summary>Defines whether the events on this object are repeated to the source.
167 /// 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.
169 /// If <c>source</c> is <c>false</c>, events occurring on <c>obj</c> will be processed only on it.
171 /// <value>Whether this object should pass events (<c>true</c>) or not (<c>false</c>) to its source.</value>
172 public bool SourceEvents {
173 get { return GetSourceEvents(); }
174 set { SetSourceEvents( value); }
176 private static new IntPtr GetEflClassStatic()
178 return Efl.Canvas.Proxy.efl_canvas_proxy_class_get();
181 public class ProxyNativeInherit : Efl.Canvas.ImageInternalNativeInherit{
182 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
183 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
185 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
186 if (efl_canvas_proxy_source_get_static_delegate == null)
187 efl_canvas_proxy_source_get_static_delegate = new efl_canvas_proxy_source_get_delegate(source_get);
188 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)
190 efl_canvas_proxy_source_set_static_delegate = new efl_canvas_proxy_source_set_delegate(source_set);
191 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)});
192 if (efl_canvas_proxy_source_clip_get_static_delegate == null)
193 efl_canvas_proxy_source_clip_get_static_delegate = new efl_canvas_proxy_source_clip_get_delegate(source_clip_get);
194 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)});
195 if (efl_canvas_proxy_source_clip_set_static_delegate == null)
196 efl_canvas_proxy_source_clip_set_static_delegate = new efl_canvas_proxy_source_clip_set_delegate(source_clip_set);
197 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)});
198 if (efl_canvas_proxy_source_events_get_static_delegate == null)
199 efl_canvas_proxy_source_events_get_static_delegate = new efl_canvas_proxy_source_events_get_delegate(source_events_get);
200 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)});
201 if (efl_canvas_proxy_source_events_set_static_delegate == null)
202 efl_canvas_proxy_source_events_set_static_delegate = new efl_canvas_proxy_source_events_set_delegate(source_events_set);
203 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)});
204 descs.AddRange(base.GetEoOps(type));
207 public override IntPtr GetEflClass()
209 return Efl.Canvas.Proxy.efl_canvas_proxy_class_get();
211 public static new IntPtr GetEflClassStatic()
213 return Efl.Canvas.Proxy.efl_canvas_proxy_class_get();
217 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] private delegate Efl.Canvas.Object efl_canvas_proxy_source_get_delegate(System.IntPtr obj, System.IntPtr pd);
220 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] public delegate Efl.Canvas.Object efl_canvas_proxy_source_get_api_delegate(System.IntPtr obj);
221 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");
222 private static Efl.Canvas.Object source_get(System.IntPtr obj, System.IntPtr pd)
224 Eina.Log.Debug("function efl_canvas_proxy_source_get was called");
225 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
226 if(wrapper != null) {
227 Efl.Canvas.Object _ret_var = default(Efl.Canvas.Object);
229 _ret_var = ((Proxy)wrapper).GetSource();
230 } catch (Exception e) {
231 Eina.Log.Warning($"Callback error: {e.ToString()}");
232 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
236 return efl_canvas_proxy_source_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
239 private static efl_canvas_proxy_source_get_delegate efl_canvas_proxy_source_get_static_delegate;
242 [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.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] Efl.Canvas.Object src);
245 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_proxy_source_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] Efl.Canvas.Object src);
246 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");
247 private static bool source_set(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Object src)
249 Eina.Log.Debug("function efl_canvas_proxy_source_set was called");
250 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
251 if(wrapper != null) {
252 bool _ret_var = default(bool);
254 _ret_var = ((Proxy)wrapper).SetSource( src);
255 } catch (Exception e) {
256 Eina.Log.Warning($"Callback error: {e.ToString()}");
257 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
261 return efl_canvas_proxy_source_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), src);
264 private static efl_canvas_proxy_source_set_delegate efl_canvas_proxy_source_set_static_delegate;
267 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_proxy_source_clip_get_delegate(System.IntPtr obj, System.IntPtr pd);
270 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_proxy_source_clip_get_api_delegate(System.IntPtr obj);
271 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");
272 private static bool source_clip_get(System.IntPtr obj, System.IntPtr pd)
274 Eina.Log.Debug("function efl_canvas_proxy_source_clip_get was called");
275 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
276 if(wrapper != null) {
277 bool _ret_var = default(bool);
279 _ret_var = ((Proxy)wrapper).GetSourceClip();
280 } catch (Exception e) {
281 Eina.Log.Warning($"Callback error: {e.ToString()}");
282 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
286 return efl_canvas_proxy_source_clip_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
289 private static efl_canvas_proxy_source_clip_get_delegate efl_canvas_proxy_source_clip_get_static_delegate;
292 private delegate void efl_canvas_proxy_source_clip_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool source_clip);
295 public delegate void efl_canvas_proxy_source_clip_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool source_clip);
296 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");
297 private static void source_clip_set(System.IntPtr obj, System.IntPtr pd, bool source_clip)
299 Eina.Log.Debug("function efl_canvas_proxy_source_clip_set was called");
300 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
301 if(wrapper != null) {
304 ((Proxy)wrapper).SetSourceClip( source_clip);
305 } catch (Exception e) {
306 Eina.Log.Warning($"Callback error: {e.ToString()}");
307 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
310 efl_canvas_proxy_source_clip_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), source_clip);
313 private static efl_canvas_proxy_source_clip_set_delegate efl_canvas_proxy_source_clip_set_static_delegate;
316 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_proxy_source_events_get_delegate(System.IntPtr obj, System.IntPtr pd);
319 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_proxy_source_events_get_api_delegate(System.IntPtr obj);
320 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");
321 private static bool source_events_get(System.IntPtr obj, System.IntPtr pd)
323 Eina.Log.Debug("function efl_canvas_proxy_source_events_get was called");
324 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
325 if(wrapper != null) {
326 bool _ret_var = default(bool);
328 _ret_var = ((Proxy)wrapper).GetSourceEvents();
329 } catch (Exception e) {
330 Eina.Log.Warning($"Callback error: {e.ToString()}");
331 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
335 return efl_canvas_proxy_source_events_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
338 private static efl_canvas_proxy_source_events_get_delegate efl_canvas_proxy_source_events_get_static_delegate;
341 private delegate void efl_canvas_proxy_source_events_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool repeat);
344 public delegate void efl_canvas_proxy_source_events_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool repeat);
345 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");
346 private static void source_events_set(System.IntPtr obj, System.IntPtr pd, bool repeat)
348 Eina.Log.Debug("function efl_canvas_proxy_source_events_set was called");
349 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
350 if(wrapper != null) {
353 ((Proxy)wrapper).SetSourceEvents( repeat);
354 } catch (Exception e) {
355 Eina.Log.Warning($"Callback error: {e.ToString()}");
356 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
359 efl_canvas_proxy_source_events_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), repeat);
362 private static efl_canvas_proxy_source_events_set_delegate efl_canvas_proxy_source_events_set_static_delegate;