Mir
server_example_input_device_config.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: Andreas Pokorny <andreas.pokorny@canonical.com>
17  */
18 
19 #ifndef MIR_EXAMPLES_INPUT_DEVICE_CONFIG_H_
20 #define MIR_EXAMPLES_INPUT_DEVICE_CONFIG_H_
21 
24 
25 namespace mir
26 {
27 class Server;
28 
29 namespace input
30 {
31 class Device;
32 }
33 
34 namespace examples
35 {
37 
39 {
40 public:
41  InputDeviceConfig(bool disable_while_typing,
42  MirPointerAcceleration mouse_profile,
43  double mouse_cursor_acceleration_bias,
44  double mouse_scroll_speed_scale,
45  double touchpad_cursor_acceleration_bias,
46  double touchpad_scroll_speed_scale,
47  MirTouchpadClickModes click_mode,
48  MirTouchpadScrollModes scroll_mode);
49  void device_added(std::shared_ptr<input::Device> const& device) override;
50  void device_changed(std::shared_ptr<input::Device> const&) override {};
51  void device_removed(std::shared_ptr<input::Device> const&) override {};
52  void changes_complete() override {}
53 private:
54  bool disable_while_typing;
55  MirPointerAcceleration mouse_profile;
56  double mouse_cursor_acceleration_bias;
57  double mouse_scroll_speed_scale;
58  double touchpad_cursor_acceleration_bias;
59  double touchpad_scroll_speed_scale;
60  MirTouchpadClickModes click_mode;
61  MirTouchpadScrollModes scroll_mode;
62 };
63 
64 }
65 }
66 
67 #endif
Definition: server_example_input_device_config.h:38
Definition: as_render_target.h:27
Customise and run a Mir server.
Definition: server.h:85
void device_changed(std::shared_ptr< input::Device > const &) override
Definition: server_example_input_device_config.h:50
void changes_complete() override
Definition: server_example_input_device_config.h:52
void device_removed(std::shared_ptr< input::Device > const &) override
Definition: server_example_input_device_config.h:51
unsigned int MirTouchpadClickModes
Definition: mir_input_device_types.h:70
Definition: input_device_observer.h:30
MirPointerAcceleration
MirPointerAcceleration describes the way pointer movement is filtered:
Definition: mir_input_device_types.h:48
unsigned int MirTouchpadScrollModes
Definition: mir_input_device_types.h:90
Definition: device.h:38
void add_input_device_configuration_options_to(Server &server)
Definition: server_example_input_device_config.cpp:55

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:07:25 UTC 2017