-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathKeyboard.res
More file actions
43 lines (34 loc) · 1.13 KB
/
Keyboard.res
File metadata and controls
43 lines (34 loc) · 1.13 KB
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
type keyboardMetrics = {
screenX: float,
screenY: float,
width: float,
height: float,
}
type eventType = [
| #keyboardWillShow
| #keyboardDidShow
| #keyboardWillHide
| #keyboardDidHide
| #keyboardWillChangeFrame
| #keyboardDidChangeFrame
]
type keyboardEvent = {
duration: float,
easing: LayoutAnimation.animationType,
endCoordinates: keyboardMetrics,
startCoordinates: keyboardMetrics,
isEventFromThisApp: bool,
}
type listener = keyboardEvent => unit
@module("react-native") @scope("Keyboard")
external addListener: (eventType, listener) => EventSubscription.t = "addListener"
@module("react-native") @scope("Keyboard")
external removeAllListeners: eventType => unit = "removeAllListeners"
@module("react-native") @scope("Keyboard")
external dismiss: unit => unit = "dismiss"
@module("react-native") @scope("Keyboard")
external isVisible: unit => bool = "isVisible"
@module("react-native") @scope("Keyboard")
external scheduleLayoutAnimation: keyboardEvent => unit = "scheduleLayoutAnimation"
@module("react-native") @scope("Keyboard") @return(nullable)
external metrics: unit => option<keyboardMetrics> = "metrics"