public void AddValue(string type, byte[] value) { Type t = Type.GetType(type); if (t != null) { data [type] = TransferDataSource.DeserializeValue(value); } else { data [type] = value; } }
public static void SetTransferData(TransferDataSource source) { foreach (var t in source.DataTypes) { if (source.DataRequestCallback != null) { Clipboard.SetData(t, source.DataRequestCallback); } else { Clipboard.SetData(t, source.GetValue(t)); } } }
T ITransferData.GetValue <T> () { object ob = GetValue(typeof(T).FullName); if (ob == null || ob.GetType() == typeof(Type)) { return((T)ob); } if (ob is byte[]) { T val = (T)TransferDataSource.DeserializeValue((byte[])ob); data[typeof(T).FullName] = val; return(val); } return((T)ob); }
public static void Copy(TransferDataSource data) { }
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); }
internal void DragStart(TransferDataSource data, DragDropAction allowedDragActions, object image, double hotX, double hotY) { Backend.DragStart(data, allowedDragActions, image, hotX, hotY); }
internal void DragStart(TransferDataSource data, DragDropAction allowedDragActions, object image, double hotX, double hotY) { Backend.DragStart (data, allowedDragActions, image, hotX, hotY); }