xcb_x_print_p..._printer_list(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_x_print_p..._printer_list(3) πŸ’–

okay bestie, buckle up β€” this is a page from XCB Requests, and the whole vibe is X Print, the X11 printing extension. yes, printing. from X11. iconic of her honestly. πŸŽ€


✨ NAME ✨

xcb_x_print_print_get_printer_list β€” and that's it. that's the whole description. the manpage literally left it blank, no cap. we're all just out here vibing with an empty tagline. 🫢


🌸 SYNOPSIS 🌸

first things first, you gotta bring in the header:

#include <xcb/xprint.h>

πŸ¦‹ Request function πŸ¦‹

this is the one you actually call to ask for the printer list:

xcb_x_print_print_get_printer_list_cookie_t
       xcb_x_print_print_get_printer_list(xcb_connection_t *conn,
       uint32_t printerNameLen, uint32_t localeLen, const
       xcb_x_print_string8_t *printer_name, const
       xcb_x_print_string8_t *locale);

πŸ¦‹ Reply datastructure πŸ¦‹

here's the lil struct the server sends back, all laid out:

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

πŸ¦‹ Reply function πŸ¦‹

and this is how you go pick up that reply, bestie:

xcb_x_print_print_get_printer_list_reply_t
       *xcb_x_print_print_get_printer_list_reply(xcb_connection_t *conn,
       xcb_x_print_print_get_printer_list_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ¦‹ Reply accessors πŸ¦‹

the little helper functions that reach into the reply for you:

int xcb_x_print_print_get_printer_list_printers_length(const
       xcb_x_print_print_get_printer_list_reply_t *reply);
xcb_x_print_printer_iterator_t
       xcb_x_print_print_get_printer_list_printers_iterator(const
       xcb_x_print_print_get_printer_list_reply_t *reply);

πŸ’… REQUEST ARGUMENTS πŸ’…

  • conn β€” the XCB connection to X11. your link to the whole server situation, the main character of every XCB call honestly.
  • printerNameLen β€” TODO: NOT YET DOCUMENTED. 😭 nobody wrote it down bestie, we just don't know.
  • localeLen β€” TODO: NOT YET DOCUMENTED. also a mystery. the docs ghosted us fr fr.
  • printer_name β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • locale β€” TODO: NOT YET DOCUMENTED. four for four, the whole argument list is un-documented and we respect the consistency lowkey.

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, which in this case is XCB_X_PRINT_PRINT_GET_PRINTER_LIST. this same field also lives in the xcb_generic_reply_t, and it's how you tell your replies apart from each other when they're all showing up in your inbox at once. πŸ’Œ
  • sequence β€” the sequence number of the last request that got processed by the X11 server. it's giving receipt number.
  • length β€” how long the reply is, measured in words. and before you ask: a word is 4 bytes. ✨
  • listCount β€” TODO: NOT YET DOCUMENTED. πŸ’€

⭐ DESCRIPTION ⭐

...okay so there is literally nothing here. the DESCRIPTION section is empty. the page said "I'm not gonna explain myself" and moved on. no notes, honestly. πŸ‘‘


πŸ“ RETURN VALUE πŸ“

this function hands you back an xcb_x_print_print_get_printer_list_cookie_t. cookies are the whole XCB thing β€” you get the cookie now, you cash it in later.

and that means: any errors? you have to deal with them when you call the reply function, xcb_x_print_print_get_printer_list_reply.

if you'd rather handle your errors in the event loop instead, use xcb_x_print_print_get_printer_list_unchecked β€” it skips the automatic error handling. the deets are in xcb-requests(3) if you want the full lore. πŸ“š


😭 ERRORS 😭

good news bestie: this request never generates any errors. not one. zero. it's the chillest request at the function. βœ¨πŸ¦‹


πŸ’œ SEE ALSO πŸ’œ

...yeah. this section is empty too. the page is just out here with no friends. we support her anyway. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Generated from xprint.xml. If you've got corrections or improvements, hit up xcb@lists.freedesktop.org β€” they'd love to hear from you. πŸ“§


and that's the whole page, babe. generated from xprint.xml, straight out of X Version 11, running libxcb 1.17.0 β€” so if you were wondering which version of this un-documented masterpiece you're reading, it's that one. periodt. πŸ’…βœ¨