• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Window Manager Subsystem
2
3The table below lists the APIs changes of the window manager subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release.
4
5## API Changes
6
7
8
9| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
10|---|---|---|---|
11| ohos.screen | ScreenModeInfo | refreshRate: number; | Added|
12| ohos.screen | ScreenModeInfo | height: number; | Added|
13| ohos.screen | ScreenModeInfo | width: number; | Added|
14| ohos.screen | ScreenModeInfo | id: number; | Added|
15| ohos.screen | Orientation | SENSOR_HORIZONTAL = 7 | Added|
16| ohos.screen | Orientation | SENSOR_VERTICAL = 6 | Added|
17| ohos.screen | Orientation | SENSOR = 5 | Added|
18| ohos.screen | Orientation | REVERSE_HORIZONTAL = 4 | Added|
19| ohos.screen | Orientation | REVERSE_VERTICAL = 3 | Added|
20| ohos.screen | Orientation | HORIZONTAL = 2 | Added|
21| ohos.screen | Orientation | VERTICAL = 1 | Added|
22| ohos.screen | Orientation | UNSPECIFIED = 0 | Added|
23| ohos.screen | Screen | setScreenActiveMode(modeIndex: number, callback: AsyncCallback\<void>): void;<br>setScreenActiveMode(modeIndex: number): Promise\<void>; | Added|
24| ohos.screen | Screen | setOrientation(orientation: Orientation, callback: AsyncCallback\<void>): void;<br>setOrientation(orientation: Orientation): Promise\<void>; | Added|
25| ohos.screen | Screen | on(eventType: 'connect' \| 'disconnect' \| 'change', callback: Callback<number>): void; | Added|
26| ohos.screen | Screen | off(eventType: 'connect' \| 'disconnect' \| 'change', callback?: Callback<number>): void; | Added|
27| ohos.screen | Screen | readonly orientation: Orientation; | Added|
28| ohos.screen | Screen | readonly activeModeIndex: number; | Added|
29| ohos.screen | Screen | readonly supportedModeInfo: Array\<ScreenModeInfo>; | Added|
30| ohos.screen | Screen | readonly parent: number; | Added|
31| ohos.screen | Screen | readonly id: number; | Added|
32| ohos.screen | ExpandOption | startY: number; | Added|
33| ohos.screen | ExpandOption | startX: number; | Added|
34| ohos.screen | ExpandOption | screenId: number; | Added|
35| ohos.screen | screen | function makeMirror(mainScreen:number, mirrorScreen:Array\<number>, callback: AsyncCallback\<number>): void;<br>function makeMirror(mainScreen:number, mirrorScreen:Array\<number>): Promise\<number>; | Added|
36| ohos.screen | screen | function makeExpand(options:Array\<ExpandOption>, callback: AsyncCallback\<number>): void;<br>function makeExpand(options:Array\<ExpandOption>): Promise\<number>; | Added|
37| ohos.screen | screen | function off(eventType: 'connect' \| 'disconnect' \| 'change', callback?: Callback\<number>): void; | Added|
38| ohos.screen | screen | function getAllScreens(callback: AsyncCallback\<Array\<Screen>>): void;<br>function getAllScreens(): Promise\<Array\<Screen>>; | Added|
39| ohos.window | WindowStage | loadContent(path: string, storage: LocalStorage, callback: AsyncCallback\<void>): void;<br>loadContent(path: string, storage?: LocalStorage): Promise\<void>;<br>loadContent(path: string, callback: AsyncCallback\<void>): void; | Added|
40| ohos.window | WindowStage | getSubWindow(): Promise\<Array\<Window>>;<br>getSubWindow(callback: AsyncCallback\<Array\<Window>>): void; | Added|
41| ohos.window | WindowStage | createSubWindow(name: string): Promise\<Window>;<br>createSubWindow(name: string, callback: AsyncCallback\<Window>): void; | Added|
42| ohos.window | WindowStage | getMainWindow(): Promise\<Window>;<br>getMainWindow(callback: AsyncCallback\<Window>): void; | Added|
43| ohos.window | WindowStage | on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void; | Added|
44| ohos.window | WindowStage | off(eventType: 'windowStageEvent', callback?: Callback<WindowStageEventType>): void; | Added|
45| ohos.window | WindowStageEventType | BACKGROUND | Added|
46| ohos.window | WindowStageEventType | INACTIVE | Added|
47| ohos.window | WindowStageEventType | ACTIVE | Added|
48| ohos.window | WindowStageEventType | FOREGROUND = 1 | Added|
49| ohos.window | window | function setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback\<void>): void;<br>function setWindowLayoutMode(mode: WindowLayoutMode): Promise\<void>; | Added|
50| ohos.window | window | function toggleShownStateForAllAppWindows(callback: AsyncCallback\<void>): void;<br>function toggleShownStateForAllAppWindows(): Promise\<void>; | Added|
51| ohos.window | window | function minimizeAll(id: number, callback: AsyncCallback\<void>): void;<br>function minimizeAll(id: number): Promise\<void>; | Added|
52| ohos.window | WindowLayoutMode | WINDOW_LAYOUT_MODE_TILE | Added|
53| ohos.window | WindowLayoutMode | WINDOW_LAYOUT_MODE_CASCADE | Added|
54| ohos.window | Window | setOutsideTouchable(touchable: boolean): Promise\<void>;<br>setOutsideTouchable(touchable: boolean, callback: AsyncCallback\<void>): void; | Deprecated|
55| ohos.window | Window | setDimBehind(dimBehindValue: number, callback: AsyncCallback\<void>): void;<br>setDimBehind(dimBehindValue: number): Promise\<void>; | Deprecated|
56| ohos.window | WindowProperties | dimBehindValue: number | Deprecated|
57