Mir
android_input_reader_policy.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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  */
18 #ifndef MIR_ANDROID_INPUT_READER_POLICY_H_
19 #define MIR_ANDROID_INPUT_READER_POLICY_H_
20 
22 
23 #include <memory>
24 
25 namespace mir
26 {
27 namespace input
28 {
29 class CursorListener;
30 class InputRegion;
31 class TouchVisualizer;
32 
33 namespace android
34 {
35 
37 {
38 public:
39  explicit InputReaderPolicy(std::shared_ptr<InputRegion> const& input_region,
40  std::shared_ptr<CursorListener> const& cursor_listener,
41  std::shared_ptr<TouchVisualizer> const& touch_visualizer);
42 
43  virtual ~InputReaderPolicy() {}
44 
45  droidinput::sp<droidinput::PointerControllerInterface> obtainPointerController(int32_t device_id) override;
46  void getReaderConfiguration(droidinput::InputReaderConfiguration* out_config) override;
47 
48  void getAssociatedDisplayInfo(droidinput::InputDeviceIdentifier const& identifier,
49  int& out_associated_display_id, bool& out_associated_display_is_external) override;
50 private:
51  std::shared_ptr<InputRegion> const input_region;
52  droidinput::sp<droidinput::PointerControllerInterface> pointer_controller;
53 };
54 
55 }
56 }
57 } // namespace mir
58 
59 #endif // MIR_ANDROID_INPUT_READER_POLICY_H_
All things Mir.
Definition: buffer_stream.h:37
Definition: rudimentary_input_reader_policy.h:32
droidinput::sp< droidinput::PointerControllerInterface > obtainPointerController(int32_t device_id) override
Definition: android_input_reader_policy.h:36
void getReaderConfiguration(droidinput::InputReaderConfiguration *out_config) override
virtual ~InputReaderPolicy()
Definition: android_input_reader_policy.h:43
void getAssociatedDisplayInfo(droidinput::InputDeviceIdentifier const &identifier, int &out_associated_display_id, bool &out_associated_display_is_external) override
Definition: android_input_receiver.h:32
InputReaderPolicy(std::shared_ptr< InputRegion > const &input_region, std::shared_ptr< CursorListener > const &cursor_listener, std::shared_ptr< TouchVisualizer > const &touch_visualizer)

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015