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 Anchor Popup class</summary>
13 [Efl.Ui.AnchorPopup.NativeMethods]
14 public class AnchorPopup : Efl.Ui.Popup, Efl.Eo.IWrapper
16 ///<summary>Pointer to the native class description.</summary>
17 public override System.IntPtr NativeClass
21 if (((object)this).GetType() == typeof(AnchorPopup))
23 return GetEflClassStatic();
27 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
33 efl_ui_anchor_popup_class_get();
34 /// <summary>Initializes a new instance of the <see cref="AnchorPopup"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 /// <param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
37 public AnchorPopup(Efl.Object parent
38 , System.String style = null) : base(efl_ui_anchor_popup_class_get(), typeof(AnchorPopup), parent)
40 if (Efl.Eo.Globals.ParamHelperCheck(style))
42 SetStyle(Efl.Eo.Globals.GetParamHelper(style));
45 FinishInstantiation();
48 /// <summary>Initializes a new instance of the <see cref="AnchorPopup"/> class.
49 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
50 /// <param name="raw">The native pointer to be wrapped.</param>
51 protected AnchorPopup(System.IntPtr raw) : base(raw)
55 /// <summary>Initializes a new instance of the <see cref="AnchorPopup"/> class.
56 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
57 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
58 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
59 /// <param name="parent">The Efl.Object parent of this instance.</param>
60 protected AnchorPopup(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
64 /// <summary>Verifies if the given object is equal to this one.</summary>
65 /// <param name="instance">The object to compare to.</param>
66 /// <returns>True if both objects point to the same native object.</returns>
67 public override bool Equals(object instance)
69 var other = instance as Efl.Object;
74 return this.NativeHandle == other.NativeHandle;
77 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
78 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
79 public override int GetHashCode()
81 return this.NativeHandle.ToInt32();
84 /// <summary>Turns the native pointer into a string representation.</summary>
85 /// <returns>A string with the type and the native pointer for this object.</returns>
86 public override String ToString()
88 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
91 /// <summary>Returns the anchor object which the popup is following.</summary>
92 /// <returns>The object which popup is following.</returns>
93 virtual public Efl.Canvas.Object GetAnchor() {
94 var _ret_var = Efl.Ui.AnchorPopup.NativeMethods.efl_ui_anchor_popup_anchor_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
95 Eina.Error.RaiseIfUnhandledException();
98 /// <summary>Set anchor popup to follow an anchor object. If anchor object is moved or parent window is resized, the anchor popup moves to the new position. If anchor object is set to NULL, the anchor popup stops following the anchor object. When the popup is moved by using gfx_position_set, anchor is set NULL.</summary>
99 /// <param name="anchor">The object which popup is following.</param>
100 virtual public void SetAnchor(Efl.Canvas.Object anchor) {
101 Efl.Ui.AnchorPopup.NativeMethods.efl_ui_anchor_popup_anchor_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),anchor);
102 Eina.Error.RaiseIfUnhandledException();
104 /// <summary>Get the align priority of a popup.</summary>
105 /// <param name="first">First align priority</param>
106 /// <param name="second">Second align priority</param>
107 /// <param name="third">Third align priority</param>
108 /// <param name="fourth">Fourth align priority</param>
109 /// <param name="fifth">Fifth align priority</param>
110 virtual public void GetAlignPriority(out Efl.Ui.PopupAlign first, out Efl.Ui.PopupAlign second, out Efl.Ui.PopupAlign third, out Efl.Ui.PopupAlign fourth, out Efl.Ui.PopupAlign fifth) {
111 Efl.Ui.AnchorPopup.NativeMethods.efl_ui_anchor_popup_align_priority_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out first, out second, out third, out fourth, out fifth);
112 Eina.Error.RaiseIfUnhandledException();
114 /// <summary>Set the align priority of a popup.</summary>
115 /// <param name="first">First align priority</param>
116 /// <param name="second">Second align priority</param>
117 /// <param name="third">Third align priority</param>
118 /// <param name="fourth">Fourth align priority</param>
119 /// <param name="fifth">Fifth align priority</param>
120 virtual public void SetAlignPriority(Efl.Ui.PopupAlign first, Efl.Ui.PopupAlign second, Efl.Ui.PopupAlign third, Efl.Ui.PopupAlign fourth, Efl.Ui.PopupAlign fifth) {
121 Efl.Ui.AnchorPopup.NativeMethods.efl_ui_anchor_popup_align_priority_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),first, second, third, fourth, fifth);
122 Eina.Error.RaiseIfUnhandledException();
124 /// <summary>Returns the anchor object which the popup is following.</summary>
125 /// <value>The object which popup is following.</value>
126 public Efl.Canvas.Object Anchor {
127 get { return GetAnchor(); }
128 set { SetAnchor(value); }
130 private static IntPtr GetEflClassStatic()
132 return Efl.Ui.AnchorPopup.efl_ui_anchor_popup_class_get();
134 /// <summary>Wrapper for native methods and virtual method delegates.
135 /// For internal use by generated code only.</summary>
136 public new class NativeMethods : Efl.Ui.Popup.NativeMethods
138 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
139 /// <summary>Gets the list of Eo operations to override.</summary>
140 /// <returns>The list of Eo operations to be overload.</returns>
141 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
143 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
144 var methods = Efl.Eo.Globals.GetUserMethods(type);
146 if (efl_ui_anchor_popup_anchor_get_static_delegate == null)
148 efl_ui_anchor_popup_anchor_get_static_delegate = new efl_ui_anchor_popup_anchor_get_delegate(anchor_get);
151 if (methods.FirstOrDefault(m => m.Name == "GetAnchor") != null)
153 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_anchor_popup_anchor_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_anchor_popup_anchor_get_static_delegate) });
156 if (efl_ui_anchor_popup_anchor_set_static_delegate == null)
158 efl_ui_anchor_popup_anchor_set_static_delegate = new efl_ui_anchor_popup_anchor_set_delegate(anchor_set);
161 if (methods.FirstOrDefault(m => m.Name == "SetAnchor") != null)
163 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_anchor_popup_anchor_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_anchor_popup_anchor_set_static_delegate) });
166 if (efl_ui_anchor_popup_align_priority_get_static_delegate == null)
168 efl_ui_anchor_popup_align_priority_get_static_delegate = new efl_ui_anchor_popup_align_priority_get_delegate(align_priority_get);
171 if (methods.FirstOrDefault(m => m.Name == "GetAlignPriority") != null)
173 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_anchor_popup_align_priority_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_anchor_popup_align_priority_get_static_delegate) });
176 if (efl_ui_anchor_popup_align_priority_set_static_delegate == null)
178 efl_ui_anchor_popup_align_priority_set_static_delegate = new efl_ui_anchor_popup_align_priority_set_delegate(align_priority_set);
181 if (methods.FirstOrDefault(m => m.Name == "SetAlignPriority") != null)
183 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_anchor_popup_align_priority_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_anchor_popup_align_priority_set_static_delegate) });
186 descs.AddRange(base.GetEoOps(type));
189 /// <summary>Returns the Eo class for the native methods of this class.</summary>
190 /// <returns>The native class pointer.</returns>
191 public override IntPtr GetEflClass()
193 return Efl.Ui.AnchorPopup.efl_ui_anchor_popup_class_get();
196 #pragma warning disable CA1707, SA1300, SA1600
198 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
199 private delegate Efl.Canvas.Object efl_ui_anchor_popup_anchor_get_delegate(System.IntPtr obj, System.IntPtr pd);
201 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
202 public delegate Efl.Canvas.Object efl_ui_anchor_popup_anchor_get_api_delegate(System.IntPtr obj);
204 public static Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_anchor_get_api_delegate> efl_ui_anchor_popup_anchor_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_anchor_get_api_delegate>(Module, "efl_ui_anchor_popup_anchor_get");
206 private static Efl.Canvas.Object anchor_get(System.IntPtr obj, System.IntPtr pd)
208 Eina.Log.Debug("function efl_ui_anchor_popup_anchor_get was called");
209 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
212 Efl.Canvas.Object _ret_var = default(Efl.Canvas.Object);
215 _ret_var = ((AnchorPopup)wrapper).GetAnchor();
219 Eina.Log.Warning($"Callback error: {e.ToString()}");
220 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
228 return efl_ui_anchor_popup_anchor_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
232 private static efl_ui_anchor_popup_anchor_get_delegate efl_ui_anchor_popup_anchor_get_static_delegate;
235 private delegate void efl_ui_anchor_popup_anchor_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object anchor);
238 public delegate void efl_ui_anchor_popup_anchor_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object anchor);
240 public static Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_anchor_set_api_delegate> efl_ui_anchor_popup_anchor_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_anchor_set_api_delegate>(Module, "efl_ui_anchor_popup_anchor_set");
242 private static void anchor_set(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Object anchor)
244 Eina.Log.Debug("function efl_ui_anchor_popup_anchor_set was called");
245 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
251 ((AnchorPopup)wrapper).SetAnchor(anchor);
255 Eina.Log.Warning($"Callback error: {e.ToString()}");
256 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
263 efl_ui_anchor_popup_anchor_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), anchor);
267 private static efl_ui_anchor_popup_anchor_set_delegate efl_ui_anchor_popup_anchor_set_static_delegate;
270 private delegate void efl_ui_anchor_popup_align_priority_get_delegate(System.IntPtr obj, System.IntPtr pd, out Efl.Ui.PopupAlign first, out Efl.Ui.PopupAlign second, out Efl.Ui.PopupAlign third, out Efl.Ui.PopupAlign fourth, out Efl.Ui.PopupAlign fifth);
273 public delegate void efl_ui_anchor_popup_align_priority_get_api_delegate(System.IntPtr obj, out Efl.Ui.PopupAlign first, out Efl.Ui.PopupAlign second, out Efl.Ui.PopupAlign third, out Efl.Ui.PopupAlign fourth, out Efl.Ui.PopupAlign fifth);
275 public static Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_align_priority_get_api_delegate> efl_ui_anchor_popup_align_priority_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_align_priority_get_api_delegate>(Module, "efl_ui_anchor_popup_align_priority_get");
277 private static void align_priority_get(System.IntPtr obj, System.IntPtr pd, out Efl.Ui.PopupAlign first, out Efl.Ui.PopupAlign second, out Efl.Ui.PopupAlign third, out Efl.Ui.PopupAlign fourth, out Efl.Ui.PopupAlign fifth)
279 Eina.Log.Debug("function efl_ui_anchor_popup_align_priority_get was called");
280 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
283 first = default(Efl.Ui.PopupAlign); second = default(Efl.Ui.PopupAlign); third = default(Efl.Ui.PopupAlign); fourth = default(Efl.Ui.PopupAlign); fifth = default(Efl.Ui.PopupAlign);
286 ((AnchorPopup)wrapper).GetAlignPriority(out first, out second, out third, out fourth, out fifth);
290 Eina.Log.Warning($"Callback error: {e.ToString()}");
291 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
298 efl_ui_anchor_popup_align_priority_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out first, out second, out third, out fourth, out fifth);
302 private static efl_ui_anchor_popup_align_priority_get_delegate efl_ui_anchor_popup_align_priority_get_static_delegate;
305 private delegate void efl_ui_anchor_popup_align_priority_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Ui.PopupAlign first, Efl.Ui.PopupAlign second, Efl.Ui.PopupAlign third, Efl.Ui.PopupAlign fourth, Efl.Ui.PopupAlign fifth);
308 public delegate void efl_ui_anchor_popup_align_priority_set_api_delegate(System.IntPtr obj, Efl.Ui.PopupAlign first, Efl.Ui.PopupAlign second, Efl.Ui.PopupAlign third, Efl.Ui.PopupAlign fourth, Efl.Ui.PopupAlign fifth);
310 public static Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_align_priority_set_api_delegate> efl_ui_anchor_popup_align_priority_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_anchor_popup_align_priority_set_api_delegate>(Module, "efl_ui_anchor_popup_align_priority_set");
312 private static void align_priority_set(System.IntPtr obj, System.IntPtr pd, Efl.Ui.PopupAlign first, Efl.Ui.PopupAlign second, Efl.Ui.PopupAlign third, Efl.Ui.PopupAlign fourth, Efl.Ui.PopupAlign fifth)
314 Eina.Log.Debug("function efl_ui_anchor_popup_align_priority_set was called");
315 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
321 ((AnchorPopup)wrapper).SetAlignPriority(first, second, third, fourth, fifth);
325 Eina.Log.Warning($"Callback error: {e.ToString()}");
326 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
333 efl_ui_anchor_popup_align_priority_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), first, second, third, fourth, fifth);
337 private static efl_ui_anchor_popup_align_priority_set_delegate efl_ui_anchor_popup_align_priority_set_static_delegate;
339 #pragma warning restore CA1707, SA1300, SA1600