414d1a7f9b828839d6625c558dbd667389ee9e2b
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_surface_x11.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
11 namespace Canvas {
12
13 /// <summary>Native X11 surface for Efl canvas</summary>
14 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
15 [Efl.Canvas.SurfaceX11.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public class SurfaceX11 : Efl.Canvas.Surface
18 {
19     /// <summary>Pointer to the native class description.</summary>
20     public override System.IntPtr NativeClass
21     {
22         get
23         {
24             if (((object)this).GetType() == typeof(SurfaceX11))
25             {
26                 return GetEflClassStatic();
27             }
28             else
29             {
30                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
31             }
32         }
33     }
34
35     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
36         efl_canvas_surface_x11_class_get();
37     /// <summary>Initializes a new instance of the <see cref="SurfaceX11"/> class.</summary>
38     /// <param name="parent">Parent instance.</param>
39     public SurfaceX11(Efl.Object parent= null
40             ) : base(efl_canvas_surface_x11_class_get(), parent)
41     {
42         FinishInstantiation();
43     }
44
45     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
46     /// Do not call this constructor directly.</summary>
47     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
48     protected SurfaceX11(ConstructingHandle ch) : base(ch)
49     {
50     }
51
52     /// <summary>Initializes a new instance of the <see cref="SurfaceX11"/> class.
53     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
54     /// <param name="wh">The native pointer to be wrapped.</param>
55     protected SurfaceX11(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
56     {
57     }
58
59     /// <summary>Initializes a new instance of the <see cref="SurfaceX11"/> class.
60     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
61     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
62     /// <param name="parent">The Efl.Object parent of this instance.</param>
63     protected SurfaceX11(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
64     {
65     }
66
67     /// <summary>This is a helper for <see cref="Efl.Canvas.Surface.NativeBuffer"/>.</summary>
68     /// <param name="visual">X11 Visual for this Pixmap.</param>
69     /// <param name="pixmap">X11 Pixmap ID.</param>
70     virtual public void GetPixmap(out System.IntPtr visual, out uint pixmap) {
71                                                          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);
72         Eina.Error.RaiseIfUnhandledException();
73                                          }
74     /// <summary>This is a helper for <see cref="Efl.Canvas.Surface.NativeBuffer"/>.</summary>
75     /// <param name="visual">X11 Visual for this Pixmap.</param>
76     /// <param name="pixmap">X11 Pixmap ID.</param>
77     /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
78     virtual public bool SetPixmap(System.IntPtr visual, uint pixmap) {
79                                                          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);
80         Eina.Error.RaiseIfUnhandledException();
81                                         return _ret_var;
82  }
83     /// <summary>This is a helper for <see cref="Efl.Canvas.Surface.NativeBuffer"/>.</summary>
84     /// <value>X11 Visual for this Pixmap.</value>
85     public (System.IntPtr, uint) Pixmap {
86         get {
87             System.IntPtr _out_visual = default(System.IntPtr);
88             uint _out_pixmap = default(uint);
89             GetPixmap(out _out_visual,out _out_pixmap);
90             return (_out_visual,_out_pixmap);
91         }
92         set { SetPixmap( value.Item1,  value.Item2); }
93     }
94     private static IntPtr GetEflClassStatic()
95     {
96         return Efl.Canvas.SurfaceX11.efl_canvas_surface_x11_class_get();
97     }
98     /// <summary>Wrapper for native methods and virtual method delegates.
99     /// For internal use by generated code only.</summary>
100     public new class NativeMethods : Efl.Canvas.Surface.NativeMethods
101     {
102         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
103         /// <summary>Gets the list of Eo operations to override.</summary>
104         /// <returns>The list of Eo operations to be overload.</returns>
105         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
106         {
107             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
108             var methods = Efl.Eo.Globals.GetUserMethods(type);
109
110             if (efl_canvas_surface_x11_pixmap_get_static_delegate == null)
111             {
112                 efl_canvas_surface_x11_pixmap_get_static_delegate = new efl_canvas_surface_x11_pixmap_get_delegate(pixmap_get);
113             }
114
115             if (methods.FirstOrDefault(m => m.Name == "GetPixmap") != null)
116             {
117                 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) });
118             }
119
120             if (efl_canvas_surface_x11_pixmap_set_static_delegate == null)
121             {
122                 efl_canvas_surface_x11_pixmap_set_static_delegate = new efl_canvas_surface_x11_pixmap_set_delegate(pixmap_set);
123             }
124
125             if (methods.FirstOrDefault(m => m.Name == "SetPixmap") != null)
126             {
127                 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) });
128             }
129
130             descs.AddRange(base.GetEoOps(type));
131             return descs;
132         }
133         /// <summary>Returns the Eo class for the native methods of this class.</summary>
134         /// <returns>The native class pointer.</returns>
135         public override IntPtr GetEflClass()
136         {
137             return Efl.Canvas.SurfaceX11.efl_canvas_surface_x11_class_get();
138         }
139
140         #pragma warning disable CA1707, CS1591, SA1300, SA1600
141
142         
143         private delegate void efl_canvas_surface_x11_pixmap_get_delegate(System.IntPtr obj, System.IntPtr pd,  out System.IntPtr visual,  out uint pixmap);
144
145         
146         public delegate void efl_canvas_surface_x11_pixmap_get_api_delegate(System.IntPtr obj,  out System.IntPtr visual,  out uint pixmap);
147
148         public static Efl.Eo.FunctionWrapper<efl_canvas_surface_x11_pixmap_get_api_delegate> efl_canvas_surface_x11_pixmap_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_surface_x11_pixmap_get_api_delegate>(Module, "efl_canvas_surface_x11_pixmap_get");
149
150         private static void pixmap_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr visual, out uint pixmap)
151         {
152             Eina.Log.Debug("function efl_canvas_surface_x11_pixmap_get was called");
153             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
154             if (ws != null)
155             {
156                         visual = default(System.IntPtr);        pixmap = default(uint);                            
157                 try
158                 {
159                     ((SurfaceX11)ws.Target).GetPixmap(out visual, out pixmap);
160                 }
161                 catch (Exception e)
162                 {
163                     Eina.Log.Warning($"Callback error: {e.ToString()}");
164                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
165                 }
166
167                                         
168             }
169             else
170             {
171                 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);
172             }
173         }
174
175         private static efl_canvas_surface_x11_pixmap_get_delegate efl_canvas_surface_x11_pixmap_get_static_delegate;
176
177         [return: MarshalAs(UnmanagedType.U1)]
178         private delegate bool efl_canvas_surface_x11_pixmap_set_delegate(System.IntPtr obj, System.IntPtr pd,  System.IntPtr visual,  uint pixmap);
179
180         [return: MarshalAs(UnmanagedType.U1)]
181         public delegate bool efl_canvas_surface_x11_pixmap_set_api_delegate(System.IntPtr obj,  System.IntPtr visual,  uint pixmap);
182
183         public static Efl.Eo.FunctionWrapper<efl_canvas_surface_x11_pixmap_set_api_delegate> efl_canvas_surface_x11_pixmap_set_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_surface_x11_pixmap_set_api_delegate>(Module, "efl_canvas_surface_x11_pixmap_set");
184
185         private static bool pixmap_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr visual, uint pixmap)
186         {
187             Eina.Log.Debug("function efl_canvas_surface_x11_pixmap_set was called");
188             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
189             if (ws != null)
190             {
191                                                             bool _ret_var = default(bool);
192                 try
193                 {
194                     _ret_var = ((SurfaceX11)ws.Target).SetPixmap(visual, pixmap);
195                 }
196                 catch (Exception e)
197                 {
198                     Eina.Log.Warning($"Callback error: {e.ToString()}");
199                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
200                 }
201
202                                         return _ret_var;
203
204             }
205             else
206             {
207                 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);
208             }
209         }
210
211         private static efl_canvas_surface_x11_pixmap_set_delegate efl_canvas_surface_x11_pixmap_set_static_delegate;
212
213         #pragma warning restore CA1707, CS1591, SA1300, SA1600
214
215 }
216 }
217 }
218
219 }
220
221 #if EFL_BETA
222 #pragma warning disable CS1591
223 public static class Efl_CanvasSurfaceX11_ExtensionMethods {
224     
225 }
226 #pragma warning restore CS1591
227 #endif
228 namespace Efl {
229
230 namespace Canvas {
231
232 /// <summary>The type used by <see cref="Efl.Canvas.Surface.NativeBuffer"/>.</summary>
233 [StructLayout(LayoutKind.Sequential)]
234 [Efl.Eo.BindingEntity]
235 public struct SurfaceX11Pixmap
236 {
237     /// <summary>X11 Visual for this Pixmap.</summary>
238     public System.IntPtr Visual;
239     /// <summary>X11 Pixmap ID.</summary>
240     public uint Pixmap;
241     /// <summary>Constructor for SurfaceX11Pixmap.</summary>
242     /// <param name="Visual">X11 Visual for this Pixmap.</param>;
243     /// <param name="Pixmap">X11 Pixmap ID.</param>;
244     public SurfaceX11Pixmap(
245         System.IntPtr Visual = default(System.IntPtr),
246         uint Pixmap = default(uint)    )
247     {
248         this.Visual = Visual;
249         this.Pixmap = Pixmap;
250     }
251
252     /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
253     /// <param name="ptr">Native pointer to be converted.</param>
254     public static implicit operator SurfaceX11Pixmap(IntPtr ptr)
255     {
256         var tmp = (SurfaceX11Pixmap.NativeStruct)Marshal.PtrToStructure(ptr, typeof(SurfaceX11Pixmap.NativeStruct));
257         return tmp;
258     }
259
260     #pragma warning disable CS1591
261
262     /// <summary>Internal wrapper for struct SurfaceX11Pixmap.</summary>
263     [StructLayout(LayoutKind.Sequential)]
264     public struct NativeStruct
265     {
266         
267         public System.IntPtr Visual;
268         
269         public uint Pixmap;
270         /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
271         public static implicit operator SurfaceX11Pixmap.NativeStruct(SurfaceX11Pixmap _external_struct)
272         {
273             var _internal_struct = new SurfaceX11Pixmap.NativeStruct();
274             _internal_struct.Visual = _external_struct.Visual;
275             _internal_struct.Pixmap = _external_struct.Pixmap;
276             return _internal_struct;
277         }
278
279         /// <summary>Implicit conversion to the managed representation.</summary>
280         public static implicit operator SurfaceX11Pixmap(SurfaceX11Pixmap.NativeStruct _internal_struct)
281         {
282             var _external_struct = new SurfaceX11Pixmap();
283             _external_struct.Visual = _internal_struct.Visual;
284             _external_struct.Pixmap = _internal_struct.Pixmap;
285             return _external_struct;
286         }
287
288     }
289
290     #pragma warning restore CS1591
291
292 }
293
294 }
295
296 }
297