[EflSharp] Update Circle and efl cs files (#896)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_boolean_model.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 /// <summary>Efl boolean model class</summary>
11 [Efl.BooleanModel.NativeMethods]
12 public class BooleanModel : Efl.CompositeModel
13 {
14     ///<summary>Pointer to the native class description.</summary>
15     public override System.IntPtr NativeClass
16     {
17         get
18         {
19             if (((object)this).GetType() == typeof(BooleanModel))
20             {
21                 return GetEflClassStatic();
22             }
23             else
24             {
25                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
26             }
27         }
28     }
29
30     [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
31         efl_boolean_model_class_get();
32     /// <summary>Initializes a new instance of the <see cref="BooleanModel"/> class.</summary>
33     /// <param name="parent">Parent instance.</param>
34     /// <param name="model">Model that is/will be See <see cref="Efl.Ui.IView.SetModel"/></param>
35     /// <param name="index">Position of this object in the parent model. See <see cref="Efl.CompositeModel.SetIndex"/></param>
36     public BooleanModel(Efl.Object parent
37             , Efl.IModel model, uint? index = null) : base(efl_boolean_model_class_get(), typeof(BooleanModel), parent)
38     {
39         if (Efl.Eo.Globals.ParamHelperCheck(model))
40         {
41             SetModel(Efl.Eo.Globals.GetParamHelper(model));
42         }
43
44         if (Efl.Eo.Globals.ParamHelperCheck(index))
45         {
46             SetIndex(Efl.Eo.Globals.GetParamHelper(index));
47         }
48
49         FinishInstantiation();
50     }
51
52     /// <summary>Initializes a new instance of the <see cref="BooleanModel"/> class.
53     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
54     /// <param name="raw">The native pointer to be wrapped.</param>
55     protected BooleanModel(System.IntPtr raw) : base(raw)
56     {
57     }
58
59     /// <summary>Initializes a new instance of the <see cref="BooleanModel"/> class.
60     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
61     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
62     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
63     /// <param name="parent">The Efl.Object parent of this instance.</param>
64     protected BooleanModel(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
65     {
66     }
67
68     /// <summary>Add a new named boolean property with a defined default value.</summary>
69     virtual public void AddBoolean(System.String name, bool default_value) {
70                                                          Efl.BooleanModel.NativeMethods.efl_boolean_model_boolean_add_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),name, default_value);
71         Eina.Error.RaiseIfUnhandledException();
72                                          }
73     /// <summary>Delete an existing named boolean property</summary>
74     virtual public void DelBoolean(System.String name) {
75                                  Efl.BooleanModel.NativeMethods.efl_boolean_model_boolean_del_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),name);
76         Eina.Error.RaiseIfUnhandledException();
77                          }
78     /// <summary>Get an iterator that will quickly find all the index with the requested value for a specific boolean.</summary>
79     /// <returns>The iterator that is valid until any change is made on the model.</returns>
80     virtual public Eina.Iterator<ulong> GetBooleanIterator(System.String name, bool request) {
81                                                          var _ret_var = Efl.BooleanModel.NativeMethods.efl_boolean_model_boolean_iterator_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),name, request);
82         Eina.Error.RaiseIfUnhandledException();
83                                         return new Eina.Iterator<ulong>(_ret_var, false, false);
84  }
85     private static IntPtr GetEflClassStatic()
86     {
87         return Efl.BooleanModel.efl_boolean_model_class_get();
88     }
89     /// <summary>Wrapper for native methods and virtual method delegates.
90     /// For internal use by generated code only.</summary>
91     public new class NativeMethods : Efl.CompositeModel.NativeMethods
92     {
93         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Ecore);
94         /// <summary>Gets the list of Eo operations to override.</summary>
95         /// <returns>The list of Eo operations to be overload.</returns>
96         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
97         {
98             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
99             var methods = Efl.Eo.Globals.GetUserMethods(type);
100
101             if (efl_boolean_model_boolean_add_static_delegate == null)
102             {
103                 efl_boolean_model_boolean_add_static_delegate = new efl_boolean_model_boolean_add_delegate(boolean_add);
104             }
105
106             if (methods.FirstOrDefault(m => m.Name == "AddBoolean") != null)
107             {
108                 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) });
109             }
110
111             if (efl_boolean_model_boolean_del_static_delegate == null)
112             {
113                 efl_boolean_model_boolean_del_static_delegate = new efl_boolean_model_boolean_del_delegate(boolean_del);
114             }
115
116             if (methods.FirstOrDefault(m => m.Name == "DelBoolean") != null)
117             {
118                 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) });
119             }
120
121             if (efl_boolean_model_boolean_iterator_get_static_delegate == null)
122             {
123                 efl_boolean_model_boolean_iterator_get_static_delegate = new efl_boolean_model_boolean_iterator_get_delegate(boolean_iterator_get);
124             }
125
126             if (methods.FirstOrDefault(m => m.Name == "GetBooleanIterator") != null)
127             {
128                 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) });
129             }
130
131             descs.AddRange(base.GetEoOps(type));
132             return descs;
133         }
134         /// <summary>Returns the Eo class for the native methods of this class.</summary>
135         /// <returns>The native class pointer.</returns>
136         public override IntPtr GetEflClass()
137         {
138             return Efl.BooleanModel.efl_boolean_model_class_get();
139         }
140
141         #pragma warning disable CA1707, CS1591, SA1300, SA1600
142
143         
144         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);
145
146         
147         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);
148
149         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");
150
151         private static void boolean_add(System.IntPtr obj, System.IntPtr pd, System.String name, bool default_value)
152         {
153             Eina.Log.Debug("function efl_boolean_model_boolean_add was called");
154             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
155             if (ws != null)
156             {
157                                                             
158                 try
159                 {
160                     ((BooleanModel)ws.Target).AddBoolean(name, default_value);
161                 }
162                 catch (Exception e)
163                 {
164                     Eina.Log.Warning($"Callback error: {e.ToString()}");
165                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
166                 }
167
168                                         
169             }
170             else
171             {
172                 efl_boolean_model_boolean_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name, default_value);
173             }
174         }
175
176         private static efl_boolean_model_boolean_add_delegate efl_boolean_model_boolean_add_static_delegate;
177
178         
179         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);
180
181         
182         public delegate void efl_boolean_model_boolean_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name);
183
184         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");
185
186         private static void boolean_del(System.IntPtr obj, System.IntPtr pd, System.String name)
187         {
188             Eina.Log.Debug("function efl_boolean_model_boolean_del was called");
189             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
190             if (ws != null)
191             {
192                                     
193                 try
194                 {
195                     ((BooleanModel)ws.Target).DelBoolean(name);
196                 }
197                 catch (Exception e)
198                 {
199                     Eina.Log.Warning($"Callback error: {e.ToString()}");
200                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
201                 }
202
203                         
204             }
205             else
206             {
207                 efl_boolean_model_boolean_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name);
208             }
209         }
210
211         private static efl_boolean_model_boolean_del_delegate efl_boolean_model_boolean_del_static_delegate;
212
213         
214         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);
215
216         
217         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);
218
219         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");
220
221         private static System.IntPtr boolean_iterator_get(System.IntPtr obj, System.IntPtr pd, System.String name, bool request)
222         {
223             Eina.Log.Debug("function efl_boolean_model_boolean_iterator_get was called");
224             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
225             if (ws != null)
226             {
227                                                             Eina.Iterator<ulong> _ret_var = default(Eina.Iterator<ulong>);
228                 try
229                 {
230                     _ret_var = ((BooleanModel)ws.Target).GetBooleanIterator(name, request);
231                 }
232                 catch (Exception e)
233                 {
234                     Eina.Log.Warning($"Callback error: {e.ToString()}");
235                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
236                 }
237
238                                         return _ret_var.Handle;
239
240             }
241             else
242             {
243                 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);
244             }
245         }
246
247         private static efl_boolean_model_boolean_iterator_get_delegate efl_boolean_model_boolean_iterator_get_static_delegate;
248
249         #pragma warning restore CA1707, CS1591, SA1300, SA1600
250
251 }
252 }
253 }
254