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.1 Release over OpenHarmony 3.0 LTS. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| ohos.window | Window | setTouchable(isTouchable: boolean): Promise\<void>;<br>setTouchable(isTouchable: boolean, callback: AsyncCallback\<void>): void; | Added| 10| ohos.window | Window | setPrivacyMode(isPrivacyMode: boolean): Promise\<void>;<br>setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback\<void>): void; | Added| 11| ohos.window | Window | setOutsideTouchable(touchable: boolean): Promise\<void>;<br>setOutsideTouchable(touchable: boolean, callback: AsyncCallback\<void>): void; | Added| 12| ohos.window | Window | setKeepScreenOn(isKeepScreenOn: boolean): Promise\<void>;<br>setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback\<void>): void; | Added| 13| ohos.window | Window | setFocusable(isFocusable: boolean): Promise\<void>;<br>setFocusable(isFocusable: boolean, callback: AsyncCallback\<void>): void; | Added| 14| ohos.window | Window | setDimBehind(dimBehindValue: number, callback: AsyncCallback\<void>): void;<br>setDimBehind(dimBehindValue: number): Promise\<void>; | Added| 15| ohos.window | Window | setBrightness(brightness: number): Promise\<void>;<br>setBrightness(brightness: number, callback: AsyncCallback\<void>): void; | Added| 16| ohos.window | Window | setBackgroundColor(color: string): Promise\<void>;<br>setBackgroundColor(color: string, callback: AsyncCallback\<void>): void; | Added| 17| ohos.window | Window | getColorSpace(): Promise\<ColorSpace>;<br>getColorSpace(callback: AsyncCallback\<ColorSpace>): void; | Added| 18| ohos.window | Window | setColorSpace(colorSpace:ColorSpace): Promise\<void>;<br>setColorSpace(colorSpace:ColorSpace, callback: AsyncCallback\<void>): void; | Added| 19| ohos.window | Window | isSupportWideGamut(): Promise\<boolean>;<br>isSupportWideGamut(callback: AsyncCallback\<boolean>): void; | Added| 20| ohos.window | Window | off(type: 'keyboardHeightChange', callback?: Callback\<number>): void; | Added| 21| ohos.window | Window | on(type: 'keyboardHeightChange', callback: Callback\<number>): void; | Added| 22| ohos.window | Window | off(type: 'systemAvoidAreaChange', callback?: Callback\<AvoidArea>): void; | Added| 23| ohos.window | Window | on(type: 'systemAvoidAreaChange', callback: Callback\<AvoidArea>): void; | Added| 24| ohos.window | Window | off(type: 'windowSizeChange', callback?: Callback\<Size>): void; | Added| 25| ohos.window | Window | on(type: 'windowSizeChange', callback: Callback\<Size>): void; | Added| 26| ohos.window | Window | isShowing(callback: AsyncCallback\<boolean>): void;<br>isShowing(): Promise\<boolean>; | Added| 27| ohos.window | Window | loadContent(path: string, callback: AsyncCallback\<void>): void;<br>loadContent(path: string): Promise\<void>; | Added| 28| ohos.window | Window | setSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback\<void>): void;<br>setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise\<void>; | Added| 29| ohos.window | Window | setSystemBarEnable(names: Array\<'status'\|'navigation'>, callback: AsyncCallback\<void>): void;<br>setSystemBarEnable(names: Array\<'status'\|'navigation'>): Promise\<void>; | Added| 30| ohos.window | Window | setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback\<void>): void;<br>setLayoutFullScreen(isLayoutFullScreen: boolean): Promise\<void>; | Added| 31| ohos.window | Window | setFullScreen(isFullScreen: boolean, callback: AsyncCallback\<void>): void;<br>setFullScreen(isFullScreen: boolean): Promise\<void>; | Added| 32| ohos.window | Window | getAvoidArea(type: AvoidAreaType, callback: AsyncCallback\<AvoidArea>): void;<br>getAvoidArea(type: AvoidAreaType): Promise\<AvoidArea>; | Added| 33| ohos.window | Window | getProperties(callback: AsyncCallback\<WindowProperties>): void;<br>getProperties(): Promise\<WindowProperties>; | Added| 34| ohos.window | Window | destroy(callback: AsyncCallback\<void>): void;<br>destroy(): Promise\<void>; | Added| 35| ohos.window | Window | show(callback: AsyncCallback\<void>): void;<br>show(): Promise\<void>; | Added| 36| ohos.window | window | find(id: string, callback: AsyncCallback\<Window>): void;<br>find(id: string): Promise\<Window>; | Added| 37| ohos.window | window | create(id: string, type: WindowType, callback: AsyncCallback\<Window>): void;<br>create(id: string, type: WindowType): Promise\<Window>;<br>create(ctx: Context, id: string, type: WindowType): Promise\<Window>;<br>create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback\<Window>): void; | Added| 38| ohos.window | ColorSpace | WIDE_GAMUT | Added| 39| ohos.window | ColorSpace | DEFAULT | Added| 40| ohos.window | WindowProperties | isTransparent: boolean | Added| 41| ohos.window | WindowProperties | isRoundCorner: boolean | Added| 42| ohos.window | WindowProperties | isPrivacyMode: boolean | Added| 43| ohos.window | WindowProperties | isKeepScreenOn: boolean | Added| 44| ohos.window | WindowProperties | dimBehindValue: number | Added| 45| ohos.window | WindowProperties | brightness: number | Added| 46| ohos.window | WindowProperties | touchable: boolean | Added| 47| ohos.window | WindowProperties | focusable: boolean | Added| 48| ohos.window | WindowProperties | isLayoutFullScreen: boolean | Added| 49| ohos.window | WindowProperties | isFullScreen: boolean | Added| 50| ohos.window | WindowProperties | type: WindowType; | Added| 51| ohos.window | WindowProperties | windowRect: Rect; | Added| 52| ohos.window | Size | height: number; | Added| 53| ohos.window | Size | width: number; | Added| 54| ohos.window | AvoidArea | bottomRect: Rect; | Added| 55| ohos.window | AvoidArea | rightRect: Rect; | Added| 56| ohos.window | AvoidArea | topRect: Rect; | Added| 57| ohos.window | AvoidArea | leftRect: Rect; | Added| 58| ohos.window | Rect | height: number; | Added| 59| ohos.window | Rect | width: number; | Added| 60| ohos.window | Rect | top: number; | Added| 61| ohos.window | Rect | left: number; | Added| 62| ohos.window | SystemBarProperties | navigationBarContentColor?: string; | Added| 63| ohos.window | SystemBarProperties | isNavigationBarLightIcon?: boolean; | Added| 64| ohos.window | SystemBarProperties | navigationBarColor?: string; | Added| 65| ohos.window | SystemBarProperties | statusBarContentColor?: string; | Added| 66| ohos.window | SystemBarProperties | isStatusBarLightIcon?: boolean; | Added| 67| ohos.window | SystemBarProperties | statusBarColor?: string; | Added| 68| ohos.window | AvoidAreaType | TYPE_CUTOUT | Added| 69| ohos.window | AvoidAreaType | TYPE_SYSTEM | Added| 70| ohos.display | Display | yDPI: number; | Added| 71| ohos.display | Display | xDPI: number; | Added| 72| ohos.display | Display | scaledDensity: number; | Added| 73| ohos.display | Display | densityPixels: number; | Added| 74| ohos.display | Display | densityDPI: number; | Added| 75| ohos.display | Display | height: number; | Added| 76| ohos.display | Display | width: number; | Added| 77| ohos.display | Display | rotation: number; | Added| 78| ohos.display | Display | refreshRate: number; | Added| 79| ohos.display | Display | state: DisplayState; | Added| 80| ohos.display | Display | alive: boolean; | Added| 81| ohos.display | Display | name: string; | Added| 82| ohos.display | Display | id: number; | Added| 83| ohos.display | DisplayState | STATE_ON_SUSPEND | Added| 84| ohos.display | DisplayState | STATE_VR | Added| 85| ohos.display | DisplayState | STATE_DOZE_SUSPEND | Added| 86| ohos.display | DisplayState | STATE_DOZE | Added| 87| ohos.display | DisplayState | STATE_ON | Added| 88| ohos.display | DisplayState | STATE_OFF | Added| 89| ohos.display | DisplayState | STATE_UNKNOWN = 0 | Added| 90| ohos.display | display | off(type: 'add' \| 'remove' \| 'change', callback?: Callback\<number>): void; | Added| 91| ohos.display | display | off(type: 'add' \| 'remove' \| 'change', callback?: Callback\<number>): void; | Added| 92| ohos.display | display | off(type: 'add' \| 'remove' \| 'change', callback?: Callback\<number>): void; | Added| 93| ohos.display | display | on(type: 'add' \| 'remove' \| 'change', callback: Callback\<number>): void; | Added| 94| ohos.display | display | on(type: 'add' \| 'remove' \| 'change', callback: Callback\<number>): void; | Added| 95| ohos.display | display | on(type: 'add' \| 'remove' \| 'change', callback: Callback\<number>): void; | Added| 96| ohos.display | display | getAllDisplay(callback: AsyncCallback\<Array\<Display>>): void;<br>getAllDisplay(): Promise\<Array\<Display>>; | Added| 97| ohos.display | display | getDefaultDisplay(callback: AsyncCallback\<Display>): void;<br>getDefaultDisplay(): Promise\<Display>; | Added| 98