xcb_shm_create_pixmap(3)
β¨ xcb_shm_create_pixmap β¨
okay bestie, so we're looking at xcb_shm_create_pixmap(3) today β yes it's from the XCB Requests crew, and yes it's lowkey iconic. sit with me, we're making a pixmap that lives in shared memory π
πΈ NAME πΈ
xcb_shm_create_pixmap β Create a pixmap backed by shared memory.
no cap, that's literally the whole thing. a pixmap. backed by shared memory. the way that it's that simple?? obsessed π
π SYNOPSIS π
#include <xcb/shm.h>
β¨ Request function β¨
xcb_void_cookie_t xcb_shm_create_pixmap(xcb_connection_t *conn,
xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width,
uint16_t height, uint8_t depth, xcb_shm_seg_t shmseg,
uint32_t offset);
okay so eight things go in, and you get a cookie back. it's giving very-many-parameters, but we roll π«Ά
π¦ REQUEST ARGUMENTS π¦
connβ The XCB connection to X11. your lil link to the server, bestie, hold onto it πpidβ A pixmap ID created withxcb_generate_id(). don't just make one up, please, that's not the vibe πdrawableβ The drawable to create the pixmap in.widthβ The width of the pixmap to create. Must be nonzero, or aValueerror results. zero is NOT the move here β οΈheightβ The height of the pixmap to create. Must be nonzero, or aValueerror results. same energy, fr frdepthβ The depth of the pixmap to create. Must be nonzero, or aValueerror results. three for three, do not pass zero πshmsegβ The shared memory segment to use to create the pixmap. the β¨sharedβ¨ part of shared memory, iykykoffsetβ The offset in the segment to create the pixmap at.
π DESCRIPTION π
Create a pixmap backed by shared memory. Writes to the shared memory will be reflected in the contents of the pixmap, and writes to the pixmap will be reflected in the contents of the shared memory.
okay do you see the vision?? it's a two-way street. you poke the shared memory, the pixmap updates. you poke the pixmap, the shared memory updates. they're basically holding hands. main character energy on BOTH sides ππ
π RETURN VALUE π
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop.
If you want to handle errors directly with xcb_request_check instead, use xcb_shm_create_pixmap_checked. See xcb-requests(3) for details.
so like. the cookie doesn't yell at you immediately. the errors show up later, in the event loop, like a text you left on read π« unless you go the _checked route, then you get the receipts right away β¨
π ERRORS π
This request does never generate any errors.
periodt. nothing. silence. no drama from this one, it simply does not π
(the Value errors up in REQUEST ARGUMENTS are about the nonzero thing, so keep those numbers nonzero and you're golden β)
π SEE ALSO π
π§ AUTHOR π§
Generated from shm.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
okay that's the whole page, bestie, you're officially informed πΈ
signing off from X Version 11, libxcb 1.17.0, dated xcb_shm_create_pixmap(3) β go forth and make pixmaps, you absolute icon ππβ¨
π¦ 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