|
| 1 | +--- |
| 2 | +id: apis/AccessibilityInfo |
| 3 | +title: AccessibilityInfo |
| 4 | +wip: true |
| 5 | +--- |
| 6 | + |
| 7 | +```reason |
| 8 | +type announcementResult = { |
| 9 | + . |
| 10 | + "announcement": string, |
| 11 | + "success": bool, |
| 12 | +}; |
| 13 | +
|
| 14 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 15 | +external isBoldTextEnabled: unit => Js.Promise.t(bool) = ""; |
| 16 | +
|
| 17 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 18 | +external isGrayscaleEnabled: unit => Js.Promise.t(bool) = ""; |
| 19 | +
|
| 20 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 21 | +external isInvertColorsEnabled: unit => Js.Promise.t(bool) = ""; |
| 22 | +
|
| 23 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 24 | +external isReduceMotionEnabled: unit => Js.Promise.t(bool) = ""; |
| 25 | +
|
| 26 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 27 | +external isReduceTransparencyEnabled: unit => Js.Promise.t(bool) = ""; |
| 28 | +
|
| 29 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 30 | +external isScreenReaderEnabled: unit => Js.Promise.t(bool) = ""; |
| 31 | +
|
| 32 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 33 | +external setAccessibilityFocus: NativeTypes.nodeHandle => unit = ""; |
| 34 | +
|
| 35 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 36 | +external announceForAccessibility: string => unit = ""; |
| 37 | +
|
| 38 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 39 | +external addEventListener: |
| 40 | + ( |
| 41 | + [@bs.string] |
| 42 | + [ |
| 43 | + | `boldTextChanged(bool => unit) |
| 44 | + | `grayscaleChanged(bool => unit) |
| 45 | + | `invertColorsChanged(bool => unit) |
| 46 | + | `reduceMotionChanged(bool => unit) |
| 47 | + | `screenReaderChanged(bool => unit) |
| 48 | + | `reduceTransparencyChanged(bool => unit) |
| 49 | + | `announcementFinished(announcementResult => unit) |
| 50 | + ] |
| 51 | + ) => |
| 52 | + unit = |
| 53 | + ""; |
| 54 | +
|
| 55 | +[@bs.scope "AccessibilityInfo"] [@bs.module "react-native"] |
| 56 | +external removeEventListener: |
| 57 | + ( |
| 58 | + [@bs.string] |
| 59 | + [ |
| 60 | + | `boldTextChanged(bool => unit) |
| 61 | + | `grayscaleChanged(bool => unit) |
| 62 | + | `invertColorsChanged(bool => unit) |
| 63 | + | `reduceMotionChanged(bool => unit) |
| 64 | + | `screenReaderChanged(bool => unit) |
| 65 | + | `reduceTransparencyChanged(bool => unit) |
| 66 | + | `announcementFinished(announcementResult => unit) |
| 67 | + ] |
| 68 | + ) => |
| 69 | + unit = |
| 70 | + ""; |
| 71 | +
|
| 72 | +``` |
0 commit comments