summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2011-11-17 12:40:51 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2011-11-17 12:40:51 +0800
commitcc5992104a7d24a937d6471fe95b89bee2361e43 (patch)
tree8f6fc3994873942663f475e28f7288998e455f3d
parentef0b5e42f38e6f5a3394a699932e13643e9bad06 (diff)
SexyAppFramework: Added the axis moved event
-rw-r--r--osframework/source/SexyAppFramework/Event.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/osframework/source/SexyAppFramework/Event.h b/osframework/source/SexyAppFramework/Event.h
index c612f28..ef8397e 100644
--- a/osframework/source/SexyAppFramework/Event.h
+++ b/osframework/source/SexyAppFramework/Event.h
@@ -26,6 +26,7 @@ enum EventType {
EVENT_TOUCH = 16,
EVENT_MINIMIZED = 17,
EVENT_GYRO = 18,
+ EVENT_AXIS_MOVED = 19,
EVENT_USER = 65535
};
@@ -102,6 +103,38 @@ struct MinimizedEvent {
int minimized;
};
+enum Axis {
+ AXIS_X = 0x00,
+ AXIS_Y = 0x01,
+ AXIS_Z = 0x02,
+ AXIS_RX = 0x03,
+ AXIS_RY = 0x04,
+ AXIS_RZ = 0x05,
+ AXIS_THROTTLE = 0x06,
+ AXIS_RUDDER = 0x07,
+ AXIS_WHEEL = 0x08,
+ AXIS_GAS = 0x09,
+ AXIS_BRAKE = 0x0a,
+ AXIS_HAT0X = 0x10,
+ AXIS_HAT0Y = 0x11,
+ AXIS_HAT1X = 0x12,
+ AXIS_HAT1Y = 0x13,
+ AXIS_HAT2X = 0x14,
+ AXIS_HAT2Y = 0x15,
+ AXIS_HAT3X = 0x16,
+ AXIS_HAT3Y = 0x17
+};
+
+struct AxisMoved {
+ int axis;
+ float flat;
+ float fuzz;
+ float minimum;
+ float maximum;
+ float resolution;
+ float value;
+};
+
struct UserEvent {
int reserved[7];
};
@@ -123,6 +156,7 @@ struct Event {
struct TouchEvent touch;
struct MinimizedEvent minimized;
struct GyroEvent gyro;
+ struct AxisMoved axis;
} u;
};