diff options
Diffstat (limited to 'include/ui/InputDispatcher.h')
-rw-r--r-- | include/ui/InputDispatcher.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/ui/InputDispatcher.h b/include/ui/InputDispatcher.h index 3599163..63185d3 100644 --- a/include/ui/InputDispatcher.h +++ b/include/ui/InputDispatcher.h @@ -389,6 +389,14 @@ public: */ virtual void setInputDispatchMode(bool enabled, bool frozen) = 0; + /* Transfers touch focus from the window associated with one channel to the + * window associated with the other channel. + * + * Returns true on success. False if the window did not actually have touch focus. + */ + virtual bool transferTouchFocus(const sp<InputChannel>& fromChannel, + const sp<InputChannel>& toChannel) = 0; + /* Registers or unregister input channels that may be used as targets for input events. * If monitor is true, the channel will receive a copy of all input events. * @@ -445,6 +453,9 @@ public: virtual void setFocusedApplication(const InputApplication* inputApplication); virtual void setInputDispatchMode(bool enabled, bool frozen); + virtual bool transferTouchFocus(const sp<InputChannel>& fromChannel, + const sp<InputChannel>& toChannel); + virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel, bool monitor); virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel); @@ -746,6 +757,9 @@ private: // Clears the current state. void clear(); + // Copies pointer-related parts of the input state to another instance. + void copyPointerStateTo(InputState& other) const; + private: struct KeyMemento { int32_t deviceId; |