diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 973a4404e3..b7e0d8f3c9 100644 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -49,8 +49,9 @@ declare namespace inputConsumer { * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @param type type of the inputevent about input which is to be subscribed. - * @param keyOption the key events about input which is to be subscribed. + * @param keyOptions the key events about input which is to be subscribed. * @param callback callback function, receive reported data. + * @throws {BusinessError} 401 - Parameter error. */ function on(type: "key", keyOptions: KeyOptions, callback: Callback): void; @@ -61,8 +62,9 @@ declare namespace inputConsumer { * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @param type type of the inputevent about input which is to be subscribed. - * @param keyOption the key events about input which is to be subscribed. + * @param keyOptions the key events about input which is to be subscribed. * @param callback callback function, receive reported data. + * @throws {BusinessError} 401 - Parameter error. */ function off(type: "key", keyOptions: KeyOptions, callback?: Callback): void; } diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index ab4051ef4e..2d3cc32091 100755 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -17,16 +17,21 @@ import { Callback, AsyncCallback } from "./basic"; import { KeyCode } from "./@ohos.multimodalInput.keyCode" /** -* The input device management module is configured to obtain an ID and device information of an input device. -* -* @since 8 -* @syscap SystemCapability.MultimodalInput.Input.InputDevice -* @import import inputDevice from '@ohos.multimodalInput.inputDevice'; -*/ - + * The input device management module is configured to obtain an ID and device information of an input device. + * + * @since 8 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @import import inputDevice from '@ohos.multimodalInput.inputDevice'; + */ declare namespace inputDevice { + /** + * @since 9 + */ type ChangedType = 'add' | 'remove'; + /** + * @since 9 + */ type SourceType = 'keyboard' | 'mouse' | 'touchpad' | 'touchscreen' | 'joystick' | 'trackball'; /** @@ -89,6 +94,7 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param type Type of the input device event, which is **change**. * @return Callback for the input device event. + * @throws {BusinessError} 401 - Parameter error. */ function on(type: "change", listener: Callback): void; @@ -99,6 +105,7 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param type Type of the input device event, which is **change**. * @return Callback for the input device event. + * @throws {BusinessError} 401 - Parameter error. */ function off(type: "change", listener?: Callback): void; @@ -107,6 +114,7 @@ declare namespace inputDevice { * For example, a touchscreen may report information such as x, y, and pressure, * which indicate the x-axis coordinate, y-axis coordinate, and pressure, respectively. * + * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param source Input source type of the axis. For example, if a mouse reports an x-axis event, the source of the x-axis is the mouse. * @param axis Type of the axis. for example, the x-axis, y-axis, and pressure axis. @@ -156,6 +164,7 @@ declare namespace inputDevice { /** * Defines the information about an input device. * + * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param name Name of the input device. * @param sources Source type supported by the input device. For example, if a keyboard is attached with a touchpad, the device has two input sources: keyboard and touchpad. @@ -224,9 +233,20 @@ declare namespace inputDevice { * * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @param callback callback function, receive reported data + * @param callback Callback function, receive reported data + * @deprecated since 9 + * @useinstead ohos.multimodalInput.inputDevice#getDeviceList */ function getDeviceIds(callback: AsyncCallback>): void; + + /** + * Obtains the IDs of all input devices. + * + * @since 8 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @deprecated since 9 + * @useinstead ohos.multimodalInput.inputDevice#getDeviceList + */ function getDeviceIds(): Promise>; /** @@ -235,11 +255,62 @@ declare namespace inputDevice { * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param deviceId ID of the input device whose information is to be obtained. - * @param callback callback function, receive reported data + * @param callback Callback function, receive reported data + * @deprecated since 9 + * @useinstead ohos.multimodalInput.inputDevice#getDeviceInfo */ function getDevice(deviceId: number, callback: AsyncCallback): void; + + /** + * Obtain the information about an input device. + * + * @since 8 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param deviceId ID of the input device whose information is to be obtained. + * @deprecated since 9 + * @useinstead ohos.multimodalInput.inputDevice#getDeviceInfo + */ function getDevice(deviceId: number): Promise; + /** + * Obtains the IDs of all input devices. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param callback Callback function, receive reported data + * @throws {BusinessError} 401 - Parameter error. + */ + function getDeviceList(callback: AsyncCallback>): void; + + /** + * Obtains the IDs of all input devices. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + */ + function getDeviceList(): Promise>; + + /** + * Obtain the information about an input device. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param deviceId ID of the input device whose information is to be obtained. + * @param callback Callback function, receive reported data + * @throws {BusinessError} 401 - Parameter error. + */ + function getDeviceInfo(deviceId: number, callback: AsyncCallback): void; + + /** + * Obtain the information about an input device. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param deviceId ID of the input device whose information is to be obtained. + * @throws {BusinessError} 401 - Parameter error. + */ + function getDeviceInfo(deviceId: number): Promise; + /** * Checks whether the specified key codes of an input device are supported. * @@ -248,8 +319,20 @@ declare namespace inputDevice { * @param deviceId ID of the input device. * @param keys Key codes of the input device, You can query a maximum of five key codes at a time. * @return Returns a result indicating whether the specified key codes are supported. + * @throws {BusinessError} 401 - Parameter error. */ function supportKeys(deviceId: number, keys: Array, callback: Callback>): void; + + /** + * Checks whether the specified key codes of an input device are supported. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param deviceId ID of the input device. + * @param keys Key codes of the input device, You can query a maximum of five key codes at a time. + * @return Returns a result indicating whether the specified key codes are supported. + * @throws {BusinessError} 401 - Parameter error. + */ function supportKeys(deviceId: number, keys: Array): Promise>; /** @@ -259,8 +342,19 @@ declare namespace inputDevice { * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param deviceId ID of the specified input device. * @return Returns the keyboard type. + * @throws {BusinessError} 401 - Parameter error. */ function getKeyboardType(deviceId: number, callback: AsyncCallback): void; + + /** + * Query the keyboard type of the input device. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param deviceId ID of the specified input device. + * @return Returns the keyboard type. + * @throws {BusinessError} 401 - Parameter error. + */ function getKeyboardType(deviceId: number): Promise; } diff --git a/api/@ohos.multimodalInput.inputDeviceCooperate.d.ts b/api/@ohos.multimodalInput.inputDeviceCooperate.d.ts index c7e8abcecf..8512e44f1e 100755 --- a/api/@ohos.multimodalInput.inputDeviceCooperate.d.ts +++ b/api/@ohos.multimodalInput.inputDeviceCooperate.d.ts @@ -16,12 +16,11 @@ import { AsyncCallback } from "./basic"; declare namespace inputDeviceCooperate { - /** * Enumerates mouse traversal events. * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.Cooperator. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator * @systemapi hide for inner use. */ enum EventMsg { @@ -63,50 +62,97 @@ declare namespace inputDeviceCooperate { /** * Enable or disable the mouse traversal. - * + * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Cooperator * @systemapi hide for inner use * @param enable Whether to enable mouse traversal. * @param callback Asynchronous callback function. + * @throws {BusinessError} 401 - Parameter error. */ function enable(enable: boolean, callback: AsyncCallback): void; + + /** + * Enable or disable the mouse traversal. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @param enable Whether to enable mouse traversal. + * @throws {BusinessError} 401 - Parameter error. + */ function enable(enable: boolean): Promise; /** * Starts mouse traversal. - * + * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Cooperator * @systemapi hide for inner use * @param sinkDeviceDescriptor Descriptor of the target network for mouse traversal. * @param srcInputDeviceId Identifier of the peripheral device for mouse traversal. * @param callback Asynchronous callback function. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 4400001 - Incorrect descriptor for the target device. + * @throws {BusinessError} 4400002 - Screen hop failed. */ function start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback): void; + + /** + * Starts mouse traversal. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @param sinkDeviceDescriptor Descriptor of the target network for mouse traversal. + * @param srcInputDeviceId Identifier of the peripheral device for mouse traversal. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 4400001 - Incorrect descriptor for the target device. + * @throws {BusinessError} 4400002 - Screen hop failed. + */ function start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise; /** * Stops mouse traversal. - * + * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Cooperator * @systemapi hide for inner use * @param callback Asynchronous callback function. + * @throws {BusinessError} 401 - Parameter error. */ function stop(callback: AsyncCallback): void; + + /** + * Stops mouse traversal. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + */ function stop(): Promise; /** * Obtains the status of the mouse traversal switch. - * + * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Cooperator * @systemapi hide for inner use * @param deviceDescriptor Descriptor of the target network for mouse traversal. * @param callback Asynchronous callback used to receive the status of the mouse traversal switch. + * @throws {BusinessError} 401 - Parameter error. */ function getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void; + + /** + * Obtains the status of the mouse traversal switch. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @param deviceDescriptor Descriptor of the target network for mouse traversal. + * @throws {BusinessError} 401 - Parameter error. + */ function getState(deviceDescriptor: string): Promise<{ state: boolean }>; /** @@ -117,6 +163,7 @@ declare namespace inputDeviceCooperate { * @systemapi hide for inner use * @param type Registration type. * @param callback Asynchronous callback used to receive mouse traversal events. + * @throws {BusinessError} 401 - Parameter error. */ function on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void; @@ -128,6 +175,7 @@ declare namespace inputDeviceCooperate { * @systemapi hide for inner use * @param type Registration type. * @param callback Asynchronous callback used to return the result. + * @throws {BusinessError} 401 - Parameter error. */ function off(type: 'cooperation', callback?: AsyncCallback): void; diff --git a/api/@ohos.multimodalInput.inputEvent.d.ts b/api/@ohos.multimodalInput.inputEvent.d.ts index e085a5f969..a335447db2 100755 --- a/api/@ohos.multimodalInput.inputEvent.d.ts +++ b/api/@ohos.multimodalInput.inputEvent.d.ts @@ -14,13 +14,12 @@ */ /** -* InputEvent -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import InputEvent from '@ohos.multimodalInput.inputEvent'; -*/ - + * InputEvent + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import InputEvent from '@ohos.multimodalInput.inputEvent'; + */ export declare interface InputEvent { /** * Unique event ID generated by the server diff --git a/api/@ohos.multimodalInput.inputEventClient.d.ts b/api/@ohos.multimodalInput.inputEventClient.d.ts index d6c8a7c8c1..589bb0c18c 100644 --- a/api/@ohos.multimodalInput.inputEventClient.d.ts +++ b/api/@ohos.multimodalInput.inputEventClient.d.ts @@ -26,6 +26,7 @@ declare namespace inputEventClient { /** * Defines event of key that user want to inject. * + * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @param isPressed The status of key. @@ -47,6 +48,7 @@ declare namespace inputEventClient { * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use * @param KeyEvent the key event to be injected. + * @throws {BusinessError} 401 - Parameter error. */ function injectEvent({KeyEvent: KeyEvent}): void; } diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index b13486feeb..f61123da73 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -44,6 +44,8 @@ declare namespace inputMonitor { * @permission ohos.permission.INPUT_MONITORING * @param type Event type. * @param receiver Callback used to receive the reported data. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 201 - Permission denied. */ function on(type:"touch", receiver:TouchEventReceiver):void; @@ -55,6 +57,8 @@ declare namespace inputMonitor { * @permission ohos.permission.INPUT_MONITORING * @param type Event type. * @param receiver Callback used to receive the reported data. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 201 - Permission denied. */ function on(type:"mouse", receiver:Callback):void; @@ -66,6 +70,8 @@ declare namespace inputMonitor { * @permission ohos.permission.INPUT_MONITORING * @param type Event type. * @param receiver Callback used to receive the reported data. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 201 - Permission denied. */ function off(type:"touch", receiver?:TouchEventReceiver):void; @@ -77,7 +83,9 @@ declare namespace inputMonitor { * @permission ohos.permission.INPUT_MONITORING * @param type Event type. * @param receiver Callback used to receive the reported data. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 201 - Permission denied. */ function off(type:"mouse", receiver?:Callback):void; } -export default inputMonitor; +export default inputMonitor; \ No newline at end of file diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts index 4f541b7760..8598db12bf 100755 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -16,12 +16,12 @@ import { InputEvent } from "./@ohos.multimodalInput.inputEvent" import { KeyCode } from "./@ohos.multimodalInput.keyCode" /** -* Action -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Action} from '@ohos.multimodalInput.mouseEvent'; -*/ + * Action + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {Action} from '@ohos.multimodalInput.mouseEvent'; + */ export declare enum Action { /** * Cancel @@ -60,12 +60,12 @@ export declare enum Action { } /** -* Button -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Button} from '@ohos.multimodalInput.mouseEvent'; -*/ + * Mouse button + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {Button} from '@ohos.multimodalInput.mouseEvent'; + */ export declare enum Button { /** * Left button on the mouse @@ -109,12 +109,12 @@ export declare enum Button { } /** -* Axis -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Axis} from '@ohos.multimodalInput.mouseEvent'; -*/ + * Axis + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {Axis} from '@ohos.multimodalInput.mouseEvent'; + */ export declare enum Axis { /** * Vertical scroll axis @@ -133,12 +133,12 @@ export declare enum Axis { } /** -* AxisValue -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {AxisValue} from '@ohos.multimodalInput.mouseEvent'; -*/ + * AxisValue + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {AxisValue} from '@ohos.multimodalInput.mouseEvent'; + */ export declare interface AxisValue { /** * Axis type @@ -152,12 +152,12 @@ export declare interface AxisValue { } /** -* MouseEvent -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {MouseEvent} from '@ohos.multimodalInput.mouseEvent'; -*/ + * MouseEvent + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {MouseEvent} from '@ohos.multimodalInput.mouseEvent'; + */ export declare interface MouseEvent extends InputEvent { /** * Mouse event action diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 63636fd133..55fa1863b6 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -16,14 +16,18 @@ import { AsyncCallback } from "./basic"; /** -* Declares interfaces related to mouse pointer attributes. -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Pointer -* @import import pointer from '@ohos.multimodalInput.pointer'; -*/ - + * Declares interfaces related to mouse pointer attributes. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @import import pointer from '@ohos.multimodalInput.pointer'; + */ declare namespace pointer { + /** + * Pointer style. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + */ enum PointerStyle { /** * Default @@ -81,27 +85,27 @@ declare namespace pointer { SOUTH_WEST, /** - * North-east and south-west arrow + * Northeast and southwest adjustment */ NORTH_EAST_SOUTH_WEST, /** - * North-west and south-east arrow + * Northwest and southeast adjustment */ NORTH_WEST_SOUTH_EAST, /** - * Cross + * Cross (accurate selection) */ CROSS, /** - * Copy cursor + * Copy */ CURSOR_COPY, /** - * Forbid cursor + * Forbid */ CURSOR_FORBID, @@ -111,17 +115,17 @@ declare namespace pointer { COLOR_SUCKER, /** - * Hand grabbing + * Grabbing hand */ HAND_GRABBING, /** - * Hand open + * Opening hand */ HAND_OPEN, /** - * Hand pointing + * Hand-shaped pointer */ HAND_POINTING, @@ -136,27 +140,27 @@ declare namespace pointer { MOVE, /** - * Resize left and right + * Left and right resizing */ RESIZE_LEFT_RIGHT, /** - * Resize up and down + * Up and down resizing */ RESIZE_UP_DOWN, /** - * Screenshot selection + * Screenshot crosshair */ SCREENSHOT_CHOOSE, /** - * Screenshot cursor + * Screenshot */ SCREENSHOT_CURSOR, /** - * Text cursor + * Text selection */ TEXT_CURSOR, @@ -171,52 +175,52 @@ declare namespace pointer { ZOOM_OUT, /** - * East arrow of the middle mouse button + * Scrolling east */ MIDDLE_BTN_EAST, /** - * West arrow of the middle mouse button + * Scrolling west */ MIDDLE_BTN_WEST, /** - * South arrow of the middle mouse button + * Scrolling south */ MIDDLE_BTN_SOUTH, /** - * North arrow of the middle mouse button + * Scrolling north */ MIDDLE_BTN_NORTH, /** - * North-south arrow of the middle mouse button + * Scrolling north and south */ MIDDLE_BTN_NORTH_SOUTH, /** - * North-east arrow of the middle mouse button + * Scrolling northeast */ MIDDLE_BTN_NORTH_EAST, /** - * North-west arrow of the middle mouse button + * Scrolling northwest */ MIDDLE_BTN_NORTH_WEST, /** - * South-east arrow of the middle mouse button + * Scrolling southeast */ MIDDLE_BTN_SOUTH_EAST, /** - * South-west arrow of the middle mouse button + * Scrolling southwest */ MIDDLE_BTN_SOUTH_WEST, /** - * North-west and south-east arrow of the middle mouse button + * Moving as a cone in four directions */ MIDDLE_BTN_NORTH_SOUTH_WEST_EAST, } @@ -228,6 +232,7 @@ declare namespace pointer { * @systemapi hide for inner use * @param speed Pointer moving speed. * @param callback Callback used to return the result. + * @throws {BusinessError} 401 - Parameter error. */ function setPointerSpeed(speed: number, callback: AsyncCallback): void; @@ -238,6 +243,7 @@ declare namespace pointer { * @systemapi hide for inner use * @param speed Pointer moving speed. * @return Returns the result through a promise. + * @throws {BusinessError} 401 - Parameter error. */ function setPointerSpeed(speed: number): Promise; @@ -247,6 +253,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @systemapi hide for inner use * @param callback Callback used to return the result. + * @throws {BusinessError} 401 - Parameter error. */ function getPointerSpeed(callback: AsyncCallback): void; @@ -266,6 +273,7 @@ declare namespace pointer { * @param windowId Window ID. * @param pointerStyle Pointer style. * @param callback Callback used to return the result. + * @throws {BusinessError} 401 - Parameter error. */ function setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback): void; @@ -276,6 +284,7 @@ declare namespace pointer { * @param windowId Window ID. * @param pointerStyle Pointer style. * @return Returns the result through a promise. + * @throws {BusinessError} 401 - Parameter error. */ function setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise; @@ -285,6 +294,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param windowId Window ID. * @param callback Callback used to return the result. + * @throws {BusinessError} 401 - Parameter error. */ function getPointerStyle(windowId: number, callback: AsyncCallback): void; @@ -294,6 +304,7 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param windowId Window ID. * @return Returns the result through a promise. + * @throws {BusinessError} 401 - Parameter error. */ function getPointerStyle(windowId: number): Promise; @@ -304,8 +315,19 @@ declare namespace pointer { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param visible Whether the pointer icon is visible. The value true indicates that the pointer icon is visible, * and the value false indicates the opposite. + * @throws {BusinessError} 401 - Parameter error. */ function setPointerVisible(visible: boolean, callback: AsyncCallback): void; + + /** + * Sets whether the pointer icon is visible. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @param visible Whether the pointer icon is visible. The value true indicates that the pointer icon is visible, + * and the value false indicates the opposite. + * @throws {BusinessError} 401 - Parameter error. + */ function setPointerVisible(visible: boolean): Promise; /** @@ -314,8 +336,17 @@ declare namespace pointer { * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer * @return Returns true if the pointer icon is visible; returns false otherwise. + * @throws {BusinessError} 401 - Parameter error. */ function isPointerVisible(callback: AsyncCallback): void; + + /** + * Checks whether the pointer icon is visible. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @return Returns true if the pointer icon is visible; returns false otherwise. + */ function isPointerVisible(): Promise; } diff --git a/api/@ohos.multimodalInput.touchEvent.d.ts b/api/@ohos.multimodalInput.touchEvent.d.ts index 220172d1b3..bf637da06e 100755 --- a/api/@ohos.multimodalInput.touchEvent.d.ts +++ b/api/@ohos.multimodalInput.touchEvent.d.ts @@ -15,12 +15,12 @@ import { InputEvent } from './@ohos.multimodalInput.inputEvent' /** -* Action -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Action} from '@ohos.multimodalInput.touchEvent'; -*/ + * Action + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {Action} from '@ohos.multimodalInput.touchEvent'; + */ export declare enum Action { /** * Touch cancelled @@ -44,12 +44,12 @@ export declare enum Action { } /** -* ToolType -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {ToolType} from '@ohos.multimodalInput.touchEvent'; -*/ + * ToolType + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {ToolType} from '@ohos.multimodalInput.touchEvent'; + */ export declare enum ToolType { /** * Finger @@ -90,12 +90,12 @@ export declare enum ToolType { } /** -* SourceType -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {SourceType} from '@ohos.multimodalInput.touchEvent'; -*/ + * SourceType + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {SourceType} from '@ohos.multimodalInput.touchEvent'; + */ export declare enum SourceType { /** * Touchscreen @@ -114,12 +114,12 @@ export declare enum SourceType { } /** -* Touch -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Touch} from '@ohos.multimodalInput.touchEvent'; -*/ + * Touch + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {Touch} from '@ohos.multimodalInput.touchEvent'; + */ export declare interface Touch { /** * Pointer identifier @@ -213,12 +213,12 @@ export declare interface Touch { } /** -* TouchEvent -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {TouchEvent} from '@ohos.multimodalInput.touchEvent'; -*/ + * TouchEvent + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @import import {TouchEvent} from '@ohos.multimodalInput.touchEvent'; + */ export declare interface TouchEvent extends InputEvent { /** * Touch action