diff options
author | Jeff Brown <jeffbrown@android.com> | 2011-06-02 01:26:32 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@android.com> | 2011-06-02 15:39:21 -0700 |
commit | 1a84fd1fb7a51f3fe4f8865e1cdd09f3490f696c (patch) | |
tree | cf9491aedb10c8355e62ae8384db0e9f005beb1c /services/input/EventHub.h | |
parent | 19c97d46fb57f87ff45d9e6ea7122b4eb21ede8c (diff) | |
download | frameworks_base-1a84fd1fb7a51f3fe4f8865e1cdd09f3490f696c.zip frameworks_base-1a84fd1fb7a51f3fe4f8865e1cdd09f3490f696c.tar.gz frameworks_base-1a84fd1fb7a51f3fe4f8865e1cdd09f3490f696c.tar.bz2 |
Add a preference panel for mouse speed.
Bug: 4124987
Change-Id: I3ce175d268a1d043cf5878481261b1049a15a149
Diffstat (limited to 'services/input/EventHub.h')
-rw-r--r-- | services/input/EventHub.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/services/input/EventHub.h b/services/input/EventHub.h index 4d26a95..853a0bd 100644 --- a/services/input/EventHub.h +++ b/services/input/EventHub.h @@ -178,9 +178,9 @@ public: virtual status_t mapAxis(int32_t deviceId, int scancode, AxisInfo* outAxisInfo) const = 0; - // exclude a particular device from opening - // this can be used to ignore input devices for sensors - virtual void addExcludedDevice(const char* deviceName) = 0; + // Sets devices that are excluded from opening. + // This can be used to ignore input devices for sensors. + virtual void setExcludedDevices(const Vector<String8>& devices) = 0; /* * Wait for events to become available and returns them. @@ -215,6 +215,8 @@ public: virtual void getVirtualKeyDefinitions(int32_t deviceId, Vector<VirtualKeyDefinition>& outVirtualKeys) const = 0; + virtual void reopenDevices() = 0; + virtual void dump(String8& dump) = 0; }; @@ -242,7 +244,7 @@ public: virtual status_t mapAxis(int32_t deviceId, int scancode, AxisInfo* outAxisInfo) const; - virtual void addExcludedDevice(const char* deviceName); + virtual void setExcludedDevices(const Vector<String8>& devices); virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const; virtual int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const; @@ -259,6 +261,8 @@ public: virtual void getVirtualKeyDefinitions(int32_t deviceId, Vector<VirtualKeyDefinition>& outVirtualKeys) const; + virtual void reopenDevices(); + virtual void dump(String8& dump); protected: @@ -271,6 +275,7 @@ private: int closeDevice(const char *devicePath); int closeDeviceAtIndexLocked(int index); int scanDir(const char *dirname); + void scanDevices(); int readNotify(int nfd); status_t mError; @@ -333,7 +338,9 @@ private: bool mOpened; bool mNeedToSendFinishedDeviceScan; - List<String8> mExcludedDevices; + volatile int32_t mNeedToReopenDevices; // must be modified atomically + bool mNeedToScanDevices; + Vector<String8> mExcludedDevices; // device ids that report particular switches. int32_t mSwitches[SW_MAX + 1]; |