From 0f6cd26dd0d6d5ab81bd92279eba0b21eef2a745 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Fri, 20 May 2022 02:44:21 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E6=9C=AA=E5=AE=9E=E7=8E=B0=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: If3a7b793dd14668dde4fc15207d4921708bf76ca --- api/@ohos.multimodalInput.axisEvent.d.ts | 152 ----------- ...ohos.multimodalInput.distributedInput.d.ts | 104 ------- api/@ohos.multimodalInput.inputDevice.d.ts | 19 -- api/@ohos.multimodalInput.mouseEvent.d.ts | 258 ------------------ 4 files changed, 533 deletions(-) delete mode 100644 api/@ohos.multimodalInput.axisEvent.d.ts delete mode 100644 api/@ohos.multimodalInput.distributedInput.d.ts mode change 100644 => 100755 api/@ohos.multimodalInput.inputDevice.d.ts delete mode 100644 api/@ohos.multimodalInput.mouseEvent.d.ts diff --git a/api/@ohos.multimodalInput.axisEvent.d.ts b/api/@ohos.multimodalInput.axisEvent.d.ts deleted file mode 100644 index ba6df294c0..0000000000 --- a/api/@ohos.multimodalInput.axisEvent.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -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'; -*/ -export declare enum Action { - /** - * cancel - */ - CANCEL = 0, - - /** - * axis begin - */ - AXIS_BEGIN = 4, - - /** - * axis update - */ - AXIS_UPDATE = 5, - - /** - * axis end - */ - AXIS_END = 6, -} - -/** -* Axis -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Axis} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare enum Axis { - /** - * scroll vertical - */ - SCROLL_VERTICAL = 0, - - /** - * scroll horizontal - */ - SCROLL_HORIZONTAL = 1, - - /** - * pinch - */ - PINCH = 2, -} - -/** -* AxisValue -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {AxisValue} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare interface AxisValue { - /** - * axis - */ - axis: Axis; - - /** - * value - */ - value: number -} - -/** -* MouseEvent -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {MouseEvent} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare interface MouseEvent extends InputEvent { - /** - * mouse action - */ - action: Action; - - /** - * axes data - */ - axes: AxisValue[]; - - /** - * List of keys that are currently in the pressed state. - */ - pressedKeys: KeyCode[]; - - /** - * whether ctrlKey is in pressed state. - */ - readonly ctrlKey: boolean; - - /** - * whether altKey is in pressed state. - */ - readonly altKey: boolean; - - /** - * whether shiftKey is in pressed state. - */ - readonly shiftKey: boolean; - - /** - * whether logoKey is in pressed state. - */ - readonly logoKey: boolean; - - /** - * whether fnKey is in pressed state. - */ - readonly fnKey: boolean; - - /** - * whether capsLock is in the active state. - */ - capsLock: boolean; - - /** - * whether numLock is in the active state. - */ - numLock: boolean; - - /** - * whether scrollLock is in the active state. - */ - scrollLock: boolean; -} \ No newline at end of file diff --git a/api/@ohos.multimodalInput.distributedInput.d.ts b/api/@ohos.multimodalInput.distributedInput.d.ts deleted file mode 100644 index f526134bc7..0000000000 --- a/api/@ohos.multimodalInput.distributedInput.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS; -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import { AsyncCallback } from "./basic"; - -/** - * Distributed input management module for interface calls with distributed capabilities. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.RemoteInputDevice - * @import import distributedInput from '@ohos.multimodalInput.distributedInput', - */ -declare namespace distributedInput { - enum InputSource { - /** - * mouse - */ - MOUSE = 0, - - /** - * keyboard - */ - KEYBOARD = 1, - - /** - * touch screen - */ - TOUCH_SCREEN = 2, - - /** - * touch pad - */ - TOUCH_PAD = 3, - } - - /** - * Example Query the input capability of a distributed device. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.RemoteInputDevice - * @param deviceId Represents the ID of the device that queries the distributed input capability. - * @return - - */ - function getRemoteInputAbility(deviceId: number, callback: AsyncCallback>): void; - function getRemoteInputAbility(deviceId: number): Promise>; - - /** - * Prepare for distribution. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.RemoteInputDevice - * @param deviceId Indicates the ID of the device to be distributed. - * @return - - */ - function prepareRemoteInput(deviceId: number, callback: AsyncCallback): void; - function prepareRemoteInput(deviceId: number): Promise; - - /** - * Cancel ready distributed. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.RemoteInputDevice - * @param deviceId Indicates the ID of the device to be distributed. - * @return - - */ - function unprepareRemoteInput(deviceId: number, callback: AsyncCallback): void; - function unprepareRemoteInput(deviceId: number): Promise; - - /** - * Start distributed. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.RemoteInputDevice - * @param deviceId Represents the ID of the device that started the distribution. - * @return - - */ - function startRemoteInput(deviceId: number, inputSources: Array, callback: AsyncCallback): void; - function startRemoteInput(deviceId: number, inputSources: Array): Promise; - - /** - * Stop distribution. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.RemoteInputDevice - * @param deviceId Indicates the ID of the device that stopped distribution. - * @return - - */ - function stopRemoteInput(deviceId: number, inputSources: Array, callback: AsyncCallback): void; - function stopRemoteInput(deviceId: number, inputSources: Array): Promise; -} - -export default distributedInput; \ No newline at end of file diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts old mode 100644 new mode 100755 index b16a830ab4..8765906a77 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -248,25 +248,6 @@ declare namespace inputDevice { function supportKeys(deviceId: number, keys: Array, callback: Callback>): void; function supportKeys(deviceId: number, keys: Array): Promise>; - /** - * Set the speed of cursor movement. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @param speed Speed of cursor movement. - */ - function setPointerSpeed(speed: number, callback: AsyncCallback): void; - function setPointerSpeed(speed: number): Promise; - - /** - * Gets the cursor movement speed. - * - * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.InputDevice - */ - function getPointerSpeed(callback: AsyncCallback): void; - function getPointerSpeed(): Promise; - /** * Query the keyboard type of the input device. * diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts deleted file mode 100644 index c5ee7f9963..0000000000 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -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'; -*/ -export declare enum Action { - /** - * cancel - */ - CANCEL = 0, - - /** - * mouse move - */ - MOVE = 1, - - /** - * the mouse button is down - */ - BUTTON_DOWN = 2, - - /** - * Mouse button up - */ - BUTTON_UP = 3, - - /** - * mouse associated axis event begins - */ - AXIS_BEGIN = 4, - - /** - * mouse associated axis events updated - */ - AXIS_UPDATE = 5, - - /** - * mouse associated axis event ends - */ - AXIS_END = 6, -} - -/** -* Button -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Button} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare enum Button { - /** - * the left mouse button - */ - LEFT = 0, - - /** - * the middle mouse button - */ - MIDDLE = 1, - - /** - * the right mouse button - */ - RIGHT = 2, - - /** - * side mouse button - */ - SIDE = 3, - - /** - * mouse extension button - */ - EXTRA = 4, - - /** - * mouse forward button - */ - FORWARD = 5, - - /** - * mouse back button - */ - BACK = 6, - - /** - * mouse task button - */ - TASK = 7 -} - -/** -* Axis -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {Axis} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare enum Axis { - /** - * scroll vertical - */ - SCROLL_VERTICAL = 0, - - /** - * scroll horizontal - */ - SCROLL_HORIZONTAL = 1, - - /** - * pinch - */ - PINCH = 2, -} - -/** -* AxisValue -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {AxisValue} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare interface AxisValue { - /** - * axis type - */ - axis: Axis; - - /** - * The value of the axis - */ - value: number -} - -/** -* MouseEvent -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Core -* @import import {MouseEvent} from '@ohos.multimodalInput.mouseEvent'; -*/ -export declare interface MouseEvent extends InputEvent { - /** - * mouse event action - */ - action: Action; - - /** - * the x coordinate of the mouse cursor in the screen - */ - screenX: number; - - /** - * the y coordinate of the mouse cursor in the screen - */ - screenY: number; - - /** - * the x coordinate of the mouse window - */ - windowX: number; - - /** - * the y coordinate of the mouse window - */ - windowY: number; - - /** - * the relative X offset from the last mouse position reported. At the edge of the screen, - * this value may be less than the coordinate difference reported by the two mice - */ - rawDeltaX: number; - - /** - * the relative Y offset from the last mouse position reported. At the edge of the screen, - * this value may be less than the coordinate difference reported by the two mice - */ - rawDeltaY: number; - - /** - * a button to press or up - */ - button: Button; - - /** - * the button that is currently in the pressed state - */ - pressedButtons: Button[]; - - /** - * The current action for AxisBegin/AxisUpdate/AxisEnd, the axis of the relevant data - */ - axes: AxisValue[]; - - /** - * list of keys that are currently in the pressed state - */ - pressedKeys: KeyCode[]; - - /** - * whether ctrlKey is in down state - */ - ctrlKey: boolean; - - /** - * whether altKey is in down state - */ - altKey: boolean; - - /** - * whether shiftKey is in down state - */ - shiftKey: boolean; - - /** - * whether logoKey is in down state - */ - logoKey: boolean; - - /** - * whether fnKey is in down state - */ - fnKey:boolean - - /** - * whether capsLock is in the active state. - */ - capsLock:boolean - - /** - * whether numLock is in the active state. - */ - numLock:boolean - - /** - * whether scrollLock is in the active state. - */ - scrollLock:boolean -} \ No newline at end of file -- Gitee From 3ddebeba0f864d38d877ce86eff48cca6ccc8413 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Fri, 20 May 2022 03:06:01 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I896e305ef4cece4c458c4a9d5aae7ea239856fca --- api/@ohos.multimodalInput.mouseEvent.d.ts | 258 ++++++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 api/@ohos.multimodalInput.mouseEvent.d.ts diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts new file mode 100644 index 0000000000..c5ee7f9963 --- /dev/null +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -0,0 +1,258 @@ +/* +* Copyright (c) 2022 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +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'; +*/ +export declare enum Action { + /** + * cancel + */ + CANCEL = 0, + + /** + * mouse move + */ + MOVE = 1, + + /** + * the mouse button is down + */ + BUTTON_DOWN = 2, + + /** + * Mouse button up + */ + BUTTON_UP = 3, + + /** + * mouse associated axis event begins + */ + AXIS_BEGIN = 4, + + /** + * mouse associated axis events updated + */ + AXIS_UPDATE = 5, + + /** + * mouse associated axis event ends + */ + AXIS_END = 6, +} + +/** +* Button +* +* @since 9 +* @syscap SystemCapability.MultimodalInput.Input.Core +* @import import {Button} from '@ohos.multimodalInput.mouseEvent'; +*/ +export declare enum Button { + /** + * the left mouse button + */ + LEFT = 0, + + /** + * the middle mouse button + */ + MIDDLE = 1, + + /** + * the right mouse button + */ + RIGHT = 2, + + /** + * side mouse button + */ + SIDE = 3, + + /** + * mouse extension button + */ + EXTRA = 4, + + /** + * mouse forward button + */ + FORWARD = 5, + + /** + * mouse back button + */ + BACK = 6, + + /** + * mouse task button + */ + TASK = 7 +} + +/** +* Axis +* +* @since 9 +* @syscap SystemCapability.MultimodalInput.Input.Core +* @import import {Axis} from '@ohos.multimodalInput.mouseEvent'; +*/ +export declare enum Axis { + /** + * scroll vertical + */ + SCROLL_VERTICAL = 0, + + /** + * scroll horizontal + */ + SCROLL_HORIZONTAL = 1, + + /** + * pinch + */ + PINCH = 2, +} + +/** +* AxisValue +* +* @since 9 +* @syscap SystemCapability.MultimodalInput.Input.Core +* @import import {AxisValue} from '@ohos.multimodalInput.mouseEvent'; +*/ +export declare interface AxisValue { + /** + * axis type + */ + axis: Axis; + + /** + * The value of the axis + */ + value: number +} + +/** +* MouseEvent +* +* @since 9 +* @syscap SystemCapability.MultimodalInput.Input.Core +* @import import {MouseEvent} from '@ohos.multimodalInput.mouseEvent'; +*/ +export declare interface MouseEvent extends InputEvent { + /** + * mouse event action + */ + action: Action; + + /** + * the x coordinate of the mouse cursor in the screen + */ + screenX: number; + + /** + * the y coordinate of the mouse cursor in the screen + */ + screenY: number; + + /** + * the x coordinate of the mouse window + */ + windowX: number; + + /** + * the y coordinate of the mouse window + */ + windowY: number; + + /** + * the relative X offset from the last mouse position reported. At the edge of the screen, + * this value may be less than the coordinate difference reported by the two mice + */ + rawDeltaX: number; + + /** + * the relative Y offset from the last mouse position reported. At the edge of the screen, + * this value may be less than the coordinate difference reported by the two mice + */ + rawDeltaY: number; + + /** + * a button to press or up + */ + button: Button; + + /** + * the button that is currently in the pressed state + */ + pressedButtons: Button[]; + + /** + * The current action for AxisBegin/AxisUpdate/AxisEnd, the axis of the relevant data + */ + axes: AxisValue[]; + + /** + * list of keys that are currently in the pressed state + */ + pressedKeys: KeyCode[]; + + /** + * whether ctrlKey is in down state + */ + ctrlKey: boolean; + + /** + * whether altKey is in down state + */ + altKey: boolean; + + /** + * whether shiftKey is in down state + */ + shiftKey: boolean; + + /** + * whether logoKey is in down state + */ + logoKey: boolean; + + /** + * whether fnKey is in down state + */ + fnKey:boolean + + /** + * whether capsLock is in the active state. + */ + capsLock:boolean + + /** + * whether numLock is in the active state. + */ + numLock:boolean + + /** + * whether scrollLock is in the active state. + */ + scrollLock:boolean +} \ No newline at end of file -- Gitee