A

Function Group Summary

This quick reference is intended to help you find and use the right function for a particular task. It supplies two lists:

  • Listing of Functions by Groups
  • Alphabetical Listing of Functions

Both functions and macros are listed in all the groups in which they belong. Therefore, several of them are listed more than once.

Remember that Xlib functions begin with the letter “X”; macros do not.

Group Listing with Brief Descriptions

Association Tables

XCreateAssocTable Create a new association table (X10).
XDeleteAssoc Delete an entry from an association table.
XDestroyAssocTable Free the memory allocated for an association table.
XLookUpAssoc Obtain data from an association table.
XMakeAssoc Create an entry in an association table.

Buffers

XStoreBuffer Store data in a cut buffer.
XStoreBytes Store data in cut buffer 0.
XFetchBuffer Return data from a cut buffer.
XFetchBytes Return data from cut buffer 0.
XRotateBuffers Rotate the cut buffers.

Client Connections

XKillClient Destroy a client or its remaining resources.
XSetCloseDownMode Change the close down mode of a client.

Colorcells

XAllocColor Allocate a read-only colormap cell with closest hardware-supported color.
XAllocColorCells Allocate read/write (nonshared) colorcells.
XAllocColorPlanes Allocate read/write (nonshareable) color planes.
XAllocNamedColor Allocate a read-only colorcell from color name.
XLookupColor Get database RGB values and closest hardware-supported RGB values from color name.
XParseColor Look up or translate RGB values from color name or hexadecimal value.
XQueryColor Obtain the RGB values for a specified pixel value.
XQueryColors Obtain RGB values and flags for each specified pixel value.
XStoreColor Set or change a read/write entry of a colormap to the closest available hardware color.
XStoreColors Set or change read/write colorcells to the closest available hardware colors.
XStoreNamedColor Allocate a read/write colorcell by English color name.
XFreeColors Free colormap cells or planes.
BlackPixel Return a black pixel value on the default colormap of screen.
WhitePixel Return a pixel value representing white in default colormap.

Colormaps

XCopyColormapAndFree Copy a colormap and return a new colormap ID.
XCreateColormap Create a colormap.
XFreeColormap Delete a colormap and install the default colormap.
XGetStandardColormap Get the standard colormap property.
XSetStandardColormap Change the standard colormap property.
XSetWindowColormap Set the colormap for a specified window.
XInstallColormap Install a colormap.
XUninstallColormap Uninstall a colormap; install default if not already installed.
XListInstalledColormaps Get a list of installed colormaps.
DefaultColormap Return the default colormap on the default screen.
DefaultColormapOfScreen Return the default colormap on the specified screen.
DisplayCells Return the maximum number of colormap cells on the connected display.

Context Manager

XDeleteContext Delete a context entry for a given window and type.
XFindContext Get data from the context manager (not graphics context).
XSaveContext Save a data value corresponding to a window and context type (not graphics context).
XUniqueContext Create a new context ID (not graphics context).

Cursors

XDefineCursor Assign a cursor to a window.
XUndefineCursor Disassociate a cursor from a window.
XCreateFontCursor Create a cursor from the standard cursor font.
XCreateGlyphCursor Create a cursor from font glyphs.
XCreatePixmapCursor Create a cursor from two bitmaps.
XFreeCursor Destroy a cursor.
XRecolorCursor Change the color of a cursor.
XQueryBestCursor Get the closest supported cursor sizes.
XQueryBestSize Obtain the “best” supported cursor, tile, or stipple size.

Display Specifications

DefaultColormap Return the default colormap on the specified screen.
DefaultDepth Return the depth of the default root window for a screen.
DefaultGC Return the default graphics context for the root window of a screen.
DefaultScreen Return the screen integer; the last segment of a string passed to XOpenDisplay, or the DISPLAY environment variable if NULL was used.
DefaultVisual Return the default visual structure for a screen.
DisplayCells Return the maximum number of colormap cells on the connected display.
DisplayHeight Return an integer that describes the height of the screen in pixels.
DisplayHeightMM Return the height of the specified screen in millimeters.
DisplayPlanes Return the number of planes on the connected display.
DisplayString Return the string that was passed to XOpenDisplay or if that was NULL, the DISPLAY variable.
DisplayWidth Return the width of the screen in pixels.
DisplayWidthMM Return the width of the specified screen in millimeters.
RootWindow Return the ID of the root window.
ScreenCount Return the number of available screens.

Drawing Primitives

XDraw Draw a polyline or curve between vertex list (from X10).
XDrawArc Draw an arc fitting inside a rectangle.
XDrawArcs Draw multiple arcs.
XDrawFilled Draw a filled polygon or curve from vertex list (from X10).
XDrawLine Draw a line between two points.
XDrawLines Draw multiple connected lines.
XDrawPoint Draw a point.
XDrawPoints Draw multiple points.
XDrawRectangle Draw an outline of a rectangle.
XDrawRectangles Draw the outlines of multiple rectangles.
XDrawSegments Draw multiple disjoint lines.
XCopyArea Copy an area of a drawable.
XCopyPlane Copy a single plane of a drawable into a drawable with depth, applying pixel values.
XFillArc Fill an arc.
XFillArcs Fill multiple arcs.
XFillPolygon Fill a polygon.
XFillRectangle Fill a rectangular area.
XFillRectangles Fill multiple rectangular areas.
XClearArea Clear a rectangular area in a window.
XClearWindow Clear an entire window.

Errors

XGetErrorDatabaseText Obtain error messages from the error database.
XGetErrorText Obtain a description of error code.
XSetErrorHandler Set a nonfatal error event handler.
XSetIOErrorHandler Handle fatal I/O errors.
XDisplayName Report the display name when connection to a display fails.
XSetAfterFunction Set a function called after all Xlib functions.
XSynchronize Enable or disable synchronization for debugging.

Events

XSelectInput Select the event types to be sent to a window.
XSendEvent Send an event.
XSetInputFocus Set the keyboard focus window.
XGetInputFocus Return the current keyboard focus window.
XWindowEvent Remove the next event matching mask and window.
XCheckWindowEvent Remove the next event matching both passed window and passed mask; don't wait.
XCheckTypedEvent Return the next event in queue that matches event type; don't wait.
XCheckTypedWindowEvent Return the next event in queue matching type and window.
XMaskEvent Remove the next event that matches mask.
XCheckMaskEvent Remove the next event that matches mask; don't wait.
XIfEvent Wait for matching event.
XCheckIfEvent Check the event queue for a matching event.
XPeekEvent Get an event without removing it from the queue.
XPeekIfEvent Get an event without recovering it from the queue; don't wait.
XAllowEvents Control the behavior of keyboard and pointer events when these resources are grabbed.
XGetMotionEvents Get pointer motion events.
XNextEvent Get the next event of any type or window.
XPutBackEvent Push an event back on the input queue.
XEventsQueued Check the number of events in the event queue.
XPending Flush the output buffer and return the number of pending input events.
XSynchronize Enable or disable synchronization for debugging.
QLength Return the current length of the input queue on the connected display.

Extensions

XFreeExtensionList Free memory allocated for a list of installed extensions to X.
XListExtensions Return a list of all extensions to X supported by the server.
XQueryExtension Get extension information.

Fonts

XLoadFont Load a font if not already loaded; get font ID.
XUnloadFont Unload a font.
XFreeFont Unload a font and free storage for the font structure.
XFreeFontInfo Free multiple font information arrays.
XFreeFontNames Free the font name array.
XFreeFontPath Free the memory allocated by XGetFontPath.
XListFonts Return a list of the available font names.
XListFontsWithInfo Obtain the names and information about loaded fonts.
XQueryFont Return information about a loaded font.
XSetFont Set the current font in a graphics context.
XSetFontPath Set the font search path.
XGetFontPath Get the current font search path.
XGetFontProperty Get a font property given its atom.
XCreateFontCursor Create a cursor from the standard cursor font.

Grabbing

XGrabKey Grab a key.
XUngrabKey Release a key from grab.
XGrabKeyboard Grab the keyboard.
XUngrabKeyboard Release the keyboard from grab.
XGrabButton Grab a pointer button.
XUngrabButton Release a button from grab.
XGrabPointer Grab the pointer.
XUngrabPointer Release the pointer from grab.
XGrabServer Grab the server grab.
XUngrabServer Release the server from grab.
XChangeActivePointerGrab Change the parameters of an active pointer grab.

Graphics Context

XGContextFromGC Obtain the GContext (resource ID) associated with the specified graphics context.
XCreateGC Create a new graphics context for a given screen with the depth of the specified drawable.
XChangeGC Change the components of a given graphics context.
XCopyGC Copy a graphics context.
XFreeGC Free a graphics context.
XSetArcMode Set the arc mode in a graphics context.
XSetClipMask Set clip_mask pixmap in a graphics context.
XSetClipOrigin Set the clip origin in a graphics context.
XSetClipRectangles Set clip_mask in a graphics context to the list of rectangles.
XSetRegion Set clip_mask of the graphics context to the specified region.
XSetDashes Set dash_offset and dashes (for lines) in a graphics context.
XSetLineAttributes Set the line drawing components in a graphics context.
XSetFillRule Set the fill rule in a graphics context.
XSetFillStyle Set the fill style in a graphics context.
XSetTile Set the fill tile in a graphics context.
XSetStipple Set the stipple in a graphics context.
XSetTSOrigin Set the tile/stipple origin in a graphics context.
XSetGraphicsExposures Set graphics_exposures in a graphics context.
XSetForeground Set the foreground pixel value in a graphics context.
XSetBackground Set the background pixel value in a graphics context.
XSetFunction Set the bitwise logical operation in a graphics context.
XSetPlaneMask Set the plane mask in a graphics context.
XSetState Set the foreground, background, logical function and plane mask in a graphics context.
XSetSubwindowMode Set the subwindow mode in a graphics context.
DefaultGC Return the default graphics context for the root window of a screen.

Host Access

XAddHost Add a host to the access control list.
XAddHosts Add multiple hosts to the access control list.
XListHosts Obtain a list of hosts having access to this display.
XRemoveHost Remove a host from the access control list.
XRemoveHosts Remove multiple hosts from the access control list.
XDisableAccessControl Allow access from any host.
XEnableAccessControl Use access control list to allow or deny connection requests.
XSetAccessControl Disable or enable access control.

HouseKeeping

XFree Free specified in-memory data created by an Xlib function.
XOpenDisplay Connect a client program to an X server.
XCloseDisplay Disconnect a client program from an X server and display.
XNoOp Send a NoOp to exercise connection with the server.
DefaultScreen Return the screen integer; the last segment of a string passed to XOpenDisplay, or the DISPLAY environment variable if NULL was used.

Images

XCreateImage Allocate memory for an XImage structure.
XDestroyImage Deallocate memory associated with an image.
XPutImage Draw a rectangular image on a window or pixmap.
XSubImage Create a subimage from part of an image.
XGetImage Place contents of a rectangle from drawable into an image.
XGetSubImage Copy a rectangle in drawable to a location within the preexisting image.
XAddPixel Add a constant value to every pixel value in an image.
XPutPixel Set a pixel value in an image.
XGetPixel Obtain a single pixel value from an image.
ImageByteOrder Specify the required byte order for images for each scan line unit in XYFormat (bitmap) or for each pixel value in ZFormat. Returns either LSBFirst or MSBFirst.

Keyboard

XKeycodeToKeysym Convert a keycode to a keysym.
XKeysymToKeycode Convert a keysym to the appropriate keycode.
XKeysymToString Convert a keysym symbol to a string.
XStringToKeysym Convert a keysym name string to a keysym.
XLookupKeysym Get the keysym corresponding to a keycode in a structure.
XRebindKeysym Rebind a keysym to a string for client.
XLookupString Map a key event to ASCII string, keysym, and ComposeStatus.
XQueryKeymap Obtain a bit vector for the current state of the keyboard.
XGetKeyboardMapping Return symbols for keycodes.
XChangeKeyboardMapping Change the keyboard mapping.
XRefreshKeyboardMapping Update the stored modifier and keymap information.
XSetModifierMapping Set keycodes to be used as modifiers (Shift, Control, etc.).
XGetModifierMapping Obtain modifier key mapping (Shift, Control, etc.).
XDeleteModifiermapEntry Delete an entry from an XModifierKeymap structure.
XInsertModifiermapEntry Add a new entry to an XModifierKeymap structure.
XNewModifiermap Create a keyboard modifier mapping structure.
XFreeModifiermap Destroy and free a keyboard modifier mapping structure.

Macros, Display

AllPlanes Return an unsigned long value with all bits set.
BlackPixel Return a black pixel value on the default colormap of screen.
BlackPixelOfScreen Return the black pixel value in the default colormap of the specified screen.
CellsOfScreen Return the number of colormap cells of the specified screen.
ConnectionNumber Return the connection number (file descriptor on UNIX system).
DefaultColormap Return the default colormap on the specified screen.
DefaultColormapOfScreen Return the default colormap of the specified screen.
DefaultDepth Return the depth of the default root window for a screen.
DefaultDepthOfScreen Return the default depth of the specified screen.
DefaultGC Return the default graphics context for the root window of a screen.
DefaultGCOfScreen Return the default graphics context (GC) of the specified screen.
DefaultRootWindow Return the root window for the default screen.
DefaultScreen Return the screen integer; the last segment of a string passed to XOpenDisplay, or the DISPLAY environment variable if NULL was used.
DefaultScreenOfDisplay Return the default screen of the specified display.
DefaultVisual Return the default visual structure for a screen.
DefaultVisualOfScreen Return the default visual of the specified screen.
DisplayCells Return the maximum number of colormap cells on the connected display.
DisplayHeight Return an integer that describes the height of the screen in pixels.
DisplayHeightMM Return the height of the specified screen in millimeters.
DisplayOfScreen Return the display of the specified screen.
DisplayPlanes Return the number of planes on the connected display.
DisplayString Return the string that was passed to XOpenDisplay or if that was NULL, the DISPLAY variable.
DisplayType Return the connected display manufacturer, as defined in <X11/Xvendors.h>.
DisplayWidth Return the width of the screen in pixels.
DisplayWidthMM Return the width of the specified screen in millimeters.
DoesBackingStore Return a value indicating whether the screen supports backing stores. Return one of WhenMapped, NotUseful, or Always.
DoesSaveUnders Return whether the screen supports save unders. True or False.
dpyno Return the file descriptor of the connected display.
EventMaskOfScreen Return the initial root event mask for the specified screen.
HeightOfScreen Return the height of the specified screen.
HeightMMOfScreen Return the height of the specified screen in millimeters.
Keyboard Return the device ID for the main keyboard connected to the display.
LastKnownRequestProcessed Return the serial ID of the last known protocol request to have been issued.
MaxCmapsOfScreen Return the maximum number of colormaps supported by a screen.
MinCmapsOfScreen Return the minimum number of colormaps supported by a screen.
NextRequest Return the serial ID of the next protocol request to be issued.
PlanesOfScreen Return the number of planes in a screen.
ProtocolRevision Return the minor protocol revision number of the X server.
ProtocolVersion Return the version number of the X protocol on the connected display.
QLength Return the current length of the input queue on the connected display.
RootWindow Return the ID of the root window.
RootWindowOfScreen Return the root window of the specified screen.
ScreenCount Return the number of available screens.
ScreenOfDisplay Return the specified screen of the specified display.
ServerVendor Return a pointer to a null-terminated string giving some identification of the maker of the X server implementation.
VendorRelease Return a number related to the release of the X server by the vendor.
WhitePixel Return a pixel value representing white in default colormap.
WhitePixelOfScreen Return the white pixel value in the default colormap of the specified screen.
WidthOfScreen Return the width of the specified screen.
WidthMMOfScreen Return the width of the specified screen in millimeters.

Macros, Image Format

BitmapBitOrder Return LeastSignificant or MostSignificant. Indicates the bit order in BitmapUnit.
BitmapPad Each scan line is padded to a multiple of bits specified by the value returned by this macro.
BitmapUnit The scan line is quantized (calculated) in multiples of this value.
ByteOrder Specifies the required byte order for images for each scan line unit in XYFormat (bitmap) or for each pixel value in ZFormat. Possible values are LSBFirst or MSBFirst.
ImageByteOrder Specifies the required byte order for images for each scan line unit in XYFormat (bitmap) or for each pixel value in ZFormat. Return either LSBFirst or MSBFirst.

Macros, Keysym Classification

IsCursorKey Return True if the keysym is on the cursor key.
IsFunctionKey Return True if the keysym is on the function keys.
IsKeypadKey Return True if the keysym is on the key pad.
IsMiscFunctionKey Return True if the keysym is on the miscellaneous function keys.
IsModifierKey Return True if the keysym is on the modifier keys.
IsPFKey Return True if the keysym is on the PF keys.

Mapping

(see Window Mapping, Keyboard, or Pointer)

Output Buffer

XFlush Flush the output buffer.
XSync Flush the output buffer and wait for all events to be processed by the server.

Pointers

XQueryPointer Get the current pointer location.
XWarpPointer Move the pointer to another point on the screen.
XGrabPointer Grab the pointer.
XUngrabPointer Release the pointer from grab.
XGetPointerMapping Get the pointer button mapping.
XSetPointerMapping Set the pointer button mapping.
XGetPointerControl Get the current pointer preferences.
XChangePointerControl Change the pointer preferences.
XChangeActivePointerGrab Change the parameters of an active pointer grab.

Properties

XListProperties Get the property list for a window.
XDeleteProperty Delete a window property.
XChangeProperty Change a property associated with a window.
XSetStandardProperties Set the minimum set of properties for the window manager.
XRotateWindowProperties Rotate properties in the properties array.
XGetAtomName Get a name for a given atom.
XGetFontProperty Get a font property given its atom.
XGetWindowProperty Obtain the atom type and property format for a window.
XInternAtom Return an atom for a given name string.

Regions

XCreateRegion Create a new empty region.
XDestroyRegion Deallocate storage associated with a region.
XEmptyRegion Determine if a region is empty.
XPolygonRegion Generate a region from points.
XPointInRegion Determine if a point resides in a region.
XRectInRegion Determine if a rectangle resides in a region.
XUnionRectWithRegion Add a rectangle to a region.
XClipBox Generate the smallest rectangle enclosing a region.
XOffsetRegion Change offset of a region.
XShrinkRegion Reduce the size of a region.
XEqualRegion Determine if two regions have the same size, offset, and space.
XSetRegion Set clip_mask of the graphics context to the specified region.
XSubtractRegion Subtract one region from another.
XIntersectRegion Compute the intersection of two regions.
XUnionRegion Compute the union of two regions.
XXorRegion Calculate the difference between the union and intersection of 2 regions.

Resource Manager and DataBase (Release 2 only)

XrmGetFileDatabase Retrieve a database from a file.
XrmGetResource Get a resource from name and class as strings.
XrmGetStringDatabase Create a database from a string.
XrmInitialize Initialize the resource manager.
XrmMergeDatabases Merge the contents of one database with another.
XrmParseCommand Load a resource database from command line arguments.
XrmPutFileDatabase Store a database in a file.
XrmPutLineResource Add a resource entry given as a string of name and value.
XrmPutResource Store a resource into a database.
XrmPutStringResource Add a resource that is specified as a string.
XrmQGetResource Get a resource from name and class as quarks.
XrmQGetSearchList Return a list of database levels.
XrmQGetSearchResource Search resource database levels for a given resource.
XrmQPutResource Store a resource into a database using quarks.
XrmQPutStringResource Add a string resource value to a database using quarks.
XrmQuarkToString Convert a quark to a string.
XrmStringToBindingQuarkList Convert a key string to a binding list and a quark list.
XrmStringToQuarkList Convert a key string to a quark list.
XrmStringToQuark Convert a string to a quark.
XrmUniqueQuark Allocate a new quark.
Xpermalloc Allocate memory never to be freed.

Save Set

XAddToSaveSet Add a window's children to the client's save-set.
XRemoveFromSaveSet Remove a window's children from the client's save-set.
XChangeSaveSet Add or remove a subwindow from the client's save-set.

Screen Saver

XActivateScreenSaver Activate screen blanking.
XForceScreenSaver Turn the screen saver on or off.
XResetScreensaver Reset the screen saver.
XGetScreensaver Get the current screen saver parameters.
XSetScreenSaver Set the parameters of the screen saver.

Selections

XGetSelectionOwner Return the owner of a selection.
XSetSelectionOwner Set the owner of a selection.
XConvertSelection Use the value of a selection.

Standard Geometry

XGeometry Calculate window geometry given user geometry string and default geometry.
XParseGeometry Generate position and size from standard window geometry string.
XTranslateCoordinates Change the coordinate system from one window to another.

Text

XDrawImageString Draw 8-bit image text characters.
XDrawImageString16 Draw 16-bit image text characters.
XDrawString Draw an 8-bit text string, foreground only.
XDrawString16 Draw two-byte text strings.
XDrawText Draw 8-bit polytext strings.
XDrawText16 Draw 16-bit polytext strings.
XQueryTextExtents Query the server for string and font metrics.
XQueryTextExtents16 Query the server for string and font metrics of a 16-bit character string.
XTextExtents Get string and font metrics.
XTextExtents16 Get string and font metrics of a 16-bit character string.
XTextWidth Get the width in pixels of an 8-bit character string.
XTextWidth16 Get the width in pixels of a 16-bit character string.

Tile, Pixmap, Stipple and Bitmap

XCreatePixmap Create a pixmap.
XFreePixmap Free a pixmap ID.
XQueryBestSize Obtain the “best” supported cursor, tile, or stipple size.
XQueryBestStipple Obtain the best supported stipple shape.
XQueryBestTile Obtain the best supported fill tile shape.
XSetTile Set the fill tile in a graphics context.
XSetWindowBorderPixmap Change a window border tile attribute and repaint the border.
XSetWindowBackgroundPixmap Change the background tile attribute of a window.
XReadBitmapFile Read a bitmap from disk.
XWriteBitmapFile Write a bitmap to a file.
XCreateBitmapFromData Create a bitmap from X11 bitmap format data.
XCreatePixmapFromBitmapData Create a pixmap with depth from bitmap data.

User Preferences

XAutoRepeatOff Turn off the keyboard auto-repeat keys.
XAutoRepeatOn Turn on the keyboard auto-repeat keys.
XBell Ring the bell (Control G).
XGetDefault Scan the user preferences for program name and options.
XGetPointerControl Get the current pointer preferences.
XGetKeyboardControl Obtain a list of the current keyboard preferences.
XChangeKeyboardControl Change the keyboard preferences.

Visuals

XGetVisualInfo Find a visual information structure that matches the specified template.
XMatchVisualInfo Obtain the visual information that matches the desired depth and class.
DefaultVisual Return the default visual structure for a screen.

Window Attributes

XGetWindowAttributes Obtain the current attributes of window.
XChangeWindowAttributes Set window attributes.
XSetWindowBackground Set the background pixel attribute of a window.
XSetWindowBackgroundPixmap Change the background tile attribute of a window.
XSetWindowBorder Change a window border attribute to the specified pixel value and repaint the border.
XSetWindowBorderPixmap Change a window border tile attribute and repaint the border.
XSetWindowColormap Set the colormap for a specified window.
XDefineCursor Assign a cursor to a window.
XGetGeometry Obtain the current geometry of drawable.
XSelectInput Select the event types to be sent to a window.

Window Configuration

XMoveWindow Move a window.
XResizeWindow Change a window's size.
XMoveResizeWindow Change the size and position of a window.
XSetWindowBorderWidth Change the border width of a window.
XRestackWindows Change the stacking order of siblings.
XConfigureWindow Change the window position, size, border width, or stacking order.
XGetGeometry Obtain the current geometry of drawable.

Window Existence

XCreateSimpleWindow Create an unmapped InputOutput subwindow.
XCreateWindow Create a window and set attributes.
XDestroySubwindows Destroy all subwindows of a window.
XDestroyWindow Unmap and destroy a window and all subwindows.

Window Manager Hints

XGetClassHint Get the XA_WM_CLASS property of a window.
XSetClassHint Set the XA_WM_CLASS property of a window.
XGetNormalHints Get the size hints property of a window in normal state (not zoomed or iconified).
XSetNormalHints Set the size hints property of a window in normal state (not zoomed or iconified).
XGetSizeHints Read any property of type XA_WM_SIZE_HINTS.
XSetSizeHints Set the value of any property of type XA_WM_SIZE_HINTS.
XGetTransientForHint Get the XA_WM_TRANSIENT_FOR property of a window.
XSetTransientForHint Set the XA_WM_TRANSIENT_FOR property of a window.
XGetWMHints Read a window manager hints property.
XSetWMHints Set a window manager hints property.
XGetZoomHints Read the size hints property of a zoomed window.
XSetZoomHints Set the size hints property of a zoomed window.
XFetchName Get a window's name (XA_WM_NAME property).
XStoreName Assign a name to a window for the window manager.
XGetIconName Get the name to be displayed in an icon.
XSetIconName Set the name to be displayed in a window's icon.
XGetIconSizes Get preferred icon sizes.
XSetIconSizes Set the value of the XA_WM_ICON_SIZE property.
XSetCommand Set the XA_WM_COMMAND atom (command line arguments).

Window Manipulation

XLowerWindow Lower a window in the stacking order.
XRaiseWindow Raise a window to the top of the stacking order.
XCirculateSubwindows Circulate the stacking order of children up or down.
XCirculateSubwindowsDown Circulate the bottom child to the top of the stacking order.
XCirculateSubwindowsUp Circulate the top child to the bottom of the stacking order.
XQueryTree Return a list of children, parent, and root.
XReparentWindow Change a window's parent.
XMoveWindow Move a window.
XResizeWindow Change a window's size.
XMoveResizeWindow Change the size and position of a window.
XSetWindowBorderWidth Change the border width of a window.
XRestackWindows Change the stacking order of siblings.
XConfigureWindow Change the window position, size, border width, or stacking order.

Window Mapping

XMapRaised Map a window on top of its siblings.
XMapSubwindows Map all subwindows.
XMapWindow Map a window.
XUnmapSubwindows Unmap all subwindows of a given window.
XUnmapWindow Unmap a window.

Alphabetical Listing of Routines

Table A-1. Alphabetical Listing of Routines

Routine Description
XActivateScreenSaver Activate screen blanking.
XAddHost Add a host to the access control list.
XAddHosts Add multiple hosts to the access control list.
XAddPixel Add a constant value to every pixel value in an image.
XAddToSaveSet Add a window's children to the client's save-set.
XAllocColor Allocate a read-only colormap cell with closest hardware-supported color.
XAllocColorCells Allocate read/write (nonshared) colorcells.
XAllocColorPlanes Allocate read/write (nonshareable) color planes.
XAllocNamedColor Allocate a read-only colorcell from color name.
XAllowEvents Control the behavior of keyboard and pointer events when these resources are grabbed.
XAutoRepeatOff Turn off the keyboard auto-repeat keys.
XAutoRepeatOn Turn on the keyboard auto-repeat keys.
XBell Ring the bell (Control G).
XChangeActivePointerGrab Change the parameters of an active pointer grab.
XChangeGC Change the components of a given graphics context.
XChangeKeyboardControl Change the keyboard preferences such as key click.
XChangeKeyboardMapping Change the keyboard mapping.
XChangePointerControl Change the pointer preferences.
XChangeProperty Change a property associated with a window.
XChangeSaveSet Add or remove a subwindow from the client's save-set.
XChangeWindowAttributes Set window attributes.
XCheckIfEvent Check the event queue for a matching event.
XCheckMaskEvent Remove the next event that matches mask; don't wait.
XCheckTypedEvent Return the next event in queue that matches event type; don't wait.
XCheckTypedWindowEvent Return the next event in queue matching type and window.
XCheckWindowEvent Remove the next event matching both passed window and passed mask; don't wait.
XCirculateSubwindows Circulate the stacking order of children up or down.
XCirculateSubwindowsDown Circulate the bottom child to the top of the stacking order.
XCirculateSubwindowsUp Circulate the top child to the bottom of the stacking order.
XClearArea Clear a rectangular area in a window.
XClearWindow Clear an entire window.
XClipBox Generate the smallest rectangle enclosing a region.
XCloseDisplay Disconnect a client program from an X server and display.
XConfigureWindow Change the window position, size, border width, or stacking order.
XConvertSelection Use the value of a selection.
XCopyArea Copy an area of a drawable.
XCopyColormapAndFree Copy a colormap and return a new colormap ID.
XCopyGC Copy a graphics context.
XCopyPlane Copy a single plane of a drawable into a drawable with depth, applying pixel values.
XCreateAssocTable Create a new association table (X10).
XCreateBitmapFromData Create a bitmap from X11 bitmap format data.
XCreateColormap Create a colormap.
XCreateFontCursor Create a cursor from the standard cursor font.
XCreateGC Create a new graphics context for a given screen with the depth of the specified drawable.
XCreateGlyphCursor Create a cursor from font glyphs.
XCreateImage Allocate memory for an XImage structure.
XCreatePixmap Create a pixmap.
XCreatePixmapCursor Create a cursor from two bitmaps.
XCreatePixmapFromBitmapData Create a pixmap with depth from bitmap data.
XCreateRegion Create a new empty region.
XCreateSimpleWindow Create an unmapped InputOutput window.
XCreateWindow Create a window and set attributes.
XDefineCursor Assign a cursor to a window.
XDeleteAssoc Delete an entry from an association table.
XDeleteContext Delete a context entry for a given window and type.
XDeleteModifiermapEntry Delete an entry from an XModifierKeymap structure.
XDeleteProperty Delete a window property.
XDestroyAssocTable Free the memory allocated for an association table.
XDestroyImage Deallocate memory associated with an image.
XDestroyRegion Deallocate storage associated with a region.
XDestroySubwindows Destroy all subwindows of a window.
XDestroyWindow Unmap and destroy a window and all subwindows.
XDisableAccessControl Allow access from any host.
XDisplayName Report the display name when connection to a display fails.
XDraw Draw a polyline or curve between vertex list (from X10).
XDrawArc Draw an arc fitting inside a rectangle.
XDrawArcs Draw multiple arcs.
XDrawFilled Draw a filled polygon or curve from vertex list (from X10).
XDrawImageString Draw 8-bit image text characters.
XDrawImageString16 Draw 16-bit image text characters.
XDrawLine Draw a line between two points.
XDrawLines Draw multiple connected lines.
XDrawPoint Draw a point.
XDrawPoints Draw multiple points.
XDrawRectangle Draw an outline of a rectangle.
XDrawRectangles Draw the outlines of multiple rectangles.
XDrawSegments Draw multiple disjoint lines.
XDrawString Draw an 8-bit text string, foreground only.
XDrawString16 Draw two-byte text strings.
XDrawText Draw 8-bit polytext strings.
XDrawText16 Draw 16-bit polytext strings.
XEmptyRegion Determine if a region is empty.
XEnableAccessControl Use access control list to allow or deny connection requests.
XEqualRegion Determine if two regions have the same size, offset, and shape.
XEventsQueued Check the number of events in the event queue.
XFetchBuffer Return data from a cut buffer.
XFetchBytes Return data from cut buffer 0.
XFetchName Get a window's name (XA_WM_NAME property).
XFillArc Fill an arc.
XFillArcs Fill multiple arcs.
XFillPolygon Fill a polygon.
XFillRectangle Fill a rectangular area.
XFillRectangles Fill multiple rectangular areas.
XFindContext Get data from the context manager (not graphics context).
XFlush Flush the output buffer (display all queued requests).
XForceScreenSaver Turn the screen saver on or off.
XFree Free specified in-memory data created by an Xlib function.
XFreeColormap Delete a colormap and install the default colormap.
XFreeColors Free colormap cells or planes.
XFreeCursor Destroy a cursor.
XFreeExtensionList Free memory allocated for a list of installed extensions to X.
XFreeFont Unload a font and free storage for the font structure.
XFreeFontInfo Free multiple font information arrays.
XFreeFontNames Free the font name array.
XFreeFontPath Free the memory allocated by XGetFontPath.
XFreeGC Free a graphics context.
XFreeModifiermap Destroy and free a keyboard modifier mapping structure.
XFreePixmap Free a pixmap ID.
XGContextFromGC Obtain the GContext (resource ID) associated with the specified graphics context.
XGeometry Calculate window geometry given user geometry string and default geometry.
XGetAtomName Get a name for a given atom.
XGetClassHint Get the XA_WM_CLASS property of a window.
XGetDefault Scan the user preferences for program name and options.
XGetErrorDatabaseText Obtain error messages from the error database.
XGetErrorText Obtain a description of error code.
XGetFontPath Get the current font search path.
XGetFontProperty Get a font property given its atom.
XGetGeometry Obtain the current geometry of drawable.
XGetIconName Get the name to be displayed in an icon.
XGetIconSizes Get preferred icon sizes.
XGetImage Place contents of a rectangle from drawable into an image.
XGetInputFocus Return the current keyboard focus window.
XGetKeyboardControl Obtain a list of the current keyboard preferences.
XGetKeyboardMapping Return symbols for keycodes.
XGetModifierMapping Obtain a mapping of modifier keys (Shift, Control, etc.)
XGetMotionEvents Get pointer motion events.
XGetNormalHints Get the size hints property of a window in normal state (not zoomed or iconified).
XGetPixel Obtain a single pixel value from an image.
XGetPointerControl Get the current pointer preferences.
XGetPointerMapping Get the pointer button mapping.
XGetScreenSaver Get the current screen saver parameters.
XGetSelectionOwner Return the owner of a selection.
XGetSizeHints Read any property of type XA_WM_SIZE_HINTS.
XGetStandardColormap Get the standard colormap property.
XGetSubImage Copy a rectangle in drawable to a location within the preexisting image.
XGetTransientForHint Get the XA_WM_TRANSIENT_FOR property of a window.
XGetVisualInfo Find a visual information structure that matches the specified template.
XGetWindowAttributes Obtain the current attributes of window.
XGetWindowProperty Obtain the atom type and property format for a window.
XGetWMHints Read a window manager hints property.
XGetZoomHints Read the size hints property of a zoomed window.
XGrabButton Grab a pointer button.
XGrabKey Grab a key.
XGrabKeyboard Grab the keyboard.
XGrabPointer Grab the pointer.
XGrabServer Grab the server.
XIfEvent Wait for matching event.
XInsertModifiermapEntry Add a new entry to an XModifierKeymap structure.
XInstallColormap Install a colormap.
XInternAtom Return an atom for a given name string.
XIntersectRegion Compute the intersection of two regions.
XKeycodeToKeysym Convert a keycode to a keysym.
XKeysymToKeycode Convert a keysym to the appropriate keycode.
XKeysymToString Convert a keysym symbol to a string.
XKillClient Destroy a client or its remaining resources.
XListExtensions Return a list of all extensions to X supported by the server.
XListFonts Return a list of the available font names.
XListFontsWithInfo Obtain the names and information about loaded fonts.
XListHosts Obtain a list of hosts having access to this display.
XListInstalledColormaps Get a list of installed colormaps.
XListProperties Get the property list for a window.
XLoadFont Load a font if not already loaded; get font ID.
XLoadQueryFont Load a font and fill information structure.
XLookUpAssoc Obtain data from an association table.
XLookupColor Get database RGB values and closest hardware-supported RGB values from color name.
XLookupKeysym Get the keysym corresponding to a keycode in structure.
XLookupString Map a key event to ASCII string, keysym, and ComposeStatus.
XLowerWindow Lower a window in the stacking order.
XMakeAssoc Create an entry in an association table.
XMapRaised Map a window on top of its siblings.
XMapSubwindows Map all subwindows.
XMapWindow Map a window.
XMaskEvent Remove the next event that matches mask.
XMatchVisualInfo Obtain the visual information that matches the desired depth and class.
XMoveResizeWindow Change the size and position of a window.
XMoveWindow Move a window.
XNewModifiermap Create a keyboard modifier mapping structure.
XNextEvent Get the next event of any type or window.
XNoOp Send a NoOp to exercise connection with the server.
XOffsetRegion Change offset of a region.
XOpenDisplay Connect a client program to an X server.
XParseColor Look up or translate RGB values from ASCII color name or hexadecimal value.
XParseGeometry Generate position and size from standard window geometry string.
XPeekEvent Get an event without removing it from the queue.
XPeekIfEvent Get an event without removing it from the queue; do not wait.
XPending Flush the output buffer and return the number of pending input events.
Xpermalloc Allocate memory never to be freed.
XPointInRegion Determine if a point is inside a region.
XPolygonRegion Generate a region from points.
XPutBackEvent Push an event back on the input queue.
XPutImage Draw a rectangular image on a window or pixmap.
XPutPixel Set a pixel value in an image.
XQueryBestCursor Get the closest supported cursor sizes.
XQueryBestSize Obtain the “best” supported cursor, tile, or stipple size.
XQueryBestStipple Obtain the best supported stipple shape.
XQueryBestTile Obtain the best supported fill tile shape.
XQueryColor Obtain the RGB values and flags for a specified pixel value.
XQueryColors Obtain RGB values for an array of pixel values.
XQueryExtension Get extension information.
XQueryFont Return information about a loaded font.
XQueryKeymap Obtain a bit vector for the current state of the keyboard.
XQueryPointer Get the current pointer location.
XQueryTextExtents Query the server for string and font metrics.
XQueryTextExtents16 Query the server for string and font metrics of a 16-bit character string.
XQueryTree Return a list of children, parent, and root.
XRaiseWindow Raise a window to the top of the stacking order.
XReadBitmapFile Read a bitmap from disk.
XRebindKeysym Rebind a keysym to a string for client.
XRecolorCursor Change the color of a cursor.
XRectInRegion Determine if a rectangle resides in a region.
XRefreshKeyboardMapping Update the stored modifier and keymap information.
XRemoveFromSaveSet Remove a window's children from the client's save-set.
XRemoveHost Remove a host from the access control list.
XRemoveHosts Remove multiple hosts from the access control list.
XReparentWindow Change a window's parent.
XResetScreensaver Reset the screen saver.
XResizeWindow Change a window's size.
XRestackWindows Change the stacking order of siblings.
XrmGetFileDatabase Retrieve a database from a file.
XrmGetResource Get a resource from name and class as strings.
XrmGetStringDatabase Create a database from a string.
XrmInitialize Initialize the resource manager.
XrmMergeDatabases Merge the contents of one database with another.
XrmParseCommand Load a resource database from command line arguments.
XrmPutFileDatabase Store a database in a file.
XrmPutLineResource Add a resource entry given as a string of name and value.
XrmPutResource Store a resource into a database.
XrmPutStringResource Add a resource that is specified as a string.
XrmQGetResource Get a resource from name and class as quarks.
XrmQGetSearchList Return a list of database levels.
XrmQGetSearchResource Search resource database levels for a given resource.
XrmQPutResource Store a resource into a database using quarks.
XrmQPutStringResource Add a string resource value to a database using quarks.
XrmQuarkToString Convert a quark to a string.
XrmStringToBindingQuarkList Convert a key string to a binding list and a quark list.
XrmStringToQuark Convert a string to a quark.
XrmStringToQuarkList Convert a key string to a quark list.
XrmUniqueQuark Allocate a new quark.
XRotateBuffers Rotate the cut buffers.
XRotateWindowProperties Rotate properties in the properties array.
XSaveContext Save a data value corresponding to a window and context type (not graphics context).
XSelectInput Select the event types to be sent to a window.
XSendEvent Send an event.
XSetAccessControl Disable or enable access control.
XSetAfterFunction Set a function called after all Xlib functions.
XSetArcMode Set the arc mode in a graphics context.
XSetBackground Set the background pixel value in a graphics context.
XSetClassHint Set the XA_WM_CLASS property of a window.
XSetClipMask Set clip_mask pixmap in a graphics context.
XSetClipOrigin Set the clip origin in a graphics context.
XSetClipRectangles Change clip_mask in a graphics context to the list of rectangles.
XSetCloseDownMode Change the close down mode of a client.
XSetCommand Set the XA_WM_COMMAND atom (command line arguments).
XSetDashes Set dash_offset and dashes (for lines) in a graphics context.
XSetErrorHandler Set a nonfatal error event handler.
XSetFillRule Set the fill rule in a graphics context.
XSetFillStyle Set the fill style in a graphics context.
XSetFont Set the current font in a graphics context.
XSetFontPath Set the font search path.
XSetForeground Set the foreground pixel value in a graphics context.
XSetFunction Set the bitwise logical operation in a graphics context.
XSetGraphicsExposures Set graphics_exposures in a graphics context.
XSetIconName Set the name to be displayed in a window's icon.
XSetIconSizes Set the value of the XA_WM_ICON_SIZE property.
XSetInputFocus Set the keyboard focus window.
XSetIOErrorHandler Handle fatal I/O errors.
XSetLineAttributes Set the line drawing components in a graphics context.
XSetModifierMapping Set keycodes to be used as modifiers (Shift, Control, etc.).
XSetNormalHints Set the size hints property of a window in normal state (not zoomed or iconified).
XSetPlaneMask Set the plane mask in a graphics context.
XSetPointerMapping Set the pointer button mapping.
XSetRegion Set clip_mask of the graphics context to the specified region.
XSetScreenSaver Set the parameters of the screen saver.
XSetSelectionOwner Set the owner of a selection.
XSetSizeHints Set the value of any property of type XA_WM_SIZE_HINTS.
XSetStandardColormap Change the standard colormap property.
XSetStandardProperties Set the minimum set of properties for the window manager.
XSetState Set the foreground, background, logical function, and plane mask in a graphics context.
XSetStipple Set the stipple in a graphics context.
XSetSubwindowMode Set the subwindow mode in a graphics context.
XSetTile Set the fill tile in a graphics context.
XSetTransientForHint Set the XA_WM_TRANSIENT_FOR property of a window.
XSetTSOrigin Set the tile/stipple origin in a graphics context.
XSetWindowBackground Set the background pixel attribute of a window.
XSetWindowBackgroundPixmap Change the background tile attribute of a window.
XSetWindowBorder Change a window border attribute to the specified pixel value and repaint the border.
XSetWindowBorderPixmap Change a window border tile attribute and repaint the border.
XSetWindowBorderWidth Change the border width of a window.
XSetWindowColormap Set the colormap for a specified window.
XSetWMHints Set a window manager hints property.
XSetZoomHints Set the size hints property of a zoomed window.
XShrinkRegion Reduce or expand the size of a region.
XStoreBuffer Store data in a cut buffer.
XStoreBytes Store data in cut buffer 0.
XStoreColor Set or change a read/write entry of a colormap to the closest available hardware color.
XStoreColors Set or change read/write colorcells to the closest available hardware colors.
XStoreName Assign a name to a window for the window manager.
XStoreNamedColor Allocate a read/write colorcell by English color name.
XStringToKeysym Convert a keysym name string to a keysym.
XSubImage Create a subimage from part of an image.
XSubtractRegion Subtract one region from another.
XSync Flush the output buffer and wait for all events and errors to be processed by the server.
XSynchronize Enable or disable synchronization for debugging.
XTextExtents Get string and font metrics.
XTextExtents16 Get string and font metrics of a 16-bit character string.
XTextWidth Get the width in pixels of an 8-bit character string.
XTextWidth16 Get the width in pixels of a 16-bit character string.
XTranslateCoordinates Change the coordinate system from one window to another.
XUndefineCursor Disassociate a cursor from a window.
XUngrabButton Release a button from grab.
XUngrabKey Release a key from grab.
XUngrabKeyboard Release the keyboard from grab.
XUngrabPointer Release the pointer from grab.
XUngrabServer Release the server from grab.
XUninstallColormap Uninstall a colormap; install default if not already installed.
XUnionRectWithRegion Add a rectangle to a region.
XUnionRegion Compute the union of two regions.
XUniqueContext Create a new context ID (not graphics context).
XUnloadFont Unload a font.
XUnmapSubwindows Unmap all subwindows of a given window.
XUnmapWindow Unmap a window.
XWarpPointer Move the pointer to another point on the screen.
XWindowEvent Remove the next event matching mask and window.
XWriteBitmapFile Write a bitmap to a file.
XXorRegion Calculate the difference between the union and intersection of two regions.

Get Xlib Reference Manual for Version 11 of the X Window System now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.