diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-07-06 09:16:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-07-07 13:29:46 +1000 |
commit | a1afe172559aff010e886cfc2a7a922d4a06c697 (patch) | |
tree | 70027358759d780fb8b94f6bf689e864fe0aa879 /include | |
parent | 32473d6bf38c95b2d6d5ddbf583a1e801c6605e4 (diff) |
dix: add aux. functions for button_is_down, set_button_down, set_button_up.
Same as the matching key functions. Buttons, like keys, can have two states
for down/up - one posted, one processed. Posted is set during event
generation (usually in the signal handler). Processed is set during event
processing when the event queue is emptied and events are being delivered to
the client.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/input.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/input.h b/include/input.h index 0a08ea425..55b1537f6 100644 --- a/include/input.h +++ b/include/input.h @@ -228,14 +228,19 @@ typedef struct _InputAttributes { #define ATTR_TOUCHPAD (1<<4) #define ATTR_TOUCHSCREEN (1<<5) -/* Key has been run through all input processing and events sent to clients. */ +/* Key/Button has been run through all input processing and events sent to clients. */ #define KEY_PROCESSED 1 -/* Key has not been fully processed, no events have been sent. */ +#define BUTTON_PROCESSED 1 +/* Key/Button has not been fully processed, no events have been sent. */ #define KEY_POSTED 2 +#define BUTTON_POSTED 2 extern void set_key_down(DeviceIntPtr pDev, int key_code, int type); extern void set_key_up(DeviceIntPtr pDev, int key_code, int type); extern int key_is_down(DeviceIntPtr pDev, int key_code, int type); +extern void set_button_down(DeviceIntPtr pDev, int button, int type); +extern void set_button_up(DeviceIntPtr pDev, int button, int type); +extern int button_is_down(DeviceIntPtr pDev, int button, int type); extern void InitCoreDevices(void); extern void InitXTestDevices(void); |