X11workbench Toolkit
1.0
|
Functions | |
void * | WBGetClipboardData (Display *pDisplay, Atom *paType, int *piFormat, unsigned long *pnData) |
Get clipboard data of requested type. More... | |
int | WBSetClipboardData (Display *pDisplay, Atom aType, int iFormat, const void *pData, unsigned long nData) |
Get clipboard data of requested type. More... | |
void * | WBGetSelectionData (Display *pDisplay, Atom aSelection, Atom *paType, int *piFormat, unsigned long *pnData) |
Get clipboard data of requested type. More... | |
int | WBSetSelectionData (Display *pDisplay, Atom aSelection, Atom aType, int iFormat, const void *pData, unsigned long nData) |
Get clipboard data of requested type. More... | |
Clipboard and generic 'Selection' helper functions. Use these to copy data to/from the clipboard or other 'selection'. They will process the requests asynchronously in a thread, returning results in a convenient format. This avoids the unnecessary complexity of processing inner message loops and allows for completion callback functions and messages.
void* WBGetClipboardData | ( | Display * | pDisplay, |
Atom * | paType, | ||
int * | piFormat, | ||
unsigned long * | pnData | ||
) |
Get clipboard data of requested type.
pDisplay | the Display pointer for the selection (NULL for default) |
paType | Pointer to an atom indicating the requested data type ('None' for ANY), and returning the actual data type |
piFormat | pointer to the returned format (0, 8, 16, or 32) |
pnData | the size of the returned data (number of items, based on *piFormat) |
This function will obtain the clipboard data associated with the specified data type, or whichever data it finds first if 'None' is specified as 'paType'. Some substitutions may occur, such as 'XA_TEXT' vs 'UTF8' (for example), if data in the requested format is not available. The returned value is a pointer to the actual data of size '*pnData' 'items' (which have a bit length as specified by '*piFormat'). You must call 'WBFree()' to release the resource once you are done with it.
Header File: window_helper.h
Definition at line 1842 of file clipboard_helper.c.
void* WBGetSelectionData | ( | Display * | pDisplay, |
Atom | aSelection, | ||
Atom * | paType, | ||
int * | piFormat, | ||
unsigned long * | pnData | ||
) |
Get clipboard data of requested type.
pDisplay | the Display pointer for the selection (NULL for default) |
aSelection | an Atom for the 'selection' data to acquire (usually 'CLIPBOARD' or XA_PRIMARY) |
paType | Pointer to an atom indicating the requested data type ('None' for ANY), and returning the actual data type |
piFormat | pointer to the returned format (0, 8, 16, or 32) |
pnData | the size of the returned data (number of items, based on *piFormat) |
This function will obtain the selection data associated with the target and specified data type, or whichever data it finds first if 'None' is specified as 'paType'. Some substitutions may occur, such as 'XA_TEXT' vs 'UTF8' (for example), if data in the requested format is not available. The returned value is a pointer to the actual data of size '*pnData' 'items' (which have a bit length as specified by '*piFormat'). You must call 'WBFree()' to release the resource once you are done with it.
Header File: window_helper.h
Definition at line 1856 of file clipboard_helper.c.
int WBSetClipboardData | ( | Display * | pDisplay, |
Atom | aType, | ||
int | iFormat, | ||
const void * | pData, | ||
unsigned long | nData | ||
) |
Get clipboard data of requested type.
pDisplay | the Display pointer for the selection (NULL for default) |
aType | an atom indicating the data type |
iFormat | the data format (0, 8, 16, or 32) |
pData | a pointer to the data to be assigned (can be NULL, indicating you want to clear it) |
nData | the size of the data (number of items, based on iFormat) |
This function assigns the clipboard data for the specified type ('aType') and format ('iFormat') to the data specified by 'pData' and 'nData'.
Header File: window_helper.h
Definition at line 1849 of file clipboard_helper.c.
int WBSetSelectionData | ( | Display * | pDisplay, |
Atom | aSelection, | ||
Atom | aType, | ||
int | iFormat, | ||
const void * | pData, | ||
unsigned long | nData | ||
) |
Get clipboard data of requested type.
pDisplay | the Display pointer for the selection (NULL for default) |
aSelection | an Atom for the 'selection' data to assign (usually 'CLIPBOARD' or XA_PRIMARY) |
aType | an atom indicating the data type |
iFormat | the data format (0, 8, 16, or 32) |
pData | a pointer to the data to be assigned (can be NULL, indicating you want to clear it) |
nData | the size of the data (number of items, based on iFormat) |
This function assigns the selection data for the specified target 'aSelection' and type ('aType') and format ('iFormat') to the data specified by 'pData' and 'nData'.
Header File: window_helper.h
Definition at line 2061 of file clipboard_helper.c.