PhClipboardCopyString()
Copy string-only data to the clipboard
Synopsis:
int PhClipboardCopyString( unsigned short ig,
const char *string );
Description:
This function is a simple cover function for copying string-only data to the clipboard. It builds a PhClipHeader entry:
{ "TEXT", strlen(string), string }
and then calls PhClipboardCopy() to perform the operation. The string must end with \0.
Each input group has its own private clipboard, which you can select through the ig parameter. You can determine the current input group as follows:
- If you have the event that triggered the clipboard operation, use its input group (e.g. cbinfo->event->input_group) if it's nonzero.
- If that fails, get the value of the PHIG environment variable. If this value is nonzero, use it.
- If neither of the above if nonzero, specify an input group of 1.
Returns:
- 0
- Successful completion.
- -1
- An error occurred.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PhClipboardCopy(), PhClipboardPasteFinish(), PhClipboardPasteStart(), PhClipboardPasteString(), PhClipboardPasteType(), PhClipboardPasteTypeN(), PhClipHeader
