blob: e5874eb3a48e33144fa3b878d59b41704600e2c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
/*****************************************************************************
*
* grail - Gesture Recognition And Instantiation Library
*
* Copyright (C) 2010-2011 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
****************************************************************************/
#ifndef _GRAIL_TYPES_H
#define _GRAIL_TYPES_H
#define GRAIL_TYPE_DRAG1 0 /* one-finger drag/pan/scroll */
#define GRAIL_TYPE_PINCH1 1 /* one-finger pinch-to-zoom */
#define GRAIL_TYPE_ROTATE1 2 /* one-finger rotation */
#define GRAIL_TYPE_DRAG2 3 /* two-finger drag/pan/scroll */
#define GRAIL_TYPE_PINCH2 4 /* two-finger pinch-to-zoom */
#define GRAIL_TYPE_ROTATE2 5 /* two-finger rotation */
#define GRAIL_TYPE_DRAG3 6 /* three-finger drag/pan */
#define GRAIL_TYPE_PINCH3 7 /* three-finger pinch */
#define GRAIL_TYPE_ROTATE3 8 /* three-finger rotate */
#define GRAIL_TYPE_DRAG4 9 /* four-finger drag/pan */
#define GRAIL_TYPE_PINCH4 10 /* four-finger pinch */
#define GRAIL_TYPE_ROTATE4 11 /* four-finger rotate */
#define GRAIL_TYPE_DRAG5 12 /* five-finger drag/pan */
#define GRAIL_TYPE_PINCH5 13 /* five-finger pinch */
#define GRAIL_TYPE_ROTATE5 14 /* five-finger rotate */
#define GRAIL_TYPE_TAP1 15 /* one-finger single tap */
#define GRAIL_TYPE_TAP2 16 /* two-finger single tap */
#define GRAIL_TYPE_TAP3 17 /* three-finger single tap */
#define GRAIL_TYPE_TAP4 18 /* four-finger single tap */
#define GRAIL_TYPE_TAP5 19 /* five-finger single tap */
#define GRAIL_TYPE_EDRAG 20 /* three-finger environment drag */
#define GRAIL_TYPE_EPINCH 21 /* three-finger environment drag */
#define GRAIL_TYPE_EROTATE 22 /* three-finger environment drag */
#define GRAIL_TYPE_MDRAG 23 /* four-finger meta drag */
#define GRAIL_TYPE_MPINCH 24 /* four-finger meta drag */
#define GRAIL_TYPE_MROTATE 25 /* four-finger meta drag */
#define GRAIL_TYPE_SYSFLAG1 26 /* reserved system flag */
#define GRAIL_TYPE_TOUCH1 32 /* one-finger touch */
#define GRAIL_TYPE_TOUCH2 33 /* two-finger touch */
#define GRAIL_TYPE_TOUCH3 34 /* three-finger touch */
#define GRAIL_TYPE_TOUCH4 35 /* four-finger touch */
#define GRAIL_TYPE_TOUCH5 36 /* five-finger touch */
#define GRAIL_TYPE_ETOUCH 37 /* three-finger environment touch */
#define GRAIL_TYPE_MTOUCH 38 /* four-finger meta touch */
#define GRAIL_MAIN_DRAG 0
#define GRAIL_MAIN_PINCH 1
#define GRAIL_MAIN_ROTATE 2
#define GRAIL_MAIN_TAP 3
#define GRAIL_MAIN_SYSFLAG 4
#define GRAIL_MAIN_TOUCH 5
#define GRAIL_PROP_DRAG_DX 0 /* horizontal position delta */
#define GRAIL_PROP_DRAG_DY 1 /* vertical position delta */
#define GRAIL_PROP_DRAG_VX 2 /* horizontal velocity */
#define GRAIL_PROP_DRAG_VY 3 /* vertical velocity */
#define GRAIL_PROP_DRAG_X 4 /* horizontal position */
#define GRAIL_PROP_DRAG_Y 5 /* vertical position */
#define GRAIL_PROP_DRAG_X1 6 /* bounding box x1 */
#define GRAIL_PROP_DRAG_Y1 7 /* bounding box y1 */
#define GRAIL_PROP_DRAG_X2 8 /* bounding box x2 */
#define GRAIL_PROP_DRAG_Y2 9 /* bounding box y2 */
#define GRAIL_PROP_DRAG_ID_T0 10 /* first touch id */
#define GRAIL_PROP_DRAG_X_T0 11 /* first touch horizontal position */
#define GRAIL_PROP_DRAG_Y_T0 12 /* first touch vertical position */
#define GRAIL_PROP_DRAG_ID_T1 13
#define GRAIL_PROP_DRAG_X_T1 14
#define GRAIL_PROP_DRAG_Y_T1 15
#define GRAIL_PROP_DRAG_ID_T2 16
#define GRAIL_PROP_DRAG_X_T2 17
#define GRAIL_PROP_DRAG_Y_T2 18
#define GRAIL_PROP_DRAG_ID_T3 19
#define GRAIL_PROP_DRAG_X_T3 20
#define GRAIL_PROP_DRAG_Y_T3 21
#define GRAIL_PROP_DRAG_ID_T4 22
#define GRAIL_PROP_DRAG_X_T4 23
#define GRAIL_PROP_DRAG_Y_T4 24
#define GRAIL_PROP_PINCH_DR 0 /* radius delta */
#define GRAIL_PROP_PINCH_VR 1 /* radial velocity */
#define GRAIL_PROP_PINCH_R 2 /* radius */
#define GRAIL_PROP_PINCH_X1 3 /* bounding box x1 */
#define GRAIL_PROP_PINCH_Y1 4 /* bounding box y1 */
#define GRAIL_PROP_PINCH_X2 5 /* bounding box x2 */
#define GRAIL_PROP_PINCH_Y2 6 /* bounding box y2 */
#define GRAIL_PROP_PINCH_ID_T0 7 /* first touch id */
#define GRAIL_PROP_PINCH_X_T0 8 /* first touch horizontal position */
#define GRAIL_PROP_PINCH_Y_T0 9 /* first touch vertical position */
#define GRAIL_PROP_PINCH_ID_T1 10
#define GRAIL_PROP_PINCH_X_T1 11
#define GRAIL_PROP_PINCH_Y_T1 12
#define GRAIL_PROP_PINCH_ID_T2 13
#define GRAIL_PROP_PINCH_X_T2 14
#define GRAIL_PROP_PINCH_Y_T2 15
#define GRAIL_PROP_PINCH_ID_T3 16
#define GRAIL_PROP_PINCH_X_T3 17
#define GRAIL_PROP_PINCH_Y_T3 18
#define GRAIL_PROP_PINCH_ID_T4 19
#define GRAIL_PROP_PINCH_X_T4 20
#define GRAIL_PROP_PINCH_Y_T4 21
#define GRAIL_PROP_ROTATE_DA 0 /* angle delta */
#define GRAIL_PROP_ROTATE_VA 1 /* angular velocity */
#define GRAIL_PROP_ROTATE_A 2 /* angle */
#define GRAIL_PROP_ROTATE_X1 3 /* bounding box x1 */
#define GRAIL_PROP_ROTATE_Y1 4 /* bounding box y1 */
#define GRAIL_PROP_ROTATE_X2 5 /* bounding box x2 */
#define GRAIL_PROP_ROTATE_Y2 6 /* bounding box y2 */
#define GRAIL_PROP_ROTATE_ID_T0 7 /* first touch id */
#define GRAIL_PROP_ROTATE_X_T0 8 /* first touch horizontal position */
#define GRAIL_PROP_ROTATE_Y_T0 9 /* first touch vertical position */
#define GRAIL_PROP_ROTATE_ID_T1 10
#define GRAIL_PROP_ROTATE_X_T1 11
#define GRAIL_PROP_ROTATE_Y_T1 12
#define GRAIL_PROP_ROTATE_ID_T2 13
#define GRAIL_PROP_ROTATE_X_T2 14
#define GRAIL_PROP_ROTATE_Y_T2 15
#define GRAIL_PROP_ROTATE_ID_T3 16
#define GRAIL_PROP_ROTATE_X_T3 17
#define GRAIL_PROP_ROTATE_Y_T3 18
#define GRAIL_PROP_ROTATE_ID_T4 19
#define GRAIL_PROP_ROTATE_X_T4 20
#define GRAIL_PROP_ROTATE_Y_T4 21
#define GRAIL_PROP_TAP_DT 0 /* tap time (ms) */
#define GRAIL_PROP_TAP_X 1 /* horizontal position */
#define GRAIL_PROP_TAP_Y 2 /* vertical position */
#define GRAIL_PROP_TAP_X1 3 /* bounding box x1 */
#define GRAIL_PROP_TAP_Y1 4 /* bounding box y1 */
#define GRAIL_PROP_TAP_X2 5 /* bounding box x2 */
#define GRAIL_PROP_TAP_Y2 6 /* bounding box y2 */
#define GRAIL_PROP_TAP_ID_T0 7 /* first touch id */
#define GRAIL_PROP_TAP_X_T0 8 /* first touch horizontal position */
#define GRAIL_PROP_TAP_Y_T0 9 /* first touch vertical position */
#define GRAIL_PROP_TAP_ID_T1 10
#define GRAIL_PROP_TAP_X_T1 11
#define GRAIL_PROP_TAP_Y_T1 12
#define GRAIL_PROP_TAP_ID_T2 13
#define GRAIL_PROP_TAP_X_T2 14
#define GRAIL_PROP_TAP_Y_T2 15
#define GRAIL_PROP_TAP_ID_T3 16
#define GRAIL_PROP_TAP_X_T3 17
#define GRAIL_PROP_TAP_Y_T3 18
#define GRAIL_PROP_TAP_ID_T4 19
#define GRAIL_PROP_TAP_X_T4 20
#define GRAIL_PROP_TAP_Y_T4 21
#define GRAIL_PROP_TOUCH_X1 0 /* bounding box x1 */
#define GRAIL_PROP_TOUCH_Y1 1 /* bounding box y1 */
#define GRAIL_PROP_TOUCH_X2 2 /* bounding box x2 */
#define GRAIL_PROP_TOUCH_Y2 3 /* bounding box y2 */
#define GRAIL_PROP_TOUCH_ID_T0 4 /* first touch id */
#define GRAIL_PROP_TOUCH_X_T0 5 /* first touch horizontal position */
#define GRAIL_PROP_TOUCH_Y_T0 6 /* first touch vertical position */
#define GRAIL_PROP_TOUCH_ID_T1 7
#define GRAIL_PROP_TOUCH_X_T1 8
#define GRAIL_PROP_TOUCH_Y_T1 9
#define GRAIL_PROP_TOUCH_ID_T2 10
#define GRAIL_PROP_TOUCH_X_T2 11
#define GRAIL_PROP_TOUCH_Y_T2 12
#define GRAIL_PROP_TOUCH_ID_T3 13
#define GRAIL_PROP_TOUCH_X_T3 14
#define GRAIL_PROP_TOUCH_Y_T3 15
#define GRAIL_PROP_TOUCH_ID_T4 16
#define GRAIL_PROP_TOUCH_X_T4 17
#define GRAIL_PROP_TOUCH_Y_T4 18
#endif
|