|
ginnOS
The reference: libc, the libraries and the kernel
|
the events of /dev/input (ABI). More...
#include "common/stdint.h"Go to the source code of this file.
Data Structures | |
| struct | input_event_t |
Macros | |
| #define | EV_SYN 0x00 |
| #define | EV_KEY 0x01 |
| #define | EV_REL 0x02 |
| #define | EV_ABS 0x03 |
| #define | SYN_REPORT 0 |
| #define | SYN_DROPPED 3 |
| #define | REL_X 0x00 |
| #define | REL_Y 0x01 |
| #define | REL_WHEEL 0x08 |
| #define | ABS_X 0x00 |
| #define | ABS_Y 0x01 |
| #define | INPUT_ABS_MAX 32767 |
| #define | BTN_LEFT 0x110 |
| #define | BTN_RIGHT 0x111 |
| #define | BTN_MIDDLE 0x112 |
| #define | INPUT_IOC_GRAB 0x40044901u |
the events of /dev/input (ABI).
one event is 12 bytes: a time, a type, a code and a value. the types and codes are the ones of Linux (linux/input-event-codes.h), so ported programs know them. a group of events that belong together (a mouse moving in x and y, and a button) ends with EV_SYN / SYN_REPORT.
libc has a copy in <sys/input.h>; the two must stay the same.
| #define EV_SYN 0x00 |
| #define EV_KEY 0x01 |
| #define EV_REL 0x02 |
| #define EV_ABS 0x03 |
| #define SYN_REPORT 0 |
| #define SYN_DROPPED 3 |
| #define REL_X 0x00 |
| #define REL_Y 0x01 |
| #define REL_WHEEL 0x08 |
| #define ABS_X 0x00 |
| #define ABS_Y 0x01 |
| #define INPUT_ABS_MAX 32767 |
| #define BTN_LEFT 0x110 |
| #define BTN_RIGHT 0x111 |
| #define BTN_MIDDLE 0x112 |
| #define INPUT_IOC_GRAB 0x40044901u |