19 #ifndef MIR_INPUT_RECEIVER_ANDROID_INPUT_RECEIVER_H_
20 #define MIR_INPUT_RECEIVER_ANDROID_INPUT_RECEIVER_H_
24 #include <utils/StrongPointer.h>
25 #include <androidfw/Input.h>
30 namespace droidinput = android;
54 InputReceiver(droidinput::sp<droidinput::InputChannel>
const& input_channel);
55 InputReceiver(
int fd);
57 virtual ~InputReceiver();
62 virtual bool next_event(std::chrono::milliseconds
const& timeout,
MirEvent &ev);
63 virtual bool next_event(
MirEvent &ev) {
return next_event(std::chrono::milliseconds(-1), ev); }
69 InputReceiver(
const InputReceiver&) =
delete;
70 InputReceiver& operator=(
const InputReceiver&) =
delete;
73 droidinput::sp<droidinput::InputChannel> input_channel;
74 std::shared_ptr<droidinput::InputConsumer> input_consumer;
75 droidinput::PreallocatedInputEventFactory event_factory;
76 droidinput::sp<droidinput::Looper> looper;
80 std::shared_ptr<XKBMapper> xkb_mapper;
90 #endif // MIR_INPUT_RECEIVER_ANDROID_INPUT_RECEIVER_H_