BSD 4_3_Tahoe development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 1 Feb 1986 05:58:01 +0000 (21:58 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 1 Feb 1986 05:58:01 +0000 (21:58 -0800)
Work on file usr/src/new/X/doc/Xlib/ch06d.t
Work on file usr/src/new/X/doc/Xlib/ch06e.t
Work on file usr/src/new/X/doc/Xlib/ch07a.t
Work on file usr/src/new/X/doc/Xlib/ch08a.t
Work on file usr/src/new/X/doc/Xlib/ch09a.t
Work on file usr/src/new/X/doc/Xlib/ch10a.t
Work on file usr/src/new/X/doc/Xlib/ch11a.t
Work on file usr/src/new/X/doc/Xlib/ch11b.t
Work on file usr/src/new/X/doc/Xlib/ch11c.t

Synthesized-from: CSRG/cd2/4.3tahoe

usr/src/new/X/doc/Xlib/ch06d.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch06e.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch07a.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch08a.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch09a.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch10a.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch11a.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch11b.t [new file with mode: 0644]
usr/src/new/X/doc/Xlib/ch11c.t [new file with mode: 0644]

diff --git a/usr/src/new/X/doc/Xlib/ch06d.t b/usr/src/new/X/doc/Xlib/ch06d.t
new file mode 100644 (file)
index 0000000..1eccc2a
--- /dev/null
@@ -0,0 +1,116 @@
+.NH 2
+Moving Bits and Pixels to and From the Screen
+.PP
+A few  programs may want to manipulate pixels that they later display on
+the screen.
+This section describes calls which will move pixels from the program to
+the window system, or from the window system to the program.
+Care must be taken to adhere to the data representation described at the
+beginning of this document to keep programs portable between machine
+architectures.
+If you always manipulate Bitmaps and XY-format Pixmaps
+in terms of 16 bit quantities, you will be quite safe.
+.FD
+.IN "Definitions" "XPixmapBitsPutXY"
+.IN "XPixmapBitsPutXY"
+.IN "Definitions" "XPixmapBitsPutZ"
+.IN "XPixmapBitsPutZ"
+.IN "Raster Op to Screen"
+XPixmapBitsPutXY (w, x, y, width, height, data, mask, func, planes)
+       short *data;
+
+XPixmapBitsPutZ (w, x, y, width, height, data, mask, func, planes)
+       Window w;
+       int x, y, width, height;
+       caddr_t data;
+       Bitmap mask;    /* which bits to modify */
+       int func;       /* display function */
+       int planes;     /* plane mask */
+.FN
+\fIXPixmapBitsPut\fP copies client-supplied bits into a window according to the
+specified display function in the format specified by the name of the 
+procedure.
+.PP
+.IN "XY-Format Pixmap"
+.IN "Z-Format Pixmap"
+See the section on data representation for the
+difference between XY and Z format pixmaps.
+.PP
+The area modified will be controlled by the \fImask\fP argument, if it is
+nonzero.
+Only the bits in the \fImask\fP will be modified on the screen.
+.IN "Icon" "Display"
+This is often useful for Icon generation.
+.FD
+.IN "Definitions" "XBitmapBitsPut"
+.IN "XBitmapBitsPut"
+XBitmapBitsPut (w, x, y, width, height, data, foreground, background, mask, func, planes)
+       Window w;
+       int x, y, width, height, foreground, background;
+       short *data;
+       Bitmap mask;    /* which bits to modify */
+       int func;       /* display function */
+       int planes;     /* plane mask */
+.FN
+Performs a function in a region of the window using a pixmap defined by a 
+bitmap and a pair of source pixels defining the \fIforeground\fP
+and \fIbackground\fP
+pixel values.
+The plane mask defines which destination bit planes are affected.
+The display function is computed on each bit plane.
+.PP
+See the section on data representation for the format of Bitmap data.
+.PP
+The area modified will be controlled by the \fImask\fP argument.
+Only the bits in the \fImask\fP will be modified on the screen.
+This is often useful for Icon generation.
+.IN "Icon" "Display"
+.FD
+.IN "Definitions" "XPixmapSave"
+.IN "XPixmapSave"
+.IN "Saving Bits from Screen"
+Pixmap XPixmapSave (w, x, y, width, height)
+       Window w;
+       int x, y, width, height;
+.FN
+\fIXPixmapSave\fP creates a Pixmap from the given portion of the window.
+The
+pixmap will contain a direct image of that portion of the screen,
+including any visible portions of subwindows or overlapping windows, so
+this routine should be used with caution.
+Its main use will probably be
+.IN "Menus"
+.IN "XUnmapTransparent"
+in conjunction with \fIXUnmapTransparent\fP, in implementing pop-up menus or
+other `temporary' windows which save the bits under them and then
+restore those bits when destroyed.
+.PP    
+The window must be mapped, and it must be true that if there were no
+overlapping windows or subwindows, the specified portion of the window
+would be fully visible on the screen.
+.PP
+The function returns the Pixmap id for the saved pixmap, or 0
+if it failed.
+.FD
+.IN "Definitions" "XPixmapGetXY"
+.IN "XPixmapGetXY"
+.IN "Definitions" "XPixmapGetZ"
+.IN "XPixmapGetZ"
+.IN "Retrieving Bits from the Screen"
+XPixmapGetXY (w, x, y, width, height, data)
+
+XPixmapGetZ (w, x, y, width, height, data)
+       Window w;
+       int x, y, width, height;
+       short *data;    /* RETURN */
+.FN
+\fIXPixmapGet\fP returns the pixmap in the specified format into the specified
+area of memory.
+.PP
+See the section on data representation to determine
+how large the area of memory must be reserved for the returned data.
+This function is intended for screen dump purposes.
+.PP
+The window must be mapped and it must be the case that if there were
+no subwindows or overlapping windows, the specified portion of the window
+would be fully visible on the screen.
diff --git a/usr/src/new/X/doc/Xlib/ch06e.t b/usr/src/new/X/doc/Xlib/ch06e.t
new file mode 100644 (file)
index 0000000..a4b677a
--- /dev/null
@@ -0,0 +1,95 @@
+.NH 2
+Storing and Freeing Bitmaps and Pixmaps
+.PP
+Bitmaps and Pixmaps are off screen resources which are used for a number of
+operations.
+These include defining cursors,
+temporarily saving some part of the screen for later,
+as tiling patterns, and as the source for certain raster operations.
+.FD
+.IN "Definitions" "XStorePixmapXY"
+.IN "Definitions" "XStorePixmapZ"
+.IN "XStorePixmapXY"
+.IN "XStorePixmapZ"
+Pixmap XStorePixmapXY (width, height, data)
+       short *data;
+
+Pixmap XStorePixmapZ (width, height, data)
+       caddr_t data;
+       int height, width, format;
+.FN
+This creates a Pixmap of the specified size and returns a Pixmap id.
+The data must be in the format specified by the subroutine name; see
+the section on data representation.
+This data is stored in the window system for later use.
+.PP
+This function returns 0 if the pixmap could not be created.
+The client should call \fIXFreePixmap\fP when finished with the pixmap.
+.FD
+.IN "Definitions" "XStoreBitmap"
+.IN "XStoreBitmap"
+Bitmap XStoreBitmap (width, height, data)
+       short *data;
+       int width, height;
+.FN    
+\fIXStoreBitmap\fP creates a bitmap for later use.
+.IN "XFreeBitmap"
+The client should call \fIXFreeBitmap\fP
+when finished with it.
+.PP
+See the section on data representation.
+.PP
+This function returns 0 if the operation fails, or the Bitmap
+if it succeeds.
+.FD
+.IN "Definitions" "XMakePixmap"
+.IN "XMakePixmap"
+Pixmap XMakePixmap (bitmap, foreground, background)
+       Bitmap bitmap;
+       int foreground, background;
+.FN
+\fIXMakePixmap\fP
+returns a Pixmap constructed from a bitmap and two pixel values.
+Wherever there is a one in the bitmap, the pixmap will have a pixel
+value of the \fIforeground\fP, and wherever there is a zero in the bitmap,
+the pixmap will have a pixel value of the \fIbackground\fP.
+If zero is specified for the \fIbitmap\fP argument, it returns a Pixmap of
+indefinite size suitable for use as a constant tiling pixmap.
+.FD
+.IN "Definitions" "XMakeTile"
+.IN "XMakeTile"
+Pixmap XMakeTile (pixel)
+       int pixel;      /* pixel value */
+.FN
+This function returns a Pixmap suitable for use as a tiling argument.
+.FD
+.IN "Definitions" "XFreePixmap"
+.IN "XFreePixmap"
+XFreePixmap (pixmap)
+       Pixmap pixmap;
+.FN    
+\fIXFreePixmap\fP frees all the storage associated with this Pixmap.
+The Pixmap should never be referenced again.
+.PP
+.FD
+.IN "Definitions" "XFreeBitmap"
+.IN "XFreeBitmap"
+XFreeBitmap (bitmap)
+       Bitmap bitmap;
+.FN
+\fIXFreeBitmap\fP frees all the storage associated with this Bitmap.
+The Bitmap should never be referenced again.
+.FD
+.IN "Definitions" "XCharBitmap"
+.IN "XCharBitmap"
+Bitmap XCharBitmap (font, char)
+       Font font;
+       int char;
+.FN
+This request creates a bitmap from the specified character of the
+specified font.
+.PP
+.IN "Resource ID's" "Freeing"
+.IN "Freeing" "Resources"
+The font can be freed immediately if no further explicit
+references to it are to be made.
diff --git a/usr/src/new/X/doc/Xlib/ch07a.t b/usr/src/new/X/doc/Xlib/ch07a.t
new file mode 100644 (file)
index 0000000..975d885
--- /dev/null
@@ -0,0 +1,123 @@
+.NH
+Cursor Definition
+.XS
+Cursors
+.XE
+.PP
+These functions allow you to load and change cursors associated with
+windows.
+Each window can have a different cursor defined for it.
+Whenever the mouse cursor is in a visible window, it will be set to the
+cursor defined for that window.
+If no cursor was defined for that window, the cursor
+will be the that defined for the parent window.
+.PP
+From X's perspective, a cursor consists of a cursor shape, mask, colors
+for the shape and mask, `hot spot', and logical function.
+The cursor bitmap determines the shape of the cursor.
+The mask bitmap determines the bits which will be modified by the cursor.
+The colors determine the colors of the shape and mask.
+The hot spot defines the point on the cursor which will be reported
+when a mouse event occurs.
+The logical function determines the boolean function applied to the cursor.
+There may be (and probably are) limitations imposed by the hardware on
+cursors as to size, whether a mask is implemented, and logical function.
+.IN "XQueryCursorShape"
+\fIXQueryCursorShape\fP can be used to find out what sizes are possible.
+In the longer run, it is intended most ``standard'' cursors will
+be stored as a special font.
+.FD
+.IN "Definitions" "XStoreCursor"
+.IN "XStoreCursor"
+.IN "Cursor Definition"
+Cursor XStoreCursor(cursor, mask, xoff, yoff, foreground, background, func)
+       Bitmap cursor, mask;
+       int xoff, yoff;
+       int foreground, background;
+       int func;
+.FN
+.IN "Definitions" "Cursor"
+This function stores a cursor in the window system.
+The cursor is defined to be a two plane cursor
+and therefore takes two bitmaps, the \fIcursor\fP, and the \fImask\fP.
+The color of the mask and cursor are defined by the pixel values
+\fIforeground\fP and \fIbackground\fP.
+The logical function used is specified by the \fIfunc\fP argument.
+If the \fImask\fP is zero, all pixels of the cursor are displayed.
+The mask bitmap, if present, must be the same size as the
+cursor bitmap.
+The offsets define the point that actually corresponds to the mouse position;
+this must be a point in the cursor bitmap.
+The function is almost always GXcopy.
+.PP
+.IN "Resource ID's" "Freeing"
+.IN "Freeing" "Resources"
+The bitmaps can be freed immediately if no further explicit
+references to them are to be made.
+.LP
+.IN "Cursor" "Limitations"
+The components of the cursor may be transformed arbitrarily to meet hardware
+limitations.
+.FD
+.IN "Limitations" "Cursor"
+.IN "Definitions" "XQueryCursorShape"
+.IN "XQueryCursorShape"
+XQueryCursorShape (width, height, rwidth, rheight)
+       int width, height;
+       int *rwidth, *rheight;  /* RETURN */
+.FN
+Some displays allows larger cursors than other displays.
+This call provides a way to find out what size cursors are actually
+possible on the display.
+This function returns the `closest' shape actually supported by the
+display hardware a cursor.
+For a cursor shape,
+.IN "XStoreCursor"
+it returns a Bitmap shape acceptable for \fIXStoreCursor\fP.
+Applications should be prepared to use smaller cursors on displays which
+cannot support large ones.
+.FD
+.IN "Definitions" "XFreeCursor"
+.IN "XFreeCursor"
+XFreeCursor(cursor)
+       Cursor cursor;
+.FN
+The specified cursor is destroyed.
+It should not be referred to again or an error will be generated.
+.FD
+.IN "Definitions" "XCreateCursor"
+.IN "XCreateCursor"
+Cursor XCreateCursor(width, height, cursor, mask, xoff, yoff, foreground, background, func)
+       int width, height;
+       short *cursor, *mask;
+       int xoff, yoff;
+       int foreground, background;
+       int func;
+.FN
+Creates a cursor out of its component parts from data in the 
+calling program.
+The \fIcursor\fP bits and \fImask\fP bits should be in bitmap format.
+This function is used if all components of a cursor are in the client
+program, and saves round trip times in defining the cursor.
+.FD
+.IN "Definitions" "XDefineCursor"
+.IN "XDefineCursor"
+.IN "Window" "Define Cursor"
+XDefineCursor (w, cursor)
+       Window w;
+       Cursor cursor;
+.FN
+If a cursor is specified, it will be used when the mouse is in the window.
+.FD
+.IN "Definitions" "XUndefineCursor"
+.IN "XUndefineCursor"
+.IN "Window" "Undefine Cursor"
+XUndefineCursor (w)
+       Window w;
+.FN
+\fIXUndefineCursor\fP undoes the effect of a previous \fIXDefineCursor\fP for
+this window.
+When the mouse is in the window, the parent's cursor will
+now be used.
+.PP
+On the root window, with no cursor specified, the default cursor is restored.
diff --git a/usr/src/new/X/doc/Xlib/ch08a.t b/usr/src/new/X/doc/Xlib/ch08a.t
new file mode 100644 (file)
index 0000000..80b9d1a
--- /dev/null
@@ -0,0 +1,217 @@
+.NH
+Color Map Manipulation
+.XS
+Color Map Manipulation
+.XE
+.PP
+The following commands manipulate the representation of color on the
+screen.
+For each possible value a pixel may take on a display
+(for example, if a display is 4 bits deep, pixel values 0 through 15 are
+defined), there is a color cell in the color map.
+The color map is the collection of the color cells.
+A color cell consists of a triple of red, green and blue.
+As each pixel is read out of display memory, its value
+is taken and looked up in the color map.
+The values of the cell determine what color is displayed on the screen.
+On a multiplane  display with a black and white monitor (greyscale, but
+not color), these values may be combined or not combined to determine the
+brightness on the screen.
+.PP
+Note that the introduction of color changes the view a programmer should
+take when dealing with a bitmap display.
+For example, when printing text, you
+write in a `color' (pixel value) rather than setting or clearing bits.
+Hardware will impose limits (number of significant
+bits, for example) on these values.
+Typically, one allocates particular pixel values or sets of
+values.
+If read only, the pixel values may be shared among multiple applications.
+If read/write, they are exclusively owned by the program,
+and the color cell associated with the pixel value may be changed at will.
+.PP
+The functions in this section operate on a Color structure:
+.DS
+.TA .5i 2.5i
+.ta .5i 2.5i
+typedef struct _Color {
+       int pixel;      /* pixel value */
+       short red, green, blue;
+} Color;
+.DE
+.IN "Data Structures" "Color"
+.PP
+The red, green and blue values are scaled between 0 and 65535; that is
+`on full' in a color is a value of 65535 independent of the number
+of bit planes of the display.
+Half brightness in a color would be a value of 32767, and off of 0.
+This representation gives uniform results for color values across
+displays with different number of bit planes.
+.IN "Color"
+.LP
+There are two ways of allocating color cells; explicitly as read only
+.IN "XGetHardwareColor"
+entries by pixel value (\fIXGetHardwareColor\fP) or read/write,
+where you can allocate N colors and planes simultaneously.
+.IN "Read/Write Color Map Cells"
+Note that read write cells you allocate do not have defined colors until
+.IN "XStoreColors"
+set with \fIXStoreColors\fP.
+.FD
+.IN "Definitions" "XGetHardwareColor"
+.IN "XGetHardwareColor"
+.IN "Color Allocation"
+Status XGetHardwareColor (def)
+       Color *def;     /* RETURN */
+.FN
+When passed a color definition structure \fIdef\fP,
+with red, green and blue values set,
+fills in the pixel value with the closest color provided by the hardware.
+.IN "Pixel Values"
+The corresponding color map cell is read-only.
+It returns 0 if there were some problem (typically lack of resources),
+or non-zero if it succeeded.
+.PP
+.IN "Color Map"
+.IN "Color Allocation"
+.IN "Allocation" "Color Map"
+.IN "Read-only Color Map Cells"
+Read-only color map cells are shared among clients.
+When the last client deallocates a shared cell, it is deallocated.
+.EQ
+delim $$
+.EN
+.FD
+.IN "Definitions" "XGetColorCells"
+.IN "XGetColorCells"
+.IN "Color Allocation"
+Status XGetColorCells (contig, ncolors, nplanes, planes, pixels)
+       int contig;             /* 1 if the planes must be contiguous, 0 otherwise */
+       int ncolors;
+       int nplanes;
+       int *planes;    /* RETURN */
+       int pixels[ncolors];    /* RETURN pixel values */
+.FN
+Allocates $N * 2 sup P$ color map cells, where N (\fIncolors\fP)
+is the number of colors
+and P (\fInplanes\fP) is the number of planes specified.
+It returns  a plane mask, which will be contiguous if requested.
+Additional pixel values are obtained by or'ing in
+one or more bits from the plane mask.
+The initial colors for all of these cells is undefined.
+.EQ
+delim off
+.EN
+.PP
+If zero colors are requested,
+then the request allocates all cells with a pixel value
+having at least one non-zero bit in the plane mask.
+At most one such request will succeed.
+This will typically be your favorite window manager.
+Allocations are automatically deallocated when clients exit.
+.FD
+.IN "Definitions" "XGetColor"
+.IN "XGetColor"
+.IN "Color" "Naming"
+Status XGetColor (colorname, hard_def, exact_def)
+       char *colorname;
+       Color *hard_def;        /* RETURN */
+       Color *exact_def;       /* RETURN */
+.FN
+Applications often need to know what the correct value of "red" may be
+on display by name to provide a good user interface.
+Given a text string (\fIcolorname\fP, for example ``red''),
+returns the Color structure in the supplied structure.
+It uses a database on the server to resolve the color by name
+from the file \fI/usr/lib/rgb\fP.
+.IN "Color" "Data Base"
+.IN "File" "/usr/lib/rgb.txt"
+A text representation of this file can be found in \fI/usr/lib/rgb.txt\fP.
+It returns 0 if there were some problem, or non-zero if
+it succeeded.
+.PP
+Both the `exact' data base definition, and 
+the `closest' color supported by the hardware are returned.
+.FD
+.IN "Definitions" "XFreeColors"
+.IN "XFreeColors"
+XFreeColors (pixels, npixels, planes)
+       int pixels[];   /* pixel values */
+       int npixels;
+.FN
+This request frees color map cells.  
+The cells represented by pixels whose values
+are in the array are freed.
+If any planes are specified, they are freed.
+.FD
+.IN "Color" "Setting Cells"
+.IN "Definitions" "XStoreColors"
+.IN "XStoreColors"
+XStoreColors (ncolors, defs)
+       int ncolors;    /* number of color definitions */
+       Color *defs;
+.FN
+Changes the colors of \fIncolors\fP pixels to the closest available hardware colors.
+Note that these must be read/write cells.
+.FD
+.IN "Definitions" "XStoreColor"
+.IN "XStoreColor"
+XStoreColor (def)
+       Color *def;     /* RETURN */
+.FN
+Sets the color of the specified pixel value to the closest available color.
+Note that it must be a read/write cell.
+.FD
+.IN "Definitions" "XQueryColor"
+.IN "XQueryColor"
+Status XQueryColor (def)
+       Color *def;     /* RETURN */
+.FN
+For the specified pixel value in the definition \fIdef\fP,
+returns the color values for
+a pixel value.
+It returns zero if there were some problem, or non-zero if
+it succeeded.
+.FD
+.IN "Color" "Getting Values"
+.IN "Definitions" "XQueryColors"
+.IN "XQueryColors"
+XQueryColors (defs, ncolors)
+       Color defs[];
+       int ncolors;
+.FN
+For the specified pixel value in each definition,
+this routine returns the color values for each pixel value.
+.FD
+.IN "Color" "Parsing Command Lines"
+.IN "Definitions" "XParseColor"
+.IN "XParseColor"
+Status XParseColor (spec, def)
+       char *spec;
+       Color *def;     /* RETURN */
+.FN
+This subroutine is provided to make a standard user interface to
+color simple.
+Takes a string specification of a color, typically from a command line
+or \fIXGetDefault\fP option, and returns the corresponding red, green, and blue
+values,
+suitable for a subsequent call to \fIXGetHardwareColor\fP or
+\fIXStoreColor\fP.
+The color can be specified either as a color name (as in \fIXGetColor\fP), or
+as an initial sharp sign character following by a numeric specification,
+in one of the following formats:
+.nf
+.TA .5i 3i
+.ta .5i 3i
+       #RGB    (4 bits each)
+       #RRGGBB (8 bits each)
+       #RRRGGGBBB      (12 bits each)
+       #RRRRGGGGBBBB   (16 bits each)
+.fi
+where R, G, and B represent single hexadecimal digits (upper or lower case).
+When fewer than 16 bits each are specified, they represent the most significant
+bits of the value.  For example, #3a7 is the same as #3000a0007000.
+.PP
+This routine will fail if the initial character is a sharp sign but the string
+otherwise fails to fit of the above formats, or if the initial character is
+not a sharp sign and the named color does not exist in the server's database.
diff --git a/usr/src/new/X/doc/Xlib/ch09a.t b/usr/src/new/X/doc/Xlib/ch09a.t
new file mode 100644 (file)
index 0000000..7998c22
--- /dev/null
@@ -0,0 +1,165 @@
+.NH
+Fonts and Information about Fonts
+.XS
+Fonts and Information about Fonts
+.XE
+.PP
+.IN "Font Loading"
+WARNING:  This section WILL change in major ways soon,
+to provide a more sophisticated view of fonts,
+and lift limitations in the current font format.
+Please plan accordingly.
+.PP
+The X server loads fonts whenever a program requests a new font.
+Fonts are unloaded when the last program using the font exits or
+closes it.
+There is never more than one copy of a font stored in the server at
+one time.
+.PP
+There are several levels one can deal with fonts.
+.IN "XOpenFont"
+.IN "XCloseFont"
+You can use the general font routines \fIXOpenFont\fP and \fIXCloseFont\fP,
+or only get the information you want explicitly.
+.IN "FontInfo"
+.FD
+.IN "Definitions" "XOpenFont"
+.IN "XOpenFont"
+FontInfo *XOpenFont(name)
+       char *name;
+.FN
+.IN "XGetFont"
+.IN "XQueryFont"
+.IN "XFontWidths"
+This function does a \fIXGetFont\fP, 
+\fIXQueryFont\fP and \fIXFontWidths\fP in one operation,
+creating an instance of the font structure.
+It allocates the memory to store the font information in.
+It returns NULL if it could not succeed.
+.FD
+.IN "Definitions" "XCloseFont"
+.IN "XCloseFont"
+XCloseFont(info)
+       FontInfo *info;
+.FN
+This function closes off any use of a font, and deallocates the storage
+associated with the \fIFontInfo\fP structure.
+.IN "XOpenFont"
+WARNING: it is a gross error to close a font not opened with \fIXOpenFont\fP,
+since you may corrupt the memory pool.
+.FD
+.IN "Definitions" "XGetFont"
+.IN "XGetFont"
+Font XGetFont (name)
+       char *name;     /* null-terminated string */
+.FN
+\fIXGetFont\fP loads a font of the specified \fIname\fP.
+A font id is returned, or 0 if it could not succeed.
+.IN "XFreeFont"
+The client should call \fIXFreeFont\fP when it is no longer needed.
+.FD
+.IN "Definitions" "XQueryFont"
+.IN "XQueryFont"
+Status XQueryFont (font, info)
+       Font font;
+       FontInfo *info; /* RETURN */
+.FN
+\fIXQueryFont\fP gets various facts about a font.  It fills in the
+client-passed \fIFontInfo\fP, which is defined as follows:
+.sp
+.DS
+.TA .5i 2.5i
+.ta .5i 2.5i
+typedef struct _FontInfo {
+       Font id;        /* font id for this font */
+       short height;   /* constant for all characters in font */
+       short width;    /* "average" width of characters in font */
+       short baseline; /* baseline of characters */
+       short fixedwidth;       /* 0 or 1 */
+       unsigned char firstchar, lastchar;      /* first & last characters in font */
+       short *widths;  /* pointer to font width array */
+} FontInfo;
+.DE
+.IN "Data Structures" "FontInfo"
+.IN "FontInfo"
+The \fIbaseline\fP specifies where in pixels from the bottom of the font the
+characters without descenders begin.
+.PP
+A font is fixed width if all characters in the range of legal characters
+are the same width.
+.PP
+It does NOT get the width array, but the space is in the
+data structure for a pointer to the array.
+.FD
+.IN "Definitions" "XFreeFont"
+.IN "XFreeFont"
+XFreeFont (font)
+       Font font;
+.FN
+\fIXFreeFont\fP tells the server that this font is no longer needed. 
+The font may be unloaded on the server if this is the last
+reference to the font.
+In any case, the
+font should never again be referenced.
+.FD
+.IN "Definitions" "XCharWidths"
+.IN "XCharWidths"
+Status XCharWidths (chars, len, font, widths)
+       char *chars;    /* NOT necessarily null-terminated */
+       int len;        /* number of characters */
+       Font font;
+       short *widths;  /* RETURN widths [0..len-1] */
+.FN
+\fIXCharWidths\fP determines the width, in the specified font, of each
+character in a string.
+For each element of the character array, the width of
+that character is stored in the corresponding element of the \fIwidths\fP
+array (i.e. widths[i] is set to the width of the character chars[i].)
+.FD
+.IN "Definitions" "XFontWidths"
+.IN "XFontWidths"
+short *XFontWidths (font)
+       Font font;
+.FN
+\fIXFontWidths\fP allocates and returns a pointer to an array containing the
+width of every character defined in the font.   
+It is only possible to get the widths of a variable width font. 
+If \fIXFontWidths\fP returns NULL, an error has occurred and no
+array is allocated.
+The client must free this array when he no longer
+needs it.
+.PP
+.IN "XFontWidths"
+.IN "XQueryFont"
+\fIXFontWidths\fP should be used in conjunction with \fIXQueryFont\fP,
+which returns
+(among other data) the font's \fIfirstchar\fP and \fIlastchar\fP.
+The length of the array
+.IN "XFontWidths"
+returned by \fIXFontWidths\fP will always be equal to (lastchar-firstchar+1).
+In the array, widths[i] will be set to the width of character (firstchar+i).
+.FD
+.IN "XQueryWidth"
+.IN "Definitions" "XQueryFont"
+int XQueryWidth(str, font)
+       char *str;      /* null-terminated string */
+       Font font;
+.FN
+\fIXQueryWidth\fP returns the width in pixels of a null-terminated string in
+the specified font.
+It queries the server for the width computation.
+.FD
+.IN "XQueryWidth"
+.IN "Definitions" "XQueryFont"
+int XStringWidth(string, info, charpad, spacepad)
+       char *str;
+       FontInfo *info;
+       int charpad, spacepad;
+.FN
+This function computes the width of the string given a complete
+.IN "FontInfo"
+\fIFontInfo\fP structure.
+\fICharpad\fP and \fIspacepad\fP are added to the width on each
+character and space defined in the string.
+It does not reference the window system server, as the information is
+all available locally in this case.
diff --git a/usr/src/new/X/doc/Xlib/ch10a.t b/usr/src/new/X/doc/Xlib/ch10a.t
new file mode 100644 (file)
index 0000000..1555b22
--- /dev/null
@@ -0,0 +1,110 @@
+.NH
+Text Operations
+.XS
+Text Operations
+.XE
+.PP
+.IN "Definitions" "Font"
+.IN "Fonts"
+All of the subroutines in this section make use of fonts.
+A font is a
+graphical description of a set of characters, used to increase efficiency
+whenever a set of small, similar-sized patterns are repeatedly used.
+.PP
+While most fonts contain descriptions of alphanumeric characters, fonts
+and the subroutines in this section are not restricted to that purpose
+.IN "XText"
+.IN "XTextWidth"
+(despite suggestive subroutine names such as \fIXText\fP and \fIXTextWidth\fP).
+.FD
+.IN "Definitions" "XText"
+.IN "XText"
+.IN "XTextPad"
+.IN "Definitions" "XTextPad"
+XText (w, x, y, str, len, font, foreground, background)
+
+XTextPad (w, x, y, str, len, font, charpad, spacepad, foreground, background, func, planes)
+       Window w;
+       int x, y;
+       int len;        /* string length */
+       char *str;      /* NOT necessarily null-terminated */
+       Font font;
+       int charpad;
+       int spacepad;
+       int foreground, background;
+       int func;       /* display function */
+       int planes;
+.FN
+\fIXTextPad\fP draws text into a window,
+using the specified \fIfont\fP and display function
+\fIfunc\fP.
+It modifies the specified planes of the display memory,
+painting in the foreground
+color.
+The number of characters to be drawn must be specified in the
+\fIlen\fP parameter;
+\fIXText\fP does NOT assume that \fIstr\fP is null-terminated.
+.PP
+The \fIx\fP and \fIy\fP
+coordinates represent the upper left corner of the first
+character.
+.PP
+For each character drawn, a rectangular bitmap is transferred onto the
+display.
+\fIBackground\fP and \fIforeground\fP pixels will be set to the specified
+pixel values (colors). 
+.PP
+.IN "Character Padding"
+.IN "Space Padding"
+.IN "Padding" "Space"
+.IN "Padding" "Character"
+The character padding \fIcharpad\fP defines how much space will be
+left between each character.
+The space padding \fIspacepad\fP defines how much additional padding
+will occur when a space character is painted.
+Padded pixels are NOT modified.
+All pixels in a character cell are modified to either the \fIforeground\fP or
+\fIbackground\fP pixel value.
+.PP
+.IN "XText"
+\fIXText\fP defaults the function to \fIGXcopy\fP, modifies all planes,
+and does no padding.
+.FD
+.IN "Definitions" "XTextMask"
+.IN "XTextMask"
+.IN "Definitions" "XTextMaskPad"
+.IN "XTextMaskPad"
+XTextMask (w, x, y, str, len, font, foreground )
+
+XTextMaskPad (w, x, y, str, len, font, charpad, spacepad, foreground, func, planes)
+       Window w;
+       int x, y;
+       int len;        /* string length */
+       char *str;      /* NOT necessarily null-terminated */
+       Font font;
+       int charpad, spacepad;
+       int foreground;
+       int func;       /* display function */
+       int planes;     /* plane masks */
+.FN    
+\fIXTextMaskPad\fP draws text into a window,
+using the specified \fIfont\fP and display function
+\fIfunc\fP.
+It modifies the specified \fIplanes\fP of the display,
+only modifying bits specified by the font.
+.IN "Mask Font"
+(The font bits are used as a ``mask'', so only bits set to one in the font
+cause pixels to be modified on the display).
+The number of characters to be drawn must be specified in the
+\fIlen\fP parameter;
+these calls do NOT assume that \fIstr\fP is null-terminated.
+.PP
+The \fIx\fP and \fIy\fP coordinates represent the upper left corner of the first
+character.
+.PP
+\fICharpad\fP and \fIspacepad\fP can be used for intercharacter and space padding.
+Padded pixels are NOT modified.
+.PP 
+.IN XTextMask
+\fIXTextMask\fP defaults the function to \fIGXcopy\fP, modifies all planes,
+and does not do padding.
diff --git a/usr/src/new/X/doc/Xlib/ch11a.t b/usr/src/new/X/doc/Xlib/ch11a.t
new file mode 100644 (file)
index 0000000..5a1ae1d
--- /dev/null
@@ -0,0 +1,114 @@
+.NH
+Other X Server Functions
+.XS
+Other X Server Functions
+.XE
+.NH 2
+Access Control
+.PP
+.IN "Access Control"
+.IN "Internet Addresses"
+.IN "DECnet Addresses"
+.IN "Authentication"
+X does not provide any protection on a per-window basis.
+If you find out the resource id of a resource, you can manipulate it.
+To provide some minimal level of protection, however,
+connections are only permitted from machines you trust.
+This is adequate on single user workstations, but obviously
+breaks down on timesharing machines.
+In the long run, it is expected that X will use a real network
+authentication server, so we have only minimal facilities for the
+time being.
+Both DECnet and TCP domains are possible to use.
+.PP
+.IN "Default Protection"
+On a VAX, the initial set of hosts allowed to open connections consists
+.IN "File" "/etc/X?.hosts"
+of:
+.sp
+   \(bu the host the window system is running on
+   \(bu each host listed in \fI/etc/X?.hosts\fP, where `?' is the number of the
+display.
+.sp
+This file should consist of host names separated by newlines.
+DECnet nodes must terminate in ``::'' to distinguish them from internet hosts.
+.FD
+.IN "Definitions" "XAddHost"
+.IN "XAddHost"
+.IN "File" "<sys/socket.h>"
+#include <sys/socket.h>
+XAddHost (host)
+       struct in_addr *host;   /* network address */
+.FN
+Add the specified host to the list of hosts allowed to open connections
+to this display.
+The display hardware must be on the same host as the program issuing the
+command.
+.FD
+.IN "Definitions" "XAddNode"
+.IN "XAddNode"
+.IN "File" "<netdnet/dn.h>"
+#include <netdnet/dn.h>
+XAddNode (node)
+       struct dn_naddr *node;  /* network address */
+.FN
+Add the specified DECnet node to the list of nodes allowed to open connections
+to this display.
+The display hardware must be on the same host as the program issuing the
+command.
+.FD
+.IN "Definitions" "XRemoveHost"
+.IN "XRemoveHost"
+.IN "File" "<sys/socket.h>"
+#include <sys/socket.h>
+XRemoveHost (host)
+       struct in_addr *host;   /* network address */
+.FN
+Remove the specified host from the list of hosts allowed to open
+connections to the display.  
+The display hardware must be on the same host as the
+client process.
+If you remove your machine from the access list, no new connections
+can be made.
+There is no way back from this call short of logout!
+.FD
+.IN "Definitions" "XRemoveNode"
+.IN "XRemoveNode"
+.IN "File" "<netdnet/dn.h>"
+#include <netdnet/dn.h>
+XRemoveNode (node)
+       struct dn_naddr *node;  /* network address */
+.FN
+Remove the specified DECnet node from the list of nodes allowed to open
+connections to the display.  
+The display hardware must be on the same node as the
+client process.
+If you remove your machine from the access list, no new connections
+can be made.
+There is no way back from this call short of logout!
+.FD
+.IN "Definitions" "XGetHosts"
+.IN "XGetHosts"
+.IN "File" "<sys/socket.h>"
+#include <sys/socket.h>
+struct in_addr *XGetHosts (nhosts)
+       int *nhosts;    /* RETURN */
+.FN
+Returns the current list of hosts allowed to open connections.
+This allows a program to find out what machines can make connections.
+Space is allocated and function returns a pointer to an array of hosts in the list.
+The number of hosts are returned in the \fInhosts\fP argument.
+This memory should be freed when no longer in use.
+.FD
+.IN "Definitions" "XGetNodes"
+.IN "XGetNodes"
+.IN "File" "<netdnet/dn.h>"
+#include <netdnet/dn.h>
+struct dn_naddr *XGetNodes (nnodes)
+       int *nnodes;    /* RETURN */
+.FN
+Returns the current list of DECnet nodes allowed to open connections.
+This allows a program to find out what machines can make connections.
+Space is allocated and function returns a pointer to an array of hosts in the list.
+The number of nodes are returned in the \fInodes\fP argument.
+This memory should be freed when no longer in use.
diff --git a/usr/src/new/X/doc/Xlib/ch11b.t b/usr/src/new/X/doc/Xlib/ch11b.t
new file mode 100644 (file)
index 0000000..08592a9
--- /dev/null
@@ -0,0 +1,244 @@
+.NH 2
+User Preference Subroutines
+.PP
+.IN "Keyboard" "Bell Volume"
+.IN "Keyboard" "Keyclick Volume"
+.IN "Mouse" "Programming"
+In this category are the user preference options of bell, keyclick,
+mouse behavior, etc.
+The default values for many of these functions are determined by
+.IN "File" "/etc/ttys"
+command line arguments to the X server, typically set in \fI/etc/ttys\fP.
+Not all implementations will actually be able to control all of these
+parameters.
+.FD
+.IN "Definitions" "XMouseControl"
+.IN "XMouseControl"
+.IN "Mouse" "Behavior"
+XMouseControl (acceleration, threshold)
+       int acceleration, threshold;
+.FN
+Defines how the mouse moves.
+The \fIacceleration\fP is a multiplier for movement.
+For example,
+specifying 3 means the cursor moves three times as fast as the mouse.
+Acceleration only takes effect if the mouse moves more than
+threshold pixels at once,
+and only applies to the amount beyond the \fIthreshold\fP.
+.FD
+.IN "Definitions" "XFeepControl"
+.IN "XFeepControl"
+XFeepControl (volume)
+       int volume;     /* 0 to 7 */
+.FN
+Defines the base volume for \fIXFeep\fP request.
+The volume is in the range
+0 to 7, with 7 the loudest.
+.FD
+.IN "Definitions" "XFeep"
+.IN "XFeep"
+XFeep (volume)
+       int volume;     /* -7 to 7 */
+.FN    
+\fIXFeep\fP rings a bell on the display. 
+The
+sound \fIvolume\fP is in the range -7 to 7
+and is added to the base \fIvolume\fP defined by \fIXFeepControl\fP.
+.FD
+.IN "Definitions" "XKeyClickControl"
+.IN "XKeyClickControl"
+XKeyClickControl (volume)
+       int volume;     /* 0 to 8 */
+.FN
+\fIXKeyClick\fP controls the volume of the `click' that the keyboard makes
+when a key is pressed. 
+0 is `off', 8 is the loudest \fIvolume\fP.
+.FD
+.IN "Keyboard" "Auto-Repeat"
+.IN "Definitions" "XAutoRepeatOn"
+.IN "Definitions" "XAutoRepeatOff"
+.IN "XAutoRepeatOn"
+.IN "XAutoRepeatOff"
+XAutoRepeatOn ()
+
+XAutoRepeatOff ()
+.FN
+\fIXAutoRepeatOn\fP turns the keyboard's auto-repeat on.
+\fIXAutoRepeatOff\fP turns the keyboard's auto-repeat off.
+.FD
+.IN "Keyboard" "Lock Key"
+.IN "Definitions" "XLockUpDown"
+.IN "XLockUpDown"
+.IN "Definitions" "XLockToggle"
+.IN "XLockToggle"
+XLockUpDown ()
+
+XLockToggle ()
+.FN
+Some people hate the behavior of the shift lock key.
+These subroutines change the mode of the Shift LOCK key on the keyboard.
+When the keyboard is in \fILockUpDown\fP mode,
+KeyPressed and KeyReleased events are sent as for any other key, and the
+ShiftLockMask sent in events gives the current state of the key.
+.IN "KeyPressed Events"
+In \fILockToggle\fP mode, 
+\fIKeyPressed\fP and \fIKeyReleased\fP events are never sent
+for the Lock key,
+and the state of the \fIShiftLockMask\fP sent in events is toggled on every
+press of the LOCK key.
+.FD
+.IN "Screen Saver"
+.IN "Definitions" "XScreenSaver"
+.IN "XScreenSaver"
+XScreenSaver (savetimeout, patterntimeout, video)
+       int savetimeout, patterntimeout;        /* in minutes */
+       int video;
+.FN
+If the server remains idle for the specified number of minutes,
+the server will blank the screen, usually with a pattern that changes at the
+specified rate.
+The screen state will typically be restored when the next request or input
+event occurs, unless the server was out of memory, in which case exposure
+events to all mapped windows are generated.
+If \fIvideo\fP is non-zero, the server will attempt to disable the video to
+implement the screen saver, rather than change to the background
+grey.
+.FD
+.IN "XGetDefault"
+.IN "Definitions" "XGetDefault"
+.IN "Default Options"
+char *XGetDefault(program, name)
+       char *program;  /* usually name of program */
+       char *name;
+.FN
+The number of options that a program may need can be very large in the X
+environment.
+(Fonts of various sorts, colors of characters, mouse, background, text,
+cursor, etc.)
+If only command line options could be used to specify each of these,
+things quickly become unmanageable as your tastes in windows will often
+be drastically different from someone else's.
+.PP
+\fIXGetDefault\fP
+makes it easy to find out what the user wants for his favorite
+font, colors, etc.
+Its use is highly encouraged.
+.PP
+\fIXGetDefault\fP will return NULL if no option of the specified name exists for
+the program.
+Defaults are read out of a file called
+.IN "File" "$HOME/.Xdefaults"
+\fI~/.Xdefaults\fP in the user's home directory.
+See the X manual page
+for details of its format.
+.PP
+The strings returned by \fIXGetDefault\fP are owned by Xlib and should not
+be modified or freed by the client.
+.FD
+.IN "XParseGeometry"
+.IN "Definitions" "XParseGeometry"
+.IN "Window" "Initial Location"
+int XParseGeometry (string, x, y, width, height)
+       char *string;
+       int *x, *y, *width, *height;    /* RETURN */
+.FN
+By convention,
+X applications use a standard string to indicate window size and placement.
+This subroutine makes it easy to conform to this standard.
+It is not normally used by user programs, which typically use
+.IN "XCreate"
+.IN "XCreateTerm"
+the \fIXCreate\fP or \fIXCreateTerm\fP subroutines to create the window.
+This subroutine is used to parse strings of form 
+\fI=<width>x<height>{+-}<xoffset>{+-}<yoffset>\fP where
+width, height, xoffset and yoffset are returned in the \fIwidth\fP, 
+\fIheight\fP, \fIx\fP and \fIy\fP arguments.
+It returns a bitmask that indicates which of the four values were
+actually found in the string, and whether the x and y values
+are negative (remember, -0 is not equal +0 in this system!).
+For each value found, the corresponding argument is updated;
+for each value not found, the argument is left unchanged.
+The bits are \fIXValue\fP, \fIYValue\fP, \fIWidthValue\fP, \fIHeightValue\fP,
+\fIXNegative\fP, \fIYNegative\fP, and are defined in \fI<X/Xlib.h>\fP.
+.IN "File" "<X/Xlib.h>
+They will be set whenever one of the values are defined or signs
+are set.
+.FD
+.IN "XGeometry"
+.IN "Definitions" "Geometry"
+.IN "Window" "Initial Location"
+.IN "Window" "Computing Placement"
+int XGeometry (position, default, bwidth, fwidth, fheight, xadd, yadd, x, y, width, height)
+       char *position, default;        /* geometry specs */
+       int bwidth;     /* border width */
+       int fwidth, fheight;    /* size of units of width and height spec */
+       int xadd, yadd; /* any additional interior space */
+       int *x, *y, *width, *height;    /* RETURN */
+.FN
+This routine does all the work required to determine the placement of
+a window using the current format to position windows.
+Given a fully qualified default geometry specification and a (possibly)
+incompletely specified geometry specification, it will return a bitmask
+value as defined above in the \fIXParseGeometry\fP call.
+It is not normally used by user programs, which typically use
+.IN "XCreate"
+.IN "XCreateTerm"
+the \fIXCreate\fP or \fIXCreateTerm\fP subroutines to create the window.
+The position the window should be placed will be returned in the
+x, y, width, and height arguments.
+If either the function returns the \fIXValue\fP or \fIYValue\fP flag,
+you should
+place the window at the requested position.
+The border width (\fIbwidth\fP),
+size of the increments \fIfwidth\fP and \fIfheight\fP
+(typically font width and height),
+and any additional interior space (\fIxadd\fP and \fIyadd\fP)
+are passed in to make it easy to compute the resulting size.
+.FD
+.IN "XReadBitmapFile"
+.IN "Definitions" "Bitmap file format"
+.IN "Definitions" "XReadBitmapFile"
+Status XReadBitmapFile (filename, width, height, data, x_hot, y_hot)
+       char *filename;
+       int *width, *height;  /* RETURN; must be non-NULL */
+       short **data;         /* RETURN */
+       int *x_hot, *y_hot;   /* RETURN; may be NULL */
+.FN
+\fIXReadBitmapFile\fP reads a file produced by the
+.I bitmap(1)
+program.   The format of that file is described in the man page for 
+that program.
+.PP
+If the cannot be opened, \fIXReadBitmapFile\fP returns a Status of 0.  If the 
+file can be opened but is not syntactically valid, the procedure returns
+a negative Status.  If the file is readable and valid, it returns a Status of 1.
+.PP
+\fIXReadBitmapFile\fP assigns the bitmap's \fIheight\fP and \fIwidth\fP,
+as read from the file,
+to the caller's variables 
+\fIwidth\fP
+and 
+\fIheight\fP.
+It then allocates an appropriate
+amount of storage, reads the bitmap data from the file, and assigns to the
+caller's variable 
+.I data.
+The caller must free 
+.I data
+when he is done with it.
+.PP
+If
+.I x_hot
+and 
+.I y_hot
+are non-NULL, then \fIXReadBitmapFile\fP will set 
+.I *x_hot
+and 
+.I *y_hot
+to the value of the hot spot as defined in the file.  If no hot spot is
+defined, \fIXReadBitmapFile\fP will set
+.I *x_hot
+and 
+.I *y_hot
+to -1.
+
diff --git a/usr/src/new/X/doc/Xlib/ch11c.t b/usr/src/new/X/doc/Xlib/ch11c.t
new file mode 100644 (file)
index 0000000..db61d36
--- /dev/null
@@ -0,0 +1,73 @@
+.NH 2
+Cut Buffer Operations
+.PP
+.IN "Cut Buffers"
+.IN "Paste Buffers"
+X provides areas of memory in which bytes can be stored for implementing
+cut and paste between windows.
+It is up to applications to agree what the representation of the
+data in the buffers are.
+The data is most often ascii text.
+Eight such buffers are provided, which can be accessed as a ring,
+or as explicit buffers, numbered 0 through 7.
+.FD
+.IN "Definitions" "XStoreBytes"
+.IN "XStoreBytes"
+XStoreBytes (bytes, length)
+       char *bytes;    /* NOT necessarily ascii or null-terminated */
+       int length;     /* number of bytes */
+.FN
+\fIXStoreBytes\fP stores an arbitrary string of \fIbytes\fP
+in cut buffer number 0.
+The cut buffer's contents may be retrieved later by
+.IN "XFetchBytes"
+any client calling \fIXFetchBytes\fP.
+.PP
+The number of bytes to be stored is given in the parameter \fIlength\fP.
+Note that the cut buffer's contents need not be text, so null bytes 
+are not special.
+.FD
+.IN "Definitions" "XFetchBytes"
+.IN "XFetchBytes"
+char *XFetchBytes (nbytes)
+       int *nbytes;    /* RETURN */
+.FN
+\fIXFetchBytes\fP retrieves the contents of cut buffer 0.
+If the buffer contains data,
+it returns the number of bytes in the \fInbytes\fP argument,
+otherwise it returns NULL and sets \fInbytes\fP to 0.
+The appropriate amount of storage is ``malloc'ed'' and the pointer returned;
+the client must free this storage when finished with it.
+.PP
+Note that the cut buffer does not necessarily contain text, so it may
+contain embedded null bytes and may not terminate with a null byte.
+.FD
+.IN "Definitions" "XRotateBuffers"
+.IN "XRotateBuffers"
+XRotateBuffers (n)
+       int n;
+.FN
+Rotates the cut buffers by n.
+Buffer 0 becomes buffer n, buffer 1 becomes n+1 mod 8, and so on.
+This cut buffer numbering is global to the display.
+.FD
+.IN "Definitions" "XStoreBuffer"
+.IN "XStoreBuffer"
+XStoreBuffer (bytes, nbytes, buffer)
+       char *bytes;    /* NOT necessarily ascii or null-terminated */
+       int nbytes;     /* number of bytes */
+       int buffer;
+.FN
+\fIXStoreBuffer\fP is just like \fIXStoreBytes\fP,
+except that it stores in the
+specified \fIbuffer\fP instead of in buffer 0.
+.FD
+.IN "Definitions" "XFetchBuffer"
+.IN "XFetchBuffer"
+char *XFetchBuffer (nbytes, buffer)
+       int *nbytes;    /* RETURN */
+       int buffer;
+.FN
+\fIXFetchBuffer\fP is just like \fIXFetchBytes\fP,
+except that it fetches the contents
+of the specified \fIbuffer\fP instead of buffer 0.