Mir
enums.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_EVENT_ENUMS_H_
19#define MIR_TOOLKIT_EVENT_ENUMS_H_
20
21#include <mir_toolkit/common.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27typedef enum
28{
29 mir_event_type_key [[deprecated("UNUSED since Mir 0.26")]],
30 mir_event_type_motion [[deprecated("UNUSED since Mir 0.26")]],
36 /* Type for new style input event will be returned from mir_event_get_type
37 when old style event type was mir_event_type_key or mir_event_type_motion */
39 mir_event_type_input_configuration [[deprecated("UNUSED since Mir 0.26")]],
43} MirEventType;
44
45typedef enum {
50
52} MirInputEventType;
53
54/**
55 * Description of key modifier state.
56 */
57typedef enum {
76} MirInputEventModifier;
77typedef unsigned int MirInputEventModifiers;
78
79/**
80 * Possible actions for changing key state
81 */
82typedef enum {
83 /* A key has come up (released) */
85 /* A key has gone down (pressed) */
87 /* System policy has triggered a key repeat on a key
88 which was already down */
90 /* Modifiers have been updated without a key event. keysym, scan_code and text are not set. */
92
94} MirKeyboardAction;
95
96/**
97 * Possible per touch actions for state changing
98 */
99typedef enum {
100 /* This touch point is going up */
102 /* This touch point is going down */
104 /* Axis values have changed on this touch point */
106
108} MirTouchAction;
109
110/**
111 * Identifiers for touch axis
112 */
113typedef enum {
114/* Axis representing the x coordinate for the touch */
116/* Axis representing the y coordinate for the touch */
118/* Axis representing pressure of the touch */
120/* Axis representing the length of the major axis of an ellipse
121 centered at the touch point */
123/* Axis representing the length of the minor axis of an ellipse
124 centered at the touch point */
126/* Axis representing the diameter of a circle centered on the touch
127 point */
129
131} MirTouchAxis;
132
133/**
134 * Identifiers for per-touch tool types
135 */
136typedef enum {
137// Tool type could not be determined
139// Touch is made with a finger
141// Touch is made with a stylus
143
145} MirTouchTooltype;
146
147
148/**
149 * Possible pointer actions
150 */
151typedef enum {
152 /* A pointer button has come up */
154 /* A pointer button has gone down */
156 /* The pointer has entered the surface to which this event was delivered */
158 /* The pointer has left the surface to which this event was delivered */
160 /* Axis values have changed for the pointer */
162
164} MirPointerAction;
165
166/**
167 * Identifiers for pointer axis
168 */
169typedef enum {
170/* Absolute axis containing the x coordinate of the pointer */
172/* Absolute axis containing the y coordinate of the pointer */
174/* Relative axis containing ticks reported by the vertical scroll wheel */
176/* Relative axis containing ticks reported by the horizontal scroll wheel */
178/* Relative axis containing the last reported x differential from the pointer */
180/* Relative axis containing the last reported y differential from the pointer */
182/* Relative axis containing physical mouse wheel clicks reported by the vertical scroll wheel */
184/* Relative axis containing physical mouse wheel clicks reported by the horizontal scroll wheel */
186/* Relative axis containing fractional values of 120 for high-res scrolling as reported by the vertical scroll wheel */
187/* When a discrete value is given (libinput < 1.19), value120 is determined by multiplying (discrete * 120) */
189/* Relative axis containing fractional values of 120 for high-res scrolling as reported by the horizontal scroll wheel */
190/* When a discrete value is given (libinput < 1.19), value120 is determined by multiplying (discrete * 120) */
192
194} MirPointerAxis;
195
196/*
197 * Identifiers for pointer buttons
198 */
199typedef enum {
208} MirPointerButton;
209typedef unsigned int MirPointerButtons;
210
211/**
212 * Identifiers for pointer event source
213 */
214typedef enum {
220} MirPointerAxisSource;
221
222#ifdef __cplusplus
223}
224#endif
225
226#endif /* MIR_TOOLKIT_EVENT_ENUMS_H_ */
@ mir_pointer_action_motion
Definition: enums.h:161
@ mir_pointer_actions
Definition: enums.h:163
@ mir_pointer_action_leave
Definition: enums.h:159
@ mir_pointer_action_button_down
Definition: enums.h:155
@ mir_pointer_action_button_up
Definition: enums.h:153
@ mir_pointer_action_enter
Definition: enums.h:157
unsigned int MirPointerButtons
Definition: enums.h:209
@ mir_input_event_type_keyboard_resync
Definition: enums.h:49
@ mir_input_event_type_pointer
Definition: enums.h:48
@ mir_input_event_type_touch
Definition: enums.h:47
@ mir_input_event_type_key
Definition: enums.h:46
@ mir_input_event_types
Definition: enums.h:51
@ mir_event_type_close_window
Definition: enums.h:35
@ mir_event_type_key
Definition: enums.h:29
@ mir_event_type_orientation
Definition: enums.h:34
@ mir_event_type_prompt_session_state_change
Definition: enums.h:33
@ mir_event_type_input_configuration
Definition: enums.h:39
@ mir_event_type_window_placement
Definition: enums.h:42
@ mir_event_type_window_output
Definition: enums.h:40
@ mir_event_type_input_device_state
Definition: enums.h:41
@ mir_event_type_input
Definition: enums.h:38
@ mir_event_type_resize
Definition: enums.h:32
@ mir_event_type_motion
Definition: enums.h:30
@ mir_event_type_window
Definition: enums.h:31
@ mir_pointer_button_primary
Definition: enums.h:200
@ mir_pointer_button_secondary
Definition: enums.h:201
@ mir_pointer_button_tertiary
Definition: enums.h:202
@ mir_pointer_button_extra
Definition: enums.h:206
@ mir_pointer_button_side
Definition: enums.h:205
@ mir_pointer_button_forward
Definition: enums.h:204
@ mir_pointer_button_task
Definition: enums.h:207
@ mir_pointer_button_back
Definition: enums.h:203
@ mir_keyboard_action_repeat
Definition: enums.h:89
@ mir_keyboard_action_modifiers
Definition: enums.h:91
@ mir_keyboard_action_down
Definition: enums.h:86
@ mir_keyboard_action_up
Definition: enums.h:84
@ mir_keyboard_actions
Definition: enums.h:93
@ mir_touch_axis_y
Definition: enums.h:117
@ mir_touch_axis_pressure
Definition: enums.h:119
@ mir_touch_axis_touch_minor
Definition: enums.h:125
@ mir_touch_axes
Definition: enums.h:130
@ mir_touch_axis_touch_major
Definition: enums.h:122
@ mir_touch_axis_x
Definition: enums.h:115
@ mir_touch_axis_size
Definition: enums.h:128
@ mir_pointer_axis_source_wheel_tilt
Definition: enums.h:219
@ mir_pointer_axis_source_wheel
Definition: enums.h:216
@ mir_pointer_axis_source_none
Definition: enums.h:215
@ mir_pointer_axis_source_continuous
Definition: enums.h:218
@ mir_pointer_axis_source_finger
Definition: enums.h:217
@ mir_touch_tooltype_finger
Definition: enums.h:140
@ mir_touch_tooltypes
Definition: enums.h:144
@ mir_touch_tooltype_stylus
Definition: enums.h:142
@ mir_touch_tooltype_unknown
Definition: enums.h:138
@ mir_touch_action_down
Definition: enums.h:103
@ mir_touch_actions
Definition: enums.h:107
@ mir_touch_action_up
Definition: enums.h:101
@ mir_touch_action_change
Definition: enums.h:105
@ mir_pointer_axis_hscroll_value120
Definition: enums.h:191
@ mir_pointer_axis_x
Definition: enums.h:171
@ mir_pointer_axes
Definition: enums.h:193
@ mir_pointer_axis_vscroll_discrete
Definition: enums.h:183
@ mir_pointer_axis_hscroll
Definition: enums.h:177
@ mir_pointer_axis_y
Definition: enums.h:173
@ mir_pointer_axis_relative_y
Definition: enums.h:181
@ mir_pointer_axis_vscroll_value120
Definition: enums.h:188
@ mir_pointer_axis_relative_x
Definition: enums.h:179
@ mir_pointer_axis_vscroll
Definition: enums.h:175
@ mir_pointer_axis_hscroll_discrete
Definition: enums.h:185
@ mir_input_event_modifier_caps_lock
Definition: enums.h:73
@ mir_input_event_modifier_ctrl
Definition: enums.h:67
@ mir_input_event_modifier_meta
Definition: enums.h:70
@ mir_input_event_modifier_meta_right
Definition: enums.h:72
@ mir_input_event_modifier_alt_right
Definition: enums.h:61
@ mir_input_event_modifier_alt
Definition: enums.h:59
@ mir_input_event_modifier_num_lock
Definition: enums.h:74
@ mir_input_event_modifier_alt_left
Definition: enums.h:60
@ mir_input_event_modifier_shift
Definition: enums.h:62
@ mir_input_event_modifier_meta_left
Definition: enums.h:71
@ mir_input_event_modifier_shift_right
Definition: enums.h:64
@ mir_input_event_modifier_ctrl_left
Definition: enums.h:68
@ mir_input_event_modifier_ctrl_right
Definition: enums.h:69
@ mir_input_event_modifier_function
Definition: enums.h:66
@ mir_input_event_modifier_scroll_lock
Definition: enums.h:75
@ mir_input_event_modifier_sym
Definition: enums.h:65
@ mir_input_event_modifier_none
Definition: enums.h:58
@ mir_input_event_modifier_shift_left
Definition: enums.h:63
unsigned int MirInputEventModifiers
Definition: enums.h:77

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.