harmony(鸿蒙)窗口管理子系统JS API变更

2022-08-09 浏览 (771)

窗口管理子系统JS API变更

OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,窗口管理子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
ohos.screenScreenModeInforefreshRate: number;新增
ohos.screenScreenModeInfoheight: number;新增
ohos.screenScreenModeInfowidth: number;新增
ohos.screenScreenModeInfoid: number;新增
ohos.screenOrientationSENSOR_HORIZONTAL = 7新增
ohos.screenOrientationSENSOR_VERTICAL = 6新增
ohos.screenOrientationSENSOR = 5新增
ohos.screenOrientationREVERSE_HORIZONTAL = 4新增
ohos.screenOrientationREVERSE_VERTICAL = 3新增
ohos.screenOrientationHORIZONTAL = 2新增
ohos.screenOrientationVERTICAL = 1新增
ohos.screenOrientationUNSPECIFIED = 0新增
ohos.screenScreensetScreenActiveMode(modeIndex: number, callback: AsyncCallback<void>): void;
setScreenActiveMode(modeIndex: number): Promise<void>;
新增
ohos.screenScreensetOrientation(orientation: Orientation, callback: AsyncCallback<void>): void;
setOrientation(orientation: Orientation): Promise<void>;
新增
ohos.screenScreenon(eventType: 'connect' |'disconnect' |'change', callback: Callback): void;新增
ohos.screenScreenoff(eventType: 'connect' |'disconnect' |'change', callback?: Callback): void;新增
ohos.screenScreenreadonly orientation: Orientation;新增
ohos.screenScreenreadonly activeModeIndex: number;新增
ohos.screenScreenreadonly supportedModeInfo: Array<ScreenModeInfo>;新增
ohos.screenScreenreadonly parent: number;新增
ohos.screenScreenreadonly id: number;新增
ohos.screenExpandOptionstartY: number;新增
ohos.screenExpandOptionstartX: number;新增
ohos.screenExpandOptionscreenId: number;新增
ohos.screenscreenfunction makeMirror(mainScreen:number, mirrorScreen:Array<number>, callback: AsyncCallback<number>): void;
function makeMirror(mainScreen:number, mirrorScreen:Array<number>): Promise<number>;
新增
ohos.screenscreenfunction makeExpand(options:Array<ExpandOption>, callback: AsyncCallback<number>): void;
function makeExpand(options:Array<ExpandOption>): Promise<number>;
新增
ohos.screenscreenfunction off(eventType: 'connect' |'disconnect' |'change', callback?: Callback<number>): void;新增
ohos.screenscreenfunction getAllScreens(callback: AsyncCallback<Array<Screen>>): void;
function getAllScreens(): Promise<Array<Screen>>;
新增
ohos.windowWindowStageloadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void;
loadContent(path: string, storage?: LocalStorage): Promise<void>;
loadContent(path: string, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowStagegetSubWindow(): Promise<Array<Window>>;
getSubWindow(callback: AsyncCallback<Array<Window>>): void;
新增
ohos.windowWindowStagecreateSubWindow(name: string): Promise<Window>;
createSubWindow(name: string, callback: AsyncCallback<Window>): void;
新增
ohos.windowWindowStagegetMainWindow(): Promise<Window>;
getMainWindow(callback: AsyncCallback<Window>): void;
新增
ohos.windowWindowStageon(eventType: 'windowStageEvent', callback: Callback): void;新增
ohos.windowWindowStageoff(eventType: 'windowStageEvent', callback?: Callback): void;新增
ohos.windowWindowStageEventTypeBACKGROUND新增
ohos.windowWindowStageEventTypeINACTIVE新增
ohos.windowWindowStageEventTypeACTIVE新增
ohos.windowWindowStageEventTypeFOREGROUND = 1新增
ohos.windowwindowfunction setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback<void>): void;
function setWindowLayoutMode(mode: WindowLayoutMode): Promise<void>;
新增
ohos.windowwindowfunction toggleShownStateForAllAppWindows(callback: AsyncCallback<void>): void;
function toggleShownStateForAllAppWindows(): Promise<void>;
新增
ohos.windowwindowfunction minimizeAll(id: number, callback: AsyncCallback<void>): void;
function minimizeAll(id: number): Promise<void>;
新增
ohos.windowWindowLayoutModeWINDOW_LAYOUT_MODE_TILE新增
ohos.windowWindowLayoutModeWINDOW_LAYOUT_MODE_CASCADE新增
ohos.windowWindowsetOutsideTouchable(touchable: boolean): Promise<void>;
setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void;
废弃
ohos.windowWindowsetDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void;
setDimBehind(dimBehindValue: number): Promise<void>;
废弃
ohos.windowWindowPropertiesdimBehindValue: number废弃

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)电源服务子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)基础通信子系统JS API变更

harmony(鸿蒙)DFX子系统JS API变更

harmony(鸿蒙)分布式数据管理子系统JS API变更

harmony(鸿蒙)事件通知子系统JS API变更

harmony(鸿蒙)文件管理子系统JS API变更

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