summaryrefslogtreecommitdiffstats
path: root/include/ui/InputReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ui/InputReader.h')
-rw-r--r--include/ui/InputReader.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
index 923cdbf..2d4bf8b 100644
--- a/include/ui/InputReader.h
+++ b/include/ui/InputReader.h
@@ -419,9 +419,18 @@ private:
Vector<KeyDown> keyDowns; // keys that are down
int32_t metaState;
nsecs_t downTime; // time of most recent key down
+
+ struct LedState {
+ bool avail; // led is available
+ bool on; // we think the led is currently on
+ };
+ LedState capsLockLedState;
+ LedState numLockLedState;
+ LedState scrollLockLedState;
} mLocked;
void initializeLocked();
+ void initializeLedStateLocked(LockedState::LedState& ledState, int32_t led);
bool isKeyboardOrGamepadKey(int32_t scanCode);
@@ -429,6 +438,10 @@ private:
uint32_t policyFlags);
ssize_t findKeyDownLocked(int32_t scanCode);
+
+ void updateLedStateLocked(bool reset);
+ void updateLedStateForModifierLocked(LockedState::LedState& ledState, int32_t led,
+ int32_t modifier, bool reset);
};
@@ -571,6 +584,16 @@ protected:
// Immutable calibration parameters in parsed form.
struct Calibration {
+ // Position
+ bool haveXOrigin;
+ int32_t xOrigin;
+ bool haveYOrigin;
+ int32_t yOrigin;
+ bool haveXScale;
+ float xScale;
+ bool haveYScale;
+ float yScale;
+
// Touch Size
enum TouchSizeCalibration {
TOUCH_SIZE_CALIBRATION_DEFAULT,