예제 #1
0
 public void SetData(TransferDataType type, Func <object> dataSource)
 {
     clipboard.SetWithData((Gtk.TargetEntry[])Util.BuildTargetTable(new TransferDataType[] { type }),
                           delegate(Gtk.Clipboard cb, Gtk.SelectionData data, uint id) {
         TransferDataType ttype = Util.AtomToType(data.Target.Name);
         if (ttype == type)
         {
             Util.SetSelectionData(data, data.Target.Name, dataSource());
         }
     },
                           delegate {
     });
 }