aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-31 08:58:18 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-11 15:50:36 +1000
commit5e9b027807cc205dc9c4efbb8360ac4b20317682 (patch)
tree700982329c85feb31fb007b5f3f25a42b9dfef9a /src/evdev.h
parentSkip event posting for empty slots. (diff)
downloadxf86-input-evdev-5e9b027807cc205dc9c4efbb8360ac4b20317682.tar.gz
xf86-input-evdev-5e9b027807cc205dc9c4efbb8360ac4b20317682.tar.bz2
xf86-input-evdev-5e9b027807cc205dc9c4efbb8360ac4b20317682.zip
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h7
1 files changed, 6 insertions, 1 deletions
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]);