bool ami_easy_clipboard(char *text) { if(!gui_empty_clipboard()) return false; if(!gui_add_to_clipboard(text,strlen(text),false)) return false; if(!gui_commit_clipboard()) return false; return true; }
bool gui_copy_to_clipboard(struct selection *s) { bool success; if(s->defined == false) return false; if(!gui_empty_clipboard()) return false; success = selection_traverse(s, ami_clipboard_copy, NULL); /* commit regardless, otherwise we leave the clipboard in an unusable state */ gui_commit_clipboard(); return success; }
bool gui_copy_to_clipboard(struct selection *s) { if (s->defined && selection_traverse(s, copy_handler, NULL)) gui_commit_clipboard(); return true; }