Mir
default_device.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 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:
17  * Andreas Pokorny <andreas.pokorny@canonical.com>
18  */
19 
20 #ifndef MIR_INPUT_DEFAULT_DEVICE_H_
21 #define MIR_INPUT_DEFAULT_DEVICE_H_
22 
23 #include "mir_toolkit/event.h"
24 #include "mir/input/device.h"
28 #include "mir/optional_value.h"
29 
30 #include <memory>
31 
32 namespace mir
33 {
34 namespace dispatch
35 {
36 class ActionQueue;
37 }
38 namespace input
39 {
40 
41 class InputDevice;
42 
43 class DefaultDevice : public Device
44 {
45 public:
46  DefaultDevice(MirInputDeviceId id, std::shared_ptr<dispatch::ActionQueue> const& actions,
47  InputDevice& device);
48  MirInputDeviceId id() const override;
49  DeviceCapabilities capabilities() const override;
50  std::string name() const override;
51  std::string unique_id() const override;
52 
53  optional_value<PointerConfiguration> pointer_configuration() const override;
54  void apply_pointer_configuration(PointerConfiguration const&) override;
55  optional_value<TouchpadConfiguration> touchpad_configuration() const override;
56  void apply_touchpad_configuration(TouchpadConfiguration const&) override;
57 private:
58  MirInputDeviceId const device_id;
59  InputDevice& device;
60  InputDeviceInfo const info;
63  std::shared_ptr<dispatch::ActionQueue> const actions;
64 };
65 
66 }
67 }
68 
69 #endif
Definition: pointer_configuration.h:32
All things Mir.
Definition: atomic_callback.h:25
Represents an input device.
Definition: input_device.h:46
Definition: touchpad_configuration.h:31
int64_t MirInputDeviceId
Definition: input_event.h:35
Definition: optional_value.h:28
Definition: input_device_info.h:32
Definition: device.h:37
Definition: default_device.h:43

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016