/// <summary>Start a drag and drop process at the drag side. During dragging, there are three events emitted as belows: - EFL_UI_DND_EVENT_DRAG_POS - EFL_UI_DND_EVENT_DRAG_ACCEPT - EFL_UI_DND_EVENT_DRAG_DONE</summary> /// <param name="format">The data format</param> /// <param name="data">The drag data</param> /// <param name="action">Action when data is transferred</param> /// <param name="icon_func">Function pointer to create icon</param> /// <param name="seat">Specified seat for multiple seats case.</param> public void DragStart(Efl.Ui.SelectionFormat format, Eina.Slice data, Efl.Ui.SelectionAction action, Efl.Dnd.DragIconCreate icon_func, uint seat) { GCHandle icon_func_handle = GCHandle.Alloc(icon_func); Efl.Ui.IDndConcrete.NativeMethods.efl_ui_dnd_drag_start_ptr.Value.Delegate(this.NativeHandle, format, data, action, GCHandle.ToIntPtr(icon_func_handle), Efl.Dnd.DragIconCreateWrapper.Cb, Efl.Eo.Globals.free_gchandle, seat); Eina.Error.RaiseIfUnhandledException(); }
/// <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> /// <param name="data_func">Data and its format</param> /// <param name="item_func">Item to determine drag start</param> /// <param name="icon_func">Icon used during drag</param> /// <param name="icon_list_func">Icons used for animations CHECKING</param> /// <param name="seat">Specified seat for multiple seats case.</param> /// <returns></returns> 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) { GCHandle data_func_handle = GCHandle.Alloc(data_func); GCHandle item_func_handle = GCHandle.Alloc(item_func); GCHandle icon_func_handle = GCHandle.Alloc(icon_func); GCHandle icon_list_func_handle = GCHandle.Alloc(icon_list_func); Efl.Ui.DndContainerNativeInherit.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); Eina.Error.RaiseIfUnhandledException(); }