js-apidiff-window.md 25.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
# JS API Changes of the Window Manager Subsystem

The table below lists the APIs changes of the window manager subsystem in OpenHarmony 3.2 Beta3 over OpenHarmony 3.2 Beta2.

## API Changes

| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
|---|---|---|---|
| ohos.animation.windowAnimationManager                                                                                                                                                         | WindowAnimationController | onWindowAnimationTargetsUpdate(fullScreenWindowTarget: WindowAnimationTarget, floatingWindowTargets: Array\<WindowAnimationTarget>): void;                                                                                                                           | Added                       |
| ohos.animation.windowAnimationManager                                                                                                                                                         | WindowAnimationTarget     | readonly missionId: number;                                                                                                                                                                                | Added|
| ohos.animation.windowAnimationManager                                                                                                                                                         | windowAnimationManager    | minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget, callback: AsyncCallback\<WindowAnimationFinishedCallback>): void;<br>minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget): Promise\<WindowAnimationFinishedCallback>; | Added                       |
| ohos.display                                                                                                                                                                                  | Display                   | getCutoutInfo(callback: AsyncCallback\<CutoutInfo>): void;<br>getCutoutInfo(): Promise\<CutoutInfo>;                                                                                                      | Added|
| ohos.display                                                                                                                                                                                  | CutoutInfo                | readonly waterfallDisplayAreaRects: WaterfallDisplayAreaRects;                                                                                                                                             | Added|
| ohos.display                                                                                                                                                                                  | CutoutInfo                | readonly boundingRects: Array\<Rect>;                                                                                                                                                                      | Added|
| ohos.display                                                                                                                                                                                  | WaterfallDisplayAreaRects | readonly bottom: Rect;                                                                                                                                                                                     | Added|
| ohos.display                                                                                                                                                                                  | WaterfallDisplayAreaRects | readonly top: Rect;                                                                                                                                                                                        | Added|
| ohos.display                                                                                                                                                                                  | WaterfallDisplayAreaRects | readonly right: Rect;                                                                                                                                                                                      | Added|
| ohos.display                                                                                                                                                                                  | WaterfallDisplayAreaRects | readonly left: Rect;                                                                                                                                                                                       | Added|
| ohos.display                                                                                                                                                                                  | Rect                      | height: number;                                                                                                                                                                                            | Added|
| ohos.display                                                                                                                                                                                  | Rect                      | width: number;                                                                                                                                                                                             | Added|
| ohos.display                                                                                                                                                                                  | Rect                      | top: number;                                                                                                                                                                                               | Added|
| ohos.display                                                                                                                                                                                  | Rect                      | left: number;                                                                                                                                                                                              | Added|
| ohos.display                                                                                                                                                                                  | display                   | hasPrivateWindow(displayId: number): boolean;                                                                                                                                                     | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setCornerRadius(cornerRadius: number): void;                                                                                                                                                               | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setShadow(radius: number, color?: string, offsetX?: number, offsetY?: number): void;                                                                                                                       | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setBackdropBlurStyle(blurStyle: BlurStyle): void;                                                                                                                                                          | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setBackdropBlur(radius: number): void;                                                                                                                                                                     | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setBlur(radius: number): void;                                                                                                                                                                             | Added|
| ohos.window                                                                                                                                                                                   | Window                    | getTransitionController(): TransitionController;                                                                                                                                                           | Added|
| ohos.window                                                                                                                                                                                   | Window                    | translate(translateOptions: TranslateOptions): void;                                                                                                                                                       | Added|
| ohos.window                                                                                                                                                                                   | Window                    | rotate(rotateOptions: RotateOptions): void;                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | Window                    | scale(scaleOptions: ScaleOptions): void;                                                                                                                                                                   | Added|
| ohos.window                                                                                                                                                                                   | Window                    | opacity(opacity: number): void;                                                                                                                                                                            | Added|
| ohos.window                                                                                                                                                                                   | Window                    | snapshot(callback: AsyncCallback\<image.PixelMap>): void;<br>snapshot(): Promise\<image.PixelMap>;                                                                                                        | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setSnapshotSkip(isSkip: boolean): void;                                                                                                                                                                    | Added|
| ohos.window                                                                                                                                                                                   | Window                    | setWakeUpScreen(wakeUp: boolean): void;                                                                                                                                                                    | Added|
| ohos.window                                                                                                                                                                                   | Window                    | bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback\<void>): Promise\<void>;<br>bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback\<void>, callback: AsyncCallback\<void>): void; | Added|
| ohos.window                                                                                                                                                                                   | Window                    | off(type: 'dialogTargetTouch', callback?: Callback\<void>): void;                                                                                                                                          | Added|
| ohos.window                                                                                                                                                                                   | Window                    | on(type: 'dialogTargetTouch', callback: Callback\<void>): void;                                                                                                                                            | Added|
| ohos.window                                                                                                                                                                                   | Window                    | off(type: 'screenshot', callback?: Callback\<void>): void;                                                                                                                                                 | Added|
| ohos.window                                                                                                                                                                                   | Window                    | on(type: 'screenshot', callback: Callback\<void>): void;                                                                                                                                                   | Added|
| ohos.window                                                                                                                                                                                   | Window                    | showWithAnimation(callback: AsyncCallback\<void>): void;<br>showWithAnimation(): Promise\<void>;                                                                                                          | Added|
| ohos.window                                                                                                                                                                                   | Window                    | hideWithAnimation(callback: AsyncCallback\<void>): void;<br>hideWithAnimation(): Promise\<void>;                                                                                                          | Added|
| ohos.window                                                                                                                                                                                   | BlurStyle                 | THICK                                                                                                                                                                                                      | Added|
| ohos.window                                                                                                                                                                                   | BlurStyle                 | REGULAR                                                                                                                                                                                                    | Added|
| ohos.window                                                                                                                                                                                   | BlurStyle                 | THIN                                                                                                                                                                                                       | Added|
| ohos.window                                                                                                                                                                                   | BlurStyle                 | OFF                                                                                                                                                                                                        | Added|
| ohos.window                                                                                                                                                                                   | TransitionController      | animationForHidden(context: TransitionContext): void;                                                                                                                                                      | Added|
| ohos.window                                                                                                                                                                                   | TransitionController      | animationForShown(context: TransitionContext): void;                                                                                                                                                       | Added|
| ohos.window                                                                                                                                                                                   | TransitionContext         | completeTransition(isCompleted: boolean): void;                                                                                                                                                            | Added|
| ohos.window                                                                                                                                                                                   | TransitionContext         | toWindow: Window                                                                                                                                                                                           | Added|
| ohos.window                                                                                                                                                                                   | TranslateOptions          | z?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | TranslateOptions          | y?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | TranslateOptions          | x?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | RotateOptions             | pivotY?: number;                                                                                                                                                                                           | Added|
| ohos.window                                                                                                                                                                                   | RotateOptions             | pivotX?: number;                                                                                                                                                                                           | Added|
| ohos.window                                                                                                                                                                                   | RotateOptions             | z?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | RotateOptions             | y?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | RotateOptions             | x?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | ScaleOptions              | pivotY?: number;                                                                                                                                                                                           | Added|
| ohos.window                                                                                                                                                                                   | ScaleOptions              | pivotX?: number;                                                                                                                                                                                           | Added|
| ohos.window                                                                                                                                                                                   | ScaleOptions              | y?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | ScaleOptions              | x?: number;                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | WindowProperties          | id: number                                                                                                                                                                                                 | Added|
| ohos.window                                                                                                                                                                                   | WindowType                | TYPE_SCREENSHOT                                                                                                                                                                                            | Added|
| ohos.window                                                                                                                                                                                   | WindowType                | TYPE_DIALOG                                                                                                                                                                                                | Added|
| ohos.window                                                                                                                                                                                   | WindowType                | TYPE_FLOAT_CAMERA                                                                                                                                                                                          | Added|
| ohos.screen | Orientation | SENSOR_HORIZONTAL = 7 | Deleted|
| ohos.screen | Orientation | SENSOR_VERTICAL = 6   | Deleted|
| ohos.screen | Orientation | SENSOR = 5            | Deleted|
| ohos.window | Window           | setWindowType(type: WindowType): Promise\<void>;<br>setWindowType(type: WindowType, callback: AsyncCallback\<void>): void; | Deprecated|
| ohos.window | WindowProperties | isRoundCorner: boolean                                                                                                   | Deprecated|