xcb_input_xi_get_property(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_input_xi_get_property ✨

okay bestie, so this one is a page from the XCB Requests corner of your friendly neighborhood libxcb β€” the whole family of xcb_input_xi_get_property(3) manual pages. It's giving "ask the X server what a device property actually says" energy, and honestly? Iconic. πŸ’–

Fair warning before we go any further: the NAME line is literally just the function name with nothing after it, the DESCRIPTION section is empty, and SEE ALSO is empty too. Not me defending it β€” that's just what's in there. πŸ‘‘ We keep it 100 around here.


πŸ¦‹ SYNOPSIS

First up, the include, because you always need it:

#include <xcb/xinput.h>

πŸŽ€ Request function

xcb_input_xi_get_property_cookie_t
       xcb_input_xi_get_property(xcb_connection_t *conn,
       xcb_input_device_id_t deviceid, uint8_t _delete,
       xcb_atom_t property, xcb_atom_t type, uint32_t offset,
       uint32_t len);

🌸 Reply datastructure

typedef struct xcb_input_xi_get_property_reply_t {
    uint8_t    response_type;
    uint8_t    pad0;
    uint16_t   sequence;
    uint32_t   length;
    xcb_atom_t type;
    uint32_t   bytes_after;
    uint32_t   num_items;
    uint8_t    format;
    uint8_t    pad1[11];
} xcb_input_xi_get_property_reply_t;

πŸ’… Reply function

xcb_input_xi_get_property_reply_t
       *xcb_input_xi_get_property_reply(xcb_connection_t *conn,
       xcb_input_xi_get_property_cookie_t cookie,
       xcb_generic_error_t **e);

🧚 Reply accessors

xcb_input_xi_get_property_items_t *xcb_input_xi_get_property_items
(const xcb_input_xi_get_property_request_t *reply)

🌈 REQUEST ARGUMENTS

  • conn β€” your xcb_connection_t to X11. The whole line to the server, basically.
  • deviceid β€” TODO: NOT YET DOCUMENTED. 😭
  • _delete β€” TODO: NOT YET DOCUMENTED. 😭
  • property β€” TODO: NOT YET DOCUMENTED. 😭
  • type β€” TODO: NOT YET DOCUMENTED. 😭
  • offset β€” TODO: NOT YET DOCUMENTED. 😭
  • len β€” TODO: NOT YET DOCUMENTED. 😭
no cap, that's genuinely all the page says for those. not me making stuff up, we don't do that here. 🫢

⭐ REPLY FIELDS

  • response_type β€” the type of this reply, and for this one it's XCB_INPUT_XI_GET_PROPERTY. This field also lives in the xcb_generic_reply_t, so you can peek at it to tell your replies apart from each other. Very "which one of y'all is this" of it. πŸ’…
  • sequence β€” the sequence number of the last request that the X11 server actually processed.
  • length β€” how long the reply is, in words. And yes, a word is 4 bytes. periodt.
  • type β€” TODO: NOT YET DOCUMENTED. 😭
  • bytes_after β€” TODO: NOT YET DOCUMENTED. 😭
  • num_items β€” TODO: NOT YET DOCUMENTED. 😭
  • format β€” TODO: NOT YET DOCUMENTED. 😭

πŸ’œ DESCRIPTION

(the original page leaves this section empty, bestie β€” it's giving mystery, it's giving "figure it out from the synopsis". πŸ™ˆ)


πŸ”₯ RETURN VALUE

You get back an xcb_input_xi_get_property_cookie_t. πŸͺ

Errors? Those have to be handled when you call the reply function, xcb_input_xi_get_property_reply.

But if you'd rather handle your errors in the event loop instead, use xcb_input_xi_get_property_unchecked. Head over to xcb-requests(3) for the deets.


πŸ’€ ERRORS

This request never generates any errors. Not one. Zero. Clean slate, no drama, we love to see it. ✨


πŸ‘‘ SEE ALSO

(nothing here in the original β€” she said nothing and left. 🌸)


πŸ¦‹ AUTHOR

Generated from xinput.xml. If you've got corrections or improvements, hit up xcb@lists.freedesktop.org. They're literally asking, so don't be shy. πŸ’Œ


cute lil sign-off: this page is from X Version 11, shipped with libxcb 1.17.0, and that's the whole vibe check. stay hydrated, read your docs, and remember: xcb_input_xi_get_property(3) said what it said. πŸ’–πŸŽ€πŸ¦‹