diff --git a/interfaces/kits/ani/display_runtime/display_ani/ets/@ohos.display.ets b/interfaces/kits/ani/display_runtime/display_ani/ets/@ohos.display.ets index ebe1c219c4fbbfefe05182a164887e11c40353a3..45a922dd51b9cfa7041982efcf147bd565419add 100644 --- a/interfaces/kits/ani/display_runtime/display_ani/ets/@ohos.display.ets +++ b/interfaces/kits/ani/display_runtime/display_ani/ets/@ohos.display.ets @@ -21,8 +21,8 @@ export default namespace display { loadLibrary('displayani_kit.z'); -const DISPLAY_ARRAY_LENGTH = 15; -const CUTO_ARRAY_LENGTH = 5; +const DISPLAY_ARRAY_LENGTH = 15; +const CUTO_ARRAY_LENGTH = 5; export interface Rect { left: long; @@ -111,26 +111,26 @@ export class FoldCreaseRegionImpl implements FoldCreaseRegion { export interface VirtualScreenConfig { name: string; - + width: long; - + height: long; - + density: double; - + surfaceId: string; } - + export class VirtualScreenConfigImpl implements VirtualScreenConfig { name: string; - + width: long; - + height: long; - + density: double; - - surfaceId: string; + + surfaceId: string; } export enum FoldDisplayMode { @@ -194,14 +194,14 @@ export enum DisplayState { } export enum ScreenShape { - + RECTANGLE = 0, ROUND = 1 } export enum DisplaySourceMode { - + NONE = 0, MAIN = 1, @@ -227,7 +227,7 @@ export interface Display { rotation: int; width: long; - + height: long; availableHeight: long; @@ -299,7 +299,7 @@ export class DisplayImpl implements Display { rotation: int; width: long; - + height: long; availableHeight: long; @@ -344,9 +344,9 @@ export class DisplayImpl implements Display { this.getCutoutInfoInternal(res); minusRectArray(res.boundingRects); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as CutoutInfo); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, new CutoutInfoImpl()); }); } @@ -358,9 +358,9 @@ export class DisplayImpl implements Display { this.getCutoutInfoInternal(res); minusRectArray(res.boundingRects); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as CutoutInfo); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -369,9 +369,9 @@ export class DisplayImpl implements Display { hasImmersiveWindow(callback: AsyncCallback): void { taskpool.execute((): boolean => { return this.hasImmersiveWindowInternal(); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as boolean); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, false); }); } @@ -380,9 +380,9 @@ export class DisplayImpl implements Display { return new Promise((resolve: (value: boolean) => void, reject: (error: BusinessError) => void ) => { taskpool.execute((): boolean => { return this.hasImmersiveWindowInternal(); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as boolean); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -394,9 +394,9 @@ export class DisplayImpl implements Display { let res: Rect = new RectImpl(); this.getAvailableAreaInternal(res); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Rect); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }) @@ -494,7 +494,7 @@ function minusCreaseRects(foldCreaseRegionObj: FoldCreaseRegion): void { let creaseRects: Array = foldCreaseRegion.creaseRects; let i = 0; for (; i < creaseRects.length; i++) { - if (creaseRects[i].left == 0 && creaseRects[i].top == 0 && + if (creaseRects[i].left == 0 && creaseRects[i].top == 0 && creaseRects[i].width == 0 && creaseRects[i].height == 0) { break; } @@ -555,9 +555,9 @@ export function getAllDisplays(): Promise> { getAllDisplaysSyncNative(res); minusDisplayArray(res) return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -633,9 +633,9 @@ export function getAllDisplayPhysicalResolution(): Promise { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -676,64 +676,64 @@ export function makeUnique(screenId: long): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ) :void => { taskpool.execute((): void => { makeUniqueNative(screenId, displayMgrRef); - }).then((ret: NullishType) :void => { + }).then((ret: Any) :void => { resolve(undefined); - }).catch((err: NullishType) :void => { + }).catch((err: Any) :void => { reject(err as BusinessError); }); }); } - + export native function makeUniqueNative(screenId: long, nativeObj: long): void; - + export function setFoldStatusLocked(locked: boolean): void { setFoldStatusLockedNative(locked, displayMgrRef); } - + export native function setFoldStatusLockedNative(locked: boolean, nativeObj: long):void; - + export function createVirtualScreen(config: VirtualScreenConfig): Promise { return new Promise((resolve: (value: long) => void, reject: (error: BusinessError) => void ) :void => { taskpool.execute((): long => { let screenId: long; screenId = createVirtualScreenNative(config as object, displayMgrRef); return screenId; - }).then((ret: NullishType) :void => { + }).then((ret: Any) :void => { resolve(ret as long); - }).catch((err: NullishType) :void => { + }).catch((err: Any) :void => { reject(err as BusinessError); }); - }); + }); } - + export native function createVirtualScreenNative(config: object, nativeObj: long): long; - + export function destroyVirtualScreen(screenId: long): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ) :void => { taskpool.execute((): void => { destroyVirtualScreenNative(screenId, displayMgrRef); - }).then((ret: NullishType) :void => { + }).then((ret: Any) :void => { resolve(undefined); - }).catch((err: NullishType) :void => { + }).catch((err: Any) :void => { reject(err as BusinessError); }); }); } - + export native function destroyVirtualScreenNative(screenId: long, nativeObj: long): void; - + export function setVirtualScreenSurface(screenId: long, surfaceId: string): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ) :void => { taskpool.execute((): void => { setVirtualScreenSurfaceNative(screenId, surfaceId, displayMgrRef); - }).then((ret: NullishType) :void => { + }).then((ret: Any) :void => { resolve(undefined); - }).catch((err: NullishType) :void => { + }).catch((err: Any) :void => { reject(err as BusinessError); }); }); } - + export native function setVirtualScreenSurfaceNative(screenId: long, surfaceId: string, nativeObj: long): void; export function disposeDisplay(display: DisplayImpl): void { @@ -747,4 +747,4 @@ export let displayMgrRef: long; export function setDisplayMgrRef(nativeObj : long) : void{ displayMgrRef = nativeObj; } -} \ No newline at end of file +} diff --git a/interfaces/kits/ani/embeddable_window_stage/ets/@ohos.uiExtensionHost.ets b/interfaces/kits/ani/embeddable_window_stage/ets/@ohos.uiExtensionHost.ets index d8f8bb2bbf32ad427ef20419eed47d1ff1af1485..a21bc09ee0701c1199685be5517f7bb0c91cf214 100644 --- a/interfaces/kits/ani/embeddable_window_stage/ets/@ohos.uiExtensionHost.ets +++ b/interfaces/kits/ani/embeddable_window_stage/ets/@ohos.uiExtensionHost.ets @@ -129,9 +129,9 @@ namespace uiExtensionHost { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWaterMarkFlag(this.nativeObj, enable); - }).then((ret: NullishType) :void => { + }).then((ret: Any) :void => { resolve(undefined); - }).catch((err: NullishType) :void => { + }).catch((err: Any) :void => { reject(err as BusinessError); }); }); @@ -141,9 +141,9 @@ namespace uiExtensionHost { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.hidePrivacyContentForHost(this.nativeObj, shouldHide); - }).then((ret: NullishType) :void => { + }).then((ret: Any) :void => { resolve(undefined); - }).catch((err: NullishType) :void => { + }).catch((err: Any) :void => { reject(err as BusinessError); }); }); diff --git a/interfaces/kits/ani/screen_runtime/screen_ani/ets/@ohos.screen.ets b/interfaces/kits/ani/screen_runtime/screen_ani/ets/@ohos.screen.ets index 342597d4224ee02814d91c315a25831c005cd06b..ba18ed1e3f6d53d6c121030bf17c4bf946514d85 100644 --- a/interfaces/kits/ani/screen_runtime/screen_ani/ets/@ohos.screen.ets +++ b/interfaces/kits/ani/screen_runtime/screen_ani/ets/@ohos.screen.ets @@ -35,9 +35,9 @@ export function makeMirror(mainScreen: long, mirrorScreen: Array, callback taskpool.execute((): long => { let res: long = makeMirrorInternal(mainScreen, mirrorScreen); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as long); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -47,9 +47,9 @@ export function makeMirror(mainScreen: long, mirrorScreen: Array): Promise taskpool.execute((): long => { let res: long = makeMirrorInternal(mainScreen, mirrorScreen); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as long); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }) @@ -66,9 +66,9 @@ export function getAllScreens(callback: AsyncCallback>): void { getAllScreensInternal(screens); minusScreens(screens); return screens; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, new Array()); }); } @@ -84,9 +84,9 @@ export function getAllScreens(): Promise> { getAllScreensInternal(screens); minusScreens(screens); return screens; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); } @@ -121,9 +121,9 @@ export function createVirtualScreen(options: VirtualScreenOption, callback: Asyn let screen = new ScreenImpl(); createVirtualScreenInternal(options, screen); return screen; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as Screen); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -134,9 +134,9 @@ export function createVirtualScreen(options: VirtualScreenOption): Promise { + }).then((ret: Any) => { resolve(ret as Screen); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -147,7 +147,7 @@ export function setVirtualScreenSurface(screenId: long, surfaceId: string, callb setVirtualScreenSurfaceInternal(screenId, surfaceId); }).then(() => { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -158,7 +158,7 @@ export function setVirtualScreenSurface(screenId: long, surfaceId: string): Prom setVirtualScreenSurfaceInternal(screenId, surfaceId); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -169,7 +169,7 @@ export function destroyVirtualScreen(screenId: long, callback: AsyncCallback { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -180,7 +180,7 @@ export function destroyVirtualScreen(screenId: long): Promise { destroyVirtualScreenInternal(screenId); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -189,9 +189,9 @@ export function destroyVirtualScreen(screenId: long): Promise { export function isScreenRotationLocked(callback: AsyncCallback): void { taskpool.execute((): boolean => { return isScreenRotationLockedInternal(); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as boolean); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -200,9 +200,9 @@ export function isScreenRotationLocked(): Promise { return new Promise((resolve: (value: boolean) => void, reject: (error: BusinessError) => void) => { taskpool.execute((): boolean => { return isScreenRotationLockedInternal(); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as boolean); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -213,7 +213,7 @@ export function setScreenRotationLocked(isLocked: boolean, callback: AsyncCallba setScreenRotationLockedInternal(isLocked); }).then(() => { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -224,7 +224,7 @@ export function setScreenRotationLocked(isLocked: boolean): Promise { setScreenRotationLockedInternal(isLocked); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -237,7 +237,7 @@ export function setMultiScreenRelativePosition(mainScreenOptions: MultiScreenPos setMultiScreenRelativePositionInternal(mainScreenOptions, secondaryScreenOptions); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -250,7 +250,7 @@ export function setMultiScreenMode(primaryScreenId: long, secondaryScreenId: lon setMultiScreenModeInternal(primaryScreenId, secondaryScreenId, secondaryScreenMode); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -262,7 +262,7 @@ export function setScreenPrivacyMaskImage(screenId: long, image?: image.PixelMap setScreenPrivacyMaskImageInternal(screenId, image); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -273,9 +273,9 @@ export function makeUnique(uniqueScreen: Array): Promise> { reject: (error: BusinessError) => void ) => { taskpool.execute((): Array => { return makeUniqueInternal(uniqueScreen); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -286,9 +286,9 @@ export function makeMirrorWithRegion(mainScreen: long, mirrorScreen: Array return new Promise((resolve: (value: long) => void, reject: (error: BusinessError) => void) => { taskpool.execute((): long => { return makeMirrorWithRegionInternal(mainScreen, mirrorScreen, mainScreenRegion); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as long); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }) @@ -299,7 +299,7 @@ export function stopMirror(mirrorScreen: Array, callback: AsyncCallback { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -310,7 +310,7 @@ export function stopMirror(mirrorScreen: Array): Promise { stopMirrorInternal(mirrorScreen); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -319,9 +319,9 @@ export function stopMirror(mirrorScreen: Array): Promise { export function makeExpand(options: Array, callback: AsyncCallback): void { taskpool.execute((): long => { return makeExpandInternal(options); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as long); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -330,9 +330,9 @@ export function makeExpand(options: Array): Promise { return new Promise((resolve: (value: long) => void, reject: (error: BusinessError) => void) => { taskpool.execute((): long => { return makeExpandInternal(options); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as long); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -343,7 +343,7 @@ export function stopExpand(expandScreen: Array, callback: AsyncCallback { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -354,7 +354,7 @@ export function stopExpand(expandScreen: Array): Promise { stopExpandInternal(expandScreen); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -401,7 +401,7 @@ export interface Screen { setScreenActiveMode(modeIndex: long): Promise; setOrientation(orientation: Orientation, callback: AsyncCallback): void; - + setOrientation(orientation: Orientation): Promise; } @@ -436,7 +436,7 @@ class ScreenImpl implements Screen { this.setDensityDpiInternal(densityDpi); }).then(() => { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -447,7 +447,7 @@ class ScreenImpl implements Screen { this.setDensityDpiInternal(densityDpi); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -476,7 +476,7 @@ class ScreenImpl implements Screen { this.setScreenActiveModeInternal(modeIndex); }).then(() => { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -488,7 +488,7 @@ class ScreenImpl implements Screen { this.setScreenActiveModeInternal(modeIndex); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -499,7 +499,7 @@ class ScreenImpl implements Screen { this.setOrientationInternal(orientation); }).then(() => { callback(null, undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -511,7 +511,7 @@ class ScreenImpl implements Screen { this.setOrientationInternal(orientation); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); diff --git a/interfaces/kits/ani/screenshot_runtime/screenshot_ani/ets/@ohos.screenshot.ets b/interfaces/kits/ani/screenshot_runtime/screenshot_ani/ets/@ohos.screenshot.ets index aa9290280da2c4fc8ce7eab090ba3856b3d7225a..8bfeaa20a24e2046ccd0269c1763417f2571cf6c 100644 --- a/interfaces/kits/ani/screenshot_runtime/screenshot_ani/ets/@ohos.screenshot.ets +++ b/interfaces/kits/ani/screenshot_runtime/screenshot_ani/ets/@ohos.screenshot.ets @@ -12,50 +12,50 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + import { AsyncCallback, Callback } from '@ohos.base'; import { BusinessError } from '@ohos.base'; import image from '@ohos.multimedia.image'; - + export default namespace screenshot { - + loadLibrary('screenshotani_kit.z'); - + export function save(options: ScreenshotOptions, callback: AsyncCallback): void { taskpool.execute((): image.PixelMap => { let res: image.PixelMap = saveSync(options); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } - + export function save(callback: AsyncCallback): void { taskpool.execute((): image.PixelMap => { let res: image.PixelMap = saveSync(); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(null, ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } - + export function save(options?: ScreenshotOptions): Promise { return new Promise((resolve: (value: image.PixelMap) => void, reject: (error: BusinessError) => void ) => { taskpool.execute((): image.PixelMap => { let res: image.PixelMap = saveSync(options); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); } - + native function saveSync(screenshotOptions?: ScreenshotOptions): image.PixelMap; export function capture(options?: CaptureOption): Promise { @@ -63,108 +63,108 @@ export function capture(options?: CaptureOption): Promise { taskpool.execute((): image.PixelMap => { let res: image.PixelMap = captureSync(options); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); } - + native function captureSync(options?: CaptureOption): image.PixelMap; - + export function pick(): Promise { return new Promise((resolve: (value: PickInfo) => void, reject: (error: BusinessError) => void ) => { taskpool.execute((): PickInfo => { let res: PickInfo = pickSync(); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as PickInfo); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); } - + native function pickSync(): PickInfo; - + export interface ScreenshotOptions { screenRect?: Rect; - + imageSize?: Size; - + rotation?: int; - + displayId?: long; - + isNotificationNeeded?: boolean; - + isCaptureFullOfScreen?: boolean; } - + export class ScreenshotOptionsImpl implements ScreenshotOptions { screenRect?: Rect; - + imageSize?: Size; - + rotation?: int; - + displayId?: long; - + isNotificationNeeded?: boolean; - + isCaptureFullOfScreen?: boolean; } - + export interface Size { width: long; - + height: long; } - + export class SizeImpl implements Size { width: long; - + height: long; } - + export interface Rect { left: long; - + top: long; - + width: long; - + height: long; } - + export class RectImpl implements Rect { left: long; - + top: long; - + width: long; - + height: long; } export interface CaptureOption { displayId?: Long; } - + export class CaptureOptionImpl implements CaptureOption { displayId?: Long; } - + export interface PickInfo { pickRect: Rect; - + pixelMap: image.PixelMap; } - + export class PickInfoImpl implements PickInfo { pickRect: Rect; - + pixelMap: image.PixelMap; } -} \ No newline at end of file +} diff --git a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets index a036640b9a3755a832fbab814221b2c1925162cc..6e165348a5ca7d426af6196224acd75beb806d12 100644 --- a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets +++ b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets @@ -969,14 +969,14 @@ export interface WindowProperties { /** * The position relative to the window and size of drawable area * - * @type { Rect } + * @type { Rect } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 11 */ /** * The position relative to the window and size of drawable area * - * @type { Rect } + * @type { Rect } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since 12 @@ -1608,7 +1608,7 @@ export interface WindowLimits { /** * The decor button style of the window. - * + * * @interface DecorButtonStyle * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -1618,7 +1618,7 @@ export interface WindowLimits { export interface DecorButtonStyle { /** * color mode. - * + * * @type { ?colorMode } * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -1628,7 +1628,7 @@ export interface DecorButtonStyle { /** * button background size when hover. - * + * * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -1638,7 +1638,7 @@ export interface DecorButtonStyle { /** * button spacing. - * + * * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -1648,7 +1648,7 @@ export interface DecorButtonStyle { /** * close button right margin. - * + * * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -2040,9 +2040,9 @@ export class WindowStageInternal implements WindowStage { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowRectAutoSave(this.nativeObj, enabled, isSaveBySpecifiedFlag); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2052,9 +2052,9 @@ export class WindowStageInternal implements WindowStage { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowRectAutoSave(this.nativeObj, enabled, false); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2064,9 +2064,9 @@ export class WindowStageInternal implements WindowStage { return new Promise((resolve: (value: boolean) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): boolean => { return this.isWindowRectAutoSave(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(ret as boolean); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2076,9 +2076,9 @@ export class WindowStageInternal implements WindowStage { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.removeStartingWindow(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2125,9 +2125,9 @@ export class WindowStageInternal implements WindowStage { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowModal(this.nativeObj, isModal); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2139,7 +2139,7 @@ export class WindowStageInternal implements WindowStage { public setDefaultDensityEnabled(enabled: boolean): void { this.setDefaultDensityEnabledSync(this.nativeObj, enabled); } - + public getMainWindowSync(): Window { let ret = this.getMainWindowSync(this.nativeObj); return ret; @@ -2150,9 +2150,9 @@ export class WindowStageInternal implements WindowStage { taskpool.execute((): Window => { let window = this.getMainWindowSync(this.nativeObj); return window; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2162,9 +2162,9 @@ export class WindowStageInternal implements WindowStage { taskpool.execute((): Window => { let res = this.getMainWindowSync(this.nativeObj); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { }); } @@ -2173,9 +2173,9 @@ export class WindowStageInternal implements WindowStage { taskpool.execute((): Window => { let window = this.createSubWindowSync(this.nativeObj, name); return window; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2185,9 +2185,9 @@ export class WindowStageInternal implements WindowStage { taskpool.execute((): Window => { let res = this.createSubWindowSync(this.nativeObj, name); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { }); } @@ -2364,9 +2364,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.setFollowParentWindowLayoutEnabled(this.nativeObj, enabled); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2388,9 +2388,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.stopMoving(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2400,9 +2400,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.setParentWindow(this.nativeObj, windowId); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2412,9 +2412,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.setWindowTitle(this.nativeObj, titleName); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2447,9 +2447,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowTopmost(this.nativeObj, isWindowTopmost); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2467,9 +2467,9 @@ export class WindowInternal implements Window { dockShow = isDockHoverShown; } this.setTitleAndDockHoverShown(this.nativeObj, titleShow, dockShow); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2479,9 +2479,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.restore(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2491,9 +2491,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.startMoving(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2503,9 +2503,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.startMoveWindowWithCoordinate(this.nativeObj, offsetX, offsetY); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2536,9 +2536,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void ): void => { taskpool.execute((): void => { this.minimize(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2547,9 +2547,9 @@ export class WindowInternal implements Window { public minimize(callback: AsyncCallback): void { taskpool.execute((): void => { this.minimize(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2563,21 +2563,21 @@ export class WindowInternal implements Window { else { this.maximize(this.nativeObj, presentation as int); } - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); } - + public resize(width: int, height: int): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.resize(this.nativeObj, width, height); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2587,9 +2587,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.moveWindowTo(this.nativeObj, x, y); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2598,9 +2598,9 @@ export class WindowInternal implements Window { public resize(width: int, height: int, callback: AsyncCallback): void { taskpool.execute((): void => { this.resize(this.nativeObj, width, height); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2608,9 +2608,9 @@ export class WindowInternal implements Window { public moveWindowTo(x: int, y: int, callback: AsyncCallback): void { taskpool.execute((): void => { this.moveWindowTo(this.nativeObj, x, y); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2624,9 +2624,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setHandwritingFlag(this.nativeObj, enable); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2647,9 +2647,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowBackgroundColor(this.nativeObj, color); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2658,9 +2658,9 @@ export class WindowInternal implements Window { public setBackgroundColor(color: string, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowBackgroundColor(this.nativeObj, color); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2692,9 +2692,9 @@ export class WindowInternal implements Window { res.type = res.typeInternal as WindowType; res.displayId = res.displayIdInternal; return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as WindowProperties); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2706,9 +2706,9 @@ export class WindowInternal implements Window { res.type = res.typeInternal as WindowType; res.displayId = res.displayIdInternal; return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as WindowProperties); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, new WindowPropertiesInternal()); }); } @@ -2718,9 +2718,9 @@ export class WindowInternal implements Window { taskpool.execute((): boolean => { let res = this.isWindowSupportWideGamut(this.nativeObj); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as boolean); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2730,9 +2730,9 @@ export class WindowInternal implements Window { taskpool.execute((): boolean => { let res = this.isWindowSupportWideGamut(this.nativeObj); return res; - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as boolean); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, false); }); } @@ -2741,9 +2741,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowLayoutFullScreen(this.nativeObj, isLayoutFullScreen); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2752,9 +2752,9 @@ export class WindowInternal implements Window { public setWindowLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowLayoutFullScreen(this.nativeObj, isLayoutFullScreen); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2763,9 +2763,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setRaiseByClickEnabled(this.nativeObj, enable); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2774,9 +2774,9 @@ export class WindowInternal implements Window { public setRaiseByClickEnabled(enable: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setRaiseByClickEnabled(this.nativeObj, enable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2785,9 +2785,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setExclusivelyHighlighted(this.nativeObj, exclusivelyHighlighted); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2797,9 +2797,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowSystemBarProperties(this.nativeObj, systemBarProperties); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2808,9 +2808,9 @@ export class WindowInternal implements Window { public setWindowSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowSystemBarProperties(this.nativeObj, systemBarProperties); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2823,9 +2823,9 @@ export class WindowInternal implements Window { } else { this.setSpecificSystemBarEnabled(this.nativeObj, name, enable, enableAnimation); } - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -2835,9 +2835,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: image.PixelMap) => void, reject: (error: BusinessError) => void) => { taskpool.execute(() => { return this.snapshot(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2846,9 +2846,9 @@ export class WindowInternal implements Window { public snapshot(callback: AsyncCallback): void { taskpool.execute(() => { return this.snapshot(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2859,7 +2859,7 @@ export class WindowInternal implements Window { this.hideNonSystemFloatingWindows(this.nativeObj, shouldHide); }).then(() => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2870,7 +2870,7 @@ export class WindowInternal implements Window { this.hideNonSystemFloatingWindows(this.nativeObj, shouldHide); }).then(() => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2879,9 +2879,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowColorSpaceSync(this.nativeObj, colorSpace as int); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2890,9 +2890,9 @@ export class WindowInternal implements Window { public setWindowColorSpace(colorSpace: ColorSpace, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowColorSpaceSync(this.nativeObj, colorSpace as int); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2901,9 +2901,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setPreferredOrientationSync(this.nativeObj, orientation as int); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2912,9 +2912,9 @@ export class WindowInternal implements Window { public setPreferredOrientation(orientation: Orientation, callback: AsyncCallback): void { taskpool.execute((): void => { this.setPreferredOrientationSync(this.nativeObj, orientation as int); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2927,9 +2927,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowPrivacyModeSync(this.nativeObj, isPrivacyMode); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -2938,9 +2938,9 @@ export class WindowInternal implements Window { public setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowPrivacyModeSync(this.nativeObj, isPrivacyMode); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -2949,9 +2949,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.recoverSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3021,9 +3021,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowKeepScreenOnSync(this.nativeObj, isKeepScreenOn); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(ret as undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3032,9 +3032,9 @@ export class WindowInternal implements Window { public setWindowKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowKeepScreenOnSync(this.nativeObj, isKeepScreenOn); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3043,9 +3043,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowSystemBarEnableSync(this.nativeObj, names); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3054,9 +3054,9 @@ export class WindowInternal implements Window { public setWindowSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowSystemBarEnableSync(this.nativeObj, names); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3073,9 +3073,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWaterMarkFlagSync(this.nativeObj, enable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3084,9 +3084,9 @@ export class WindowInternal implements Window { public setWaterMarkFlag(enable: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWaterMarkFlagSync(this.nativeObj, enable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3095,9 +3095,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowFocusableSync(this.nativeObj, isFocusable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3106,9 +3106,9 @@ export class WindowInternal implements Window { public setWindowFocusable(isFocusable: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowFocusableSync(this.nativeObj, isFocusable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3126,9 +3126,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setSubWindowZLevelSync(this.nativeObj, zLevel); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3138,9 +3138,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.raiseAboveTargetSync(this.nativeObj, windowId); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3149,9 +3149,9 @@ export class WindowInternal implements Window { public raiseAboveTarget(windowId: int, callback: AsyncCallback): void { taskpool.execute((): void => { this.raiseAboveTargetSync(this.nativeObj, windowId); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3160,9 +3160,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.raiseToAppTopSync(this.nativeObj); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3171,9 +3171,9 @@ export class WindowInternal implements Window { public raiseToAppTop(callback: AsyncCallback): void { taskpool.execute((): void => { this.raiseToAppTopSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3182,9 +3182,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setTopmostSync(this.nativeObj, isTopmost); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3194,9 +3194,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.requestFocusSync(this.nativeObj, isFocused); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3206,9 +3206,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setSubWindowModal(this.nativeObj, isModal); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3218,9 +3218,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setSubWindowModalType(this.nativeObj, isModal, modalityType); - }).then((ret: NullishType): void => { + }).then((ret: Any): void => { resolve(undefined); - }).catch((err: NullishType): void => { + }).catch((err: Any): void => { reject(err as BusinessError); }); }); @@ -3234,9 +3234,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowTouchableSync(this.nativeObj, isTouchable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3245,9 +3245,9 @@ export class WindowInternal implements Window { public setWindowTouchable(isTouchable: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowTouchableSync(this.nativeObj, isTouchable); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3256,9 +3256,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setDialogBackGestureEnabledSync(this.nativeObj, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3268,9 +3268,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowMaskSync(this.nativeObj, windowMask); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3324,9 +3324,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowCornerRadiusSync(this.nativeObj, cornerRadius); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3354,9 +3354,9 @@ export class WindowInternal implements Window { public showWindow(callback: AsyncCallback): void { taskpool.execute((): void => { this.showWindowSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3365,9 +3365,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.showWindowSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3376,9 +3376,9 @@ export class WindowInternal implements Window { public destroyWindow(callback: AsyncCallback): void { taskpool.execute((): void => { this.destroyWindowSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3387,9 +3387,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.destroyWindowSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3402,13 +3402,13 @@ export class WindowInternal implements Window { public isWindowHighlighted(): boolean { return this.isWindowHighlightedSync(this.nativeObj); } - + public hideWithAnimation(callback: AsyncCallback): void { taskpool.execute((): void => { this.hideWithAnimationSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3417,9 +3417,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.hideWithAnimationSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3428,9 +3428,9 @@ export class WindowInternal implements Window { public showWithAnimation(callback: AsyncCallback): void { taskpool.execute((): void => { this.showWithAnimationSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3439,9 +3439,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.showWithAnimationSync(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3451,9 +3451,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowBrightness(this.nativeObj, brightness); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3462,9 +3462,9 @@ export class WindowInternal implements Window { public setWindowBrightness(brightness: double, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowBrightness(this.nativeObj, brightness); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3486,9 +3486,9 @@ export class WindowInternal implements Window { reject: (error: BusinessError) => void): void => { taskpool.execute(() => { return this.snapshotIgnorePrivacy(this.nativeObj); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3507,9 +3507,9 @@ export class WindowInternal implements Window { taskpool.execute((): void => { this.setStatusBarColor( this.nativeObj, (color.alpha << 24) | (color.red << 16) | (color.green << 8) | color.blue); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3523,9 +3523,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setSystemAvoidAreaEnabled(this.nativeObj, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3543,9 +3543,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowGrayScale(this.nativeObj, grayScale); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3563,9 +3563,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setGestureBackEnabled(this.nativeObj, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3575,9 +3575,9 @@ export class WindowInternal implements Window { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setSingleFrameComposerEnabled(this.nativeObj, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3756,21 +3756,21 @@ export function getLastWindow(ctx: BaseContext): Promise { taskpool.execute((): Window => { hilog.info(DOMAIN, TAG, 'getLastWindow, ctx:' + ctx); return getLastWindowSync(nativeObj, ctx); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); - }); + }); } export function getLastWindow(ctx: BaseContext, callback: AsyncCallback): void { taskpool.execute((): Window => { hilog.info(DOMAIN, TAG, 'getLastWindow, ctx:' + ctx); return getLastWindowSync(nativeObj, ctx); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, new WindowInternal()); }); } @@ -3779,9 +3779,9 @@ export function createWindow(config: Configuration): Promise { return new Promise((resolve: (value: Window) => void, reject: (error: BusinessError) => void ) => { taskpool.execute((): Window => { return createWindowSync(nativeObj, config); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3790,9 +3790,9 @@ export function createWindow(config: Configuration): Promise { export function createWindow(config: Configuration, callback: AsyncCallback): void { taskpool.execute((): Window => { return createWindowSync(nativeObj, config); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), ret as Window); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, new WindowInternal()); }); } @@ -3801,20 +3801,20 @@ export function minimizeAll(id: long): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { minimizeAllSync(nativeObj, id); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); - }); + }); } export function minimizeAll(id: long, callback: AsyncCallback): void { taskpool.execute((): void => { minimizeAllSync(nativeObj, id); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3840,9 +3840,9 @@ export function getWindowsByCoordinate(displayId: number, windowNumber?: number, param.y = y; } return getWindowsByCoordinate(nativeObj, param); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3853,9 +3853,9 @@ export function getAllWindowLayoutInfo(displayId: long): Promise) => void, reject: (error: BusinessError) => void): void => { taskpool.execute(() => { return getAllWindowLayoutInfo(nativeObj, displayId); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3866,9 +3866,9 @@ export function getSnapshot(windowId: number): Promise { resolve: (value: image.PixelMap) => void, reject: (error: BusinessError) => void): void => { taskpool.execute(() => { return getSnapshot(nativeObj, windowId); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as image.PixelMap); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3885,9 +3885,9 @@ export function getVisibleWindowInfo(): Promise> { visibleWindowInfos[i].isFocused = visibleWindowInfos[i].isFocusedInternal; } return visibleWindowInfos; - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(ret as Array); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3898,9 +3898,9 @@ export function setGestureNavigationEnabled(enabled: boolean): Promise { resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { return setGestureNavigationEnabled(nativeObj, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3909,9 +3909,9 @@ export function setGestureNavigationEnabled(enabled: boolean): Promise { export function setGestureNavigationEnabled(enabled: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { setGestureNavigationEnabled(nativeObj, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3921,9 +3921,9 @@ export function setWaterMarkImage(pixelMap: image.PixelMap, enabled: boolean): P resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { return setWaterMarkImage(nativeObj, pixelMap, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3932,9 +3932,9 @@ export function setWaterMarkImage(pixelMap: image.PixelMap, enabled: boolean): P export function setWaterMarkImage(pixelMap: image.PixelMap, enabled: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { setWaterMarkImage(nativeObj, pixelMap, enabled); - }).then((ret: NullishType) => { + }).then((ret: Any) => { callback(new BusinessError(), undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { callback(err as BusinessError, undefined); }); } @@ -3985,9 +3985,9 @@ export function shiftAppWindowFocus(sourceWindowId: int, targetWindowId: int): P return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { return shiftAppWindowFocusSync(nativeObj, sourceWindowId, targetWindowId); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -3997,9 +3997,9 @@ export function shiftAppWindowPointerEvent(sourceWindowId: int, targetWindowId: return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { return shiftAppWindowPointerEventSync(nativeObj, sourceWindowId, targetWindowId); - }).then((ret: NullishType) => { + }).then((ret: Any) => { resolve(undefined); - }).catch((err: NullishType) => { + }).catch((err: Any) => { reject(err as BusinessError); }); }); @@ -4061,4 +4061,4 @@ function runWindowNoInteractionCallback(cb: object): void { } } -export default window; \ No newline at end of file +export default window; diff --git a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/window_entry.ets b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/window_entry.ets index 57edc7ca213ba8bd9e0e330d54e450e8442c2d1e..9acd81582379de8e55b9742d6bb87a1db29f68ab 100644 --- a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/window_entry.ets +++ b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/window_entry.ets @@ -26,7 +26,7 @@ function main() { ws.getMainWindow().then((res:window.Window)=>{ console.println('[ANI]getMainWindow primise'); - }).catch((e:NullishType)=>{ + }).catch((e:Any)=>{ console.println('[ANI]getMainWindow catch'); }); @@ -38,7 +38,7 @@ function main() { w.isWindowSupportWideGamut().then((res:boolean)=>{ console.println('[ANI]isWindowSupportWideGamut primise' + res); - }).catch((e:NullishType)=>{ + }).catch((e:Any)=>{ console.println('[ANI]isWindowSupportWideGamut catch'); }); @@ -48,7 +48,7 @@ function main() { w.setWindowLayoutFullScreen(true).then((res:int)=>{ console.println('[ANI]setWindowLayoutFullScree primise' + res); - }).catch((e:NullishType)=>{ + }).catch((e:Any)=>{ console.println('[ANI]setWindowLayoutFullScreen catch'); }); @@ -59,7 +59,7 @@ function main() { let systemBarProperties = new window.SystemBarPropertiesInternal(); w.setWindowSystemBarProperties(systemBarProperties).then((res:int)=>{ console.println('[ANI]setWindowSystemBarProperties primise' + res); - }).catch((e:NullishType)=>{ + }).catch((e:Any)=>{ console.println('[ANI]setWindowSystemBarProperties catch'); }); @@ -69,7 +69,7 @@ function main() { w.setSpecificSystemBarEnabled('w', false, false).then((res:int)=>{ console.println('[ANI]setSpecificSystemBarEnabled primise' + res); - }).catch((e:NullishType)=>{ + }).catch((e:Any)=>{ console.println('[ANI]setSpecificSystemBarEnabled catch'); }); @@ -78,7 +78,7 @@ function main() { w.setWindowBackgroundColor('0xFFFFFF'); w.setWindowColorSpace(window.ColorSpace.DEFAULT).then((ret: int) => { console.println('[ANI] in ret:' + ret); - }).catch((e: NullishType) => { + }).catch((e: Any) => { let err = e as BusinessError; console.println('[ANI] in code:' + err?.code + ' err:' + err?.message); });