Mir
enums.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014-2020 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
28 extern "C" {
29 #endif
30 
31 #pragma GCC diagnostic push
32 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
33 typedef enum
34 {
35  MIR_DEPRECATED_ENUM(mir_event_type_key, "mir_event_type_input"), // UNUSED since Mir 0.26
36  MIR_DEPRECATED_ENUM(mir_event_type_motion, "mir_event_type_input"), // UNUSED since Mir 0.26
37  MIR_DEPRECATED_ENUM(mir_event_type_surface, "mir_event_type_window"),
38  mir_event_type_window = mir_event_type_surface,
42  MIR_DEPRECATED_ENUM(mir_event_type_close_surface, "mir_event_type_close_window"),
43  mir_event_type_close_window = mir_event_type_close_surface,
44  /* Type for new style input event will be returned from mir_event_get_type
45  when old style event type was mir_event_type_key or mir_event_type_motion */
48  MIR_DEPRECATED_ENUM(mir_event_type_input_configuration, "mir_connection_set_input_config_change_callback and mir_event_type_input_device_state"),
49  MIR_DEPRECATED_ENUM(mir_event_type_surface_output, "mir_event_type_window_output"),
50  mir_event_type_window_output = mir_event_type_surface_output,
52  MIR_DEPRECATED_ENUM(mir_event_type_surface_placement, "mir_event_type_window_placement"),
53  mir_event_type_window_placement = mir_event_type_surface_placement,
54 } MirEventType;
55 #pragma GCC diagnostic pop
56 
57 typedef enum {
61 
64 
68 typedef enum {
88 typedef unsigned int MirInputEventModifiers;
89 
93 typedef enum {
94  /* A key has come up (released) */
96  /* A key has gone down (pressed) */
98  /* System policy has triggered a key repeat on a key
99  which was already down */
101 
104 
108 typedef enum {
109  /* This touch point is going up */
111  /* This touch point is going down */
113  /* Axis values have changed on this touch point */
115 
118 
122 typedef enum {
123 /* Axis representing the x coordinate for the touch */
125 /* Axis representing the y coordinate for the touch */
127 /* Axis representing pressure of the touch */
129 /* Axis representing the length of the major axis of an ellipse
130  centered at the touch point */
132 /* Axis representing the length of the minor axis of an ellipse
133  centered at the touch point */
135 /* Axis representing the diameter of a circle centered on the touch
136  point */
138 
141 
145 typedef enum {
146 // Tool type could not be determined
148 // Touch is made with a finger
150 // Touch is made with a stylus
152 
155 
156 
160 typedef enum {
161  /* A pointer button has come up */
163  /* A pointer button has gone down */
165  /* The pointer has entered the surface to which this event was delivered */
167  /* The pointer has left the surface to which this event was delivered */
169  /* Axis values have changed for the pointer */
171 
174 
178 typedef enum {
179 /* Absolute axis containing the x coordinate of the pointer */
181 /* Absolute axis containing the y coordinate of the pointer */
183 /* Relative axis containing ticks reported by the vertical scroll wheel */
185 /* Relative axis containing ticks reported by the horizontal scroll wheel */
187 /* Relative axis containing the last reported x differential from the pointer */
189 /* Relative axis containing the last reported y differential from the pointer */
191 
194 
195 /*
196  * Identifiers for pointer buttons
197  */
198 typedef enum {
206  mir_pointer_button_task = 1 << 7
208 typedef unsigned int MirPointerButtons;
209 
210 #ifdef __cplusplus
211 }
213 #endif
214 
215 #endif /* MIR_TOOLKIT_EVENT_ENUMS_H_ */
MirPointerAction
Possible pointer actions.
Definition: enums.h:160
unsigned int MirPointerButtons
Definition: enums.h:208
MirInputEventType
Definition: enums.h:57
MirEventType
Definition: enums.h:34
MirPointerButton
Definition: enums.h:198
MirKeyboardAction
Possible actions for changing key state.
Definition: enums.h:93
MirTouchAxis
Identifiers for touch axis.
Definition: enums.h:122
MirTouchTooltype
Identifiers for per-touch tool types.
Definition: enums.h:145
MirTouchAction
Possible per touch actions for state changing.
Definition: enums.h:108
MirPointerAxis
Identifiers for pointer axis.
Definition: enums.h:178
MirInputEventModifier
Description of key modifier state.
Definition: enums.h:68
unsigned int MirInputEventModifiers
Definition: enums.h:88
@ mir_pointer_action_motion
Definition: enums.h:170
@ mir_pointer_actions
Definition: enums.h:172
@ mir_pointer_action_leave
Definition: enums.h:168
@ mir_pointer_action_button_down
Definition: enums.h:164
@ mir_pointer_action_button_up
Definition: enums.h:162
@ mir_pointer_action_enter
Definition: enums.h:166
@ mir_input_event_type_pointer
Definition: enums.h:60
@ mir_input_event_type_touch
Definition: enums.h:59
@ mir_input_event_type_key
Definition: enums.h:58
@ mir_input_event_types
Definition: enums.h:62
@ mir_event_type_close_window
Definition: enums.h:43
@ mir_event_type_orientation
Definition: enums.h:41
@ mir_event_type_prompt_session_state_change
Definition: enums.h:40
@ mir_event_type_keymap
Definition: enums.h:47
@ mir_event_type_window_placement
Definition: enums.h:53
@ mir_event_type_window_output
Definition: enums.h:50
@ mir_event_type_input_device_state
Definition: enums.h:51
@ MIR_DEPRECATED_ENUM
Definition: enums.h:35
@ mir_event_type_input
Definition: enums.h:46
@ mir_event_type_resize
Definition: enums.h:39
@ mir_event_type_window
Definition: enums.h:38
@ mir_pointer_button_primary
Definition: enums.h:199
@ mir_pointer_button_secondary
Definition: enums.h:200
@ mir_pointer_button_tertiary
Definition: enums.h:201
@ mir_pointer_button_extra
Definition: enums.h:205
@ mir_pointer_button_side
Definition: enums.h:204
@ mir_pointer_button_forward
Definition: enums.h:203
@ mir_pointer_button_task
Definition: enums.h:206
@ mir_pointer_button_back
Definition: enums.h:202
@ mir_keyboard_action_repeat
Definition: enums.h:100
@ mir_keyboard_action_down
Definition: enums.h:97
@ mir_keyboard_action_up
Definition: enums.h:95
@ mir_keyboard_actions
Definition: enums.h:102
@ mir_touch_axis_y
Definition: enums.h:126
@ mir_touch_axis_pressure
Definition: enums.h:128
@ mir_touch_axis_touch_minor
Definition: enums.h:134
@ mir_touch_axes
Definition: enums.h:139
@ mir_touch_axis_touch_major
Definition: enums.h:131
@ mir_touch_axis_x
Definition: enums.h:124
@ mir_touch_axis_size
Definition: enums.h:137
@ mir_touch_tooltype_finger
Definition: enums.h:149
@ mir_touch_tooltypes
Definition: enums.h:153
@ mir_touch_tooltype_stylus
Definition: enums.h:151
@ mir_touch_tooltype_unknown
Definition: enums.h:147
@ mir_touch_action_down
Definition: enums.h:112
@ mir_touch_actions
Definition: enums.h:116
@ mir_touch_action_up
Definition: enums.h:110
@ mir_touch_action_change
Definition: enums.h:114
@ mir_pointer_axis_x
Definition: enums.h:180
@ mir_pointer_axes
Definition: enums.h:192
@ mir_pointer_axis_hscroll
Definition: enums.h:186
@ mir_pointer_axis_y
Definition: enums.h:182
@ mir_pointer_axis_relative_y
Definition: enums.h:190
@ mir_pointer_axis_relative_x
Definition: enums.h:188
@ mir_pointer_axis_vscroll
Definition: enums.h:184
@ mir_input_event_modifier_caps_lock
Definition: enums.h:84
@ mir_input_event_modifier_ctrl
Definition: enums.h:78
@ mir_input_event_modifier_meta
Definition: enums.h:81
@ mir_input_event_modifier_meta_right
Definition: enums.h:83
@ mir_input_event_modifier_alt_right
Definition: enums.h:72
@ mir_input_event_modifier_alt
Definition: enums.h:70
@ mir_input_event_modifier_num_lock
Definition: enums.h:85
@ mir_input_event_modifier_alt_left
Definition: enums.h:71
@ mir_input_event_modifier_shift
Definition: enums.h:73
@ mir_input_event_modifier_meta_left
Definition: enums.h:82
@ mir_input_event_modifier_shift_right
Definition: enums.h:75
@ mir_input_event_modifier_ctrl_left
Definition: enums.h:79
@ mir_input_event_modifier_ctrl_right
Definition: enums.h:80
@ mir_input_event_modifier_function
Definition: enums.h:77
@ mir_input_event_modifier_scroll_lock
Definition: enums.h:86
@ mir_input_event_modifier_sym
Definition: enums.h:76
@ mir_input_event_modifier_none
Definition: enums.h:69
@ mir_input_event_modifier_shift_left
Definition: enums.h:74

Copyright © 2012-2021 Canonical Ltd.
Generated on Wed Mar 31 08:25:47 UTC 2021
This documentation is licensed under the GPL version 2 or 3.