xcb_input_set_device_mode(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

✨ NAME ✨

xcb_input_set_device_mode β€” bestie, it's a request from the xcb-input family (this one lives in the XCB Requests manual, section 3), and the manpage literally gives us no one-liner for it. So: it sets a device mode. That's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

okay so first, you gotta pull in the header:

#include <xcb/xinput.h>

πŸŽ€ Request function

xcb_input_set_device_mode_cookie_t
       xcb_input_set_device_mode(xcb_connection_t *conn,
       uint8_t device_id, uint8_t mode);

πŸ¦‹ Reply datastructure

typedef struct xcb_input_set_device_mode_reply_t {
    uint8_t  response_type;
    uint8_t  xi_reply_type;
    uint16_t sequence;
    uint32_t length;
    uint8_t  status;
    uint8_t  pad0[23];
} xcb_input_set_device_mode_reply_t;

πŸ’– Reply function

xcb_input_set_device_mode_reply_t
       *xcb_input_set_device_mode_reply(xcb_connection_t *conn,
       xcb_input_set_device_mode_cookie_t cookie,
       xcb_generic_error_t **e);

🫢 REQUEST ARGUMENTS 🫢

  • conn β€” the XCB connection to X11, your lil hotline to the server πŸ’Œ
  • device_id β€” TODO: NOT YET DOCUMENTED. yeah. the manpage says that. not me exposing the docs gap 😭
  • mode β€” TODO: NOT YET DOCUMENTED. also undocumented, bestie. we simply do not know. πŸ™ˆ

πŸ’œ REPLY FIELDS πŸ’œ

  • response_type β€” the type of this reply, and in this specific case it's XCB_INPUT_SET_DEVICE_MODE. this field also lives in xcb_generic_reply_t, so you can use it to tell your replies apart from each other πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server processed πŸ”’
  • length β€” how long the reply is, measured in words (and a word is 4 bytes, no cap) πŸ“
  • xi_reply_type β€” TODO: NOT YET DOCUMENTED. mysterious. enigmatic. main character energy ✨
  • status β€” TODO: NOT YET DOCUMENTED. also a mystery, we move πŸ’€

🌈 DESCRIPTION 🌈

...so the DESCRIPTION section is empty. like, completely empty. the manpage just hands you a blank space and walks away 🧚


⭐ RETURN VALUE ⭐

It hands back an xcb_input_set_device_mode_cookie_t πŸͺ and β€” important β€” errors have to be handled when you call the reply function xcb_input_set_device_mode_reply.

If you'd rather handle your errors in the event loop instead, use xcb_input_set_device_mode_unchecked. See xcb-requests(3) for the details, bestie, it's all in there πŸ’–


πŸ”₯ ERRORS πŸ”₯

This request does never generate any errors. zero. none. not a single one. iconic behaviour honestly πŸ’…βœ¨

🌸 SEE ALSO 🌸

(empty. nothing to see here. the void stares back 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

Generated from xinput.xml. Contact xcb@lists.freedesktop.org for corrections and improvements πŸ’Œ


and that's the whole page, bestie!! πŸ’– this lil legend came out of X Version 11, libxcb 1.17.0, and it's filed under xcb_input_set_device_mode(3) β€” go forth and set some device modes, you absolute icon πŸŽ€πŸ¦‹β­