xcb_create_glyph_cursor(3)
π xcb_create_glyph_cursor β create cursor
okay bestie, welcome to the xcb_create_glyph_cursor page, straight out of the XCB Requests corner of the manual π this one's a libxcb classic and we're gonna make a whole entire cursor out of a font glyph. iconic behavior honestly β¨
πΈ SYNOPSIS πΈ
#include <xcb/xproto.h>
β¨ Request function β¨
xcb_void_cookie_t xcb_create_glyph_cursor(xcb_connection_t *conn,
xcb_cursor_t cid, xcb_font_t source_font, xcb_font_t mask_font,
uint16_t source_char, uint16_t mask_char, uint16_t fore_red,
uint16_t fore_green, uint16_t fore_blue, uint16_t back_red,
uint16_t back_green, uint16_t back_blue);
π REQUEST ARGUMENTS π
connβ the XCB connection to X11, your lil hotline to the server π«Άcidβ the ID you're gonna use to refer to this cursor later, and you make it withxcb_generate_id. no cap, generate it first.source_fontβ which font we're digging through to find the actual cursor glyph πmask_fontβ which font we're digging through to find the mask glyphsource_charβ the glyph ofsource_fontthat you're usingmask_charβ the glyph ofmask_fontyou're using as a mask: pixels set to 1 define which source pixels get shown, and every pixel set to 0 does not get displayed. literally the vibe filter πfore_redβ the red value of the foreground colorfore_greenβ the green value of the foreground colorfore_blueβ the blue value of the foreground colorback_redβ the red value of the background colorback_greenβ the green value of the background colorback_blueβ the blue value of the background color
π¦ DESCRIPTION π¦
So what this does is it creates a cursor from a font glyph π X ships a set of standard cursor shapes in a special font named cursor, and applications are encouraged to use this interface for their cursors, because the font can be customized for the individual display type. it's giving adaptable, it's giving flexible, we love that for you π
Every pixel set to 1 in the source uses the foreground color (that's fore_red, fore_green and fore_blue). Every pixel set to 0 uses the background color (that's back_red, back_green and back_blue). that's it, that's the whole look πΈ
β RETURN VALUE β
It returns an xcb_void_cookie_t. Errors (if there are any, and bestie there might be) have to be handled in the event loop π
If you'd rather handle errors directly with xcb_request_check instead, use xcb_create_glyph_cursor_checked. See xcb-requests(3) for the details π
π ERRORS π
xcb_alloc_error_tβ the X server could not allocate the requested resources (no memory?? π)xcb_font_error_tβ thesource_fontormask_fontyou specified does not exist. rip to that font fr fr πxcb_value_error_tβ eithersource_charormask_charare not defined insource_fontormask_font, respectively. check your glyphs bestie, they gotta actually live in that font π
π SEE ALSO π
π AUTHOR π
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements π«Ά
okay that's the whole page, you ate that π
this was X Version 11, libxcb 1.17.0, and it's the xcb_create_glyph_cursor(3) manual page β go make something cute with your cursor, periodt β¨ππ¦
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms