xcb_screensaver_query_info(3)
π xcb_screensaver_query_info π
okay bestie, so this one lives in the xcb_screensaver chapter of the XCB Requests manual (that's the manual name right there, mwah) β and it's genuinely one of the cutest little request/reply pairs in the whole library. no cap. let's get into it β¨
πΈ NAME πΈ
xcb_screensaver_query_info β the request that asks the X server "hey girl, what's the screensaver up to right now?" and gets a whole struct of tea back π«
β¨ SYNOPSIS β¨
first things first, you gotta include the header:
#include <xcb/screensaver.h>
π Request function π
xcb_screensaver_query_info_cookie_t
xcb_screensaver_query_info(xcb_connection_t *conn,
xcb_drawable_t drawable);
π¦ Reply datastructure π¦
here's the vibe of the reply, like the actual shape of the thing:
typedef struct xcb_screensaver_query_info_reply_t {
uint8_t response_type;
uint8_t state;
uint16_t sequence;
uint32_t length;
xcb_window_t saver_window;
uint32_t ms_until_server;
uint32_t ms_since_user_input;
uint32_t event_mask;
uint8_t kind;
uint8_t pad0[7];
} xcb_screensaver_query_info_reply_t;
π Reply function π
and here's how you actually go pick that reply up:
xcb_screensaver_query_info_reply_t
*xcb_screensaver_query_info_reply(xcb_connection_t *conn,
xcb_screensaver_query_info_cookie_t cookie,
xcb_generic_error_t **e);
π REQUEST ARGUMENTS π
connβ your XCB connection to X11. the whole lifeline, the main character, the group chat you're posting in π«Άdrawableβ TODO: NOT YET DOCUMENTED. yeah bestie, the docs just left it blank. iconic behaviour honestly π
π REPLY FIELDS π
response_typeβ the type of this reply, and in this case it'sXCB_SCREENSAVER_QUERY_INFO. this field is also chillin' insidexcb_generic_reply_t, so you can use it to tell your replies apart from each other. it's giving name-tag at a party π·οΈsequenceβ the sequence number of the last request the X11 server processed.lengthβ how long this reply is, in words. and a word here is 4 bytes, just so we're clear πstateβ TODO: NOT YET DOCUMENTED.saver_windowβ TODO: NOT YET DOCUMENTED.ms_until_serverβ TODO: NOT YET DOCUMENTED.ms_since_user_inputβ TODO: NOT YET DOCUMENTED.event_maskβ TODO: NOT YET DOCUMENTED.kindβ TODO: NOT YET DOCUMENTED.
not me listing a whole bunch of fields that the original docs literally describe as TODO: NOT YET DOCUMENTED π i'm keeping them exactly as they are, bestie β the vibes are preserved, the facts are untouched.
πΈ DESCRIPTION πΈ
...okay so the original page has this heading and then absolutely nothing under it. an empty section. a void. the silence is loud, fr fr π we respect it though. periodt.
β RETURN VALUE β
you get back an xcb_screensaver_query_info_cookie_t. and listen β errors have to be handled when you call the reply function xcb_screensaver_query_info_reply, that's not optional, that's the whole deal.
if you'd rather handle your errors in the event loop instead, then use xcb_screensaver_query_info_unchecked. see xcb-requests(3) for the details, iykyk π
π ERRORS π
good news bestie: this request does never generate any errors. zero drama. a peaceful queen π
π§ SEE ALSO π§
the original page leaves this one empty too β nothing listed, nothing linked, just vibes β¨
π AUTHOR π
generated from screensaver.xml. if you've got corrections or improvements, hit up xcb@lists.freedesktop.org π¬
X Version 11 πΈ libxcb 1.17.0 πΈ that's the source and version, bestie β and that's a wrap on xcb_screensaver_query_info(3). go forth and query, 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