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
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 
92 } MirKeyboardAction;
93 
94 /**
95  * Possible per touch actions for state changing
96  */
97 typedef enum {
98  /* This touch point is going up */
100  /* This touch point is going down */
102  /* Axis values have changed on this touch point */
104 
106 } MirTouchAction;
107 
108 /**
109  * Identifiers for touch axis
110  */
111 typedef enum {
112 /* Axis representing the x coordinate for the touch */
114 /* Axis representing the y coordinate for the touch */
116 /* Axis representing pressure of the touch */
118 /* Axis representing the length of the major axis of an ellipse
119  centered at the touch point */
121 /* Axis representing the length of the minor axis of an ellipse
122  centered at the touch point */
124 /* Axis representing the diameter of a circle centered on the touch
125  point */
127 
129 } MirTouchAxis;
130 
131 /**
132  * Identifiers for per-touch tool types
133  */
134 typedef enum {
135 // Tool type could not be determined
137 // Touch is made with a finger
139 // Touch is made with a stylus
141 
143 } MirTouchTooltype;
144 
145 
146 /**
147  * Possible pointer actions
148  */
149 typedef enum {
150  /* A pointer button has come up */
152  /* A pointer button has gone down */
154  /* The pointer has entered the surface to which this event was delivered */
156  /* The pointer has left the surface to which this event was delivered */
158  /* Axis values have changed for the pointer */
160 
162 } MirPointerAction;
163 
164 /**
165  * Identifiers for pointer axis
166  */
167 typedef enum {
168 /* Absolute axis containing the x coordinate of the pointer */
170 /* Absolute axis containing the y coordinate of the pointer */
172 /* Relative axis containing ticks reported by the vertical scroll wheel */
174 /* Relative axis containing ticks reported by the horizontal scroll wheel */
176 /* Relative axis containing the last reported x differential from the pointer */
178 /* Relative axis containing the last reported y differential from the pointer */
180 /* Relative axis containing physical mouse wheel clicks reported by the vertical scroll wheel */
182 /* Relative axis containing physical mouse wheel clicks reported by the horizontal scroll wheel */
184 /* Relative axis containing fractional values of 120 for high-res scrolling as reported by the vertical scroll wheel */
185 /* When a discrete value is given (libinput < 1.19), value120 is determined by multiplying (discrete * 120) */
187 /* Relative axis containing fractional values of 120 for high-res scrolling as reported by the horizontal scroll wheel */
188 /* When a discrete value is given (libinput < 1.19), value120 is determined by multiplying (discrete * 120) */
190 
192 } MirPointerAxis;
193 
194 /*
195  * Identifiers for pointer buttons
196  */
197 typedef enum {
205  mir_pointer_button_task = 1 << 7
206 } MirPointerButton;
207 typedef unsigned int MirPointerButtons;
208 
209 /**
210  * Identifiers for pointer event source
211  */
212 typedef enum {
218 } MirPointerAxisSource;
219 
220 #ifdef __cplusplus
221 }
222 #endif
223 
224 #endif /* MIR_TOOLKIT_EVENT_ENUMS_H_ */

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.