XCreateFontCursor()XCreateFontCursor()NameXCreateFontCursor – create a cursor from the standard cursor font.
Synopsis
#include <X11/cursorfont.h>
Cursor XCreateFontCursor(display, shape)
Display *display;
unsigned int shape;
Arguments
display Specifies a connection to an X server; returned from XOpenDis‐
play().
shape Specifies which character in the standard cursor font should be
used for the cursor.
Returns
The created cursor.
Description
X provides a set of standard cursor shapes in a special font named
"cursor." Programs are encouraged to use this interface for their cur‐
sors, since the font can be customized for the individual display type
and shared between clients.
The hotspot comes from the information stored in the font. The initial
colors of the cursor are black for the foreground and white for the
background. XRecolorCursor() can be used to change the colors of the
cursor to those desired.
For more information about cursors and their shapes in fonts, see Ap‐
pendix I, The Cursor Font.
Errors
BadAlloc
BadFont
BadValue The shape argument does not specify a character in the stan‐
dard cursor font.
See AlsoXCreateGlyphCursor(), XCreatePixmapCursor(), XDefineCursor(), XFreeCur‐
sor(), XQueryBestCursor(), XQueryBestSize(), XRecolorCursor(), XUnde‐
fineCursor().
Xlib - Cursors XCreateFontCursor()