コード例 #1
0
ファイル: clipboard.c プロジェクト: seanregan/browser
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;
}
コード例 #2
0
ファイル: clipboard.c プロジェクト: seanregan/browser
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;
}
コード例 #3
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
bool gui_copy_to_clipboard(struct selection *s)
{
	if (s->defined && selection_traverse(s, copy_handler, NULL))
		gui_commit_clipboard();
	return true;
}