xcb_shm_create_pixmap(3)

πŸ“¦
version 1.17.0 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 with xcb_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 a Value error results. zero is NOT the move here ⚠️
  • height β€” The height of the pixmap to create. Must be nonzero, or a Value error results. same energy, fr fr
  • depth β€” The depth of the pixmap to create. Must be nonzero, or a Value error 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, iykyk
  • offset β€” 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 πŸŽ€πŸ’œβœ¨