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

  • 2022-12-22
  • 浏览 (662)

窗口管理子系统JS API变更

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

接口变更

模块名 类名 方法/属性/枚举/常量 变更类型
ohos.animation.windowAnimationManager WindowAnimationController onWindowAnimationTargetsUpdate(fullScreenWindowTarget: WindowAnimationTarget, floatingWindowTargets: Array<WindowAnimationTarget>): void; 新增
ohos.animation.windowAnimationManager WindowAnimationTarget readonly missionId: number; 新增
ohos.animation.windowAnimationManager windowAnimationManager minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget, callback: AsyncCallback<WindowAnimationFinishedCallback>): void;
minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget): Promise<WindowAnimationFinishedCallback>;
新增
ohos.display Display getCutoutInfo(callback: AsyncCallback<CutoutInfo>): void;
getCutoutInfo(): Promise<CutoutInfo>;
新增
ohos.display CutoutInfo readonly waterfallDisplayAreaRects: WaterfallDisplayAreaRects; 新增
ohos.display CutoutInfo readonly boundingRects: Array<Rect>; 新增
ohos.display WaterfallDisplayAreaRects readonly bottom: Rect; 新增
ohos.display WaterfallDisplayAreaRects readonly top: Rect; 新增
ohos.display WaterfallDisplayAreaRects readonly right: Rect; 新增
ohos.display WaterfallDisplayAreaRects readonly left: Rect; 新增
ohos.display Rect height: number; 新增
ohos.display Rect width: number; 新增
ohos.display Rect top: number; 新增
ohos.display Rect left: number; 新增
ohos.display display hasPrivateWindow(displayId: number): boolean; 新增
ohos.window Window setCornerRadius(cornerRadius: number): void; 新增
ohos.window Window setShadow(radius: number, color?: string, offsetX?: number, offsetY?: number): void; 新增
ohos.window Window setBackdropBlurStyle(blurStyle: BlurStyle): void; 新增
ohos.window Window setBackdropBlur(radius: number): void; 新增
ohos.window Window setBlur(radius: number): void; 新增
ohos.window Window getTransitionController(): TransitionController; 新增
ohos.window Window translate(translateOptions: TranslateOptions): void; 新增
ohos.window Window rotate(rotateOptions: RotateOptions): void; 新增
ohos.window Window scale(scaleOptions: ScaleOptions): void; 新增
ohos.window Window opacity(opacity: number): void; 新增
ohos.window Window snapshot(callback: AsyncCallback<image.PixelMap>): void;
snapshot(): Promise<image.PixelMap>;
新增
ohos.window Window setSnapshotSkip(isSkip: boolean): void; 新增
ohos.window Window setWakeUpScreen(wakeUp: boolean): void; 新增
ohos.window Window bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>): Promise<void>;
bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>, callback: AsyncCallback<void>): void;
新增
ohos.window Window off(type: ‘dialogTargetTouch’, callback?: Callback<void>): void; 新增
ohos.window Window on(type: ‘dialogTargetTouch’, callback: Callback<void>): void; 新增
ohos.window Window off(type: ‘screenshot’, callback?: Callback<void>): void; 新增
ohos.window Window on(type: ‘screenshot’, callback: Callback<void>): void; 新增
ohos.window Window showWithAnimation(callback: AsyncCallback<void>): void;
showWithAnimation(): Promise<void>;
新增
ohos.window Window hideWithAnimation(callback: AsyncCallback<void>): void;
hideWithAnimation(): Promise<void>;
新增
ohos.window BlurStyle THICK 新增
ohos.window BlurStyle REGULAR 新增
ohos.window BlurStyle THIN 新增
ohos.window BlurStyle OFF 新增
ohos.window TransitionController animationForHidden(context: TransitionContext): void; 新增
ohos.window TransitionController animationForShown(context: TransitionContext): void; 新增
ohos.window TransitionContext completeTransition(isCompleted: boolean): void; 新增
ohos.window TransitionContext toWindow: Window 新增
ohos.window TranslateOptions z?: number; 新增
ohos.window TranslateOptions y?: number; 新增
ohos.window TranslateOptions x?: number; 新增
ohos.window RotateOptions pivotY?: number; 新增
ohos.window RotateOptions pivotX?: number; 新增
ohos.window RotateOptions z?: number; 新增
ohos.window RotateOptions y?: number; 新增
ohos.window RotateOptions x?: number; 新增
ohos.window ScaleOptions pivotY?: number; 新增
ohos.window ScaleOptions pivotX?: number; 新增
ohos.window ScaleOptions y?: number; 新增
ohos.window ScaleOptions x?: number; 新增
ohos.window WindowProperties id: number 新增
ohos.window WindowType TYPE_SCREENSHOT 新增
ohos.window WindowType TYPE_DIALOG 新增
ohos.window WindowType TYPE_FLOAT_CAMERA 新增
ohos.screen Orientation SENSOR_HORIZONTAL = 7 删除
ohos.screen Orientation SENSOR_VERTICAL = 6 删除
ohos.screen Orientation SENSOR = 5 删除
ohos.window Window setWindowType(type: WindowType): Promise<void>;
setWindowType(type: WindowType, callback: AsyncCallback<void>): void;
废弃
ohos.window WindowProperties isRoundCorner: boolean 废弃

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

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

harmony 鸿蒙无障碍子系统JS API变更

harmony 鸿蒙帐号子系统JS API变更

harmony 鸿蒙ArkUI子系统JS API变更

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

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

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

harmony 鸿蒙公共基础库子系统JS API变更

harmony 鸿蒙DFX子系统JS API变更

0  赞