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

2022-08-09 浏览 (694)

JS API Changes of the Window Manager Subsystem

The table below lists the APIs changes of the Window Manager subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
ohos.windowWindowsetTouchable(isTouchable: boolean): Promise<void>;
setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowsetPrivacyMode(isPrivacyMode: boolean): Promise<void>;
setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowsetOutsideTouchable(touchable: boolean): Promise<void>;
setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowsetKeepScreenOn(isKeepScreenOn: boolean): Promise<void>;
setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowsetFocusable(isFocusable: boolean): Promise<void>;
setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowsetDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void;
setDimBehind(dimBehindValue: number): Promise<void>;
Added
ohos.windowWindowsetBrightness(brightness: number): Promise<void>;
setBrightness(brightness: number, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowsetBackgroundColor(color: string): Promise<void>;
setBackgroundColor(color: string, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowgetColorSpace(): Promise<ColorSpace>;
getColorSpace(callback: AsyncCallback<ColorSpace>): void;
Added
ohos.windowWindowsetColorSpace(colorSpace:ColorSpace): Promise<void>;
setColorSpace(colorSpace:ColorSpace, callback: AsyncCallback<void>): void;
Added
ohos.windowWindowisSupportWideGamut(): Promise<boolean>;
isSupportWideGamut(callback: AsyncCallback<boolean>): void;
Added
ohos.windowWindowoff(type: 'keyboardHeightChange', callback?: Callback<number>): void;Added
ohos.windowWindowon(type: 'keyboardHeightChange', callback: Callback<number>): void;Added
ohos.windowWindowoff(type: 'systemAvoidAreaChange', callback?: Callback<AvoidArea>): void;Added
ohos.windowWindowon(type: 'systemAvoidAreaChange', callback: Callback<AvoidArea>): void;Added
ohos.windowWindowoff(type: 'windowSizeChange', callback?: Callback<Size>): void;Added
ohos.windowWindowon(type: 'windowSizeChange', callback: Callback<Size>): void;Added
ohos.windowWindowisShowing(callback: AsyncCallback<boolean>): void;
isShowing(): Promise<boolean>;
Added
ohos.windowWindowloadContent(path: string, callback: AsyncCallback<void>): void;
loadContent(path: string): Promise<void>;
Added
ohos.windowWindowsetSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void;
setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>;
Added
ohos.windowWindowsetSystemBarEnable(names: Array<'status'|'navigation'>, callback: AsyncCallback<void>): void;
setSystemBarEnable(names: Array<'status'|'navigation'>): Promise<void>;
Added
ohos.windowWindowsetLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void;
setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>;
Added
ohos.windowWindowsetFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void;
setFullScreen(isFullScreen: boolean): Promise<void>;
Added
ohos.windowWindowgetAvoidArea(type: AvoidAreaType, callback: AsyncCallback<AvoidArea>): void;
getAvoidArea(type: AvoidAreaType): Promise<AvoidArea>;
Added
ohos.windowWindowgetProperties(callback: AsyncCallback<WindowProperties>): void;
getProperties(): Promise<WindowProperties>;
Added
ohos.windowWindowdestroy(callback: AsyncCallback<void>): void;
destroy(): Promise<void>;
Added
ohos.windowWindowshow(callback: AsyncCallback<void>): void;
show(): Promise<void>;
Added
ohos.windowwindowfind(id: string, callback: AsyncCallback<Window>): void;
find(id: string): Promise<Window>;
Added
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;
Added
ohos.windowColorSpaceWIDE_GAMUTAdded
ohos.windowColorSpaceDEFAULTAdded
ohos.windowWindowPropertiesisTransparent: booleanAdded
ohos.windowWindowPropertiesisRoundCorner: booleanAdded
ohos.windowWindowPropertiesisPrivacyMode: booleanAdded
ohos.windowWindowPropertiesisKeepScreenOn: booleanAdded
ohos.windowWindowPropertiesdimBehindValue: numberAdded
ohos.windowWindowPropertiesbrightness: numberAdded
ohos.windowWindowPropertiestouchable: booleanAdded
ohos.windowWindowPropertiesfocusable: booleanAdded
ohos.windowWindowPropertiesisLayoutFullScreen: booleanAdded
ohos.windowWindowPropertiesisFullScreen: booleanAdded
ohos.windowWindowPropertiestype: WindowType;Added
ohos.windowWindowPropertieswindowRect: Rect;Added
ohos.windowSizeheight: number;Added
ohos.windowSizewidth: number;Added
ohos.windowAvoidAreabottomRect: Rect;Added
ohos.windowAvoidArearightRect: Rect;Added
ohos.windowAvoidAreatopRect: Rect;Added
ohos.windowAvoidArealeftRect: Rect;Added
ohos.windowRectheight: number;Added
ohos.windowRectwidth: number;Added
ohos.windowRecttop: number;Added
ohos.windowRectleft: number;Added
ohos.windowSystemBarPropertiesnavigationBarContentColor?: string;Added
ohos.windowSystemBarPropertiesisNavigationBarLightIcon?: boolean;Added
ohos.windowSystemBarPropertiesnavigationBarColor?: string;Added
ohos.windowSystemBarPropertiesstatusBarContentColor?: string;Added
ohos.windowSystemBarPropertiesisStatusBarLightIcon?: boolean;Added
ohos.windowSystemBarPropertiesstatusBarColor?: string;Added
ohos.windowAvoidAreaTypeTYPE_CUTOUTAdded
ohos.windowAvoidAreaTypeTYPE_SYSTEMAdded
ohos.displayDisplayyDPI: number;Added
ohos.displayDisplayxDPI: number;Added
ohos.displayDisplayscaledDensity: number;Added
ohos.displayDisplaydensityPixels: number;Added
ohos.displayDisplaydensityDPI: number;Added
ohos.displayDisplayheight: number;Added
ohos.displayDisplaywidth: number;Added
ohos.displayDisplayrotation: number;Added
ohos.displayDisplayrefreshRate: number;Added
ohos.displayDisplaystate: DisplayState;Added
ohos.displayDisplayalive: boolean;Added
ohos.displayDisplayname: string;Added
ohos.displayDisplayid: number;Added
ohos.displayDisplayStateSTATE_ON_SUSPENDAdded
ohos.displayDisplayStateSTATE_VRAdded
ohos.displayDisplayStateSTATE_DOZE_SUSPENDAdded
ohos.displayDisplayStateSTATE_DOZEAdded
ohos.displayDisplayStateSTATE_ONAdded
ohos.displayDisplayStateSTATE_OFFAdded
ohos.displayDisplayStateSTATE_UNKNOWN = 0Added
ohos.displaydisplayoff(type: 'add' |'remove' |'change', callback?: Callback<number>): void;Added
ohos.displaydisplayoff(type: 'add' |'remove' |'change', callback?: Callback<number>): void;Added
ohos.displaydisplayoff(type: 'add' |'remove' |'change', callback?: Callback<number>): void;Added
ohos.displaydisplayon(type: 'add' |'remove' |'change', callback: Callback<number>): void;Added
ohos.displaydisplayon(type: 'add' |'remove' |'change', callback: Callback<number>): void;Added
ohos.displaydisplayon(type: 'add' |'remove' |'change', callback: Callback<number>): void;Added
ohos.displaydisplaygetAllDisplay(callback: AsyncCallback<Array<Display>>): void;
getAllDisplay(): Promise<Array<Display>>;
Added
ohos.displaydisplaygetDefaultDisplay(callback: AsyncCallback<Display>): void;
getDefaultDisplay(): Promise<Display>;
Added

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Updates (OpenHarmony 3.1 Beta -> OpenHarmony 3.1 Release)

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

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

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

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 Utils Subsystem

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