diff options
author | Simon Ser <contact@emersion.fr> | 2024-02-28 11:31:54 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-02-28 11:31:54 +0100 |
commit | c45e97f3a54e9ebef6b90e92d2fda068b3f5e269 (patch) | |
tree | 3c25a888e42d75008787fcb8611228bf61e4b575 | |
parent | d83c15c318e60c7136c5abb5eac55189144d7bbd (diff) |
input-device: add doc comments
-rw-r--r-- | include/wlr/types/wlr_input_device.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/include/wlr/types/wlr_input_device.h b/include/wlr/types/wlr_input_device.h index 0bbf517b..141cf21f 100644 --- a/include/wlr/types/wlr_input_device.h +++ b/include/wlr/types/wlr_input_device.h @@ -16,19 +16,33 @@ enum wlr_button_state { WLR_BUTTON_PRESSED, }; +/** + * Type of an input device. + */ enum wlr_input_device_type { - WLR_INPUT_DEVICE_KEYBOARD, - WLR_INPUT_DEVICE_POINTER, - WLR_INPUT_DEVICE_TOUCH, - WLR_INPUT_DEVICE_TABLET_TOOL, - WLR_INPUT_DEVICE_TABLET_PAD, - WLR_INPUT_DEVICE_SWITCH, + WLR_INPUT_DEVICE_KEYBOARD, // struct wlr_keyboard + WLR_INPUT_DEVICE_POINTER, // struct wlr_pointer + WLR_INPUT_DEVICE_TOUCH, // struct wlr_touch + WLR_INPUT_DEVICE_TABLET_TOOL, // struct wlr_tablet_tool + WLR_INPUT_DEVICE_TABLET_PAD, // struct wlr_tablet_pad + WLR_INPUT_DEVICE_SWITCH, // struct wlr_switch }; +/** + * An input device. + * + * Depending on its type, the input device can be converted to a more specific + * type. See the various wlr_*_from_input_device() functions. + * + * Input devices are typically advertised by the new_input event in + * struct wlr_backend. + * + * The vendor/product are bus-specific identifiers. + */ struct wlr_input_device { enum wlr_input_device_type type; unsigned int vendor, product; - char *name; + char *name; // may be NULL struct { struct wl_signal destroy; |