X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=internals%2Fsrc%2FEflSharp%2FEflSharp%2Fefl%2Fefl_canvas_surface_x11.eo.cs;h=414d1a7f9b828839d6625c558dbd667389ee9e2b;hb=5418695f94c5065494f5f7d74d1506e7a5267c06;hp=aa08f33536dd0ae4ac3565af97ba9d0725ffcd02;hpb=1b49f5436f8fe9b85446ae63a3383d1527fbc28a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/internals/src/EflSharp/EflSharp/efl/efl_canvas_surface_x11.eo.cs b/internals/src/EflSharp/EflSharp/efl/efl_canvas_surface_x11.eo.cs old mode 100644 new mode 100755 index aa08f33..414d1a7 --- a/internals/src/EflSharp/EflSharp/efl/efl_canvas_surface_x11.eo.cs +++ b/internals/src/EflSharp/EflSharp/efl/efl_canvas_surface_x11.eo.cs @@ -1,186 +1,265 @@ +#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 { +namespace Efl { + +namespace Canvas { + /// Native X11 surface for Efl canvas -[SurfaceX11NativeInherit] -public class SurfaceX11 : Efl.Canvas.Surface, Efl.Eo.IWrapper +/// This is a BETA class. It can be modified or removed in the future. Do not use it for product development. +[Efl.Canvas.SurfaceX11.NativeMethods] +[Efl.Eo.BindingEntity] +public class SurfaceX11 : Efl.Canvas.Surface { - ///Pointer to the native class description. - public override System.IntPtr NativeClass { - get { - if (((object)this).GetType() == typeof (SurfaceX11)) - return Efl.Canvas.SurfaceX11NativeInherit.GetEflClassStatic(); + /// Pointer to the native class description. + public override System.IntPtr NativeClass + { + get + { + if (((object)this).GetType() == typeof(SurfaceX11)) + { + 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_surface_x11_class_get(); - ///Creates a new instance. - ///Parent instance. + /// Initializes a new instance of the class. + /// Parent instance. public SurfaceX11(Efl.Object parent= null - ) : - base(efl_canvas_surface_x11_class_get(), typeof(SurfaceX11), parent) + ) : base(efl_canvas_surface_x11_class_get(), parent) { FinishInstantiation(); } - ///Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. - protected SurfaceX11(System.IntPtr raw) : base(raw) - { - RegisterEventProxies(); - } - ///Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly. - protected SurfaceX11(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {} - ///Verifies if the given object is equal to this one. - public override bool Equals(object obj) - { - var other = obj as Efl.Object; - if (other == null) - return false; - return this.NativeHandle == other.NativeHandle; - } - ///Gets the hash code for this object based on the native pointer it points to. - public override int GetHashCode() + + /// 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 SurfaceX11(ConstructingHandle ch) : base(ch) { - return this.NativeHandle.ToInt32(); } - ///Turns the native pointer into a string representation. - public override String ToString() + + /// 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 SurfaceX11(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { - return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]"; } - ///Register the Eo event wrappers making the bridge to C# events. Internal usage only. - protected override void RegisterEventProxies() + + /// 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 SurfaceX11(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent) { - base.RegisterEventProxies(); } + /// This is a helper for . /// X11 Visual for this Pixmap. /// X11 Pixmap ID. - /// - virtual public void GetPixmap( out System.IntPtr visual, out uint pixmap) { - Efl.Canvas.SurfaceX11NativeInherit.efl_canvas_surface_x11_pixmap_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), out visual, out pixmap); + virtual public void GetPixmap(out System.IntPtr visual, out uint pixmap) { + Efl.Canvas.SurfaceX11.NativeMethods.efl_canvas_surface_x11_pixmap_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out visual, out pixmap); Eina.Error.RaiseIfUnhandledException(); } /// This is a helper for . /// X11 Visual for this Pixmap. /// X11 Pixmap ID. /// true on success, false otherwise - virtual public bool SetPixmap( System.IntPtr visual, uint pixmap) { - var _ret_var = Efl.Canvas.SurfaceX11NativeInherit.efl_canvas_surface_x11_pixmap_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), visual, pixmap); + virtual public bool SetPixmap(System.IntPtr visual, uint pixmap) { + var _ret_var = Efl.Canvas.SurfaceX11.NativeMethods.efl_canvas_surface_x11_pixmap_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),visual, pixmap); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } - private static IntPtr GetEflClassStatic() - { - return Efl.Canvas.SurfaceX11.efl_canvas_surface_x11_class_get(); - } -} -public class SurfaceX11NativeInherit : Efl.Canvas.SurfaceNativeInherit{ - public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas); - 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_surface_x11_pixmap_get_static_delegate == null) - efl_canvas_surface_x11_pixmap_get_static_delegate = new efl_canvas_surface_x11_pixmap_get_delegate(pixmap_get); - if (methods.FirstOrDefault(m => m.Name == "GetPixmap") != null) - descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_surface_x11_pixmap_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_surface_x11_pixmap_get_static_delegate)}); - if (efl_canvas_surface_x11_pixmap_set_static_delegate == null) - efl_canvas_surface_x11_pixmap_set_static_delegate = new efl_canvas_surface_x11_pixmap_set_delegate(pixmap_set); - if (methods.FirstOrDefault(m => m.Name == "SetPixmap") != null) - descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_surface_x11_pixmap_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_surface_x11_pixmap_set_static_delegate)}); - descs.AddRange(base.GetEoOps(type)); - return descs; + /// This is a helper for . + /// X11 Visual for this Pixmap. + public (System.IntPtr, uint) Pixmap { + get { + System.IntPtr _out_visual = default(System.IntPtr); + uint _out_pixmap = default(uint); + GetPixmap(out _out_visual,out _out_pixmap); + return (_out_visual,_out_pixmap); + } + set { SetPixmap( value.Item1, value.Item2); } } - public override IntPtr GetEflClass() + private static IntPtr GetEflClassStatic() { return Efl.Canvas.SurfaceX11.efl_canvas_surface_x11_class_get(); } - public static new IntPtr GetEflClassStatic() + /// Wrapper for native methods and virtual method delegates. + /// For internal use by generated code only. + public new class NativeMethods : Efl.Canvas.Surface.NativeMethods { - return Efl.Canvas.SurfaceX11.efl_canvas_surface_x11_class_get(); - } + 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_surface_x11_pixmap_get_static_delegate == null) + { + efl_canvas_surface_x11_pixmap_get_static_delegate = new efl_canvas_surface_x11_pixmap_get_delegate(pixmap_get); + } - private delegate void efl_canvas_surface_x11_pixmap_get_delegate(System.IntPtr obj, System.IntPtr pd, out System.IntPtr visual, out uint pixmap); + if (methods.FirstOrDefault(m => m.Name == "GetPixmap") != null) + { + descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_surface_x11_pixmap_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_surface_x11_pixmap_get_static_delegate) }); + } + if (efl_canvas_surface_x11_pixmap_set_static_delegate == null) + { + efl_canvas_surface_x11_pixmap_set_static_delegate = new efl_canvas_surface_x11_pixmap_set_delegate(pixmap_set); + } - public delegate void efl_canvas_surface_x11_pixmap_get_api_delegate(System.IntPtr obj, out System.IntPtr visual, out uint pixmap); - public static Efl.Eo.FunctionWrapper efl_canvas_surface_x11_pixmap_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_canvas_surface_x11_pixmap_get"); - private static void pixmap_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr visual, out uint pixmap) - { - Eina.Log.Debug("function efl_canvas_surface_x11_pixmap_get was called"); - Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); - if(wrapper != null) { - visual = default(System.IntPtr); pixmap = default(uint); - try { - ((SurfaceX11)wrapper).GetPixmap( out visual, out pixmap); - } catch (Exception e) { - Eina.Log.Warning($"Callback error: {e.ToString()}"); - Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + if (methods.FirstOrDefault(m => m.Name == "SetPixmap") != null) + { + descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_surface_x11_pixmap_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_surface_x11_pixmap_set_static_delegate) }); } - } else { - efl_canvas_surface_x11_pixmap_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out visual, out pixmap); + + descs.AddRange(base.GetEoOps(type)); + return descs; } - } - private static efl_canvas_surface_x11_pixmap_get_delegate efl_canvas_surface_x11_pixmap_get_static_delegate; + /// Returns the Eo class for the native methods of this class. + /// The native class pointer. + public override IntPtr GetEflClass() + { + return Efl.Canvas.SurfaceX11.efl_canvas_surface_x11_class_get(); + } + + #pragma warning disable CA1707, CS1591, SA1300, SA1600 + + private delegate void efl_canvas_surface_x11_pixmap_get_delegate(System.IntPtr obj, System.IntPtr pd, out System.IntPtr visual, out uint pixmap); - [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_surface_x11_pixmap_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr visual, uint pixmap); + + public delegate void efl_canvas_surface_x11_pixmap_get_api_delegate(System.IntPtr obj, out System.IntPtr visual, out uint pixmap); + public static Efl.Eo.FunctionWrapper efl_canvas_surface_x11_pixmap_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_surface_x11_pixmap_get"); - [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_surface_x11_pixmap_set_api_delegate(System.IntPtr obj, System.IntPtr visual, uint pixmap); - public static Efl.Eo.FunctionWrapper efl_canvas_surface_x11_pixmap_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_canvas_surface_x11_pixmap_set"); - private static bool pixmap_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr visual, uint pixmap) - { - Eina.Log.Debug("function efl_canvas_surface_x11_pixmap_set was called"); - Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); - if(wrapper != null) { - bool _ret_var = default(bool); - try { - _ret_var = ((SurfaceX11)wrapper).SetPixmap( visual, pixmap); - } catch (Exception e) { - Eina.Log.Warning($"Callback error: {e.ToString()}"); - Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + private static void pixmap_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr visual, out uint pixmap) + { + Eina.Log.Debug("function efl_canvas_surface_x11_pixmap_get was called"); + var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); + if (ws != null) + { + visual = default(System.IntPtr); pixmap = default(uint); + try + { + ((SurfaceX11)ws.Target).GetPixmap(out visual, out pixmap); + } + catch (Exception e) + { + Eina.Log.Warning($"Callback error: {e.ToString()}"); + Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + } + + } + else + { + efl_canvas_surface_x11_pixmap_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out visual, out pixmap); + } + } + + private static efl_canvas_surface_x11_pixmap_get_delegate efl_canvas_surface_x11_pixmap_get_static_delegate; + + [return: MarshalAs(UnmanagedType.U1)] + private delegate bool efl_canvas_surface_x11_pixmap_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr visual, uint pixmap); + + [return: MarshalAs(UnmanagedType.U1)] + public delegate bool efl_canvas_surface_x11_pixmap_set_api_delegate(System.IntPtr obj, System.IntPtr visual, uint pixmap); + + public static Efl.Eo.FunctionWrapper efl_canvas_surface_x11_pixmap_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_canvas_surface_x11_pixmap_set"); + + private static bool pixmap_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr visual, uint pixmap) + { + Eina.Log.Debug("function efl_canvas_surface_x11_pixmap_set was called"); + var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); + if (ws != null) + { + bool _ret_var = default(bool); + try + { + _ret_var = ((SurfaceX11)ws.Target).SetPixmap(visual, pixmap); + } + catch (Exception e) + { + Eina.Log.Warning($"Callback error: {e.ToString()}"); + Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + } + return _ret_var; - } else { - return efl_canvas_surface_x11_pixmap_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), visual, pixmap); + + } + else + { + return efl_canvas_surface_x11_pixmap_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), visual, pixmap); + } } - } - private static efl_canvas_surface_x11_pixmap_set_delegate efl_canvas_surface_x11_pixmap_set_static_delegate; + + private static efl_canvas_surface_x11_pixmap_set_delegate efl_canvas_surface_x11_pixmap_set_static_delegate; + + #pragma warning restore CA1707, CS1591, SA1300, SA1600 + +} } -} } -namespace Efl { namespace Canvas { +} + +} + +#if EFL_BETA +#pragma warning disable CS1591 +public static class Efl_CanvasSurfaceX11_ExtensionMethods { + +} +#pragma warning restore CS1591 +#endif +namespace Efl { + +namespace Canvas { + /// The type used by . [StructLayout(LayoutKind.Sequential)] +[Efl.Eo.BindingEntity] public struct SurfaceX11Pixmap { /// X11 Visual for this Pixmap. public System.IntPtr Visual; /// X11 Pixmap ID. public uint Pixmap; - ///Constructor for SurfaceX11Pixmap. + /// Constructor for SurfaceX11Pixmap. + /// X11 Visual for this Pixmap.; + /// X11 Pixmap ID.; public SurfaceX11Pixmap( - System.IntPtr Visual=default(System.IntPtr), - uint Pixmap=default(uint) ) + System.IntPtr Visual = default(System.IntPtr), + uint Pixmap = default(uint) ) { this.Visual = Visual; this.Pixmap = Pixmap; } + /// Implicit conversion to the managed representation from a native pointer. + /// Native pointer to be converted. public static implicit operator SurfaceX11Pixmap(IntPtr ptr) { var tmp = (SurfaceX11Pixmap.NativeStruct)Marshal.PtrToStructure(ptr, typeof(SurfaceX11Pixmap.NativeStruct)); return tmp; } - ///Internal wrapper for struct SurfaceX11Pixmap. + #pragma warning disable CS1591 + + /// Internal wrapper for struct SurfaceX11Pixmap. [StructLayout(LayoutKind.Sequential)] public struct NativeStruct { @@ -188,7 +267,7 @@ public struct SurfaceX11Pixmap public System.IntPtr Visual; public uint Pixmap; - ///Implicit conversion to the internal/marshalling representation. + /// Implicit conversion to the internal/marshalling representation. public static implicit operator SurfaceX11Pixmap.NativeStruct(SurfaceX11Pixmap _external_struct) { var _internal_struct = new SurfaceX11Pixmap.NativeStruct(); @@ -197,7 +276,7 @@ public struct SurfaceX11Pixmap return _internal_struct; } - ///Implicit conversion to the managed representation. + /// Implicit conversion to the managed representation. public static implicit operator SurfaceX11Pixmap(SurfaceX11Pixmap.NativeStruct _internal_struct) { var _external_struct = new SurfaceX11Pixmap(); @@ -208,6 +287,11 @@ public struct SurfaceX11Pixmap } + #pragma warning restore CS1591 + +} + +} + } -} }