public void DragStart(TransferDataSource data, DragDropAction dragAction, object imageBackend, double hotX, double hotY) { Gdk.DragAction action = ConvertDragAction(dragAction); currentDragData = data; Widget.DragBegin += HandleDragBegin; IconInitializer.Init(Widget, (Gdk.Pixbuf)imageBackend, hotX, hotY); Gtk.Drag.Begin(Widget, Util.BuildTargetTable(data.DataTypes), action, 1, Gtk.Global.CurrentEvent); }
public void DragStart(DragStartData sdata) { Gdk.DragAction action = ConvertDragAction(sdata.DragAction); DragDropInfo.CurrentDragData = sdata.Data; Widget.DragBegin += HandleDragBegin; if (sdata.ImageBackend != null) { IconInitializer.Init(Widget, (Gdk.Pixbuf)sdata.ImageBackend, sdata.HotX, sdata.HotY); } Gtk.Drag.Begin(Widget, Util.BuildTargetTable(sdata.Data.DataTypes), action, 1, Gtk.Global.CurrentEvent); }
public void DragStart(DragStartData sdata) { AllocEventBox(); Gdk.DragAction action = ConvertDragAction(sdata.DragAction); DragDropInfo.CurrentDragData = sdata.Data; EventsRootWidget.DragBegin += HandleDragBegin; if (sdata.ImageBackend != null) { var img = ((GtkImage)sdata.ImageBackend).ToPixbuf(ApplicationContext, Widget); IconInitializer.Init(EventsRootWidget, img, sdata.HotX, sdata.HotY); } Gtk.Drag.Begin(EventsRootWidget, Util.BuildTargetTable(sdata.Data.DataTypes), action, 1, Gtk.Global.CurrentEvent ?? new Gdk.Event(IntPtr.Zero)); }