1 | export type FlingGestureHandlerEventPayload = {
|
2 | x: number;
|
3 | y: number;
|
4 | absoluteX: number;
|
5 | absoluteY: number;
|
6 | };
|
7 | export type ForceTouchGestureHandlerEventPayload = {
|
8 | x: number;
|
9 | y: number;
|
10 | absoluteX: number;
|
11 | absoluteY: number;
|
12 | /**
|
13 | * The pressure of a touch.
|
14 | */
|
15 | force: number;
|
16 | };
|
17 | export type LongPressGestureHandlerEventPayload = {
|
18 | /**
|
19 | * X coordinate, expressed in points, of the current position of the pointer
|
20 | * (finger or a leading pointer when there are multiple fingers placed)
|
21 | * relative to the view attached to the handler.
|
22 | */
|
23 | x: number;
|
24 | /**
|
25 | * Y coordinate, expressed in points, of the current position of the pointer
|
26 | * (finger or a leading pointer when there are multiple fingers placed)
|
27 | * relative to the view attached to the handler.
|
28 | */
|
29 | y: number;
|
30 | /**
|
31 | * X coordinate, expressed in points, of the current position of the pointer
|
32 | * (finger or a leading pointer when there are multiple fingers placed)
|
33 | * relative to the window. It is recommended to use `absoluteX` instead of
|
34 | * `x` in cases when the view attached to the handler can be transformed as an
|
35 | * effect of the gesture.
|
36 | */
|
37 | absoluteX: number;
|
38 | /**
|
39 | * Y coordinate, expressed in points, of the current position of the pointer
|
40 | * (finger or a leading pointer when there are multiple fingers placed)
|
41 | * relative to the window. It is recommended to use `absoluteY` instead of
|
42 | * `y` in cases when the view attached to the handler can be transformed as an
|
43 | * effect of the gesture.
|
44 | */
|
45 | absoluteY: number;
|
46 | /**
|
47 | * Duration of the long press (time since the start of the event), expressed
|
48 | * in milliseconds.
|
49 | */
|
50 | duration: number;
|
51 | };
|
52 | export type NativeViewGestureHandlerPayload = {
|
53 | /**
|
54 | * True if gesture was performed inside of containing view, false otherwise.
|
55 | */
|
56 | pointerInside: boolean;
|
57 | };
|
58 | export type PanGestureHandlerEventPayload = {
|
59 | /**
|
60 | * X coordinate of the current position of the pointer (finger or a leading
|
61 | * pointer when there are multiple fingers placed) relative to the view
|
62 | * attached to the handler. Expressed in point units.
|
63 | */
|
64 | x: number;
|
65 | /**
|
66 | * Y coordinate of the current position of the pointer (finger or a leading
|
67 | * pointer when there are multiple fingers placed) relative to the view
|
68 | * attached to the handler. Expressed in point units.
|
69 | */
|
70 | y: number;
|
71 | /**
|
72 | * X coordinate of the current position of the pointer (finger or a leading
|
73 | * pointer when there are multiple fingers placed) relative to the window.
|
74 | * The value is expressed in point units. It is recommended to use it instead
|
75 | * of `x` in cases when the original view can be transformed as an effect of
|
76 | * the gesture.
|
77 | */
|
78 | absoluteX: number;
|
79 | /**
|
80 | * Y coordinate of the current position of the pointer (finger or a leading
|
81 | * pointer when there are multiple fingers placed) relative to the window.
|
82 | * The value is expressed in point units. It is recommended to use it instead
|
83 | * of `y` in cases when the original view can be transformed as an
|
84 | * effect of the gesture.
|
85 | */
|
86 | absoluteY: number;
|
87 | /**
|
88 | * Translation of the pan gesture along X axis accumulated over the time of
|
89 | * the gesture. The value is expressed in the point units.
|
90 | */
|
91 | translationX: number;
|
92 | /**
|
93 | * Translation of the pan gesture along Y axis accumulated over the time of
|
94 | * the gesture. The value is expressed in the point units.
|
95 | */
|
96 | translationY: number;
|
97 | /**
|
98 | * Velocity of the pan gesture along the X axis in the current moment. The
|
99 | * value is expressed in point units per second.
|
100 | */
|
101 | velocityX: number;
|
102 | /**
|
103 | * Velocity of the pan gesture along the Y axis in the current moment. The
|
104 | * value is expressed in point units per second.
|
105 | */
|
106 | velocityY: number;
|
107 | };
|
108 | export type PinchGestureHandlerEventPayload = {
|
109 | /**
|
110 | * The scale factor relative to the points of the two touches in screen
|
111 | * coordinates.
|
112 | */
|
113 | scale: number;
|
114 | /**
|
115 | * Position expressed in points along X axis of center anchor point of
|
116 | * gesture.
|
117 | */
|
118 | focalX: number;
|
119 | /**
|
120 | * Position expressed in points along Y axis of center anchor point of
|
121 | * gesture.
|
122 | */
|
123 | focalY: number;
|
124 | /**
|
125 | *
|
126 | * Velocity of the pan gesture the current moment. The value is expressed in
|
127 | * point units per second.
|
128 | */
|
129 | velocity: number;
|
130 | };
|
131 | export type TapGestureHandlerEventPayload = {
|
132 | x: number;
|
133 | y: number;
|
134 | absoluteX: number;
|
135 | absoluteY: number;
|
136 | };
|
137 | export type RotationGestureHandlerEventPayload = {
|
138 | /**
|
139 | * Amount rotated, expressed in radians, from the gesture's focal point
|
140 | * (anchor).
|
141 | */
|
142 | rotation: number;
|
143 | /**
|
144 | * X coordinate, expressed in points, of the gesture's central focal point
|
145 | * (anchor).
|
146 | */
|
147 | anchorX: number;
|
148 | /**
|
149 | * Y coordinate, expressed in points, of the gesture's central focal point
|
150 | * (anchor).
|
151 | */
|
152 | anchorY: number;
|
153 | /**
|
154 | *
|
155 | * Instantaneous velocity, expressed in point units per second, of the
|
156 | * gesture.
|
157 | */
|
158 | velocity: number;
|
159 | };
|