NXlib programming and reference manual


Overview

NX11 or libNX11 is a compatibility library which provides X11 compatibility for Nano-X. Before this library was developed, many programs written for the X11 interface had to be converted from that to the Nano-X API. This was very time consuming for large programs and the maintenance for newer versions of these programs was a constraint.

Therefore the NX11 library was developed which provides an X11 API and translates that to Nano-X API calls. This way, you can compile X11 programs using the Nano-X and NX11 libraries instead of the X11 libraries or, since libNX11 is a binary compatible subset to Xlib, you can run programs compiled for X11 on platforms that do not have X11 available.

The primary target for NX11 was to provide sufficient X11 support for the FLTK GUI library. Details how to compile the FLTK library with NX11 are provided in the faq2.html file.

In previous Nano-X versions you needed to link programs both with libnano-X and libNX11. Now there is the libPX11 library available which combines both libraries. Many X11 programs link with the Xext library usually without using the included routines in there. To help porting these program, an NXext library is provided that contains stubs of the functions in the Xext library. All these libraries are compiled if you compile the Nano-X package with „make“.


Compiling X11 programs with libNX11

You can compile a program written for the standard X11 libraries with NX11 instead. Here is an example:

Copy e.g. the "src/nxlib/test/testarc.c" program into the "src/test" folder. Then, while in the "src" folder, enter:
"gcc -Llib -Iinclude test/testarc.c -lnano-X -lNX11 -o test/testarc"

This will compile the „testarc“ program in the „tests“ folder. To run the program enter, while in the "src" directory, the following line:
"bin/nano-X -N & bin/nanowm & test/testarc"
or
"bin/nano-X -N & sleep 1; bin/nanowm & sleep 1; test/testarc"

To use the PX11 library compile with: "gcc -Llib -Iinclude test/testarc.c -lPX11 -o test/testarc"
and run with: "nano-X -N & bin/nanowm & test/testarc".

If you did run „make install“ after compiling the Nano-X package with „make“, the libraries in the „src/lib“ directory will be copied to the directories in the default search path of the program loader. Then the loader will find these even if they are not in the „src/lib“ directory.

You can check the libraries the application program is linked with using the „ldd“ command. E.g. „ldd test/testarc“

A larger package using X11 will usually have a configure script to generate a makefile. If this script has command line options, you should at first turn off those you do not really need, since NX11 just provides a subset of the X11 functions. After running configure, a makefile will be generated which expects the standard X11 libraries. You have to replace these references in this Makefile. So replace the "-lX11“ entries with "-lNX11 -lnano-X" or "-lPX11" in the Makefile and -lXext with -lNXext". You can use the replace-lX11.sh script in the microwindows/src directory for that. After that use e.g. the MELD program to compare the original Makefile with the modified one to see if that worked ok. Then you can continue to compile the package with „make“ and „make install“. You can check with „readelf -d“ if the generated programs try to link to the standard X11 libraries or NX11 as intended.

If you want to compile a program (e.g. hello.cxx) from the command line, e.g. using the FLTK library compiled for Nano-X, you can enter:
"g++ test/hello.cxx -o hello -Llib -lNX11 -lnano-X -lfreetype -lfltk -ldl"
or
"g++ test/hello.cxx -o hello -Llib -lPX11 -lfreetype -lfltk -ldl"

Some programs require more X11 functions than provided by NX11 or use a Makefile split into separate files. You can search the source code directory for „-lX11“ to find the Makefiles that need to be changed. Or use the „ltrace“ command described in the next section to find the X11 functions used that are not supported by NX11 and require e.g. an additional stub in the stub.c file. You can also use the DEBUG or SHOWSTUBS macros to print a message to stdout if one of these stubs is called by the application. So you can look into the code of the application why it needs that function and if it can handle a unsuccessful call.

Please do not expect that it does work out of the box. It takes some time and sometimes code changes may be required.


Using NX11 as a binary compatible library

Since libNX11 implements the X11 functions just as Xlib does, the compiled libNX11 library is binary compatible to Xlib. So you can make a symbolic link from libX11.so.6 to libNX11.so to provide X11 functions on platforms without the standard libX11.so. This way many X11 programs will work with libNX11 instead of the standard libX11.

For this you need a shared library, called libNX11.so. When you compile the Nano-X package with the parameter „SHAREDLIBS = Y“, make will generate these shared libraries together with static libraries.

As an example you may copy the file „xservervendor.c“ from the „src/nxlib/test“ directory into the „src/test“ directory. This program calls the Xlib function „XserverVendor“ to report the
identification of the owner of the X server implementation. If the program uses the standard Xlib, it will report „The X.Org Foundation“. In case it uses the NX11 library instead it will report „CSET“.

If you compile the xservervendor program with the following command line:
gcc -I/usr/X11/include -L/usr/X11/lib -o xservervendor xservervendor.c -lX11“
and run it with:
./xservervendor
you will see that it uses the standard X11 library.

You can check that with the command „readelf -d ./xservervendor“ if the program „needs“ the standard libX11.so or libNX11.so. It should be libX11.so here.

An alternative is „objdump -p ./xservervendor“ which shows additional information we may not need. Further „ldd ./xservervendor“ will show the required libraries, however, it works in recursive mode, so it shows the libraries too, which libX11.so needs again. This can be confusing, since we do not have to provide these with libNX11.so.

Now we want to run this program unchanged with NX11. However, we still need access to the standard X11 library in „/usr/X11“ if we are developing on a Linux system with a graphical desktop and have compiled Nano-X for X11 support, which is the default setting.

So the standard X11 library is required when compiling the Nano-X package with make after making changes and also the Nano-X server „nano-X“ and the Nano-X windowmanager „nanowm“ in the „src/bin“ directory need the standard Xlib to run. Just for our xservervendor program the program loader shall select the NX11 library and not accidentally the standard X11 library.

We can achieve this by setting the LD_LIBRARY_PATH environment variable with e.g. this command:
export LD_LIBRARY_PATH=/home/georg/microwindows/src/lib

This instructs the program loader to first look into the „microwindows/src/lib“ for required shared libraries and if these cannot be found there, continue with the default search path. The loader will then find the X11 libraries in „/usr/X11“.

Now if we make a symbolic link pointing from libX11.so.6 to libNX11.so in the „src/lib“ directory, the loader will find the libX11.so.6 requested by the X11 program and use the libNX11.so. Set the symbolic link with either one of these commands:
ln -sf libNX11.so libX11.so.6
or
ln -sf libPX11.so libX11.so.6

Again, with this link is enabled, we cannot run the „nano-X“ server nor the „nanowm“ windowmanager. Also compiling the Nano-X package with „make“ will not work. So we have to start „nano-X“ and „nanowm“ first to run as background tasks. Then set this symbolic link just before we run our application program and destroy it after the program has terminated. Here is a script which will do this for us. It assumes that we are in the „src/test“ directory:

#run nano-X and nanowm as background tasks
../bin/nano-X& sleep 1; ../bin/nanowm& sleep 1;
#set a symbolic link to libX11.so.6 in the src/lib folder
cd ../lib ; ln -sf libNX11.so libX11.so.6 ; cd ../test
#run xservervendor using libNX11, reporting "CSET"
./xservervendor & sleep 2
#remove the symbolic link to libN11.so.6 again
cd ../lib ; rm libX11.so.6 ; cd ../test
#optional:
#run xservervendor using libX11, reporting "The X.Org Foundation"
./xservervendor & sleep 4


The sleep commands shall provide some time for the programs to fully load before the following program is executed.

If there are problems to get an X11 program to run, you can use the „ltrace“ command to check which X11 calls this program executes. For example this command will monitor which calls the xservervendor program executes to the libX11 and libXext libraries and writes these into the xcalls.log file:
ltrace -o xcalls.log -l libX11.so* -l libXext.so* ./xservervendor

In the past the following programs are reported to work, at least in part, with libNX11.so while compiled for the standard X11 libraries:
The example programs supplied with gtk+-1.2.10, glib-1.2.10
The example programs supplied with gtk+-2.0.6, glib-2.0.6, atk-1.0.3, pango-1.0.4
The example programs supplied with qt-x11-2.3.1
xfreecell-1.0.5a
xsunclock-1.5
xscreensaver-3.26

Using this binary mode you can compile your application for X11 and run it on a different system without standard X11 using the NX11 library.


X11 links

Adrian Nye, Xlib Programming Manual for Version 11 of the X Window System

Adrian Nye, Xlib Programming Manual for Version 11 of the X Window System - HTML version

Basic Graphics Programming With The Xlib Library

Alan's Xlib tutorial

Hammond, A Brief intro to X11 Programming

Ross Maloney, Fundamentals of Xlib Programming by Examples

Xlib examples on GitHub

Ben Bullock, Xlib examples

Stephane List, Xlib examples


October 2018, Georg Potthast


Alphabetical Listing of implemented routines

This is a list of the 287 X11 compatible functions implemented in libNX11. These often do not provide the full

functionality of the corresponding X11 functions. For many other X11 functions there are just stubs implemented

which can be found in the stub.c file in the nxlib directory.

The name of each function is a link to a detailed description of the X11 function. So if click on these you will

get additional information.


Xlib function (links)

NXlib implementation in source code file

Short description

XAddExtension

Extension.c

Allocates the XExtCodes structure.

XAddToExtensionList

Extension.c

Adds an extension to attach arbitrary data to any of the structures of types contained in XEDataObject.

XAddToSaveSet

ChSaveSet.c

Add a window's children to the client's save-set.

XAllocClassHint

ClassHint.c

Allocates and returns a pointer to a XClassHint structure.

XAllocColor

AllocColor.c

Allocate a read-only colormap cell with closest hardware-supported color.

XAllocNamedColor

Colorname.c

Allocate a read-only colorcell from color name.

XAllocSizeHints

SetWMProps.c

Allocates and returns a pointer to a XSizeHints structure

XAllocStandardColormap

Colormap.c

Allocates and returns a pointer to a XStandardColormap structure.

XAllocWMHints

SetWMProps.c

Allocates and returns a pointer to a XWMHints structure.

XBell

Bell.c

Ring the bell (Control G).

XBlackPixel

OpenDis.c

Returns the black pixel value in a screen's default colormap.

XChangeGC

CrGC.c

Change the components of a given graphics context.

XChangeProperty

ChProperty.c

Change a property associated with a window.

XChangeSaveSet

ChSaveSet.c

Add or remove a subwindow from the client's save-set.

XChangeWindowAttributes

SetAttributes.c

Set window attributes.

XCheckIfEvent

NextEvent.c

Check the event queue for a matching event.

XCheckMaskEvent

NextEvent.c

Remove the next event that matches mask; don't wait.

XCheckTypedEvent

NextEvent.c

Return the next event in queue that matches event type; don't wait.

XCheckTypedWindowEvent

NextEvent.c

Return the next event in queue matching type and window.

XCheckWindowEvent

NextEvent.c

Remove the next event matching both passed window and passed mask; don't wait.

XClearArea

ClearArea.c

Clear a rectangular area in a window.

XClearWindow

Clear.c

Clear an entire window.

XClipBox

Region.c

Generate the smallest rectangle enclosing a region.

XCloseDisplay

ClDisplay.c

Disconnect a client program from an X server and display.

XCloseIM

IM.c

Closes the specified input method.

XConfigureWindow

ChWindow.c

Change the window position, size, border width, or stacking order.

XConnectionNumber

OpenDis.c

Returns the connection number for the specified display

XConvertCase

StrKeysym.c

Returns the uppercase and lowercase forms of the specified Keysym

XConvertSelection

Selection.c

Use the value of a selection.

XCopyArea

Copy.c

Copy an area of a drawable.

XCopyPlane

Copy.c

Copy a single plane of a drawable into a drawable with depth, applying pixel values.

XCreateBitmapFromData

CrBFData.c

Create a bitmap from X11 bitmap format data.

XCreateColormap

Colormap.c

Create a colormap.

XCreateFontCursor

FontCursor.c

Create a cursor from the standard cursor font.

XCreateFontSet

font-find.c

Creates a font set for the specified display

XCreateGC

CrGC.c

Create a new graphics context for a given screen with the depth of the specified drawable.

XCreateGlyphCursor

FontCursor.c

Create a cursor from font glyphs.

XCreateIC

IM.c

Creates a context within the specified input method.

XCreateImage

Image.c

Allocate memory for an XImage structure.

XCreatePixmap

CrPixmap.c

Create a pixmap.

XCreatePixmapCursor

CrCursor.c

Create a cursor from two bitmaps.

XCreatePixmapFromBitmapData

CrPFBData.c

Create a pixmap with depth from bitmap data.

XCreateRegion

Region.c

Create a new empty region.

XCreateSimpleWindow

CrWindow.c

Create an unmapped InputOutput window.

XCreateWindow

Window.c

Create a window and set attributes.

XDefaultColormap

OpenDis.c

Return the default colormap ID on the specified screen

XDefaultColormapOfScreen

OpenDis.c

Return the default colormap ID on the specified screen

XDefaultDepth

OpenDis.c

Returns the depth (number of planes) of the root window.

XDefaultDepthOfScreen

OpenDis.c

Returns the depth (number of planes) of the root window.

XDefaultRootWindow

OpenDis.c

Returns the root window of the default screen.

XDefaultScreen

OpenDis.c

Returns the default screen number referenced by XOpenDisplay()

XDefaultScreenOfDisplay

OpenDis.c

Returns a pointer to the Screen structure of the default screen.

XDefaultVisual

OpenDis.c

Return the default visual of the specified screen.

XDefineCursor

DefCursor.c

Assign a cursor to a window.

XDeleteContext

Context.c

Delete a context entry for a given window and type.

XDeleteProperty

ChProperty.c

Delete a window property.

XDestroyRegion

Region.c

Deallocate storage associated with a region.

XDestroyWindow

DestWindow.c

Unmap and destroy a window and all subwindows.

XDisplayHeight

Screen.c

Returns an integer that describes the height of the screen in pixels.

XDisplayKeycodes

GetPntMap.c

Returns the min- and max-keycodes supported by the specified display

XDisplayName

OpenDis.c

Report the display name when connection to a display fails.

XDisplayOfIM

IM.c

Returns the display associated with the specified input method.

XDisplayString

XMisc.c

Returns the string that was passed to XOpenDisplay() when the current display was opened.

XDisplayWidth

Screen.c

Return the width of the screen in pixels.

XDrawArc

DrArc.c

Draw an arc fitting inside a rectangle.

XDrawArcs

DrArc.c

Draw multiple arcs.

XDrawImageString

Text.c

Draw 8-bit image text characters.

XDrawImageString16

Text16.c

Draw 16-bit image text characters.

XDrawLine

DrLine.c

Draw a line between two points.

XDrawLines

DrLines.c

Draw multiple connected lines.

XDrawPoint

DrPoint.c

Draw a point.

XDrawPoints

DrPoint.c

Draw multiple points.

XDrawRectangle

DrRect.c

Draw an outline of a rectangle.

XDrawRectangles

DrRect.c

Draw the outlines of multiple rectangles.

XDrawSegments

DrLines.c

Draw multiple disjoint lines.

XDrawString

Text.c

Draw an 8-bit text string, foreground only.

XDrawString16

Text16.c

Draw two-byte text strings.

XDrawText16

Text16.c

Draw 16-bit polytext strings.

XEHeadOfExtensionList

Extension.c

Returns a pointer to the list of extension structures attached to the specified object (XEDataObject).

XEmptyRegion

Region.c

Determine if a region is empty.

XEqualRegion

Region.c

Determine if two regions have the same size, offset, and shape.

XEventsQueued

NextEvent.c

Check the number of events in the event queue.

XExtentsOfFontSet

FontInfo.c

Returns an XFontSetExtents structure.

XFillArc

DrArc.c

Fill an arc.

XFillArcs

DrArc.c

Fill multiple arcs.

XFillPolygon

FillPolygon.c

Fill a polygon.

XFillRectangle

Fillrect.c

Fill a rectangular area.

XFillRectangles

Fillrect.c

Fill multiple rectangular areas.

XFindContext

Context.c

Get data from the context manager (not graphics context).

XFindOnExtensionList

Extension.c

Returns the first extension data structure for the extension numbered number.

XFlush

Flush.c

Flush the output buffer (display all queued requests).

XFlushGC

GrGC.c

Force any cached changes to the GC to be flushed to the server.

XFree

Free.c

Free specified in-memory data created by an Xlib function.

XFreeColormap

Colormap.c

Delete a colormap and install the default colormap.

XFreeColors

AllocColor.c

Free colormap cells or planes.

XFreeCursor

CrCursor.c

Destroy a cursor.

XFreeFont

QueryFont.c

Unload a font and free storage for the font structure.

XFreeFontInfo

FontInfo.c

Free multiple font information arrays.

XFreeFontPath

find-font.c

Free the memory allocated by XGetFontPath.

XFreeGC

FreeGC.c

Free a graphics context.

XFreeModifiermap

GetPntMap.c

Destroy and free a keyboard modifier mapping structure.

XFreePixmap

CrPixmap.c

Free a pixmap ID.

XFreeStringList

TextToStr.c

Releases memory allocated by XmbTextPropertyToTextList() and XTextPropertyToStringList() and the missing charset list by XCreateFontSet().

XGContextFromGC

CrGC.c

Obtain the GContext (resource ID) associated with the specified graphics context.

XGetAtomName

Atom.c

Get a name for a given atom.

XGetAtomNames

Atom.c

Returns the names associated with the specified atoms in the names_return array.

XGetClassHint

ClassHint.c

Get the XA_WM_CLASS property of a window.

XGetCommand

GetWMProps.c

Reads the WM_COMMAND property from the specified window.

XGetFontPath

font-find.c

Get the current font search path.

XGetFontProperty

font-find.c

Get a font property given its atom.

XGetGCValues

GetGCVals.c

Returns the components specified by valuemask for the specified GC.

XGetGeometry

GetGeom.c

Obtain the current geometry of drawable.

XGetImage

Image.c

Place contents of a rectangle from drawable into an image.

XGetInputFocus

SetIFocus.c

Return the current keyboard focus window.

XGetKeyboardMapping

GetPntMap.c

Return symbols for keycodes.

XGetModifierMapping

GetPntMap.c

Obtain a mapping of modifier keys (Shift, Control, etc.)

XGetPointerMapping

GetPntMap.c

Get the pointer button mapping.

XGetRGBColormaps

Colormap.c

Returns the RGB colormap definitions stored in the specified property on the named window.

XGetSelectionOwner

Selection.c

Return the owner of a selection.

XGetSubImage

Image.c

Copy a rectangle in drawable to a location within the preexisting image.

XGetTextProperty

GetWMProps.c

Reads the specified property from the window and stores the data in the returned XTextProperty structure.

XGetTransientForHint

ClassHint.c

Get the XA_WM_TRANSIENT_FOR property of a window.

XGetVisualInfo

Visual.c

Find a visual information structure that matches the specified template.

XGetWindowAttributes

WindowProperty.c

Obtain the current attributes of window.

XGetWindowProperty

ChProperty.c

Obtain the atom type and property format for a window.

XGetWMClientMachine

GetWMProps.c

Calls XGetTextProperty() to return the WM_CLIENT_MACHINE property.

XGetWMHints

GetWMProps.c

Reads the window manager hints and returns a pointer to a XWMHints structure.

XGetWMIconName

GetWMProps.c

Calls XGetTextProperty() to obtain the WM_ICON_NAME property.

XGetWMName

GetWMProps.c

Calls XGetTextProperty() to obtain the WM_NAME property.

XGetWMProtocols

SetWMProto.c

Returns the list of atoms stored in the WM_PROTOCOLS property on the specified window.

XIfEvent

NextEvent.c

Wait for matching event.

XInitExtension

Extension.c

Allocates storage for the information about the extension on the connection.

XInitImage

Image.c

Initializes the internal image manipulation routines of an image structure.

XInternAtom

Atom.c

Return an atom for a given name string.

XInternAtoms

Atom.c

Returns the atom identifiers associated with the specified names.

XIntersectRegion

Region.c

Compute the intersection of two regions.

XkbTranslateKeySym

XKB.c

Find the string and symbol associated with a keysym for a given keyboard state

XKeycodeToKeysym

StrKeysym.c

Convert a keycode to a keysym.

XKeysymToKeycode

StrKeysym.c

Convert a keysym to the appropriate keycode.

XKeysymToString

StrKeysym.c

Convert a keysym symbol to a string.

XListDepths

Screen.c

Returns the array of depths that are available on the specified screen.

XListFonts

font-find.c

Return a list of the available font names.

XListPixmapFormats

ListPix.c

Returns an array of XPixmapFormatValues structures that describe the types of Z format images supported.

XLoadFont

font-find.c

Load a font if not already loaded; get font ID.

XLoadQueryFont

QueryFont.c

Load a font and fill information structure.

XLocaleOfIM

IM.c

Returns the locale associated with the specified input method.

XLockDisplay

Threads.c

Locks out all other threads from using the specified display.

XLookupColor

ParseColor.c

Get database RGB values and closest hardware-supported RGB values from color name.

XLookupKeysym

StrKeysym.c

Get the keysym corresponding to a keycode in structure.

XLookupString

StrKeysym.c

Map a key event to ASCII string, keysym, and ComposeStatus.

XLowerWindow

LowerWin.c

Lower a window in the stacking order.

XMapRaised

MapRaised.c

Map a window on top of its siblings.

XMapSubwindows

MapWindow.c

Map all subwindows.

XMapWindow

MapWindow.c

Map a window.

XMaskEvent

NextEvent.c

Remove the next event that matches mask.

XMatchVisualInfo

Visual.c

Obtain the visual information that matches the desired depth and class.

XmbLookupString

IM.c

Returns the string from the input method specified

XMoveResizeWindow

MoveWin.c

Change the size and position of a window.

XMoveWindow

MoveWin.c

Move a window.

XNextEvent

NextEvent.c

Get the next event of any type or window.

XNextRequest

Request.c

Extracts the full serial number that is to be used for the next request.

XNoOp

Sync.c

Send a NoOp to exercise connection with the server.

XOffsetRegion

Region.c

Change offset of a region.

XOpenDisplay

Opendis.c

Connect a client program to an X server.

XOpenIM

IM.c

Opens an input method, matching the current locale and modifiers specification.

XParseColor

ParseColor.c

Look up or translate RGB values from ASCII color name or hexadecimal value.

XPeekEvent

NextEvent.c

Get an event without removing it from the queue.

XPending

NextEvent.c

Flush the output buffer and return the number of pending input events.

XPointInRegion

Region.c

Determine if a point is inside a region.

XPolygonRegion

Region.c

Generate a region from points.

XPutBackEvent

NextEvent.c

Push an event back on the input queue.

XPutImage

Image.c

Draw a rectangular image on a window or pixmap.

XQLength

NextEvent.c

Return the length of the event queue for the connected display.

XQueryBestSize

QueryBest.c

Obtain the “best” supported cursor, tile, or stipple size.

XQueryColor

QueryColor.c

Obtain the RGB values and flags for a specified pixel value.

XQueryColors

QueryColor.c

Obtain RGB values for an array of pixel values.

XQueryExtension

Extension.c

Get extension information.

XQueryFont

QueryFont.c

Return information about a loaded font.

XQueryPointer

QueryPointer.c

Get the current pointer location.

XQueryTree

QueryTree.c

Return a list of children, parent, and root.

XRaiseWindow

RaiseWin.c

Raise a window to the top of the stacking order.

XReadBitmapFile

XMisc.c

Read a bitmap from disk.

XReadBitmapFileData

XMisc.c

Reads in a file containing a bitmap returning the data directly without creating a pixmap in the server.

XRectInRegion

Region.c

Determine if a rectangle resides in a region.

XRefreshKeyboardMapping

StrKeysym.c

Update the stored modifier and keymap information.

XRemoveFromSaveSet

ChSaveSet.c

Remove a window's children from the client's save-set.

XReparentWindow

RepWindow.c

Change a window's parent.

XResizeWindow

ChWindow.c

Change a window's size.

XRootWindow

OpenDis.c

Returns the root window.

XRootWindowOfScreen

OpenDis.c

Returns the root window.

XSaveContext

Context.c

Save a data value corresponding to a window and context type (not graphics).

XScreenNumberOfScreen

OpenDis.c

Returns a screen number given a pointer to a Screen structure.

XSelectInput

SelInput.c

Select the event types to be sent to a window.

XServerVendor

OpenDis.c

Returns the vendor of connected server.

XSetClassHint

ClassHint.c

Set the XA_WM_CLASS property of a window.

XSetLocaleModifiers

Locale.c

Sets the X modifiers for the current locale setting.

XSetNormalHints

ClassHint.c

Set the size hints property of a window in normal state (not zoomed or iconified).

XSetTextProperty

SetWMProps.c

Replaces the existing specified property for the named window.

XSetTransientForHint

ClassHint.c

Set the XA_WM_TRANSIENT_FOR property of a window.

XSetWMClientMachine

SetWMProps.c

Calls XSetTextProperty() to set the WM_CLIENT_MACHINE property.

XSetWMProtocols

SetWMProto.c

replaces the WM_PROTOCOLS property on the specified window.

XSetWMSizeHints

SetWMProps.c

Replaces the size hints for the specified property on the named window.

XSetBackground

CrGC.c

Set the background pixel value in a graphics context.

XSetClipMask

SetClip.c

Set clip_mask pixmap in a graphics context.

XSetClipOrigin

SetClip.c

Set the clip origin in a graphics context.

XSetClipRectangles

SetClip.c

Change clip_mask in a graphics context to the list of rectangles.

XSetDashes

CrGC.c

Set dash_offset and dashes (for lines) in a graphics context.

XSetFillStyle

CrGC.c

Set the fill style in a graphics context.

XSetFont

CrGC.c

Set the current font in a graphics context.

XSetFontPath

font-find.

Set the font search path.

XSetForeground

CrGC.c

Set the foreground pixel value in a graphics context.

XSetGraphicsExposures

CrGC.c

Set graphics_exposures in a graphics context.

XSetIOErrorHandler

ErrorHandler.c

Sets the fatal I/O error handler.

XSetIconName

StName.c

Set the name to be displayed in a window's icon.

XSetInputFocus

SetIFocus.c

Set the keyboard focus window.

XSetLineAttributes

SetAttributes.c

Set the line drawing components in a graphics context.

XSetRegion

Region.c

Set clip_mask of the graphics context to the specified region.

XSetSelectionOwner

Selection.c

Set the owner of a selection.

XSetStipple

CrGC.c

Set the stipple in a graphics context.

XSetSubwindowMode

CrGC.c

Set the subwindow mode in a graphics context.

XSetTSOrigin

CrGC.c

Sets the tile/stipple origin in the specified GC

XSetTile

CrGC.c

Set the fill tile in a graphics context.

XSetTransientForHint

SetWMProps.c

Set the XA_WM_TRANSIENT_FOR property of a window.

XSetWMHints

SetWMProps.c

Sets the window manager hints.

XSetWMIconName

SetWMProps.c

Sets the WM_ICON_NAME property.

XSetWMName

SetWMProps.c

Sets the WM_NAME property.

XSetWMNormalHints

SetWMProps.c

Replaces the size hints for the WM_NORMAL_HINTS property on the specified window.

XSetWMProperties

SetWMProps.c

Sets the window properties for communicating with other clients, e.g. window and session managers.

XSetWindowBackground

Backgnd.c

Set the background pixel attribute of a window.

XSetWindowBackgroundPixmap

PmapBgnd.c

Change the background tile attribute of a window.

XSetWindowBorder

Border.c

Change a window border attribute to the specified pixel value and repaint the border.

XSetWindowBorderWidth

BdrWidth.c

Change the border width of a window.

XShapeQueryExtension

Shape.c

Returns True if the specified display supports the SHAPE extension else False.

XShapeQueryVersion

Shape.c

The major and minor version numbers of the extension supported by the display are set.

XStoreBuffer

XMisc.c

Store data in a cut buffer.

XStoreBytes

XMisc.c

Store data in cut buffer 0.

XStoreName

StName.c

Assign a name to a window for the window manager.

XStringListToTextProperty

StrToText.c

Set the specified list of strings to an XtextProperty structure.

XStringToKeysym

StrKeysym.c

Convert a keysym name string to a keysym.

XSubtractRegion

Region.c

Subtract one region from another.

XSync

Sync.c

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

XTextExtents

TextExt.c

Get string and font metrics.

XTextExtents16

TextExt.c

Get string and font metrics of a 16-bit character string.

XTextPropertyToStringList

TextToStr.c

Returns a list of strings representing the null-separated elements of the specified XTextProperty structure.

XTextWidth

TextExt.c

Get the width in pixels of an 8-bit character string.

XTextWidth16

TextExt.c

Get the width in pixels of a 16-bit character string.

XTranslateCoordinates

QueryPointer.c

Change the coordinate system from one window to another.

XUndefineCursor

UndefCurs.c

Disassociate a cursor from a window.

XUnionRectWithRegion

Region.c

Add a rectangle to a region.

XUnionRegion

Region.c

Compute the union of two regions.

XUnloadFont

UnloadFont.c

Unload a font.

XUnLockDisplay

Threads.c

Allows other threads to use the specified display again.

XUnmapWindow

UnmapWindow.c

Unmap a window.

XVisualIDFromVisual

OpenDis.c

Returns the visual ID for the specified visual type.

XWhitePixel

OpenDis.c

Returns the white pixel value in a screen's default colormap.

XWindowEvent

NextEvent.c

Remove the next event matching mask and window.

XWithdrawWindow

UnmapWindow.c

Unmap a window.

XXorRegion

Region.c

Calculate the difference between the union and intersection of two regions.

XmbSetWMProperties

SetWMProps.c

Sets the window properties for communicating with other clients, e.g. window and session managers.

XmbTextListToTextProperty

StrToText.c

Convert an internationalized multi-byte text list to a text property structure.

XrmCombineDatabase

Xrm.c

Merges the contents of one database into another.

XrmCombineFileDatabase

Xrm.c

Merges the contents of a resource file into a database.

XrmDestroyDatabase

Xrm.c

Destroy a resource database and free its allocated memory.

XrmEnumerateDatabase

Xrm.c

Enumerate the entries of a database.

XrmGetFileDatabase

Xrm.c

Retrieve a database from disk.

XrmGetResource

Xrm.c

Retrieves a resource from the specified database.

XrmGetStringDatabase

Xrm.c

Create a database from a string.

XrmInitialize

Xrm.c

Initialize the resource manager.

XrmLocaleOfDatabase

Xrm.c

Obtains the locale name of a database.

XrmMergeDatabases

Xrm.c

Merges the contents of one database into another; overrides.

XrmParseCommand

ParseCmd.c

Loads a resource database from a C command line

XrmPutFileDatabase

Xrm.c

Store a copy of a database to disk.

XrmPutLineResource

Xrm.c

Adds a single resource entry to the specified database.

XrmPutResource

Xrm.c

Store resources into the database.

XrmPutStringResource

Xrm.c

Adds a resource with the specified value to the specified database.

XrmQGetResource

Xrm.c

Retrieves a resource from a resource database.

XrmQGetSearchList

Xrm.c

Obtains a list of database levels.

XrmQGetSearchResource

Xrm.c

Search resource database levels for a given resource.

XrmQPutResource

Xrm.c

If a resource entry with the identical bindings and quarks already exists in the database, the previous type and value are replaced.

XrmQPutStringResource

Xrm.c

Add a string resource using quarks as a specification.

XrmSetDataBase

Xrm.c

Associates a resource database with a display.

XrmStringToBindingQuarkList

Xrm.c

Convert a string with one or more components to a binding list and a quark list.

XrmStringToQuarkList

Xrm.c

Convert a string with one or more components to a quark list.

Xutf8SetWMProperties

SetWMProps.c

Sets the window properties for communicating with other clients, e.g. window and session managers.

XwcFreeStringList

StrToText.c

Free the in-memory data associated with the specified wide character string list.

XwcTextListToTextProperty

StrToText.c

Convert a list of text strings to an XTextProperty structure.

XwcTextPropertyToTextList

StrToText.c

Obtain a list of text strings from an XTextProperty structure.