1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { namespace TextFactory {
8 /// <summary>Factory that creates emoticons from the current theme given a key.
10 [EmoticonsNativeInherit]
11 public class Emoticons : Efl.Object, Efl.Eo.IWrapper,Efl.Canvas.TextFactory
13 public new static System.IntPtr klass = System.IntPtr.Zero;
14 public new static Efl.Ui.TextFactory.EmoticonsNativeInherit nativeInherit = new Efl.Ui.TextFactory.EmoticonsNativeInherit();
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass {
18 if (((object)this).GetType() == typeof (Emoticons))
19 return Efl.Ui.TextFactory.EmoticonsNativeInherit.GetEflClassStatic();
21 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
24 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
25 efl_ui_text_factory_emoticons_class_get();
26 ///<summary>Creates a new instance.</summary>
27 ///<param name="parent">Parent instance.</param>
28 public Emoticons(Efl.Object parent= null
30 base(efl_ui_text_factory_emoticons_class_get(), typeof(Emoticons), parent)
32 FinishInstantiation();
34 ///<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>
35 public Emoticons(System.IntPtr raw) : base(raw)
37 register_event_proxies();
39 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
40 protected Emoticons(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
41 ///<summary>Casts obj into an instance of this type.</summary>
42 public new static Emoticons static_cast(Efl.Object obj)
45 throw new System.ArgumentNullException("obj");
46 return new Emoticons(obj.NativeHandle);
48 ///<summary>Verifies if the given object is equal to this one.</summary>
49 public override bool Equals(object obj)
51 var other = obj as Efl.Object;
54 return this.NativeHandle == other.NativeHandle;
56 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
57 public override int GetHashCode()
59 return this.NativeHandle.ToInt32();
61 ///<summary>Turns the native pointer into a string representation.</summary>
62 public override String ToString()
64 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
66 protected override void register_event_proxies()
68 base.register_event_proxies();
70 /// <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>.
72 /// <param name="kw_object">The parent of the created object
74 /// <param name="key">Key that is associated to an item object
76 /// <returns></returns>
77 virtual public Efl.Canvas.Object Create( Efl.Canvas.Object kw_object, System.String key) {
78 var _ret_var = Efl.Canvas.TextFactoryNativeInherit.efl_canvas_text_factory_create_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), kw_object, key);
79 Eina.Error.RaiseIfUnhandledException();
82 private static new IntPtr GetEflClassStatic()
84 return Efl.Ui.TextFactory.Emoticons.efl_ui_text_factory_emoticons_class_get();
87 public class EmoticonsNativeInherit : Efl.ObjectNativeInherit{
88 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
89 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
91 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
92 if (efl_canvas_text_factory_create_static_delegate == null)
93 efl_canvas_text_factory_create_static_delegate = new efl_canvas_text_factory_create_delegate(create);
94 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)});
95 descs.AddRange(base.GetEoOps(type));
98 public override IntPtr GetEflClass()
100 return Efl.Ui.TextFactory.Emoticons.efl_ui_text_factory_emoticons_class_get();
102 public static new IntPtr GetEflClassStatic()
104 return Efl.Ui.TextFactory.Emoticons.efl_ui_text_factory_emoticons_class_get();
108 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.OwnTag>))] private delegate Efl.Canvas.Object efl_canvas_text_factory_create_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] Efl.Canvas.Object kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key);
111 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.OwnTag>))] public delegate Efl.Canvas.Object efl_canvas_text_factory_create_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] Efl.Canvas.Object kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key);
112 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");
113 private static Efl.Canvas.Object create(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Object kw_object, System.String key)
115 Eina.Log.Debug("function efl_canvas_text_factory_create was called");
116 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
117 if(wrapper != null) {
118 Efl.Canvas.Object _ret_var = default(Efl.Canvas.Object);
120 _ret_var = ((Emoticons)wrapper).Create( kw_object, key);
121 } catch (Exception e) {
122 Eina.Log.Warning($"Callback error: {e.ToString()}");
123 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
127 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);
130 private static efl_canvas_text_factory_create_delegate efl_canvas_text_factory_create_static_delegate;