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