NativeStatusBarManagerIOS.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @flow strict-local
  8. * @format
  9. */
  10. 'use strict';
  11. import type {TurboModule} from '../../TurboModule/RCTExport';
  12. import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
  13. export interface Spec extends TurboModule {
  14. +getConstants: () => {|
  15. +HEIGHT: number,
  16. +DEFAULT_BACKGROUND_COLOR?: number,
  17. |};
  18. // TODO(T47754272) Can we remove this method?
  19. +getHeight: (callback: (result: {|height: number|}) => void) => void;
  20. +setNetworkActivityIndicatorVisible: (visible: boolean) => void;
  21. +addListener: (eventType: string) => void;
  22. +removeListeners: (count: number) => void;
  23. /**
  24. * - statusBarStyles can be:
  25. * - 'default'
  26. * - 'dark-content'
  27. * - 'light-content'
  28. */
  29. +setStyle: (statusBarStyle?: ?string, animated: boolean) => void;
  30. /**
  31. * - withAnimation can be: 'none' | 'fade' | 'slide'
  32. */
  33. +setHidden: (hidden: boolean, withAnimation: string) => void;
  34. }
  35. export default (TurboModuleRegistry.getEnforcing<Spec>(
  36. 'StatusBarManager',
  37. ): Spec);