[EflSharp] Update Circle and efl cs files (#995)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_win_socket.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 Ui {
12
13 /// <summary>An off-screen window to be displayed in a remote process.
14 /// The window is rendered onto an image buffer to be displayed in another process&apos; plug image object. No actual window is created for this type. The window contents can then be sent over a socket so that another process displays it inside a plug image.</summary>
15 /// <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>
16 [Efl.Ui.WinSocket.NativeMethods]
17 [Efl.Eo.BindingEntity]
18 public class WinSocket : Efl.Ui.Win
19 {
20     /// <summary>Pointer to the native class description.</summary>
21     public override System.IntPtr NativeClass
22     {
23         get
24         {
25             if (((object)this).GetType() == typeof(WinSocket))
26             {
27                 return GetEflClassStatic();
28             }
29             else
30             {
31                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32             }
33         }
34     }
35
36     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
37         efl_ui_win_socket_class_get();
38     /// <summary>Initializes a new instance of the <see cref="WinSocket"/> class.</summary>
39     /// <param name="parent">Parent instance.</param>
40     /// <param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle" /></param>
41     /// <param name="winName">The window name. See <see cref="Efl.Ui.Win.SetWinName" /></param>
42     /// <param name="winType">The type of the window. See <see cref="Efl.Ui.Win.SetWinType" /></param>
43     /// <param name="accelPreference">The hardware acceleration preference for this window. See <see cref="Efl.Ui.Win.SetAccelPreference" /></param>
44     public WinSocket(Efl.Object parent
45             , System.String style = null, System.String winName = null, Efl.Ui.WinType? winType = null, System.String accelPreference = null) : base(efl_ui_win_socket_class_get(), parent)
46     {
47         if (Efl.Eo.Globals.ParamHelperCheck(style))
48         {
49             SetStyle(Efl.Eo.Globals.GetParamHelper(style));
50         }
51
52         if (Efl.Eo.Globals.ParamHelperCheck(winName))
53         {
54             SetWinName(Efl.Eo.Globals.GetParamHelper(winName));
55         }
56
57         if (Efl.Eo.Globals.ParamHelperCheck(winType))
58         {
59             SetWinType(Efl.Eo.Globals.GetParamHelper(winType));
60         }
61
62         if (Efl.Eo.Globals.ParamHelperCheck(accelPreference))
63         {
64             SetAccelPreference(Efl.Eo.Globals.GetParamHelper(accelPreference));
65         }
66
67         FinishInstantiation();
68     }
69
70     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
71     /// Do not call this constructor directly.</summary>
72     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
73     protected WinSocket(ConstructingHandle ch) : base(ch)
74     {
75     }
76
77     /// <summary>Initializes a new instance of the <see cref="WinSocket"/> class.
78     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
79     /// <param name="wh">The native pointer to be wrapped.</param>
80     protected WinSocket(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
81     {
82     }
83
84     /// <summary>Initializes a new instance of the <see cref="WinSocket"/> class.
85     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
86     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
87     /// <param name="parent">The Efl.Object parent of this instance.</param>
88     protected WinSocket(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
89     {
90     }
91
92     /// <summary>Create a socket to provide the service for Plug widget.</summary>
93     /// <param name="svcname">The name of the service to be advertised. Ensure that it is unique (when combined with <c>svcnum</c>) otherwise creation may fail.</param>
94     /// <param name="svcnum">A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name.</param>
95     /// <param name="svcsys">A boolean which when true specifies the creation of a system-wide service to which all users can connect, otherwise the service is private to the user id that created it.</param>
96     /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
97     virtual public bool SocketListen(System.String svcname, int svcnum, bool svcsys) {
98                                                                                  var _ret_var = Efl.Ui.WinSocket.NativeMethods.efl_ui_win_socket_listen_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),svcname, svcnum, svcsys);
99         Eina.Error.RaiseIfUnhandledException();
100                                                         return _ret_var;
101  }
102     private static IntPtr GetEflClassStatic()
103     {
104         return Efl.Ui.WinSocket.efl_ui_win_socket_class_get();
105     }
106     /// <summary>Wrapper for native methods and virtual method delegates.
107     /// For internal use by generated code only.</summary>
108     public new class NativeMethods : Efl.Ui.Win.NativeMethods
109     {
110         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
111         /// <summary>Gets the list of Eo operations to override.</summary>
112         /// <returns>The list of Eo operations to be overload.</returns>
113         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
114         {
115             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
116             var methods = Efl.Eo.Globals.GetUserMethods(type);
117
118             if (efl_ui_win_socket_listen_static_delegate == null)
119             {
120                 efl_ui_win_socket_listen_static_delegate = new efl_ui_win_socket_listen_delegate(socket_listen);
121             }
122
123             if (methods.FirstOrDefault(m => m.Name == "SocketListen") != null)
124             {
125                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_win_socket_listen"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_win_socket_listen_static_delegate) });
126             }
127
128             descs.AddRange(base.GetEoOps(type));
129             return descs;
130         }
131         /// <summary>Returns the Eo class for the native methods of this class.</summary>
132         /// <returns>The native class pointer.</returns>
133         public override IntPtr GetEflClass()
134         {
135             return Efl.Ui.WinSocket.efl_ui_win_socket_class_get();
136         }
137
138         #pragma warning disable CA1707, CS1591, SA1300, SA1600
139
140         [return: MarshalAs(UnmanagedType.U1)]
141         private delegate bool efl_ui_win_socket_listen_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String svcname,  int svcnum, [MarshalAs(UnmanagedType.U1)] bool svcsys);
142
143         [return: MarshalAs(UnmanagedType.U1)]
144         public delegate bool efl_ui_win_socket_listen_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String svcname,  int svcnum, [MarshalAs(UnmanagedType.U1)] bool svcsys);
145
146         public static Efl.Eo.FunctionWrapper<efl_ui_win_socket_listen_api_delegate> efl_ui_win_socket_listen_ptr = new Efl.Eo.FunctionWrapper<efl_ui_win_socket_listen_api_delegate>(Module, "efl_ui_win_socket_listen");
147
148         private static bool socket_listen(System.IntPtr obj, System.IntPtr pd, System.String svcname, int svcnum, bool svcsys)
149         {
150             Eina.Log.Debug("function efl_ui_win_socket_listen was called");
151             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
152             if (ws != null)
153             {
154                                                                                     bool _ret_var = default(bool);
155                 try
156                 {
157                     _ret_var = ((WinSocket)ws.Target).SocketListen(svcname, svcnum, svcsys);
158                 }
159                 catch (Exception e)
160                 {
161                     Eina.Log.Warning($"Callback error: {e.ToString()}");
162                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
163                 }
164
165                                                         return _ret_var;
166
167             }
168             else
169             {
170                 return efl_ui_win_socket_listen_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), svcname, svcnum, svcsys);
171             }
172         }
173
174         private static efl_ui_win_socket_listen_delegate efl_ui_win_socket_listen_static_delegate;
175
176         #pragma warning restore CA1707, CS1591, SA1300, SA1600
177
178 }
179 }
180 }
181
182 }
183
184 #if EFL_BETA
185 #pragma warning disable CS1591
186 public static class Efl_UiWinSocket_ExtensionMethods {
187 }
188 #pragma warning restore CS1591
189 #endif