xcb_get_atom_name(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_get_atom_name ✨

okay bestie, so this is a page from libxcb, the C bindings for the X protocol β€” specifically the xcb_get_atom_name(3) request. it's giving "I need to know what the heck this atom is actually called" energy, and honestly? iconic. let's get into it 🫢


🌸 NAME 🌸

xcb_get_atom_name β€” (the original manpage literally leaves this blank, so no cap, there is no one-line summary here. we're all just vibing off the title πŸ’€)


πŸŽ€ SYNOPSIS πŸŽ€

first things first, you gotta pull in the header:

#include <xcb/xproto.h>

Request function

xcb_get_atom_name_cookie_t xcb_get_atom_name(xcb_connection_t *conn,
       xcb_atom_t atom);

Reply datastructure

typedef struct xcb_get_atom_name_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t name_len;
    uint8_t  pad1[22];
} xcb_get_atom_name_reply_t;

Reply function

xcb_get_atom_name_reply_t
       *xcb_get_atom_name_reply(xcb_connection_t *conn,
       xcb_get_atom_name_cookie_t cookie, xcb_generic_error_t **e);

Reply accessors

these are the little helper girlies that dig the actual name out of the reply:

char *xcb_get_atom_name_name(const xcb_get_atom_name_request_t *reply);

int xcb_get_atom_name_name_length(const xcb_get_atom_name_reply_t
       *reply);

xcb_generic_iterator_t xcb_get_atom_name_name_end(const
       xcb_get_atom_name_reply_t *reply);

πŸ’… REQUEST ARGUMENTS πŸ’…

  • conn β€” your XCB connection to X11. the whole line to the server, basically. keep it alive bestie 🫢
  • atom β€” TODO: NOT YET DOCUMENTED.</p> like… the manpage itself is shrugging at us here. that's all it says. no notes. πŸ™ˆ

πŸ¦‹ REPLY FIELDS πŸ¦‹

  • response_type β€” what kind of reply this is, and in this case it's XCB_GET_ATOM_NAME. it also lives in the xcb_generic_reply_t, which is the move when you've got a pile of replies and you're trying to tell which one is which. very "how do you do, fellow replies" of it.
  • sequence β€” the sequence number of the last request the X11 server actually processed. basically the receipts ✨
  • length β€” how long the reply is, measured in words (and a word here is 4 bytes, periodt).
  • name_len β€” TODO: NOT YET DOCUMENTED.</p> yeah. again. the docs said "not my job" πŸ’€

🌈 DESCRIPTION 🌈

(the original page puts nothing here. zero. nada. a whole heading with no body. main character silence, honestly πŸ‘‘)


πŸ’– RETURN VALUE πŸ’–

you get back an xcb_get_atom_name_cookie_t. and listen β€” errors? you don't deal with them here. they have to be handled when you call the reply function xcb_get_atom_name_reply.

but if you'd rather handle errors in the event loop instead, use xcb_get_atom_name_unchecked. peek xcb-requests(3) for the deets πŸŽ€


πŸ”₯ ERRORS πŸ”₯

this request does never generate any errors. zero. none. not a single one. slay ✨


πŸ‘‘ SEE ALSO πŸ‘‘

(the original lists absolutely nothing here β€” it's an empty flex. no references, no crumbs, nothing to click. iykyk 🌸)


🌟 AUTHOR 🌟

Generated from xproto.xml. if you spot something wrong or wanna make it better, hit up xcb@lists.freedesktop.org for corrections and improvements πŸ’Œ


and that's the whole page, bestie!! this one came to you from X Version 11, rocking libxcb 1.17.0, and it's filed under xcb_get_atom_name(3). go forth and name those atoms πŸ’…βœ¨πŸ¦‹