[EflSharp] Update Circle and efl cs files (#896)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_screen.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 /// <summary>Efl screen interface
11 /// (Since EFL 1.22)</summary>
12 [Efl.IScreenConcrete.NativeMethods]
13 public interface IScreen : 
14     Efl.Eo.IWrapper, IDisposable
15 {
16     /// <summary>Get screen size (in pixels) for the screen.
17 /// Note that on some display systems this information is not available and a value of 0x0 will be returned.
18 /// (Since EFL 1.22)</summary>
19 /// <returns>The screen size in pixels.</returns>
20 Eina.Size2D GetScreenSizeInPixels();
21     /// <summary>Get screen scaling factor.
22 /// This is the factor by which window contents will be scaled on the screen.
23 /// 
24 /// Note that on some display systems this information is not available and a value of 1.0 will be returned.
25 /// (Since EFL 1.22)</summary>
26 /// <returns>The screen scaling factor.</returns>
27 float GetScreenScaleFactor();
28     /// <summary>Get the rotation of the screen.
29 /// Most engines only return multiples of 90.
30 /// (Since EFL 1.22)</summary>
31 /// <returns>Screen rotation in degrees.</returns>
32 int GetScreenRotation();
33     /// <summary>Get the pixel density in DPI (Dots Per Inch) for the screen that a window is on.
34 /// (Since EFL 1.22)</summary>
35 /// <param name="xdpi">Horizontal DPI.</param>
36 /// <param name="ydpi">Vertical DPI.</param>
37 void GetScreenDpi(out int xdpi, out int ydpi);
38                     /// <summary>Get screen size (in pixels) for the screen.
39     /// Note that on some display systems this information is not available and a value of 0x0 will be returned.
40     /// (Since EFL 1.22)</summary>
41     /// <value>The screen size in pixels.</value>
42     Eina.Size2D ScreenSizeInPixels {
43         get ;
44     }
45     /// <summary>Get screen scaling factor.
46     /// This is the factor by which window contents will be scaled on the screen.
47     /// 
48     /// Note that on some display systems this information is not available and a value of 1.0 will be returned.
49     /// (Since EFL 1.22)</summary>
50     /// <value>The screen scaling factor.</value>
51     float ScreenScaleFactor {
52         get ;
53     }
54     /// <summary>Get the rotation of the screen.
55     /// Most engines only return multiples of 90.
56     /// (Since EFL 1.22)</summary>
57     /// <value>Screen rotation in degrees.</value>
58     int ScreenRotation {
59         get ;
60     }
61 }
62 /// <summary>Efl screen interface
63 /// (Since EFL 1.22)</summary>
64 sealed public class IScreenConcrete :
65     Efl.Eo.EoWrapper
66     , IScreen
67     
68 {
69     ///<summary>Pointer to the native class description.</summary>
70     public override System.IntPtr NativeClass
71     {
72         get
73         {
74             if (((object)this).GetType() == typeof(IScreenConcrete))
75             {
76                 return GetEflClassStatic();
77             }
78             else
79             {
80                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
81             }
82         }
83     }
84
85     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
86         efl_screen_interface_get();
87     /// <summary>Initializes a new instance of the <see cref="IScreen"/> class.
88     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
89     private IScreenConcrete(System.IntPtr raw) : base(raw)
90     {
91     }
92
93     /// <summary>Get screen size (in pixels) for the screen.
94     /// Note that on some display systems this information is not available and a value of 0x0 will be returned.
95     /// (Since EFL 1.22)</summary>
96     /// <returns>The screen size in pixels.</returns>
97     public Eina.Size2D GetScreenSizeInPixels() {
98          var _ret_var = Efl.IScreenConcrete.NativeMethods.efl_screen_size_in_pixels_get_ptr.Value.Delegate(this.NativeHandle);
99         Eina.Error.RaiseIfUnhandledException();
100         return _ret_var;
101  }
102     /// <summary>Get screen scaling factor.
103     /// This is the factor by which window contents will be scaled on the screen.
104     /// 
105     /// Note that on some display systems this information is not available and a value of 1.0 will be returned.
106     /// (Since EFL 1.22)</summary>
107     /// <returns>The screen scaling factor.</returns>
108     public float GetScreenScaleFactor() {
109          var _ret_var = Efl.IScreenConcrete.NativeMethods.efl_screen_scale_factor_get_ptr.Value.Delegate(this.NativeHandle);
110         Eina.Error.RaiseIfUnhandledException();
111         return _ret_var;
112  }
113     /// <summary>Get the rotation of the screen.
114     /// Most engines only return multiples of 90.
115     /// (Since EFL 1.22)</summary>
116     /// <returns>Screen rotation in degrees.</returns>
117     public int GetScreenRotation() {
118          var _ret_var = Efl.IScreenConcrete.NativeMethods.efl_screen_rotation_get_ptr.Value.Delegate(this.NativeHandle);
119         Eina.Error.RaiseIfUnhandledException();
120         return _ret_var;
121  }
122     /// <summary>Get the pixel density in DPI (Dots Per Inch) for the screen that a window is on.
123     /// (Since EFL 1.22)</summary>
124     /// <param name="xdpi">Horizontal DPI.</param>
125     /// <param name="ydpi">Vertical DPI.</param>
126     public void GetScreenDpi(out int xdpi, out int ydpi) {
127                                                          Efl.IScreenConcrete.NativeMethods.efl_screen_dpi_get_ptr.Value.Delegate(this.NativeHandle,out xdpi, out ydpi);
128         Eina.Error.RaiseIfUnhandledException();
129                                          }
130     /// <summary>Get screen size (in pixels) for the screen.
131     /// Note that on some display systems this information is not available and a value of 0x0 will be returned.
132     /// (Since EFL 1.22)</summary>
133     /// <value>The screen size in pixels.</value>
134     public Eina.Size2D ScreenSizeInPixels {
135         get { return GetScreenSizeInPixels(); }
136     }
137     /// <summary>Get screen scaling factor.
138     /// This is the factor by which window contents will be scaled on the screen.
139     /// 
140     /// Note that on some display systems this information is not available and a value of 1.0 will be returned.
141     /// (Since EFL 1.22)</summary>
142     /// <value>The screen scaling factor.</value>
143     public float ScreenScaleFactor {
144         get { return GetScreenScaleFactor(); }
145     }
146     /// <summary>Get the rotation of the screen.
147     /// Most engines only return multiples of 90.
148     /// (Since EFL 1.22)</summary>
149     /// <value>Screen rotation in degrees.</value>
150     public int ScreenRotation {
151         get { return GetScreenRotation(); }
152     }
153     private static IntPtr GetEflClassStatic()
154     {
155         return Efl.IScreenConcrete.efl_screen_interface_get();
156     }
157     /// <summary>Wrapper for native methods and virtual method delegates.
158     /// For internal use by generated code only.</summary>
159     public class NativeMethods  : Efl.Eo.NativeClass
160     {
161         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
162         /// <summary>Gets the list of Eo operations to override.</summary>
163         /// <returns>The list of Eo operations to be overload.</returns>
164         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
165         {
166             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
167             var methods = Efl.Eo.Globals.GetUserMethods(type);
168
169             if (efl_screen_size_in_pixels_get_static_delegate == null)
170             {
171                 efl_screen_size_in_pixels_get_static_delegate = new efl_screen_size_in_pixels_get_delegate(screen_size_in_pixels_get);
172             }
173
174             if (methods.FirstOrDefault(m => m.Name == "GetScreenSizeInPixels") != null)
175             {
176                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_screen_size_in_pixels_get"), func = Marshal.GetFunctionPointerForDelegate(efl_screen_size_in_pixels_get_static_delegate) });
177             }
178
179             if (efl_screen_scale_factor_get_static_delegate == null)
180             {
181                 efl_screen_scale_factor_get_static_delegate = new efl_screen_scale_factor_get_delegate(screen_scale_factor_get);
182             }
183
184             if (methods.FirstOrDefault(m => m.Name == "GetScreenScaleFactor") != null)
185             {
186                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_screen_scale_factor_get"), func = Marshal.GetFunctionPointerForDelegate(efl_screen_scale_factor_get_static_delegate) });
187             }
188
189             if (efl_screen_rotation_get_static_delegate == null)
190             {
191                 efl_screen_rotation_get_static_delegate = new efl_screen_rotation_get_delegate(screen_rotation_get);
192             }
193
194             if (methods.FirstOrDefault(m => m.Name == "GetScreenRotation") != null)
195             {
196                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_screen_rotation_get"), func = Marshal.GetFunctionPointerForDelegate(efl_screen_rotation_get_static_delegate) });
197             }
198
199             if (efl_screen_dpi_get_static_delegate == null)
200             {
201                 efl_screen_dpi_get_static_delegate = new efl_screen_dpi_get_delegate(screen_dpi_get);
202             }
203
204             if (methods.FirstOrDefault(m => m.Name == "GetScreenDpi") != null)
205             {
206                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_screen_dpi_get"), func = Marshal.GetFunctionPointerForDelegate(efl_screen_dpi_get_static_delegate) });
207             }
208
209             return descs;
210         }
211         /// <summary>Returns the Eo class for the native methods of this class.</summary>
212         /// <returns>The native class pointer.</returns>
213         public override IntPtr GetEflClass()
214         {
215             return Efl.IScreenConcrete.efl_screen_interface_get();
216         }
217
218         #pragma warning disable CA1707, CS1591, SA1300, SA1600
219
220         
221         private delegate Eina.Size2D.NativeStruct efl_screen_size_in_pixels_get_delegate(System.IntPtr obj, System.IntPtr pd);
222
223         
224         public delegate Eina.Size2D.NativeStruct efl_screen_size_in_pixels_get_api_delegate(System.IntPtr obj);
225
226         public static Efl.Eo.FunctionWrapper<efl_screen_size_in_pixels_get_api_delegate> efl_screen_size_in_pixels_get_ptr = new Efl.Eo.FunctionWrapper<efl_screen_size_in_pixels_get_api_delegate>(Module, "efl_screen_size_in_pixels_get");
227
228         private static Eina.Size2D.NativeStruct screen_size_in_pixels_get(System.IntPtr obj, System.IntPtr pd)
229         {
230             Eina.Log.Debug("function efl_screen_size_in_pixels_get was called");
231             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
232             if (ws != null)
233             {
234             Eina.Size2D _ret_var = default(Eina.Size2D);
235                 try
236                 {
237                     _ret_var = ((IScreen)ws.Target).GetScreenSizeInPixels();
238                 }
239                 catch (Exception e)
240                 {
241                     Eina.Log.Warning($"Callback error: {e.ToString()}");
242                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
243                 }
244
245         return _ret_var;
246
247             }
248             else
249             {
250                 return efl_screen_size_in_pixels_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
251             }
252         }
253
254         private static efl_screen_size_in_pixels_get_delegate efl_screen_size_in_pixels_get_static_delegate;
255
256         
257         private delegate float efl_screen_scale_factor_get_delegate(System.IntPtr obj, System.IntPtr pd);
258
259         
260         public delegate float efl_screen_scale_factor_get_api_delegate(System.IntPtr obj);
261
262         public static Efl.Eo.FunctionWrapper<efl_screen_scale_factor_get_api_delegate> efl_screen_scale_factor_get_ptr = new Efl.Eo.FunctionWrapper<efl_screen_scale_factor_get_api_delegate>(Module, "efl_screen_scale_factor_get");
263
264         private static float screen_scale_factor_get(System.IntPtr obj, System.IntPtr pd)
265         {
266             Eina.Log.Debug("function efl_screen_scale_factor_get was called");
267             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
268             if (ws != null)
269             {
270             float _ret_var = default(float);
271                 try
272                 {
273                     _ret_var = ((IScreen)ws.Target).GetScreenScaleFactor();
274                 }
275                 catch (Exception e)
276                 {
277                     Eina.Log.Warning($"Callback error: {e.ToString()}");
278                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
279                 }
280
281         return _ret_var;
282
283             }
284             else
285             {
286                 return efl_screen_scale_factor_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
287             }
288         }
289
290         private static efl_screen_scale_factor_get_delegate efl_screen_scale_factor_get_static_delegate;
291
292         
293         private delegate int efl_screen_rotation_get_delegate(System.IntPtr obj, System.IntPtr pd);
294
295         
296         public delegate int efl_screen_rotation_get_api_delegate(System.IntPtr obj);
297
298         public static Efl.Eo.FunctionWrapper<efl_screen_rotation_get_api_delegate> efl_screen_rotation_get_ptr = new Efl.Eo.FunctionWrapper<efl_screen_rotation_get_api_delegate>(Module, "efl_screen_rotation_get");
299
300         private static int screen_rotation_get(System.IntPtr obj, System.IntPtr pd)
301         {
302             Eina.Log.Debug("function efl_screen_rotation_get was called");
303             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
304             if (ws != null)
305             {
306             int _ret_var = default(int);
307                 try
308                 {
309                     _ret_var = ((IScreen)ws.Target).GetScreenRotation();
310                 }
311                 catch (Exception e)
312                 {
313                     Eina.Log.Warning($"Callback error: {e.ToString()}");
314                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
315                 }
316
317         return _ret_var;
318
319             }
320             else
321             {
322                 return efl_screen_rotation_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
323             }
324         }
325
326         private static efl_screen_rotation_get_delegate efl_screen_rotation_get_static_delegate;
327
328         
329         private delegate void efl_screen_dpi_get_delegate(System.IntPtr obj, System.IntPtr pd,  out int xdpi,  out int ydpi);
330
331         
332         public delegate void efl_screen_dpi_get_api_delegate(System.IntPtr obj,  out int xdpi,  out int ydpi);
333
334         public static Efl.Eo.FunctionWrapper<efl_screen_dpi_get_api_delegate> efl_screen_dpi_get_ptr = new Efl.Eo.FunctionWrapper<efl_screen_dpi_get_api_delegate>(Module, "efl_screen_dpi_get");
335
336         private static void screen_dpi_get(System.IntPtr obj, System.IntPtr pd, out int xdpi, out int ydpi)
337         {
338             Eina.Log.Debug("function efl_screen_dpi_get was called");
339             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
340             if (ws != null)
341             {
342                         xdpi = default(int);        ydpi = default(int);                            
343                 try
344                 {
345                     ((IScreen)ws.Target).GetScreenDpi(out xdpi, out ydpi);
346                 }
347                 catch (Exception e)
348                 {
349                     Eina.Log.Warning($"Callback error: {e.ToString()}");
350                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
351                 }
352
353                                         
354             }
355             else
356             {
357                 efl_screen_dpi_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out xdpi, out ydpi);
358             }
359         }
360
361         private static efl_screen_dpi_get_delegate efl_screen_dpi_get_static_delegate;
362
363         #pragma warning restore CA1707, CS1591, SA1300, SA1600
364
365 }
366 }
367 }
368