1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl UI Scroll Alert Popup internal part class</summary>
13 [Efl.Ui.ScrollAlertPopupPart.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public class ScrollAlertPopupPart : Efl.Ui.LayoutPart, Efl.IContent, Efl.IText
17 ///<summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass
22 if (((object)this).GetType() == typeof(ScrollAlertPopupPart))
24 return GetEflClassStatic();
28 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
34 efl_ui_scroll_alert_popup_part_class_get();
35 /// <summary>Initializes a new instance of the <see cref="ScrollAlertPopupPart"/> class.</summary>
36 /// <param name="parent">Parent instance.</param>
37 public ScrollAlertPopupPart(Efl.Object parent= null
38 ) : base(efl_ui_scroll_alert_popup_part_class_get(), parent)
40 FinishInstantiation();
43 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
44 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
45 protected ScrollAlertPopupPart(ConstructingHandle ch) : base(ch)
49 /// <summary>Initializes a new instance of the <see cref="ScrollAlertPopupPart"/> class.
50 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
51 /// <param name="wh">The native pointer to be wrapped.</param>
52 protected ScrollAlertPopupPart(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
56 /// <summary>Initializes a new instance of the <see cref="ScrollAlertPopupPart"/> class.
57 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
58 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
59 /// <param name="parent">The Efl.Object parent of this instance.</param>
60 protected ScrollAlertPopupPart(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
64 /// <summary>Sent after the content is set or unset using the current content object.
65 /// (Since EFL 1.22)</summary>
66 public event EventHandler<Efl.IContentContentChangedEvt_Args> ContentChangedEvt
70 lock (eflBindingEventLock)
72 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
74 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
77 Efl.IContentContentChangedEvt_Args args = new Efl.IContentContentChangedEvt_Args();
78 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
81 value?.Invoke(obj, args);
85 Eina.Log.Error(e.ToString());
86 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
91 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
92 AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value);
98 lock (eflBindingEventLock)
100 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
101 RemoveNativeEventHandler(efl.Libs.Elementary, key, value);
105 ///<summary>Method to raise event ContentChangedEvt.</summary>
106 public void OnContentChangedEvt(Efl.IContentContentChangedEvt_Args e)
108 var key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
109 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key);
110 if (desc == IntPtr.Zero)
112 Eina.Log.Error($"Failed to get native event {key}");
116 IntPtr info = e.arg.NativeHandle;
117 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
119 /// <summary>Sub-object currently set as this object's single content.
120 /// If it is set multiple times, previous sub-objects are removed first. Therefore, if an invalid <c>content</c> is set the object will become empty (it will have no sub-object).
121 /// (Since EFL 1.22)</summary>
122 /// <returns>The sub-object.</returns>
123 virtual public Efl.Gfx.IEntity GetContent() {
124 var _ret_var = Efl.IContentConcrete.NativeMethods.efl_content_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
125 Eina.Error.RaiseIfUnhandledException();
128 /// <summary>Sub-object currently set as this object's single content.
129 /// If it is set multiple times, previous sub-objects are removed first. Therefore, if an invalid <c>content</c> is set the object will become empty (it will have no sub-object).
130 /// (Since EFL 1.22)</summary>
131 /// <param name="content">The sub-object.</param>
132 /// <returns><c>true</c> if <c>content</c> was successfully swallowed.</returns>
133 virtual public bool SetContent(Efl.Gfx.IEntity content) {
134 var _ret_var = Efl.IContentConcrete.NativeMethods.efl_content_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),content);
135 Eina.Error.RaiseIfUnhandledException();
138 /// <summary>Remove the sub-object currently set as content of this object and return it. This object becomes empty.
139 /// (Since EFL 1.22)</summary>
140 /// <returns>Unswallowed object</returns>
141 virtual public Efl.Gfx.IEntity UnsetContent() {
142 var _ret_var = Efl.IContentConcrete.NativeMethods.efl_content_unset_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
143 Eina.Error.RaiseIfUnhandledException();
146 /// <summary>Retrieves the text string currently being displayed by the given text object.
147 /// Do not free() the return value.
149 /// See also <see cref="Efl.IText.GetText"/>.
150 /// (Since EFL 1.22)</summary>
151 /// <returns>Text string to display on it.</returns>
152 virtual public System.String GetText() {
153 var _ret_var = Efl.ITextConcrete.NativeMethods.efl_text_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
154 Eina.Error.RaiseIfUnhandledException();
157 /// <summary>Sets the text string to be displayed by the given text object.
158 /// See also <see cref="Efl.IText.GetText"/>.
159 /// (Since EFL 1.22)</summary>
160 /// <param name="text">Text string to display on it.</param>
161 virtual public void SetText(System.String text) {
162 Efl.ITextConcrete.NativeMethods.efl_text_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),text);
163 Eina.Error.RaiseIfUnhandledException();
165 /// <summary>Sub-object currently set as this object's single content.
166 /// If it is set multiple times, previous sub-objects are removed first. Therefore, if an invalid <c>content</c> is set the object will become empty (it will have no sub-object).
167 /// (Since EFL 1.22)</summary>
168 /// <value>The sub-object.</value>
169 public Efl.Gfx.IEntity Content {
170 get { return GetContent(); }
171 set { SetContent(value); }
173 private static IntPtr GetEflClassStatic()
175 return Efl.Ui.ScrollAlertPopupPart.efl_ui_scroll_alert_popup_part_class_get();
177 /// <summary>Wrapper for native methods and virtual method delegates.
178 /// For internal use by generated code only.</summary>
179 public new class NativeMethods : Efl.Ui.LayoutPart.NativeMethods
181 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
182 /// <summary>Gets the list of Eo operations to override.</summary>
183 /// <returns>The list of Eo operations to be overload.</returns>
184 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
186 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
187 var methods = Efl.Eo.Globals.GetUserMethods(type);
189 if (efl_content_get_static_delegate == null)
191 efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
194 if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
196 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) });
199 if (efl_content_set_static_delegate == null)
201 efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
204 if (methods.FirstOrDefault(m => m.Name == "SetContent") != null)
206 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) });
209 if (efl_content_unset_static_delegate == null)
211 efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
214 if (methods.FirstOrDefault(m => m.Name == "UnsetContent") != null)
216 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) });
219 if (efl_text_get_static_delegate == null)
221 efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
224 if (methods.FirstOrDefault(m => m.Name == "GetText") != null)
226 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) });
229 if (efl_text_set_static_delegate == null)
231 efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
234 if (methods.FirstOrDefault(m => m.Name == "SetText") != null)
236 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) });
239 descs.AddRange(base.GetEoOps(type));
242 /// <summary>Returns the Eo class for the native methods of this class.</summary>
243 /// <returns>The native class pointer.</returns>
244 public override IntPtr GetEflClass()
246 return Efl.Ui.ScrollAlertPopupPart.efl_ui_scroll_alert_popup_part_class_get();
249 #pragma warning disable CA1707, CS1591, SA1300, SA1600
251 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
252 private delegate Efl.Gfx.IEntity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
254 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
255 public delegate Efl.Gfx.IEntity efl_content_get_api_delegate(System.IntPtr obj);
257 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");
259 private static Efl.Gfx.IEntity content_get(System.IntPtr obj, System.IntPtr pd)
261 Eina.Log.Debug("function efl_content_get was called");
262 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
265 Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
268 _ret_var = ((ScrollAlertPopupPart)ws.Target).GetContent();
272 Eina.Log.Warning($"Callback error: {e.ToString()}");
273 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
281 return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
285 private static efl_content_get_delegate efl_content_get_static_delegate;
287 [return: MarshalAs(UnmanagedType.U1)]
288 private delegate bool efl_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
290 [return: MarshalAs(UnmanagedType.U1)]
291 public delegate bool efl_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
293 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");
295 private static bool content_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity content)
297 Eina.Log.Debug("function efl_content_set was called");
298 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
301 bool _ret_var = default(bool);
304 _ret_var = ((ScrollAlertPopupPart)ws.Target).SetContent(content);
308 Eina.Log.Warning($"Callback error: {e.ToString()}");
309 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317 return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), content);
321 private static efl_content_set_delegate efl_content_set_static_delegate;
323 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
324 private delegate Efl.Gfx.IEntity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
326 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
327 public delegate Efl.Gfx.IEntity efl_content_unset_api_delegate(System.IntPtr obj);
329 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");
331 private static Efl.Gfx.IEntity content_unset(System.IntPtr obj, System.IntPtr pd)
333 Eina.Log.Debug("function efl_content_unset was called");
334 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
337 Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
340 _ret_var = ((ScrollAlertPopupPart)ws.Target).UnsetContent();
344 Eina.Log.Warning($"Callback error: {e.ToString()}");
345 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
353 return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
357 private static efl_content_unset_delegate efl_content_unset_static_delegate;
359 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
360 private delegate System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd);
362 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
363 public delegate System.String efl_text_get_api_delegate(System.IntPtr obj);
365 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");
367 private static System.String text_get(System.IntPtr obj, System.IntPtr pd)
369 Eina.Log.Debug("function efl_text_get was called");
370 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
373 System.String _ret_var = default(System.String);
376 _ret_var = ((ScrollAlertPopupPart)ws.Target).GetText();
380 Eina.Log.Warning($"Callback error: {e.ToString()}");
381 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
389 return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
393 private static efl_text_get_delegate efl_text_get_static_delegate;
396 private delegate void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
399 public delegate void efl_text_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
401 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");
403 private static void text_set(System.IntPtr obj, System.IntPtr pd, System.String text)
405 Eina.Log.Debug("function efl_text_set was called");
406 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
412 ((ScrollAlertPopupPart)ws.Target).SetText(text);
416 Eina.Log.Warning($"Callback error: {e.ToString()}");
417 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
424 efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), text);
428 private static efl_text_set_delegate efl_text_set_static_delegate;
430 #pragma warning restore CA1707, CS1591, SA1300, SA1600