[EflSharp] Update Circle and efl cs files (#995)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_boolean_model.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
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
16 {
17     /// <summary>Pointer to the native class description.</summary>
18     public override System.IntPtr NativeClass
19     {
20         get
21         {
22             if (((object)this).GetType() == typeof(BooleanModel))
23             {
24                 return GetEflClassStatic();
25             }
26             else
27             {
28                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
29             }
30         }
31     }
32
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)
41     {
42         if (Efl.Eo.Globals.ParamHelperCheck(model))
43         {
44             SetModel(Efl.Eo.Globals.GetParamHelper(model));
45         }
46
47         if (Efl.Eo.Globals.ParamHelperCheck(index))
48         {
49             SetIndex(Efl.Eo.Globals.GetParamHelper(index));
50         }
51
52         FinishInstantiation();
53     }
54
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)
59     {
60     }
61
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)
66     {
67     }
68
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)
74     {
75     }
76
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();
81                                          }
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();
86                          }
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);
93  }
94     private static IntPtr GetEflClassStatic()
95     {
96         return Efl.BooleanModel.efl_boolean_model_class_get();
97     }
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
101     {
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)
106         {
107             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
108             var methods = Efl.Eo.Globals.GetUserMethods(type);
109
110             if (efl_boolean_model_boolean_add_static_delegate == null)
111             {
112                 efl_boolean_model_boolean_add_static_delegate = new efl_boolean_model_boolean_add_delegate(boolean_add);
113             }
114
115             if (methods.FirstOrDefault(m => m.Name == "AddBoolean") != null)
116             {
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) });
118             }
119
120             if (efl_boolean_model_boolean_del_static_delegate == null)
121             {
122                 efl_boolean_model_boolean_del_static_delegate = new efl_boolean_model_boolean_del_delegate(boolean_del);
123             }
124
125             if (methods.FirstOrDefault(m => m.Name == "DelBoolean") != null)
126             {
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) });
128             }
129
130             if (efl_boolean_model_boolean_iterator_get_static_delegate == null)
131             {
132                 efl_boolean_model_boolean_iterator_get_static_delegate = new efl_boolean_model_boolean_iterator_get_delegate(boolean_iterator_get);
133             }
134
135             if (methods.FirstOrDefault(m => m.Name == "GetBooleanIterator") != null)
136             {
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) });
138             }
139
140             descs.AddRange(base.GetEoOps(type));
141             return descs;
142         }
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()
146         {
147             return Efl.BooleanModel.efl_boolean_model_class_get();
148         }
149
150         #pragma warning disable CA1707, CS1591, SA1300, SA1600
151
152         
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);
154
155         
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);
157
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");
159
160         private static void boolean_add(System.IntPtr obj, System.IntPtr pd, System.String name, bool default_value)
161         {
162             Eina.Log.Debug("function efl_boolean_model_boolean_add was called");
163             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
164             if (ws != null)
165             {
166                                                             
167                 try
168                 {
169                     ((BooleanModel)ws.Target).AddBoolean(name, default_value);
170                 }
171                 catch (Exception e)
172                 {
173                     Eina.Log.Warning($"Callback error: {e.ToString()}");
174                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
175                 }
176
177                                         
178             }
179             else
180             {
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);
182             }
183         }
184
185         private static efl_boolean_model_boolean_add_delegate efl_boolean_model_boolean_add_static_delegate;
186
187         
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);
189
190         
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);
192
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");
194
195         private static void boolean_del(System.IntPtr obj, System.IntPtr pd, System.String name)
196         {
197             Eina.Log.Debug("function efl_boolean_model_boolean_del was called");
198             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
199             if (ws != null)
200             {
201                                     
202                 try
203                 {
204                     ((BooleanModel)ws.Target).DelBoolean(name);
205                 }
206                 catch (Exception e)
207                 {
208                     Eina.Log.Warning($"Callback error: {e.ToString()}");
209                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
210                 }
211
212                         
213             }
214             else
215             {
216                 efl_boolean_model_boolean_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name);
217             }
218         }
219
220         private static efl_boolean_model_boolean_del_delegate efl_boolean_model_boolean_del_static_delegate;
221
222         
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);
224
225         
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);
227
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");
229
230         private static System.IntPtr boolean_iterator_get(System.IntPtr obj, System.IntPtr pd, System.String name, bool request)
231         {
232             Eina.Log.Debug("function efl_boolean_model_boolean_iterator_get was called");
233             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
234             if (ws != null)
235             {
236                                                             Eina.Iterator<ulong> _ret_var = default(Eina.Iterator<ulong>);
237                 try
238                 {
239                     _ret_var = ((BooleanModel)ws.Target).GetBooleanIterator(name, request);
240                 }
241                 catch (Exception e)
242                 {
243                     Eina.Log.Warning($"Callback error: {e.ToString()}");
244                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
245                 }
246
247                                         return _ret_var.Handle;
248
249             }
250             else
251             {
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);
253             }
254         }
255
256         private static efl_boolean_model_boolean_iterator_get_delegate efl_boolean_model_boolean_iterator_get_static_delegate;
257
258         #pragma warning restore CA1707, CS1591, SA1300, SA1600
259
260 }
261 }
262 }
263
264 #if EFL_BETA
265 #pragma warning disable CS1591
266 public static class EflBooleanModel_ExtensionMethods {
267 }
268 #pragma warning restore CS1591
269 #endif