• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit InputKit
19 */
20
21/**
22 * Pinch event on touchPad
23 *
24 * @interface Pinch
25 * @syscap SystemCapability.MultimodalInput.Input.Core
26 * @since 10
27 */
28export declare interface Pinch {
29  /**
30   * Action type
31   * @type { ActionType }
32   * @syscap SystemCapability.MultimodalInput.Input.Core
33   * @since 10
34   */
35  type: ActionType;
36
37  /**
38   * scale
39   * @type { number }
40   * @syscap SystemCapability.MultimodalInput.Input.Core
41   * @since 10
42   */
43  scale: number;
44}
45
46/**
47 * Rotate event on touchPad
48 *
49 * @interface Rotate
50 * @syscap SystemCapability.MultimodalInput.Input.Core
51 * @since 11
52 */
53export declare interface Rotate {
54  /**
55   * Action type
56   *
57   * @type { ActionType }
58   * @syscap SystemCapability.MultimodalInput.Input.Core
59   * @since 11
60   */
61  type: ActionType;
62
63  /**
64   * Rotate angle
65   *
66   * @type { number }
67   * @syscap SystemCapability.MultimodalInput.Input.Core
68   * @since 11
69   */
70  angle: number;
71}
72
73/**
74 * Three fingers swipe event on touchPad
75 *
76 * @interface ThreeFingersSwipe
77 * @syscap SystemCapability.MultimodalInput.Input.Core
78 * @since 10
79 */
80export declare interface ThreeFingersSwipe {
81  /**
82   * Action type
83   * @type { ActionType }
84   * @syscap SystemCapability.MultimodalInput.Input.Core
85   * @since 10
86   */
87  type: ActionType;
88
89  /**
90   * Coordinate x
91   * @type { number }
92   * @syscap SystemCapability.MultimodalInput.Input.Core
93   * @since 10
94   */
95  x: number;
96
97  /**
98   * Coordinate y
99   * @type { number }
100   * @syscap SystemCapability.MultimodalInput.Input.Core
101   * @since 10
102   */
103  y: number;
104}
105
106/**
107 * Four fingers swipe event on touchPad
108 *
109 * @interface FourFingersSwipe
110 * @syscap SystemCapability.MultimodalInput.Input.Core
111 * @since 10
112 */
113export declare interface FourFingersSwipe {
114  /**
115   * Action type
116   * @type { ActionType }
117   * @syscap SystemCapability.MultimodalInput.Input.Core
118   * @since 10
119   */
120  type: ActionType;
121
122  /**
123   * Coordinate x
124   * @type { number }
125   * @syscap SystemCapability.MultimodalInput.Input.Core
126   * @since 10
127   */
128  x: number;
129
130  /**
131   * Coordinate y
132   * @type { number }
133   * @syscap SystemCapability.MultimodalInput.Input.Core
134   * @since 10
135   */
136  y: number;
137}
138
139/**
140 * Swipe Inward event on touchPad
141 *
142 * @interface SwipeInward
143 * @syscap SystemCapability.MultimodalInput.Input.Core
144 * @systemapi hide for inner use
145 * @since 12
146 */
147export declare interface SwipeInward {
148  /**
149   * Action type
150   * @type { ActionType }
151   * @syscap SystemCapability.MultimodalInput.Input.Core
152   * @systemapi hide for inner use
153   * @since 12
154   */
155  type: ActionType;
156
157  /**
158   * Coordinate x
159   * @type { number }
160   * @syscap SystemCapability.MultimodalInput.Input.Core
161   * @systemapi hide for inner use
162   * @since 12
163   */
164  x: number;
165
166  /**
167   * Coordinate y
168   * @type { number }
169   * @syscap SystemCapability.MultimodalInput.Input.Core
170   * @systemapi hide for inner use
171   * @since 12
172   */
173  y: number;
174}
175
176/**
177 * Three fingers tap event on touchPad
178 *
179 * @interface ThreeFingersTap
180 * @syscap SystemCapability.MultimodalInput.Input.Core
181 * @since 11
182 */
183export declare interface ThreeFingersTap {
184  /**
185   * Action type
186   *
187   * @type { ActionType }
188   * @syscap SystemCapability.MultimodalInput.Input.Core
189   * @since 11
190   */
191  type: ActionType;
192}
193
194/**
195 * Defines a touchscreen gesture event.
196 *
197 * @interface TouchGestureEvent
198 * @syscap SystemCapability.MultimodalInput.Input.Core
199 * @systemapi hide for inner use
200 * @since 18
201 */
202export declare interface TouchGestureEvent {
203  /**
204   * Gesture action type.
205   *
206   * @type { TouchGestureAction }
207   * @syscap SystemCapability.MultimodalInput.Input.Core
208   * @systemapi hide for inner use
209   * @since 18
210   */
211  action: TouchGestureAction;
212  /**
213   * Collection of all touch points upon completion of the gesture.
214   *
215   * @type { Touch[] }
216   * @syscap SystemCapability.MultimodalInput.Input.Core
217   * @systemapi hide for inner use
218   * @since 18
219   */
220  touches: Touch[];
221}
222
223/**
224 * Enumerates touchscreen gesture action types.
225 *
226 * @enum { number }
227 * @syscap SystemCapability.MultimodalInput.Input.Core
228 * @systemapi hide for inner use
229 * @since 18
230 */
231export declare enum TouchGestureAction {
232  /**
233   * Swiping down with multiple fingers.
234   *
235   * @syscap SystemCapability.MultimodalInput.Input.Core
236   * @systemapi hide for inner use
237   * @since 18
238   */
239  SWIPE_DOWN = 0,
240  /**
241   * Swiping up with multiple fingers.
242   *
243   * @syscap SystemCapability.MultimodalInput.Input.Core
244   * @systemapi hide for inner use
245   * @since 18
246   */
247  SWIPE_UP,
248  /**
249   * Swiping left with multiple fingers.
250   *
251   * @syscap SystemCapability.MultimodalInput.Input.Core
252   * @systemapi hide for inner use
253   * @since 18
254   */
255  SWIPE_LEFT,
256  /**
257   * Swiping right with multiple fingers.
258   *
259   * @syscap SystemCapability.MultimodalInput.Input.Core
260   * @systemapi hide for inner use
261   * @since 18
262   */
263  SWIPE_RIGHT,
264  /**
265   * Multi-finger pinching closed.
266   *
267   * @syscap SystemCapability.MultimodalInput.Input.Core
268   * @systemapi hide for inner use
269   * @since 18
270   */
271  PINCH_CLOSED,
272  /**
273   * Multi-finger pinching opened.
274   *
275   * @syscap SystemCapability.MultimodalInput.Input.Core
276   * @systemapi hide for inner use
277   * @since 18
278   */
279  PINCH_OPENED,
280  /**
281   * The gesture ends.
282   *
283   * @syscap SystemCapability.MultimodalInput.Input.Core
284   * @systemapi hide for inner use
285   * @since 18
286   */
287  GESTURE_END
288}
289
290/**
291 * Gesture action type
292 *
293 * @enum { number }
294 * @syscap SystemCapability.MultimodalInput.Input.Core
295 * @since 10
296 */
297export declare enum ActionType {
298  /**
299   * Cancel of the gesture
300   *
301   * @syscap SystemCapability.MultimodalInput.Input.Core
302   * @since 10
303   */
304  CANCEL = 0,
305
306  /**
307   * Begin of the gesture
308   *
309   * @syscap SystemCapability.MultimodalInput.Input.Core
310   * @since 10
311   */
312  BEGIN = 1,
313
314  /**
315   * Update of the gesture
316   *
317   * @syscap SystemCapability.MultimodalInput.Input.Core
318   * @since 10
319   */
320  UPDATE = 2,
321
322  /**
323   * End of the gesture
324   *
325   * @syscap SystemCapability.MultimodalInput.Input.Core
326   * @since 10
327   */
328  END = 3
329}