void OnPasteEvent(EventKey evnt) { Gtk.Clipboard clip = Gtk.Clipboard.Get(Selection.Clipboard); if (!clip.WaitIsTextAvailable()) { return; } string str = clip.WaitForText(); SearchController.SetString(SearchController.Query + str); }
public bool IsTypeAvailable(TransferDataType type) { if (type == TransferDataType.Text) { return(clipboard.WaitIsTextAvailable()); } if (type == TransferDataType.Image) { return(clipboard.WaitIsImageAvailable()); } foreach (var at in GetAtomsForType(type)) { if (clipboard.WaitIsTargetAvailable(at)) { return(true); } } return(false); }