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
This commit is contained in:
cutealien
2020-12-30 18:39:20 +00:00
parent 1e6fe54cf5
commit a9f7c2abc9
5 changed files with 139 additions and 31 deletions

View File

@ -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;