Mir
touch_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 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  * Authored by: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_TOOLKIT_TOUCH_EVENT_H_
20 #define MIR_TOOLKIT_TOUCH_EVENT_H_
21 
22 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 typedef struct MirTouchEvent MirTouchEvent;
34 
40 typedef int32_t MirTouchId;
41 
49 
57 unsigned int mir_touch_event_point_count(MirTouchEvent const* event);
58 
66 MirTouchId mir_touch_event_id(MirTouchEvent const* event, size_t touch_index);
67 
75 MirTouchAction mir_touch_event_action(MirTouchEvent const* event, size_t touch_index);
76 
85  size_t touch_index);
86 
87 
97  size_t touch_index, MirTouchAxis axis);
98 
106 
107 #ifdef __cplusplus
108 }
110 #endif
111 
112 #endif /* MIR_TOOLKIT_TOUCH_EVENT_H_ */
unsigned int mir_touch_event_point_count(MirTouchEvent const *event)
Retrieve the number of touches reported for a given touch event.
MirTouchAction mir_touch_event_action(MirTouchEvent const *event, size_t touch_index)
Retrieve the action which occured for a touch at given index.
MirTouchTooltype mir_touch_event_tooltype(MirTouchEvent const *event, size_t touch_index)
Retrieve the tooltype for touch at given index.
MirInputEventModifiers mir_touch_event_modifiers(MirTouchEvent const *event)
Retrieve the modifier keys pressed when the touch action occured.
float mir_touch_event_axis_value(MirTouchEvent const *event, size_t touch_index, MirTouchAxis axis)
Retrieve the axis value for a given axis on an indexed touch.
int32_t MirTouchId
An identifier for a touch-point.
Definition: touch_event.h:40
MirInputEvent const * mir_touch_event_input_event(MirTouchEvent const *event)
Retrieve the corresponding input event.
struct MirInputEvent MirInputEvent
Definition: event.h:42
MirTouchAxis
Identifiers for touch axis.
Definition: enums.h:122
MirTouchId mir_touch_event_id(MirTouchEvent const *event, size_t touch_index)
Retrieve the TouchID for a touch at given index.
MirTouchTooltype
Identifiers for per-touch tool types.
Definition: enums.h:145
MirTouchAction
Possible per touch actions for state changing.
Definition: enums.h:108
struct MirTouchEvent MirTouchEvent
An event type describing a change in touch device state.
Definition: touch_event.h:33
unsigned int MirInputEventModifiers
Definition: enums.h:88

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.