Mir
mir_input_device_types.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 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 2 or 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  */
17 
18 #ifndef MIR_TOOLKIT_MIR_INPUT_DEVICE_TYPES_H_
19 #define MIR_TOOLKIT_MIR_INPUT_DEVICE_TYPES_H_
20 
21 #include <stdint.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef int64_t MirInputDeviceId;
28 
30 {
33 } MirPointerHandedness;
34 
35 /**
36  * MirPointerAcceleration describes the way pointer movement is filtered:
37  * - mir_pointer_acceleration_none: (acceleration bias + 1.0) is applied as
38  * a factor to the current velocity of the pointer. So a bias of 0 to results
39  * to no change of velocity.
40  * - mir_pointer_acceleration_adaptive: acceleration bias selects an
41  * acceleration function based on the current velocity that usually consists
42  * of two linear inclines separated by a plateau.
43  */
45 {
48 } MirPointerAcceleration;
49 
50 /**
51  * MirTouchpadClickMode configures how the touchpad itself should generate
52  * pointer button events. The available click modes may be active
53  * simultaneously.
54  * - mir_touchpad_click_mode_none: no active click mode
55  * - mir_touchpad_click_mode_area_to_click: simulate pointer buttons using
56  * click areas on the touchpad
57  * - mir_touchpad_click_mode_finger_count: simulate pointer buttons using the
58  * number of fingers down
59  */
61 {
65 } MirTouchpadClickMode;
66 typedef unsigned int MirTouchpadClickModes;
67 
68 /**
69  * MirTouchpadScrollMode configures how the touchpad should generate scroll
70  * events.
71  * - mir_touchpad_scroll_mode_none: no scroll
72  * - mir_touchpad_scroll_mode_two_finger_scroll: two finger movement generates
73  * generates vertical and horizontal scroll events
74  * - mir_touchpad_scroll_mode_edge_scroll: touch movement at the edge of the
75  * touchpad genertes scroll events
76  * - mir_touchpad_scroll_mode_button_down_scroll: movement on the touchpad
77  * generates scroll events when a button is held down simultaneously
78  */
80 {
85 } MirTouchpadScrollMode;
86 typedef unsigned int MirTouchpadScrollModes;
87 
89 {
98  mir_input_device_capability_multitouch = 1<<8, //! capable to detect multiple contacts
99  mir_input_device_capability_alpha_numeric = 1<<9 //! offers enough keys for text entry
100 };
101 typedef unsigned int MirInputDeviceCapabilities;
102 
103 /**
104  * Mapping modes for touchscreen devices. The mode defines how coordinates
105  * from the touchscreen frequently referred to as device coordinates are
106  * translated into scene coordinates.
107  *
108  * This configuration mode is relevant for different classes of input devices,
109  * i.e handheld devices with builtin touchscreens or external graphic tablets or
110  * external monitors with touchscreen capabilities.
111  */
113 {
114  /**
115  * Map the device coordinates onto specific output.
116  */
118  /**
119  * Map the device coordinates onto the whole wall of outputs.
120  */
122 } MirTouchscreenMappingMode;
123 
124 
125 #ifdef __cplusplus
126 }
127 #endif
128 #endif

Copyright © 2012-2022 Canonical Ltd.
Generated on Thu Sep 8 12:37:23 UTC 2022
This documentation is licensed under the GPL version 2 or 3.