• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.multimodalInput.gestureEvent (Gesture Input Event)
2
3The **gestureEvent** module provides APIs for gesture events reported by devices.
4
5>  **NOTE**
6>
7> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## Modules to Import
10
11```js
12import { Pinch, ThreeFingersSwipe, FourFingersSwipe, ActionType } from '@ohos.multimodalInput.gestureEvent';
13```
14
15## Pinch
16
17Defines a pinch event.
18
19**System capability**: SystemCapability.MultimodalInput.Input.Core
20
21| Name            | Type       | Readable  | Writable  | Description                                      |
22| -------------- | ----------- | ---- | ---- | ---------------------------------------- |
23| type         | [ActionType](#actiontype)   | Yes   | No   | Pinch event type.                                  |
24| scale        | number      | Yes   | No   | Pinch scale factor. The value is greater than or equal to 0.                            |
25
26## ThreeFingersSwipe
27
28Defines a three-finger swipe event.
29
30**System capability**: SystemCapability.MultimodalInput.Input.Core
31
32| Name            | Type       | Readable  | Writable  | Description                                      |
33| -------------- | ----------- | ---- | ---- | ---------------------------------------- |
34| type         | [ActionType](#actiontype)   | Yes   | No   | Three-finger swipe event type.                                  |
35| x        | number      | Yes   | No   | X coordinate.                            |
36| y        | number      | Yes   | No   | Y coordinate.                            |
37
38## FourFingersSwipe
39
40Defines a four-finger swipe event.
41
42**System capability**: SystemCapability.MultimodalInput.Input.Core
43
44| Name            | Type       | Readable  | Writable  | Description                                      |
45| -------------- | ----------- | ---- | ---- | ---------------------------------------- |
46| type         | [ActionType](#actiontype)   | Yes   | No   | Four-finger swipe event type.                                  |
47| x        | number      | Yes   | No   | X coordinate.                            |
48| y        | number      | Yes   | No   | Y coordinate.                            |
49
50
51## ActionType
52
53Enumerates gesture event types.
54
55**System capability**: SystemCapability.MultimodalInput.Input.Core
56
57| Name       | Value | Description            |
58| ----------- | --- | --------------- |
59| CANCEL      | 0   | Canceled.            |
60| BEGIN       | 1   | Started.        |
61| UPDATE      | 2   | Updated.        |
62| END         | 3   | Ended.        |
63