Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }