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