Mir
input_device.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014-2015 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by:
17  * Andreas Pokorny <andreas.pokorny@canonical.com>
18  */
19 
20 #ifndef MIR_INPUT_INPUT_DEVICE_H_
21 #define MIR_INPUT_INPUT_DEVICE_H_
22 
23 #include "mir/module_deleter.h"
24 #include "mir/optional_value.h"
25 
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace dispatch
31 {
32 class Dispatchable;
33 }
34 namespace input
35 {
36 class InputSink;
37 class InputDeviceInfo;
38 class EventBuilder;
39 
40 class PointerSettings;
41 class TouchpadSettings;
42 
47 {
48 public:
49  InputDevice() = default;
50  virtual ~InputDevice() = default;
51 
55  virtual void start(InputSink* destination, EventBuilder* builder) = 0;
59  virtual void stop() = 0;
60 
61  virtual InputDeviceInfo get_device_info() = 0;
62 
63  virtual optional_value<PointerSettings> get_pointer_settings() const = 0;
64  virtual void apply_settings(PointerSettings const&) = 0;
65 
66  virtual optional_value<TouchpadSettings> get_touchpad_settings() const = 0;
67  virtual void apply_settings(TouchpadSettings const&) = 0;
68 protected:
69  InputDevice(InputDevice const&) = delete;
70  InputDevice& operator=(InputDevice const&) = delete;
71 };
72 
73 }
74 }
75 
76 #endif
Definition: as_render_target.h:27
Definition: touchpad_settings.h:31
Represents an input device.
Definition: input_device.h:46
Definition: optional_value.h:28
Definition: input_device_info.h:32
Definition: pointer_settings.h:31
Definition: event_builder.h:36
Definition: input_sink.h:33

Copyright © 2012-2016 Canonical Ltd.
Generated on Fri Dec 20 06:52:43 UTC 2019