2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
11 /// <summary>Efl boolean model class</summary>
12 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
13 [Efl.BooleanModel.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public class BooleanModel : Efl.CompositeModel
17 /// <summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass
22 if (((object)this).GetType() == typeof(BooleanModel))
24 return GetEflClassStatic();
28 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
34 efl_boolean_model_class_get();
35 /// <summary>Initializes a new instance of the <see cref="BooleanModel"/> class.</summary>
36 /// <param name="parent">Parent instance.</param>
37 /// <param name="model">Model that is/will be See <see cref="Efl.Ui.IView.SetModel" /></param>
38 /// <param name="index">Position of this object in the parent model. See <see cref="Efl.CompositeModel.SetIndex" /></param>
39 public BooleanModel(Efl.Object parent
40 , Efl.IModel model, uint? index = null) : base(efl_boolean_model_class_get(), parent)
42 if (Efl.Eo.Globals.ParamHelperCheck(model))
44 SetModel(Efl.Eo.Globals.GetParamHelper(model));
47 if (Efl.Eo.Globals.ParamHelperCheck(index))
49 SetIndex(Efl.Eo.Globals.GetParamHelper(index));
52 FinishInstantiation();
55 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
56 /// Do not call this constructor directly.</summary>
57 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
58 protected BooleanModel(ConstructingHandle ch) : base(ch)
62 /// <summary>Initializes a new instance of the <see cref="BooleanModel"/> class.
63 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
64 /// <param name="wh">The native pointer to be wrapped.</param>
65 protected BooleanModel(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
69 /// <summary>Initializes a new instance of the <see cref="BooleanModel"/> class.
70 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
71 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
72 /// <param name="parent">The Efl.Object parent of this instance.</param>
73 protected BooleanModel(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
77 /// <summary>Add a new named boolean property with a defined default value.</summary>
78 virtual public void AddBoolean(System.String name, bool default_value) {
79 Efl.BooleanModel.NativeMethods.efl_boolean_model_boolean_add_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),name, default_value);
80 Eina.Error.RaiseIfUnhandledException();
82 /// <summary>Delete an existing named boolean property</summary>
83 virtual public void DelBoolean(System.String name) {
84 Efl.BooleanModel.NativeMethods.efl_boolean_model_boolean_del_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),name);
85 Eina.Error.RaiseIfUnhandledException();
87 /// <summary>Get an iterator that will quickly find all the index with the requested value for a specific boolean.</summary>
88 /// <returns>The iterator that is valid until any change is made on the model.</returns>
89 virtual public Eina.Iterator<ulong> GetBooleanIterator(System.String name, bool request) {
90 var _ret_var = Efl.BooleanModel.NativeMethods.efl_boolean_model_boolean_iterator_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),name, request);
91 Eina.Error.RaiseIfUnhandledException();
92 return new Eina.Iterator<ulong>(_ret_var, false);
94 private static IntPtr GetEflClassStatic()
96 return Efl.BooleanModel.efl_boolean_model_class_get();
98 /// <summary>Wrapper for native methods and virtual method delegates.
99 /// For internal use by generated code only.</summary>
100 public new class NativeMethods : Efl.CompositeModel.NativeMethods
102 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
103 /// <summary>Gets the list of Eo operations to override.</summary>
104 /// <returns>The list of Eo operations to be overload.</returns>
105 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
107 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
108 var methods = Efl.Eo.Globals.GetUserMethods(type);
110 if (efl_boolean_model_boolean_add_static_delegate == null)
112 efl_boolean_model_boolean_add_static_delegate = new efl_boolean_model_boolean_add_delegate(boolean_add);
115 if (methods.FirstOrDefault(m => m.Name == "AddBoolean") != null)
117 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_boolean_model_boolean_add"), func = Marshal.GetFunctionPointerForDelegate(efl_boolean_model_boolean_add_static_delegate) });
120 if (efl_boolean_model_boolean_del_static_delegate == null)
122 efl_boolean_model_boolean_del_static_delegate = new efl_boolean_model_boolean_del_delegate(boolean_del);
125 if (methods.FirstOrDefault(m => m.Name == "DelBoolean") != null)
127 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_boolean_model_boolean_del"), func = Marshal.GetFunctionPointerForDelegate(efl_boolean_model_boolean_del_static_delegate) });
130 if (efl_boolean_model_boolean_iterator_get_static_delegate == null)
132 efl_boolean_model_boolean_iterator_get_static_delegate = new efl_boolean_model_boolean_iterator_get_delegate(boolean_iterator_get);
135 if (methods.FirstOrDefault(m => m.Name == "GetBooleanIterator") != null)
137 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_boolean_model_boolean_iterator_get"), func = Marshal.GetFunctionPointerForDelegate(efl_boolean_model_boolean_iterator_get_static_delegate) });
140 descs.AddRange(base.GetEoOps(type));
143 /// <summary>Returns the Eo class for the native methods of this class.</summary>
144 /// <returns>The native class pointer.</returns>
145 public override IntPtr GetEflClass()
147 return Efl.BooleanModel.efl_boolean_model_class_get();
150 #pragma warning disable CA1707, CS1591, SA1300, SA1600
153 private delegate void efl_boolean_model_boolean_add_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name, [MarshalAs(UnmanagedType.U1)] bool default_value);
156 public delegate void efl_boolean_model_boolean_add_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name, [MarshalAs(UnmanagedType.U1)] bool default_value);
158 public static Efl.Eo.FunctionWrapper<efl_boolean_model_boolean_add_api_delegate> efl_boolean_model_boolean_add_ptr = new Efl.Eo.FunctionWrapper<efl_boolean_model_boolean_add_api_delegate>(Module, "efl_boolean_model_boolean_add");
160 private static void boolean_add(System.IntPtr obj, System.IntPtr pd, System.String name, bool default_value)
162 Eina.Log.Debug("function efl_boolean_model_boolean_add was called");
163 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
169 ((BooleanModel)ws.Target).AddBoolean(name, default_value);
173 Eina.Log.Warning($"Callback error: {e.ToString()}");
174 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
181 efl_boolean_model_boolean_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name, default_value);
185 private static efl_boolean_model_boolean_add_delegate efl_boolean_model_boolean_add_static_delegate;
188 private delegate void efl_boolean_model_boolean_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name);
191 public delegate void efl_boolean_model_boolean_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name);
193 public static Efl.Eo.FunctionWrapper<efl_boolean_model_boolean_del_api_delegate> efl_boolean_model_boolean_del_ptr = new Efl.Eo.FunctionWrapper<efl_boolean_model_boolean_del_api_delegate>(Module, "efl_boolean_model_boolean_del");
195 private static void boolean_del(System.IntPtr obj, System.IntPtr pd, System.String name)
197 Eina.Log.Debug("function efl_boolean_model_boolean_del was called");
198 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
204 ((BooleanModel)ws.Target).DelBoolean(name);
208 Eina.Log.Warning($"Callback error: {e.ToString()}");
209 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
216 efl_boolean_model_boolean_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name);
220 private static efl_boolean_model_boolean_del_delegate efl_boolean_model_boolean_del_static_delegate;
223 private delegate System.IntPtr efl_boolean_model_boolean_iterator_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name, [MarshalAs(UnmanagedType.U1)] bool request);
226 public delegate System.IntPtr efl_boolean_model_boolean_iterator_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name, [MarshalAs(UnmanagedType.U1)] bool request);
228 public static Efl.Eo.FunctionWrapper<efl_boolean_model_boolean_iterator_get_api_delegate> efl_boolean_model_boolean_iterator_get_ptr = new Efl.Eo.FunctionWrapper<efl_boolean_model_boolean_iterator_get_api_delegate>(Module, "efl_boolean_model_boolean_iterator_get");
230 private static System.IntPtr boolean_iterator_get(System.IntPtr obj, System.IntPtr pd, System.String name, bool request)
232 Eina.Log.Debug("function efl_boolean_model_boolean_iterator_get was called");
233 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
236 Eina.Iterator<ulong> _ret_var = default(Eina.Iterator<ulong>);
239 _ret_var = ((BooleanModel)ws.Target).GetBooleanIterator(name, request);
243 Eina.Log.Warning($"Callback error: {e.ToString()}");
244 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
247 return _ret_var.Handle;
252 return efl_boolean_model_boolean_iterator_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name, request);
256 private static efl_boolean_model_boolean_iterator_get_delegate efl_boolean_model_boolean_iterator_get_static_delegate;
258 #pragma warning restore CA1707, CS1591, SA1300, SA1600
265 #pragma warning disable CS1591
266 public static class EflBooleanModel_ExtensionMethods {
268 #pragma warning restore CS1591