xcb_xinerama_get_screen_count(3)

πŸ“¦
version 1.17.0 Β· 4 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_xinerama_get_screen_count β€” the XCB Requests girlies know πŸ’…

okay so bestie, we're in the xcb_xinerama_get_screen_count(3) page, from the XCB Requests family, and honestly? it's a lil unhinged because half the docs are literally just "TODO: NOT YET DOCUMENTED." not me being the one to break it to you 😭 but we're gonna work with what we've got and we're gonna slay it anyway. periodt.


✨ NAME ✨

xcb_xinerama_get_screen_count β€” and that's it. that's the whole description. the original left it blank, fr fr. she's mysterious. she's giving mystery. πŸŽ€


✨ SYNOPSIS ✨

first things first, you gotta let her in:

#include <xcb/xinerama.h>

πŸ’œ Request function

here's the vibe β€” you send the request and get a cookie back:

xcb_xinerama_get_screen_count_cookie_t
       xcb_xinerama_get_screen_count(xcb_connection_t *conn,
       xcb_window_t window);

🌸 Reply datastructure

and this is the lil struct that holds the tea once it comes back:

typedef struct xcb_xinerama_get_screen_count_reply_t {
    uint8_t      response_type;
    uint8_t      screen_count;
    uint16_t     sequence;
    uint32_t     length;
    xcb_window_t window;
} xcb_xinerama_get_screen_count_reply_t;

πŸ¦‹ Reply function

then you come back for the actual reply, no cap:

xcb_xinerama_get_screen_count_reply_t
       *xcb_xinerama_get_screen_count_reply(xcb_connection_t *conn,
       xcb_xinerama_get_screen_count_cookie_t cookie,
       xcb_generic_error_t **e);

✨ REQUEST ARGUMENTS ✨

  • conn β€” the XCB connection to X11. your lil hotline to the server, she's the main character here πŸ‘‘
  • window β€” TODO: NOT YET DOCUMENTED. yeah. they said what they said. we move. πŸ™ˆ

✨ REPLY FIELDS ✨

  • response_type β€” the type of this reply, which in this case is XCB_XINERAMA_GET_SCREEN_COUNT. she also lives inside the xcb_generic_reply_t, so you can use her to tell your replies apart from each other. very "which one of y'all is which" energy πŸ’…
  • sequence β€” the sequence number of the last request that got processed by the X11 server. like a little timestamp but for order of operations, iykyk ⭐
  • length β€” the length of the reply, measured in words. and before you ask: a word is 4 bytes. a whole word. iconic unit choice, honestly 🌈
  • screen_count β€” TODO: NOT YET DOCUMENTED. bestie she's shy 🫢
  • window β€” TODO: NOT YET DOCUMENTED. also shy. they're shy together. it's giving mystery box πŸ’€

✨ DESCRIPTION ✨

...it's empty. that's the whole section. the original just put the heading there and dipped. no notes, she simply had nothing to say. leaving it exactly as the universe intended πŸŽ€


✨ RETURN VALUE ✨

she hands you back an xcb_xinerama_get_screen_count_cookie_t. πŸ“

and here's the important part, so listen up: errors have to be handled when you call the reply function, xcb_xinerama_get_screen_count_reply.

if you'd rather handle errors in the event loop instead, then you use xcb_xinerama_get_screen_count_unchecked. see xcb-requests(3) for the details, because they wrote that one down properly πŸ’–


✨ ERRORS ✨

good news bestie: this request does never generate any errors. never ever. zero. none. she's drama-free. we love a low-maintenance request 🌸

✨ SEE ALSO ✨

also empty. nothing here. a whole void. she said "see also: nothing, mind your business" πŸ’€


✨ AUTHOR ✨

Generated from xinerama.xml. if you wanna send corrections and improvements, contact xcb@lists.freedesktop.org β€” they're literally asking for the feedback, so go off 🫢


and that's the whole page, bestie!! you ate that. now go forth and get those screen counts ✨

this was X Version 11, libxcb 1.17.0, and you just read xcb_xinerama_get_screen_count(3) β€” mwah, love u, bye πŸ’…πŸ’–