PHP 7.4.33
Preview: UIManager.d.ts Size: 3.36 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/Libraries/ReactNative/UIManager.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @format
 */

import type * as React from 'react';
import {
  MeasureInWindowOnSuccessCallback,
  MeasureLayoutOnSuccessCallback,
  MeasureOnSuccessCallback,
} from '../../types/public/ReactNativeTypes';

export interface UIManagerStatic {
  /**
   * Determines the location on screen, width, and height of the given view and
   * returns the values via an async callback. If successful, the callback will
   * be called with the following arguments:
   *
   *  - x
   *  - y
   *  - width
   *  - height
   *  - pageX
   *  - pageY
   *
   * Note that these measurements are not available until after the rendering
   * has been completed in native. If you need the measurements as soon as
   * possible, consider using the [`onLayout`
   * prop](docs/view.html#onlayout) instead.
   *
   * @deprecated Use `ref.measure` instead.
   */
  measure(node: number, callback: MeasureOnSuccessCallback): void;

  /**
   * Determines the location of the given view in the window and returns the
   * values via an async callback. If the React root view is embedded in
   * another native view, this will give you the absolute coordinates. If
   * successful, the callback will be called with the following
   * arguments:
   *
   *  - x
   *  - y
   *  - width
   *  - height
   *
   * Note that these measurements are not available until after the rendering
   * has been completed in native.
   *
   * @deprecated Use `ref.measureInWindow` instead.
   */
  measureInWindow(
    node: number,
    callback: MeasureInWindowOnSuccessCallback,
  ): void;

  /**
   * Like [`measure()`](#measure), but measures the view relative an ancestor,
   * specified as `relativeToNativeNode`. This means that the returned x, y
   * are relative to the origin x, y of the ancestor view.
   *
   * As always, to obtain a native node handle for a component, you can use
   * `React.findNodeHandle(component)`.
   *
   * @deprecated Use `ref.measureLayout` instead.
   */
  measureLayout(
    node: number,
    relativeToNativeNode: number,
    onFail: () => void /* currently unused */,
    onSuccess: MeasureLayoutOnSuccessCallback,
  ): void;

  /**
   * Automatically animates views to their new positions when the
   * next layout happens.
   *
   * A common way to use this API is to call it before calling `setState`.
   *
   * Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
   *
   *     UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
   */
  setLayoutAnimationEnabledExperimental?:
    | ((value: boolean) => void)
    | undefined;

  getViewManagerConfig: (name: string) => {
    Commands: {[key: string]: number};
  };

  hasViewManagerConfig: (name: string) => boolean;

  /**
   * Used to call a native view method from JavaScript
   *
   * reactTag - Id of react view.
   * commandID - Id of the native method that should be called.
   * commandArgs - Args of the native method that we can pass from JS to native.
   */
  dispatchViewManagerCommand: (
    reactTag: number | null,
    commandID: number | string,
    commandArgs?: Array<any>,
  ) => void;
}

export const UIManager: UIManagerStatic;
export type UIManager = UIManagerStatic;

Directory Contents

Dirs: 1 × Files: 30
Name Size Perms Modified Actions
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
6.15 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.12 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
812 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.47 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
10.67 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
12.37 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
805 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.24 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
873 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
6.01 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
286 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
762 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.36 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
446 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
406 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
404 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
5.96 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
963 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.65 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.29 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.31 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
442 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
899 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
833 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.02 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
327 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
593 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.36 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
5.38 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.96 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).