Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
default_android_input_configuration.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013-2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as 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: Robert Carr <robert.carr@canonical.com>
17  * Andreas Pokorny <andreas.pokorny@canonical.com>
18  */
19 
20 #ifndef MIR_INPUT_ANDROID_DEFAULT_ANDROID_INPUT_CONFIGURATION_H_
21 #define MIR_INPUT_ANDROID_DEFAULT_ANDROID_INPUT_CONFIGURATION_H_
22 
24 
25 #include "mir/cached_ptr.h"
26 
27 namespace android
28 {
29 class InputReaderInterface;
30 class InputReaderPolicyInterface;
31 class InputListenerInterface;
32 class EventHubInterface;
33 }
34 
35 namespace droidinput = android;
36 
37 namespace mir
38 {
39 namespace input
40 {
41 class InputRegion;
42 class CursorListener;
43 class TouchVisualizer;
44 class InputReport;
45 class InputDispatcher;
46 
47 namespace android
48 {
49 class InputThread;
50 
52 {
53 public:
54  DefaultInputConfiguration(std::shared_ptr<input::InputDispatcher> const& dispatcher,
55  std::shared_ptr<input::InputRegion> const& input_region,
56  std::shared_ptr<CursorListener> const& cursor_listener,
57  std::shared_ptr<TouchVisualizer> const& touch_visualizer,
58  std::shared_ptr<input::InputReport> const& input_report);
60 
61  std::shared_ptr<input::InputManager> the_input_manager() override;
62 
63 protected:
64  virtual std::shared_ptr<droidinput::EventHubInterface> the_event_hub();
65  virtual std::shared_ptr<droidinput::InputReaderInterface> the_reader();
66  virtual std::shared_ptr<droidinput::InputListenerInterface> the_input_translator();
67 
68  virtual std::shared_ptr<InputThread> the_reader_thread();
69 
70  virtual std::shared_ptr<droidinput::InputReaderPolicyInterface> the_reader_policy();
71 
72 private:
73  CachedPtr<input::InputManager> input_manager;
74  CachedPtr<InputThread> reader_thread;
75 
79 
80  std::shared_ptr<input::InputDispatcher> const input_dispatcher;
81  std::shared_ptr<input::InputRegion> const input_region;
82  std::shared_ptr<CursorListener> const cursor_listener;
83  std::shared_ptr<TouchVisualizer> const touch_visualizer;
84  std::shared_ptr<input::InputReport> const input_report;
85 };
86 }
87 }
88 } // namespace mir
89 
90 #endif // MIR_INPUT_ANDROID_DEFAULT_ANDROID_INPUT_CONFIGURATION_H_
All things Mir.
Definition: aging_buffer.h:24
virtual std::shared_ptr< InputThread > the_reader_thread()
virtual std::shared_ptr< droidinput::InputReaderPolicyInterface > the_reader_policy()
virtual std::shared_ptr< droidinput::InputListenerInterface > the_input_translator()
Definition: input_configuration.h:30
Definition: default_android_input_configuration.h:51
std::shared_ptr< input::InputManager > the_input_manager() override
Definition: android_input_receiver.h:32
virtual std::shared_ptr< droidinput::InputReaderInterface > the_reader()
virtual std::shared_ptr< droidinput::EventHubInterface > the_event_hub()
DefaultInputConfiguration(std::shared_ptr< input::InputDispatcher > const &dispatcher, std::shared_ptr< input::InputRegion > const &input_region, std::shared_ptr< CursorListener > const &cursor_listener, std::shared_ptr< TouchVisualizer > const &touch_visualizer, std::shared_ptr< input::InputReport > const &input_report)

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014