public object GetData(TransferDataType type) { if (type == TransferDataType.Text) { return(clipboard.WaitForText()); } if (type == TransferDataType.Text) { return(clipboard.WaitForImage()); } TransferDataStore store = new TransferDataStore(); foreach (var at in GetAtomsForType(type)) { var data = clipboard.WaitForContents(at); Util.GetSelectionData(data, store); } return(((ITransferData)store).GetValue(type)); }
public override object GetData(TransferDataType type) { if (type == TransferDataType.Text) { return(clipboard.WaitForText()); } if (type == TransferDataType.Image) { return(ApplicationContext.Toolkit.WrapImage(new GtkImage(clipboard.WaitForImage()))); } TransferDataStore store = new TransferDataStore(); foreach (var at in GetAtomsForType(type)) { var data = clipboard.WaitForContents(at); Util.GetSelectionData(ApplicationContext, data, store); } return(((ITransferData)store).GetValue(type)); }