1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>Efl UI Text Alert Popup internal part class</summary>
9 [TextAlertPopupPartNativeInherit]
10 public class TextAlertPopupPart : Efl.Ui.LayoutPart, Efl.Eo.IWrapper,Efl.IContent,Efl.IText
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (TextAlertPopupPart))
16 return Efl.Ui.TextAlertPopupPartNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
22 efl_ui_text_alert_popup_part_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public TextAlertPopupPart(Efl.Object parent= null
27 base(efl_ui_text_alert_popup_part_class_get(), typeof(TextAlertPopupPart), parent)
29 FinishInstantiation();
31 ///<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>
32 protected TextAlertPopupPart(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37 protected TextAlertPopupPart(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38 ///<summary>Verifies if the given object is equal to this one.</summary>
39 public override bool Equals(object obj)
41 var other = obj as Efl.Object;
44 return this.NativeHandle == other.NativeHandle;
46 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47 public override int GetHashCode()
49 return this.NativeHandle.ToInt32();
51 ///<summary>Turns the native pointer into a string representation.</summary>
52 public override String ToString()
54 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
56 private static object ContentChangedEvtKey = new object();
57 /// <summary>Sent after the content is set or unset using the current content object.
58 /// (Since EFL 1.22)</summary>
59 public event EventHandler<Efl.IContentContentChangedEvt_Args> ContentChangedEvt
63 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
64 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ContentChangedEvt_delegate)) {
65 eventHandlers.AddHandler(ContentChangedEvtKey , value);
67 Eina.Log.Error($"Error adding proxy for event {key}");
72 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
73 if (RemoveNativeEventHandler(key, this.evt_ContentChangedEvt_delegate)) {
74 eventHandlers.RemoveHandler(ContentChangedEvtKey , value);
76 Eina.Log.Error($"Error removing proxy for event {key}");
80 ///<summary>Method to raise event ContentChangedEvt.</summary>
81 public void On_ContentChangedEvt(Efl.IContentContentChangedEvt_Args e)
83 EventHandler<Efl.IContentContentChangedEvt_Args> evt;
85 evt = (EventHandler<Efl.IContentContentChangedEvt_Args>)eventHandlers[ContentChangedEvtKey];
89 Efl.EventCb evt_ContentChangedEvt_delegate;
90 private void on_ContentChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
92 Efl.IContentContentChangedEvt_Args args = new Efl.IContentContentChangedEvt_Args();
93 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
95 On_ContentChangedEvt(args);
96 } catch (Exception e) {
97 Eina.Log.Error(e.ToString());
98 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
102 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
103 protected override void RegisterEventProxies()
105 base.RegisterEventProxies();
106 evt_ContentChangedEvt_delegate = new Efl.EventCb(on_ContentChangedEvt_NativeCallback);
108 /// <summary>Swallowed sub-object contained in this object.
109 /// (Since EFL 1.22)</summary>
110 /// <returns>The object to swallow.</returns>
111 virtual public Efl.Gfx.IEntity GetContent() {
112 var _ret_var = Efl.IContentNativeInherit.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
113 Eina.Error.RaiseIfUnhandledException();
116 /// <summary>Swallowed sub-object contained in this object.
117 /// (Since EFL 1.22)</summary>
118 /// <param name="content">The object to swallow.</param>
119 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
120 virtual public bool SetContent( Efl.Gfx.IEntity content) {
121 var _ret_var = Efl.IContentNativeInherit.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), content);
122 Eina.Error.RaiseIfUnhandledException();
125 /// <summary>Unswallow the object in the current container and return it.
126 /// (Since EFL 1.22)</summary>
127 /// <returns>Unswallowed object</returns>
128 virtual public Efl.Gfx.IEntity UnsetContent() {
129 var _ret_var = Efl.IContentNativeInherit.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
130 Eina.Error.RaiseIfUnhandledException();
133 /// <summary>Retrieves the text string currently being displayed by the given text object.
134 /// Do not free() the return value.
136 /// See also <see cref="Efl.IText.GetText"/>.
137 /// (Since EFL 1.22)</summary>
138 /// <returns>Text string to display on it.</returns>
139 virtual public System.String GetText() {
140 var _ret_var = Efl.ITextNativeInherit.efl_text_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
141 Eina.Error.RaiseIfUnhandledException();
144 /// <summary>Sets the text string to be displayed by the given text object.
145 /// See also <see cref="Efl.IText.GetText"/>.
146 /// (Since EFL 1.22)</summary>
147 /// <param name="text">Text string to display on it.</param>
148 /// <returns></returns>
149 virtual public void SetText( System.String text) {
150 Efl.ITextNativeInherit.efl_text_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), text);
151 Eina.Error.RaiseIfUnhandledException();
153 /// <summary>Swallowed sub-object contained in this object.
154 /// (Since EFL 1.22)</summary>
155 /// <value>The object to swallow.</value>
156 public Efl.Gfx.IEntity Content {
157 get { return GetContent(); }
158 set { SetContent( value); }
160 private static IntPtr GetEflClassStatic()
162 return Efl.Ui.TextAlertPopupPart.efl_ui_text_alert_popup_part_class_get();
165 public class TextAlertPopupPartNativeInherit : Efl.Ui.LayoutPartNativeInherit{
166 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
167 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
169 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
170 var methods = Efl.Eo.Globals.GetUserMethods(type);
171 if (efl_content_get_static_delegate == null)
172 efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
173 if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
174 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_content_get_static_delegate)});
175 if (efl_content_set_static_delegate == null)
176 efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
177 if (methods.FirstOrDefault(m => m.Name == "SetContent") != null)
178 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_content_set_static_delegate)});
179 if (efl_content_unset_static_delegate == null)
180 efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
181 if (methods.FirstOrDefault(m => m.Name == "UnsetContent") != null)
182 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_content_unset_static_delegate)});
183 if (efl_text_get_static_delegate == null)
184 efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
185 if (methods.FirstOrDefault(m => m.Name == "GetText") != null)
186 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)});
187 if (efl_text_set_static_delegate == null)
188 efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
189 if (methods.FirstOrDefault(m => m.Name == "SetText") != null)
190 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)});
191 descs.AddRange(base.GetEoOps(type));
194 public override IntPtr GetEflClass()
196 return Efl.Ui.TextAlertPopupPart.efl_ui_text_alert_popup_part_class_get();
198 public static new IntPtr GetEflClassStatic()
200 return Efl.Ui.TextAlertPopupPart.efl_ui_text_alert_popup_part_class_get();
204 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IEntity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
207 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IEntity efl_content_get_api_delegate(System.IntPtr obj);
208 public static Efl.Eo.FunctionWrapper<efl_content_get_api_delegate> efl_content_get_ptr = new Efl.Eo.FunctionWrapper<efl_content_get_api_delegate>(_Module, "efl_content_get");
209 private static Efl.Gfx.IEntity content_get(System.IntPtr obj, System.IntPtr pd)
211 Eina.Log.Debug("function efl_content_get was called");
212 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
213 if(wrapper != null) {
214 Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
216 _ret_var = ((TextAlertPopupPart)wrapper).GetContent();
217 } catch (Exception e) {
218 Eina.Log.Warning($"Callback error: {e.ToString()}");
219 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
223 return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
226 private static efl_content_get_delegate efl_content_get_static_delegate;
229 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
232 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
233 public static Efl.Eo.FunctionWrapper<efl_content_set_api_delegate> efl_content_set_ptr = new Efl.Eo.FunctionWrapper<efl_content_set_api_delegate>(_Module, "efl_content_set");
234 private static bool content_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity content)
236 Eina.Log.Debug("function efl_content_set was called");
237 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
238 if(wrapper != null) {
239 bool _ret_var = default(bool);
241 _ret_var = ((TextAlertPopupPart)wrapper).SetContent( content);
242 } catch (Exception e) {
243 Eina.Log.Warning($"Callback error: {e.ToString()}");
244 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
248 return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), content);
251 private static efl_content_set_delegate efl_content_set_static_delegate;
254 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IEntity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
257 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IEntity efl_content_unset_api_delegate(System.IntPtr obj);
258 public static Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate> efl_content_unset_ptr = new Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate>(_Module, "efl_content_unset");
259 private static Efl.Gfx.IEntity content_unset(System.IntPtr obj, System.IntPtr pd)
261 Eina.Log.Debug("function efl_content_unset was called");
262 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
263 if(wrapper != null) {
264 Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
266 _ret_var = ((TextAlertPopupPart)wrapper).UnsetContent();
267 } catch (Exception e) {
268 Eina.Log.Warning($"Callback error: {e.ToString()}");
269 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
273 return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
276 private static efl_content_unset_delegate efl_content_unset_static_delegate;
279 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd);
282 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_text_get_api_delegate(System.IntPtr obj);
283 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");
284 private static System.String text_get(System.IntPtr obj, System.IntPtr pd)
286 Eina.Log.Debug("function efl_text_get was called");
287 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
288 if(wrapper != null) {
289 System.String _ret_var = default(System.String);
291 _ret_var = ((TextAlertPopupPart)wrapper).GetText();
292 } catch (Exception e) {
293 Eina.Log.Warning($"Callback error: {e.ToString()}");
294 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
298 return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
301 private static efl_text_get_delegate efl_text_get_static_delegate;
304 private delegate void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
307 public delegate void efl_text_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
308 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");
309 private static void text_set(System.IntPtr obj, System.IntPtr pd, System.String text)
311 Eina.Log.Debug("function efl_text_set was called");
312 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
313 if(wrapper != null) {
316 ((TextAlertPopupPart)wrapper).SetText( text);
317 } catch (Exception e) {
318 Eina.Log.Warning($"Callback error: {e.ToString()}");
319 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
322 efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), text);
325 private static efl_text_set_delegate efl_text_set_static_delegate;