XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBuffers − manipulate cut and paste buffers


int XStoreBytes(Display *display, char *bytes, int nbytes);

int 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);

int XRotateBuffers(Display *display, int rotate);



Specifies the buffer in which you want to store the bytes or from which you want the stored data returned.


Specifies the bytes, which are not necessarily ASCII or null-terminated.


Specifies the connection to the X server.


Specifies the number of bytes to be stored.


Returns the number of bytes in the buffer.


Specifies how much to rotate the cut buffers.


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.

XStoreBytes can generate a BadAlloc error.

If an invalid buffer is specified, the call has no effect. The data can have embedded null characters and need not be null-terminated.

XStoreBuffer can generate a BadAlloc error.

The XFetchBytes 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.

The XFetchBuffer function returns zero to the nbytes_return argument if there is no data in the buffer or if an invalid buffer is specified.

XFetchBuffer can generate a BadValue error.

The XRotateBuffers 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 generates BadMatch errors if any of the eight buffers have not been created.

XRotateBuffers can generate a BadMatch error.



The server failed to allocate the requested resource or server memory.


A value for an Atom argument does not name a defined Atom.


Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.


Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted. Any argument defined as a set of alternatives can generate this error.


Xlib − C Language X Interface

More Linux Commands

Mail::SpamAssassin::AsyncLoop(3pm) - scanner asynchronous ev
An asynchronous event loop used for long-running operations, performed in the background during the Mail::SpamAssassin::check() scan operation, such as DNS bloc

strncat(3) - concatenate two strings - Linux manual page....
The strcat() function appends the src string to the dest string, overwriting the terminating null byte (\0) at the end of dest, and then adds a terminating null

Tcl_CreateObjTrace(3) - arrange for command execution to be
Tcl_CreateObjTrace arranges for command tracing. After it is called, objProc will be invoked before the Tcl interpreter calls any command procedure when evaluat

ldap_first_entry(3) - LDAP result entry parsing and counting
These routines are used to parse results received from ldap_result(3) or the synchronous LDAP search operation routines ldap_search_s(3) and ldap_search_st(3).

multixterm(1) - drive multiple xterms separately or together
Multixterm creates multiple xterms that can be driven together or separately. In its simplest form, multixterm is run with no arguments and commands are interac

SDL_LoadBMP(3) - Load a Windows BMP file into an SDL_Surface
Loads a surface from a named Windows BMP file. RETURN VALUE Returns the new surface, or NULL if there was an error. SEE ALSO SDL_SaveBMP SDL_LoadBMP.3 (Library

ldap_compare_s(3) - Perform an LDAP compare operation.......
The ldap_compare_ext_s() routine is used to perform an LDAP compare operation synchronously. It takes dn, the DN of the entry upon which to perform the compare,

Tk_Get3DBorder(3) - draw borders with three-dimensional appe
These procedures provide facilities for drawing window borders in a way that produces a three-dimensional appearance. Tk_Alloc3DBorderFromObj allocates colors a

Tcl_GetHostName(3) - get the name of the local host.........
Tcl_GetHostName is a utility procedure used by some of the Tcl commands. It returns a pointer to a string containing the name for the current machine, or an emp

XkbGetDeviceInfoChanges(3) - Query the changes that have occ
The changes->changed field indicates which attributes of the device specified in changes->device have changed. The parameters describing the changes are contain

Mail::SpamAssassin::Bayes(3pm) - support for learning classi
This is the general class used to train a learning classifier with new samples of spam and ham mail, and classify based on prior training. Prior to version 3.3.

XTextItem16(3) - draw polytext text and text drawing structu
The XDrawText16 function is similar to XDrawText except that it uses 2-byte or 16-bit characters. Both functions allow complex spacing and font shifts between c

We can't live, work or learn in freedom unless the software we use is free.