[NUI] TCSACR-226 code change (#1032)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_text_factory.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 Canvas {
12
13 /// <summary>Object factory that creates Efl.Canvas.Object objects.
14 /// Translates a given key to an object (item), to be later placed in a text for higher level usages. The translation implementation is left to be decided by the inheriting class, whether it is by treating the <c>key</c> as an image path, or a key associated with a real-path in a hashtable or something else entirely.</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.Canvas.ITextFactoryConcrete.NativeMethods]
17 [Efl.Eo.BindingEntity]
18 public interface ITextFactory : 
19     Efl.Eo.IWrapper, IDisposable
20 {
21     /// <summary>Translates a given <c>key</c> to an item object, and returns the object. The returned object should be owned by the passed <c>object</c>.</summary>
22 /// <param name="kw_object">The parent of the created object</param>
23 /// <param name="key">Key that is associated to an item object</param>
24 Efl.Canvas.Object Create(Efl.Canvas.Object kw_object, System.String key);
25     }
26 /// <summary>Object factory that creates Efl.Canvas.Object objects.
27 /// Translates a given key to an object (item), to be later placed in a text for higher level usages. The translation implementation is left to be decided by the inheriting class, whether it is by treating the <c>key</c> as an image path, or a key associated with a real-path in a hashtable or something else entirely.</summary>
28 /// <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>
29 sealed public  class ITextFactoryConcrete :
30     Efl.Eo.EoWrapper
31     , ITextFactory
32     
33 {
34     /// <summary>Pointer to the native class description.</summary>
35     public override System.IntPtr NativeClass
36     {
37         get
38         {
39             if (((object)this).GetType() == typeof(ITextFactoryConcrete))
40             {
41                 return GetEflClassStatic();
42             }
43             else
44             {
45                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
46             }
47         }
48     }
49
50     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
51     /// Do not call this constructor directly.</summary>
52     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
53     private ITextFactoryConcrete(ConstructingHandle ch) : base(ch)
54     {
55     }
56
57     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
58         efl_canvas_text_factory_interface_get();
59     /// <summary>Initializes a new instance of the <see cref="ITextFactory"/> class.
60     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
61     /// <param name="wh">The native pointer to be wrapped.</param>
62     private ITextFactoryConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
63     {
64     }
65
66     /// <summary>Translates a given <c>key</c> to an item object, and returns the object. The returned object should be owned by the passed <c>object</c>.</summary>
67     /// <param name="kw_object">The parent of the created object</param>
68     /// <param name="key">Key that is associated to an item object</param>
69     public Efl.Canvas.Object Create(Efl.Canvas.Object kw_object, System.String key) {
70                                                          var _ret_var = Efl.Canvas.ITextFactoryConcrete.NativeMethods.efl_canvas_text_factory_create_ptr.Value.Delegate(this.NativeHandle,kw_object, key);
71         Eina.Error.RaiseIfUnhandledException();
72                                         return _ret_var;
73  }
74     private static IntPtr GetEflClassStatic()
75     {
76         return Efl.Canvas.ITextFactoryConcrete.efl_canvas_text_factory_interface_get();
77     }
78     /// <summary>Wrapper for native methods and virtual method delegates.
79     /// For internal use by generated code only.</summary>
80     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
81     {
82         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
83         /// <summary>Gets the list of Eo operations to override.</summary>
84         /// <returns>The list of Eo operations to be overload.</returns>
85         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
86         {
87             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
88             var methods = Efl.Eo.Globals.GetUserMethods(type);
89
90             if (efl_canvas_text_factory_create_static_delegate == null)
91             {
92                 efl_canvas_text_factory_create_static_delegate = new efl_canvas_text_factory_create_delegate(create);
93             }
94
95             if (methods.FirstOrDefault(m => m.Name == "Create") != null)
96             {
97                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_text_factory_create"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_text_factory_create_static_delegate) });
98             }
99
100             return descs;
101         }
102         /// <summary>Returns the Eo class for the native methods of this class.</summary>
103         /// <returns>The native class pointer.</returns>
104         public override IntPtr GetEflClass()
105         {
106             return Efl.Canvas.ITextFactoryConcrete.efl_canvas_text_factory_interface_get();
107         }
108
109         #pragma warning disable CA1707, CS1591, SA1300, SA1600
110
111         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.OwnTag>))]
112         private delegate Efl.Canvas.Object efl_canvas_text_factory_create_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key);
113
114         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.OwnTag>))]
115         public delegate Efl.Canvas.Object efl_canvas_text_factory_create_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key);
116
117         public static Efl.Eo.FunctionWrapper<efl_canvas_text_factory_create_api_delegate> efl_canvas_text_factory_create_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_text_factory_create_api_delegate>(Module, "efl_canvas_text_factory_create");
118
119         private static Efl.Canvas.Object create(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Object kw_object, System.String key)
120         {
121             Eina.Log.Debug("function efl_canvas_text_factory_create was called");
122             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
123             if (ws != null)
124             {
125                                                             Efl.Canvas.Object _ret_var = default(Efl.Canvas.Object);
126                 try
127                 {
128                     _ret_var = ((ITextFactory)ws.Target).Create(kw_object, key);
129                 }
130                 catch (Exception e)
131                 {
132                     Eina.Log.Warning($"Callback error: {e.ToString()}");
133                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
134                 }
135
136                                         return _ret_var;
137
138             }
139             else
140             {
141                 return efl_canvas_text_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), kw_object, key);
142             }
143         }
144
145         private static efl_canvas_text_factory_create_delegate efl_canvas_text_factory_create_static_delegate;
146
147         #pragma warning restore CA1707, CS1591, SA1300, SA1600
148
149 }
150 }
151 }
152
153 }
154
155 #if EFL_BETA
156 #pragma warning disable CS1591
157 public static class Efl_CanvasITextFactoryConcrete_ExtensionMethods {
158 }
159 #pragma warning restore CS1591
160 #endif