From 97a1f1bb4b9f31e2ffe97e58662b5be7d20162f9 Mon Sep 17 00:00:00 2001 From: KangPeng Date: Thu, 11 Sep 2025 20:16:47 +0800 Subject: [PATCH 1/4] input artts static api Signed-off-by: KangPeng --- ...@ohos.multimodalInput.infraredEmitter.d.ts | 32 +- api/@ohos.multimodalInput.inputConsumer.d.ts | 3 + api/@ohos.multimodalInput.inputDevice.d.ts | 175 +++++----- ...ohos.multimodalInput.inputEventClient.d.ts | 14 +- api/@ohos.multimodalInput.inputMonitor.d.ts | 67 +++- api/@ohos.multimodalInput.pointer.d.ts | 329 +++++++++++------- api/@ohos.multimodalInput.shortKey.d.ts | 11 +- 7 files changed, 385 insertions(+), 246 deletions(-) diff --git a/api/@ohos.multimodalInput.infraredEmitter.d.ts b/api/@ohos.multimodalInput.infraredEmitter.d.ts index e8382b29f4..a2cae5513c 100644 --- a/api/@ohos.multimodalInput.infraredEmitter.d.ts +++ b/api/@ohos.multimodalInput.infraredEmitter.d.ts @@ -23,7 +23,8 @@ * * @namespace infraredEmitter * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 12 dynamiconly + * @since 12 dynamic + * @since 20 static */ declare namespace infraredEmitter { /** @@ -39,7 +40,8 @@ declare namespace infraredEmitter { * * @interface InfraredFrequency * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 dynamiconly + * @since 15 dynamic + * @since 20 static */ interface InfraredFrequency { /** @@ -53,11 +55,12 @@ declare namespace infraredEmitter { /** * Maximum frequency, in Hz. * - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 dynamiconly + * @since 15 dynamic + * @since 20 static */ - max: number; + max: long; /** * Minimum frequency, in Hz. @@ -70,11 +73,12 @@ declare namespace infraredEmitter { /** * Minimum frequency, in Hz. * - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 dynamiconly + * @since 15 dynamic + * @since 20 static */ - min: number; + min: long; } /** @@ -97,17 +101,18 @@ declare namespace infraredEmitter { * Generates IR signals at the specified frequency and level. * * @permission ohos.permission.MANAGE_INPUT_INFRARED_EMITTER - * @param { number} infraredFrequency - IR infrared frequency, in Hz. - * @param { Array} pattern - IR level signal, in μs. The value must be an even number within the value range of [0,1024]. + * @param { long } infraredFrequency - IR infrared frequency, in Hz. + * @param { Array} pattern - IR level signal, in μs. The value must be an even number within the value range of [0,1024]. * For example, in the IR level signal array [100,200,300,400], 100 μs is a high-level signal, * 200 μs is a low-level signal, 300 μs is a high-level signal, and 400 μs is a low-level signal. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 dynamiconly + * @since 15 dynamic + * @since 20 static */ - function transmitInfrared(infraredFrequency: number, pattern: Array): void; + function transmitInfrared(infraredFrequency: long, pattern: Array): void; /** * Queries the frequency range of IR signals supported by the mobile phone. @@ -127,7 +132,8 @@ declare namespace infraredEmitter { * @returns { Array } Frequency range, including multiple groups of maximum and minimum frequencies. * @throws { BusinessError } 201 - Permission denied. * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 dynamiconly + * @since 15 dynamic + * @since 20 static */ function getInfraredFrequencies(): Array; } diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 7e9ff893d0..3488da2398 100644 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -284,6 +284,7 @@ declare namespace inputConsumer { * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use. * @since 11 dynamic + * @since 20 static */ function setShieldStatus(shieldMode: ShieldMode, isShield: boolean): void; @@ -300,6 +301,7 @@ declare namespace inputConsumer { * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use. * @since 11 dynamic + * @since 20 static */ function getShieldStatus(shieldMode: ShieldMode): boolean; @@ -310,6 +312,7 @@ declare namespace inputConsumer { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @since 14 dynamic + * @since 20 static */ function getAllSystemHotkeys(): Promise>; diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index 689b7c3020..6fb15e02ed 100644 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -18,13 +18,10 @@ * @kit InputKit */ -/*** if arkts dynamic */ + import type { Callback, AsyncCallback } from './@ohos.base'; import type { KeyCode } from './@ohos.multimodalInput.keyCode'; -/*** endif */ -/*** if arkts static */ import { Callback, AsyncCallback } from './@ohos.base'; -/*** endif */ /** * The inputDevice module implements input device management functions such as listening for the connection @@ -32,7 +29,7 @@ import { Callback, AsyncCallback } from './@ohos.base'; * * @namespace inputDevice * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ declare namespace inputDevice { @@ -41,7 +38,7 @@ declare namespace inputDevice { * * @typedef { 'add' | 'remove' } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ type ChangedType = 'add' | 'remove'; @@ -51,7 +48,7 @@ declare namespace inputDevice { * * @typedef { 'keyboard' | 'mouse' | 'touchpad' | 'touchscreen' | 'joystick' | 'trackball' } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ type SourceType = 'keyboard' | 'mouse' | 'touchpad' | 'touchscreen' | 'joystick' | 'trackball'; @@ -61,7 +58,7 @@ declare namespace inputDevice { * * @typedef { 'touchmajor'| 'touchminor' | 'orientation' | 'x' | 'y' | 'pressure' | 'toolminor' | 'toolmajor' | 'null' } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ type AxisType = @@ -80,7 +77,7 @@ declare namespace inputDevice { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ enum KeyboardType { @@ -88,7 +85,7 @@ declare namespace inputDevice { * Keyboard without keys. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NONE = 0, @@ -97,7 +94,7 @@ declare namespace inputDevice { * Keyboard with unknown keys. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ UNKNOWN = 1, @@ -106,7 +103,7 @@ declare namespace inputDevice { * Full keyboard. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ ALPHABETIC_KEYBOARD = 2, @@ -115,7 +112,7 @@ declare namespace inputDevice { * Keypad. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ DIGITAL_KEYBOARD = 3, @@ -124,7 +121,7 @@ declare namespace inputDevice { * Stylus. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ HANDWRITING_PEN = 4, @@ -133,7 +130,7 @@ declare namespace inputDevice { * Remote control. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ REMOTE_CONTROL = 5 @@ -144,7 +141,7 @@ declare namespace inputDevice { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 15 dynamic + * @since 15 dynamic * @since 20 static */ enum FunctionKey { @@ -152,7 +149,7 @@ declare namespace inputDevice { * CapsLock key. This key can be enabled or disabled only for the input keyboard extension. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 15 dynamic + * @since 15 dynamic * @since 20 static */ CAPS_LOCK = 1 @@ -163,7 +160,7 @@ declare namespace inputDevice { * * @interface DeviceListener * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ interface DeviceListener { @@ -172,7 +169,7 @@ declare namespace inputDevice { * * @type { ChangedType } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ type: ChangedType; @@ -183,7 +180,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ deviceId: int; @@ -198,7 +195,7 @@ declare namespace inputDevice { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function on(type: 'change', listener: Callback): void; @@ -213,7 +210,7 @@ declare namespace inputDevice { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function off(type: 'change', listener?: Callback): void; @@ -223,7 +220,7 @@ declare namespace inputDevice { * * @interface AxisRange * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ interface AxisRange { @@ -232,7 +229,7 @@ declare namespace inputDevice { * * @type { SourceType } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ source: SourceType; @@ -242,7 +239,7 @@ declare namespace inputDevice { * * @type { AxisType } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ axis: AxisType; @@ -252,7 +249,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ max: int; @@ -262,7 +259,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ min: int; @@ -272,7 +269,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ fuzz: int; @@ -282,7 +279,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ flat: int; @@ -292,7 +289,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ resolution: int; @@ -303,7 +300,7 @@ declare namespace inputDevice { * * @interface InputDeviceData * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ interface InputDeviceData { @@ -313,7 +310,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ id: int; @@ -323,7 +320,7 @@ declare namespace inputDevice { * * @type { string } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ name: string; @@ -335,7 +332,7 @@ declare namespace inputDevice { * * @type { Array } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ sources: Array; @@ -345,7 +342,7 @@ declare namespace inputDevice { * * @type { Array } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 8 dynamic + * @since 8 dynamic * @since 20 static */ axisRanges: Array; @@ -355,7 +352,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ bus: int; @@ -365,7 +362,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ product: int; @@ -375,7 +372,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ vendor: int; @@ -385,7 +382,7 @@ declare namespace inputDevice { * * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ version: int; @@ -395,7 +392,7 @@ declare namespace inputDevice { * * @type { string } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ phys: string; @@ -405,7 +402,7 @@ declare namespace inputDevice { * * @type { string } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ uniq: string; @@ -469,7 +466,7 @@ declare namespace inputDevice { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function getDeviceList(callback: AsyncCallback>): void; @@ -480,7 +477,7 @@ declare namespace inputDevice { * * @returns { Promise> } - Promise used to return the IDs of all input devices. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function getDeviceList(): Promise>; @@ -495,7 +492,7 @@ declare namespace inputDevice { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function getDeviceInfo(deviceId: int, callback: AsyncCallback): void; @@ -509,7 +506,7 @@ declare namespace inputDevice { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function getDeviceInfo(deviceId: int): Promise; @@ -517,47 +514,50 @@ declare namespace inputDevice { /** * Obtains information about the specified input device. * - * @param { number } deviceId - ID of the input device. + * @param { int } deviceId - ID of the input device. * @returns { InputDeviceData } Information about the input device, including device ID, name, supported source, * physical address, version information, and product information. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 10 dynamic + * @since 20 static */ - function getDeviceInfoSync(deviceId: number): InputDeviceData; + function getDeviceInfoSync(deviceId: int): InputDeviceData; /** * Checks whether the input device supports the specified keys. * This API uses an asynchronous callback to return the result. * - * @param { number } deviceId - ID of the input device. The device ID changes if the same physical device is repeatedly removed and inserted. + * @param { int } deviceId - ID of the input device. The device ID changes if the same physical device is repeatedly removed and inserted. * @param { Array } keys - Keycodes to be queried. A maximum of five keycodes can be specified. * @param { AsyncCallback> } callback -Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 9 dynamic + * @since 20 static */ - function supportKeys(deviceId: number, keys: Array, callback: AsyncCallback>): void; + function supportKeys(deviceId: int, keys: Array, callback: AsyncCallback>): void; /** * Checks whether the input device supports the specified keys. This API uses a promise to return the result. * - * @param { number } deviceId - ID of the input device. The device ID changes if the same physical device is repeatedly removed and inserted. + * @param { int } deviceId - ID of the input device. The device ID changes if the same physical device is repeatedly removed and inserted. * @param { Array } keys - Keycodes to be queried. A maximum of five keycodes can be specified. * @returns { Promise> } Returns a result indicating whether the specified key codes are supported. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 9 dynamic + * @since 20 static */ - function supportKeys(deviceId: number, keys: Array): Promise>; + function supportKeys(deviceId: int, keys: Array): Promise>; /** * Checks whether the input device supports the specified keys. * - * @param { number } deviceId - ID of the input device. The device ID changes if the same physical device is repeatedly removed and inserted. + * @param { int } deviceId - ID of the input device. The device ID changes if the same physical device is repeatedly removed and inserted. * @param { Array } keys - Keycodes to be queried. A maximum of five keycodes can be specified. * @returns { Array } Result indicating whether the input device supports the keycode value. * The value true indicates yes, and the value false indicates no. @@ -565,53 +565,57 @@ declare namespace inputDevice { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 10 dynamic + * @since 20 static */ - function supportKeysSync(deviceId: number, keys: Array): Array; + function supportKeysSync(deviceId: int, keys: Array): Array; /** * Obtains the keyboard type of the input device, such as full keyboard and numeric keypad. * This API uses an asynchronous callback to return the result. * The keyboard type of the input device is subject to the result returned by the API. * - * @param { number } deviceId - Unique ID of the input device. If the same physical device is repeatedly reinstalled or restarted, its ID may change. + * @param { int } deviceId - Unique ID of the input device. If the same physical device is repeatedly reinstalled or restarted, its ID may change. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 9 dynamic + * @since 20 static */ - function getKeyboardType(deviceId: number, callback: AsyncCallback): void; + function getKeyboardType(deviceId: int, callback: AsyncCallback): void; /** * Obtains the keyboard type of an input device. * This API uses a promise to return the result. * - * @param { number } deviceId - Unique ID of the input device. If the same physical device is repeatedly reinstalled or restarted, its ID may change. + * @param { int } deviceId - Unique ID of the input device. If the same physical device is repeatedly reinstalled or restarted, its ID may change. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 9 dynamic + * @since 20 static */ - function getKeyboardType(deviceId: number): Promise; + function getKeyboardType(deviceId: int): Promise; /** * Obtains the keyboard type of the input device. * - * @param { number } deviceId - Unique ID of the input device. If the same physical device is repeatedly reinstalled or restarted, its ID may change. + * @param { int } deviceId - Unique ID of the input device. If the same physical device is repeatedly reinstalled or restarted, its ID may change. * @returns { KeyboardType } Keyboard type. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 10 dynamic + * @since 20 static */ - function getKeyboardTypeSync(deviceId: number): KeyboardType; + function getKeyboardTypeSync(deviceId: int): KeyboardType; /** * Sets the keyboard repeat delay. * This API uses an asynchronous callback to return the result. * - * @param { number } delay - Keyboard repeat delay, in ms. The value range is [300, 1000] and the default value is 500. + * @param { int } delay - Keyboard repeat delay, in ms. The value range is [300, 1000] and the default value is 500. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -619,8 +623,9 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setKeyboardRepeatDelay(delay: number, callback: AsyncCallback): void; + function setKeyboardRepeatDelay(delay: int, callback: AsyncCallback): void; /** * Sets the keyboard repeat delay. @@ -634,42 +639,45 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setKeyboardRepeatDelay(delay: number): Promise; + function setKeyboardRepeatDelay(delay: int): Promise; /** * Obtains the keyboard repeat delay. * This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the keyboard repeat delay. + * @param { AsyncCallback } callback - Callback used to return the keyboard repeat delay. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getKeyboardRepeatDelay(callback: AsyncCallback): void; + function getKeyboardRepeatDelay(callback: AsyncCallback): void; /** * Obtains the keyboard repeat delay. * This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the keyboard repeat delay. + * @returns { Promise } Promise used to return the keyboard repeat delay. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getKeyboardRepeatDelay(): Promise; + function getKeyboardRepeatDelay(): Promise; /** * Sets the keyboard repeat rate. * This API uses an asynchronous callback to return the result. * - * @param { number } rate - Keyboard repeat rate, in ms/time. The value range is [36, 100] and the default value is 50. + * @param { int } rate - Keyboard repeat rate, in ms/time. The value range is [36, 100] and the default value is 50. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -677,14 +685,15 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setKeyboardRepeatRate(rate: number, callback: AsyncCallback): void; + function setKeyboardRepeatRate(rate: int, callback: AsyncCallback): void; /** * Sets the keyboard repeat rate. * This API uses a promise to return the result. * - * @param { number } rate - Keyboard repeat rate, in ms/time. The value range is [36, 100] and the default value is 50. + * @param { int } rate - Keyboard repeat rate, in ms/time. The value range is [36, 100] and the default value is 50. * @returns { Promise } A promise that returns no value. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -692,46 +701,49 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setKeyboardRepeatRate(rate: number): Promise; + function setKeyboardRepeatRate(rate: int): Promise; /** * Obtains the keyboard repeat rate. * This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the keyboard repeat rate. + * @param { AsyncCallback } callback - Callback used to return the keyboard repeat rate. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getKeyboardRepeatRate(callback: AsyncCallback): void; + function getKeyboardRepeatRate(callback: AsyncCallback): void; /** * Obtains the keyboard repeat rate. * This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the keyboard repeat rate. + * @returns { Promise } Promise used to return the keyboard repeat rate. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getKeyboardRepeatRate(): Promise; + function getKeyboardRepeatRate(): Promise; /** * Obtains the interval (including the device sleep time) elapsed since the last system input event. * This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the interval since the last input. + * @returns { Promise } Promise used to return the interval since the last input. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 14 dynamic */ - function getIntervalSinceLastInput(): Promise; + function getIntervalSinceLastInput(): Promise; /** * Sets the input switch status of an input device. Take the touchscreen as an example. @@ -739,7 +751,7 @@ declare namespace inputDevice { * If the input switch is on, the touchscreen wakes up when being touched. * * @permission ohos.permission.INPUT_DEVICE_CONTROLLER - * @param { number } deviceId - Device id. + * @param { int } deviceId - Device id. * @param { boolean } enabled - Switch status of the input device. The value true indicates that the input device is enabled, * and the value false indicates the opposite. * @returns { Promise } Returns the result through a promise. @@ -755,15 +767,16 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi * @since 18 dynamic + * @since 20 static */ - function setInputDeviceEnabled(deviceId: number, enabled: boolean): Promise; + function setInputDeviceEnabled(deviceId: int, enabled: boolean): Promise; /** * Specifies whether to enable a function key (for example, CapsLock). * This API uses a promise to return the result. * * @permission ohos.permission.INPUT_KEYBOARD_CONTROLLER - * @param { number } functionKey - Type of the function key. + * @param { int } functionKey - Type of the function key. * @param { boolean } enabled - Status of the function key. The value true indicates that the function key is enabled, * and the value false indicates the opposite. * @returns { Promise } Returns the result through a promise. @@ -774,6 +787,7 @@ declare namespace inputDevice { * @throws { BusinessError } 3900003 - It is prohibited for non-input applications. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 15 dynamic + * @since 20 static */ function setFunctionKeyEnabled(functionKey: FunctionKey, enabled: boolean): Promise; @@ -781,7 +795,7 @@ declare namespace inputDevice { * Checks whether the specified function key (for example, CapsLock) is enabled. * This API uses a promise to return the result. * - * @param { number } functionKey - Type of the function key. + * @param { int } functionKey - Type of the function key. * @returns { Promise } Promise used to return the result. The value true indicates that the function key is enabled, * and the value false indicates the opposite. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -789,6 +803,7 @@ declare namespace inputDevice { * @throws { BusinessError } 3900002 - There is currently no keyboard device connected. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 15 dynamic + * @since 20 static */ function isFunctionKeyEnabled(functionKey: FunctionKey): Promise; } diff --git a/api/@ohos.multimodalInput.inputEventClient.d.ts b/api/@ohos.multimodalInput.inputEventClient.d.ts index de52c6b2d4..0789ef13fe 100644 --- a/api/@ohos.multimodalInput.inputEventClient.d.ts +++ b/api/@ohos.multimodalInput.inputEventClient.d.ts @@ -27,6 +27,7 @@ import { TouchEvent } from './@ohos.multimodalInput.touchEvent'; * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 8 dynamic + * @since 20 static */ declare namespace inputEventClient { /** @@ -36,6 +37,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 8 dynamic + * @since 20 static */ interface KeyEvent { /** @@ -45,26 +47,29 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 8 dynamic + * @since 20 static */ isPressed: boolean; /** * Keycode value. Currently, only the KEYCODE_BACK key is supported. - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 8 dynamic + * @since 20 static */ - keyCode: number; + keyCode: int; /** * Duration for pressing a key, in μs. - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 8 dynamic + * @since 20 static */ - keyDownDuration: number; + keyDownDuration: int; /** * Whether the key event can be intercepted. @@ -73,6 +78,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 8 dynamic + * @since 20 static */ isIntercepted: boolean; } diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 4963746167..375d333ca7 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -44,7 +44,7 @@ declare namespace inputMonitor { * @interface TouchEventReceiver * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 7 dynamic + * @since 7 dynamic * @since 20 static */ interface TouchEventReceiver { @@ -56,10 +56,15 @@ declare namespace inputMonitor { * The value true indicates that the touch event will be dispatched to the window, and the value false indicates the opposite. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 7 dynamic + * @since 7 dynamic * @since 20 static */ + /*** if arkts dynamic */ (touchEvent: TouchEvent): Boolean; + /*** endif */ + /*** if arkts static */ + filter: (touchEvent: TouchEvent): Boolean; + /*** endif */ } /** @@ -88,6 +93,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function on(type: 'touch', receiver: TouchEventReceiver): void; @@ -117,6 +123,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function on(type: 'mouse', receiver: Callback): void; @@ -148,6 +155,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function on(type: 'mouse', rect: display.Rect[], receiver: Callback): void; @@ -179,6 +187,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function off(type: 'touch', receiver?: TouchEventReceiver): void; @@ -210,6 +219,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function off(type: 'mouse', receiver?: Callback): void; @@ -226,6 +236,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function on(type: 'pinch', receiver: Callback): void; @@ -243,6 +254,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function off(type: 'pinch', receiver?: Callback): void; @@ -260,6 +272,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ function on(type: 'pinch', fingers: number, receiver: Callback): void; @@ -268,7 +281,7 @@ declare namespace inputMonitor { * * @permission ohos.permission.INPUT_MONITORING * @param { 'pinch' } type - Event type. This field has a fixed value of pinch. - * @param { number } fingers - Number of fingers that trigger the pinch. The value must be greater than or equal to 2. + * @param { int } fingers - Number of fingers that trigger the pinch. The value must be greater than or equal to 2. * @param { Callback } receiver - Callback for which listening is disabled. * If this parameter is not specified, listening will be disabled for all callbacks registered by the current application. * @throws { BusinessError } 201 - Permission denied. @@ -278,15 +291,16 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ - function off(type: 'pinch', fingers: number, receiver?: Callback): void; + function off(type: 'pinch', fingers: int, receiver?: Callback): void; /** * Enables listening for rotation events of the touchpad. * * @permission ohos.permission.INPUT_MONITORING * @param { 'rotate' } type - Event type. This field has a fixed value of rotate. - * @param { number } fingers - Number of fingers that trigger a rotation. The value must not be greater than 2. + * @param { int } fingers - Number of fingers that trigger a rotation. The value must not be greater than 2. * @param { Callback } receiver - Callback used to return rotation events asynchronously. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - SystemAPI permit error. @@ -295,15 +309,16 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ - function on(type: 'rotate', fingers: number, receiver: Callback): void; + function on(type: 'rotate', fingers: int, receiver: Callback): void; /** * Disables listening for rotation events of the touchpad. * * @permission ohos.permission.INPUT_MONITORING * @param { 'rotate' } type - Event type. This field has a fixed value of rotate. - * @param { number } fingers - Number of fingers that trigger a rotation. The value must not be greater than 2. + * @param { int } fingers - Number of fingers that trigger a rotation. The value must not be greater than 2. * @param { Callback } receiver - Callback for which listening is disabled. * If this parameter is not specified, listening will be disabled for all callbacks registered by the current application. * @throws { BusinessError } 201 - Permission denied. @@ -313,8 +328,9 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ - function off(type: 'rotate', fingers: number, receiver?: Callback): void; + function off(type: 'rotate', fingers: int, receiver?: Callback): void; /** * Enables listening for three-finger swipe events. @@ -329,6 +345,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function on(type: 'threeFingersSwipe', receiver: Callback): void; @@ -346,6 +363,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function off(type: 'threeFingersSwipe', receiver?: Callback): void; @@ -362,6 +380,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function on(type: 'fourFingersSwipe', receiver: Callback): void; @@ -379,6 +398,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function off(type: 'fourFingersSwipe', receiver?: Callback): void; @@ -395,6 +415,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ function on(type: 'threeFingersTap', receiver: Callback): void; @@ -412,6 +433,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ function off(type: 'threeFingersTap', receiver?: Callback): void; @@ -428,6 +450,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function on(type: 'fingerprint', receiver: Callback): void; @@ -444,6 +467,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function off(type: 'fingerprint', receiver?: Callback): void; @@ -459,6 +483,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function on(type: 'swipeInward', receiver: Callback): void; @@ -474,6 +499,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function off(type: 'swipeInward', receiver?: Callback): void; @@ -482,7 +508,7 @@ declare namespace inputMonitor { * * @permission ohos.permission.INPUT_MONITORING * @param { 'touchscreenSwipe' } type - Event type. This field has a fixed value of touchscreenSwipe. - * @param { number } fingers - Number of fingers that trigger the swipe. The value range is [3, 5]. + * @param { int } fingers - Number of fingers that trigger the swipe. The value range is [3, 5]. * @param { Callback } receiver - Callback used to return touchscreen swipe events asynchronously. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Caller is not a system application. @@ -493,15 +519,16 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 18 dynamic + * @since 20 static */ - function on(type: 'touchscreenSwipe', fingers: number, receiver: Callback): void; + function on(type: 'touchscreenSwipe', fingers: int, receiver: Callback): void; /** * Disables listening for touchscreen swipe events. * * @permission ohos.permission.INPUT_MONITORING * @param { 'touchscreenSwipe' } type - Event type. This field has a fixed value of touchscreenSwipe. - * @param { number } fingers - Number of fingers that trigger the swipe. The value range is [3, 5]. + * @param { int } fingers - Number of fingers that trigger the swipe. The value range is [3, 5]. * @param { Callback } receiver - Callback for which listening is disabled. * If this parameter is not specified, listening will be disabled for all callbacks registered by the current application. * @throws { BusinessError } 201 - Permission denied. @@ -513,15 +540,16 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 18 dynamic + * @since 20 static */ - function off(type: 'touchscreenSwipe', fingers: number, receiver?: Callback): void; + function off(type: 'touchscreenSwipe', fingers: int, receiver?: Callback): void; /** * Enables listening for touchscreen pinch events. * * @permission ohos.permission.INPUT_MONITORING * @param { 'touchscreenPinch' } type - Event type. This field has a fixed value of touchscreenPinch. - * @param { number } fingers - Number of fingers that trigger the pinch. The value range is [4, 5]. + * @param { int } fingers - Number of fingers that trigger the pinch. The value range is [4, 5]. * @param { Callback } receiver - Callback used to return touchscreen pinch events asynchronously. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Caller is not a system application. @@ -532,15 +560,16 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 18 dynamic + * @since 20 static */ - function on(type: 'touchscreenPinch', fingers: number, receiver: Callback): void; + function on(type: 'touchscreenPinch', fingers: int, receiver: Callback): void; /** * Disables listening for touchscreen pinch events. * * @permission ohos.permission.INPUT_MONITORING * @param { 'touchscreenPinch' } type - Event type. This field has a fixed value of touchscreenPinch. - * @param { number } fingers - Number of fingers that trigger the pinch. The value range is [4, 5]. + * @param { int } fingers - Number of fingers that trigger the pinch. The value range is [4, 5]. * @param { Callback } receiver - Callback for which listening is disabled. * If this parameter is not specified, listening will be disabled for all callbacks registered by the current application. * @throws { BusinessError } 201 - Permission denied. @@ -552,8 +581,9 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 18 dynamic + * @since 20 static */ - function off(type: 'touchscreenPinch', fingers: number, receiver?: Callback): void; + function off(type: 'touchscreenPinch', fingers: int, receiver?: Callback): void; /** * Listens for the press and release events of the specified key, which can be the META_LEFT, META_RIGHT, power, or volume key. @@ -571,6 +601,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 15 dynamic + * @since 20 static */ function on(type: 'keyPressed', keys: Array, receiver: Callback): void; @@ -589,6 +620,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 15 dynamic + * @since 20 static */ function off(type: 'keyPressed', receiver?: Callback): void; @@ -597,7 +629,7 @@ declare namespace inputMonitor { * The returned touch event contains only the following valid information: actionTime, sourceType, isInject, pressure, tiltX, tiltY. * * @permission ohos.permission.INPUT_MONITORING - * @param { number } count - Number of touch events to query. + * @param { int } count - Number of touch events to query. * @returns { Promise> } Returns the result through a promise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -605,6 +637,7 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use * @since 20 dynamic + * @since 20 static */ function queryTouchEvents(count: number) : Promise>; } diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index f0e308728d..121c58f2a2 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -18,14 +18,10 @@ * @kit InputKit */ -/*** if arkts dynamic */ import type { AsyncCallback } from './@ohos.base'; import type image from './@ohos.multimedia.image'; -/*** endif */ -/*** if arkts static */ import { AsyncCallback } from './@ohos.base'; import image from './@ohos.multimedia.image'; -/*** endif */ /** * The pointer module provides APIs related to pointer attribute management, such as querying and setting pointer attributes. @@ -40,7 +36,7 @@ import image from './@ohos.multimedia.image'; * @namespace pointer * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ declare namespace pointer { @@ -57,7 +53,7 @@ declare namespace pointer { * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ enum PointerStyle { @@ -65,7 +61,7 @@ declare namespace pointer { * Default * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ DEFAULT, @@ -74,7 +70,7 @@ declare namespace pointer { * East arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ EAST, @@ -83,7 +79,7 @@ declare namespace pointer { * West arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ WEST, @@ -92,7 +88,7 @@ declare namespace pointer { * South arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ SOUTH, @@ -101,7 +97,7 @@ declare namespace pointer { * North arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NORTH, @@ -110,7 +106,7 @@ declare namespace pointer { * East-west arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ WEST_EAST, @@ -119,7 +115,7 @@ declare namespace pointer { * North-south arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NORTH_SOUTH, @@ -128,7 +124,7 @@ declare namespace pointer { * North-east arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NORTH_EAST, @@ -137,7 +133,7 @@ declare namespace pointer { * North-west arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NORTH_WEST, @@ -146,7 +142,7 @@ declare namespace pointer { * South-east arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ SOUTH_EAST, @@ -155,7 +151,7 @@ declare namespace pointer { * South-west arrow * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ SOUTH_WEST, @@ -164,7 +160,7 @@ declare namespace pointer { * Northeast and southwest adjustment * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NORTH_EAST_SOUTH_WEST, @@ -173,7 +169,7 @@ declare namespace pointer { * Northwest and southeast adjustment * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ NORTH_WEST_SOUTH_EAST, @@ -182,7 +178,7 @@ declare namespace pointer { * Cross (accurate selection) * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ CROSS, @@ -191,7 +187,7 @@ declare namespace pointer { * Copy * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ CURSOR_COPY, @@ -200,7 +196,7 @@ declare namespace pointer { * Forbid * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ CURSOR_FORBID, @@ -209,7 +205,7 @@ declare namespace pointer { * Sucker * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ COLOR_SUCKER, @@ -218,7 +214,7 @@ declare namespace pointer { * Grabbing hand * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ HAND_GRABBING, @@ -227,7 +223,7 @@ declare namespace pointer { * Opening hand * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ HAND_OPEN, @@ -236,7 +232,7 @@ declare namespace pointer { * Hand-shaped pointer * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ HAND_POINTING, @@ -245,7 +241,7 @@ declare namespace pointer { * Help * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ HELP, @@ -254,7 +250,7 @@ declare namespace pointer { * Move * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MOVE, @@ -263,7 +259,7 @@ declare namespace pointer { * Left and right resizing * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ RESIZE_LEFT_RIGHT, @@ -272,7 +268,7 @@ declare namespace pointer { * Up and down resizing * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ RESIZE_UP_DOWN, @@ -281,7 +277,7 @@ declare namespace pointer { * Screenshot crosshair * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ SCREENSHOT_CHOOSE, @@ -290,7 +286,7 @@ declare namespace pointer { * Screenshot * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ SCREENSHOT_CURSOR, @@ -299,7 +295,7 @@ declare namespace pointer { * Text selection * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ TEXT_CURSOR, @@ -308,7 +304,7 @@ declare namespace pointer { * Zoom in * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ ZOOM_IN, @@ -317,7 +313,7 @@ declare namespace pointer { * Zoom out * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ ZOOM_OUT, @@ -326,7 +322,7 @@ declare namespace pointer { * Scrolling east * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_EAST, @@ -335,7 +331,7 @@ declare namespace pointer { * Scrolling west * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_WEST, @@ -344,7 +340,7 @@ declare namespace pointer { * Scrolling south * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_SOUTH, @@ -353,7 +349,7 @@ declare namespace pointer { * Scrolling north * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_NORTH, @@ -362,7 +358,7 @@ declare namespace pointer { * Scrolling north and south * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_NORTH_SOUTH, @@ -371,7 +367,7 @@ declare namespace pointer { * Scrolling northeast * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_NORTH_EAST, @@ -380,7 +376,7 @@ declare namespace pointer { * Scrolling northwest * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_NORTH_WEST, @@ -389,7 +385,7 @@ declare namespace pointer { * Scrolling southeast * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_SOUTH_EAST, @@ -398,7 +394,7 @@ declare namespace pointer { * Scrolling southwest * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_SOUTH_WEST, @@ -407,7 +403,7 @@ declare namespace pointer { * Moving as a cone in four directions * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ MIDDLE_BTN_NORTH_SOUTH_WEST_EAST, @@ -416,7 +412,7 @@ declare namespace pointer { * Horizontal text selection * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ HORIZONTAL_TEXT_CURSOR, @@ -425,7 +421,7 @@ declare namespace pointer { * Precise selection * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ CURSOR_CROSS, @@ -434,7 +430,7 @@ declare namespace pointer { * Cursor with circle style * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ CURSOR_CIRCLE, @@ -450,7 +446,7 @@ declare namespace pointer { * * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ LOADING, @@ -466,7 +462,7 @@ declare namespace pointer { * * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ RUNNING, @@ -475,7 +471,7 @@ declare namespace pointer { * Scrolling east and west * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 18 dynamic + * @since 18 dynamic * @since 20 static */ MIDDLE_BTN_EAST_WEST @@ -486,7 +482,7 @@ declare namespace pointer { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ enum PrimaryButton { @@ -494,7 +490,7 @@ declare namespace pointer { * Left mouse button * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ LEFT = 0, @@ -502,7 +498,7 @@ declare namespace pointer { * Right mouse button * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ RIGHT = 1 @@ -513,7 +509,7 @@ declare namespace pointer { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ enum RightClickType { @@ -521,7 +517,7 @@ declare namespace pointer { * Tapping the right-button area of the touchpad. * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ TOUCHPAD_RIGHT_BUTTON = 1, @@ -529,7 +525,7 @@ declare namespace pointer { * Tapping the left-button area of the touchpad. * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ TOUCHPAD_LEFT_BUTTON = 2, @@ -537,7 +533,7 @@ declare namespace pointer { * Tapping or pressing the touchpad with two fingers. * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ TOUCHPAD_TWO_FINGER_TAP = 3, @@ -572,26 +568,29 @@ declare namespace pointer { * @type { image.PixelMap } * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 15 dynamic + * @since 20 static */ pixelMap: image.PixelMap; /** * Horizontal coordinate of the cursor focus. The coordinates are restricted by the size of the custom cursor. * The minimum value is 0, and the maximum value is the maximum width of the image. The default value is 0 if the parameter is left empty. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 15 dynamic + * @since 20 static */ - focusX?: number; + focusX?: int; /** * Vertical coordinate of the cursor focus. The coordinates are restricted by the size of the custom cursor. * The minimum value is 0, and the maximum value is the maximum height of the image. The default value is 0 if the parameter is left empty. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 15 dynamic + * @since 20 static */ - focusY?: number; + focusY?: int; } /** @@ -599,7 +598,7 @@ declare namespace pointer { * * @interface CursorConfig * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 dynamic + * @since 15 dynamic * @since 20 static */ interface CursorConfig { @@ -610,7 +609,7 @@ declare namespace pointer { * * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 dynamic + * @since 15 dynamic * @since 20 static */ followSystem : boolean; @@ -630,7 +629,7 @@ declare namespace pointer { /** * Sets the moving speed of the mouse pointer. This API uses an asynchronous callback to return the result. * - * @param { number } speed - Moving speed of the mouse pointer. The value ranges from 1 to 20. The default value is 10. + * @param { int } speed - Moving speed of the mouse pointer. The value ranges from 1 to 20. The default value is 10. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -638,8 +637,9 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ - function setPointerSpeed(speed: number, callback: AsyncCallback): void; + function setPointerSpeed(speed: int, callback: AsyncCallback): void; /** * Sets the moving speed of the mouse pointer. This API uses a promise to return the result. @@ -655,7 +655,7 @@ declare namespace pointer { /** * Sets the moving speed of the mouse pointer. This API uses a promise to return the result. * - * @param { number } speed - Moving speed of the mouse pointer. The value ranges from 1 to 20. The default value is 10. + * @param { int } speed - Moving speed of the mouse pointer. The value ranges from 1 to 20. The default value is 10. * @returns { Promise } Returns the result through a promise. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -663,21 +663,23 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ - function setPointerSpeed(speed: number): Promise; + function setPointerSpeed(speed: int): Promise; /** * Sets the moving speed of the mouse pointer. This API returns the result synchronously. * - * @param { number } speed - Moving speed of the mouse pointer. The value ranges from 1 to 20. The default value is 10. + * @param { int } speed - Moving speed of the mouse pointer. The value ranges from 1 to 20. The default value is 10. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ - function setPointerSpeedSync(speed: number): void; + function setPointerSpeedSync(speed: int): void; /** * Obtains the moving speed of the mouse pointer. This API uses an asynchronous callback to return the result. @@ -699,8 +701,9 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ - function getPointerSpeed(callback: AsyncCallback): void; + function getPointerSpeed(callback: AsyncCallback): void; /** * Obtains the moving speed of the mouse pointer. This API uses a promise to return the result. @@ -718,8 +721,9 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ - function getPointerSpeed(): Promise; + function getPointerSpeed(): Promise; /** * Obtains the moving speed of the mouse pointer. This API returns the result synchronously. @@ -731,6 +735,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ function getPointerSpeedSync(): number; @@ -743,7 +748,7 @@ declare namespace pointer { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function setPointerStyle(windowId: int, pointerStyle: PointerStyle, callback: AsyncCallback): void; @@ -757,7 +762,7 @@ declare namespace pointer { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 9 dynamic + * @since 9 dynamic * @since 20 static */ function setPointerStyle(windowId: int, pointerStyle: PointerStyle): Promise; @@ -770,7 +775,7 @@ declare namespace pointer { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 dynamic + * @since 10 dynamic * @since 20 static */ function setPointerStyleSync(windowId: int, pointerStyle: PointerStyle): void; @@ -778,27 +783,29 @@ declare namespace pointer { /** * Obtains the mouse pointer style. This API uses an asynchronous callback to return the result. * - * @param { number } windowId - Window ID. + * @param { int } windowId - Window ID. * @param { AsyncCallback } callback - Callback used to return the mouse pointer style. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 9 dynamic + * @since 20 static */ - function getPointerStyle(windowId: number, callback: AsyncCallback): void; + function getPointerStyle(windowId: int, callback: AsyncCallback): void; /** * Obtains the mouse pointer style. This API uses a promise to return the result. * - * @param { number } windowId - Window ID. The value is an integer greater than or equal to -1. + * @param { int } windowId - Window ID. The value is an integer greater than or equal to -1. * The value -1 indicates the global window. * @returns { Promise } Promise used to return the mouse pointer style. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 9 dynamic + * @since 20 static */ - function getPointerStyle(windowId: number): Promise; + function getPointerStyle(windowId: int): Promise; /** * Obtains the mouse pointer style, such as the east arrow, west arrow, south arrow, and north arrow. @@ -810,8 +817,9 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 10 dynamic + * @since 20 static */ - function getPointerStyleSync(windowId: number): PointerStyle; + function getPointerStyleSync(windowId: int): PointerStyle; /** * Sets the visible status of the mouse pointer. This API uses an asynchronous callback to return the result. @@ -835,6 +843,7 @@ declare namespace pointer { * @throws { BusinessError } 801 - Capability not supported; * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 18 dynamic + * @since 20 static */ function setPointerVisible(visible: boolean, callback: AsyncCallback): void; @@ -860,6 +869,7 @@ declare namespace pointer { * @throws { BusinessError } 801 - Capability not supported; * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 18 dynamic + * @since 20 static */ function setPointerVisible(visible: boolean): Promise; @@ -872,6 +882,7 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 10 dynamic + * @since 20 static */ function setPointerVisibleSync(visible: boolean): void; @@ -884,6 +895,7 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 9 dynamic + * @since 20 static */ function isPointerVisible(callback: AsyncCallback): void; @@ -894,6 +906,7 @@ declare namespace pointer { * The value true indicates that the mouse pointer is visible, and the value false indicates the opposite. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 9 dynamic + * @since 20 static */ function isPointerVisible(): Promise; @@ -904,13 +917,14 @@ declare namespace pointer { * The value true indicates that the mouse pointer is visible, and the value false indicates the opposite. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 10 dynamic + * @since 20 static */ function isPointerVisibleSync(): boolean; /** * Sets the pointer color. This API uses an asynchronous callback to return the result. * - * @param { number } color - Pointer color. The default value is black (0x000000). + * @param { int } color - Pointer color. The default value is black (0x000000). * @param { AsyncCallback } callback - Callback used to return the result. * If the operation is successful, err is undefined. Otherwise, err is an error object. * @throws { BusinessError } 202 - SystemAPI permission error. @@ -919,13 +933,14 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setPointerColor(color: number, callback: AsyncCallback): void; + function setPointerColor(color: int, callback: AsyncCallback): void; /** * Sets the pointer color. This API uses a promise to return the result. * - * @param { number } color - Pointer color. The default value is black (0x000000). + * @param { int } color - Pointer color. The default value is black (0x000000). * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -933,61 +948,66 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setPointerColor(color: number): Promise; + function setPointerColor(color: int): Promise; /** * Sets the pointer color. This API returns the result synchronously. * - * @param { number } color - Pointer color. The default value is black (0x000000). + * @param { int } color - Pointer color. The default value is black (0x000000). * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setPointerColorSync(color: number): void; + function setPointerColorSync(color: int): void; /** * Obtains the pointer color. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getPointerColor(callback: AsyncCallback): void; + function getPointerColor(callback: AsyncCallback): void; /** * Obtains the pointer color. This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getPointerColor(): Promise; + function getPointerColor(): Promise; /** * Obtains the pointer color. This API returns the result synchronously. * - * @returns { number } Pointer color. + * @returns { int } Pointer color. * @throws { BusinessError } 202 - SystemAPI permission error. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getPointerColorSync(): number; + function getPointerColorSync(): int; /** * Sets the pointer size. This API uses an asynchronous callback to return the result. * - * @param { number } size - Pointer size. The value ranges from 1 to 7. The default value is 1. + * @param { int } size - Pointer size. The value ranges from 1 to 7. The default value is 1. * @param { AsyncCallback } callback - Callback used to return the result. * If the operation is successful, err is undefined. Otherwise, err is an error object. * @throws { BusinessError } 202 - SystemAPI permission error. @@ -996,13 +1016,14 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setPointerSize(size: number, callback: AsyncCallback): void; + function setPointerSize(size: int, callback: AsyncCallback): void; /** * Sets the pointer size. This API uses a promise to return the result. * - * @param { number } size - Pointer size. The value ranges from 1 to 7. The default value is 1. + * @param { int } size - Pointer size. The value ranges from 1 to 7. The default value is 1. * @returns { Promise } Returns the result through a promise. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1010,56 +1031,61 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setPointerSize(size: number): Promise; + function setPointerSize(size: int): Promise; /** * Sets the pointer size. This API returns the result synchronously. * - * @param { number } size - Pointer size. The value ranges from 1 to 7. The default value is 1. + * @param { int } size - Pointer size. The value ranges from 1 to 7. The default value is 1. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setPointerSizeSync(size: number): void; + function setPointerSizeSync(size: int): void; /** * Obtains the pointer size. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getPointerSize(callback: AsyncCallback): void; + function getPointerSize(callback: AsyncCallback): void; /** * Obtains the pointer size. This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getPointerSize(): Promise; + function getPointerSize(): Promise; /** * Obtains the pointer size. This API returns the result synchronously. * - * @returns { number } Pointer size. + * @returns { int } Pointer size. * @throws { BusinessError } 202 - SystemAPI permission error. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getPointerSizeSync(): number; + function getPointerSizeSync(): int; /** * Sets the primary button of the mouse. This API uses an asynchronous callback to return the result. @@ -1072,6 +1098,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setMousePrimaryButton(primary: PrimaryButton, callback: AsyncCallback): void; @@ -1086,6 +1113,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setMousePrimaryButton(primary: PrimaryButton): Promise; @@ -1099,6 +1127,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getMousePrimaryButton(callback: AsyncCallback): void; @@ -1112,6 +1141,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getMousePrimaryButton(): Promise; @@ -1127,6 +1157,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setHoverScrollState(state: boolean, callback: AsyncCallback): void; @@ -1142,6 +1173,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setHoverScrollState(state: boolean): Promise; @@ -1156,6 +1188,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getHoverScrollState(callback: AsyncCallback): void; @@ -1170,13 +1203,14 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getHoverScrollState(): Promise; /** * Sets the number of mouse scroll rows. This API uses an asynchronous callback to return the result. * - * @param { number } rows - Number of mouse scroll rows. The value ranges from 1 to 100. The default value is 3. + * @param { int } rows - Number of mouse scroll rows. The value ranges from 1 to 100. The default value is 3. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1184,13 +1218,14 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setMouseScrollRows(rows: number, callback: AsyncCallback): void; + function setMouseScrollRows(rows: int, callback: AsyncCallback): void; /** * Sets the number of mouse scroll rows. This API uses a promise to return the result. * - * @param { number } rows - Number of mouse scroll rows. The value ranges from 1 to 100. The default value is 3. + * @param { int } rows - Number of mouse scroll rows. The value ranges from 1 to 100. The default value is 3. * @returns { Promise } Returns the result through a promise. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1198,34 +1233,37 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setMouseScrollRows(rows: number): Promise; + function setMouseScrollRows(rows: int): Promise; /** * Obtains the number of mouse scroll rows. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getMouseScrollRows(callback: AsyncCallback): void; + function getMouseScrollRows(callback: AsyncCallback): void; /** * Obtains the moving speed of the mouse pointer. This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getMouseScrollRows(): Promise; + function getMouseScrollRows(): Promise; /** * Sets the scroll switch of the touchpad. This API uses an asynchronous callback to return the result. @@ -1239,6 +1277,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadScrollSwitch(state: boolean, callback: AsyncCallback): void; @@ -1254,6 +1293,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadScrollSwitch(state: boolean): Promise; @@ -1268,6 +1308,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadScrollSwitch(callback: AsyncCallback): void; @@ -1282,6 +1323,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadScrollSwitch(): Promise; @@ -1298,6 +1340,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadScrollDirection(state: boolean, callback: AsyncCallback): void; @@ -1314,6 +1357,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadScrollDirection(state: boolean): Promise; @@ -1329,6 +1373,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadScrollDirection(callback: AsyncCallback): void; @@ -1344,6 +1389,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadScrollDirection(): Promise; @@ -1359,6 +1405,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadTapSwitch(state: boolean, callback: AsyncCallback): void; @@ -1374,6 +1421,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadTapSwitch(state: boolean): Promise; @@ -1388,6 +1436,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadTapSwitch(callback: AsyncCallback): void; @@ -1402,13 +1451,14 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadTapSwitch(): Promise; /** * Sets the mouse pointer moving speed of the touchpad. This API uses an asynchronous callback to return the result. * - * @param { number } speed - Mouse pointer moving speed of the touchpad. The value range is [1,11]. The default value is 6. + * @param { int } speed - Mouse pointer moving speed of the touchpad. The value range is [1,11]. The default value is 6. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1416,13 +1466,14 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setTouchpadPointerSpeed(speed: number, callback: AsyncCallback): void; + function setTouchpadPointerSpeed(speed: int, callback: AsyncCallback): void; /** * Sets the mouse pointer moving speed of the touchpad. This API uses a promise to return the result. * - * @param { number } speed - Mouse pointer moving speed of the touchpad. The value range is [1,11]. The default value is 6. + * @param { int } speed - Mouse pointer moving speed of the touchpad. The value range is [1,11]. The default value is 6. * @returns { Promise } Returns the result through a promise. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1430,34 +1481,37 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function setTouchpadPointerSpeed(speed: number): Promise; + function setTouchpadPointerSpeed(speed: int): Promise; /** * Obtains the mouse pointer moving speed of the touchpad. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getTouchpadPointerSpeed(callback: AsyncCallback): void; + function getTouchpadPointerSpeed(callback: AsyncCallback): void; /** * Obtains the mouse pointer moving speed of the touchpad. This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ - function getTouchpadPointerSpeed(): Promise; + function getTouchpadPointerSpeed(): Promise; /** * Sets the pinch switch of the touchpad. This API uses an asynchronous callback to return the result. @@ -1471,6 +1525,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadPinchSwitch(state: boolean, callback: AsyncCallback): void; @@ -1486,6 +1541,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadPinchSwitch(state: boolean): Promise; @@ -1500,6 +1556,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadPinchSwitch(callback: AsyncCallback): void; @@ -1514,6 +1571,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadPinchSwitch(): Promise; @@ -1529,6 +1587,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadSwipeSwitch(state: boolean, callback: AsyncCallback): void; @@ -1544,6 +1603,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadSwipeSwitch(state: boolean): Promise; @@ -1558,6 +1618,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadSwipeSwitch(callback: AsyncCallback): void; @@ -1572,6 +1633,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadSwipeSwitch(): Promise; @@ -1592,6 +1654,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadRightClickType(type: RightClickType, callback: AsyncCallback): void; @@ -1612,6 +1675,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function setTouchpadRightClickType(type: RightClickType): Promise; @@ -1625,6 +1689,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadRightClickType(callback: AsyncCallback): void; @@ -1638,28 +1703,30 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 10 dynamic + * @since 20 static */ function getTouchpadRightClickType(): Promise; /** * Sets the custom cursor style. This API uses a promise to return the result. * - * @param { number } windowId - Window ID. + * @param { int } windowId - Window ID. * @param { image.PixelMap } pixelMap - Pixel map resource. - * @param { number } focusX - Focus x of the custom cursor. The value is greater than or equal to 0. The default value is 0. - * @param { number } focusY - Focus y of the custom cursor. The value is greater than or equal to 0. The default value is 0. + * @param { int } focusX - Focus x of the custom cursor. The value is greater than or equal to 0. The default value is 0. + * @param { int } focusY - Focus y of the custom cursor. The value is greater than or equal to 0. The default value is 0. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 11 dynamic + * @since 20 static */ - function setCustomCursor(windowId: number, pixelMap: image.PixelMap, focusX?: number, focusY?: number): Promise; + function setCustomCursor(windowId: int, pixelMap: image.PixelMap, focusX?: int, focusY?: int): Promise; /** * Sets a custom cursor. This API returns the result synchronously. * - * @param { number } windowId - Window ID. The value must be an integer greater than 0. + * @param { int } windowId - Window ID. The value must be an integer greater than 0. * @param { image.PixelMap } pixelMap - Pixel map resource. * @param { number } focusX - Focus x of the custom cursor. The value is greater than or equal to 0. The default value is 0. * @param { number } focusY - Focus y of the custom cursor. The value is greater than or equal to 0. The default value is 0. @@ -1667,8 +1734,9 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 11 dynamic + * @since 20 static */ - function setCustomCursorSync(windowId: number, pixelMap: image.PixelMap, focusX?: number, focusY?: number): void; + function setCustomCursorSync(windowId: int, pixelMap: image.PixelMap, focusX?: int, focusY?: int): void; /** * Sets the custom cursor style. This API uses a promise to return the result. @@ -1676,7 +1744,7 @@ declare namespace pointer { * page redirection, moving of the cursor out of the window and then back to the window, or moving of the cursor in different areas of the window. * In this case, you need to reset the cursor style. * - * @param { number } windowId - Window ID. + * @param { int } windowId - Window ID. * @param { CustomCursor } cursor - Pixel map resource. * @param { CursorConfig } config - Custom cursor configuration, which specifies whether to adjust the cursor size based on system settings. * If followSystem in CursorConfig is set to true, the supported adjustment range is [size of the cursor image, 256 x 256]. @@ -1687,8 +1755,9 @@ declare namespace pointer { * @throws { BusinessError } 26500001 - Invalid windowId. Possible causes: The window id does not belong to the current process. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 15 dynamic + * @since 20 static */ - function setCustomCursor(windowId: number, cursor: CustomCursor, config: CursorConfig): Promise; + function setCustomCursor(windowId: int, cursor: CustomCursor, config: CursorConfig): Promise; /** * Sets the double-tap and drag switch for the touchpad. This API uses an asynchronous callback to return the result. @@ -1702,6 +1771,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 14 dynamic + * @since 20 static */ function setTouchpadDoubleTapAndDragState(isOpen: boolean, callback: AsyncCallback): void; @@ -1717,6 +1787,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 14 dynamic + * @since 20 static */ function setTouchpadDoubleTapAndDragState(isOpen: boolean): Promise; @@ -1731,6 +1802,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 14 dynamic + * @since 20 static */ function getTouchpadDoubleTapAndDragState(callback: AsyncCallback): void; @@ -1743,6 +1815,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. * @since 14 dynamic + * @since 20 static */ function getTouchpadDoubleTapAndDragState(): Promise; } diff --git a/api/@ohos.multimodalInput.shortKey.d.ts b/api/@ohos.multimodalInput.shortKey.d.ts index e261313011..d1f17f2f1e 100644 --- a/api/@ohos.multimodalInput.shortKey.d.ts +++ b/api/@ohos.multimodalInput.shortKey.d.ts @@ -27,6 +27,7 @@ import type { AsyncCallback } from './@ohos.base'; * @syscap SystemCapability.MultimodalInput.Input.ShortKey * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ declare namespace shortKey { @@ -36,7 +37,7 @@ declare namespace shortKey { * * @param { string } businessKey - Unique service ID registered on the multimodal side. * It corresponds to businessId in the ability_launch_config.json file. You need to query this parameter on your own before calling the API. - * @param { number } delay - Delay for starting an ability using shortcut keys, in milliseconds. This field is invalid only when shortcut keys are used. + * @param { int } delay - Delay for starting an ability using shortcut keys, in milliseconds. This field is invalid only when shortcut keys are used. * @param { AsyncCallback } callback - Callback used to return the result. * If the operation is successful, err is undefined. Otherwise, err is an error object. * @throws { BusinessError } 202 - SystemAPI permission error. @@ -45,8 +46,9 @@ declare namespace shortKey { * @syscap SystemCapability.MultimodalInput.Input.ShortKey * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ - function setKeyDownDuration(businessKey: string, delay: number, callback: AsyncCallback): void; + function setKeyDownDuration(businessKey: string, delay: int, callback: AsyncCallback): void; /** * Sets the delay for starting an ability using shortcut keys. @@ -54,7 +56,7 @@ declare namespace shortKey { * * @param { string } businessKey - Unique service ID registered on the multimodal side. * It corresponds to businessId in the ability_launch_config.json file. You need to query this parameter on your own before calling the API. - * @param { number } delay - Delay for starting an ability using shortcut keys, in milliseconds. This field is invalid only when shortcut keys are used. + * @param { int } delay - Delay for starting an ability using shortcut keys, in milliseconds. This field is invalid only when shortcut keys are used. * @returns { Promise } Returns the result through a promise. * @throws { BusinessError } 202 - SystemAPI permission error. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -62,8 +64,9 @@ declare namespace shortKey { * @syscap SystemCapability.MultimodalInput.Input.ShortKey * @systemapi hide for inner use * @since 10 dynamic + * @since 20 static */ - function setKeyDownDuration(businessKey: string, delay: number): Promise; + function setKeyDownDuration(businessKey: string, delay: int): Promise; } export default shortKey; -- Gitee From 642e2e14efc2abbaa1504e8436c4787f1ae0b416 Mon Sep 17 00:00:00 2001 From: KangPeng Date: Fri, 12 Sep 2025 09:13:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KangPeng --- api/@ohos.multimodalInput.inputDevice.d.ts | 1 - api/@ohos.multimodalInput.pointer.d.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index 6fb15e02ed..d28b71efe7 100644 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -21,7 +21,6 @@ import type { Callback, AsyncCallback } from './@ohos.base'; import type { KeyCode } from './@ohos.multimodalInput.keyCode'; -import { Callback, AsyncCallback } from './@ohos.base'; /** * The inputDevice module implements input device management functions such as listening for the connection diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 121c58f2a2..6492078304 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -20,8 +20,6 @@ import type { AsyncCallback } from './@ohos.base'; import type image from './@ohos.multimedia.image'; -import { AsyncCallback } from './@ohos.base'; -import image from './@ohos.multimedia.image'; /** * The pointer module provides APIs related to pointer attribute management, such as querying and setting pointer attributes. -- Gitee From 7ff3085454c74fda7e829b45168a272fd9ebdfdf Mon Sep 17 00:00:00 2001 From: KangPeng Date: Fri, 12 Sep 2025 09:54:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BC=BA=E5=B0=91=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KangPeng --- api/@ohos.multimodalInput.pointer.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 6492078304..f7b0a3e653 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -548,6 +548,7 @@ declare namespace pointer { * * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 20 dynamic + * @since 20 static */ TOUCHPAD_TWO_FINGER_TAP_OR_LEFT_BUTTON = 5, } @@ -558,6 +559,7 @@ declare namespace pointer { * @interface CustomCursor * @syscap SystemCapability.MultimodalInput.Input.Pointer * @since 15 dynamic + * @since 20 static */ interface CustomCursor { /** -- Gitee From f2b05e0f7b830d5b178cae418ef076b2be9c07fe Mon Sep 17 00:00:00 2001 From: KangPeng Date: Fri, 12 Sep 2025 13:11:49 +0800 Subject: [PATCH 4/4] 1_1 xts Signed-off-by: KangPeng --- api/@ohos.multimodalInput.inputConsumer.d.ts | 2 ++ api/@ohos.multimodalInput.inputDevice.d.ts | 3 ++- ...ohos.multimodalInput.inputEventClient.d.ts | 25 ++++++++++++++++++- api/@ohos.multimodalInput.inputMonitor.d.ts | 2 +- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 3488da2398..212b2063a0 100644 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -196,6 +196,7 @@ declare namespace inputConsumer { * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ enum ShieldMode { /** @@ -204,6 +205,7 @@ declare namespace inputConsumer { * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ FACTORY_MODE } diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index d28b71efe7..8e10fcb9b7 100644 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -741,9 +741,10 @@ declare namespace inputDevice { * @returns { Promise } Promise used to return the interval since the last input. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since 14 dynamic + * @since 20 static */ function getIntervalSinceLastInput(): Promise; - + /** * Sets the input switch status of an input device. Take the touchscreen as an example. * If the input switch is off, the touchscreen does not respond when being touched. diff --git a/api/@ohos.multimodalInput.inputEventClient.d.ts b/api/@ohos.multimodalInput.inputEventClient.d.ts index 0789ef13fe..1290b77382 100644 --- a/api/@ohos.multimodalInput.inputEventClient.d.ts +++ b/api/@ohos.multimodalInput.inputEventClient.d.ts @@ -90,6 +90,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ interface MouseEventData { /** @@ -99,6 +100,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ mouseEvent: MouseEvent; } @@ -132,6 +134,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ interface KeyEventData { /** @@ -141,6 +144,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 11 dynamic + * @since 20 static */ keyEvent: KeyEvent; } @@ -168,6 +172,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function injectKeyEvent(keyEvent: KeyEventData): void; @@ -192,10 +197,25 @@ declare namespace inputEventClient { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 12 dynamic + * @since 12 dynamiconly */ function injectEvent({ KeyEvent: KeyEvent }): void; + /** + * Injects keys (including single keys and combination keys). + * + * @permission ohos.permission.INJECT_INPUT_EVENT + * @param { KeyEvent } KeyEvent - Key event to inject. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.InputSimulator + * @systemapi hide for inner use + * @since 20 staticonly + */ + function injectEvent(KeyEvent: KeyEvent): void; + /** * Injects a mouse/touchpad event. * @@ -219,6 +239,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function injectMouseEvent(mouseEvent: MouseEventData): void; @@ -245,6 +266,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function injectTouchEvent(touchEvent: TouchEventData): void; @@ -260,6 +282,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @since 12 dynamic + * @since 20 static */ function permitInjection(result: boolean): void; } diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 375d333ca7..353193cfe7 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -639,6 +639,6 @@ declare namespace inputMonitor { * @since 20 dynamic * @since 20 static */ - function queryTouchEvents(count: number) : Promise>; + function queryTouchEvents(count: int) : Promise>; } export default inputMonitor; -- Gitee