RCTUIUtils.h 858 B

12345678910111213141516171819202122232425262728293031323334
  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. #import <CoreGraphics/CoreGraphics.h>
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. // Get window and screen dimensions
  15. typedef struct {
  16. struct {
  17. CGFloat width, height, scale, fontScale;
  18. } window, screen;
  19. } RCTDimensions;
  20. extern __attribute__((visibility("default"))) RCTDimensions RCTGetDimensions(CGFloat fontScale);
  21. // Get font size multiplier for font base size (Large) by content size category
  22. extern __attribute__((visibility("default"))) CGFloat RCTGetMultiplierForContentSizeCategory(
  23. UIContentSizeCategory category);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. NS_ASSUME_NONNULL_END