summaryrefslogtreecommitdiff
path: root/include/ui/InputDevice.h
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2010-07-14 18:48:53 -0700
committer Jeff Brown <jeffbrown@google.com> 2010-07-15 18:32:33 -0700
commitc5ed5910c9ef066cec6a13bbb404ec57b1e92637 (patch)
treeb06dfdac2d807dae78a2634007b6e627eefd0804 /include/ui/InputDevice.h
parentd9452ecd0ce6c8e0518055929ba1fd0712146405 (diff)
Add support for new input sources.
Added several new coordinate values to MotionEvents to capture touch major/minor area, tool major/minor area and orientation. Renamed NDK input constants per convention. Added InputDevice class in Java which will eventually provide useful information about available input devices. Added APIs for manufacturing new MotionEvent objects with multiple pointers and all necessary coordinate data. Fixed a bug in the input dispatcher where it could get stuck with a pointer down forever. Fixed a bug in the WindowManager where the input window list could end up containing stale removed windows. Fixed a bug in the WindowManager where the input channel was being removed only after the final animation transition had taken place which caused spurious WINDOW DIED log messages to be printed. Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
Diffstat (limited to 'include/ui/InputDevice.h')
-rw-r--r--include/ui/InputDevice.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/ui/InputDevice.h b/include/ui/InputDevice.h
index 4420600b23d4..3b9c70e2dcea 100644
--- a/include/ui/InputDevice.h
+++ b/include/ui/InputDevice.h
@@ -42,6 +42,7 @@ namespace android {
extern int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState);
extern int32_t rotateKeyCode(int32_t keyCode, int32_t orientation);
+
/*
* An input device structure tracks the state of a single input device.
*
@@ -168,8 +169,11 @@ struct InputDevice {
FIELD_ABS_MT_POSITION_X = 1,
FIELD_ABS_MT_POSITION_Y = 2,
FIELD_ABS_MT_TOUCH_MAJOR = 4,
- FIELD_ABS_MT_WIDTH_MAJOR = 8,
- FIELD_ABS_MT_TRACKING_ID = 16
+ FIELD_ABS_MT_TOUCH_MINOR = 8,
+ FIELD_ABS_MT_WIDTH_MAJOR = 16,
+ FIELD_ABS_MT_WIDTH_MINOR = 32,
+ FIELD_ABS_MT_ORIENTATION = 64,
+ FIELD_ABS_MT_TRACKING_ID = 128
};
uint32_t pointerCount;
@@ -179,7 +183,10 @@ struct InputDevice {
int32_t absMTPositionX;
int32_t absMTPositionY;
int32_t absMTTouchMajor;
+ int32_t absMTTouchMinor;
int32_t absMTWidthMajor;
+ int32_t absMTWidthMinor;
+ int32_t absMTOrientation;
int32_t absMTTrackingId;
inline void clear() {
@@ -206,6 +213,11 @@ struct InputDevice {
int32_t y;
int32_t pressure;
int32_t size;
+ int32_t touchMajor;
+ int32_t touchMinor;
+ int32_t toolMajor;
+ int32_t toolMinor;
+ int32_t orientation;
};
struct TouchData {
@@ -236,6 +248,7 @@ struct InputDevice {
AbsoluteAxisInfo yAxis;
AbsoluteAxisInfo pressureAxis;
AbsoluteAxisInfo sizeAxis;
+ AbsoluteAxisInfo orientationAxis;
} parameters;
// The touch data of the current sample being processed.
@@ -290,6 +303,8 @@ struct InputDevice {
int32_t sizeOrigin;
float sizeScale;
+
+ float orientationScale;
} precalculated;
void reset();