From 5e9b027807cc205dc9c4efbb8360ac4b20317682 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 31 Oct 2011 08:58:18 +1000 Subject: Replace 0/1 button values with enums BUTTON_PRESS is much harder to confuse with a button number than a simple 1. Signed-off-by: Peter Hutterer --- src/evdev.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/evdev.h') diff --git a/src/evdev.h b/src/evdev.h index 27e404c..5fd99ff 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -107,6 +107,11 @@ enum SlotState { SLOTSTATE_EMPTY, }; +enum ButtonAction { + BUTTON_RELEASE = 0, + BUTTON_PRESS = 1 +}; + /* axis specific data for wheel emulation */ typedef struct { int up_button; @@ -248,7 +253,7 @@ void EvdevQueueProximityEvent(InputInfoPtr pInfo, int value); void EvdevQueueTouchEvent(InputInfoPtr pInfo, unsigned int touch, ValuatorMask *mask, uint16_t type); #endif -void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value); +void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, enum ButtonAction act); void EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count); void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, int v[MAX_VALUATORS]); -- cgit v1.2.3