XStoreBytes(), XStoreBuffer(), XFetchBytes(), XFetchBuffer(), XRotateBuffers() - manipulate cut and paste buffers
XStoreBytes (Display *display, char *bytes, int nbytes)
XStoreBuffer (Display *display, char *bytes, int nbytes,
int buffer)
char *XFetchBytes (Display *display, int *nbytes_return)
char *XFetchBuffer (Display *display, int *nbytes_return,
int buffer)
XRotateBuffers (Display *display, int rotate)
Note that the data can have embedded null characters, and need not be null terminated. The cut buffer's contents can be retrieved later by any client calling XFetchBytes(3).
XStoreBytes(3) can generate a BadAlloc error.
If an invalid buffer is specified, the call has no effect. Note that the data can have embedded null characters, and need not be null terminated.
XStoreBuffer(3) can generate a BadAlloc error.
The XFetchBytes(3) function returns the number of bytes in the nbytes_return argument, if the buffer contains data. Otherwise, the function returns NULL and sets nbytes to 0. The appropriate amount of storage is allocated and the pointer returned. The client must free this storage when finished with it by calling XFree(3).
The XFetchBuffer(3) function returns zero to the nbytes_return argument if there is no data in the buffer or if an invalid buffer is specified.
XFetchBuffer(3) can generate a BadValue error.
The XRotateBuffers(3) function rotates the cut buffers, such that buffer 0 becomes buffer n, buffer 1 becomes n + 1 mod 8, and so on. This cut buffer numbering is global to the display. Note that XRotateBuffers(3) generates BadMatch errors if any of the eight buffers have not been created.
XRotateBuffers(3) can generate a BadMatch error.
XFree()
Xlib