summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-10-14 21:42:15 -0700
committerJeff Brown <jeffbrown@google.com>2010-10-14 21:44:16 -0700
commit6b337e74f024fdd9e8ed3fdd3414bde3e1a3306e (patch)
treee941fb8776eec281565d78a1e2117587c95ebd3f /include
parent43233b1a43bf1ea46c2b7e1186957254f625f77a (diff)
downloadframeworks_native-6b337e74f024fdd9e8ed3fdd3414bde3e1a3306e.zip
frameworks_native-6b337e74f024fdd9e8ed3fdd3414bde3e1a3306e.tar.gz
frameworks_native-6b337e74f024fdd9e8ed3fdd3414bde3e1a3306e.tar.bz2
Improve input device calibration format.
Added support for calibrating touch size for devices that report size as an area measurement rather than as a width. Fixed some bugs. Bug: 3096045 Change-Id: I30a12e73752883516ed054f8af407204bca45814
Diffstat (limited to 'include')
-rw-r--r--include/ui/InputReader.h55
1 files changed, 31 insertions, 24 deletions
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
index c15e382..923cdbf 100644
--- a/include/ui/InputReader.h
+++ b/include/ui/InputReader.h
@@ -571,31 +571,36 @@ protected:
// Immutable calibration parameters in parsed form.
struct Calibration {
- // Touch Area
- enum TouchAreaCalibration {
- TOUCH_AREA_CALIBRATION_DEFAULT,
- TOUCH_AREA_CALIBRATION_NONE,
- TOUCH_AREA_CALIBRATION_GEOMETRIC,
- TOUCH_AREA_CALIBRATION_PRESSURE,
+ // Touch Size
+ enum TouchSizeCalibration {
+ TOUCH_SIZE_CALIBRATION_DEFAULT,
+ TOUCH_SIZE_CALIBRATION_NONE,
+ TOUCH_SIZE_CALIBRATION_GEOMETRIC,
+ TOUCH_SIZE_CALIBRATION_PRESSURE,
};
- TouchAreaCalibration touchAreaCalibration;
+ TouchSizeCalibration touchSizeCalibration;
- // Tool Area
- enum ToolAreaCalibration {
- TOOL_AREA_CALIBRATION_DEFAULT,
- TOOL_AREA_CALIBRATION_NONE,
- TOOL_AREA_CALIBRATION_GEOMETRIC,
- TOOL_AREA_CALIBRATION_LINEAR,
+ // Tool Size
+ enum ToolSizeCalibration {
+ TOOL_SIZE_CALIBRATION_DEFAULT,
+ TOOL_SIZE_CALIBRATION_NONE,
+ TOOL_SIZE_CALIBRATION_GEOMETRIC,
+ TOOL_SIZE_CALIBRATION_LINEAR,
+ TOOL_SIZE_CALIBRATION_AREA,
};
- ToolAreaCalibration toolAreaCalibration;
- bool haveToolAreaLinearScale;
- float toolAreaLinearScale;
- bool haveToolAreaLinearBias;
- float toolAreaLinearBias;
- bool haveToolAreaIsSummed;
- int32_t toolAreaIsSummed;
+ ToolSizeCalibration toolSizeCalibration;
+ bool haveToolSizeLinearScale;
+ float toolSizeLinearScale;
+ bool haveToolSizeLinearBias;
+ float toolSizeLinearBias;
+ bool haveToolSizeAreaScale;
+ float toolSizeAreaScale;
+ bool haveToolSizeAreaBias;
+ float toolSizeAreaBias;
+ bool haveToolSizeIsSummed;
+ int32_t toolSizeIsSummed;
// Pressure
enum PressureCalibration {
@@ -671,8 +676,10 @@ protected:
float geometricScale;
- float toolAreaLinearScale;
- float toolAreaLinearBias;
+ float toolSizeLinearScale;
+ float toolSizeLinearBias;
+ float toolSizeAreaScale;
+ float toolSizeAreaBias;
float pressureScale;
@@ -691,11 +698,11 @@ protected:
bool haveSize;
InputDeviceInfo::MotionRange size;
- bool haveTouchArea;
+ bool haveTouchSize;
InputDeviceInfo::MotionRange touchMajor;
InputDeviceInfo::MotionRange touchMinor;
- bool haveToolArea;
+ bool haveToolSize;
InputDeviceInfo::MotionRange toolMajor;
InputDeviceInfo::MotionRange toolMinor;