From 279225dd6edd52789c97f2e51619404c8f6af658 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Fri, 26 Aug 2022 16:25:56 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=E6=9F=A5=E8=AF=A2=E9=BC=A0=E6=A0=87=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I4363a66837903116567683ca63cce71895b377fd --- api/@ohos.multimodalInput.pointer.d.ts | 296 +++++++++++++++++++++---- 1 file changed, 247 insertions(+), 49 deletions(-) mode change 100644 => 100755 api/@ohos.multimodalInput.pointer.d.ts diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts old mode 100644 new mode 100755 index 2d808353c3..5597da33a3 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -1,50 +1,248 @@ -/* -* 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"; - -/** -* APIs for mouse pointer attributes -* -* @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Pointer -* @import import pointer from '@ohos.multimodalInput.pointer'; -*/ - -declare namespace pointer { - - /** - * 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. - */ - function setPointerVisible(visible: boolean, callback: AsyncCallback) : void; - function setPointerVisible(visible: boolean) : Promise; - - /** - * 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(callback: AsyncCallback) : void; - function isPointerVisible() : Promise; -} - +/* +* 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"; + +/** +* Declares interfaces related to mouse pointer attributes. +* +* @since 9 +* @syscap SystemCapability.MultimodalInput.Input.Pointer +* @import import pointer from '@ohos.multimodalInput.pointer'; +*/ + +declare namespace pointer { +enum PointerStyle { + // Default + DEFAULT, + + // East arrow + EAST, + + // West arrow + WEST, + + // South arrow + SOUTH, + + // North arrow + NORTH, + + // East-west arrow + WEST_EAST, + + // North-south arrow + NORTH_SOUTH, + + // North-east arrow + NORTH_EAST, + + // North-west arrow + NORTH_WEST, + + // South-east arrow + SOUTH_EAST, + + // South-west arrow + SOUTH_WEST, + + // North-east and south-west arrow + NORTH_EAST_SOUTH_WEST, + + // North-west and south-east arrow + NORTH_WEST_SOUTH_EAST, + + // Cross + CROSS, + + // Copy cursor + CURSOR_COPY, + + // Forbid cursor + CURSOR_FORBID, + + // Sucker + COLOR_SUCKER, + + // Hand grabbing + HAND_GRABBING, + + // Hand open + HAND_OPEN, + + // Hand pointing + HAND_POINTING, + + // Help + HELP, + + // Move + MOVE, + + // Resize left and right + RESIZE_LEFT_RIGHT, + + // Resize up and down + RESIZE_UP_DOWN, + + // Screenshot selection + SCREENSHOT_CHOOSE, + + // Screenshot cursor + SCREENSHOT_CURSOR, + + // Text cursor + TEXT_CURSOR, + + // Zoom in + ZOOM_IN, + + // Zoom out + ZOOM_OUT, + + // East arrow of the middle mouse button + MIDDLE_BTN_EAST, + + // West arrow of the middle mouse button + MIDDLE_BTN_WEST, + + // South arrow of the middle mouse button + MIDDLE_BTN_SOUTH, + + // North arrow of the middle mouse button + MIDDLE_BTN_NORTH, + + // North-south arrow of the middle mouse button + MIDDLE_BTN_NORTH_SOUTH, + + // North-east arrow of the middle mouse button + MIDDLE_BTN_NORTH_EAST, + + // North-west arrow of the middle mouse button + MIDDLE_BTN_NORTH_WEST, + + // South-east arrow of the middle mouse button + MIDDLE_BTN_SOUTH_EAST, + + // South-west arrow of the middle mouse button + MIDDLE_BTN_SOUTH_WEST, + + // North-west and south-east arrow of the middle mouse button + MIDDLE_BTN_NORTH_SOUTH_WEST_EAST, + } + + /** + * Sets the pointer moving speed. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param speed Pointer moving speed. + * @param callback Callback used to return the result. + */ + function setPointerSpeed(speed: number, callback: AsyncCallback): void; + + /** + * Sets the pointer moving speed. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param speed Pointer moving speed. + * @return Returns the result through a promise. + */ + function setPointerSpeed(speed: number): Promise; + + /** + * Queries the pointer moving speed. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param callback Callback used to return the result. + */ + function getPointerSpeed(callback: AsyncCallback): void; + + /** + * Queries the pointer moving speed. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @return Returns the result through a promise. + */ + function getPointerSpeed(): Promise; + + /** + * Sets the pointer style. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param windowId Window ID. + * @param pointerStyle Pointer style. + * @param callback Callback used to return the result. + */ + function setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback): void; + + /** + * Sets the pointer style. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param windowId Window ID. + * @param pointerStyle Pointer style. + * @return Returns the result through a promise. + */ + function setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise; + + /** + * Queries the pointer style. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param windowId Window ID. + * @param callback Callback used to return the result. + */ + function getPointerStyle(windowId: number, callback: AsyncCallback): void; + + /** + * Queries the pointer style. + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @systemapi hide for inner use + * @param windowId Window ID. + * @return Returns the result through a promise. + */ + function getPointerStyle(windowId: number): Promise; + + /** + * 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. + */ + function setPointerVisible(visible: boolean, callback: AsyncCallback) : void; + function setPointerVisible(visible: boolean) : Promise; + + /** + * 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(callback: AsyncCallback) : void; + function isPointerVisible() : Promise; +} + export default pointer; \ No newline at end of file -- Gitee From 923fc6035a8d245b696947ea319fb2276fbbb28a Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Fri, 26 Aug 2022 16:26:13 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=E6=9F=A5=E8=AF=A2=E9=BC=A0=E6=A0=87=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: Ib5dea4d7182a84d4947afc0d691b42ce2c63f482 --- api/@ohos.multimodalInput.pointer.d.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 api/@ohos.multimodalInput.pointer.d.ts diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts old mode 100755 new mode 100644 -- Gitee From b9063af883b2584aea2973856d0655473e58de88 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sat, 27 Aug 2022 09:30:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?pointer=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: If868c1745c90d66a511a96cdcf52fa20f2f88963 --- api/@ohos.multimodalInput.pointer.d.ts | 166 ++++++++++++++++++------- 1 file changed, 122 insertions(+), 44 deletions(-) diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 5597da33a3..f8247f2d8f 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -24,122 +24,200 @@ import { AsyncCallback } from "./basic"; */ declare namespace pointer { -enum PointerStyle { - // Default + enum PointerStyle { + /** + * Default + */ DEFAULT, - // East arrow + /** + * East arrow + */ EAST, - // West arrow + /** + * West arrow + */ WEST, - // South arrow + /** + * South arrow + */ SOUTH, - // North arrow + /** + * North arrow + */ NORTH, - // East-west arrow + /** + * East-west arrow + */ WEST_EAST, - // North-south arrow + /** + * North-south arrow + */ NORTH_SOUTH, - // North-east arrow + /** + * North-east arrow + */ NORTH_EAST, - // North-west arrow + /** + * North-west arrow + */ NORTH_WEST, - // South-east arrow + /** + * South-east arrow + */ SOUTH_EAST, - // South-west arrow + /** + * South-west arrow + */ SOUTH_WEST, - // North-east and south-west arrow + /** + * North-east and south-west arrow + */ NORTH_EAST_SOUTH_WEST, - // North-west and south-east arrow + /** + * North-west and south-east arrow + */ NORTH_WEST_SOUTH_EAST, - // Cross + /** + * Cross + */ CROSS, - // Copy cursor + /** + * Copy cursor + */ CURSOR_COPY, - // Forbid cursor + /** + * Forbid cursor + */ CURSOR_FORBID, - // Sucker + /** + * Sucker + */ COLOR_SUCKER, - // Hand grabbing + /** + * Hand grabbing + */ HAND_GRABBING, - // Hand open + /** + * Hand open + */ HAND_OPEN, - // Hand pointing + /** + * Hand pointing + */ HAND_POINTING, - // Help + /** + * Help + */ HELP, - // Move + /** + * Move + */ MOVE, - // Resize left and right + /** + * Resize left and right + */ RESIZE_LEFT_RIGHT, - // Resize up and down + /** + * Resize up and down + */ RESIZE_UP_DOWN, - // Screenshot selection + /** + * Screenshot selection + */ SCREENSHOT_CHOOSE, - // Screenshot cursor + /** + * Screenshot cursor + */ SCREENSHOT_CURSOR, - // Text cursor + /** + * Text cursor + */ TEXT_CURSOR, - // Zoom in + /** + * Zoom in + */ ZOOM_IN, - // Zoom out + /** + * Zoom out + */ ZOOM_OUT, - // East arrow of the middle mouse button + /** + * East arrow of the middle mouse button + */ MIDDLE_BTN_EAST, - // West arrow of the middle mouse button + /** + * West arrow of the middle mouse button + */ MIDDLE_BTN_WEST, - // South arrow of the middle mouse button + /** + * South arrow of the middle mouse button + */ MIDDLE_BTN_SOUTH, - // North arrow of the middle mouse button + /** + * North arrow of the middle mouse button + */ MIDDLE_BTN_NORTH, - // North-south arrow of the middle mouse button + /** + * North-south arrow of the middle mouse button + */ MIDDLE_BTN_NORTH_SOUTH, - // North-east arrow of the middle mouse button + /** + * North-east arrow of the middle mouse button + */ MIDDLE_BTN_NORTH_EAST, - // North-west arrow of the middle mouse button + /** + * North-west arrow of the middle mouse button + */ MIDDLE_BTN_NORTH_WEST, - // South-east arrow of the middle mouse button + /** + * South-east arrow of the middle mouse button + */ MIDDLE_BTN_SOUTH_EAST, - // South-west arrow of the middle mouse button + /** + * South-west arrow of the middle mouse button + */ MIDDLE_BTN_SOUTH_WEST, - // North-west and south-east arrow of the middle mouse button + /** + * North-west and south-east arrow of the middle mouse button + */ MIDDLE_BTN_NORTH_SOUTH_WEST_EAST, } @@ -231,8 +309,8 @@ enum PointerStyle { * @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. */ - function setPointerVisible(visible: boolean, callback: AsyncCallback) : void; - function setPointerVisible(visible: boolean) : Promise; + function setPointerVisible(visible: boolean, callback: AsyncCallback): void; + function setPointerVisible(visible: boolean): Promise; /** * Checks whether the pointer icon is visible. @@ -241,8 +319,8 @@ enum PointerStyle { * @syscap SystemCapability.MultimodalInput.Input.Pointer * @return Returns true if the pointer icon is visible; returns false otherwise. */ - function isPointerVisible(callback: AsyncCallback) : void; - function isPointerVisible() : Promise; + function isPointerVisible(callback: AsyncCallback): void; + function isPointerVisible(): Promise; } export default pointer; \ No newline at end of file -- Gitee From bd47020fde1245edf68d7d45f7cad18c5c923a1e Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sat, 27 Aug 2022 09:44:20 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I9ae4668d140690f4d26d6ce56f1a98057eb34c96 --- api/@ohos.multimodalInput.pointer.d.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index f8247f2d8f..63636fd133 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -263,7 +263,6 @@ declare namespace pointer { * Sets the pointer style. * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @systemapi hide for inner use * @param windowId Window ID. * @param pointerStyle Pointer style. * @param callback Callback used to return the result. @@ -274,7 +273,6 @@ declare namespace pointer { * Sets the pointer style. * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @systemapi hide for inner use * @param windowId Window ID. * @param pointerStyle Pointer style. * @return Returns the result through a promise. @@ -285,7 +283,6 @@ declare namespace pointer { * Queries the pointer style. * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @systemapi hide for inner use * @param windowId Window ID. * @param callback Callback used to return the result. */ @@ -295,7 +292,6 @@ declare namespace pointer { * Queries the pointer style. * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @systemapi hide for inner use * @param windowId Window ID. * @return Returns the result through a promise. */ -- Gitee