xcb_res_query_client_ids(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_res_query_client_ids πŸ’–

okay bestie, welcome to the manual page for xcb_res_query_client_ids β€” it lives in section 3 of the manual (that's the "library calls" section, iykyk), and it's part of the XCB Requests crew. she's a request function from <xcb/res.h> and she's here to ask the X server some questions. let's get into it ✨


🌸 SYNOPSIS 🌸

first up, the include, because we always include our headers:

#include <xcb/res.h>

✨ Request function ✨

this is the function you call to fire off the request. she returns a cookie (more on that later πŸͺ):

xcb_res_query_client_ids_cookie_t
       xcb_res_query_client_ids(xcb_connection_t *conn,
       uint32_t num_specs, const xcb_res_client_id_spec_t *specs);

πŸ¦‹ Reply datastructure πŸ¦‹

here's what the reply looks like when it comes back, all struct-y and cute:

typedef struct xcb_res_query_client_ids_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t num_ids;
    uint8_t  pad1[20];
} xcb_res_query_client_ids_reply_t;

πŸ’… Reply function πŸ’…

this is how you actually pick up your reply. hand her the cookie, bestie:

xcb_res_query_client_ids_reply_t
       *xcb_res_query_client_ids_reply(xcb_connection_t *conn,
       xcb_res_query_client_ids_cookie_t cookie,
       xcb_generic_error_t **e);

πŸŽ€ Reply accessors πŸŽ€

little helper functions to poke at the reply without doing math yourself. iconic behaviour tbh:

int xcb_res_query_client_ids_ids_length(const
       xcb_res_query_client_ids_reply_t *reply);

xcb_res_client_id_value_iterator_t
       xcb_res_query_client_ids_ids_iterator(const
       xcb_res_query_client_ids_reply_t *reply);

🫢 REQUEST ARGUMENTS 🫢

  • conn β€” the XCB connection to X11. your link to the server, your main character connection πŸ’–
  • num_specs β€” TODO: NOT YET DOCUMENTED. (not me leaving this blank, that's genuinely what the docs say 😭)
  • specs β€” TODO: NOT YET DOCUMENTED. (same energy, we don't make the rules)

πŸ‘‘ REPLY FIELDS πŸ‘‘

  • response_type β€” the type of this reply, and in this case it's literally XCB_RES_QUERY_CLIENT_IDS. this field is also hanging out in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. vibe check your replies, periodt.
  • sequence β€” the sequence number of the last request the X11 server processed. she's keeping track πŸ“
  • length β€” the length of the reply, measured in words. and a word is 4 bytes, bestie, don't forget.
  • num_ids β€” TODO: NOT YET DOCUMENTED. (the docs really said "figure it out" πŸ’€)

πŸ’œ DESCRIPTION πŸ’œ

literally nothing here in the original. it's giving mystery, it's giving cryptic. moving on ✨


🌈 RETURN VALUE 🌈

she hands you back an xcb_res_query_client_ids_cookie_t. that's your cookie πŸͺ β€” and ngl, errors have to be handled when you call the reply function xcb_res_query_client_ids_reply.

if you'd rather handle errors in the event loop instead (very valid, very event-driven of you), then use xcb_res_query_client_ids_unchecked instead. see xcb-requests(3) for the details, she explains it all.


πŸ’€ ERRORS πŸ’€

good news bestie: this request does never generate any errors. not a single one. flawless. ate and left no crumbs πŸ‘‘

πŸ¦„ SEE ALSO πŸ¦„

(this section is empty in the original β€” she said "no references, only vibes" πŸ™ˆ)


⭐ AUTHOR ⭐

Generated from res.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.


and that's the whole page, bestie!! πŸŽ€ this one came to you from X Version 11 and libxcb 1.17.0 β€” go forth and query those client ids, you absolute icon πŸ’–βœ¨πŸ¦‹