bc90054b87fd4f10c5693e4097b1233b98b1fb2c
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / 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.ComponentModel;
7 namespace Efl { 
8 /// <summary>Efl text interface</summary>
9 [TextNativeInherit]
10 public interface Text : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <summary>Retrieves the text string currently being displayed by the given text object.
14 /// Do not free() the return value.
15 /// 
16 /// See also <see cref="Efl.Text.GetText"/>.</summary>
17 /// <returns>Text string to display on it.</returns>
18  System.String GetText();
19    /// <summary>Sets the text string to be displayed by the given text object.
20 /// See also <see cref="Efl.Text.GetText"/>.</summary>
21 /// <param name="text">Text string to display on it.</param>
22 /// <returns></returns>
23  void SetText(  System.String text);
24       }
25 /// <summary>Efl text interface</summary>
26 sealed public class TextConcrete : 
27
28 Text
29    
30 {
31    ///<summary>Pointer to the native class description.</summary>
32    public System.IntPtr NativeClass {
33       get {
34          if (((object)this).GetType() == typeof (TextConcrete))
35             return Efl.TextNativeInherit.GetEflClassStatic();
36          else
37             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
38       }
39    }
40    private  System.IntPtr handle;
41    ///<summary>Pointer to the native instance.</summary>
42    public System.IntPtr NativeHandle {
43       get { return handle; }
44    }
45    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
46       efl_text_interface_get();
47    ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
48    public TextConcrete(System.IntPtr raw)
49    {
50       handle = raw;
51       register_event_proxies();
52    }
53    ///<summary>Destructor.</summary>
54    ~TextConcrete()
55    {
56       Dispose(false);
57    }
58    ///<summary>Releases the underlying native instance.</summary>
59    void Dispose(bool disposing)
60    {
61       if (handle != System.IntPtr.Zero) {
62          Efl.Eo.Globals.efl_unref(handle);
63          handle = System.IntPtr.Zero;
64       }
65    }
66    ///<summary>Releases the underlying native instance.</summary>
67    public void Dispose()
68    {
69       Dispose(true);
70       GC.SuppressFinalize(this);
71    }
72    ///<summary>Casts obj into an instance of this type.</summary>
73    public static TextConcrete static_cast(Efl.Object obj)
74    {
75       if (obj == null)
76          throw new System.ArgumentNullException("obj");
77       return new TextConcrete(obj.NativeHandle);
78    }
79    ///<summary>Verifies if the given object is equal to this one.</summary>
80    public override bool Equals(object obj)
81    {
82       var other = obj as Efl.Object;
83       if (other == null)
84          return false;
85       return this.NativeHandle == other.NativeHandle;
86    }
87    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
88    public override int GetHashCode()
89    {
90       return this.NativeHandle.ToInt32();
91    }
92    ///<summary>Turns the native pointer into a string representation.</summary>
93    public override String ToString()
94    {
95       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
96    }
97     void register_event_proxies()
98    {
99    }
100    /// <summary>Retrieves the text string currently being displayed by the given text object.
101    /// Do not free() the return value.
102    /// 
103    /// See also <see cref="Efl.Text.GetText"/>.</summary>
104    /// <returns>Text string to display on it.</returns>
105    public  System.String GetText() {
106        var _ret_var = Efl.TextNativeInherit.efl_text_get_ptr.Value.Delegate(this.NativeHandle);
107       Eina.Error.RaiseIfUnhandledException();
108       return _ret_var;
109  }
110    /// <summary>Sets the text string to be displayed by the given text object.
111    /// See also <see cref="Efl.Text.GetText"/>.</summary>
112    /// <param name="text">Text string to display on it.</param>
113    /// <returns></returns>
114    public  void SetText(  System.String text) {
115                          Efl.TextNativeInherit.efl_text_set_ptr.Value.Delegate(this.NativeHandle, text);
116       Eina.Error.RaiseIfUnhandledException();
117                    }
118 }
119 public class TextNativeInherit  : Efl.Eo.NativeClass{
120    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
121    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
122    {
123       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
124       if (efl_text_get_static_delegate == null)
125       efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
126       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)});
127       if (efl_text_set_static_delegate == null)
128       efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
129       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)});
130       return descs;
131    }
132    public override IntPtr GetEflClass()
133    {
134       return Efl.TextConcrete.efl_text_interface_get();
135    }
136    public static  IntPtr GetEflClassStatic()
137    {
138       return Efl.TextConcrete.efl_text_interface_get();
139    }
140
141
142     [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate  System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd);
143
144
145     [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate  System.String efl_text_get_api_delegate(System.IntPtr obj);
146     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");
147     private static  System.String text_get(System.IntPtr obj, System.IntPtr pd)
148    {
149       Eina.Log.Debug("function efl_text_get was called");
150       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
151       if(wrapper != null) {
152                    System.String _ret_var = default( System.String);
153          try {
154             _ret_var = ((Text)wrapper).GetText();
155          } catch (Exception e) {
156             Eina.Log.Warning($"Callback error: {e.ToString()}");
157             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
158          }
159       return _ret_var;
160       } else {
161          return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
162       }
163    }
164    private static efl_text_get_delegate efl_text_get_static_delegate;
165
166
167     private delegate  void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text);
168
169
170     public delegate  void efl_text_set_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text);
171     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");
172     private static  void text_set(System.IntPtr obj, System.IntPtr pd,   System.String text)
173    {
174       Eina.Log.Debug("function efl_text_set was called");
175       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
176       if(wrapper != null) {
177                                     
178          try {
179             ((Text)wrapper).SetText( text);
180          } catch (Exception e) {
181             Eina.Log.Warning($"Callback error: {e.ToString()}");
182             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
183          }
184                         } else {
185          efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  text);
186       }
187    }
188    private static efl_text_set_delegate efl_text_set_static_delegate;
189 }
190