Mir
input_reader_dispatchable.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Andreas Pokorny <andreas.pokorny@gmail.com>
17  */
18 
19 #ifndef MIR_INPUT_ANDROID_INPUT_READER_DISPATCHABLE_H_
20 #define MIR_INPUT_ANDROID_INPUT_READER_DISPATCHABLE_H_
21 
23 
24 namespace android
25 {
26 class EventHubInterface;
27 class InputReaderInterface;
28 }
29 namespace droidinput = android;
30 
31 namespace mir
32 {
33 namespace input
34 {
35 namespace android
36 {
37 
39 {
40  InputReaderDispatchable(std::shared_ptr<droidinput::EventHubInterface> const& event_hub,
41  std::shared_ptr<droidinput::InputReaderInterface> const& reader);
42  Fd watch_fd() const override;
43  bool dispatch(mir::dispatch::FdEvents events) override;
45  void start() override;
46 
47 private:
48  std::shared_ptr<droidinput::EventHubInterface> const event_hub;
49  std::shared_ptr<droidinput::InputReaderInterface> const reader;
50 };
51 
52 }
53 }
54 }
55 
56 #endif
InputReaderDispatchable(std::shared_ptr< droidinput::EventHubInterface > const &event_hub, std::shared_ptr< droidinput::InputReaderInterface > const &reader)
All things Mir.
Definition: atomic_callback.h:25
Definition: fd.h:33
Definition: legacy_input_dispatchable.h:29
Definition: input_reader_dispatchable.h:38
bool dispatch(mir::dispatch::FdEvents events) override
Dispatch one pending event.
Fd watch_fd() const override
Get a poll()able file descriptor.
uint32_t FdEvents
Definition: dispatchable.h:36
Definition: android_input_receiver.h:36
mir::dispatch::FdEvents relevant_events() const override
The set of file-descriptor events this Dispatchable handles.

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015