1/* 2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit InputKit 19 */ 20 21import type { AsyncCallback } from './@ohos.base'; 22import type image from './@ohos.multimedia.image'; 23 24/** 25 * Declares interfaces related to mouse pointer attributes. 26 * 27 * @namespace pointer 28 * @syscap SystemCapability.MultimodalInput.Input.Pointer 29 * @since 9 30 */ 31/** 32 * Declares interfaces related to mouse pointer attributes. 33 * 34 * @namespace pointer 35 * @syscap SystemCapability.MultimodalInput.Input.Pointer 36 * @atomicservice 37 * @since 12 38 */ 39declare namespace pointer { 40 /** 41 * Pointer style. 42 * 43 * @enum { number } 44 * @syscap SystemCapability.MultimodalInput.Input.Pointer 45 * @since 9 46 */ 47 /** 48 * Pointer style. 49 * 50 * @enum { number } 51 * @syscap SystemCapability.MultimodalInput.Input.Pointer 52 * @atomicservice 53 * @since 12 54 */ 55 enum PointerStyle { 56 /** 57 * Default 58 * 59 * @syscap SystemCapability.MultimodalInput.Input.Pointer 60 * @since 9 61 */ 62 DEFAULT, 63 64 /** 65 * East arrow 66 * 67 * @syscap SystemCapability.MultimodalInput.Input.Pointer 68 * @since 9 69 */ 70 EAST, 71 72 /** 73 * West arrow 74 * 75 * @syscap SystemCapability.MultimodalInput.Input.Pointer 76 * @since 9 77 */ 78 WEST, 79 80 /** 81 * South arrow 82 * 83 * @syscap SystemCapability.MultimodalInput.Input.Pointer 84 * @since 9 85 */ 86 SOUTH, 87 88 /** 89 * North arrow 90 * 91 * @syscap SystemCapability.MultimodalInput.Input.Pointer 92 * @since 9 93 */ 94 NORTH, 95 96 /** 97 * East-west arrow 98 * 99 * @syscap SystemCapability.MultimodalInput.Input.Pointer 100 * @since 9 101 */ 102 WEST_EAST, 103 104 /** 105 * North-south arrow 106 * 107 * @syscap SystemCapability.MultimodalInput.Input.Pointer 108 * @since 9 109 */ 110 NORTH_SOUTH, 111 112 /** 113 * North-east arrow 114 * 115 * @syscap SystemCapability.MultimodalInput.Input.Pointer 116 * @since 9 117 */ 118 NORTH_EAST, 119 120 /** 121 * North-west arrow 122 * 123 * @syscap SystemCapability.MultimodalInput.Input.Pointer 124 * @since 9 125 */ 126 NORTH_WEST, 127 128 /** 129 * South-east arrow 130 * 131 * @syscap SystemCapability.MultimodalInput.Input.Pointer 132 * @since 9 133 */ 134 SOUTH_EAST, 135 136 /** 137 * South-west arrow 138 * 139 * @syscap SystemCapability.MultimodalInput.Input.Pointer 140 * @since 9 141 */ 142 SOUTH_WEST, 143 144 /** 145 * Northeast and southwest adjustment 146 * 147 * @syscap SystemCapability.MultimodalInput.Input.Pointer 148 * @since 9 149 */ 150 NORTH_EAST_SOUTH_WEST, 151 152 /** 153 * Northwest and southeast adjustment 154 * 155 * @syscap SystemCapability.MultimodalInput.Input.Pointer 156 * @since 9 157 */ 158 NORTH_WEST_SOUTH_EAST, 159 160 /** 161 * Cross (accurate selection) 162 * 163 * @syscap SystemCapability.MultimodalInput.Input.Pointer 164 * @since 9 165 */ 166 CROSS, 167 168 /** 169 * Copy 170 * 171 * @syscap SystemCapability.MultimodalInput.Input.Pointer 172 * @since 9 173 */ 174 CURSOR_COPY, 175 176 /** 177 * Forbid 178 * 179 * @syscap SystemCapability.MultimodalInput.Input.Pointer 180 * @since 9 181 */ 182 CURSOR_FORBID, 183 184 /** 185 * Sucker 186 * 187 * @syscap SystemCapability.MultimodalInput.Input.Pointer 188 * @since 9 189 */ 190 COLOR_SUCKER, 191 192 /** 193 * Grabbing hand 194 * 195 * @syscap SystemCapability.MultimodalInput.Input.Pointer 196 * @since 9 197 */ 198 HAND_GRABBING, 199 200 /** 201 * Opening hand 202 * 203 * @syscap SystemCapability.MultimodalInput.Input.Pointer 204 * @since 9 205 */ 206 HAND_OPEN, 207 208 /** 209 * Hand-shaped pointer 210 * 211 * @syscap SystemCapability.MultimodalInput.Input.Pointer 212 * @since 9 213 */ 214 HAND_POINTING, 215 216 /** 217 * Help 218 * 219 * @syscap SystemCapability.MultimodalInput.Input.Pointer 220 * @since 9 221 */ 222 HELP, 223 224 /** 225 * Move 226 * 227 * @syscap SystemCapability.MultimodalInput.Input.Pointer 228 * @since 9 229 */ 230 MOVE, 231 232 /** 233 * Left and right resizing 234 * 235 * @syscap SystemCapability.MultimodalInput.Input.Pointer 236 * @since 9 237 */ 238 RESIZE_LEFT_RIGHT, 239 240 /** 241 * Up and down resizing 242 * 243 * @syscap SystemCapability.MultimodalInput.Input.Pointer 244 * @since 9 245 */ 246 RESIZE_UP_DOWN, 247 248 /** 249 * Screenshot crosshair 250 * 251 * @syscap SystemCapability.MultimodalInput.Input.Pointer 252 * @since 9 253 */ 254 SCREENSHOT_CHOOSE, 255 256 /** 257 * Screenshot 258 * 259 * @syscap SystemCapability.MultimodalInput.Input.Pointer 260 * @since 9 261 */ 262 SCREENSHOT_CURSOR, 263 264 /** 265 * Text selection 266 * 267 * @syscap SystemCapability.MultimodalInput.Input.Pointer 268 * @since 9 269 */ 270 TEXT_CURSOR, 271 272 /** 273 * Zoom in 274 * 275 * @syscap SystemCapability.MultimodalInput.Input.Pointer 276 * @since 9 277 */ 278 ZOOM_IN, 279 280 /** 281 * Zoom out 282 * 283 * @syscap SystemCapability.MultimodalInput.Input.Pointer 284 * @since 9 285 */ 286 ZOOM_OUT, 287 288 /** 289 * Scrolling east 290 * 291 * @syscap SystemCapability.MultimodalInput.Input.Pointer 292 * @since 9 293 */ 294 MIDDLE_BTN_EAST, 295 296 /** 297 * Scrolling west 298 * 299 * @syscap SystemCapability.MultimodalInput.Input.Pointer 300 * @since 9 301 */ 302 MIDDLE_BTN_WEST, 303 304 /** 305 * Scrolling south 306 * 307 * @syscap SystemCapability.MultimodalInput.Input.Pointer 308 * @since 9 309 */ 310 MIDDLE_BTN_SOUTH, 311 312 /** 313 * Scrolling north 314 * 315 * @syscap SystemCapability.MultimodalInput.Input.Pointer 316 * @since 9 317 */ 318 MIDDLE_BTN_NORTH, 319 320 /** 321 * Scrolling north and south 322 * 323 * @syscap SystemCapability.MultimodalInput.Input.Pointer 324 * @since 9 325 */ 326 MIDDLE_BTN_NORTH_SOUTH, 327 328 /** 329 * Scrolling northeast 330 * 331 * @syscap SystemCapability.MultimodalInput.Input.Pointer 332 * @since 9 333 */ 334 MIDDLE_BTN_NORTH_EAST, 335 336 /** 337 * Scrolling northwest 338 * 339 * @syscap SystemCapability.MultimodalInput.Input.Pointer 340 * @since 9 341 */ 342 MIDDLE_BTN_NORTH_WEST, 343 344 /** 345 * Scrolling southeast 346 * 347 * @syscap SystemCapability.MultimodalInput.Input.Pointer 348 * @since 9 349 */ 350 MIDDLE_BTN_SOUTH_EAST, 351 352 /** 353 * Scrolling southwest 354 * 355 * @syscap SystemCapability.MultimodalInput.Input.Pointer 356 * @since 9 357 */ 358 MIDDLE_BTN_SOUTH_WEST, 359 360 /** 361 * Moving as a cone in four directions 362 * 363 * @syscap SystemCapability.MultimodalInput.Input.Pointer 364 * @since 9 365 */ 366 MIDDLE_BTN_NORTH_SOUTH_WEST_EAST, 367 368 /** 369 * Horizontal text selection 370 * 371 * @syscap SystemCapability.MultimodalInput.Input.Pointer 372 * @since 10 373 */ 374 HORIZONTAL_TEXT_CURSOR, 375 376 /** 377 * Precise selection 378 * 379 * @syscap SystemCapability.MultimodalInput.Input.Pointer 380 * @since 10 381 */ 382 CURSOR_CROSS, 383 384 /** 385 * Cursor with circle style 386 * 387 * @syscap SystemCapability.MultimodalInput.Input.Pointer 388 * @since 10 389 */ 390 CURSOR_CIRCLE, 391 392 /** 393 * Loading state with dynamic cursor 394 * 395 * @syscap SystemCapability.MultimodalInput.Input.Pointer 396 * @since 10 397 */ 398 /** 399 * Loading state with dynamic cursor 400 * 401 * @syscap SystemCapability.MultimodalInput.Input.Pointer 402 * @atomicservice 403 * @since 12 404 */ 405 LOADING, 406 407 /** 408 * Running state with dynamic cursor 409 * 410 * @syscap SystemCapability.MultimodalInput.Input.Pointer 411 * @since 10 412 */ 413 /** 414 * Running state with dynamic cursor 415 * 416 * @syscap SystemCapability.MultimodalInput.Input.Pointer 417 * @atomicservice 418 * @since 12 419 */ 420 RUNNING, 421 422 /** 423 * Scrolling east and west 424 * 425 * @syscap SystemCapability.MultimodalInput.Input.Pointer 426 * @since 18 427 */ 428 MIDDLE_BTN_EAST_WEST 429 } 430 431 /** 432 * Mouse button. 433 * 434 * @enum { number } 435 * @syscap SystemCapability.MultimodalInput.Input.Pointer 436 * @since 10 437 */ 438 enum PrimaryButton { 439 /** 440 * Left mouse button 441 * 442 * @syscap SystemCapability.MultimodalInput.Input.Pointer 443 * @since 10 444 */ 445 LEFT = 0, 446 /** 447 * Right mouse button 448 * 449 * @syscap SystemCapability.MultimodalInput.Input.Pointer 450 * @since 10 451 */ 452 RIGHT = 1 453 } 454 455 /** 456 * Device right menu type. 457 * 458 * @enum { number } 459 * @syscap SystemCapability.MultimodalInput.Input.Pointer 460 * @since 10 461 */ 462 enum RightClickType { 463 /** 464 * Touchpad right button 465 * 466 * @syscap SystemCapability.MultimodalInput.Input.Pointer 467 * @since 10 468 */ 469 TOUCHPAD_RIGHT_BUTTON = 1, 470 /** 471 * Touchpad left button 472 * 473 * @syscap SystemCapability.MultimodalInput.Input.Pointer 474 * @since 10 475 */ 476 TOUCHPAD_LEFT_BUTTON = 2, 477 /** 478 * Touchpad two fingers tap 479 * 480 * @syscap SystemCapability.MultimodalInput.Input.Pointer 481 * @since 10 482 */ 483 TOUCHPAD_TWO_FINGER_TAP = 3, 484 } 485 486 /** 487 * Defines a custom cursor. 488 * 489 * @interface CustomCursor 490 * @syscap SystemCapability.MultimodalInput.Input.Pointer 491 * @since 15 492 */ 493 interface CustomCursor { 494 /** 495 * pixelMap - Custom cursor. The size limit is 256 x 256. 496 * @type { image.PixelMap } 497 * @syscap SystemCapability.MultimodalInput.Input.Pointer 498 * @since 15 499 */ 500 pixelMap: image.PixelMap; 501 /** 502 * focusX - Horizontal coordinate of the focus of the custom cursor. It is subject to the size of the custom cursor. 503 * @type { number } 504 * @syscap SystemCapability.MultimodalInput.Input.Pointer 505 * @since 15 506 */ 507 focusX?: number; 508 /** 509 * focusY - Vertical coordinate of the focus of the custom cursor. It is subject to the size of the custom cursor. 510 * @type { number } 511 * @syscap SystemCapability.MultimodalInput.Input.Pointer 512 * @since 15 513 */ 514 focusY?: number; 515 } 516 517 /** 518 * Specifies custom cursor config. 519 * 520 * @interface CursorConfig 521 * @syscap SystemCapability.MultimodalInput.Input.Pointer 522 * @since 15 523 */ 524 interface CursorConfig { 525 /** 526 * followSystem - Whether to adjust the cursor size based on the system settings. 527 * @type { boolean } 528 * @syscap SystemCapability.MultimodalInput.Input.Pointer 529 * @since 15 530 */ 531 followSystem : boolean; 532 } 533 534 /** 535 * Sets the pointer moving speed. 536 * 537 * @param { number } speed - Pointer moving speed, which is any number. 538 * @param { AsyncCallback<void> } callback - Callback used to return the result. 539 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 540 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 541 * @syscap SystemCapability.MultimodalInput.Input.Pointer 542 * @systemapi hide for inner use 543 * @since 9 544 */ 545 /** 546 * Sets the pointer moving speed. 547 * 548 * @param { number } speed - Pointer moving speed, which is any number. 549 * @param { AsyncCallback<void> } callback - Callback used to return the result. 550 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 551 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 552 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 553 * @syscap SystemCapability.MultimodalInput.Input.Pointer 554 * @systemapi hide for inner use 555 * @since 12 556 */ 557 function setPointerSpeed(speed: number, callback: AsyncCallback<void>): void; 558 559 /** 560 * Sets the pointer moving speed. 561 * 562 * @param { number } speed - Pointer moving speed, which is any number. 563 * @returns { Promise<void> } Returns the result through a promise. 564 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 565 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 566 * @syscap SystemCapability.MultimodalInput.Input.Pointer 567 * @systemapi hide for inner use 568 * @since 9 569 */ 570 /** 571 * Sets the pointer moving speed. 572 * 573 * @param { number } speed - Pointer moving speed, which is any number. 574 * @returns { Promise<void> } Returns the result through a promise. 575 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 576 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 577 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 578 * @syscap SystemCapability.MultimodalInput.Input.Pointer 579 * @systemapi hide for inner use 580 * @since 12 581 */ 582 function setPointerSpeed(speed: number): Promise<void>; 583 584 /** 585 * Sets the pointer moving speed through sync mode. 586 * 587 * @param { number } speed - Pointer moving speed, which is any number. 588 * @throws { BusinessError } 202 - SystemAPI permission error. 589 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 590 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 591 * @syscap SystemCapability.MultimodalInput.Input.Pointer 592 * @systemapi hide for inner use 593 * @since 10 594 */ 595 function setPointerSpeedSync(speed: number): void; 596 597 /** 598 * Queries the pointer moving speed. 599 * 600 * @param { AsyncCallback<number> } callback - Callback used to return the result. 601 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 602 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 603 * @syscap SystemCapability.MultimodalInput.Input.Pointer 604 * @systemapi hide for inner use 605 * @since 9 606 */ 607 /** 608 * Queries the pointer moving speed. 609 * 610 * @param { AsyncCallback<number> } callback - Callback used to return the result. 611 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 612 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 613 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 614 * @syscap SystemCapability.MultimodalInput.Input.Pointer 615 * @systemapi hide for inner use 616 * @since 12 617 */ 618 function getPointerSpeed(callback: AsyncCallback<number>): void; 619 620 /** 621 * Queries the pointer moving speed. 622 * 623 * @returns { Promise<number> } Returns the result through a promise. 624 * @syscap SystemCapability.MultimodalInput.Input.Pointer 625 * @systemapi hide for inner use 626 * @since 9 627 */ 628 /** 629 * Queries the pointer moving speed. 630 * 631 * @returns { Promise<number> } Returns the result through a promise. 632 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 633 * @syscap SystemCapability.MultimodalInput.Input.Pointer 634 * @systemapi hide for inner use 635 * @since 12 636 */ 637 function getPointerSpeed(): Promise<number>; 638 639 /** 640 * Queries the pointer moving speed through sync mode. 641 * @returns { number } Returns the pointer speed through sync mode. 642 * @throws { BusinessError } 202 - SystemAPI permission error. 643 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 644 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 645 * @syscap SystemCapability.MultimodalInput.Input.Pointer 646 * @systemapi hide for inner use 647 * @since 10 648 */ 649 function getPointerSpeedSync(): number; 650 651 /** 652 * Sets the pointer style. 653 * 654 * @param { number } windowId - Window ID. 655 * @param { PointerStyle } pointerStyle - Pointer style. 656 * @param { AsyncCallback<void> } callback - Callback used to return the result. 657 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 658 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 659 * @syscap SystemCapability.MultimodalInput.Input.Pointer 660 * @since 9 661 */ 662 function setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback<void>): void; 663 664 /** 665 * Sets the pointer style. 666 * 667 * @param { number } windowId - Window ID. 668 * @param { PointerStyle } pointerStyle - Pointer style. 669 * @returns { Promise<void> } Returns the result through a promise. 670 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 671 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 672 * @syscap SystemCapability.MultimodalInput.Input.Pointer 673 * @since 9 674 */ 675 function setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise<void>; 676 677 /** 678 * Sets the pointer style through sync mode. 679 * 680 * @param { number } windowId - Window ID. 681 * @param { PointerStyle } pointerStyle - Pointer style. 682 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 683 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 684 * @syscap SystemCapability.MultimodalInput.Input.Pointer 685 * @since 10 686 */ 687 function setPointerStyleSync(windowId: number, pointerStyle: PointerStyle): void; 688 689 /** 690 * Queries the pointer style. 691 * 692 * @param { number } windowId - Window ID. 693 * @param { AsyncCallback<PointerStyle> } callback - Callback used to return the result. 694 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 695 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 696 * @syscap SystemCapability.MultimodalInput.Input.Pointer 697 * @since 9 698 */ 699 function getPointerStyle(windowId: number, callback: AsyncCallback<PointerStyle>): void; 700 701 /** 702 * Queries the pointer style. 703 * 704 * @param { number } windowId - Window ID. 705 * @returns { Promise<PointerStyle> } Returns the result through a promise. 706 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 707 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 708 * @syscap SystemCapability.MultimodalInput.Input.Pointer 709 * @since 9 710 */ 711 function getPointerStyle(windowId: number): Promise<PointerStyle>; 712 713 /** 714 * Queries the pointer style through sync mode. 715 * 716 * @param { number } windowId - Window ID. 717 * @returns { PointerStyle } Returns the pointerStyle. 718 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 719 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 720 * @syscap SystemCapability.MultimodalInput.Input.Pointer 721 * @since 10 722 */ 723 function getPointerStyleSync(windowId: number): PointerStyle; 724 725 /** 726 * Sets whether the pointer icon is visible. 727 * 728 * @param { boolean } visible Whether the pointer icon is visible. The value true indicates that the pointer 729 * icon is visible, and the value false indicates the opposite. 730 * @param { AsyncCallback<void> } callback - Callback for the input device event. 731 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 732 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 733 * @syscap SystemCapability.MultimodalInput.Input.Pointer 734 * @since 9 735 */ 736 /** 737 * Sets whether the pointer icon is visible. 738 * 739 * @param { boolean } visible Whether the pointer icon is visible. The value true indicates that the pointer 740 * icon is visible, and the value false indicates the opposite. 741 * @param { AsyncCallback<void> } callback - Callback for the input device event. 742 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 743 * 2. Incorrect parameter types; 3. Parameter verification failed. 744 * @throws { BusinessError } 801 - Capability not supported; 745 * @syscap SystemCapability.MultimodalInput.Input.Pointer 746 * @since 18 747 */ 748 function setPointerVisible(visible: boolean, callback: AsyncCallback<void>): void; 749 750 /** 751 * Sets whether the pointer icon is visible. 752 * 753 * @param { boolean } visible Whether the pointer icon is visible. The value true indicates that the pointer 754 * icon is visible, and the value false indicates the opposite. 755 * @returns { Promise<void> } Returns the result through a promise. 756 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 757 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 758 * @syscap SystemCapability.MultimodalInput.Input.Pointer 759 * @since 9 760 */ 761 /** 762 * Sets whether the pointer icon is visible. 763 * 764 * @param { boolean } visible Whether the pointer icon is visible. The value true indicates that the pointer 765 * icon is visible, and the value false indicates the opposite. 766 * @returns { Promise<void> } Returns the result through a promise. 767 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 768 * 2. Incorrect parameter types; 3. Parameter verification failed. 769 * @throws { BusinessError } 801 - Capability not supported; 770 * @syscap SystemCapability.MultimodalInput.Input.Pointer 771 * @since 18 772 */ 773 function setPointerVisible(visible: boolean): Promise<void>; 774 775 /** 776 * Sets whether the pointer icon is visible through sync mode. 777 * 778 * @param { boolean } visible Whether the pointer icon is visible. The value true indicates that the pointer 779 * icon is visible, and the value false indicates the opposite. 780 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 781 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 782 * @syscap SystemCapability.MultimodalInput.Input.Pointer 783 * @since 10 784 */ 785 function setPointerVisibleSync(visible: boolean): void; 786 787 /** 788 * Checks whether the pointer icon is visible. 789 * 790 * @param { AsyncCallback<boolean> } callback - Returns <b>true</b> if the pointer icon is visible, 791 * returns <b>false</b> otherwise. 792 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 793 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 794 * @syscap SystemCapability.MultimodalInput.Input.Pointer 795 * @since 9 796 */ 797 function isPointerVisible(callback: AsyncCallback<boolean>): void; 798 799 /** 800 * Checks whether the pointer icon is visible. 801 * 802 * @returns { Promise<boolean> } Returns <b>true</b> if the pointer icon is visible; returns <b>false</b> otherwise. 803 * @syscap SystemCapability.MultimodalInput.Input.Pointer 804 * @since 9 805 */ 806 function isPointerVisible(): Promise<boolean>; 807 808 /** 809 * Checks whether the pointer icon is visible through sync mode. 810 * 811 * @returns { boolean } Returns true if the pointer icon is visible, returns false otherwise. 812 * @syscap SystemCapability.MultimodalInput.Input.Pointer 813 * @since 10 814 */ 815 function isPointerVisibleSync(): boolean; 816 817 /** 818 * Set the color of pointer. 819 * 820 * @param { number } color - Indicates the color of pointer. 821 * @param { AsyncCallback<void> } callback - Callback used to return the result. 822 * @throws { BusinessError } 202 - SystemAPI permission error. 823 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 824 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 825 * @syscap SystemCapability.MultimodalInput.Input.Pointer 826 * @systemapi hide for inner use. 827 * @since 10 828 */ 829 function setPointerColor(color: number, callback: AsyncCallback<void>): void; 830 831 /** 832 * Set the color of pointer. 833 * 834 * @param { number } color - Indicates the color of pointer. 835 * @returns { Promise<void> } Returns the result through a promise. 836 * @throws { BusinessError } 202 - SystemAPI permission error. 837 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 838 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 839 * @syscap SystemCapability.MultimodalInput.Input.Pointer 840 * @systemapi hide for inner use. 841 * @since 10 842 */ 843 function setPointerColor(color: number): Promise<void>; 844 845 /** 846 * Set the color of pointer. 847 * 848 * @param { number } color - Indicates the color of pointer. 849 * @throws { BusinessError } 202 - SystemAPI permission error. 850 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 851 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 852 * @syscap SystemCapability.MultimodalInput.Input.Pointer 853 * @systemapi hide for inner use. 854 * @since 10 855 */ 856 function setPointerColorSync(color: number): void; 857 858 /** 859 * Get the color of pointer. 860 * 861 * @param { AsyncCallback<number> } callback - Callback used to return the result. 862 * @throws { BusinessError } 202 - SystemAPI permission error. 863 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 864 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 865 * @syscap SystemCapability.MultimodalInput.Input.Pointer 866 * @systemapi hide for inner use. 867 * @since 10 868 */ 869 function getPointerColor(callback: AsyncCallback<number>): void; 870 871 /** 872 * Get the color of pointer. 873 * 874 * @returns { Promise<number> } Returns the result through a promise. 875 * @throws { BusinessError } 202 - SystemAPI permission error. 876 * @syscap SystemCapability.MultimodalInput.Input.Pointer 877 * @systemapi hide for inner use. 878 * @since 10 879 */ 880 function getPointerColor(): Promise<number>; 881 882 /** 883 * Get the color of pointer. 884 * 885 * @returns { number } Returns the pointer color through sync mode. 886 * @throws { BusinessError } 202 - SystemAPI permission error. 887 * @syscap SystemCapability.MultimodalInput.Input.Pointer 888 * @systemapi hide for inner use. 889 * @since 10 890 */ 891 function getPointerColorSync(): number; 892 893 /** 894 * Set the size of pointer. 895 * 896 * @param { number } size - Indicates the size of pointer. 897 * @param { AsyncCallback<void> } callback - Callback used to return the result. 898 * @throws { BusinessError } 202 - SystemAPI permission error. 899 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 900 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 901 * @syscap SystemCapability.MultimodalInput.Input.Pointer 902 * @systemapi hide for inner use. 903 * @since 10 904 */ 905 function setPointerSize(size: number, callback: AsyncCallback<void>): void; 906 907 /** 908 * Set the size of pointer. 909 * 910 * @param { number } size - Indicates the size of pointer. 911 * @returns { Promise<void> } Returns the result through a promise. 912 * @throws { BusinessError } 202 - SystemAPI permission error. 913 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 914 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 915 * @syscap SystemCapability.MultimodalInput.Input.Pointer 916 * @systemapi hide for inner use. 917 * @since 10 918 */ 919 function setPointerSize(size: number): Promise<void>; 920 921 /** 922 * Set the size of pointer. 923 * 924 * @param { number } size - Indicates the size of pointer. 925 * @throws { BusinessError } 202 - SystemAPI permission error. 926 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 927 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 928 * @syscap SystemCapability.MultimodalInput.Input.Pointer 929 * @systemapi hide for inner use. 930 * @since 10 931 */ 932 function setPointerSizeSync(size: number): void; 933 934 /** 935 * Get the size of pointer. 936 * 937 * @param { AsyncCallback<number> } callback - Callback used to return the result. 938 * @throws { BusinessError } 202 - SystemAPI permission error. 939 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 940 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 941 * @syscap SystemCapability.MultimodalInput.Input.Pointer 942 * @systemapi hide for inner use. 943 * @since 10 944 */ 945 function getPointerSize(callback: AsyncCallback<number>): void; 946 947 /** 948 * Get the size of pointer. 949 * 950 * @returns { Promise<number> } Returns the result through a promise. 951 * @throws { BusinessError } 202 - SystemAPI permission error. 952 * @syscap SystemCapability.MultimodalInput.Input.Pointer 953 * @systemapi hide for inner use. 954 * @since 10 955 */ 956 function getPointerSize(): Promise<number>; 957 958 /** 959 * Get the size of pointer. 960 * 961 * @returns { number } Returns the pointer size through sync mode. 962 * @throws { BusinessError } 202 - SystemAPI permission error. 963 * @syscap SystemCapability.MultimodalInput.Input.Pointer 964 * @systemapi hide for inner use. 965 * @since 10 966 */ 967 function getPointerSizeSync(): number; 968 969 /** 970 * Sets mouse primary button. 971 * 972 * @param { PrimaryButton } primary - Indicates mouse primary button. The value LEFT indicates that mouse primary 973 * button is left button, and the value RIGHT indicates that mouse primary button is right button. 974 * @param { AsyncCallback<void> } callback - Callback used to return the result. 975 * @throws { BusinessError } 202 - SystemAPI permission error. 976 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 977 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 978 * @syscap SystemCapability.MultimodalInput.Input.Pointer 979 * @systemapi hide for inner use. 980 * @since 10 981 */ 982 function setMousePrimaryButton(primary: PrimaryButton, callback: AsyncCallback<void>): void; 983 984 /** 985 * Sets mouse primary button. 986 * 987 * @param { PrimaryButton } primary - Indicates mouse primary button. The value LEFT indicates that mouse primary 988 * button is left button, and the value RIGHT indicates that mouse primary button is right button. 989 * @returns { Promise<void> } Returns the result through a promise. 990 * @throws { BusinessError } 202 - SystemAPI permission error. 991 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 992 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 993 * @syscap SystemCapability.MultimodalInput.Input.Pointer 994 * @systemapi hide for inner use. 995 * @since 10 996 */ 997 function setMousePrimaryButton(primary: PrimaryButton): Promise<void>; 998 999 /** 1000 * Gets mouse primary button. 1001 * 1002 * @param { AsyncCallback<PrimaryButton> } callback - Callback used to return the result. 1003 * @throws { BusinessError } 202 - SystemAPI permission error. 1004 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1005 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1006 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1007 * @systemapi hide for inner use. 1008 * @since 10 1009 */ 1010 function getMousePrimaryButton(callback: AsyncCallback<PrimaryButton>): void; 1011 1012 /** 1013 * Gets mouse primary button. 1014 * 1015 * @returns { Promise<PrimaryButton> } Returns the result through a promise. 1016 * @throws { BusinessError } 202 - SystemAPI permission error. 1017 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1018 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1019 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1020 * @systemapi hide for inner use. 1021 * @since 10 1022 */ 1023 function getMousePrimaryButton(): Promise<PrimaryButton>; 1024 1025 /** 1026 * Sets whether the mouse hover scroll is enabled in inactive window. 1027 * 1028 * @param { boolean } state - Indicates whether the mouse hover scroll is enabled in inactive window. The value true 1029 * indicates that the mouse hover scroll is enabled, and the value false indicates the opposite. 1030 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1031 * @throws { BusinessError } 202 - SystemAPI permission error. 1032 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1033 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1034 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1035 * @systemapi hide for inner use. 1036 * @since 10 1037 */ 1038 function setHoverScrollState(state: boolean, callback: AsyncCallback<void>): void; 1039 1040 /** 1041 * Sets whether mouse hover scroll is enabled in inactive window. 1042 * 1043 * @param { boolean } state - Indicates whether the mouse hover scroll is enabled in inactive window. The value true 1044 * indicates that the mouse hover scroll is enabled, and the value false indicates the opposite. 1045 * @returns { Promise<void> } Returns the result through a promise. 1046 * @throws { BusinessError } 202 - SystemAPI permission error. 1047 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1048 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1049 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1050 * @systemapi hide for inner use. 1051 * @since 10 1052 */ 1053 function setHoverScrollState(state: boolean): Promise<void>; 1054 1055 /** 1056 * Gets a status whether the mouse hover scroll is enabled in inactive window. 1057 * 1058 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1059 * @throws { BusinessError } 202 - SystemAPI permission error. 1060 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1061 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1062 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1063 * @systemapi hide for inner use. 1064 * @since 10 1065 */ 1066 function getHoverScrollState(callback: AsyncCallback<boolean>): void; 1067 1068 /** 1069 * Gets a status whether mouse hover scroll is enabled in inactive window. 1070 * 1071 * @returns { Promise<boolean> } Returns the result through a promise. 1072 * @throws { BusinessError } 202 - SystemAPI permission error. 1073 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1074 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1075 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1076 * @systemapi hide for inner use. 1077 * @since 10 1078 */ 1079 function getHoverScrollState(): Promise<boolean>; 1080 1081 /** 1082 * Set the number of mouse scrolling rows. 1083 * 1084 * @param { number } rows - Indicates the number of mouse scrolling rows. 1085 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1086 * @throws { BusinessError } 202 - SystemAPI permission error. 1087 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1088 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1089 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1090 * @systemapi hide for inner use. 1091 * @since 10 1092 */ 1093 function setMouseScrollRows(rows: number, callback: AsyncCallback<void>): void; 1094 1095 /** 1096 * Set the number of mouse scrolling rows. 1097 * 1098 * @param { number } rows - Indicates the number of mouse scrolling rows. 1099 * @returns { Promise<void> } Returns the result through a promise. 1100 * @throws { BusinessError } 202 - SystemAPI permission error. 1101 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1102 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1103 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1104 * @systemapi hide for inner use. 1105 * @since 10 1106 */ 1107 function setMouseScrollRows(rows: number): Promise<void>; 1108 1109 /** 1110 * Get the number of mouse scrolling rows. 1111 * 1112 * @param { AsyncCallback<number> } callback - Callback used to return the result. 1113 * @throws { BusinessError } 202 - SystemAPI permission error. 1114 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1115 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1116 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1117 * @systemapi hide for inner use. 1118 * @since 10 1119 */ 1120 function getMouseScrollRows(callback: AsyncCallback<number>): void; 1121 1122 /** 1123 * Get the number of mouse scrolling rows. 1124 * 1125 * @returns { Promise<number> } Returns the result through a promise. 1126 * @throws { BusinessError } 202 - SystemAPI permission error. 1127 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1128 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1129 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1130 * @systemapi hide for inner use. 1131 * @since 10 1132 */ 1133 function getMouseScrollRows(): Promise<number>; 1134 1135 /** 1136 * Set touchpad scroll switch. 1137 * 1138 * @param { boolean } state - Indicates whether the touchpad scroll switch is enabled 1139 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1140 * @throws { BusinessError } 202 - SystemAPI permission error. 1141 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1142 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1143 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1144 * @systemapi hide for inner use. 1145 * @since 10 1146 */ 1147 function setTouchpadScrollSwitch(state: boolean, callback: AsyncCallback<void>): void; 1148 1149 /** 1150 * Set touchpad scroll switch. 1151 * 1152 * @param { boolean } state - Indicates whether the touchpad scroll switch is enabled 1153 * @returns { Promise<void> } Returns the result through a promise. 1154 * @throws { BusinessError } 202 - SystemAPI permission error. 1155 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1156 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1157 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1158 * @systemapi hide for inner use. 1159 * @since 10 1160 */ 1161 function setTouchpadScrollSwitch(state: boolean): Promise<void>; 1162 1163 /** 1164 * Get touchpad scroll switch state. 1165 * 1166 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1167 * @throws { BusinessError } 202 - SystemAPI permission error. 1168 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1169 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1170 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1171 * @systemapi hide for inner use. 1172 * @since 10 1173 */ 1174 function getTouchpadScrollSwitch(callback: AsyncCallback<boolean>): void; 1175 1176 /** 1177 * Get touchpad scroll switch state. 1178 * 1179 * @returns { Promise<boolean> } Returns the result through a promise. 1180 * @throws { BusinessError } 202 - SystemAPI permission error. 1181 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1182 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1183 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1184 * @systemapi hide for inner use. 1185 * @since 10 1186 */ 1187 function getTouchpadScrollSwitch(): Promise<boolean>; 1188 1189 /** 1190 * Set touchpad scroll direction. 1191 * 1192 * @param { boolean } state - Indicates whether the touchpad scroll direction is forward or reverse 1193 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1194 * @throws { BusinessError } 202 - SystemAPI permission error. 1195 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1196 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1197 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1198 * @systemapi hide for inner use. 1199 * @since 10 1200 */ 1201 function setTouchpadScrollDirection(state: boolean, callback: AsyncCallback<void>): void; 1202 1203 /** 1204 * Set touchpad scroll direction. 1205 * 1206 * @param { boolean } state - Indicates whether the touchpad scroll direction is forward or reverse 1207 * @returns { Promise<void> } Returns the result through a promise. 1208 * @throws { BusinessError } 202 - SystemAPI permission error. 1209 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1210 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1211 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1212 * @systemapi hide for inner use. 1213 * @since 10 1214 */ 1215 function setTouchpadScrollDirection(state: boolean): Promise<void>; 1216 1217 /** 1218 * Get touchpad scroll direction. 1219 * 1220 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1221 * @throws { BusinessError } 202 - SystemAPI permission error. 1222 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1223 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1224 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1225 * @systemapi hide for inner use. 1226 * @since 10 1227 */ 1228 function getTouchpadScrollDirection(callback: AsyncCallback<boolean>): void; 1229 1230 /** 1231 * Get touchpad scroll direction. 1232 * 1233 * @returns { Promise<boolean> } Returns the result through a promise. 1234 * @throws { BusinessError } 202 - SystemAPI permission error. 1235 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1236 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1237 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1238 * @systemapi hide for inner use. 1239 * @since 10 1240 */ 1241 function getTouchpadScrollDirection(): Promise<boolean>; 1242 1243 /** 1244 * Set touchpad tap switch. 1245 * 1246 * @param { boolean } state - Indicates whether the touchpad tap switch is enabled 1247 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1248 * @throws { BusinessError } 202 - SystemAPI permission error. 1249 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1250 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1251 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1252 * @systemapi hide for inner use. 1253 * @since 10 1254 */ 1255 function setTouchpadTapSwitch(state: boolean, callback: AsyncCallback<void>): void; 1256 1257 /** 1258 * Set touchpad tap switch. 1259 * 1260 * @param { boolean } state - Indicates whether the touchpad tap switch is enabled 1261 * @returns { Promise<void> } Returns the result through a promise. 1262 * @throws { BusinessError } 202 - SystemAPI permission error. 1263 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1264 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1265 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1266 * @systemapi hide for inner use. 1267 * @since 10 1268 */ 1269 function setTouchpadTapSwitch(state: boolean): Promise<void>; 1270 1271 /** 1272 * Get touchpad tap switch state. 1273 * 1274 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1275 * @throws { BusinessError } 202 - SystemAPI permission error. 1276 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1277 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1278 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1279 * @systemapi hide for inner use. 1280 * @since 10 1281 */ 1282 function getTouchpadTapSwitch(callback: AsyncCallback<boolean>): void; 1283 1284 /** 1285 * Get touchpad tap switch state. 1286 * 1287 * @returns { Promise<boolean> } Returns the result through a promise. 1288 * @throws { BusinessError } 202 - SystemAPI permission error. 1289 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1290 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1291 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1292 * @systemapi hide for inner use. 1293 * @since 10 1294 */ 1295 function getTouchpadTapSwitch(): Promise<boolean>; 1296 1297 /** 1298 * Set touchpad pointer speed. 1299 * 1300 * @param { number } speed - Indicates the number of touchpad pointer speed. 1301 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1302 * @throws { BusinessError } 202 - SystemAPI permission error. 1303 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1304 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1305 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1306 * @systemapi hide for inner use. 1307 * @since 10 1308 */ 1309 function setTouchpadPointerSpeed(speed: number, callback: AsyncCallback<void>): void; 1310 1311 /** 1312 * Set touchpad pointer speed. 1313 * 1314 * @param { number } speed - Indicates the number of touchpad pointer speed. 1315 * @returns { Promise<void> } Returns the result through a promise. 1316 * @throws { BusinessError } 202 - SystemAPI permission error. 1317 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1318 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1319 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1320 * @systemapi hide for inner use. 1321 * @since 10 1322 */ 1323 function setTouchpadPointerSpeed(speed: number): Promise<void>; 1324 1325 /** 1326 * Get touchpad pointer speed. 1327 * 1328 * @param { AsyncCallback<number> } callback - Callback used to return the result. 1329 * @throws { BusinessError } 202 - SystemAPI permission error. 1330 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1331 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1332 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1333 * @systemapi hide for inner use. 1334 * @since 10 1335 */ 1336 function getTouchpadPointerSpeed(callback: AsyncCallback<number>): void; 1337 1338 /** 1339 * Get touchpad pointer speed. 1340 * 1341 * @returns { Promise<number> } Returns the result through a promise. 1342 * @throws { BusinessError } 202 - SystemAPI permission error. 1343 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1344 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1345 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1346 * @systemapi hide for inner use. 1347 * @since 10 1348 */ 1349 function getTouchpadPointerSpeed(): Promise<number>; 1350 1351 /** 1352 * Set touchpad pinch switch. 1353 * 1354 * @param { boolean } state - Indicates whether the touchpad pinch switch is enabled 1355 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1356 * @throws { BusinessError } 202 - SystemAPI permission error. 1357 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1358 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1359 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1360 * @systemapi hide for inner use. 1361 * @since 10 1362 */ 1363 function setTouchpadPinchSwitch(state: boolean, callback: AsyncCallback<void>): void; 1364 1365 /** 1366 * Set touchpad pinch switch. 1367 * 1368 * @param { boolean } state - Indicates whether the touchpad pinch switch is enabled 1369 * @returns { Promise<void> } Returns the result through a promise. 1370 * @throws { BusinessError } 202 - SystemAPI permission error. 1371 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1372 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1373 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1374 * @systemapi hide for inner use. 1375 * @since 10 1376 */ 1377 function setTouchpadPinchSwitch(state: boolean): Promise<void>; 1378 1379 /** 1380 * Get touchpad pinch switch state. 1381 * 1382 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1383 * @throws { BusinessError } 202 - SystemAPI permission error. 1384 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1385 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1386 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1387 * @systemapi hide for inner use. 1388 * @since 10 1389 */ 1390 function getTouchpadPinchSwitch(callback: AsyncCallback<boolean>): void; 1391 1392 /** 1393 * Get touchpad pinch switch state. 1394 * 1395 * @returns { Promise<boolean> } Returns the result through a promise. 1396 * @throws { BusinessError } 202 - SystemAPI permission error. 1397 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1398 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1399 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1400 * @systemapi hide for inner use. 1401 * @since 10 1402 */ 1403 function getTouchpadPinchSwitch(): Promise<boolean>; 1404 1405 /** 1406 * Set touchpad swipe switch. 1407 * 1408 * @param { boolean } state - Indicates whether the touchpad swipe switch is enabled 1409 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1410 * @throws { BusinessError } 202 - SystemAPI permission error. 1411 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1412 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1413 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1414 * @systemapi hide for inner use. 1415 * @since 10 1416 */ 1417 function setTouchpadSwipeSwitch(state: boolean, callback: AsyncCallback<void>): void; 1418 1419 /** 1420 * Set touchpad swipe switch. 1421 * 1422 * @param { boolean } state - Indicates whether the touchpad swipe switch is enabled 1423 * @returns { Promise<void> } Returns the result through a promise. 1424 * @throws { BusinessError } 202 - SystemAPI permission error. 1425 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1426 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1427 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1428 * @systemapi hide for inner use. 1429 * @since 10 1430 */ 1431 function setTouchpadSwipeSwitch(state: boolean): Promise<void>; 1432 1433 /** 1434 * Get touchpad swipe switch state. 1435 * 1436 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1437 * @throws { BusinessError } 202 - SystemAPI permission error. 1438 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1439 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1440 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1441 * @systemapi hide for inner use. 1442 * @since 10 1443 */ 1444 function getTouchpadSwipeSwitch(callback: AsyncCallback<boolean>): void; 1445 1446 /** 1447 * Get touchpad swipe switch state. 1448 * 1449 * @returns { Promise<boolean> } Returns the result through a promise. 1450 * @throws { BusinessError } 202 - SystemAPI permission error. 1451 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1452 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1453 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1454 * @systemapi hide for inner use. 1455 * @since 10 1456 */ 1457 function getTouchpadSwipeSwitch(): Promise<boolean>; 1458 1459 /** 1460 * Set touchpad right click type. 1461 * 1462 * @param { RightClickType } type - Indicates the type of touchpad right button menu. 1463 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1464 * @throws { BusinessError } 202 - SystemAPI permission error. 1465 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1466 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1467 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1468 * @systemapi hide for inner use. 1469 * @since 10 1470 */ 1471 function setTouchpadRightClickType(type: RightClickType, callback: AsyncCallback<void>): void; 1472 1473 /** 1474 * Set touchpad right click type. 1475 * 1476 * @param { RightClickType } type - Indicates the type of touchpad right click. 1477 * @returns { Promise<void> } Returns the result through a promise. 1478 * @throws { BusinessError } 202 - SystemAPI permission error. 1479 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1480 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1481 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1482 * @systemapi hide for inner use. 1483 * @since 10 1484 */ 1485 function setTouchpadRightClickType(type: RightClickType): Promise<void>; 1486 1487 /** 1488 * Get touchpad right click type. 1489 * 1490 * @param { AsyncCallback<RightClickType> } callback - Callback used to return the result of right click type. 1491 * @throws { BusinessError } 202 - SystemAPI permission error. 1492 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1493 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1494 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1495 * @systemapi hide for inner use. 1496 * @since 10 1497 */ 1498 function getTouchpadRightClickType(callback: AsyncCallback<RightClickType>): void; 1499 1500 /** 1501 * Get touchpad right click type. 1502 * 1503 * @returns { Promise<RightClickType> } Returns the result of right click type through a promise. 1504 * @throws { BusinessError } 202 - SystemAPI permission error. 1505 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1506 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1507 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1508 * @systemapi hide for inner use. 1509 * @since 10 1510 */ 1511 function getTouchpadRightClickType(): Promise<RightClickType>; 1512 1513 /** 1514 * Sets the custom cursor. 1515 * 1516 * @param { number } windowId - Window ID. 1517 * @param { image.PixelMap } pixelMap - the cursor of pixelMap. 1518 * @param { number } focusX - focus x. 1519 * @param { number } focusY - focus y. 1520 * @returns { Promise<void> } Returns the result through a promise. 1521 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1522 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1523 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1524 * @since 11 1525 */ 1526 function setCustomCursor(windowId: number, pixelMap: image.PixelMap, focusX?: number, focusY?: number): Promise<void>; 1527 1528 /** 1529 * Sets the custom cursor through sync mode. 1530 * 1531 * @param { number } windowId - Window ID. 1532 * @param { image.PixelMap } pixelMap - the cursor of pixelMap. 1533 * @param { number } focusX - focus x. 1534 * @param { number } focusY - focus y. 1535 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1536 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1537 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1538 * @since 11 1539 */ 1540 function setCustomCursorSync(windowId: number, pixelMap: image.PixelMap, focusX?: number, focusY?: number): void; 1541 1542 /** 1543 * Sets the custom cursor. You can set whether to adjust the cursor size based on the system settings. 1544 * 1545 * @param { number } windowId - Window ID. 1546 * @param { CustomCursor } cursor - Custom cursor, including the custom cursor resource and focus position. 1547 * @param { CursorConfig } config - Custom cursor config. 1548 * @returns { Promise<void> } Returns the result through a promise. 1549 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Abnormal windowId parameter passed in; 1550 * <br>2. Abnormal pixelMap parameter passed in; 3. Abnormal focusX parameter passed in; 1551 * <br>4. Abnormal focusY parameter passed in. 1552 * @throws { BusinessError } 26500001 - Invalid windowId. 1553 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1554 * @since 15 1555 */ 1556 function setCustomCursor(windowId: number, cursor: CustomCursor, config: CursorConfig): Promise<void>; 1557 1558 /** 1559 * Set touchpad double tap and drag state. 1560 * 1561 * @param { boolean } isOpen - Indicates whether the touchpad double tap and drag is enabled 1562 * @param { AsyncCallback<void> } callback - Callback used to return the result. 1563 * @throws { BusinessError } 202 - SystemAPI permission error. 1564 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1565 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1566 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1567 * @systemapi hide for inner use. 1568 * @since 14 1569 */ 1570 function setTouchpadDoubleTapAndDragState(isOpen: boolean, callback: AsyncCallback<void>): void; 1571 1572 /** 1573 * Set touchpad double tap and drag state. 1574 * 1575 * @param { boolean } isOpen - Indicates whether the touchpad double tap and drag is enabled 1576 * @returns { Promise<void> } Returns the result through a promise. 1577 * @throws { BusinessError } 202 - SystemAPI permission error. 1578 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1579 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1580 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1581 * @systemapi hide for inner use. 1582 * @since 14 1583 */ 1584 function setTouchpadDoubleTapAndDragState(isOpen: boolean): Promise<void>; 1585 1586 /** 1587 * Get touchpad double tap and drag state. 1588 * 1589 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 1590 * @throws { BusinessError } 202 - SystemAPI permission error. 1591 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1592 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 1593 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1594 * @systemapi hide for inner use. 1595 * @since 14 1596 */ 1597 function getTouchpadDoubleTapAndDragState(callback: AsyncCallback<boolean>): void; 1598 1599 /** 1600 * Get touchpad double tap and drag state. 1601 * 1602 * @returns { Promise<boolean> } Returns the result through a promise. 1603 * @throws { BusinessError } 202 - SystemAPI permission error. 1604 * @syscap SystemCapability.MultimodalInput.Input.Pointer 1605 * @systemapi hide for inner use. 1606 * @since 14 1607 */ 1608 function getTouchpadDoubleTapAndDragState(): Promise<boolean>; 1609} 1610export default pointer;