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

unbuffer(1) - unbuffer output (Commands - Linux man page)...
unbuffer disables the output buffering that occurs when program output is redirected from non-interactive programs. For example, suppose you are watching the ou

Tcl_DecrRefCount(3) - manipulate Tcl objects (Man Page).....
This man page presents an overview of Tcl objects and how they are used. It also describes generic procedures for managing Tcl objects. These procedures are use

perl5004delta(1) - what's new for perl5.004 - Linux man page
This document describes differences between the 5.003 release (as documented in Programming Perl, second edition--the Camel Book) and this one. Supported Enviro

getgrent(3) - get group file entry - Linux manual page......
The getgrent() function returns a pointer to a structure containing the broken-out fields of a record in the group database (e.g., the local group file /etc/gro

gunzip(1) - compress or expand files - Linux manual page....
Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz, while keeping t

fgetgrent(3) - get group file entry - Linux manual page.....
The fgetgrent() function returns a pointer to a structure containing the group information from the file referred to by stream. The first time it is called it r

perl581delta(1) - what is new for perl v5.8.1 (Man Page)....
This document describes differences between the 5.8.0 release and the 5.8.1 release. If you are upgrading from an earlier release such as 5.6.1, first read the

mvwaddstr(3ncurses) - add a string of characters to a curses
These functions write the (null-terminated) character string str on the given window. It is similar to calling waddch once for each character in the string. The

aria_ftdump(1) display fulltext index information (ManPage)
Use: aria_ft_dump <table_name> <index_num> -?, -h, --help Display help and exit. -c, --count Calculate per-word stats (counts and global weights). -d, --dump Du

packet(7) - packet interface on device level. (Man Page)....
Packet sockets are used to receive or send raw packets at the device driver (OSI Layer 2) level. They allow the user to implement protocol modules in user space

updwtmp(3) - append an entry to the wtmp file (Man Page)....
updwtmp.3 - updwtmp() appends the utmp structure ut to the wtmp file. logwtmp() constructs a utmp structure using line, name, host, current time and current pro

xdr_setpos(3) - library routines for external data represent
These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using

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