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