diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-12-21 17:29:14 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-12-21 17:29:14 +0100 |
| commit | 1bc6faa48907919376b14429f3b802d0d16fc00a (patch) | |
| tree | 73e57b6f956d8f50c456330c878e9b210ad41483 /src/evemu-impl.h | |
| parent | a8df0405686350c3145b3e5119d796c6642339fd (diff) | |
Make evemu ABI resilient
Hide the evemu struct, make it versioned, and instead use new/delete
and accessor functions. This should give us enough ABI stability to
run mixed library implementations.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/evemu-impl.h')
| -rw-r--r-- | src/evemu-impl.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/evemu-impl.h b/src/evemu-impl.h new file mode 100644 index 0000000..2346590 --- /dev/null +++ b/src/evemu-impl.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #ifndef _EVEMU_IMPL_H | ||
| 2 | #define _EVEMU_IMPL_H | ||
| 3 | |||
| 4 | #include <evemu.h> | ||
| 5 | #include <linux/uinput.h> | ||
| 6 | |||
| 7 | #define EVPLAY_NBITS KEY_CNT | ||
| 8 | #define EVPLAY_NBYTES ((EVPLAY_NBITS + 7) / 8) | ||
| 9 | |||
| 10 | struct evemu_device { | ||
| 11 | int version_major, version_minor; | ||
| 12 | char name[UINPUT_MAX_NAME_SIZE]; | ||
| 13 | struct input_id id; | ||
| 14 | unsigned char mask[EV_CNT][EVPLAY_NBYTES]; | ||
| 15 | int bytes[EV_CNT]; | ||
| 16 | struct input_absinfo abs[ABS_CNT]; | ||
| 17 | }; | ||
| 18 | |||
| 19 | #endif | ||
