Esempio n. 1
0
        public void AddValue(string type, byte[] value)
        {
            Type t = Type.GetType(type);

            if (t != null)
            {
                data [type] = TransferDataSource.DeserializeValue(value);
            }
            else
            {
                data [type] = value;
            }
        }
Esempio n. 2
0
 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));
         }
     }
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public static void Copy(TransferDataSource data)
 {
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 internal void DragStart(TransferDataSource data, DragDropAction allowedDragActions, object image, double hotX, double hotY)
 {
     Backend.DragStart(data, allowedDragActions, image, hotX, hotY);
 }
Esempio n. 7
0
 public static void Copy(TransferDataSource data)
 {
 }
Esempio n. 8
0
 internal void DragStart(TransferDataSource data, DragDropAction allowedDragActions, object image, double hotX, double hotY)
 {
     Backend.DragStart (data, allowedDragActions, image, hotX, hotY);
 }