xcb_input_grab_device_button(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_grab_device_button β€” from the XCB Requests manual, section 3

okay bestie, sit down, hydrate, and let's talk about grabbing buttons on a device ✨


✨ SYNOPSIS ✨

first things first, you gotta pull in the header:

#include <xcb/xinput.h>

and here's the request function, look at her go:

xcb_void_cookie_t xcb_input_grab_device_button(xcb_connection_t *conn,
       xcb_window_t grab_window, uint8_t grabbed_device,
       uint8_t modifier_device, uint16_t num_classes,
       uint16_t modifiers, uint8_t this_device_mode,
       uint8_t other_device_mode, uint8_t button, uint8_t owner_events,
       const xcb_input_event_class_t *classes);

πŸŽ€ REQUEST ARGUMENTS πŸŽ€

okay so every single one of these is literally marked TODO: NOT YET DOCUMENTED. in the original and i am not about to make stuff up, so here's the full roster, no cap:

  • conn β€” the XCB connection to X11. your lil link to the server, the main character of the whole operation 🫢
  • grab_window β€” TODO: NOT YET DOCUMENTED.
  • grabbed_device β€” TODO: NOT YET DOCUMENTED.
  • modifier_device β€” TODO: NOT YET DOCUMENTED.
  • num_classes β€” TODO: NOT YET DOCUMENTED.
  • modifiers β€” TODO: NOT YET DOCUMENTED.
  • this_device_mode β€” TODO: NOT YET DOCUMENTED.
  • other_device_mode β€” TODO: NOT YET DOCUMENTED.
  • button β€” TODO: NOT YET DOCUMENTED.
  • owner_events β€” TODO: NOT YET DOCUMENTED.
  • classes β€” TODO: NOT YET DOCUMENTED.
bestie i know, i know, it's giving "the docs simply did not show up to class today" 😭 but the vibe rule is sacred: every detail stays, and "NOT YET DOCUMENTED" is the detail. we don't invent lore. periodt πŸ’€

🌸 DESCRIPTION 🌸

(yeah. it's empty in the original. she said nothing, and honestly? iconic of her. nothing to report, no notes ✨)


πŸ¦‹ RETURN VALUE πŸ¦‹

you get back an xcb_void_cookie_t. and because she's void, any errors that show up have to be handled over in the event loop, okay? that's the assignment πŸ’…

but wait β€” if you'd rather handle errors directly with xcb_request_check instead, then use xcb_input_grab_device_button_checked. she's the checked girlie. see xcb-requests(3) for the deets πŸ‘‘


πŸ’œ ERRORS πŸ’œ

this request does never generate any errors. not one. zero. she's chill like that. 🧚


🌈 SEE ALSO 🌈

(homegirl left this one blank, so we're just vibing in the silence πŸŽ€)


⭐ AUTHOR ⭐

Generated from xinput.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. fr fr, if something's wrong, tell the humans πŸ’–


and that's the whole page bestie!! 🫢 thanks for reading, mwah πŸ’‹ β€” with love from the X Version 11, libxcb 1.17.0 era of the xcb_input_grab_device_button(3) page βœ¨πŸ‘‘