From 26c46af46565a3d24f86c710eb66a01c0549150b Mon Sep 17 00:00:00 2001 From: KangPeng Date: Sat, 6 Sep 2025 17:51:46 +0800 Subject: [PATCH 1/4] input ts define Signed-off-by: KangPeng --- ...@ohos.multimodalInput.infraredEmitter.d.ts | 32 +- api/@ohos.multimodalInput.inputConsumer.d.ts | 15 +- api/@ohos.multimodalInput.inputDevice.d.ts | 127 +++--- ...ohos.multimodalInput.inputEventClient.d.ts | 55 ++- api/@ohos.multimodalInput.inputMonitor.d.ts | 107 +++-- api/@ohos.multimodalInput.keyCode.d.ts | 3 +- api/@ohos.multimodalInput.pointer.d.ts | 380 +++++++++++------- api/@ohos.multimodalInput.shortKey.d.ts | 14 +- 8 files changed, 449 insertions(+), 284 deletions(-) diff --git a/api/@ohos.multimodalInput.infraredEmitter.d.ts b/api/@ohos.multimodalInput.infraredEmitter.d.ts index 52ccddd6d0..5ec9f44776 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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace infraredEmitter { /** @@ -39,7 +40,8 @@ declare namespace infraredEmitter { * * @interface InfraredFrequency * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ interface InfraredFrequency { /** @@ -53,16 +55,17 @@ declare namespace infraredEmitter { /** * Maximum frequency, in Hz. * - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - max: number; + max: long; /** * Minimum frequency, in Hz. * - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter * @systemapi hide for inner use * @since 12 @@ -70,11 +73,12 @@ declare namespace infraredEmitter { /** * Minimum frequency, in Hz. * - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.InfraredEmitter - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - min: number; + min: long; } /** @@ -97,7 +101,7 @@ 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 { 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. @@ -105,9 +109,10 @@ declare namespace infraredEmitter { * @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 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function getInfraredFrequencies(): Array; } diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 9b23e5c4fc..52885d0e29 100644 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -195,7 +195,8 @@ declare namespace inputConsumer { * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ShieldMode { /** @@ -203,7 +204,8 @@ declare namespace inputConsumer { * * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FACTORY_MODE } @@ -283,7 +285,8 @@ declare namespace inputConsumer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function setShieldStatus(shieldMode: ShieldMode, isShield: boolean): void; @@ -299,7 +302,8 @@ declare namespace inputConsumer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getShieldStatus(shieldMode: ShieldMode): boolean; @@ -309,7 +313,8 @@ declare namespace inputConsumer { * @returns { Promise> } Promise used to return the list of all system shortcut keys. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSystemHotkeys(): Promise>; diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index 70fedd7115..228a44c876 100644 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -18,13 +18,9 @@ * @kit InputKit */ -/*** if arkts 1.1 */ import type { Callback, AsyncCallback } from './@ohos.base'; import type { KeyCode } from './@ohos.multimodalInput.keyCode'; -/*** endif */ -/*** if arkts 1.2 */ import { Callback, AsyncCallback } from './@ohos.base'; -/*** endif */ /** * The inputDevice module implements input device management functions such as listening for the connection @@ -421,7 +417,7 @@ declare namespace inputDevice { * @deprecated since 9 * @useinstead ohos.multimodalInput.inputDevice#getDeviceList */ - function getDeviceIds(callback: AsyncCallback>): void; + function getDeviceIds(callback: AsyncCallback>): void; /** * Obtains the IDs of all input devices. @@ -517,42 +513,45 @@ 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function supportKeys(deviceId: number, keys: Array): Promise>; + function supportKeys(deviceId: int, keys: Array): Promise>; /** * Checks whether the input device supports the specified keys. @@ -564,23 +563,25 @@ 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 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getKeyboardType(deviceId: number, callback: AsyncCallback): void; + function getKeyboardType(deviceId: int, callback: AsyncCallback): void; /** * Obtains the keyboard type of an input device. @@ -591,9 +592,10 @@ 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getKeyboardType(deviceId: number): Promise; + function getKeyboardType(deviceId: int): Promise; /** * Obtains the keyboard type of the input device. @@ -603,39 +605,42 @@ 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 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setKeyboardRepeatDelay(delay: number, callback: AsyncCallback): void; + function setKeyboardRepeatDelay(delay: int, callback: AsyncCallback): void; /** * Sets the keyboard repeat delay. * This API uses a promise 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. * @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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setKeyboardRepeatDelay(delay: number): Promise; + function setKeyboardRepeatDelay(delay: int): Promise; /** * Obtains the keyboard repeat delay. @@ -647,91 +652,98 @@ declare namespace inputDevice { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -754,16 +766,17 @@ declare namespace inputDevice { * @throws { BusinessError } 3900001 - The specified device does not exist. * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -773,7 +786,8 @@ declare namespace inputDevice { * @throws { BusinessError } 3900002 - There is currently no keyboard device connected. * @throws { BusinessError } 3900003 - It is prohibited for non-input applications. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function setFunctionKeyEnabled(functionKey: FunctionKey, enabled: boolean): Promise; @@ -781,14 +795,15 @@ 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 3900002 - There is currently no keyboard device connected. * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function isFunctionKeyEnabled(functionKey: FunctionKey): Promise; } diff --git a/api/@ohos.multimodalInput.inputEventClient.d.ts b/api/@ohos.multimodalInput.inputEventClient.d.ts index 4de04bf730..254ba10480 100644 --- a/api/@ohos.multimodalInput.inputEventClient.d.ts +++ b/api/@ohos.multimodalInput.inputEventClient.d.ts @@ -26,7 +26,8 @@ import { TouchEvent } from './@ohos.multimodalInput.touchEvent'; * @namespace inputEventClient * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace inputEventClient { /** @@ -35,7 +36,8 @@ declare namespace inputEventClient { * @interface KeyEvent * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface KeyEvent { /** @@ -44,7 +46,8 @@ declare namespace inputEventClient { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ isPressed: boolean; @@ -53,18 +56,20 @@ declare namespace inputEventClient { * @type { number } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - keyCode: number; + keyCode: int; /** * Duration for pressing a key, in μs. * @type { number } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - keyDownDuration: number; + keyDownDuration: int; /** * Whether the key event can be intercepted. @@ -72,7 +77,8 @@ declare namespace inputEventClient { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ isIntercepted: boolean; } @@ -83,7 +89,8 @@ declare namespace inputEventClient { * @interface MouseEventData * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface MouseEventData { /** @@ -92,7 +99,8 @@ declare namespace inputEventClient { * @type { MouseEvent } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ mouseEvent: MouseEvent; } @@ -125,7 +133,8 @@ declare namespace inputEventClient { * @interface KeyEventData * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface KeyEventData { /** @@ -134,7 +143,8 @@ declare namespace inputEventClient { * @type { KeyEvent } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ keyEvent: KeyEvent; } @@ -161,7 +171,8 @@ declare namespace inputEventClient { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function injectKeyEvent(keyEvent: KeyEventData): void; @@ -186,9 +197,16 @@ declare namespace inputEventClient { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ + /*** if arkts 1.1 */ function injectEvent({ KeyEvent: KeyEvent }): void; + /*** endif */ + /*** if arkts 1.2 */ + function injectEvent(event: KeyEvent): void; + /*** endif */ + /** * Injects a mouse/touchpad event. @@ -212,7 +230,8 @@ declare namespace inputEventClient { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function injectMouseEvent(mouseEvent: MouseEventData): void; @@ -238,7 +257,8 @@ declare namespace inputEventClient { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function injectTouchEvent(touchEvent: TouchEventData): void; @@ -253,7 +273,8 @@ declare namespace inputEventClient { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function permitInjection(result: boolean): void; } diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index fd289b6f5f..7f502b2e05 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -20,7 +20,9 @@ import { Callback } from './@ohos.base'; import { MouseEvent } from './@ohos.multimodalInput.mouseEvent'; +/*** if arkts 1.1 */ import type display from './@ohos.display'; +/*** endif */ import type { TouchEvent } from './@ohos.multimodalInput.touchEvent'; import type { Rotate, Pinch, ThreeFingersSwipe, FourFingersSwipe, SwipeInward } from './@ohos.multimodalInput.gestureEvent'; import type { ThreeFingersTap, TouchGestureEvent } from './@ohos.multimodalInput.gestureEvent'; @@ -35,7 +37,8 @@ import type { KeyCode } from './@ohos.multimodalInput.keyCode'; * @namespace inputMonitor * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace inputMonitor { /** @@ -59,7 +62,12 @@ declare namespace inputMonitor { * @since arkts {'1.1':'7', '1.2':'20'} * @arkts 1.1&1.2 */ + /*** if arkts 1.1 */ (touchEvent: TouchEvent): Boolean; + /*** endif */ + /*** if arkts 1.2 */ + filter: (touchEvent: TouchEvent) => Boolean; + /*** endif */ } /** @@ -87,7 +95,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'touch', receiver: TouchEventReceiver): void; @@ -116,7 +125,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'mouse', receiver: Callback): void; @@ -178,7 +188,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'touch', receiver?: TouchEventReceiver): void; @@ -209,7 +220,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'mouse', receiver?: Callback): void; @@ -242,7 +254,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'pinch', receiver?: Callback): void; @@ -259,9 +272,10 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'pinch', fingers: number, receiver: Callback): void; + function on(type: 'pinch', fingers: int, receiver: Callback): void; /** * Disables listening for global touchpad pinch events. @@ -277,9 +291,10 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -295,8 +310,10 @@ declare namespace inputMonitor { * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -312,9 +329,10 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -328,7 +346,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'threeFingersSwipe', receiver: Callback): void; @@ -345,7 +364,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'threeFingersSwipe', receiver?: Callback): void; @@ -361,7 +381,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'fourFingersSwipe', receiver: Callback): void; @@ -378,7 +399,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'fourFingersSwipe', receiver?: Callback): void; @@ -394,7 +416,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'threeFingersTap', receiver: Callback): void; @@ -411,7 +434,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'threeFingersTap', receiver?: Callback): void; @@ -427,7 +451,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'fingerprint', receiver: Callback): void; @@ -443,7 +468,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'fingerprint', receiver?: Callback): void; @@ -458,7 +484,8 @@ declare namespace inputMonitor { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'swipeInward', receiver: Callback): void; @@ -473,7 +500,8 @@ declare namespace inputMonitor { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'swipeInward', receiver?: Callback): void; @@ -492,9 +520,10 @@ declare namespace inputMonitor { * 3.Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'touchscreenSwipe', fingers: number, receiver: Callback): void; + function on(type: 'touchscreenSwipe', fingers: int, receiver: Callback): void; /** * Disables listening for touchscreen swipe events. @@ -512,9 +541,10 @@ declare namespace inputMonitor { * 3.Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function off(type: 'touchscreenSwipe', fingers: number, receiver?: Callback): void; + function off(type: 'touchscreenSwipe', fingers: int, receiver?: Callback): void; /** * Enables listening for touchscreen pinch events. @@ -531,9 +561,10 @@ declare namespace inputMonitor { * 3.Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'touchscreenPinch', fingers: number, receiver: Callback): void; + function on(type: 'touchscreenPinch', fingers: int, receiver: Callback): void; /** * Disables listening for touchscreen pinch events. @@ -551,9 +582,10 @@ declare namespace inputMonitor { * 3.Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -570,7 +602,8 @@ declare namespace inputMonitor { * @throws { BusinessError } 4100001 - Event listening not supported for the key. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'keyPressed', keys: Array, receiver: Callback): void; @@ -588,7 +621,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'keyPressed', receiver?: Callback): void; @@ -597,15 +631,16 @@ 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. * @throws { BusinessError } 3800001 - System internal error. * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ - function queryTouchEvents(count: number) : Promise>; + function queryTouchEvents(count: int) : Promise>; } export default inputMonitor; diff --git a/api/@ohos.multimodalInput.keyCode.d.ts b/api/@ohos.multimodalInput.keyCode.d.ts index 65e9efc910..633f1fa9f7 100644 --- a/api/@ohos.multimodalInput.keyCode.d.ts +++ b/api/@ohos.multimodalInput.keyCode.d.ts @@ -1025,7 +1025,8 @@ export declare enum KeyCode { * KEYCODE_MEDIA_PLAY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * KEYCODE_MEDIA_PLAY diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 113fa39176..c75921ec15 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -444,7 +444,8 @@ declare namespace pointer { * Loading state with dynamic cursor * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Loading state with dynamic cursor @@ -460,7 +461,8 @@ declare namespace pointer { * Running state with dynamic cursor * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Running state with dynamic cursor @@ -564,7 +566,8 @@ declare namespace pointer { * * @interface CustomCursor * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CustomCursor { /** @@ -572,27 +575,30 @@ declare namespace pointer { * * @type { image.PixelMap } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ 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 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - focusY?: number; + focusY?: int; } /** @@ -631,16 +637,17 @@ 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -656,29 +663,31 @@ 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -693,15 +702,16 @@ declare namespace pointer { /** * Obtains the moving speed of the mouse pointer. 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 - 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.Pointer * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -714,13 +724,14 @@ declare namespace pointer { /** * 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 - Permission denied, non-system app called system api. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getPointerSpeed(): Promise; + function getPointerSpeed(): Promise; /** * Obtains the moving speed of the mouse pointer. This API returns the result synchronously. @@ -731,9 +742,10 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getPointerSpeedSync(): number; + function getPointerSpeedSync(): int; /** * Sets the mouse pointer style. This API uses an asynchronous callback to return the result. @@ -779,40 +791,43 @@ 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. * This API returns the result synchronously. * - * @param { number } windowId - Window ID. The default value is -1, indicating the global mouse pointer style. + * @param { int } windowId - Window ID. The default value is -1, indicating the global mouse pointer style. * @returns { PointerStyle } Returns the pointerStyle. * @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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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,7 +850,8 @@ declare namespace pointer { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported; * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setPointerVisible(visible: boolean, callback: AsyncCallback): void; @@ -860,7 +876,8 @@ declare namespace pointer { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported; * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setPointerVisible(visible: boolean): Promise; @@ -872,7 +889,8 @@ 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setPointerVisibleSync(visible: boolean): void; @@ -884,7 +902,8 @@ 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isPointerVisible(callback: AsyncCallback): void; @@ -894,7 +913,8 @@ declare namespace pointer { * @returns { Promise } Promise used to return the visible status of the mouse 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 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isPointerVisible(): Promise; @@ -904,14 +924,15 @@ declare namespace pointer { * @returns { boolean } Visible status of the mouse 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ 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,76 +940,82 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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,71 +1023,77 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getPointerSizeSync(): number; + function getPointerSizeSync(): int; /** * Sets the primary button of the mouse. This API uses an asynchronous callback to return the result. @@ -1072,7 +1105,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setMousePrimaryButton(primary: PrimaryButton, callback: AsyncCallback): void; @@ -1086,7 +1120,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setMousePrimaryButton(primary: PrimaryButton): Promise; @@ -1099,7 +1134,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getMousePrimaryButton(callback: AsyncCallback): void; @@ -1112,7 +1148,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getMousePrimaryButton(): Promise; @@ -1127,7 +1164,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setHoverScrollState(state: boolean, callback: AsyncCallback): void; @@ -1142,7 +1180,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setHoverScrollState(state: boolean): Promise; @@ -1156,7 +1195,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getHoverScrollState(callback: AsyncCallback): void; @@ -1170,50 +1210,54 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -1224,9 +1268,10 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getMouseScrollRows(): Promise; + function getMouseScrollRows(): Promise; /** * Sets the scroll switch of the touchpad. This API uses an asynchronous callback to return the result. @@ -1239,7 +1284,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadScrollSwitch(state: boolean, callback: AsyncCallback): void; @@ -1254,7 +1300,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadScrollSwitch(state: boolean): Promise; @@ -1268,7 +1315,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadScrollSwitch(callback: AsyncCallback): void; @@ -1282,7 +1330,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadScrollSwitch(): Promise; @@ -1298,7 +1347,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadScrollDirection(state: boolean, callback: AsyncCallback): void; @@ -1314,7 +1364,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadScrollDirection(state: boolean): Promise; @@ -1329,7 +1380,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadScrollDirection(callback: AsyncCallback): void; @@ -1344,7 +1396,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadScrollDirection(): Promise; @@ -1359,7 +1412,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadTapSwitch(state: boolean, callback: AsyncCallback): void; @@ -1374,7 +1428,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadTapSwitch(state: boolean): Promise; @@ -1388,7 +1443,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadTapSwitch(callback: AsyncCallback): void; @@ -1402,63 +1458,68 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getTouchpadPointerSpeed(): Promise; + function getTouchpadPointerSpeed(): Promise; /** * Sets the pinch switch of the touchpad. This API uses an asynchronous callback to return the result. @@ -1471,7 +1532,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadPinchSwitch(state: boolean, callback: AsyncCallback): void; @@ -1486,7 +1548,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadPinchSwitch(state: boolean): Promise; @@ -1500,7 +1563,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadPinchSwitch(callback: AsyncCallback): void; @@ -1514,7 +1578,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadPinchSwitch(): Promise; @@ -1529,7 +1594,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadSwipeSwitch(state: boolean, callback: AsyncCallback): void; @@ -1544,7 +1610,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadSwipeSwitch(state: boolean): Promise; @@ -1558,7 +1625,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadSwipeSwitch(callback: AsyncCallback): void; @@ -1572,7 +1640,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadSwipeSwitch(): Promise; @@ -1592,7 +1661,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadRightClickType(type: RightClickType, callback: AsyncCallback): void; @@ -1612,7 +1682,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadRightClickType(type: RightClickType): Promise; @@ -1625,7 +1696,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadRightClickType(callback: AsyncCallback): void; @@ -1638,38 +1710,41 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ 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 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. + * @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. * @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 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -1677,7 +1752,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,9 +1762,10 @@ declare namespace pointer { *
4. Abnormal focusY parameter passed in. * @throws { BusinessError } 26500001 - Invalid windowId. Possible causes: The window id does not belong to the current process. * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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,7 +1778,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadDoubleTapAndDragState(isOpen: boolean, callback: AsyncCallback): void; @@ -1717,7 +1794,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function setTouchpadDoubleTapAndDragState(isOpen: boolean): Promise; @@ -1731,7 +1809,8 @@ declare namespace pointer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadDoubleTapAndDragState(callback: AsyncCallback): void; @@ -1743,7 +1822,8 @@ declare namespace pointer { * @throws { BusinessError } 202 - SystemAPI permission error. * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTouchpadDoubleTapAndDragState(): Promise; } diff --git a/api/@ohos.multimodalInput.shortKey.d.ts b/api/@ohos.multimodalInput.shortKey.d.ts index e906e19254..1d6eea7243 100644 --- a/api/@ohos.multimodalInput.shortKey.d.ts +++ b/api/@ohos.multimodalInput.shortKey.d.ts @@ -26,7 +26,8 @@ import type { AsyncCallback } from './@ohos.base'; * @namespace shortKey * @syscap SystemCapability.MultimodalInput.Input.ShortKey * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace shortKey { @@ -44,9 +45,10 @@ declare namespace shortKey { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.ShortKey * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setKeyDownDuration(businessKey: string, delay: number, callback: AsyncCallback): void; + export declare function setKeyDownDuration(businessKey: string, delay: int, callback: AsyncCallback): void; /** * Sets the delay for starting an ability using shortcut keys. @@ -61,10 +63,10 @@ declare namespace shortKey { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.ShortKey * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setKeyDownDuration(businessKey: string, delay: number): Promise; - + export declare function setKeyDownDuration(businessKey: string, delay: int): Promise; } export default shortKey; -- Gitee From ba74abcef584e3ce8b309388c7b3f7980595407a Mon Sep 17 00:00:00 2001 From: KangPeng Date: Mon, 8 Sep 2025 09:11:25 +0800 Subject: [PATCH 2/4] input arkts1.2 Signed-off-by: KangPeng --- api/@ohos.multimodalInput.inputMonitor.d.ts | 3 ++- api/@ohos.multimodalInput.shortKey.d.ts | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 7f502b2e05..78132ed194 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -237,7 +237,8 @@ declare namespace inputMonitor { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'pinch', receiver: Callback): void; diff --git a/api/@ohos.multimodalInput.shortKey.d.ts b/api/@ohos.multimodalInput.shortKey.d.ts index 1d6eea7243..a9f6e8355d 100644 --- a/api/@ohos.multimodalInput.shortKey.d.ts +++ b/api/@ohos.multimodalInput.shortKey.d.ts @@ -29,7 +29,6 @@ import type { AsyncCallback } from './@ohos.base'; * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - declare namespace shortKey { /** * Sets the delay for starting an ability using shortcut keys. @@ -48,7 +47,7 @@ declare namespace shortKey { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export declare function setKeyDownDuration(businessKey: string, delay: int, callback: AsyncCallback): void; + function setKeyDownDuration(businessKey: string, delay: int, callback: AsyncCallback): void; /** * Sets the delay for starting an ability using shortcut keys. @@ -66,7 +65,7 @@ declare namespace shortKey { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export declare function setKeyDownDuration(businessKey: string, delay: int): Promise; + function setKeyDownDuration(businessKey: string, delay: int): Promise; } export default shortKey; -- Gitee From 5efe579a4521c5eb9d862c80d2c6243315dd2d0a Mon Sep 17 00:00:00 2001 From: KangPeng Date: Wed, 10 Sep 2025 14:23:43 +0800 Subject: [PATCH 3/4] xts build error Signed-off-by: KangPeng --- kits/@kit.InputKit.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kits/@kit.InputKit.d.ts b/kits/@kit.InputKit.d.ts index 50e555b656..43a0c7d3e1 100644 --- a/kits/@kit.InputKit.d.ts +++ b/kits/@kit.InputKit.d.ts @@ -43,9 +43,6 @@ export { SourceType, ThreeFingersSwipe, ThreeFingersTap, ToolType, Touch, TouchEvent, inputConsumer, inputDevice, pointer, SwipeInward }; -/*** endif */ - -/* 1.1 独有部分 */ import infraredEmitter from '@ohos.multimodalInput.infraredEmitter'; import inputDeviceCooperate from '@ohos.multimodalInput.inputDeviceCooperate'; import inputEventClient from '@ohos.multimodalInput.inputEventClient'; @@ -53,4 +50,7 @@ import inputMonitor from '@ohos.multimodalInput.inputMonitor'; import shortKey from '@ohos.multimodalInput.shortKey'; export { inputDeviceCooperate, inputEventClient, inputMonitor, shortKey, infraredEmitter, -}; \ No newline at end of file +}; +/*** endif */ + +/* 1.1 独有部分 */ -- Gitee From f325fda78334fe0b2def412c7512fc8bbf45e1ce Mon Sep 17 00:00:00 2001 From: KangPeng Date: Wed, 10 Sep 2025 19:34:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=A1=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KangPeng --- api/@ohos.multimodalInput.inputMonitor.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 78132ed194..10e5c80359 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -20,9 +20,7 @@ import { Callback } from './@ohos.base'; import { MouseEvent } from './@ohos.multimodalInput.mouseEvent'; -/*** if arkts 1.1 */ import type display from './@ohos.display'; -/*** endif */ import type { TouchEvent } from './@ohos.multimodalInput.touchEvent'; import type { Rotate, Pinch, ThreeFingersSwipe, FourFingersSwipe, SwipeInward } from './@ohos.multimodalInput.gestureEvent'; import type { ThreeFingersTap, TouchGestureEvent } from './@ohos.multimodalInput.gestureEvent'; -- Gitee