XRecolorCursor(3)
π XRecolorCursor(3) β XLIB FUNCTIONS π
okay bestie, welcome to the XRecolorCursor(3) page β manual name is XLIB FUNCTIONS. we're doing three cursor besties: recolor, free, and query-best-size. let's get into it π
πΈ NAME πΈ
XRecolorCursor, XFreeCursor, XQueryBestCursor β manipulate cursors β¨
π¦ SYNTAX π¦
int XRecolorCursor(Display *display, Cursor cursor, XColor
*foreground_color, XColor *background_color);
int XFreeCursor(Display *display, Cursor cursor);
Status XQueryBestCursor(Display *display, Drawable d, unsigned int
width, unsigned int height, unsigned int *width_return, unsigned
int *height_return);
π ARGUMENTS π
background_colorβ specifies the RGB values for the background of the source.cursorβ specifies the cursor.dβ specifies the drawable, which indicates the screen.displayβ specifies the connection to the X server.foreground_colorβ specifies the RGB values for the foreground of the source.width,heightβ specify the width and height of the cursor that you want the size information for.width_return,height_returnβ return the best width and height that is closest to the specified width and height.
π DESCRIPTION π
okay so XRecolorCursor changes the color of the specified cursor, and if the cursor is being displayed on a screen, the change is visible immediately. ngl, the pixel members of the XColor structures are ignored; only the RGB values are used.
XRecolorCursor can generate a BadCursor error.
XFreeCursor deletes the association between the cursor resource ID and the specified cursor. the cursor storage is freed when no other resource references it. and bestie, the specified cursor ID should not be referred to again β like, do not touch it after this, fr fr.
XFreeCursor can generate a BadCursor error.
some displays allow larger cursors than other displays. XQueryBestCursor provides a way to find out what size cursors are actually possible on the display. it returns the largest size that can be displayed. applications should be prepared to use smaller cursors on displays that cannot support large ones. lowkey important, highkey practical π
XQueryBestCursor can generate a BadDrawable error.
π¨ DIAGNOSTICS π¨
BadCursorβ a value for aCursorargument does not name a definedCursor.BadDrawableβ a value for aDrawableargument does not name a definedWindoworPixmap.
π SEE ALSO π
XCreateColormap(3)XCreateFontCursor(3)XDefineCursor(3)Xlib - C Language X Interface
byeee π«Ά footer check: X Version 11 Β· libX11 1.8.14 Β· XRecolorCursor(3) β date not shown here, bestie π
periodt β¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms