[Security] Fix PrivacyPrivilegeManager.RequestPermissions crash issue (#1651)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_text_selectable.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>Efl UI text selectable interface</summary>
14 /// <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>
15 [Efl.Ui.ITextSelectableConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface ITextSelectable : 
18     Efl.Eo.IWrapper, IDisposable
19 {
20     /// <summary>Called when selection is pasted</summary>
21     event EventHandler SelectionPasteEvt;
22     /// <summary>Called when selection is copied</summary>
23     event EventHandler SelectionCopyEvt;
24     /// <summary>Called when selection is cut</summary>
25     event EventHandler SelectionCutEvt;
26     /// <summary>Called at selection start</summary>
27     event EventHandler SelectionStartEvt;
28     /// <summary>Called when selection is changed</summary>
29     event EventHandler SelectionChangedEvt;
30     /// <summary>Called when selection is cleared</summary>
31     event EventHandler SelectionClearedEvt;
32 }
33 /// <summary>Efl UI text selectable interface</summary>
34 /// <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>
35 sealed public  class ITextSelectableConcrete :
36     Efl.Eo.EoWrapper
37     , ITextSelectable
38     
39 {
40     /// <summary>Pointer to the native class description.</summary>
41     public override System.IntPtr NativeClass
42     {
43         get
44         {
45             if (((object)this).GetType() == typeof(ITextSelectableConcrete))
46             {
47                 return GetEflClassStatic();
48             }
49             else
50             {
51                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
52             }
53         }
54     }
55
56     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
57     /// Do not call this constructor directly.</summary>
58     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
59     private ITextSelectableConcrete(ConstructingHandle ch) : base(ch)
60     {
61     }
62
63     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
64         efl_ui_text_selectable_interface_get();
65     /// <summary>Initializes a new instance of the <see cref="ITextSelectable"/> class.
66     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
67     /// <param name="wh">The native pointer to be wrapped.</param>
68     private ITextSelectableConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
69     {
70     }
71
72     /// <summary>Called when selection is pasted</summary>
73     public event EventHandler SelectionPasteEvt
74     {
75         add
76         {
77             lock (eflBindingEventLock)
78             {
79                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
80                 {
81                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
82                     if (obj != null)
83                     {
84                         EventArgs args = EventArgs.Empty;
85                         try
86                         {
87                             value?.Invoke(obj, args);
88                         }
89                         catch (Exception e)
90                         {
91                             Eina.Log.Error(e.ToString());
92                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
93                         }
94                     }
95                 };
96
97                 string key = "_EFL_UI_EVENT_SELECTION_PASTE";
98                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
99             }
100         }
101
102         remove
103         {
104             lock (eflBindingEventLock)
105             {
106                 string key = "_EFL_UI_EVENT_SELECTION_PASTE";
107                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
108             }
109         }
110     }
111     /// <summary>Method to raise event SelectionPasteEvt.</summary>
112     public void OnSelectionPasteEvt(EventArgs e)
113     {
114         var key = "_EFL_UI_EVENT_SELECTION_PASTE";
115         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
116         if (desc == IntPtr.Zero)
117         {
118             Eina.Log.Error($"Failed to get native event {key}");
119             return;
120         }
121
122         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
123     }
124     /// <summary>Called when selection is copied</summary>
125     public event EventHandler SelectionCopyEvt
126     {
127         add
128         {
129             lock (eflBindingEventLock)
130             {
131                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
132                 {
133                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
134                     if (obj != null)
135                     {
136                         EventArgs args = EventArgs.Empty;
137                         try
138                         {
139                             value?.Invoke(obj, args);
140                         }
141                         catch (Exception e)
142                         {
143                             Eina.Log.Error(e.ToString());
144                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
145                         }
146                     }
147                 };
148
149                 string key = "_EFL_UI_EVENT_SELECTION_COPY";
150                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
151             }
152         }
153
154         remove
155         {
156             lock (eflBindingEventLock)
157             {
158                 string key = "_EFL_UI_EVENT_SELECTION_COPY";
159                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
160             }
161         }
162     }
163     /// <summary>Method to raise event SelectionCopyEvt.</summary>
164     public void OnSelectionCopyEvt(EventArgs e)
165     {
166         var key = "_EFL_UI_EVENT_SELECTION_COPY";
167         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
168         if (desc == IntPtr.Zero)
169         {
170             Eina.Log.Error($"Failed to get native event {key}");
171             return;
172         }
173
174         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
175     }
176     /// <summary>Called when selection is cut</summary>
177     public event EventHandler SelectionCutEvt
178     {
179         add
180         {
181             lock (eflBindingEventLock)
182             {
183                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
184                 {
185                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
186                     if (obj != null)
187                     {
188                         EventArgs args = EventArgs.Empty;
189                         try
190                         {
191                             value?.Invoke(obj, args);
192                         }
193                         catch (Exception e)
194                         {
195                             Eina.Log.Error(e.ToString());
196                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
197                         }
198                     }
199                 };
200
201                 string key = "_EFL_UI_EVENT_SELECTION_CUT";
202                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
203             }
204         }
205
206         remove
207         {
208             lock (eflBindingEventLock)
209             {
210                 string key = "_EFL_UI_EVENT_SELECTION_CUT";
211                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
212             }
213         }
214     }
215     /// <summary>Method to raise event SelectionCutEvt.</summary>
216     public void OnSelectionCutEvt(EventArgs e)
217     {
218         var key = "_EFL_UI_EVENT_SELECTION_CUT";
219         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
220         if (desc == IntPtr.Zero)
221         {
222             Eina.Log.Error($"Failed to get native event {key}");
223             return;
224         }
225
226         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
227     }
228     /// <summary>Called at selection start</summary>
229     public event EventHandler SelectionStartEvt
230     {
231         add
232         {
233             lock (eflBindingEventLock)
234             {
235                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
236                 {
237                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
238                     if (obj != null)
239                     {
240                         EventArgs args = EventArgs.Empty;
241                         try
242                         {
243                             value?.Invoke(obj, args);
244                         }
245                         catch (Exception e)
246                         {
247                             Eina.Log.Error(e.ToString());
248                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
249                         }
250                     }
251                 };
252
253                 string key = "_EFL_UI_EVENT_SELECTION_START";
254                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
255             }
256         }
257
258         remove
259         {
260             lock (eflBindingEventLock)
261             {
262                 string key = "_EFL_UI_EVENT_SELECTION_START";
263                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
264             }
265         }
266     }
267     /// <summary>Method to raise event SelectionStartEvt.</summary>
268     public void OnSelectionStartEvt(EventArgs e)
269     {
270         var key = "_EFL_UI_EVENT_SELECTION_START";
271         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
272         if (desc == IntPtr.Zero)
273         {
274             Eina.Log.Error($"Failed to get native event {key}");
275             return;
276         }
277
278         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
279     }
280     /// <summary>Called when selection is changed</summary>
281     public event EventHandler SelectionChangedEvt
282     {
283         add
284         {
285             lock (eflBindingEventLock)
286             {
287                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
288                 {
289                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
290                     if (obj != null)
291                     {
292                         EventArgs args = EventArgs.Empty;
293                         try
294                         {
295                             value?.Invoke(obj, args);
296                         }
297                         catch (Exception e)
298                         {
299                             Eina.Log.Error(e.ToString());
300                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
301                         }
302                     }
303                 };
304
305                 string key = "_EFL_UI_EVENT_SELECTION_CHANGED";
306                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
307             }
308         }
309
310         remove
311         {
312             lock (eflBindingEventLock)
313             {
314                 string key = "_EFL_UI_EVENT_SELECTION_CHANGED";
315                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
316             }
317         }
318     }
319     /// <summary>Method to raise event SelectionChangedEvt.</summary>
320     public void OnSelectionChangedEvt(EventArgs e)
321     {
322         var key = "_EFL_UI_EVENT_SELECTION_CHANGED";
323         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
324         if (desc == IntPtr.Zero)
325         {
326             Eina.Log.Error($"Failed to get native event {key}");
327             return;
328         }
329
330         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
331     }
332     /// <summary>Called when selection is cleared</summary>
333     public event EventHandler SelectionClearedEvt
334     {
335         add
336         {
337             lock (eflBindingEventLock)
338             {
339                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
340                 {
341                     var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
342                     if (obj != null)
343                     {
344                         EventArgs args = EventArgs.Empty;
345                         try
346                         {
347                             value?.Invoke(obj, args);
348                         }
349                         catch (Exception e)
350                         {
351                             Eina.Log.Error(e.ToString());
352                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
353                         }
354                     }
355                 };
356
357                 string key = "_EFL_UI_EVENT_SELECTION_CLEARED";
358                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
359             }
360         }
361
362         remove
363         {
364             lock (eflBindingEventLock)
365             {
366                 string key = "_EFL_UI_EVENT_SELECTION_CLEARED";
367                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
368             }
369         }
370     }
371     /// <summary>Method to raise event SelectionClearedEvt.</summary>
372     public void OnSelectionClearedEvt(EventArgs e)
373     {
374         var key = "_EFL_UI_EVENT_SELECTION_CLEARED";
375         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
376         if (desc == IntPtr.Zero)
377         {
378             Eina.Log.Error($"Failed to get native event {key}");
379             return;
380         }
381
382         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
383     }
384     private static IntPtr GetEflClassStatic()
385     {
386         return Efl.Ui.ITextSelectableConcrete.efl_ui_text_selectable_interface_get();
387     }
388     /// <summary>Wrapper for native methods and virtual method delegates.
389     /// For internal use by generated code only.</summary>
390     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
391     {
392         /// <summary>Gets the list of Eo operations to override.</summary>
393         /// <returns>The list of Eo operations to be overload.</returns>
394         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
395         {
396             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
397             return descs;
398         }
399         /// <summary>Returns the Eo class for the native methods of this class.</summary>
400         /// <returns>The native class pointer.</returns>
401         public override IntPtr GetEflClass()
402         {
403             return Efl.Ui.ITextSelectableConcrete.efl_ui_text_selectable_interface_get();
404         }
405
406         #pragma warning disable CA1707, CS1591, SA1300, SA1600
407
408         #pragma warning restore CA1707, CS1591, SA1300, SA1600
409
410 }
411 }
412 }
413
414 }
415
416 #if EFL_BETA
417 #pragma warning disable CS1591
418 public static class Efl_UiITextSelectableConcrete_ExtensionMethods {
419 }
420 #pragma warning restore CS1591
421 #endif