Skip to content

Commit 1f0b2aa

Browse files
sgnyMoOx
authored andcommitted
UIManager API (#496)
1 parent 2131a3b commit 1f0b2aa

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
id: apis/UIManager
3+
title: UIManager
4+
wip: true
5+
---
6+
7+
```reason
8+
type popupAction;
9+
10+
[@bs.module "react-native"] [@bs.scope ("UIManager", "PopupMenu")]
11+
external itemSelected: popupAction = "";
12+
13+
[@bs.module "react-native"] [@bs.scope ("UIManager", "PopupMenu")]
14+
external dismissed: popupAction = "";
15+
16+
// Android-only. This function is intended to be removed in the future,
17+
// at which point it would return undefined. Accordingly it is wrapped in
18+
// option.
19+
[@bs.module "react-native"] [@bs.scope "UIManager"]
20+
external setLayoutAnimationEnabledExperimental: option(bool => unit) = "";
21+
22+
// Android-only
23+
[@bs.module "react-native"] [@bs.scope "UIManager"]
24+
external showPopupMenu:
25+
(
26+
int,
27+
array(string),
28+
~onError: unit => unit,
29+
~onSuccess: (popupAction, option(int)) => unit
30+
) =>
31+
unit =
32+
"";
33+
34+
// Android-only
35+
[@bs.module "react-native"] [@bs.scope "UIManager"]
36+
external dismissPopupMenu: unit => unit = "";
37+
38+
[@bs.module "react-native"] [@bs.scope "UIManager"]
39+
external setJSResponder: (int, bool) => unit = "";
40+
41+
[@bs.module "react-native"] [@bs.scope "UIManager"]
42+
external clearJSResponder: unit => unit = "";
43+
44+
// Android-only
45+
[@bs.module "react-native"] [@bs.scope "UIManager"]
46+
external playTouchSound: unit => unit = "";
47+
48+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
type popupAction;
2+
3+
[@bs.module "react-native"] [@bs.scope ("UIManager", "PopupMenu")]
4+
external itemSelected: popupAction = "";
5+
6+
[@bs.module "react-native"] [@bs.scope ("UIManager", "PopupMenu")]
7+
external dismissed: popupAction = "";
8+
9+
// Android-only. This function is intended to be removed in the future,
10+
// at which point it would return undefined. Accordingly it is wrapped in
11+
// option.
12+
[@bs.module "react-native"] [@bs.scope "UIManager"]
13+
external setLayoutAnimationEnabledExperimental: option(bool => unit) = "";
14+
15+
// Android-only
16+
[@bs.module "react-native"] [@bs.scope "UIManager"]
17+
external showPopupMenu:
18+
(
19+
int,
20+
array(string),
21+
~onError: unit => unit,
22+
~onSuccess: (popupAction, option(int)) => unit
23+
) =>
24+
unit =
25+
"";
26+
27+
// Android-only
28+
[@bs.module "react-native"] [@bs.scope "UIManager"]
29+
external dismissPopupMenu: unit => unit = "";
30+
31+
[@bs.module "react-native"] [@bs.scope "UIManager"]
32+
external setJSResponder: (int, bool) => unit = "";
33+
34+
[@bs.module "react-native"] [@bs.scope "UIManager"]
35+
external clearJSResponder: unit => unit = "";
36+
37+
// Android-only
38+
[@bs.module "react-native"] [@bs.scope "UIManager"]
39+
external playTouchSound: unit => unit = "";

0 commit comments

Comments
 (0)