From c0abc89f8ccc9631ec6642438470cbd42acd7d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Wed, 12 Mar 2025 05:19:53 +0000 Subject: [PATCH 1/4] =?UTF-8?q?update=20api/@ohos.PiPWindow.d.ts.=20?= =?UTF-8?q?=E7=94=BB=E4=B8=AD=E7=94=BB=E6=96=B0=E5=A2=9E=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9B=91=E5=90=AC=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=9B=E5=BB=BA=E7=94=BB=E4=B8=AD=E7=94=BB?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E5=8F=82=E6=95=B0=E6=94=AF=E6=8C=81=E7=94=BB?= =?UTF-8?q?=E4=B8=AD=E7=94=BB=E8=87=AA=E5=8A=A8=E5=90=B8=E9=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘阳 --- api/@ohos.PiPWindow.d.ts | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/api/@ohos.PiPWindow.d.ts b/api/@ohos.PiPWindow.d.ts index 81ebbcadcb..1fed28a7ae 100644 --- a/api/@ohos.PiPWindow.d.ts +++ b/api/@ohos.PiPWindow.d.ts @@ -243,6 +243,16 @@ declare namespace PiPWindow { * @since 12 */ customUIController?: NodeController; + + /** + * Describes the default position of the picture-in-picture in four corners or last position. + * + * @type { ?boolean } + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 18 + */ + autoAvoidance?: boolean; } /** @@ -1195,6 +1205,40 @@ declare namespace PiPWindow { * @test */ isPiPSupported(): boolean; + + /** + * Register picture-in-picture window active status change event listener + * + * @param { 'pipActiveStatusChange' } type - The value is fixed at 'pipActiveStatusChange', indicating the picture-in-picture + * window active status change event. + * @param { Callback } callback - Callback used to return the picture-in-picture window active status. + * @throws { BusinessError } 401 - Params error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * 3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1300014 - PiP internal error. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 18 + */ + on(type: 'pipActiveStatusChange', callback: Callback): void; + + /** + * Unregister picture-in-picture window active status change event listener + * + * @param { 'pipActiveStatusChange' } type - The value is fixed at 'pipActiveStatusChange', indicating the picture-in-picture + * window active status change event. + * @param { Callback } callback - Callback used to return the picture-in-picture window active status. + * @throws { BusinessError } 401 - Params error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * 3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1300014 - PiP internal error. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 18 + */ + off(type: 'pipActiveStatusChange', callback: Callback): void; } } -- Gitee From 3e7c5fb72df9966f50bcb5f64aede64bf1f5776f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Sun, 23 Mar 2025 06:22:55 +0000 Subject: [PATCH 2/4] update api/@ohos.PiPWindow.d.ts. fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘阳 --- api/@ohos.PiPWindow.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/@ohos.PiPWindow.d.ts b/api/@ohos.PiPWindow.d.ts index 1fed28a7ae..34f214df6f 100644 --- a/api/@ohos.PiPWindow.d.ts +++ b/api/@ohos.PiPWindow.d.ts @@ -250,7 +250,7 @@ declare namespace PiPWindow { * @type { ?boolean } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 18 + * @since 20 */ autoAvoidance?: boolean; } @@ -1215,7 +1215,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 401 - Params error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. * 3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 801 - Capability not supported. + * function ${on('pipActiveStatusChange', callback)} can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -1232,7 +1233,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 401 - Params error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. * 3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 801 - Capability not supported. + * function ${off('pipActiveStatusChange', callback)} can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice -- Gitee From d2aeba6c5906263867b6ca7e48d8bbb5de637c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Sun, 23 Mar 2025 06:25:19 +0000 Subject: [PATCH 3/4] update api/@ohos.PiPWindow.d.ts. fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘阳 --- api/@ohos.PiPWindow.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.PiPWindow.d.ts b/api/@ohos.PiPWindow.d.ts index 34f214df6f..7c593eccea 100644 --- a/api/@ohos.PiPWindow.d.ts +++ b/api/@ohos.PiPWindow.d.ts @@ -1220,7 +1220,7 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 18 + * @since 20 */ on(type: 'pipActiveStatusChange', callback: Callback): void; @@ -1238,7 +1238,7 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 18 + * @since 20 */ off(type: 'pipActiveStatusChange', callback: Callback): void; } -- Gitee From 4d37a9be9633cbaa4aca60053f818ce6ef6cbcdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Tue, 25 Mar 2025 15:25:24 +0000 Subject: [PATCH 4/4] update api/@ohos.PiPWindow.d.ts. fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘阳 --- api/@ohos.PiPWindow.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.PiPWindow.d.ts b/api/@ohos.PiPWindow.d.ts index 7c593eccea..338f71f3f2 100644 --- a/api/@ohos.PiPWindow.d.ts +++ b/api/@ohos.PiPWindow.d.ts @@ -1216,7 +1216,7 @@ declare namespace PiPWindow { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. - * function ${on('pipActiveStatusChange', callback)} can not work correctly due to limited device capabilities. + * function on('pipActiveStatusChange', callback) can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice @@ -1234,7 +1234,7 @@ declare namespace PiPWindow { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. - * function ${off('pipActiveStatusChange', callback)} can not work correctly due to limited device capabilities. + * function off('pipActiveStatusChange', callback) can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice -- Gitee