Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XStoreBytes(3X11)



XStoreBytes(3X11)                               XStoreBytes(3X11)



NAME
     XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRota-
     teBuffers - manipulate cut and paste buffers

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

     XStoreBuffer(display, bytes, nbytes, buffer)
           Display *display;
           char *bytes;
           int nbytes;
           int buffer;

     char *XFetchBytes(display, nbytes_return)
           Display *display;
           int *nbytes_return;

     char *XFetchBuffer(display, nbytes_return, buffer)
           Display *display;
           int *nbytes_return;
           int buffer;

     XRotateBuffers(display, rotate)
           Display *display;
           int rotate;

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

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

     display   Specifies the connection to the XWIN server.

     nbytes    Specifies the number of bytes to be stored.

     nbytes_return
               Returns the number of bytes in the buffer.

     rotate    Specifies how much to rotate the cut buffers.

DESCRIPTION
     Note that the cut buffer's contents need not be text, so
     zero bytes are not special.  The cut buffer's contents can
     be retrieved later by any client calling XFetchBytes.





XWIN 3.0               Last change: 9/1/88                 .ie t





XStoreBytes(3X11)                               XStoreBytes(3X11)



     XStoreBytes can generate a BadAlloc error.

     If the property for the buffer has never been created, a
     BadAtom error results.

     XStoreBuffer can generate BadAlloc and BadAtom errors.

     The XFetchBytes function returns the number of bytes in the
     nbytes_return argument, if the buffer contains data.  Other-
     wise, 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.  Note that the cut buffer does not
     necessarily contain text, so it may contain embedded zero
     bytes and may not terminate with a null byte.

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

     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.

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

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

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

     BadValue  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 gen-
               erate this error.

SEE ALSO
     Xlib - C Language X Interface






XWIN 3.0               Last change: 9/1/88                 .ie t





XStoreBytes(3X11)                               XStoreBytes(3X11)























































XWIN 3.0               Last change: 9/1/88                 .ie t






Typewritten Software • bear@typewritten.org • Edmonds, WA 98026