161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit InputKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { Callback } from './@ohos.base';
2261847f8eSopenharmony_ciimport { MouseEvent } from './@ohos.multimodalInput.mouseEvent';
2361847f8eSopenharmony_ciimport type display from './@ohos.display';
2461847f8eSopenharmony_ciimport type { TouchEvent } from './@ohos.multimodalInput.touchEvent';
2561847f8eSopenharmony_ciimport type { Rotate, Pinch, ThreeFingersSwipe, FourFingersSwipe, SwipeInward } from './@ohos.multimodalInput.gestureEvent';
2661847f8eSopenharmony_ciimport type { ThreeFingersTap, TouchGestureEvent } from './@ohos.multimodalInput.gestureEvent';
2761847f8eSopenharmony_ciimport type { FingerprintEvent } from './@ohos.multimodalInput.shortKey';
2861847f8eSopenharmony_ci
2961847f8eSopenharmony_ci/**
3061847f8eSopenharmony_ci * Global input event listener
3161847f8eSopenharmony_ci * System API, available only to system processes
3261847f8eSopenharmony_ci *
3361847f8eSopenharmony_ci * @namespace inputMonitor
3461847f8eSopenharmony_ci * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
3561847f8eSopenharmony_ci * @systemapi hide for inner use
3661847f8eSopenharmony_ci * @since 7
3761847f8eSopenharmony_ci */
3861847f8eSopenharmony_cideclare namespace inputMonitor {
3961847f8eSopenharmony_ci  /**
4061847f8eSopenharmony_ci   * Callback used to receive touch input events. If **true** is returned, the touch input is consumed,
4161847f8eSopenharmony_ci   * and the system performs the closing operation.
4261847f8eSopenharmony_ci   *
4361847f8eSopenharmony_ci   * @interface TouchEventReceiver
4461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
4561847f8eSopenharmony_ci   * @systemapi hide for inner use
4661847f8eSopenharmony_ci   * @since 7
4761847f8eSopenharmony_ci   */
4861847f8eSopenharmony_ci  interface TouchEventReceiver {
4961847f8eSopenharmony_ci    /**
5061847f8eSopenharmony_ci     * Callback used to receive touch input events.
5161847f8eSopenharmony_ci     *
5261847f8eSopenharmony_ci     * @param { TouchEvent } touchEvent - the reported touch event.
5361847f8eSopenharmony_ci     * @returns { Boolean } Returns true indicates the touch input is consumed, the value false indicates opposite.
5461847f8eSopenharmony_ci     * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
5561847f8eSopenharmony_ci     * @systemapi hide for inner use
5661847f8eSopenharmony_ci     * @since 7
5761847f8eSopenharmony_ci     */
5861847f8eSopenharmony_ci    (touchEvent: TouchEvent): Boolean;
5961847f8eSopenharmony_ci  }
6061847f8eSopenharmony_ci
6161847f8eSopenharmony_ci  /**
6261847f8eSopenharmony_ci   * Listens for touch input events.
6361847f8eSopenharmony_ci   *
6461847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
6561847f8eSopenharmony_ci   * @param { 'touch' } type - Event type, which is **touch**.
6661847f8eSopenharmony_ci   * @param { TouchEventReceiver } receiver - Callback used to receive the reported data.
6761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
6861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
6961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7061847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
7161847f8eSopenharmony_ci   * @systemapi hide for inner use
7261847f8eSopenharmony_ci   * @since 7
7361847f8eSopenharmony_ci   */
7461847f8eSopenharmony_ci  /**
7561847f8eSopenharmony_ci   * Listens for touch input events.
7661847f8eSopenharmony_ci   *
7761847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
7861847f8eSopenharmony_ci   * @param { 'touch' } type - Event type, which is **touch**.
7961847f8eSopenharmony_ci   * @param { TouchEventReceiver } receiver - Callback used to receive the reported data.
8061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
8161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
8261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
8561847f8eSopenharmony_ci   * @systemapi hide for inner use
8661847f8eSopenharmony_ci   * @since 12
8761847f8eSopenharmony_ci   */
8861847f8eSopenharmony_ci  function on(type: 'touch', receiver: TouchEventReceiver): void;
8961847f8eSopenharmony_ci
9061847f8eSopenharmony_ci  /**
9161847f8eSopenharmony_ci   * Listens for mouse input events.
9261847f8eSopenharmony_ci   *
9361847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
9461847f8eSopenharmony_ci   * @param { 'mouse' } type - Event type, which is **mouse**.
9561847f8eSopenharmony_ci   * @param { Callback<MouseEvent> } receiver - Callback used to receive the reported data.
9661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
9761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9961847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
10061847f8eSopenharmony_ci   * @systemapi hide for inner use
10161847f8eSopenharmony_ci   * @since 9
10261847f8eSopenharmony_ci   */
10361847f8eSopenharmony_ci  /**
10461847f8eSopenharmony_ci   * Listens for mouse input events.
10561847f8eSopenharmony_ci   *
10661847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
10761847f8eSopenharmony_ci   * @param { 'mouse' } type - Event type, which is **mouse**.
10861847f8eSopenharmony_ci   * @param { Callback<MouseEvent> } receiver - Callback used to receive the reported data.
10961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
11061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
11161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
11261847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
11361847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
11461847f8eSopenharmony_ci   * @systemapi hide for inner use
11561847f8eSopenharmony_ci   * @since 12
11661847f8eSopenharmony_ci   */
11761847f8eSopenharmony_ci  function on(type: 'mouse', receiver: Callback<MouseEvent>): void;
11861847f8eSopenharmony_ci
11961847f8eSopenharmony_ci  /**
12061847f8eSopenharmony_ci   * Listens for mouse input events when the mouse arrow is within the specified rectangular area.
12161847f8eSopenharmony_ci   *
12261847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
12361847f8eSopenharmony_ci   * @param { 'mouse' } type - Event type, which is **mouse**.
12461847f8eSopenharmony_ci   * @param { display.Rect[] } rect - A specified rectangular area that can trigger a callback, with a maximum of two.
12561847f8eSopenharmony_ci   * @param { Callback<MouseEvent> } receiver - Callback used to receive the reported data.
12661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
12761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
12861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
12961847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
13061847f8eSopenharmony_ci   * @systemapi hide for inner use
13161847f8eSopenharmony_ci   * @since 11
13261847f8eSopenharmony_ci   */
13361847f8eSopenharmony_ci  /**
13461847f8eSopenharmony_ci   * Listens for mouse input events when the mouse arrow is within the specified rectangular area.
13561847f8eSopenharmony_ci   *
13661847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
13761847f8eSopenharmony_ci   * @param { 'mouse' } type - Event type, which is **mouse**.
13861847f8eSopenharmony_ci   * @param { display.Rect[] } rect - A specified rectangular area that can trigger a callback, with a maximum of two.
13961847f8eSopenharmony_ci   * @param { Callback<MouseEvent> } receiver - Callback used to receive the reported data.
14061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
14161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
14261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
14361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
14461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
14561847f8eSopenharmony_ci   * @systemapi hide for inner use
14661847f8eSopenharmony_ci   * @since 12
14761847f8eSopenharmony_ci   */
14861847f8eSopenharmony_ci  function on(type: 'mouse', rect: display.Rect[], receiver: Callback<MouseEvent>): void;
14961847f8eSopenharmony_ci
15061847f8eSopenharmony_ci  /**
15161847f8eSopenharmony_ci   * Cancel listening for touch input events.
15261847f8eSopenharmony_ci   *
15361847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
15461847f8eSopenharmony_ci   * @param { 'touch' } type - Event type, which is **touch**.
15561847f8eSopenharmony_ci   * @param { TouchEventReceiver } receiver - Callback used to receive the reported data.
15661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
15761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
15861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
15961847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
16061847f8eSopenharmony_ci   * @systemapi hide for inner use
16161847f8eSopenharmony_ci   * @since 7
16261847f8eSopenharmony_ci   */
16361847f8eSopenharmony_ci  /**
16461847f8eSopenharmony_ci   * Cancel listening for touch input events.
16561847f8eSopenharmony_ci   *
16661847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
16761847f8eSopenharmony_ci   * @param { 'touch' } type - Event type, which is **touch**.
16861847f8eSopenharmony_ci   * @param { TouchEventReceiver } receiver - Callback used to receive the reported data.
16961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
17061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
17161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
17261847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
17361847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
17461847f8eSopenharmony_ci   * @systemapi hide for inner use
17561847f8eSopenharmony_ci   * @since 12
17661847f8eSopenharmony_ci   */
17761847f8eSopenharmony_ci  function off(type: 'touch', receiver?: TouchEventReceiver): void;
17861847f8eSopenharmony_ci
17961847f8eSopenharmony_ci  /**
18061847f8eSopenharmony_ci   * Cancel listening for mouse input events.
18161847f8eSopenharmony_ci   *
18261847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
18361847f8eSopenharmony_ci   * @param { 'mouse' } type - Event type, which is **mouse**.
18461847f8eSopenharmony_ci   * @param { Callback<MouseEvent> } receiver - Callback used to receive the reported data.
18561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
18661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
18761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
18861847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
18961847f8eSopenharmony_ci   * @systemapi hide for inner use
19061847f8eSopenharmony_ci   * @since 9
19161847f8eSopenharmony_ci   */
19261847f8eSopenharmony_ci  /**
19361847f8eSopenharmony_ci   * Cancel listening for mouse input events.
19461847f8eSopenharmony_ci   *
19561847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
19661847f8eSopenharmony_ci   * @param { 'mouse' } type - Event type, which is **mouse**.
19761847f8eSopenharmony_ci   * @param { Callback<MouseEvent> } receiver - Callback used to receive the reported data.
19861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
19961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
20061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
20161847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
20261847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
20361847f8eSopenharmony_ci   * @systemapi hide for inner use
20461847f8eSopenharmony_ci   * @since 12
20561847f8eSopenharmony_ci   */
20661847f8eSopenharmony_ci  function off(type: 'mouse', receiver?: Callback<MouseEvent>): void;
20761847f8eSopenharmony_ci
20861847f8eSopenharmony_ci  /**
20961847f8eSopenharmony_ci   * Listens for touchPad pinch events.
21061847f8eSopenharmony_ci   *
21161847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
21261847f8eSopenharmony_ci   * @param { 'pinch' } type - Event type, which is **pinch**.
21361847f8eSopenharmony_ci   * @param { Callback<Pinch> } receiver - Callback used to receive the reported data.
21461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
21561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
21661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
21761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
21861847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
21961847f8eSopenharmony_ci   * @systemapi hide for inner use
22061847f8eSopenharmony_ci   * @since 10
22161847f8eSopenharmony_ci   */
22261847f8eSopenharmony_ci  function on(type: 'pinch', receiver: Callback<Pinch>): void;
22361847f8eSopenharmony_ci
22461847f8eSopenharmony_ci  /**
22561847f8eSopenharmony_ci   * Cancel listening for touchPad pinch events.
22661847f8eSopenharmony_ci   *
22761847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
22861847f8eSopenharmony_ci   * @param { 'pinch' } type - Event type, which is **pinch**.
22961847f8eSopenharmony_ci   * @param { Callback<Pinch> } receiver - Callback used to receive the reported data.
23061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
23161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
23261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
23361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
23461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
23561847f8eSopenharmony_ci   * @systemapi hide for inner use
23661847f8eSopenharmony_ci   * @since 10
23761847f8eSopenharmony_ci   */
23861847f8eSopenharmony_ci  function off(type: 'pinch', receiver?: Callback<Pinch>): void;
23961847f8eSopenharmony_ci
24061847f8eSopenharmony_ci  /**
24161847f8eSopenharmony_ci   * Listens for touchPad fingers pinch events.
24261847f8eSopenharmony_ci   *
24361847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
24461847f8eSopenharmony_ci   * @param { 'pinch' } type - Event type, which is **pinch**.
24561847f8eSopenharmony_ci   * @param { number } fingers - the number of fingers.
24661847f8eSopenharmony_ci   * @param { Callback<Pinch> } receiver - Callback used to receive the reported data.
24761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
24861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
24961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
25061847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
25161847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
25261847f8eSopenharmony_ci   * @systemapi hide for inner use
25361847f8eSopenharmony_ci   * @since 11
25461847f8eSopenharmony_ci   */
25561847f8eSopenharmony_ci  function on(type: 'pinch', fingers: number, receiver: Callback<Pinch>): void;
25661847f8eSopenharmony_ci
25761847f8eSopenharmony_ci  /**
25861847f8eSopenharmony_ci   * Cancel listening for touchPad fingers pinch events.
25961847f8eSopenharmony_ci   *
26061847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
26161847f8eSopenharmony_ci   * @param { 'pinch' } type - Event type, which is **pinch**.
26261847f8eSopenharmony_ci   * @param { number } fingers - the number of fingers.
26361847f8eSopenharmony_ci   * @param { Callback<Pinch> } receiver - Callback used to receive the reported data.
26461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
26561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
26661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
26761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
26861847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
26961847f8eSopenharmony_ci   * @systemapi hide for inner use
27061847f8eSopenharmony_ci   * @since 11
27161847f8eSopenharmony_ci   */
27261847f8eSopenharmony_ci  function off(type: 'pinch', fingers: number, receiver?: Callback<Pinch>): void;
27361847f8eSopenharmony_ci
27461847f8eSopenharmony_ci  /**
27561847f8eSopenharmony_ci   * Listens for touchPad fingers rotate events.
27661847f8eSopenharmony_ci   *
27761847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
27861847f8eSopenharmony_ci   * @param { 'rotate' } type - Event type, which is **rotate**.
27961847f8eSopenharmony_ci   * @param { number } fingers - the number of fingers.
28061847f8eSopenharmony_ci   * @param { Callback<Rotate> } receiver - Callback used to receive the reported data.
28161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
28261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
28361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
28461847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
28561847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
28661847f8eSopenharmony_ci   * @systemapi hide for inner use
28761847f8eSopenharmony_ci   * @since 11
28861847f8eSopenharmony_ci   */
28961847f8eSopenharmony_ci  function on(type: 'rotate', fingers: number, receiver: Callback<Rotate>): void;
29061847f8eSopenharmony_ci
29161847f8eSopenharmony_ci  /**
29261847f8eSopenharmony_ci   * Cancel listening for touchPad fingers rotate events.
29361847f8eSopenharmony_ci   *
29461847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
29561847f8eSopenharmony_ci   * @param { 'rotate' } type - Event type, which is **rotate**.
29661847f8eSopenharmony_ci   * @param { number } fingers - the number of fingers.
29761847f8eSopenharmony_ci   * @param { Callback<Rotate> } receiver - Callback used to receive the reported data.
29861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
29961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
30061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
30161847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
30261847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
30361847f8eSopenharmony_ci   * @systemapi hide for inner use
30461847f8eSopenharmony_ci   * @since 11
30561847f8eSopenharmony_ci   */
30661847f8eSopenharmony_ci  function off(type: 'rotate', fingers: number, receiver?: Callback<Rotate>): void;
30761847f8eSopenharmony_ci
30861847f8eSopenharmony_ci  /**
30961847f8eSopenharmony_ci   * Listens for touchPad three fingers swipe events.
31061847f8eSopenharmony_ci   *
31161847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
31261847f8eSopenharmony_ci   * @param { 'threeFingersSwipe' } type - Event type, which is **threeFingersSwipe**.
31361847f8eSopenharmony_ci   * @param { Callback<ThreeFingersSwipe> } receiver - Callback used to receive the reported data.
31461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
31561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
31661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
31761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
31861847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
31961847f8eSopenharmony_ci   * @systemapi hide for inner use
32061847f8eSopenharmony_ci   * @since 10
32161847f8eSopenharmony_ci   */
32261847f8eSopenharmony_ci  function on(type: 'threeFingersSwipe', receiver: Callback<ThreeFingersSwipe>): void;
32361847f8eSopenharmony_ci
32461847f8eSopenharmony_ci  /**
32561847f8eSopenharmony_ci   * Cancel listening touchPad three fingers swipe events.
32661847f8eSopenharmony_ci   *
32761847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
32861847f8eSopenharmony_ci   * @param { 'threeFingersSwipe' } type - Event type, which is **threeFingersSwipe**.
32961847f8eSopenharmony_ci   * @param { Callback<ThreeFingersSwipe> } receiver - Callback used to receive the reported data.
33061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
33161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
33261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
33361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
33461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
33561847f8eSopenharmony_ci   * @systemapi hide for inner use
33661847f8eSopenharmony_ci   * @since 10
33761847f8eSopenharmony_ci   */
33861847f8eSopenharmony_ci  function off(type: 'threeFingersSwipe', receiver?: Callback<ThreeFingersSwipe>): void;
33961847f8eSopenharmony_ci
34061847f8eSopenharmony_ci  /**
34161847f8eSopenharmony_ci   * Listens for touchPad four fingers swipe events.
34261847f8eSopenharmony_ci   *
34361847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
34461847f8eSopenharmony_ci   * @param { 'fourFingersSwipe' } type - Event type, which is **fourFingersSwipe**..
34561847f8eSopenharmony_ci   * @param { Callback<FourFingersSwipe> } receiver - Callback used to receive the reported data.
34661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
34761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
34861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
34961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
35061847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
35161847f8eSopenharmony_ci   * @systemapi hide for inner use
35261847f8eSopenharmony_ci   * @since 10
35361847f8eSopenharmony_ci   */
35461847f8eSopenharmony_ci  function on(type: 'fourFingersSwipe', receiver: Callback<FourFingersSwipe>): void;
35561847f8eSopenharmony_ci
35661847f8eSopenharmony_ci  /**
35761847f8eSopenharmony_ci   * Cancel listening touchPad four finger swipe events.
35861847f8eSopenharmony_ci   *
35961847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
36061847f8eSopenharmony_ci   * @param { 'fourFingersSwipe' } type - Event type, which is **fourFingersSwipe**.
36161847f8eSopenharmony_ci   * @param { Callback<FourFingersSwipe> } receiver - Callback used to receive the reported data.
36261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
36361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
36461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
36561847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
36661847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
36761847f8eSopenharmony_ci   * @systemapi hide for inner use
36861847f8eSopenharmony_ci   * @since 10
36961847f8eSopenharmony_ci   */
37061847f8eSopenharmony_ci  function off(type: 'fourFingersSwipe', receiver?: Callback<FourFingersSwipe>): void;
37161847f8eSopenharmony_ci
37261847f8eSopenharmony_ci  /**
37361847f8eSopenharmony_ci   * Listens for touchPad three fingers tap events.
37461847f8eSopenharmony_ci   *
37561847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
37661847f8eSopenharmony_ci   * @param { 'threeFingersTap' } type - Event type, which is **threeFingersTap**.
37761847f8eSopenharmony_ci   * @param { Callback<ThreeFingersTap> } receiver - Callback used to receive the reported data.
37861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
37961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
38061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
38161847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
38261847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
38361847f8eSopenharmony_ci   * @systemapi hide for inner use
38461847f8eSopenharmony_ci   * @since 11
38561847f8eSopenharmony_ci   */
38661847f8eSopenharmony_ci  function on(type: 'threeFingersTap', receiver: Callback<ThreeFingersTap>): void;
38761847f8eSopenharmony_ci
38861847f8eSopenharmony_ci  /**
38961847f8eSopenharmony_ci   * Cancel listening touchPad three fingers tap events.
39061847f8eSopenharmony_ci   *
39161847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
39261847f8eSopenharmony_ci   * @param { 'threeFingersTap' } type - Event type, which is **threeFingersTap**.
39361847f8eSopenharmony_ci   * @param { Callback<ThreeFingersTap> } receiver - Callback used to receive the reported data.
39461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
39561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
39661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
39761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
39861847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
39961847f8eSopenharmony_ci   * @systemapi hide for inner use
40061847f8eSopenharmony_ci   * @since 11
40161847f8eSopenharmony_ci   */
40261847f8eSopenharmony_ci  function off(type: 'threeFingersTap', receiver?: Callback<ThreeFingersTap>): void;
40361847f8eSopenharmony_ci
40461847f8eSopenharmony_ci  /**
40561847f8eSopenharmony_ci   * Enables listening for fingerprint key events.
40661847f8eSopenharmony_ci   *
40761847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
40861847f8eSopenharmony_ci   * @param { 'fingerprint' } type - Event type, which is **fingerprint**.
40961847f8eSopenharmony_ci   * @param { Callback<FingerprintEvent> } receiver - Callback used to receive the reported data.
41061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
41161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
41261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
41361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
41461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
41561847f8eSopenharmony_ci   * @systemapi hide for inner use
41661847f8eSopenharmony_ci   * @since 12
41761847f8eSopenharmony_ci   */
41861847f8eSopenharmony_ci  function on(type: 'fingerprint', receiver: Callback<FingerprintEvent>): void;
41961847f8eSopenharmony_ci
42061847f8eSopenharmony_ci  /**
42161847f8eSopenharmony_ci   * Cancels listening for fingerprint key events.
42261847f8eSopenharmony_ci   *
42361847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
42461847f8eSopenharmony_ci   * @param { 'fingerprint' } type - Event type, which is **fingerprint**.
42561847f8eSopenharmony_ci   * @param { Callback<FingerprintEvent> } receiver - Callback used to receive the reported data.
42661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
42761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
42861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
42961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
43061847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
43161847f8eSopenharmony_ci   * @systemapi hide for inner use
43261847f8eSopenharmony_ci   * @since 12
43361847f8eSopenharmony_ci   */
43461847f8eSopenharmony_ci  function off(type: 'fingerprint', receiver?: Callback<FingerprintEvent>): void;
43561847f8eSopenharmony_ci
43661847f8eSopenharmony_ci  /**
43761847f8eSopenharmony_ci   * Enables listening touchPad swipe inward events.
43861847f8eSopenharmony_ci   *
43961847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
44061847f8eSopenharmony_ci   * @param { 'swipeInward' } type - Event type, which is **swipeInward**.
44161847f8eSopenharmony_ci   * @param { Callback<SwipeInward> } receiver - Callback used to receive the reported data.
44261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
44361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
44461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error.
44561847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
44661847f8eSopenharmony_ci   * @systemapi hide for inner use
44761847f8eSopenharmony_ci   * @since 12
44861847f8eSopenharmony_ci   */
44961847f8eSopenharmony_ci  function on(type: 'swipeInward', receiver: Callback<SwipeInward>): void;
45061847f8eSopenharmony_ci
45161847f8eSopenharmony_ci  /**
45261847f8eSopenharmony_ci   * Cancel listening touchPad swipe inward events.
45361847f8eSopenharmony_ci   *
45461847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
45561847f8eSopenharmony_ci   * @param { 'swipeInward' } type - Event type, which is **swipeInward**.
45661847f8eSopenharmony_ci   * @param { Callback<SwipeInward> } receiver - Callback used to receive the reported data.
45761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
45861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - SystemAPI permit error.
45961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error.
46061847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
46161847f8eSopenharmony_ci   * @systemapi hide for inner use
46261847f8eSopenharmony_ci   * @since 12
46361847f8eSopenharmony_ci   */
46461847f8eSopenharmony_ci  function off(type: 'swipeInward', receiver?: Callback<SwipeInward>): void;
46561847f8eSopenharmony_ci
46661847f8eSopenharmony_ci  /**
46761847f8eSopenharmony_ci   * Enables listening touchscreen swipe gesture events.
46861847f8eSopenharmony_ci   *
46961847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
47061847f8eSopenharmony_ci   * @param { 'touchscreenSwipe' } type - Touchscreen gesture type.
47161847f8eSopenharmony_ci   * @param { number } fingers - Number of fingers.
47261847f8eSopenharmony_ci   * @param { Callback<TouchGestureEvent> } receiver - Callback used to receive reported data.
47361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
47461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Caller is not a system application.
47561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
47661847f8eSopenharmony_ci   *                                 1.Mandatory parameters are left unspecified;
47761847f8eSopenharmony_ci   *                                 2.Incorrect parameter types.
47861847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
47961847f8eSopenharmony_ci   * @systemapi hide for inner use
48061847f8eSopenharmony_ci   * @since 13
48161847f8eSopenharmony_ci   */
48261847f8eSopenharmony_ci  function on(type: 'touchscreenSwipe', fingers: number, receiver: Callback<TouchGestureEvent>): void;
48361847f8eSopenharmony_ci
48461847f8eSopenharmony_ci  /**
48561847f8eSopenharmony_ci   * Disables listening touchscreen swipe gesture events.
48661847f8eSopenharmony_ci   *
48761847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
48861847f8eSopenharmony_ci   * @param { 'touchscreenSwipe' } type - Touchscreen gesture type.
48961847f8eSopenharmony_ci   * @param { number } fingers - Number of fingers.
49061847f8eSopenharmony_ci   * @param { Callback<TouchGestureEvent> } receiver - Callback used to receive reported data.
49161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
49261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Caller is not a system application.
49361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
49461847f8eSopenharmony_ci   *                                 1.Mandatory parameters are left unspecified;
49561847f8eSopenharmony_ci   *                                 2.Incorrect parameter types.
49661847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
49761847f8eSopenharmony_ci   * @systemapi hide for inner use
49861847f8eSopenharmony_ci   * @since 13
49961847f8eSopenharmony_ci   */
50061847f8eSopenharmony_ci  function off(type: 'touchscreenSwipe', fingers: number, receiver?: Callback<TouchGestureEvent>): void;
50161847f8eSopenharmony_ci
50261847f8eSopenharmony_ci  /**
50361847f8eSopenharmony_ci   * Enables listening touchscreen pinch gesture events.
50461847f8eSopenharmony_ci   *
50561847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
50661847f8eSopenharmony_ci   * @param { 'touchscreenPinch' } type - Touch screen gesture type.
50761847f8eSopenharmony_ci   * @param { number } fingers - Number of fingers.
50861847f8eSopenharmony_ci   * @param { Callback<TouchGestureEvent> } receiver - Callback used to receive reported data.
50961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
51061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Caller is not a system application.
51161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
51261847f8eSopenharmony_ci   *                                 1.Mandatory parameters are left unspecified;
51361847f8eSopenharmony_ci   *                                 2.Incorrect parameter types.
51461847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
51561847f8eSopenharmony_ci   * @systemapi hide for inner use
51661847f8eSopenharmony_ci   * @since 13
51761847f8eSopenharmony_ci   */
51861847f8eSopenharmony_ci  function on(type: 'touchscreenPinch', fingers: number, receiver: Callback<TouchGestureEvent>): void;
51961847f8eSopenharmony_ci
52061847f8eSopenharmony_ci  /**
52161847f8eSopenharmony_ci   * Disables listening touchscreen pinch gesture events.
52261847f8eSopenharmony_ci   *
52361847f8eSopenharmony_ci   * @permission ohos.permission.INPUT_MONITORING
52461847f8eSopenharmony_ci   * @param { 'touchscreenPinch' } type - Touchscreen gesture type.
52561847f8eSopenharmony_ci   * @param { number } fingers - Number of fingers.
52661847f8eSopenharmony_ci   * @param { Callback<TouchGestureEvent> } receiver - Callback used to receive reported data.
52761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
52861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Caller is not a system application.
52961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
53061847f8eSopenharmony_ci   *                                 1.Mandatory parameters are left unspecified;
53161847f8eSopenharmony_ci   *                                 2.Incorrect parameter types.
53261847f8eSopenharmony_ci   * @syscap SystemCapability.MultimodalInput.Input.InputMonitor
53361847f8eSopenharmony_ci   * @systemapi hide for inner use
53461847f8eSopenharmony_ci   * @since 13
53561847f8eSopenharmony_ci   */
53661847f8eSopenharmony_ci  function off(type: 'touchscreenPinch', fingers: number, receiver?: Callback<TouchGestureEvent>): void;
53761847f8eSopenharmony_ci}
53861847f8eSopenharmony_ciexport default inputMonitor;
539