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