[EflSharp] Update Circle and efl cs files (#896)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_text_factory_fallback.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 Ui {
11
12 namespace TextFactory {
13
14 /// <summary>Internal factory for fallback cases.
15 /// This wraps some internal functionality: - Contains 2 factories: image and emoticon - Strips off &quot;file://&quot; prefix for image items, to be used with the image factory.</summary>
16 [Efl.Ui.TextFactory.Fallback.NativeMethods]
17 public class Fallback : Efl.Object, Efl.Canvas.ITextFactory
18 {
19     ///<summary>Pointer to the native class description.</summary>
20     public override System.IntPtr NativeClass
21     {
22         get
23         {
24             if (((object)this).GetType() == typeof(Fallback))
25             {
26                 return GetEflClassStatic();
27             }
28             else
29             {
30                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
31             }
32         }
33     }
34
35     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
36         efl_ui_text_factory_fallback_class_get();
37     /// <summary>Initializes a new instance of the <see cref="Fallback"/> class.</summary>
38     /// <param name="parent">Parent instance.</param>
39     public Fallback(Efl.Object parent= null
40             ) : base(efl_ui_text_factory_fallback_class_get(), typeof(Fallback), parent)
41     {
42         FinishInstantiation();
43     }
44
45     /// <summary>Initializes a new instance of the <see cref="Fallback"/> class.
46     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
47     /// <param name="raw">The native pointer to be wrapped.</param>
48     protected Fallback(System.IntPtr raw) : base(raw)
49     {
50     }
51
52     /// <summary>Initializes a new instance of the <see cref="Fallback"/> class.
53     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
54     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
55     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
56     /// <param name="parent">The Efl.Object parent of this instance.</param>
57     protected Fallback(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
58     {
59     }
60
61     /// <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>
62     /// <param name="kw_object">The parent of the created object</param>
63     /// <param name="key">Key that is associated to an item object</param>
64     virtual public Efl.Canvas.Object Create(Efl.Canvas.Object kw_object, System.String key) {
65                                                          var _ret_var = Efl.Canvas.ITextFactoryConcrete.NativeMethods.efl_canvas_text_factory_create_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),kw_object, key);
66         Eina.Error.RaiseIfUnhandledException();
67                                         return _ret_var;
68  }
69     private static IntPtr GetEflClassStatic()
70     {
71         return Efl.Ui.TextFactory.Fallback.efl_ui_text_factory_fallback_class_get();
72     }
73     /// <summary>Wrapper for native methods and virtual method delegates.
74     /// For internal use by generated code only.</summary>
75     public new class NativeMethods : Efl.Object.NativeMethods
76     {
77         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
78         /// <summary>Gets the list of Eo operations to override.</summary>
79         /// <returns>The list of Eo operations to be overload.</returns>
80         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
81         {
82             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
83             var methods = Efl.Eo.Globals.GetUserMethods(type);
84
85             if (efl_canvas_text_factory_create_static_delegate == null)
86             {
87                 efl_canvas_text_factory_create_static_delegate = new efl_canvas_text_factory_create_delegate(create);
88             }
89
90             if (methods.FirstOrDefault(m => m.Name == "Create") != null)
91             {
92                 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) });
93             }
94
95             descs.AddRange(base.GetEoOps(type));
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.Ui.TextFactory.Fallback.efl_ui_text_factory_fallback_class_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 = ((Fallback)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
151 }
152