[EflSharp] Update Circle and efl cs files (#896)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_access_widget_action.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 namespace Access {
11
12 namespace Widget {
13
14 /// <summary>Access widget action mixin</summary>
15 [Efl.Access.Widget.IActionConcrete.NativeMethods]
16 public interface IAction : 
17     Efl.Access.IAction ,
18     Efl.Eo.IWrapper, IDisposable
19 {
20     /// <summary>Elementary actions</summary>
21 /// <returns>NULL-terminated array of Efl.Access.Action_Data.</returns>
22 Efl.Access.ActionData GetElmActions();
23         event EventHandler ReadingStateChangedEvt;
24     /// <summary>Elementary actions</summary>
25     /// <value>NULL-terminated array of Efl.Access.Action_Data.</value>
26     Efl.Access.ActionData ElmActions {
27         get ;
28     }
29 }
30 /// <summary>Access widget action mixin</summary>
31 sealed public class IActionConcrete :
32     Efl.Eo.EoWrapper
33     , IAction
34     , Efl.Access.IAction
35 {
36     ///<summary>Pointer to the native class description.</summary>
37     public override System.IntPtr NativeClass
38     {
39         get
40         {
41             if (((object)this).GetType() == typeof(IActionConcrete))
42             {
43                 return GetEflClassStatic();
44             }
45             else
46             {
47                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
48             }
49         }
50     }
51
52     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
53         efl_access_widget_action_mixin_get();
54     /// <summary>Initializes a new instance of the <see cref="IAction"/> class.
55     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
56     private IActionConcrete(System.IntPtr raw) : base(raw)
57     {
58     }
59
60     public event EventHandler ReadingStateChangedEvt
61     {
62         add
63         {
64             lock (eventLock)
65             {
66                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
67                 {
68                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
69                     if (obj != null)
70                     {
71                         EventArgs args = EventArgs.Empty;
72                         try
73                         {
74                             value?.Invoke(obj, args);
75                         }
76                         catch (Exception e)
77                         {
78                             Eina.Log.Error(e.ToString());
79                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
80                         }
81                     }
82                 };
83
84                 string key = "_EFL_ACCESS_WIDGET_ACTION_EVENT_READING_STATE_CHANGED";
85                 AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value);
86             }
87         }
88
89         remove
90         {
91             lock (eventLock)
92             {
93                 string key = "_EFL_ACCESS_WIDGET_ACTION_EVENT_READING_STATE_CHANGED";
94                 RemoveNativeEventHandler(efl.Libs.Elementary, key, value);
95             }
96         }
97     }
98     ///<summary>Method to raise event ReadingStateChangedEvt.</summary>
99     public void OnReadingStateChangedEvt(EventArgs e)
100     {
101         var key = "_EFL_ACCESS_WIDGET_ACTION_EVENT_READING_STATE_CHANGED";
102         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key);
103         if (desc == IntPtr.Zero)
104         {
105             Eina.Log.Error($"Failed to get native event {key}");
106             return;
107         }
108
109         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
110     }
111     /// <summary>Elementary actions</summary>
112     /// <returns>NULL-terminated array of Efl.Access.Action_Data.</returns>
113     public Efl.Access.ActionData GetElmActions() {
114          var _ret_var = Efl.Access.Widget.IActionConcrete.NativeMethods.efl_access_widget_action_elm_actions_get_ptr.Value.Delegate(this.NativeHandle);
115         Eina.Error.RaiseIfUnhandledException();
116         return _ret_var;
117  }
118     /// <summary>Gets action name for given id</summary>
119     /// <param name="id">ID to get action name for</param>
120     /// <returns>Action name</returns>
121     public System.String GetActionName(int id) {
122                                  var _ret_var = Efl.Access.IActionConcrete.NativeMethods.efl_access_action_name_get_ptr.Value.Delegate(this.NativeHandle,id);
123         Eina.Error.RaiseIfUnhandledException();
124                         return _ret_var;
125  }
126     /// <summary>Gets localized action name for given id</summary>
127     /// <param name="id">ID to get localized name for</param>
128     /// <returns>Localized name</returns>
129     public System.String GetActionLocalizedName(int id) {
130                                  var _ret_var = Efl.Access.IActionConcrete.NativeMethods.efl_access_action_localized_name_get_ptr.Value.Delegate(this.NativeHandle,id);
131         Eina.Error.RaiseIfUnhandledException();
132                         return _ret_var;
133  }
134     /// <summary>Get list of available widget actions</summary>
135     /// <returns>Contains statically allocated strings.</returns>
136     public Eina.List<Efl.Access.ActionData> GetActions() {
137          var _ret_var = Efl.Access.IActionConcrete.NativeMethods.efl_access_action_actions_get_ptr.Value.Delegate(this.NativeHandle);
138         Eina.Error.RaiseIfUnhandledException();
139         return new Eina.List<Efl.Access.ActionData>(_ret_var, false, false);
140  }
141     /// <summary>Performs action on given widget.</summary>
142     /// <param name="id">ID for widget</param>
143     /// <returns><c>true</c> if action was performed, <c>false</c> otherwise</returns>
144     public bool ActionDo(int id) {
145                                  var _ret_var = Efl.Access.IActionConcrete.NativeMethods.efl_access_action_do_ptr.Value.Delegate(this.NativeHandle,id);
146         Eina.Error.RaiseIfUnhandledException();
147                         return _ret_var;
148  }
149     /// <summary>Gets configured keybinding for specific action and widget.</summary>
150     /// <param name="id">ID for widget</param>
151     /// <returns>Should be freed by the user.</returns>
152     public System.String GetActionKeybinding(int id) {
153                                  var _ret_var = Efl.Access.IActionConcrete.NativeMethods.efl_access_action_keybinding_get_ptr.Value.Delegate(this.NativeHandle,id);
154         Eina.Error.RaiseIfUnhandledException();
155                         return _ret_var;
156  }
157     /// <summary>Elementary actions</summary>
158     /// <value>NULL-terminated array of Efl.Access.Action_Data.</value>
159     public Efl.Access.ActionData ElmActions {
160         get { return GetElmActions(); }
161     }
162     /// <summary>Get list of available widget actions</summary>
163     /// <value>Contains statically allocated strings.</value>
164     public Eina.List<Efl.Access.ActionData> Actions {
165         get { return GetActions(); }
166     }
167     private static IntPtr GetEflClassStatic()
168     {
169         return Efl.Access.Widget.IActionConcrete.efl_access_widget_action_mixin_get();
170     }
171     /// <summary>Wrapper for native methods and virtual method delegates.
172     /// For internal use by generated code only.</summary>
173     public class NativeMethods  : Efl.Eo.NativeClass
174     {
175         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
176         /// <summary>Gets the list of Eo operations to override.</summary>
177         /// <returns>The list of Eo operations to be overload.</returns>
178         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
179         {
180             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
181             var methods = Efl.Eo.Globals.GetUserMethods(type);
182
183             if (efl_access_widget_action_elm_actions_get_static_delegate == null)
184             {
185                 efl_access_widget_action_elm_actions_get_static_delegate = new efl_access_widget_action_elm_actions_get_delegate(elm_actions_get);
186             }
187
188             if (methods.FirstOrDefault(m => m.Name == "GetElmActions") != null)
189             {
190                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_widget_action_elm_actions_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_widget_action_elm_actions_get_static_delegate) });
191             }
192
193             if (efl_access_action_name_get_static_delegate == null)
194             {
195                 efl_access_action_name_get_static_delegate = new efl_access_action_name_get_delegate(action_name_get);
196             }
197
198             if (methods.FirstOrDefault(m => m.Name == "GetActionName") != null)
199             {
200                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_action_name_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_action_name_get_static_delegate) });
201             }
202
203             if (efl_access_action_localized_name_get_static_delegate == null)
204             {
205                 efl_access_action_localized_name_get_static_delegate = new efl_access_action_localized_name_get_delegate(action_localized_name_get);
206             }
207
208             if (methods.FirstOrDefault(m => m.Name == "GetActionLocalizedName") != null)
209             {
210                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_action_localized_name_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_action_localized_name_get_static_delegate) });
211             }
212
213             if (efl_access_action_actions_get_static_delegate == null)
214             {
215                 efl_access_action_actions_get_static_delegate = new efl_access_action_actions_get_delegate(actions_get);
216             }
217
218             if (methods.FirstOrDefault(m => m.Name == "GetActions") != null)
219             {
220                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_action_actions_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_action_actions_get_static_delegate) });
221             }
222
223             if (efl_access_action_do_static_delegate == null)
224             {
225                 efl_access_action_do_static_delegate = new efl_access_action_do_delegate(action_do);
226             }
227
228             if (methods.FirstOrDefault(m => m.Name == "ActionDo") != null)
229             {
230                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_action_do"), func = Marshal.GetFunctionPointerForDelegate(efl_access_action_do_static_delegate) });
231             }
232
233             if (efl_access_action_keybinding_get_static_delegate == null)
234             {
235                 efl_access_action_keybinding_get_static_delegate = new efl_access_action_keybinding_get_delegate(action_keybinding_get);
236             }
237
238             if (methods.FirstOrDefault(m => m.Name == "GetActionKeybinding") != null)
239             {
240                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_action_keybinding_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_action_keybinding_get_static_delegate) });
241             }
242
243             return descs;
244         }
245         /// <summary>Returns the Eo class for the native methods of this class.</summary>
246         /// <returns>The native class pointer.</returns>
247         public override IntPtr GetEflClass()
248         {
249             return Efl.Access.Widget.IActionConcrete.efl_access_widget_action_mixin_get();
250         }
251
252         #pragma warning disable CA1707, CS1591, SA1300, SA1600
253
254         
255         private delegate Efl.Access.ActionData efl_access_widget_action_elm_actions_get_delegate(System.IntPtr obj, System.IntPtr pd);
256
257         
258         public delegate Efl.Access.ActionData efl_access_widget_action_elm_actions_get_api_delegate(System.IntPtr obj);
259
260         public static Efl.Eo.FunctionWrapper<efl_access_widget_action_elm_actions_get_api_delegate> efl_access_widget_action_elm_actions_get_ptr = new Efl.Eo.FunctionWrapper<efl_access_widget_action_elm_actions_get_api_delegate>(Module, "efl_access_widget_action_elm_actions_get");
261
262         private static Efl.Access.ActionData elm_actions_get(System.IntPtr obj, System.IntPtr pd)
263         {
264             Eina.Log.Debug("function efl_access_widget_action_elm_actions_get was called");
265             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
266             if (ws != null)
267             {
268             Efl.Access.ActionData _ret_var = default(Efl.Access.ActionData);
269                 try
270                 {
271                     _ret_var = ((IActionConcrete)ws.Target).GetElmActions();
272                 }
273                 catch (Exception e)
274                 {
275                     Eina.Log.Warning($"Callback error: {e.ToString()}");
276                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
277                 }
278
279         return _ret_var;
280
281             }
282             else
283             {
284                 return efl_access_widget_action_elm_actions_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
285             }
286         }
287
288         private static efl_access_widget_action_elm_actions_get_delegate efl_access_widget_action_elm_actions_get_static_delegate;
289
290         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
291         private delegate System.String efl_access_action_name_get_delegate(System.IntPtr obj, System.IntPtr pd,  int id);
292
293         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
294         public delegate System.String efl_access_action_name_get_api_delegate(System.IntPtr obj,  int id);
295
296         public static Efl.Eo.FunctionWrapper<efl_access_action_name_get_api_delegate> efl_access_action_name_get_ptr = new Efl.Eo.FunctionWrapper<efl_access_action_name_get_api_delegate>(Module, "efl_access_action_name_get");
297
298         private static System.String action_name_get(System.IntPtr obj, System.IntPtr pd, int id)
299         {
300             Eina.Log.Debug("function efl_access_action_name_get was called");
301             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
302             if (ws != null)
303             {
304                                     System.String _ret_var = default(System.String);
305                 try
306                 {
307                     _ret_var = ((IActionConcrete)ws.Target).GetActionName(id);
308                 }
309                 catch (Exception e)
310                 {
311                     Eina.Log.Warning($"Callback error: {e.ToString()}");
312                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
313                 }
314
315                         return _ret_var;
316
317             }
318             else
319             {
320                 return efl_access_action_name_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), id);
321             }
322         }
323
324         private static efl_access_action_name_get_delegate efl_access_action_name_get_static_delegate;
325
326         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
327         private delegate System.String efl_access_action_localized_name_get_delegate(System.IntPtr obj, System.IntPtr pd,  int id);
328
329         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
330         public delegate System.String efl_access_action_localized_name_get_api_delegate(System.IntPtr obj,  int id);
331
332         public static Efl.Eo.FunctionWrapper<efl_access_action_localized_name_get_api_delegate> efl_access_action_localized_name_get_ptr = new Efl.Eo.FunctionWrapper<efl_access_action_localized_name_get_api_delegate>(Module, "efl_access_action_localized_name_get");
333
334         private static System.String action_localized_name_get(System.IntPtr obj, System.IntPtr pd, int id)
335         {
336             Eina.Log.Debug("function efl_access_action_localized_name_get was called");
337             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
338             if (ws != null)
339             {
340                                     System.String _ret_var = default(System.String);
341                 try
342                 {
343                     _ret_var = ((IActionConcrete)ws.Target).GetActionLocalizedName(id);
344                 }
345                 catch (Exception e)
346                 {
347                     Eina.Log.Warning($"Callback error: {e.ToString()}");
348                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
349                 }
350
351                         return _ret_var;
352
353             }
354             else
355             {
356                 return efl_access_action_localized_name_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), id);
357             }
358         }
359
360         private static efl_access_action_localized_name_get_delegate efl_access_action_localized_name_get_static_delegate;
361
362         
363         private delegate System.IntPtr efl_access_action_actions_get_delegate(System.IntPtr obj, System.IntPtr pd);
364
365         
366         public delegate System.IntPtr efl_access_action_actions_get_api_delegate(System.IntPtr obj);
367
368         public static Efl.Eo.FunctionWrapper<efl_access_action_actions_get_api_delegate> efl_access_action_actions_get_ptr = new Efl.Eo.FunctionWrapper<efl_access_action_actions_get_api_delegate>(Module, "efl_access_action_actions_get");
369
370         private static System.IntPtr actions_get(System.IntPtr obj, System.IntPtr pd)
371         {
372             Eina.Log.Debug("function efl_access_action_actions_get was called");
373             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
374             if (ws != null)
375             {
376             Eina.List<Efl.Access.ActionData> _ret_var = default(Eina.List<Efl.Access.ActionData>);
377                 try
378                 {
379                     _ret_var = ((IActionConcrete)ws.Target).GetActions();
380                 }
381                 catch (Exception e)
382                 {
383                     Eina.Log.Warning($"Callback error: {e.ToString()}");
384                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
385                 }
386
387         return _ret_var.Handle;
388
389             }
390             else
391             {
392                 return efl_access_action_actions_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
393             }
394         }
395
396         private static efl_access_action_actions_get_delegate efl_access_action_actions_get_static_delegate;
397
398         [return: MarshalAs(UnmanagedType.U1)]
399         private delegate bool efl_access_action_do_delegate(System.IntPtr obj, System.IntPtr pd,  int id);
400
401         [return: MarshalAs(UnmanagedType.U1)]
402         public delegate bool efl_access_action_do_api_delegate(System.IntPtr obj,  int id);
403
404         public static Efl.Eo.FunctionWrapper<efl_access_action_do_api_delegate> efl_access_action_do_ptr = new Efl.Eo.FunctionWrapper<efl_access_action_do_api_delegate>(Module, "efl_access_action_do");
405
406         private static bool action_do(System.IntPtr obj, System.IntPtr pd, int id)
407         {
408             Eina.Log.Debug("function efl_access_action_do was called");
409             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
410             if (ws != null)
411             {
412                                     bool _ret_var = default(bool);
413                 try
414                 {
415                     _ret_var = ((IActionConcrete)ws.Target).ActionDo(id);
416                 }
417                 catch (Exception e)
418                 {
419                     Eina.Log.Warning($"Callback error: {e.ToString()}");
420                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
421                 }
422
423                         return _ret_var;
424
425             }
426             else
427             {
428                 return efl_access_action_do_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), id);
429             }
430         }
431
432         private static efl_access_action_do_delegate efl_access_action_do_static_delegate;
433
434         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]
435         private delegate System.String efl_access_action_keybinding_get_delegate(System.IntPtr obj, System.IntPtr pd,  int id);
436
437         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]
438         public delegate System.String efl_access_action_keybinding_get_api_delegate(System.IntPtr obj,  int id);
439
440         public static Efl.Eo.FunctionWrapper<efl_access_action_keybinding_get_api_delegate> efl_access_action_keybinding_get_ptr = new Efl.Eo.FunctionWrapper<efl_access_action_keybinding_get_api_delegate>(Module, "efl_access_action_keybinding_get");
441
442         private static System.String action_keybinding_get(System.IntPtr obj, System.IntPtr pd, int id)
443         {
444             Eina.Log.Debug("function efl_access_action_keybinding_get was called");
445             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
446             if (ws != null)
447             {
448                                     System.String _ret_var = default(System.String);
449                 try
450                 {
451                     _ret_var = ((IActionConcrete)ws.Target).GetActionKeybinding(id);
452                 }
453                 catch (Exception e)
454                 {
455                     Eina.Log.Warning($"Callback error: {e.ToString()}");
456                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
457                 }
458
459                         return _ret_var;
460
461             }
462             else
463             {
464                 return efl_access_action_keybinding_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), id);
465             }
466         }
467
468         private static efl_access_action_keybinding_get_delegate efl_access_action_keybinding_get_static_delegate;
469
470         #pragma warning restore CA1707, CS1591, SA1300, SA1600
471
472 }
473 }
474 }
475
476 }
477
478 }
479