summaryrefslogtreecommitdiff
path: root/include/eventstr.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-29 13:45:32 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-30 08:43:14 +1000
commit5085ac09a50721d87196bd9f2607dc76200ca399 (patch)
tree78b4efdde92b4e7f317bdbfb1b7efec53ef65efe /include/eventstr.h
parent1ae8332d643299a3ee9a9f45a8e25b8c87c751e1 (diff)
input: switch internal event types to enums.
Use enum EventType instead of ints. This requires a load of default cases in various switch statements to silence compiler warnings. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include/eventstr.h')
-rw-r--r--include/eventstr.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/eventstr.h b/include/eventstr.h
index e39beb986..06a57e3ec 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -83,7 +83,7 @@ enum EventType {
struct _DeviceEvent
{
unsigned char header; /**< Always ET_Internal */
- int type; /**< One of EventType */
+ enum EventType type; /**< One of EventType */
int length; /**< Length in bytes */
Time time; /**< Time in ms */
int deviceid; /**< Device to post this event for */
@@ -136,7 +136,7 @@ struct _DeviceEvent
struct _DeviceChangedEvent
{
unsigned char header; /**< Always ET_Internal */
- int type; /**< ET_DeviceChanged */
+ enum EventType type; /**< ET_DeviceChanged */
int length; /**< Length in bytes */
Time time; /**< Time in ms */
int deviceid; /**< Device whose capabilities have changed */
@@ -177,7 +177,7 @@ struct _DeviceChangedEvent
struct _DGAEvent
{
unsigned char header; /**< Always ET_Internal */
- int type; /**< ET_DGAEvent */
+ enum EventType type; /**< ET_DGAEvent */
int length; /**< Length in bytes */
Time time; /**< Time in ms */
int subtype; /**< KeyPress, KeyRelease, ButtonPress,
@@ -196,7 +196,7 @@ struct _DGAEvent
struct _RawDeviceEvent
{
unsigned char header; /**< Always ET_Internal */
- int type; /**< ET_Raw */
+ enum EventType type; /**< ET_Raw */
int length; /**< Length in bytes */
Time time; /**< Time in ms */
int deviceid; /**< Device to post this event for */
@@ -221,7 +221,7 @@ struct _RawDeviceEvent
union _InternalEvent {
struct {
unsigned char header; /**< Always ET_Internal */
- int type; /**< One of ET_* */
+ enum EventType type; /**< One of ET_* */
int length; /**< Length in bytes */
Time time; /**< Time in ms. */
} any;