From 30b02d489ca3c6ff05d64058f465ac7667f96cce Mon Sep 17 00:00:00 2001 From: lixia7819 Date: Thu, 17 Aug 2023 14:18:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=89=E5=85=A8=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E6=8E=A5=E5=8F=A3=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lixia7819 --- .../reference/apis/js-apis-window.md | 97 ------------------- 1 file changed, 97 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md index 1498279b1e..1b7d313b88 100644 --- a/en/application-dev/reference/apis/js-apis-window.md +++ b/en/application-dev/reference/apis/js-apis-window.md @@ -916,103 +916,6 @@ try { } ``` -## window.on('waterMarkFlagChange')10+ - -on(type: 'waterMarkFlagChange', callback: Callback<boolean>): void - -Subscribes to the watermark flag status change event. - -**System API**: This is a system API. - -**System capability**: SystemCapability.WindowManager.WindowManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | ---- | ----------------------------------------------------------------------------- | -| type | string | Yes | Event type. The value is fixed at **'waterMarkFlagChange'**, indicating the watermark flag status change event. | -| callback | Callback<boolean> | Yes | Callback used to return the watermark flag status. The value **true** means that the watermark is currently enabled, and **false** means that the watermark is changed to disabled.| - -**Error codes** - -For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md). - -| ID| Error Message| -| ------- | -------------------------------------------- | -| 1300003 | This window manager service works abnormally. | - -**Example** - -```js -try { - window.on('waterMarkFlagChange', (data) => { - console.info('Succeeded in enabling the listener for watermark flag status changes. Data: ' + JSON.stringify(data)); - }); -} catch (exception) { - console.error('Failed to enable the listener for watermark flag status changes. Cause: ' + JSON.stringify(exception)); -} -``` - -## window.off('waterMarkFlagChange')10+ - -off(type: 'waterMarkFlagChange', callback?: Callback<boolean>): void - -Unsubscribes from the watermark flag status change event. - -**System API**: This is a system API. - -**System capability**: SystemCapability.WindowManager.WindowManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | -- | ------------------------------------------------------------ | -| type | string | Yes| Event type. The value is fixed at **'waterMarkFlagChange'**, indicating the watermark flag status change event.| -| callback | Callback<boolean> | No| Callback function that has been used for registering the listener. If a value is passed in, the corresponding subscription is canceled. If no value is passed in, all subscriptions to the specified event are canceled.| - -**Error codes** - -For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md). - -| ID| Error Message| -| ------- | -------------------------------------------- | -| 1300003 | This window manager service works abnormally. | - -**Example** - -```js -try { - window.off('waterMarkFlagChange'); -} catch (exception) { - console.error('Failed to disable the listener for watermark flag status changes. Cause: ' + JSON.stringify(exception)); -} -``` - -## window.setGestureNavigationEnabled10+ -setGestureNavigationEnabled(enable: boolean, callback: AsyncCallback<void>): void - -Enables or disables gesture navigation. This API uses an asynchronous callback to return the result. - -**System API**: This is a system API. - -**System capability**: SystemCapability.WindowManager.WindowManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ------------------------- | ---- | -------------- | -| enable | boolean | Yes | Whether to enable gesture navigation. The value **true** means to enable gesture navigation, and **false** means the opposite.| -| callback | AsyncCallback<void> | Yes | Callback used to return the result.| - -**Error codes** - -For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md). - -| ID| Error Message| -| ------- | --------------------------------------------- | -| 1300002 | This window state is abnormal. | -| 1300003 | This window manager service works abnormally. | - **Example** ```js -- GitLab