[EflSharp] Update Circle and efl cs files (#945)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_text.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 text interface
11 /// (Since EFL 1.22)</summary>
12 [Efl.ITextConcrete.NativeMethods]
13 [Efl.Eo.BindingEntity]
14 public interface IText : 
15     Efl.Eo.IWrapper, IDisposable
16 {
17     /// <summary>Retrieves the text string currently being displayed by the given text object.
18 /// Do not free() the return value.
19 /// 
20 /// See also <see cref="Efl.IText.GetText"/>.
21 /// (Since EFL 1.22)</summary>
22 /// <returns>Text string to display on it.</returns>
23 System.String GetText();
24     /// <summary>Sets the text string to be displayed by the given text object.
25 /// See also <see cref="Efl.IText.GetText"/>.
26 /// (Since EFL 1.22)</summary>
27 /// <param name="text">Text string to display on it.</param>
28 void SetText(System.String text);
29         }
30 /// <summary>Efl text interface
31 /// (Since EFL 1.22)</summary>
32 sealed public class ITextConcrete :
33     Efl.Eo.EoWrapper
34     , IText
35     
36 {
37     ///<summary>Pointer to the native class description.</summary>
38     public override System.IntPtr NativeClass
39     {
40         get
41         {
42             if (((object)this).GetType() == typeof(ITextConcrete))
43             {
44                 return GetEflClassStatic();
45             }
46             else
47             {
48                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
49             }
50         }
51     }
52
53     /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
54     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
55     private ITextConcrete(ConstructingHandle ch) : base(ch)
56     {
57     }
58
59     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
60         efl_text_interface_get();
61     /// <summary>Initializes a new instance of the <see cref="IText"/> class.
62     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
63     /// <param name="wh">The native pointer to be wrapped.</param>
64     private ITextConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
65     {
66     }
67
68     /// <summary>Retrieves the text string currently being displayed by the given text object.
69     /// Do not free() the return value.
70     /// 
71     /// See also <see cref="Efl.IText.GetText"/>.
72     /// (Since EFL 1.22)</summary>
73     /// <returns>Text string to display on it.</returns>
74     public System.String GetText() {
75          var _ret_var = Efl.ITextConcrete.NativeMethods.efl_text_get_ptr.Value.Delegate(this.NativeHandle);
76         Eina.Error.RaiseIfUnhandledException();
77         return _ret_var;
78  }
79     /// <summary>Sets the text string to be displayed by the given text object.
80     /// See also <see cref="Efl.IText.GetText"/>.
81     /// (Since EFL 1.22)</summary>
82     /// <param name="text">Text string to display on it.</param>
83     public void SetText(System.String text) {
84                                  Efl.ITextConcrete.NativeMethods.efl_text_set_ptr.Value.Delegate(this.NativeHandle,text);
85         Eina.Error.RaiseIfUnhandledException();
86                          }
87     private static IntPtr GetEflClassStatic()
88     {
89         return Efl.ITextConcrete.efl_text_interface_get();
90     }
91     /// <summary>Wrapper for native methods and virtual method delegates.
92     /// For internal use by generated code only.</summary>
93     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
94     {
95         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
96         /// <summary>Gets the list of Eo operations to override.</summary>
97         /// <returns>The list of Eo operations to be overload.</returns>
98         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
99         {
100             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
101             var methods = Efl.Eo.Globals.GetUserMethods(type);
102
103             if (efl_text_get_static_delegate == null)
104             {
105                 efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
106             }
107
108             if (methods.FirstOrDefault(m => m.Name == "GetText") != null)
109             {
110                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_get_static_delegate) });
111             }
112
113             if (efl_text_set_static_delegate == null)
114             {
115                 efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
116             }
117
118             if (methods.FirstOrDefault(m => m.Name == "SetText") != null)
119             {
120                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_set_static_delegate) });
121             }
122
123             return descs;
124         }
125         /// <summary>Returns the Eo class for the native methods of this class.</summary>
126         /// <returns>The native class pointer.</returns>
127         public override IntPtr GetEflClass()
128         {
129             return Efl.ITextConcrete.efl_text_interface_get();
130         }
131
132         #pragma warning disable CA1707, CS1591, SA1300, SA1600
133
134         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
135         private delegate System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd);
136
137         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
138         public delegate System.String efl_text_get_api_delegate(System.IntPtr obj);
139
140         public static Efl.Eo.FunctionWrapper<efl_text_get_api_delegate> efl_text_get_ptr = new Efl.Eo.FunctionWrapper<efl_text_get_api_delegate>(Module, "efl_text_get");
141
142         private static System.String text_get(System.IntPtr obj, System.IntPtr pd)
143         {
144             Eina.Log.Debug("function efl_text_get was called");
145             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
146             if (ws != null)
147             {
148             System.String _ret_var = default(System.String);
149                 try
150                 {
151                     _ret_var = ((IText)ws.Target).GetText();
152                 }
153                 catch (Exception e)
154                 {
155                     Eina.Log.Warning($"Callback error: {e.ToString()}");
156                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
157                 }
158
159         return _ret_var;
160
161             }
162             else
163             {
164                 return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
165             }
166         }
167
168         private static efl_text_get_delegate efl_text_get_static_delegate;
169
170         
171         private delegate void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
172
173         
174         public delegate void efl_text_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
175
176         public static Efl.Eo.FunctionWrapper<efl_text_set_api_delegate> efl_text_set_ptr = new Efl.Eo.FunctionWrapper<efl_text_set_api_delegate>(Module, "efl_text_set");
177
178         private static void text_set(System.IntPtr obj, System.IntPtr pd, System.String text)
179         {
180             Eina.Log.Debug("function efl_text_set was called");
181             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
182             if (ws != null)
183             {
184                                     
185                 try
186                 {
187                     ((IText)ws.Target).SetText(text);
188                 }
189                 catch (Exception e)
190                 {
191                     Eina.Log.Warning($"Callback error: {e.ToString()}");
192                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
193                 }
194
195                         
196             }
197             else
198             {
199                 efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), text);
200             }
201         }
202
203         private static efl_text_set_delegate efl_text_set_static_delegate;
204
205         #pragma warning restore CA1707, CS1591, SA1300, SA1600
206
207 }
208 }
209 }
210