Mir
touch_input_event.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 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 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  * Authored by: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_TOOLKIT_TOUCH_INPUT_EVENT_H_
20 #define MIR_TOOLKIT_TOUCH_INPUT_EVENT_H_
21 
22 #ifdef __cplusplus
23 
27 extern "C" {
28 #endif
29 
34 
40 typedef int32_t MirTouchInputEventTouchId;
41 
45 typedef enum {
46  /* This touch point is going up */
48  /* This touch point is going down */
50  /* Axis values have changed on this touch point */
53 
57 typedef enum {
58 /* Axis representing the x coordinate for the touch */
60 /* Axis representing the y coordinate for the touch */
62 /* Axis representing pressure of the touch */
64 /* Axis representing the length of the major axis of an ellipse
65  centered at the touch point */
67 /* Axis representing the length of the minor axis of an ellipse
68  centered at the touch point */
70 /* Axis representing the diameter of a circle centered on the touch
71  point */
74 
78 typedef enum {
79 // Tool type could not be determined
81 // Touch is made with a finger
83 // Touch is made with a stylus
86 
94 
103 
111 MirTouchInputEventTouchId mir_touch_input_event_get_touch_id(MirTouchInputEvent const* event, size_t touch_index);
112 
121 
130  size_t touch_index);
131 
132 
142  size_t touch_index, MirTouchInputEventTouchAxis axis);
143 
144 #ifdef __cplusplus
145 }
147 #endif
148 
149 #endif /* MIR_TOOLKIT_TOUCH_INPUT_EVENT_H_ */
Definition: touch_input_event.h:69
MirTouchInputEventTouchAction mir_touch_input_event_get_touch_action(MirTouchInputEvent const *event, size_t touch_index)
Retrieve the action which occured for a touch at given index.
Definition: input_event.cpp:335
MirInputEventModifiers mir_touch_input_event_get_modifiers(MirTouchInputEvent const *event)
Retrieve the modifier keys pressed when the touch action occured.
Definition: input_event.cpp:298
Definition: touch_input_event.h:84
MirTouchInputEventTouchTooltype mir_touch_input_event_get_touch_tooltype(MirTouchInputEvent const *event, size_t touch_index)
Retrieve the tooltype for touch at given index.
Definition: input_event.cpp:383
Definition: touch_input_event.h:61
float mir_touch_input_event_get_touch_axis_value(MirTouchInputEvent const *event, size_t touch_index, MirTouchInputEventTouchAxis axis)
Retrieve the axis value for a given axis on an indexed touch.
Definition: input_event.cpp:408
struct MirTouchInputEvent MirTouchInputEvent
An event type describing a change in touch device state.
Definition: touch_input_event.h:33
unsigned int MirInputEventModifiers
Definition: input_event.h:65
Definition: touch_input_event.h:66
Definition: touch_input_event.h:80
MirTouchInputEventTouchId mir_touch_input_event_get_touch_id(MirTouchInputEvent const *event, size_t touch_index)
Retrieve the TouchID for a touch at given index.
Definition: input_event.cpp:322
Definition: touch_input_event.h:59
MirTouchInputEventTouchTooltype
Identifiers for per-touch tool types.
Definition: touch_input_event.h:78
Definition: touch_input_event.h:51
Definition: touch_input_event.h:63
int32_t MirTouchInputEventTouchId
An identifier for a touch-point.
Definition: touch_input_event.h:40
Definition: touch_input_event.h:47
MirTouchInputEventTouchAxis
Identifiers for touch axis.
Definition: touch_input_event.h:57
Definition: touch_input_event.h:82
Definition: touch_input_event.h:72
unsigned int mir_touch_input_event_get_touch_count(MirTouchInputEvent const *event)
Retrieve the number of touches reported for a given touch event.
Definition: input_event.cpp:316
MirTouchInputEventTouchAction
Possible per touch actions for state changing.
Definition: touch_input_event.h:45
Definition: touch_input_event.h:49

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015