1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
/* See LICENSE file for copyright and license details. */
struct libaxl_event_key_press {
#define LIBAXL_EVENT_KEY_PRESS 2
uint8_t code;
libaxl_keycode_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_key_release {
#define LIBAXL_EVENT_KEY_RELEASE 3
uint8_t code;
libaxl_keycode_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_key_press_release {
/* key_{press,release} */
uint8_t code;
libaxl_keycode_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_button_press {
#define LIBAXL_EVENT_BUTTON_PRESS 4
uint8_t code;
libaxl_button_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_button_release {
#define LIBAXL_EVENT_BUTTON_RELEASE 5
uint8_t code;
libaxl_button_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_button_press_release {
/* button_{press,release} */
uint8_t code;
libaxl_button_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_motion_notify {
#define LIBAXL_EVENT_MOTION_NOTIFY 6
uint8_t code;
uint8_t detail; /* LIBAXL_NORMAL or LIBAXL_HINT */
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_input_device_event {
/* {key,button}_{press,release}, motion_notify */
uint8_t code;
uint8_t detail;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
libaxl_bool_t same_screen;
uint8_t __unused[1];
};
struct libaxl_event_enter_notify {
#define LIBAXL_EVENT_ENTER_NOTIFY 7
uint8_t code;
uint8_t detail; /* See "pointer window details" in libaxl-consts.h */
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, or LIBAXL_UNGRAB */
uint8_t flags; /* TODO #x01 = Focus, #x02 = Same-screen */
};
struct libaxl_event_leave_notify {
#define LIBAXL_EVENT_LEAVE_NOTIFY 8
uint8_t code;
uint8_t detail; /* See "pointer window details" in libaxl-consts.h */
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, or LIBAXL_UNGRAB */
uint8_t flags; /* TODO #x01 = Focus, #x02 = Same-screen */
};
struct libaxl_event_pointer_window_event {
/* {enter,leave}_notify */
uint8_t code;
uint8_t detail; /* See "pointer window details" in libaxl-consts.h */
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t root;
libaxl_window_t event;
libaxl_window_t child; /* Can be LIBAXL_NONE */
int16_t root_x;
int16_t root_y;
int16_t event_x;
int16_t event_y;
libaxl_keybutmask_t state;
uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, or LIBAXL_UNGRAB */
uint8_t flags; /* TODO #x01 = Focus, #x02 = Same-screen */
};
struct libaxl_event_focus_in {
#define LIBAXL_EVENT_FOCUS_IN 9
uint8_t code;
uint8_t detail; /* See "window focus details" in libaxl-consts.h (Beware of namespacing!) */
uint16_t sequence_number;
libaxl_window_t window;
uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, LIBAXL_UNGRAB, or LIBAXL_WHILE_GRABBED */
uint8_t __unused[23];
};
struct libaxl_event_focus_out {
#define LIBAXL_EVENT_FOCUS_OUT 10
uint8_t code;
uint8_t detail; /* See "window focus details" in libaxl-consts.h (Beware of namespacing!) */
uint16_t sequence_number;
libaxl_window_t window;
uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, LIBAXL_UNGRAB, or LIBAXL_WHILE_GRABBED */
uint8_t __unused[23];
};
struct libaxl_event_input_focus_event {
/* focus_{in,out} */
uint8_t code;
uint8_t detail; /* See "window focus details" in libaxl-consts.h (Beware of namespacing!) */
uint16_t sequence_number;
libaxl_window_t window;
uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, LIBAXL_UNGRAB, or LIBAXL_WHILE_GRABBED */
uint8_t __unused[23];
};
struct libaxl_event_keymap_notify {
#define LIBAXL_EVENT_KEYMAP_NOTIFY 11
uint8_t code;
uint8_t keys[31]; /* Byte for keycodes 0-7, which are unused, is omitted */
};
struct libaxl_event_expose {
#define LIBAXL_EVENT_EXPOSE 12
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t window;
uint16_t x;
uint16_t y;
uint16_t width;
uint16_t height;
uint16_t count;
uint8_t __unused[14];
};
struct libaxl_event_graphics_exposure {
#define LIBAXL_EVENT_GRAPHICS_EXPOSURE 13
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_drawable_t drawable;
uint16_t x;
uint16_t y;
uint16_t width;
uint16_t height;
uint16_t minor_opcode;
uint16_t count;
uint8_t major_opcode;
uint8_t __unused[11];
};
struct libaxl_event_no_exposure {
#define LIBAXL_EVENT_NO_EXPOSURE 14
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_drawable_t drawable;
uint16_t minor_opcode;
uint8_t major_opcode;
uint8_t __unused[21];
};
struct libaxl_event_visibility_notify {
#define LIBAXL_EVENT_VISIBILITY_NOTIFY 15
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_drawable_t drawable;
uint8_t state; /* LIBAXL_UNOBSCURED, LIBAXL_PARTIALLY_OBSCURED, or LIBAXL_FULLY_OBSCURED */
uint8_t __unused[23];
};
struct libaxl_event_create_notify {
#define LIBAXL_EVENT_CREATE_NOTIFY 16
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t parent;
libaxl_window_t window;
int16_t x;
int16_t y;
int16_t width;
int16_t height;
int16_t border_width;
libaxl_bool_t override_redirect;
uint8_t __unused[9];
};
struct libaxl_event_destroy_notify {
#define LIBAXL_EVENT_DESTROY_NOTIFY 17
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
uint8_t __unused[20];
};
struct libaxl_event_unmap_notify {
#define LIBAXL_EVENT_UNMAP_NOTIFY 18
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
libaxl_bool_t from_configure;
uint8_t __unused[19];
};
struct libaxl_event_map_notify {
#define LIBAXL_EVENT_MAP_NOTIFY 19
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
libaxl_bool_t override_redirect;
uint8_t __unused[19];
};
struct libaxl_event_map_request {
#define LIBAXL_EVENT_MAP_REQUEST 20
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t parent;
libaxl_window_t window;
uint8_t __unused[20];
};
struct libaxl_event_reparent_notify {
#define LIBAXL_EVENT_REPARENT_NOTIFY 21
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
libaxl_window_t parent;
int16_t x;
int16_t y;
libaxl_bool_t override_redirect;
uint8_t __unused[11];
};
struct libaxl_event_configure_notify {
#define LIBAXL_EVENT_CONFIGURE_NOTIFY 22
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
libaxl_window_t above_sibling; /* Can be LIBAXL_NONE */
int16_t x;
int16_t y;
uint16_t width;
uint16_t height;
uint16_t border_width;
libaxl_bool_t override_redirect;
uint8_t __unused[5];
};
struct libaxl_event_configure_request {
#define LIBAXL_EVENT_CONFIGURE_REQUEST 23
uint8_t code;
uint8_t stack_mode; /* See "stack mode" in libaxl-consts.h */
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
libaxl_window_t sibling; /* Can be LIBAXL_NONE */
int16_t x;
int16_t y;
uint16_t width;
uint16_t height;
uint16_t border_width;
uint16_t value_mask;
#define LIBAXL_EVENT_CONFIGURE_REQUEST_X 0x0001U
#define LIBAXL_EVENT_CONFIGURE_REQUEST_Y 0x0002U
#define LIBAXL_EVENT_CONFIGURE_REQUEST_WIDTH 0x0004U
#define LIBAXL_EVENT_CONFIGURE_REQUEST_HEIGHT 0x0008U
#define LIBAXL_EVENT_CONFIGURE_REQUEST_BORDER_WIDTH 0x0010U
#define LIBAXL_EVENT_CONFIGURE_REQUEST_SIBLING 0x0020U
#define LIBAXL_EVENT_CONFIGURE_REQUEST_STACK_MODE 0x0040U
uint8_t __unused[4];
};
struct libaxl_event_gravity_notify {
#define LIBAXL_EVENT_GRAVITY_NOTIFY 24
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
int16_t x;
int16_t y;
uint8_t __unused[16];
};
struct libaxl_event_resize_request {
#define LIBAXL_EVENT_RESIZE_REQUEST 25
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t window;
uint16_t width;
uint16_t height;
uint8_t __unused[20];
};
struct libaxl_event_circulate_notify {
#define LIBAXL_EVENT_CIRCULATE_NOTIFY 26
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t event;
libaxl_window_t window;
uint32_t __unused1;
uint8_t place; /* LIBAXL_TOP or LIBAXL_BOTTOM */
uint8_t __unused[15];
};
struct libaxl_event_circulate_request {
#define LIBAXL_EVENT_CIRCULATE_REQUEST 27
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t parent;
libaxl_window_t window;
uint32_t __unused1;
uint8_t place; /* LIBAXL_TOP or LIBAXL_BOTTOM */
uint8_t __unused[15];
};
struct libaxl_event_property_notify {
#define LIBAXL_EVENT_PROPERTY_NOTIFY 28
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t window;
libaxl_atom_t atom;
uint8_t state; /* LIBAXL_NEW_VALUE or LIBAXL_DELETED */
uint8_t __unused[15];
};
struct libaxl_event_selection_clear {
#define LIBAXL_EVENT_SELECTION_CLEAR 29
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_timestamp_t time;
libaxl_window_t owner;
libaxl_atom_t selection;
uint8_t __unused[16];
};
struct libaxl_event_selection_request {
#define LIBAXL_EVENT_SELECTION_REQUEST 30
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */
libaxl_window_t owner;
libaxl_window_t requestor;
libaxl_atom_t selection;
libaxl_atom_t target;
libaxl_atom_t property; /* Can be LIBAXL_NONE */
uint8_t __unused[4];
};
struct libaxl_event_selection_notify {
#define LIBAXL_EVENT_SELECTION_NOTIFY 31
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */
libaxl_window_t requestor;
libaxl_atom_t selection;
libaxl_atom_t target;
libaxl_atom_t property; /* Can be LIBAXL_NONE */
uint8_t __unused[8];
};
struct libaxl_event_colormap_notify {
#define LIBAXL_EVENT_COLORMAP_NOTIFY 32
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
libaxl_window_t requestor;
libaxl_colormap_t colormap; /* Can be LIBAXL_NONE */
libaxl_bool_t new;
uint8_t state; /* LIBAXL_UNINSTALLED or LIBAXL_INSTALLED */
uint8_t __unused[18];
};
struct libaxl_event_client_message {
#define LIBAXL_EVENT_CLIENT_MESSAGE 33
uint8_t code;
uint8_t format; /* {8, 16, 32} */
uint16_t sequence_number;
libaxl_window_t window;
libaxl_atom_t type;
uint8_t __unused[20];
};
struct libaxl_event_mapping_notify {
#define LIBAXL_EVENT_MAPPING_NOTIFY 34
uint8_t code;
uint8_t __pad;
uint16_t sequence_number;
uint8_t request; /* LIBAXL_MODIFIER, LIBAXL_KEYBOARD, or LIBAXL_POINTER */
libaxl_keycode_t first_keycode;
uint8_t count;
uint8_t __unused[25];
};
union libaxl_event {
uint8_t code; /* Highest bit marks the event as sent with SendEvent */
/* .keymap_notify does not have a sequence number */
#include "libaxl-events-structs.h"
};
|