事件适配器适配 XCB_MAPPING_NOTIFY 和 XCB_BUTTON_PRESS 事件

This commit is contained in:
2025-09-30 21:40:12 +08:00
parent 0626a4c512
commit 6d9ff81f78
2 changed files with 31 additions and 7 deletions

View File

@@ -40,8 +40,15 @@ typedef enum notify_detail_t {
notify_detail_none = 7,
} notify_detail_t;
typedef enum mapping_t {
MAPPING_MODIFIER = 0,
MAPPING_KEYBOARD = 1,
MAPPING_POINTER = 2
} mapping_t;
typedef struct mapping_notify_event_t {
event_type_t type;
mapping_t request;
} mapping_notify_event_t;
typedef struct key_press_event_t {
@@ -52,6 +59,10 @@ typedef struct key_press_event_t {
typedef struct button_press_event_t {
event_type_t type;
xcb_window_t window;
xcb_window_t root;
int32_t x, y, root_x, root_y;
uint32_t time; /* 时间戳单位ms */
} button_press_event_t;
typedef struct configure_request_event_t {