Mir
mir_input_device_types.h
Go to the documentation of this file.
1/*
2 * Copyright © 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
24extern "C" {
25#endif
26
27typedef 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;
66typedef 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;
86typedef 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
101typedef 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
MirTouchscreenMappingMode
Mapping modes for touchscreen devices.
Definition: mir_input_device_types.h:113
@ mir_touchscreen_mapping_mode_to_display_wall
Map the device coordinates onto the whole wall of outputs.
Definition: mir_input_device_types.h:121
@ mir_touchscreen_mapping_mode_to_output
Map the device coordinates onto specific output.
Definition: mir_input_device_types.h:117
MirInputDeviceCapability
Definition: mir_input_device_types.h:89
@ mir_input_device_capability_switch
Definition: mir_input_device_types.h:97
@ mir_input_device_capability_alpha_numeric
capable to detect multiple contacts
Definition: mir_input_device_types.h:99
@ mir_input_device_capability_multitouch
Definition: mir_input_device_types.h:98
@ mir_input_device_capability_gamepad
Definition: mir_input_device_types.h:95
@ mir_input_device_capability_pointer
Definition: mir_input_device_types.h:91
@ mir_input_device_capability_joystick
Definition: mir_input_device_types.h:96
@ mir_input_device_capability_keyboard
Definition: mir_input_device_types.h:92
@ mir_input_device_capability_touchpad
Definition: mir_input_device_types.h:93
@ mir_input_device_capability_none
Definition: mir_input_device_types.h:90
@ mir_input_device_capability_touchscreen
Definition: mir_input_device_types.h:94
MirPointerAcceleration
MirPointerAcceleration describes the way pointer movement is filtered:
Definition: mir_input_device_types.h:45
@ mir_pointer_acceleration_none
Definition: mir_input_device_types.h:46
@ mir_pointer_acceleration_adaptive
Definition: mir_input_device_types.h:47
MirTouchpadClickMode
MirTouchpadClickMode configures how the touchpad itself should generate pointer button events.
Definition: mir_input_device_types.h:61
@ mir_touchpad_click_mode_none
Definition: mir_input_device_types.h:62
@ mir_touchpad_click_mode_area_to_click
Definition: mir_input_device_types.h:63
@ mir_touchpad_click_mode_finger_count
Definition: mir_input_device_types.h:64
unsigned int MirTouchpadScrollModes
Definition: mir_input_device_types.h:86
MirPointerHandedness
Definition: mir_input_device_types.h:30
@ mir_pointer_handedness_left
Definition: mir_input_device_types.h:32
@ mir_pointer_handedness_right
Definition: mir_input_device_types.h:31
unsigned int MirTouchpadClickModes
Definition: mir_input_device_types.h:66
int64_t MirInputDeviceId
Definition: mir_input_device_types.h:27
MirTouchpadScrollMode
MirTouchpadScrollMode configures how the touchpad should generate scroll events.
Definition: mir_input_device_types.h:80
@ mir_touchpad_scroll_mode_two_finger_scroll
Definition: mir_input_device_types.h:82
@ mir_touchpad_scroll_mode_edge_scroll
Definition: mir_input_device_types.h:83
@ mir_touchpad_scroll_mode_none
Definition: mir_input_device_types.h:81
@ mir_touchpad_scroll_mode_button_down_scroll
Definition: mir_input_device_types.h:84
unsigned int MirInputDeviceCapabilities
Definition: mir_input_device_types.h:101

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.