[Security] Fix PrivacyPrivilegeManager.RequestPermissions crash issue (#1651)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_action_connector.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 namespace Ui {
12
13 /// <summary>Helper class that connects theme signals or object events to the interfaces which are for actions.
14 /// For example, this simplifies creating widgets that implement the <see cref="Efl.Input.IClickable"/> interface.</summary>
15 /// <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>
16 [Efl.Ui.ActionConnector.NativeMethods]
17 [Efl.Eo.BindingEntity]
18 public class ActionConnector : Efl.Eo.EoWrapper
19 {
20     /// <summary>Pointer to the native class description.</summary>
21     public override System.IntPtr NativeClass
22     {
23         get
24         {
25             if (((object)this).GetType() == typeof(ActionConnector))
26             {
27                 return GetEflClassStatic();
28             }
29             else
30             {
31                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32             }
33         }
34     }
35
36     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
37         efl_ui_action_connector_class_get();
38     /// <summary>Initializes a new instance of the <see cref="ActionConnector"/> class.</summary>
39     /// <param name="parent">Parent instance.</param>
40     public ActionConnector(Efl.Object parent= null
41             ) : base(efl_ui_action_connector_class_get(), parent)
42     {
43         FinishInstantiation();
44     }
45
46     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
47     /// Do not call this constructor directly.</summary>
48     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
49     protected ActionConnector(ConstructingHandle ch) : base(ch)
50     {
51     }
52
53     /// <summary>Initializes a new instance of the <see cref="ActionConnector"/> class.
54     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
55     /// <param name="wh">The native pointer to be wrapped.</param>
56     protected ActionConnector(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
57     {
58     }
59
60     /// <summary>Initializes a new instance of the <see cref="ActionConnector"/> class.
61     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
62     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
63     /// <param name="parent">The Efl.Object parent of this instance.</param>
64     protected ActionConnector(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
65     {
66     }
67
68     /// <summary>This will listen to the standard &quot;click&quot; events on a theme and emit the appropriate events through the <see cref="Efl.Input.IClickable"/> interface.
69     /// Using these methods widgets do not need to listen to the theme signals. This class does it and calls the correct clickable functions.
70     /// 
71     /// This handles theme signals &quot;efl,action,press&quot;, &quot;efl,action,unpress&quot; and &quot;efl,action,mouse_out&quot;, and the <see cref="Efl.Input.IInterface.PointerMoveEvt"/> event.</summary>
72     /// <param name="kw_object">The object to listen on.</param>
73     /// <param name="clickable">The object to call the clickable methods on.</param>
74     public static void BindClickableToTheme(Efl.Canvas.Layout kw_object, Efl.Input.IClickable clickable) {
75                                                          Efl.Ui.ActionConnector.NativeMethods.efl_ui_action_connector_bind_clickable_to_theme_ptr.Value.Delegate(kw_object, clickable);
76         Eina.Error.RaiseIfUnhandledException();
77                                          }
78     /// <summary>This will listen to the standard &quot;click&quot; events on an object, and emit the appropriate events through the <see cref="Efl.Input.IClickable"/> interface.
79     /// Using these methods widgets do not need to listen to the object events. This class does it and calls the correct clickable functions.
80     /// 
81     /// The handled events are <see cref="Efl.Input.IInterface.PointerUpEvt"/> and <see cref="Efl.Input.IInterface.PointerDownEvt"/>.</summary>
82     /// <param name="kw_object">The object to listen on.</param>
83     /// <param name="clickable">The object to call the clickable methods on.</param>
84     public static void BindClickableToObject(Efl.Input.IInterface kw_object, Efl.Input.IClickable clickable) {
85                                                          Efl.Ui.ActionConnector.NativeMethods.efl_ui_action_connector_bind_clickable_to_object_ptr.Value.Delegate(kw_object, clickable);
86         Eina.Error.RaiseIfUnhandledException();
87                                          }
88     private static IntPtr GetEflClassStatic()
89     {
90         return Efl.Ui.ActionConnector.efl_ui_action_connector_class_get();
91     }
92     /// <summary>Wrapper for native methods and virtual method delegates.
93     /// For internal use by generated code only.</summary>
94     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
95     {
96         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
97         /// <summary>Gets the list of Eo operations to override.</summary>
98         /// <returns>The list of Eo operations to be overload.</returns>
99         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
100         {
101             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
102             descs.AddRange(base.GetEoOps(type));
103             return descs;
104         }
105         /// <summary>Returns the Eo class for the native methods of this class.</summary>
106         /// <returns>The native class pointer.</returns>
107         public override IntPtr GetEflClass()
108         {
109             return Efl.Ui.ActionConnector.efl_ui_action_connector_class_get();
110         }
111
112         #pragma warning disable CA1707, CS1591, SA1300, SA1600
113
114         
115         private delegate void efl_ui_action_connector_bind_clickable_to_theme_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Layout kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.IClickable clickable);
116
117         
118         public delegate void efl_ui_action_connector_bind_clickable_to_theme_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Layout kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.IClickable clickable);
119
120         public static Efl.Eo.FunctionWrapper<efl_ui_action_connector_bind_clickable_to_theme_api_delegate> efl_ui_action_connector_bind_clickable_to_theme_ptr = new Efl.Eo.FunctionWrapper<efl_ui_action_connector_bind_clickable_to_theme_api_delegate>(Module, "efl_ui_action_connector_bind_clickable_to_theme");
121
122         private static void bind_clickable_to_theme(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Layout kw_object, Efl.Input.IClickable clickable)
123         {
124             Eina.Log.Debug("function efl_ui_action_connector_bind_clickable_to_theme was called");
125             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
126             if (ws != null)
127             {
128                                                             
129                 try
130                 {
131                     ActionConnector.BindClickableToTheme(kw_object, clickable);
132                 }
133                 catch (Exception e)
134                 {
135                     Eina.Log.Warning($"Callback error: {e.ToString()}");
136                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
137                 }
138
139                                         
140             }
141             else
142             {
143                 efl_ui_action_connector_bind_clickable_to_theme_ptr.Value.Delegate(kw_object, clickable);
144             }
145         }
146
147         
148         private delegate void efl_ui_action_connector_bind_clickable_to_object_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.IInterface kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.IClickable clickable);
149
150         
151         public delegate void efl_ui_action_connector_bind_clickable_to_object_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.IInterface kw_object, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.IClickable clickable);
152
153         public static Efl.Eo.FunctionWrapper<efl_ui_action_connector_bind_clickable_to_object_api_delegate> efl_ui_action_connector_bind_clickable_to_object_ptr = new Efl.Eo.FunctionWrapper<efl_ui_action_connector_bind_clickable_to_object_api_delegate>(Module, "efl_ui_action_connector_bind_clickable_to_object");
154
155         private static void bind_clickable_to_object(System.IntPtr obj, System.IntPtr pd, Efl.Input.IInterface kw_object, Efl.Input.IClickable clickable)
156         {
157             Eina.Log.Debug("function efl_ui_action_connector_bind_clickable_to_object was called");
158             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
159             if (ws != null)
160             {
161                                                             
162                 try
163                 {
164                     ActionConnector.BindClickableToObject(kw_object, clickable);
165                 }
166                 catch (Exception e)
167                 {
168                     Eina.Log.Warning($"Callback error: {e.ToString()}");
169                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
170                 }
171
172                                         
173             }
174             else
175             {
176                 efl_ui_action_connector_bind_clickable_to_object_ptr.Value.Delegate(kw_object, clickable);
177             }
178         }
179
180         #pragma warning restore CA1707, CS1591, SA1300, SA1600
181
182 }
183 }
184 }
185
186 }
187
188 #if EFL_BETA
189 #pragma warning disable CS1591
190 public static class Efl_UiActionConnector_ExtensionMethods {
191 }
192 #pragma warning restore CS1591
193 #endif