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

2022-08-09 浏览 (1094)

窗口管理子系统JS API变更

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

接口变更

模块名类名方法/属性/枚举/常量变更类型
ohos.windowWindowsetTouchable(isTouchable: boolean): Promise<void>;
setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowsetPrivacyMode(isPrivacyMode: boolean): Promise<void>;
setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowsetOutsideTouchable(touchable: boolean): Promise<void>;
setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowsetKeepScreenOn(isKeepScreenOn: boolean): Promise<void>;
setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowsetFocusable(isFocusable: boolean): Promise<void>;
setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowsetDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void;
setDimBehind(dimBehindValue: number): Promise<void>;
新增
ohos.windowWindowsetBrightness(brightness: number): Promise<void>;
setBrightness(brightness: number, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowsetBackgroundColor(color: string): Promise<void>;
setBackgroundColor(color: string, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowgetColorSpace(): Promise<ColorSpace>;
getColorSpace(callback: AsyncCallback<ColorSpace>): void;
新增
ohos.windowWindowsetColorSpace(colorSpace:ColorSpace): Promise<void>;
setColorSpace(colorSpace:ColorSpace, callback: AsyncCallback<void>): void;
新增
ohos.windowWindowisSupportWideGamut(): Promise<boolean>;
isSupportWideGamut(callback: AsyncCallback<boolean>): void;
新增
ohos.windowWindowoff(type: 'keyboardHeightChange', callback?: Callback<number>): void;新增
ohos.windowWindowon(type: 'keyboardHeightChange', callback: Callback<number>): void;新增
ohos.windowWindowoff(type: 'systemAvoidAreaChange', callback?: Callback<AvoidArea>): void;新增
ohos.windowWindowon(type: 'systemAvoidAreaChange', callback: Callback<AvoidArea>): void;新增
ohos.windowWindowoff(type: 'windowSizeChange', callback?: Callback<Size>): void;新增
ohos.windowWindowon(type: 'windowSizeChange', callback: Callback<Size>): void;新增
ohos.windowWindowisShowing(callback: AsyncCallback<boolean>): void;
isShowing(): Promise<boolean>;
新增
ohos.windowWindowloadContent(path: string, callback: AsyncCallback<void>): void;
loadContent(path: string): Promise<void>;
新增
ohos.windowWindowsetSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void;
setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>;
新增
ohos.windowWindowsetSystemBarEnable(names: Array<'status'|'navigation'>, callback: AsyncCallback<void>): void;
setSystemBarEnable(names: Array<'status'|'navigation'>): Promise<void>;
新增
ohos.windowWindowsetLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void;
setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>;
新增
ohos.windowWindowsetFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void;
setFullScreen(isFullScreen: boolean): Promise<void>;
新增
ohos.windowWindowgetAvoidArea(type: AvoidAreaType, callback: AsyncCallback<AvoidArea>): void;
getAvoidArea(type: AvoidAreaType): Promise<AvoidArea>;
新增
ohos.windowWindowgetProperties(callback: AsyncCallback<WindowProperties>): void;
getProperties(): Promise<WindowProperties>;
新增
ohos.windowWindowdestroy(callback: AsyncCallback<void>): void;
destroy(): Promise<void>;
新增
ohos.windowWindowshow(callback: AsyncCallback<void>): void;
show(): Promise<void>;
新增
ohos.windowwindowfind(id: string, callback: AsyncCallback<Window>): void;
find(id: string): Promise<Window>;
新增
ohos.windowwindowcreate(id: string, type: WindowType, callback: AsyncCallback<Window>): void;
create(id: string, type: WindowType): Promise<Window>;
create(ctx: Context, id: string, type: WindowType): Promise<Window>;
create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback<Window>): void;
新增
ohos.windowColorSpaceWIDE_GAMUT新增
ohos.windowColorSpaceDEFAULT新增
ohos.windowWindowPropertiesisTransparent: boolean新增
ohos.windowWindowPropertiesisRoundCorner: boolean新增
ohos.windowWindowPropertiesisPrivacyMode: boolean新增
ohos.windowWindowPropertiesisKeepScreenOn: boolean新增
ohos.windowWindowPropertiesdimBehindValue: number新增
ohos.windowWindowPropertiesbrightness: number新增
ohos.windowWindowPropertiestouchable: boolean新增
ohos.windowWindowPropertiesfocusable: boolean新增
ohos.windowWindowPropertiesisLayoutFullScreen: boolean新增
ohos.windowWindowPropertiesisFullScreen: boolean新增
ohos.windowWindowPropertiestype: WindowType;新增
ohos.windowWindowPropertieswindowRect: Rect;新增
ohos.windowSizeheight: number;新增
ohos.windowSizewidth: number;新增
ohos.windowAvoidAreabottomRect: Rect;新增
ohos.windowAvoidArearightRect: Rect;新增
ohos.windowAvoidAreatopRect: Rect;新增
ohos.windowAvoidArealeftRect: Rect;新增
ohos.windowRectheight: number;新增
ohos.windowRectwidth: number;新增
ohos.windowRecttop: number;新增
ohos.windowRectleft: number;新增
ohos.windowSystemBarPropertiesnavigationBarContentColor?: string;新增
ohos.windowSystemBarPropertiesisNavigationBarLightIcon?: boolean;新增
ohos.windowSystemBarPropertiesnavigationBarColor?: string;新增
ohos.windowSystemBarPropertiesstatusBarContentColor?: string;新增
ohos.windowSystemBarPropertiesisStatusBarLightIcon?: boolean;新增
ohos.windowSystemBarPropertiesstatusBarColor?: string;新增
ohos.windowAvoidAreaTypeTYPE_CUTOUT新增
ohos.windowAvoidAreaTypeTYPE_SYSTEM新增
ohos.displayDisplayyDPI: number;新增
ohos.displayDisplayxDPI: number;新增
ohos.displayDisplayscaledDensity: number;新增
ohos.displayDisplaydensityPixels: number;新增
ohos.displayDisplaydensityDPI: number;新增
ohos.displayDisplayheight: number;新增
ohos.displayDisplaywidth: number;新增
ohos.displayDisplayrotation: number;新增
ohos.displayDisplayrefreshRate: number;新增
ohos.displayDisplaystate: DisplayState;新增
ohos.displayDisplayalive: boolean;新增
ohos.displayDisplayname: string;新增
ohos.displayDisplayid: number;新增
ohos.displayDisplayStateSTATE_ON_SUSPEND新增
ohos.displayDisplayStateSTATE_VR新增
ohos.displayDisplayStateSTATE_DOZE_SUSPEND新增
ohos.displayDisplayStateSTATE_DOZE新增
ohos.displayDisplayStateSTATE_ON新增
ohos.displayDisplayStateSTATE_OFF新增
ohos.displayDisplayStateSTATE_UNKNOWN = 0新增
ohos.displaydisplayoff(type: 'add' |'remove' |'change', callback?: Callback<number>): void;新增
ohos.displaydisplayoff(type: 'add' |'remove' |'change', callback?: Callback<number>): void;新增
ohos.displaydisplayoff(type: 'add' |'remove' |'change', callback?: Callback<number>): void;新增
ohos.displaydisplayon(type: 'add' |'remove' |'change', callback: Callback<number>): void;新增
ohos.displaydisplayon(type: 'add' |'remove' |'change', callback: Callback<number>): void;新增
ohos.displaydisplayon(type: 'add' |'remove' |'change', callback: Callback<number>): void;新增
ohos.displaydisplaygetAllDisplay(callback: AsyncCallback<Array<Display>>): void;
getAllDisplay(): Promise<Array<Display>>;
新增
ohos.displaydisplaygetDefaultDisplay(callback: AsyncCallback<Display>): void;
getDefaultDisplay(): Promise<Display>;
新增

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)3.1 release相对于3.1 beta变更详细说明

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

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

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

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

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

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

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

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

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