harmony(鸿蒙)JS API Changes of the Window Manager Subsystem

2022-10-28 浏览 (688)

JS API Changes of the Window Manager Subsystem

The table below lists the APIs changes of the window manager subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
ohos.screenScreenModeInforefreshRate: number;Added
ohos.screenScreenModeInfoheight: number;Added
ohos.screenScreenModeInfowidth: number;Added
ohos.screenScreenModeInfoid: number;Added
ohos.screenOrientationSENSOR_HORIZONTAL = 7Added
ohos.screenOrientationSENSOR_VERTICAL = 6Added
ohos.screenOrientationSENSOR = 5Added
ohos.screenOrientationREVERSE_HORIZONTAL = 4Added
ohos.screenOrientationREVERSE_VERTICAL = 3Added
ohos.screenOrientationHORIZONTAL = 2Added
ohos.screenOrientationVERTICAL = 1Added
ohos.screenOrientationUNSPECIFIED = 0Added
ohos.screenScreensetScreenActiveMode(modeIndex: number, callback: AsyncCallback<void>): void;
setScreenActiveMode(modeIndex: number): Promise<void>;
Added
ohos.screenScreensetOrientation(orientation: Orientation, callback: AsyncCallback<void>): void;
setOrientation(orientation: Orientation): Promise<void>;
Added
ohos.screenScreenon(eventType: 'connect' |'disconnect' |'change', callback: Callback): void;Added
ohos.screenScreenoff(eventType: 'connect' |'disconnect' |'change', callback?: Callback): void;Added
ohos.screenScreenreadonly orientation: Orientation;Added
ohos.screenScreenreadonly activeModeIndex: number;Added
ohos.screenScreenreadonly supportedModeInfo: Array<ScreenModeInfo>;Added
ohos.screenScreenreadonly parent: number;Added
ohos.screenScreenreadonly id: number;Added
ohos.screenExpandOptionstartY: number;Added
ohos.screenExpandOptionstartX: number;Added
ohos.screenExpandOptionscreenId: number;Added
ohos.screenscreenfunction makeMirror(mainScreen:number, mirrorScreen:Array<number>, callback: AsyncCallback<number>): void;
function makeMirror(mainScreen:number, mirrorScreen:Array<number>): Promise<number>;
Added
ohos.screenscreenfunction makeExpand(options:Array<ExpandOption>, callback: AsyncCallback<number>): void;
function makeExpand(options:Array<ExpandOption>): Promise<number>;
Added
ohos.screenscreenfunction off(eventType: 'connect' |'disconnect' |'change', callback?: Callback<number>): void;Added
ohos.screenscreenfunction getAllScreens(callback: AsyncCallback<Array<Screen>>): void;
function getAllScreens(): Promise<Array<Screen>>;
Added
ohos.windowWindowStageloadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void;
loadContent(path: string, storage?: LocalStorage): Promise<void>;
loadContent(path: string, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowStagegetSubWindow(): Promise<Array<Window>>;
getSubWindow(callback: AsyncCallback<Array<Window>>): void;
Added
ohos.windowWindowStagecreateSubWindow(name: string): Promise<Window>;
createSubWindow(name: string, callback: AsyncCallback<Window>): void;
Added
ohos.windowWindowStagegetMainWindow(): Promise<Window>;
getMainWindow(callback: AsyncCallback<Window>): void;
Added
ohos.windowWindowStageon(eventType: 'windowStageEvent', callback: Callback): void;Added
ohos.windowWindowStageoff(eventType: 'windowStageEvent', callback?: Callback): void;Added
ohos.windowWindowStageEventTypeBACKGROUNDAdded
ohos.windowWindowStageEventTypeINACTIVEAdded
ohos.windowWindowStageEventTypeACTIVEAdded
ohos.windowWindowStageEventTypeFOREGROUND = 1Added
ohos.windowwindowfunction setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback<void>): void;
function setWindowLayoutMode(mode: WindowLayoutMode): Promise<void>;
Added
ohos.windowwindowfunction toggleShownStateForAllAppWindows(callback: AsyncCallback<void>): void;
function toggleShownStateForAllAppWindows(): Promise<void>;
Added
ohos.windowwindowfunction minimizeAll(id: number, callback: AsyncCallback<void>): void;
function minimizeAll(id: number): Promise<void>;
Added
ohos.windowWindowLayoutModeWINDOW_LAYOUT_MODE_TILEAdded
ohos.windowWindowLayoutModeWINDOW_LAYOUT_MODE_CASCADEAdded
ohos.windowWindowsetOutsideTouchable(touchable: boolean): Promise<void>;
setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void;
Deprecated
ohos.windowWindowsetDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void;
setDimBehind(dimBehindValue: number): Promise<void>;
Deprecated
ohos.windowWindowPropertiesdimBehindValue: numberDeprecated

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Power Management Subsystem

harmony(鸿蒙)JS API Changes of the Bundle Management Framework

harmony(鸿蒙)JS API Changes of the Communication Subsystem

harmony(鸿蒙)JS API Changes of the DFX Subsystem

harmony(鸿蒙)JS API Changes of the Distributed Data Management Subsystem

harmony(鸿蒙)JS API Changes of the Common Event and Notification Subsystem

harmony(鸿蒙)JS API Changes of the File Management Subsystem

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/7aca79efb4c14d3493a38bf4c3f84de0