aboutsummaryrefslogtreecommitdiff
path: root/include/IEventReceiver.h
diff options
context:
space:
mode:
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-12-30 18:39:20 +0000
committercutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-12-30 18:39:20 +0000
commita9f7c2abc9c3d8e586a541303f830d492b8b70e5 (patch)
tree50f81bf0e67d4aa636aa8fadd6b0f8c4a2aabc3a /include/IEventReceiver.h
parent1e6fe54cf528de179390e81dbd97c0884b30bdbf (diff)
downloadirrlicht-a9f7c2abc9c3d8e586a541303f830d492b8b70e5.tar.xz
Merging r6173 through r6179 from trunk to ogl-es branch
- Adding optional support for touch input in X11 git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6180 dfc29bdd-3216-0410-991c-e03cc46cb475
Diffstat (limited to 'include/IEventReceiver.h')
-rw-r--r--include/IEventReceiver.h69
1 files changed, 41 insertions, 28 deletions
diff --git a/include/IEventReceiver.h b/include/IEventReceiver.h
index 44c86e6..11a50da 100644
--- a/include/IEventReceiver.h
+++ b/include/IEventReceiver.h
@@ -37,14 +37,14 @@ namespace irr
//! A touch input event.
EET_TOUCH_INPUT_EVENT,
- //! A accelerometer event.
- EET_ACCELEROMETER_EVENT,
+ //! A accelerometer event.
+ EET_ACCELEROMETER_EVENT,
- //! A gyroscope event.
- EET_GYROSCOPE_EVENT,
+ //! A gyroscope event.
+ EET_GYROSCOPE_EVENT,
- //! A device motion event.
- EET_DEVICE_MOTION_EVENT,
+ //! A device motion event.
+ EET_DEVICE_MOTION_EVENT,
//! A joystick (joypad, gamepad) input event.
/** Joystick events are created by polling all connected joysticks once per
@@ -353,6 +353,22 @@ struct SEvent
};
+ //! Any kind of touch event.
+ struct STouchInput
+ {
+ // Touch ID.
+ size_t ID;
+
+ // X position of simple touch.
+ s32 X;
+
+ // Y position of simple touch.
+ s32 Y;
+
+ //! Type of touch event.
+ ETOUCH_INPUT_EVENT Event;
+ };
+
//! Any kind of mouse event.
struct SMouseInput
{
@@ -416,58 +432,55 @@ struct SEvent
//! Any kind of touch event.
struct STouchInput
{
- // Touch ID.
- size_t ID;
+ // Touch ID.
+ size_t ID;
- // X position of simple touch.
+ // X position of simple touch.
s32 X;
- // Y position of simple touch.
+ // Y position of simple touch.
s32 Y;
//! Type of touch event.
ETOUCH_INPUT_EVENT Event;
};
- //! Any kind of accelerometer event.
+ //! Any kind of accelerometer event.
struct SAccelerometerEvent
{
-
- // X acceleration.
+ // X acceleration.
f64 X;
- // Y acceleration.
+ // Y acceleration.
f64 Y;
- // Z acceleration.
+ // Z acceleration.
f64 Z;
};
//! Any kind of gyroscope event.
struct SGyroscopeEvent
{
-
- // X rotation.
+ // X rotation.
f64 X;
- // Y rotation.
+ // Y rotation.
f64 Y;
- // Z rotation.
+ // Z rotation.
f64 Z;
};
- //! Any kind of device motion event.
+ //! Any kind of device motion event.
struct SDeviceMotionEvent
{
-
- // X angle - roll.
+ // X angle - roll.
f64 X;
- // Y angle - pitch.
+ // Y angle - pitch.
f64 Y;
- // Z angle - yaw.
+ // Z angle - yaw.
f64 Z;
};
@@ -581,10 +594,10 @@ struct SEvent
struct SGUIEvent GUIEvent;
struct SMouseInput MouseInput;
struct SKeyInput KeyInput;
- struct STouchInput TouchInput;
- struct SAccelerometerEvent AccelerometerEvent;
- struct SGyroscopeEvent GyroscopeEvent;
- struct SDeviceMotionEvent DeviceMotionEvent;
+ struct STouchInput TouchInput;
+ struct SAccelerometerEvent AccelerometerEvent;
+ struct SGyroscopeEvent GyroscopeEvent;
+ struct SDeviceMotionEvent DeviceMotionEvent;
struct SJoystickEvent JoystickEvent;
struct SLogEvent LogEvent;
struct SUserEvent UserEvent;