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
24 extern "C" {
25 #endif
26 
27 typedef 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 
45 typedef enum {
50 
52 } MirInputEventType;
53 
54 /**
55  * Description of key modifier state.
56  */
57 typedef enum {
76 } MirInputEventModifier;
77 typedef unsigned int MirInputEventModifiers;
78 
79 /**
80  * Possible actions for changing key state
81  */
82 typedef 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  */
99 typedef 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  */
113 typedef 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  */
136 typedef 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  */
151 typedef 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  */
169 typedef 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  */
199 typedef enum {
207  mir_pointer_button_task = 1 << 7
208 } MirPointerButton;
209 typedef unsigned int MirPointerButtons;
210 
211 /**
212  * Identifiers for pointer event source
213  */
214 typedef enum {
220 } MirPointerAxisSource;
221 
222 #ifdef __cplusplus
223 }
224 #endif
225 
226 #endif /* MIR_TOOLKIT_EVENT_ENUMS_H_ */

Copyright © 2012-2023 Canonical Ltd.
Generated on Wed Feb 1 16:59:23 UTC 2023
This documentation is licensed under the GPL version 2 or 3.