NAME

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

SYNTAX

int XStoreBytes(Display *_d_i_s_p_l_a_y, char *_b_y_t_e_s, int _n_b_y_t_e_s); int XStoreBuffer(Display *_d_i_s_p_l_a_y, char *_b_y_t_e_s, int _n_b_y_t_e_s, int _b_u_f_f_e_r); char *XFetchBytes(Display *_d_i_s_p_l_a_y, int *_n_b_y_t_e_s___r_e_t_u_r_n); char *XFetchBuffer(Display *_d_i_s_p_l_a_y, int *_n_b_y_t_e_s___r_e_t_u_r_n, int _b_u_f_f_e_r); int XRotateBuffers(Display *_d_i_s_p_l_a_y, int _r_o_t_a_t_e);

ARGUMENTS

or from which you want the stored data returned
_b_u_f_f_e_r Specifies the buffer in which you want to store the bytes.
_b_y_t_e_s Specifies the bytes, which are not necessarily ASCII or null-terminated.
_d_i_s_p_l_a_y Specifies the connection to the X server.
_n_b_y_t_e_s Specifies the number of bytes to be stored.
_n_b_y_t_e_s___r_e_t_u_r_n Returns the number of bytes in the buffer.
_r_o_t_a_t_e Specifies how much to rotate the cut buffers.

DESCRIPTION

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 _X_F_e_t_c_h_B_y_t_e_s.

_X_S_t_o_r_e_B_y_t_e_s can generate a _B_a_d_A_l_l_o_c 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.

_X_S_t_o_r_e_B_u_f_f_e_r can generate a _B_a_d_A_l_l_o_c error.

The _X_F_e_t_c_h_B_y_t_e_s 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 _X_F_r_e_e.

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

_X_F_e_t_c_h_B_u_f_f_e_r can generate a _B_a_d_V_a_l_u_e error.

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

_X_R_o_t_a_t_e_B_u_f_f_e_r_s can generate a _B_a_d_M_a_t_c_h error.

DIAGNOSTICS

_B_a_d_A_l_l_o_c
The server failed to allocate the requested resource or server memory.
_B_a_d_A_t_o_m
A value for an Atom argument does not name a defined Atom.
_B_a_d_M_a_t_c_h
Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.
_B_a_d_V_a_l_u_e
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.

SEE ALSO

XFree(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e