I

The Cursor Font

A standard font consisting of a number of cursor shapes is available. This font is loaded automatically when XCreateFontCursor, the routine used to create a standard cursor, is called. To specify a cursor shape from the standard font, use one of the symbols defined in the file <X11/cursorfont.h>, by including it in your source code. The symbols for the available cursors and an illustration of their shapes is provided here. The procedure for creating a cursor is described in Volume One, Section 6.6.

You may notice that the symbol values skip the odd numbers; there are really two font characters for each shape but we are only showing you one. Each odd-numbered character (not shown) is a mask that selects which pixels in the screen around the cursor are modified.

The standard cursor shapes are shown in Figure I-1. The mask shapes have been removed. Each row in Figure I-1 contains twelve cursor shapes (except the last one). Table I-1 shows the symbol definitions from <X11/cursorfont.h> grouped by rows corresponding to the rows in Figure I-1.

images

Figure I-1. The Standard Cursors

Table I-1. Standard Cursor Symbols

images

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.