1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 [Efl.Ui.IDndContainerConcrete.NativeMethods]
13 public interface IDndContainer :
14 Efl.Eo.IWrapper, IDisposable
16 /// <summary>The time since mouse down happens to drag starts.</summary>
17 /// <returns>The drag delay time</returns>
18 double GetDragDelayTime();
19 /// <summary>The time since mouse down happens to drag starts.</summary>
20 /// <param name="time">The drag delay time</param>
21 void SetDragDelayTime(double time);
22 /// <summary>This registers a drag for items in a container. Many items can be dragged at a time. During dragging, there are three events emitted: EFL_DND_EVENT_DRAG_POS, EFL_DND_EVENT_DRAG_ACCEPT, EFL_DND_EVENT_DRAG_DONE.</summary>
23 /// <param name="data_func">Data and its format</param>
24 /// <param name="item_func">Item to determine drag start</param>
25 /// <param name="icon_func">Icon used during drag</param>
26 /// <param name="icon_list_func">Icons used for animations CHECKING</param>
27 /// <param name="seat">Specified seat for multiple seats case.</param>
28 void AddDragItem(Efl.Dnd.DragDataGet data_func, Efl.Dnd.ItemGet item_func, Efl.Dnd.DragIconCreate icon_func, Efl.Dnd.DragIconListCreate icon_list_func, uint seat);
29 /// <summary>Remove drag function of items in the container object.</summary>
30 /// <param name="seat">Specified seat for multiple seats case.</param>
31 void DelDragItem(uint seat);
32 /// <param name="format">Accepted data formats</param>
33 /// <param name="item_func">Get item at specific position</param>
34 /// <param name="seat">Specified seat for multiple seats case.</param>
35 void AddDropItem(Efl.Ui.SelectionFormat format, Efl.Dnd.ItemGet item_func, uint seat);
36 /// <param name="seat">Specified seat for multiple seats case.</param>
37 void DelDropItem(uint seat);
38 /// <summary>The time since mouse down happens to drag starts.</summary>
39 /// <value>The drag delay time</value>
40 double DragDelayTime {
45 sealed public class IDndContainerConcrete :
50 ///<summary>Pointer to the native class description.</summary>
51 public override System.IntPtr NativeClass
55 if (((object)this).GetType() == typeof(IDndContainerConcrete))
57 return GetEflClassStatic();
61 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
66 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
67 efl_ui_dnd_container_mixin_get();
68 /// <summary>Initializes a new instance of the <see cref="IDndContainer"/> class.
69 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
70 private IDndContainerConcrete(System.IntPtr raw) : base(raw)
74 /// <summary>The time since mouse down happens to drag starts.</summary>
75 /// <returns>The drag delay time</returns>
76 public double GetDragDelayTime() {
77 var _ret_var = Efl.Ui.IDndContainerConcrete.NativeMethods.efl_ui_dnd_container_drag_delay_time_get_ptr.Value.Delegate(this.NativeHandle);
78 Eina.Error.RaiseIfUnhandledException();
81 /// <summary>The time since mouse down happens to drag starts.</summary>
82 /// <param name="time">The drag delay time</param>
83 public void SetDragDelayTime(double time) {
84 Efl.Ui.IDndContainerConcrete.NativeMethods.efl_ui_dnd_container_drag_delay_time_set_ptr.Value.Delegate(this.NativeHandle,time);
85 Eina.Error.RaiseIfUnhandledException();
87 /// <summary>This registers a drag for items in a container. Many items can be dragged at a time. During dragging, there are three events emitted: EFL_DND_EVENT_DRAG_POS, EFL_DND_EVENT_DRAG_ACCEPT, EFL_DND_EVENT_DRAG_DONE.</summary>
88 /// <param name="data_func">Data and its format</param>
89 /// <param name="item_func">Item to determine drag start</param>
90 /// <param name="icon_func">Icon used during drag</param>
91 /// <param name="icon_list_func">Icons used for animations CHECKING</param>
92 /// <param name="seat">Specified seat for multiple seats case.</param>
93 public void AddDragItem(Efl.Dnd.DragDataGet data_func, Efl.Dnd.ItemGet item_func, Efl.Dnd.DragIconCreate icon_func, Efl.Dnd.DragIconListCreate icon_list_func, uint seat) {
94 GCHandle data_func_handle = GCHandle.Alloc(data_func);
95 GCHandle item_func_handle = GCHandle.Alloc(item_func);
96 GCHandle icon_func_handle = GCHandle.Alloc(icon_func);
97 GCHandle icon_list_func_handle = GCHandle.Alloc(icon_list_func);
98 Efl.Ui.IDndContainerConcrete.NativeMethods.efl_ui_dnd_container_drag_item_add_ptr.Value.Delegate(this.NativeHandle,GCHandle.ToIntPtr(data_func_handle), Efl.Dnd.DragDataGetWrapper.Cb, Efl.Eo.Globals.free_gchandle, GCHandle.ToIntPtr(item_func_handle), Efl.Dnd.ItemGetWrapper.Cb, Efl.Eo.Globals.free_gchandle, GCHandle.ToIntPtr(icon_func_handle), Efl.Dnd.DragIconCreateWrapper.Cb, Efl.Eo.Globals.free_gchandle, GCHandle.ToIntPtr(icon_list_func_handle), Efl.Dnd.DragIconListCreateWrapper.Cb, Efl.Eo.Globals.free_gchandle, seat);
99 Eina.Error.RaiseIfUnhandledException();
101 /// <summary>Remove drag function of items in the container object.</summary>
102 /// <param name="seat">Specified seat for multiple seats case.</param>
103 public void DelDragItem(uint seat) {
104 Efl.Ui.IDndContainerConcrete.NativeMethods.efl_ui_dnd_container_drag_item_del_ptr.Value.Delegate(this.NativeHandle,seat);
105 Eina.Error.RaiseIfUnhandledException();
107 /// <param name="format">Accepted data formats</param>
108 /// <param name="item_func">Get item at specific position</param>
109 /// <param name="seat">Specified seat for multiple seats case.</param>
110 public void AddDropItem(Efl.Ui.SelectionFormat format, Efl.Dnd.ItemGet item_func, uint seat) {
111 GCHandle item_func_handle = GCHandle.Alloc(item_func);
112 Efl.Ui.IDndContainerConcrete.NativeMethods.efl_ui_dnd_container_drop_item_add_ptr.Value.Delegate(this.NativeHandle,format, GCHandle.ToIntPtr(item_func_handle), Efl.Dnd.ItemGetWrapper.Cb, Efl.Eo.Globals.free_gchandle, seat);
113 Eina.Error.RaiseIfUnhandledException();
115 /// <param name="seat">Specified seat for multiple seats case.</param>
116 public void DelDropItem(uint seat) {
117 Efl.Ui.IDndContainerConcrete.NativeMethods.efl_ui_dnd_container_drop_item_del_ptr.Value.Delegate(this.NativeHandle,seat);
118 Eina.Error.RaiseIfUnhandledException();
120 /// <summary>The time since mouse down happens to drag starts.</summary>
121 /// <value>The drag delay time</value>
122 public double DragDelayTime {
123 get { return GetDragDelayTime(); }
124 set { SetDragDelayTime(value); }
126 private static IntPtr GetEflClassStatic()
128 return Efl.Ui.IDndContainerConcrete.efl_ui_dnd_container_mixin_get();
130 /// <summary>Wrapper for native methods and virtual method delegates.
131 /// For internal use by generated code only.</summary>
132 public class NativeMethods : Efl.Eo.NativeClass
134 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
135 /// <summary>Gets the list of Eo operations to override.</summary>
136 /// <returns>The list of Eo operations to be overload.</returns>
137 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
139 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
140 var methods = Efl.Eo.Globals.GetUserMethods(type);
142 if (efl_ui_dnd_container_drag_delay_time_get_static_delegate == null)
144 efl_ui_dnd_container_drag_delay_time_get_static_delegate = new efl_ui_dnd_container_drag_delay_time_get_delegate(drag_delay_time_get);
147 if (methods.FirstOrDefault(m => m.Name == "GetDragDelayTime") != null)
149 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_dnd_container_drag_delay_time_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_dnd_container_drag_delay_time_get_static_delegate) });
152 if (efl_ui_dnd_container_drag_delay_time_set_static_delegate == null)
154 efl_ui_dnd_container_drag_delay_time_set_static_delegate = new efl_ui_dnd_container_drag_delay_time_set_delegate(drag_delay_time_set);
157 if (methods.FirstOrDefault(m => m.Name == "SetDragDelayTime") != null)
159 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_dnd_container_drag_delay_time_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_dnd_container_drag_delay_time_set_static_delegate) });
162 if (efl_ui_dnd_container_drag_item_add_static_delegate == null)
164 efl_ui_dnd_container_drag_item_add_static_delegate = new efl_ui_dnd_container_drag_item_add_delegate(drag_item_add);
167 if (methods.FirstOrDefault(m => m.Name == "AddDragItem") != null)
169 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_dnd_container_drag_item_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_dnd_container_drag_item_add_static_delegate) });
172 if (efl_ui_dnd_container_drag_item_del_static_delegate == null)
174 efl_ui_dnd_container_drag_item_del_static_delegate = new efl_ui_dnd_container_drag_item_del_delegate(drag_item_del);
177 if (methods.FirstOrDefault(m => m.Name == "DelDragItem") != null)
179 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_dnd_container_drag_item_del"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_dnd_container_drag_item_del_static_delegate) });
182 if (efl_ui_dnd_container_drop_item_add_static_delegate == null)
184 efl_ui_dnd_container_drop_item_add_static_delegate = new efl_ui_dnd_container_drop_item_add_delegate(drop_item_add);
187 if (methods.FirstOrDefault(m => m.Name == "AddDropItem") != null)
189 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_dnd_container_drop_item_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_dnd_container_drop_item_add_static_delegate) });
192 if (efl_ui_dnd_container_drop_item_del_static_delegate == null)
194 efl_ui_dnd_container_drop_item_del_static_delegate = new efl_ui_dnd_container_drop_item_del_delegate(drop_item_del);
197 if (methods.FirstOrDefault(m => m.Name == "DelDropItem") != null)
199 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_dnd_container_drop_item_del"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_dnd_container_drop_item_del_static_delegate) });
204 /// <summary>Returns the Eo class for the native methods of this class.</summary>
205 /// <returns>The native class pointer.</returns>
206 public override IntPtr GetEflClass()
208 return Efl.Ui.IDndContainerConcrete.efl_ui_dnd_container_mixin_get();
211 #pragma warning disable CA1707, CS1591, SA1300, SA1600
214 private delegate double efl_ui_dnd_container_drag_delay_time_get_delegate(System.IntPtr obj, System.IntPtr pd);
217 public delegate double efl_ui_dnd_container_drag_delay_time_get_api_delegate(System.IntPtr obj);
219 public static Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_delay_time_get_api_delegate> efl_ui_dnd_container_drag_delay_time_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_delay_time_get_api_delegate>(Module, "efl_ui_dnd_container_drag_delay_time_get");
221 private static double drag_delay_time_get(System.IntPtr obj, System.IntPtr pd)
223 Eina.Log.Debug("function efl_ui_dnd_container_drag_delay_time_get was called");
224 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
227 double _ret_var = default(double);
230 _ret_var = ((IDndContainer)ws.Target).GetDragDelayTime();
234 Eina.Log.Warning($"Callback error: {e.ToString()}");
235 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
243 return efl_ui_dnd_container_drag_delay_time_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
247 private static efl_ui_dnd_container_drag_delay_time_get_delegate efl_ui_dnd_container_drag_delay_time_get_static_delegate;
250 private delegate void efl_ui_dnd_container_drag_delay_time_set_delegate(System.IntPtr obj, System.IntPtr pd, double time);
253 public delegate void efl_ui_dnd_container_drag_delay_time_set_api_delegate(System.IntPtr obj, double time);
255 public static Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_delay_time_set_api_delegate> efl_ui_dnd_container_drag_delay_time_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_delay_time_set_api_delegate>(Module, "efl_ui_dnd_container_drag_delay_time_set");
257 private static void drag_delay_time_set(System.IntPtr obj, System.IntPtr pd, double time)
259 Eina.Log.Debug("function efl_ui_dnd_container_drag_delay_time_set was called");
260 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
266 ((IDndContainer)ws.Target).SetDragDelayTime(time);
270 Eina.Log.Warning($"Callback error: {e.ToString()}");
271 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
278 efl_ui_dnd_container_drag_delay_time_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), time);
282 private static efl_ui_dnd_container_drag_delay_time_set_delegate efl_ui_dnd_container_drag_delay_time_set_static_delegate;
285 private delegate void efl_ui_dnd_container_drag_item_add_delegate(System.IntPtr obj, System.IntPtr pd, IntPtr data_func_data, Efl.Dnd.DragDataGetInternal data_func, EinaFreeCb data_func_free_cb, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, IntPtr icon_func_data, Efl.Dnd.DragIconCreateInternal icon_func, EinaFreeCb icon_func_free_cb, IntPtr icon_list_func_data, Efl.Dnd.DragIconListCreateInternal icon_list_func, EinaFreeCb icon_list_func_free_cb, uint seat);
288 public delegate void efl_ui_dnd_container_drag_item_add_api_delegate(System.IntPtr obj, IntPtr data_func_data, Efl.Dnd.DragDataGetInternal data_func, EinaFreeCb data_func_free_cb, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, IntPtr icon_func_data, Efl.Dnd.DragIconCreateInternal icon_func, EinaFreeCb icon_func_free_cb, IntPtr icon_list_func_data, Efl.Dnd.DragIconListCreateInternal icon_list_func, EinaFreeCb icon_list_func_free_cb, uint seat);
290 public static Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_item_add_api_delegate> efl_ui_dnd_container_drag_item_add_ptr = new Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_item_add_api_delegate>(Module, "efl_ui_dnd_container_drag_item_add");
292 private static void drag_item_add(System.IntPtr obj, System.IntPtr pd, IntPtr data_func_data, Efl.Dnd.DragDataGetInternal data_func, EinaFreeCb data_func_free_cb, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, IntPtr icon_func_data, Efl.Dnd.DragIconCreateInternal icon_func, EinaFreeCb icon_func_free_cb, IntPtr icon_list_func_data, Efl.Dnd.DragIconListCreateInternal icon_list_func, EinaFreeCb icon_list_func_free_cb, uint seat)
294 Eina.Log.Debug("function efl_ui_dnd_container_drag_item_add was called");
295 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
298 Efl.Dnd.DragDataGetWrapper data_func_wrapper = new Efl.Dnd.DragDataGetWrapper(data_func, data_func_data, data_func_free_cb);
299 Efl.Dnd.ItemGetWrapper item_func_wrapper = new Efl.Dnd.ItemGetWrapper(item_func, item_func_data, item_func_free_cb);
300 Efl.Dnd.DragIconCreateWrapper icon_func_wrapper = new Efl.Dnd.DragIconCreateWrapper(icon_func, icon_func_data, icon_func_free_cb);
301 Efl.Dnd.DragIconListCreateWrapper icon_list_func_wrapper = new Efl.Dnd.DragIconListCreateWrapper(icon_list_func, icon_list_func_data, icon_list_func_free_cb);
305 ((IDndContainer)ws.Target).AddDragItem(data_func_wrapper.ManagedCb, item_func_wrapper.ManagedCb, icon_func_wrapper.ManagedCb, icon_list_func_wrapper.ManagedCb, seat);
309 Eina.Log.Warning($"Callback error: {e.ToString()}");
310 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317 efl_ui_dnd_container_drag_item_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), data_func_data, data_func, data_func_free_cb, item_func_data, item_func, item_func_free_cb, icon_func_data, icon_func, icon_func_free_cb, icon_list_func_data, icon_list_func, icon_list_func_free_cb, seat);
321 private static efl_ui_dnd_container_drag_item_add_delegate efl_ui_dnd_container_drag_item_add_static_delegate;
324 private delegate void efl_ui_dnd_container_drag_item_del_delegate(System.IntPtr obj, System.IntPtr pd, uint seat);
327 public delegate void efl_ui_dnd_container_drag_item_del_api_delegate(System.IntPtr obj, uint seat);
329 public static Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_item_del_api_delegate> efl_ui_dnd_container_drag_item_del_ptr = new Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drag_item_del_api_delegate>(Module, "efl_ui_dnd_container_drag_item_del");
331 private static void drag_item_del(System.IntPtr obj, System.IntPtr pd, uint seat)
333 Eina.Log.Debug("function efl_ui_dnd_container_drag_item_del was called");
334 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
340 ((IDndContainer)ws.Target).DelDragItem(seat);
344 Eina.Log.Warning($"Callback error: {e.ToString()}");
345 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
352 efl_ui_dnd_container_drag_item_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), seat);
356 private static efl_ui_dnd_container_drag_item_del_delegate efl_ui_dnd_container_drag_item_del_static_delegate;
359 private delegate void efl_ui_dnd_container_drop_item_add_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionFormat format, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, uint seat);
362 public delegate void efl_ui_dnd_container_drop_item_add_api_delegate(System.IntPtr obj, Efl.Ui.SelectionFormat format, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, uint seat);
364 public static Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drop_item_add_api_delegate> efl_ui_dnd_container_drop_item_add_ptr = new Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drop_item_add_api_delegate>(Module, "efl_ui_dnd_container_drop_item_add");
366 private static void drop_item_add(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionFormat format, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, uint seat)
368 Eina.Log.Debug("function efl_ui_dnd_container_drop_item_add was called");
369 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
372 Efl.Dnd.ItemGetWrapper item_func_wrapper = new Efl.Dnd.ItemGetWrapper(item_func, item_func_data, item_func_free_cb);
376 ((IDndContainer)ws.Target).AddDropItem(format, item_func_wrapper.ManagedCb, seat);
380 Eina.Log.Warning($"Callback error: {e.ToString()}");
381 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
388 efl_ui_dnd_container_drop_item_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), format, item_func_data, item_func, item_func_free_cb, seat);
392 private static efl_ui_dnd_container_drop_item_add_delegate efl_ui_dnd_container_drop_item_add_static_delegate;
395 private delegate void efl_ui_dnd_container_drop_item_del_delegate(System.IntPtr obj, System.IntPtr pd, uint seat);
398 public delegate void efl_ui_dnd_container_drop_item_del_api_delegate(System.IntPtr obj, uint seat);
400 public static Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drop_item_del_api_delegate> efl_ui_dnd_container_drop_item_del_ptr = new Efl.Eo.FunctionWrapper<efl_ui_dnd_container_drop_item_del_api_delegate>(Module, "efl_ui_dnd_container_drop_item_del");
402 private static void drop_item_del(System.IntPtr obj, System.IntPtr pd, uint seat)
404 Eina.Log.Debug("function efl_ui_dnd_container_drop_item_del was called");
405 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
411 ((IDndContainer)ws.Target).DelDropItem(seat);
415 Eina.Log.Warning($"Callback error: {e.ToString()}");
416 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
423 efl_ui_dnd_container_drop_item_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), seat);
427 private static efl_ui_dnd_container_drop_item_del_delegate efl_ui_dnd_container_drop_item_del_static_delegate;
429 #pragma warning restore CA1707, CS1591, SA1300, SA1600