UNPKG

4.12 kBTypeScriptView Raw
1import { Point, View as ViewDefinition } from '.';
2import { ViewCommon } from './view-common';
3import { ShowModalOptions } from '../view-base';
4import { Background } from '../../styling/background';
5import { AccessibilityEventOptions } from '../../../accessibility';
6export * from './view-common';
7export * from './view-helper';
8export * from '../properties';
9export declare class View extends ViewCommon implements ViewDefinition {
10 nativeViewProtected: UIView;
11 viewController: UIViewController;
12 private _popoverPresentationDelegate;
13 private _adaptivePresentationDelegate;
14 private _transitioningDelegate;
15 /**
16 * Track modal open animated options to use same option upon close
17 */
18 private _modalAnimatedOptions;
19 private _isLaidOut;
20 private _hasTransform;
21 private _hasPendingTransform;
22 private _privateFlags;
23 private _cachedFrame;
24 private _suspendCATransaction;
25 /**
26 * Native background states.
27 * - `unset` - is the default, from this state it transitions to "invalid" in the base backgroundInternalProperty.setNative, overriding it without calling `super` will prevent the background from ever being drawn.
28 * - `invalid` - the view background must be redrawn on the next layot.
29 * - `drawn` - the view background has been property drawn, on subsequent layouts it may need to be redrawn if the background depends on the view's size.
30 */
31 _nativeBackgroundState: 'unset' | 'invalid' | 'drawn';
32 get isLayoutRequired(): boolean;
33 get isLayoutRequested(): boolean;
34 disposeNativeView(): void;
35 requestLayout(): void;
36 measure(widthMeasureSpec: number, heightMeasureSpec: number): void;
37 layout(left: number, top: number, right: number, bottom: number, setFrame?: boolean): void;
38 private updateBackground;
39 private layoutOuterShadows;
40 setMeasuredDimension(measuredWidth: number, measuredHeight: number): void;
41 onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
42 onLayout(left: number, top: number, right: number, bottom: number): void;
43 _setNativeViewFrame(nativeView: UIView, frame: CGRect): void;
44 get isLayoutValid(): boolean;
45 layoutNativeView(left: number, top: number, right: number, bottom: number): void;
46 _layoutParent(): void;
47 _setLayoutFlags(left: number, top: number, right: number, bottom: number): void;
48 focus(): boolean;
49 protected applySafeAreaInsets(frame: CGRect): CGRect;
50 getSafeAreaInsets(): {
51 left: any;
52 top: any;
53 right: any;
54 bottom: any;
55 };
56 getLocationInWindow(): Point;
57 getLocationOnScreen(): Point;
58 getLocationRelativeTo(otherView: ViewDefinition): Point;
59 _onSizeChanged(): void;
60 updateNativeTransform(): void;
61 updateOriginPoint(originX: number, originY: number): void;
62 _suspendPresentationLayerUpdates(): void;
63 _resumePresentationLayerUpdates(): void;
64 _isPresentationLayerUpdateSuspended(): boolean;
65 protected _showNativeModalView(parent: View, options: ShowModalOptions): void;
66 protected _hideNativeModalView(parent: View, whenClosedCallback: () => void): void;
67 setAccessibilityIdentifier(view: any, value: string): void;
68 sendAccessibilityEvent(options: Partial<AccessibilityEventOptions>): void;
69 accessibilityAnnouncement(msg?: string): void;
70 accessibilityScreenChanged(): void;
71 _getCurrentLayoutBounds(): {
72 left: number;
73 top: number;
74 right: number;
75 bottom: number;
76 };
77 _redrawNativeBackground(value: UIColor | Background): void;
78 _setNativeClipToBounds(): void;
79 private _setupPopoverControllerDelegate;
80 private _setupAdaptiveControllerDelegate;
81}
82export declare class ContainerView extends View {
83 constructor();
84}
85export declare class CustomLayoutView extends ContainerView {
86 nativeViewProtected: UIView;
87 createNativeView(): UIView;
88 get ios(): UIView;
89 onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
90 _addViewToNativeVisualTree(child: View, atIndex: number): boolean;
91 _removeViewFromNativeVisualTree(child: View): void;
92}