diff options
Diffstat (limited to 'include/ui/InputTransport.h')
-rw-r--r-- | include/ui/InputTransport.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/ui/InputTransport.h b/include/ui/InputTransport.h index 7b182f3..d6bded6 100644 --- a/include/ui/InputTransport.h +++ b/include/ui/InputTransport.h @@ -330,4 +330,24 @@ private: } // namespace android +/* + * NDK input queue API. + */ +struct input_queue_t { +public: + /* Creates a consumer associated with an input channel. */ + explicit input_queue_t(const android::sp<android::InputChannel>& channel); + + /* Destroys the consumer and releases its input channel. */ + ~input_queue_t(); + + inline android::InputConsumer& getConsumer() { return mConsumer; } + + android::status_t consume(android::InputEvent** event); + +private: + android::InputConsumer mConsumer; + android::PreallocatedInputEventFactory mInputEventFactory; +}; + #endif // _UI_INPUT_TRANSPORT_H |