mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
mmi-api-setCustomCursor_api-Improve
Signed-off-by:xixian_2023<xixian@huawei.com>
This commit is contained in:
parent
5b5e1bcb27
commit
71968609cb
32
api/@ohos.multimodalInput.inputEventClient.d.ts
vendored
32
api/@ohos.multimodalInput.inputEventClient.d.ts
vendored
@ -110,6 +110,38 @@ declare namespace inputEventClient {
|
||||
touchEvent: TouchEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines event of key that user want to inject.
|
||||
*
|
||||
* @interface KeyEventData
|
||||
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
|
||||
* @systemapi hide for inner use
|
||||
* @since 11
|
||||
*/
|
||||
interface KeyEventData {
|
||||
/**
|
||||
* Inject key event.
|
||||
*
|
||||
* @type { KeyEvent }
|
||||
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
|
||||
* @systemapi hide for inner use
|
||||
* @since 11
|
||||
*/
|
||||
keyEvent: KeyEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject system keys.
|
||||
*
|
||||
* @param { KeyEventData } keyEvent - the key event to be injected.
|
||||
* @throws { BusinessError } 202 - SystemAPI permission error.
|
||||
* @throws { BusinessError } 401 - Parameter error.
|
||||
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
|
||||
* @systemapi hide for inner use
|
||||
* @since 11
|
||||
*/
|
||||
function injectKeyEvent(keyEvent: KeyEventData): void;
|
||||
|
||||
/**
|
||||
* Inject system keys.
|
||||
*
|
||||
|
28
api/@ohos.multimodalInput.pointer.d.ts
vendored
28
api/@ohos.multimodalInput.pointer.d.ts
vendored
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
import type { AsyncCallback } from './@ohos.base';
|
||||
import type image from './@ohos.multimedia.image';
|
||||
|
||||
/**
|
||||
* Declares interfaces related to mouse pointer attributes.
|
||||
@ -1286,6 +1287,33 @@ declare namespace pointer {
|
||||
* @since 10
|
||||
*/
|
||||
function getTouchpadRightClickType(): Promise<RightClickType>;
|
||||
|
||||
/**
|
||||
* Sets the custom cursor.
|
||||
*
|
||||
* @param { number } windowId - Window ID.
|
||||
* @param { image.PixelMap } pixelMap - the cursor of pixelMap.
|
||||
* @param { number } focusX - focus x.
|
||||
* @param { number } focusY - focus y.
|
||||
* @returns { Promise<void> } Returns the result through a promise.
|
||||
* @throws { BusinessError } 401 - Parameter error.
|
||||
* @syscap SystemCapability.MultimodalInput.Input.Pointer
|
||||
* @since 11
|
||||
*/
|
||||
function setCustomCursor(windowId: number, pixelMap: image.PixelMap, focusX?: number, focusY?: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Sets the custom cursor through sync mode.
|
||||
*
|
||||
* @param { number } windowId - Window ID.
|
||||
* @param { image.PixelMap } pixelMap - the cursor of pixelMap.
|
||||
* @param { number } focusX - focus x.
|
||||
* @param { number } focusY - focus y.
|
||||
* @throws { BusinessError } 401 - Parameter error.
|
||||
* @syscap SystemCapability.MultimodalInput.Input.Pointer
|
||||
* @since 11
|
||||
*/
|
||||
function setCustomCursorSync(windowId: number, pixelMap: image.PixelMap, focusX?: number, focusY?: number): void;
|
||||
}
|
||||
|
||||
export default pointer;
|
Loading…
Reference in New Issue
Block a user