diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 6dc429c950a5b0585cf8a3b7b7261cdb4a5f0115..32c67f4a7607f889aa944dd398e63db5f5974fd4 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -1239,7 +1239,7 @@ declare namespace window { } /** - * Position + * coordinates after conversion * * @interface Position * @syscap SystemCapability.Window.SessionManager @@ -2821,7 +2821,8 @@ declare namespace window { * @type { Rect } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ rect: Rect, @@ -5438,10 +5439,12 @@ declare namespace window { moveWindowToGlobal(x: number, y: number, moveConfiguration?: MoveConfiguration): Promise; /** - * Move window to the position relative to the main screen. + * Move window to the position relative to the primary display. * - * @param { number } x - Indicate the X-coordinate of the window relative to the main screen. - * @param { number } y - Indicate the Y-coordinate of the window relative to the main screen. + * @param { number } x - Indicate the X-coordinate of the window relative to the primary display, measured in px. + * This parameter only accepts integer values; any floating-point input will be rounded down. + * @param { number } y - Indicate the Y-coordinate of the window relative to the primary display, measured in px. + * This parameter only accepts integer values; any floating-point input will be rounded down. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -7706,7 +7709,7 @@ declare namespace window { off(type: 'windowStatusChange', callback?: Callback): void; /** - * Register the callback of windowStatusDidChange + * Register the callback of windowStatusDidChange. window rect update completed * * @param { 'windowStatusDidChange' } type - The value is fixed at 'windowStatusDidChange', indicating the window status change event. * @param { Callback } callback - Callback used to return the window status. @@ -7718,7 +7721,7 @@ declare namespace window { on(type: 'windowStatusDidChange', callback: Callback): void; /** - * Unregister the callback of windowStatusDidChange + * Unregister the callback of windowStatusDidChange. window rect update completed * * @param { 'windowStatusDidChange' } type - The value is fixed at 'windowStatusDidChange', indicating the window status change event. * @param { Callback } [callback] - Callback used to return the window status. @@ -10592,7 +10595,7 @@ declare namespace window { * Register the callback of rectChangeInGlobalDisplay * * @param { 'rectChangeInGlobalDisplay' } type - The value is fixed at 'rectChangeInGlobalDisplay', indicating the window gloabl rect change event. - * @param { Callback } callback - Callback used to return the RectChangeOptions. + * @param { Callback } callback - Callback used to return the RectChangeOptions.Rect position based on the global coordinates. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -10605,7 +10608,7 @@ declare namespace window { * Unregister the callback of rectChangeInGlobalDisplay * * @param { 'rectChangeInGlobalDisplay' } type - The value is fixed at 'rectChangeInGlobalDisplay', indicating the window global rect change event. - * @param { Callback } [callback] - Callback used to return the RectChangeOptions. + * @param { Callback } [callback] - Callback used to return the RectChangeOptions.Rect position based on the global coordinates. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -10620,7 +10623,8 @@ declare namespace window { * @param { number } winX - Indicate the X-coordinate of the component relative to the current window. * @param { number } winY - Indicate the Y-coordinate of the component relative to the current window. * @returns { Position } The pair {x, y} represents respectively the X-coordinate - * and Y-coordinate of the window relative to the main screen. + * and Y-coordinate of the window relative to the primary display. measured in px. + * This parameter only accepts integer values; any floating-point input will be rounded down. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. @@ -10633,10 +10637,11 @@ declare namespace window { /** * Convert the global coordinates to the window coordinates. * - * @param { number } globalDisplayX - Indicate the X-coordinate of the component relative to the main screen. - * @param { number } globalDisplayY - Indicate the Y-coordinate of the component relative to the main screen. + * @param { number } globalDisplayX - Indicate the X-coordinate of the component relative to the primary display. + * @param { number } globalDisplayY - Indicate the Y-coordinate of the component relative to the primary display. * @returns { Position } The pair {x, y} represents respectively the X-coordinate - * and Y-coordinate of the window relative to the current screen. + * and Y-coordinate of the window relative to the current screen. measured in px. + * This parameter only accepts integer values; any floating-point input will be rounded down. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.