1/* 2 * Copyright (c) 2021 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 ArkUI 19 */ 20 21import { AsyncCallback, BusinessError } from './@ohos.base'; 22import BaseContext from './application/BaseContext'; 23import image from './@ohos.multimedia.image'; 24import rpc from './@ohos.rpc'; 25import dialogRequest from './@ohos.app.ability.dialogRequest'; 26import { UIContext } from './@ohos.arkui.UIContext'; 27import ConfigurationConstant from './@ohos.app.ability.ConfigurationConstant'; 28import bundleManager from './@ohos.bundle.bundleManager'; 29 30/** 31 * Defines the window callback. 32 * 33 * @typedef Callback<T, V = void> 34 * @syscap SystemCapability.Window.SessionManager 35 * @atomicservice 36 * @since 15 37 */ 38declare interface Callback<T, V = void> { 39 /** 40 * Defines the callback info. 41 * 42 * @param { T } data - the data will be used in the callback. 43 * @returns { V } - Returns result of the callback. 44 * @syscap SystemCapability.Window.SessionManager 45 * @atomicservice 46 * @since 15 47 */ 48 (data: T): V; 49} 50 51/** 52 * Window manager. 53 * 54 * @namespace window 55 * @syscap SystemCapability.WindowManager.WindowManager.Core 56 */ 57/** 58 * Window manager. 59 * 60 * @namespace window 61 * @syscap SystemCapability.WindowManager.WindowManager.Core 62 * @crossplatform 63 * @since 10 64 */ 65/** 66 * Window manager. 67 * 68 * @namespace window 69 * @syscap SystemCapability.WindowManager.WindowManager.Core 70 * @crossplatform 71 * @atomicservice 72 * @since 11 73 */ 74declare namespace window { 75 /** 76 * The type of a window. 77 * 78 * @enum { number } 79 * @syscap SystemCapability.WindowManager.WindowManager.Core 80 * @since 7 81 */ 82 /** 83 * The type of a window. 84 * 85 * @enum { number } 86 * @syscap SystemCapability.WindowManager.WindowManager.Core 87 * @atomicservice 88 * @since 12 89 */ 90 enum WindowType { 91 /** 92 * App. 93 * 94 * @syscap SystemCapability.WindowManager.WindowManager.Core 95 * @FAModelOnly 96 * @since 7 97 */ 98 TYPE_APP, 99 /** 100 * System alert. 101 * 102 * @syscap SystemCapability.WindowManager.WindowManager.Core 103 * @since 7 104 * @deprecated since 11 105 */ 106 TYPE_SYSTEM_ALERT, 107 /** 108 * Input method. 109 * 110 * @syscap SystemCapability.WindowManager.WindowManager.Core 111 * @systemapi Hide this for inner system use. 112 * @StageModelOnly 113 * @since 9 114 * @deprecated since 13 115 */ 116 TYPE_INPUT_METHOD, 117 /** 118 * Status bar. 119 * 120 * @syscap SystemCapability.WindowManager.WindowManager.Core 121 * @systemapi Hide this for inner system use. 122 * @StageModelOnly 123 * @since 9 124 */ 125 TYPE_STATUS_BAR, 126 /** 127 * Panel. 128 * 129 * @syscap SystemCapability.WindowManager.WindowManager.Core 130 * @systemapi Hide this for inner system use. 131 * @StageModelOnly 132 * @since 9 133 */ 134 TYPE_PANEL, 135 /** 136 * Keyguard. 137 * 138 * @syscap SystemCapability.WindowManager.WindowManager.Core 139 * @systemapi Hide this for inner system use. 140 * @StageModelOnly 141 * @since 9 142 */ 143 TYPE_KEYGUARD, 144 /** 145 * Volume. 146 * 147 * @syscap SystemCapability.WindowManager.WindowManager.Core 148 * @systemapi Hide this for inner system use. 149 * @StageModelOnly 150 * @since 9 151 */ 152 TYPE_VOLUME_OVERLAY, 153 /** 154 * Navigation bar. 155 * 156 * @syscap SystemCapability.WindowManager.WindowManager.Core 157 * @systemapi Hide this for inner system use. 158 * @StageModelOnly 159 * @since 9 160 */ 161 TYPE_NAVIGATION_BAR, 162 /** 163 * Float. 164 * 165 * @permission ohos.permission.SYSTEM_FLOAT_WINDOW 166 * @syscap SystemCapability.WindowManager.WindowManager.Core 167 * @StageModelOnly 168 * @since 9 169 */ 170 /** 171 * Float. 172 * Require "ohos.permission.SYSTEM_FLOAT_WINDOW" permission 173 * 174 * @syscap SystemCapability.WindowManager.WindowManager.Core 175 * @StageModelOnly 176 * @atomicservice 177 * @since 12 178 */ 179 TYPE_FLOAT, 180 /** 181 * Wallpaper. 182 * 183 * @syscap SystemCapability.WindowManager.WindowManager.Core 184 * @systemapi Hide this for inner system use. 185 * @StageModelOnly 186 * @since 9 187 */ 188 TYPE_WALLPAPER, 189 /** 190 * Desktop. 191 * 192 * @syscap SystemCapability.WindowManager.WindowManager.Core 193 * @systemapi Hide this for inner system use. 194 * @StageModelOnly 195 * @since 9 196 */ 197 TYPE_DESKTOP, 198 /** 199 * Recent. 200 * 201 * @syscap SystemCapability.WindowManager.WindowManager.Core 202 * @systemapi Hide this for inner system use. 203 * @StageModelOnly 204 * @since 9 205 */ 206 TYPE_LAUNCHER_RECENT, 207 /** 208 * Dock. 209 * 210 * @syscap SystemCapability.WindowManager.WindowManager.Core 211 * @systemapi Hide this for inner system use. 212 * @StageModelOnly 213 * @since 9 214 */ 215 TYPE_LAUNCHER_DOCK, 216 /** 217 * Voice interaction. 218 * 219 * @syscap SystemCapability.WindowManager.WindowManager.Core 220 * @systemapi Hide this for inner system use. 221 * @StageModelOnly 222 * @since 9 223 */ 224 TYPE_VOICE_INTERACTION, 225 /** 226 * Pointer. 227 * 228 * @syscap SystemCapability.WindowManager.WindowManager.Core 229 * @systemapi Hide this for inner system use. 230 * @StageModelOnly 231 * @since 9 232 */ 233 TYPE_POINTER, 234 /** 235 * Float camera. 236 * 237 * @syscap SystemCapability.WindowManager.WindowManager.Core 238 * @systemapi Hide this for inner system use. 239 * @StageModelOnly 240 * @since 9 241 */ 242 TYPE_FLOAT_CAMERA, 243 /** 244 * Dialog. 245 * 246 * @syscap SystemCapability.WindowManager.WindowManager.Core 247 * @StageModelOnly 248 * @since 10 249 */ 250 /** 251 * Dialog. 252 * 253 * @syscap SystemCapability.WindowManager.WindowManager.Core 254 * @StageModelOnly 255 * @atomicservice 256 * @since 12 257 */ 258 TYPE_DIALOG, 259 /** 260 * Screenshot. 261 * 262 * @syscap SystemCapability.WindowManager.WindowManager.Core 263 * @systemapi Hide this for inner system use. 264 * @StageModelOnly 265 * @since 9 266 */ 267 TYPE_SCREENSHOT, 268 /** 269 * System Toast. 270 * 271 * @syscap SystemCapability.WindowManager.WindowManager.Core 272 * @systemapi Hide this for inner system use. 273 * @StageModelOnly 274 * @since 11 275 */ 276 TYPE_SYSTEM_TOAST, 277 /** 278 * Divider. 279 * 280 * @syscap SystemCapability.WindowManager.WindowManager.Core 281 * @systemapi Hide this for inner system use. 282 * @StageModelOnly 283 * @since 11 284 */ 285 TYPE_DIVIDER, 286 /** 287 * Global Search. 288 * 289 * @syscap SystemCapability.WindowManager.WindowManager.Core 290 * @systemapi Hide this for inner system use. 291 * @StageModelOnly 292 * @since 11 293 */ 294 TYPE_GLOBAL_SEARCH, 295 /** 296 * Handwrite. 297 * 298 * @syscap SystemCapability.Window.SessionManager 299 * @systemapi Hide this for inner system use. 300 * @StageModelOnly 301 * @since 12 302 */ 303 TYPE_HANDWRITE, 304 /** 305 * TYPE_WALLET_SWIPE_CARD. 306 * 307 * @syscap SystemCapability.Window.SessionManager 308 * @systemapi Hide this for inner system use. 309 * @stagemodelonly 310 * @since 15 311 */ 312 TYPE_WALLET_SWIPE_CARD, 313 /** 314 * Screen Control 315 * 316 * @syscap SystemCapability.Window.SessionManager 317 * @systemapi Hide this for inner system use. 318 * @stagemodelonly 319 * @since 15 320 */ 321 TYPE_SCREEN_CONTROL 322 } 323 324 /** 325 * Describes the type of avoid area 326 * 327 * @enum { number } 328 * @syscap SystemCapability.WindowManager.WindowManager.Core 329 * @since 7 330 */ 331 /** 332 * Describes the type of avoid area 333 * 334 * @enum { number } 335 * @syscap SystemCapability.WindowManager.WindowManager.Core 336 * @atomicservice 337 * @since 11 338 */ 339 /** 340 * Describes the type of avoid area 341 * 342 * @enum { number } 343 * @syscap SystemCapability.WindowManager.WindowManager.Core 344 * @crossplatform 345 * @atomicservice 346 * @since 12 347 */ 348 enum AvoidAreaType { 349 /** 350 * Default area of the system 351 * 352 * @syscap SystemCapability.WindowManager.WindowManager.Core 353 * @since 7 354 */ 355 /** 356 * Default area of the system 357 * 358 * @syscap SystemCapability.WindowManager.WindowManager.Core 359 * @atomicservice 360 * @since 11 361 */ 362 /** 363 * Default area of the system 364 * 365 * @syscap SystemCapability.WindowManager.WindowManager.Core 366 * @crossplatform 367 * @atomicservice 368 * @since 12 369 */ 370 TYPE_SYSTEM, 371 372 /** 373 * Notch 374 * 375 * @syscap SystemCapability.WindowManager.WindowManager.Core 376 * @since 7 377 */ 378 /** 379 * Notch 380 * 381 * @syscap SystemCapability.WindowManager.WindowManager.Core 382 * @atomicservice 383 * @since 11 384 */ 385 /** 386 * Notch 387 * 388 * @syscap SystemCapability.WindowManager.WindowManager.Core 389 * @crossplatform 390 * @atomicservice 391 * @since 12 392 */ 393 TYPE_CUTOUT, 394 395 /** 396 * Area for system gesture 397 * 398 * @syscap SystemCapability.WindowManager.WindowManager.Core 399 * @since 9 400 */ 401 /** 402 * Area for system gesture 403 * 404 * @syscap SystemCapability.WindowManager.WindowManager.Core 405 * @atomicservice 406 * @since 11 407 */ 408 /** 409 * Area for system gesture 410 * 411 * @syscap SystemCapability.WindowManager.WindowManager.Core 412 * @crossplatform 413 * @atomicservice 414 * @since 12 415 */ 416 TYPE_SYSTEM_GESTURE, 417 418 /** 419 * Area for keyboard 420 * 421 * @syscap SystemCapability.WindowManager.WindowManager.Core 422 * @since 9 423 */ 424 /** 425 * Area for keyboard 426 * 427 * @syscap SystemCapability.WindowManager.WindowManager.Core 428 * @atomicservice 429 * @since 11 430 */ 431 /** 432 * Area for keyboard 433 * 434 * @syscap SystemCapability.WindowManager.WindowManager.Core 435 * @crossplatform 436 * @atomicservice 437 * @since 12 438 */ 439 TYPE_KEYBOARD, 440 441 /** 442 * Area for navigation indicator 443 * 444 * @syscap SystemCapability.WindowManager.WindowManager.Core 445 * @atomicservice 446 * @since 11 447 */ 448 /** 449 * Area for navigation indicator 450 * 451 * @syscap SystemCapability.WindowManager.WindowManager.Core 452 * @crossplatform 453 * @atomicservice 454 * @since 12 455 */ 456 TYPE_NAVIGATION_INDICATOR 457 } 458 /** 459 * Describes the window mode of an application 460 * 461 * @enum { number } 462 * @syscap SystemCapability.WindowManager.WindowManager.Core 463 * @systemapi Hide this for inner system use. 464 * @since 7 465 */ 466 enum WindowMode { 467 /** 468 * Undefined mode of the window 469 * 470 * @syscap SystemCapability.WindowManager.WindowManager.Core 471 * @systemapi Hide this for inner system use. 472 * @since 7 473 */ 474 UNDEFINED = 1, 475 /** 476 * Fullscreen mode of the window 477 * 478 * @syscap SystemCapability.WindowManager.WindowManager.Core 479 * @systemapi Hide this for inner system use. 480 * @since 7 481 */ 482 FULLSCREEN, 483 /** 484 * Primary mode of the window 485 * 486 * @syscap SystemCapability.WindowManager.WindowManager.Core 487 * @systemapi Hide this for inner system use. 488 * @since 7 489 */ 490 PRIMARY, 491 /** 492 * Secondary mode of the window 493 * 494 * @syscap SystemCapability.WindowManager.WindowManager.Core 495 * @systemapi Hide this for inner system use. 496 * @since 7 497 */ 498 SECONDARY, 499 /** 500 * Floating mode of the window 501 * 502 * @syscap SystemCapability.WindowManager.WindowManager.Core 503 * @systemapi Hide this for inner system use. 504 * @since 7 505 */ 506 FLOATING 507 } 508 509 /** 510 * Describes the mode of window layout 511 * 512 * @enum { number } 513 * @syscap SystemCapability.WindowManager.WindowManager.Core 514 * @systemapi Hide this for inner system use. 515 * @since 9 516 */ 517 enum WindowLayoutMode { 518 /** 519 * CASCADE 520 * 521 * @syscap SystemCapability.WindowManager.WindowManager.Core 522 * @systemapi Hide this for inner system use. 523 * @since 9 524 */ 525 WINDOW_LAYOUT_MODE_CASCADE, 526 /** 527 * TILE 528 * 529 * @syscap SystemCapability.WindowManager.WindowManager.Core 530 * @systemapi Hide this for inner system use. 531 * @since 9 532 */ 533 WINDOW_LAYOUT_MODE_TILE 534 } 535 536 /** 537 * Describes the window status of an application 538 * 539 * @enum { number } 540 * @syscap SystemCapability.Window.SessionManager 541 * @since 11 542 */ 543 /** 544 * Describes the window status of an application 545 * 546 * @enum { number } 547 * @syscap SystemCapability.Window.SessionManager 548 * @atomicservice 549 * @since 12 550 */ 551 enum WindowStatusType { 552 /** 553 * Undefined status of the window 554 * 555 * @syscap SystemCapability.Window.SessionManager 556 * @since 11 557 */ 558 /** 559 * Undefined status of the window 560 * 561 * @syscap SystemCapability.Window.SessionManager 562 * @atomicservice 563 * @since 12 564 */ 565 UNDEFINED = 0, 566 /** 567 * Full screen status of the window 568 * 569 * @syscap SystemCapability.Window.SessionManager 570 * @since 11 571 */ 572 /** 573 * Full screen status of the window 574 * 575 * @syscap SystemCapability.Window.SessionManager 576 * @atomicservice 577 * @since 12 578 */ 579 FULL_SCREEN, 580 /** 581 * Maximize status of the window 582 * 583 * @syscap SystemCapability.Window.SessionManager 584 * @since 11 585 */ 586 /** 587 * Maximize status of the window 588 * 589 * @syscap SystemCapability.Window.SessionManager 590 * @atomicservice 591 * @since 12 592 */ 593 MAXIMIZE, 594 /** 595 * Minimize status of the window 596 * 597 * @syscap SystemCapability.Window.SessionManager 598 * @since 11 599 */ 600 /** 601 * Minimize status of the window 602 * 603 * @syscap SystemCapability.Window.SessionManager 604 * @atomicservice 605 * @since 12 606 */ 607 MINIMIZE, 608 /** 609 * Floating status of the window 610 * 611 * @syscap SystemCapability.Window.SessionManager 612 * @since 11 613 */ 614 /** 615 * Floating status of the window 616 * 617 * @syscap SystemCapability.Window.SessionManager 618 * @atomicservice 619 * @since 12 620 */ 621 FLOATING, 622 /** 623 * Split screen status of the window 624 * 625 * @syscap SystemCapability.Window.SessionManager 626 * @since 11 627 */ 628 /** 629 * Split screen status of the window 630 * 631 * @syscap SystemCapability.Window.SessionManager 632 * @atomicservice 633 * @since 12 634 */ 635 SPLIT_SCREEN 636 } 637 638 /** 639 * Properties of status bar and navigation bar, it couldn't update automatically 640 * 641 * @interface SystemBarProperties 642 * @syscap SystemCapability.WindowManager.WindowManager.Core 643 * @since 6 644 */ 645 /** 646 * Properties of status bar and navigation bar, it couldn't update automatically 647 * 648 * @interface SystemBarProperties 649 * @syscap SystemCapability.WindowManager.WindowManager.Core 650 * @atomicservice 651 * @since 12 652 */ 653 interface SystemBarProperties { 654 /** 655 * The color of the status bar. 656 * 657 * @syscap SystemCapability.WindowManager.WindowManager.Core 658 * @since 6 659 */ 660 /** 661 * The color of the status bar. 662 * 663 * @type { ?string } 664 * @syscap SystemCapability.WindowManager.WindowManager.Core 665 * @atomicservice 666 * @since 12 667 */ 668 statusBarColor?: string; 669 670 /** 671 * The light icon of the status bar. 672 * 673 * @syscap SystemCapability.WindowManager.WindowManager.Core 674 * @since 7 675 */ 676 /** 677 * The light icon of the status bar. 678 * 679 * @type { ?boolean } 680 * @syscap SystemCapability.WindowManager.WindowManager.Core 681 * @atomicservice 682 * @since 12 683 */ 684 isStatusBarLightIcon?: boolean; 685 686 /** 687 * The content color of the status bar 688 * 689 * @syscap SystemCapability.WindowManager.WindowManager.Core 690 * @since 8 691 */ 692 /** 693 * The content color of the status bar 694 * 695 * @type { ?string } 696 * @syscap SystemCapability.WindowManager.WindowManager.Core 697 * @atomicservice 698 * @since 12 699 */ 700 statusBarContentColor?: string; 701 702 /** 703 * The color of the navigation bar. 704 * 705 * @syscap SystemCapability.WindowManager.WindowManager.Core 706 * @since 6 707 */ 708 /** 709 * The color of the navigation bar. 710 * 711 * @type { ?string } 712 * @syscap SystemCapability.WindowManager.WindowManager.Core 713 * @atomicservice 714 * @since 12 715 */ 716 navigationBarColor?: string; 717 718 /** 719 * The light icon of the navigation bar. 720 * 721 * @syscap SystemCapability.WindowManager.WindowManager.Core 722 * @since 7 723 */ 724 /** 725 * The light icon of the navigation bar. 726 * 727 * @type { ?boolean } 728 * @syscap SystemCapability.WindowManager.WindowManager.Core 729 * @atomicservice 730 * @since 12 731 */ 732 isNavigationBarLightIcon?: boolean; 733 734 /** 735 * The content color of the navigation bar 736 * 737 * @syscap SystemCapability.WindowManager.WindowManager.Core 738 * @since 8 739 */ 740 /** 741 * The content color of the navigation bar 742 * 743 * @type { ?string } 744 * @syscap SystemCapability.WindowManager.WindowManager.Core 745 * @atomicservice 746 * @since 12 747 */ 748 navigationBarContentColor?: string; 749 750 /** 751 * Enable the animation of the status bar. 752 * 753 * @type { ?boolean } 754 * @syscap SystemCapability.Window.SessionManager 755 * @atomicservice 756 * @since 12 757 */ 758 enableStatusBarAnimation?: boolean; 759 760 /** 761 * Enable the animation of the navigation bar. 762 * 763 * @type { ?boolean } 764 * @syscap SystemCapability.Window.SessionManager 765 * @atomicservice 766 * @since 12 767 */ 768 enableNavigationBarAnimation?: boolean; 769 } 770 771 /** 772 * Properties of status bar, it couldn't update automatically 773 * 774 * @interface SystemBarStyle 775 * @syscap SystemCapability.WindowManager.WindowManager.Core 776 * @atomicservice 777 * @since 12 778 */ 779 interface SystemBarStyle { 780 /** 781 * The content color of the status bar 782 * 783 * @type { ?string } 784 * @syscap SystemCapability.WindowManager.WindowManager.Core 785 * @atomicservice 786 * @since 12 787 */ 788 statusBarContentColor?: string; 789 } 790 791 /** 792 * System bar tint of region 793 * 794 * @interface SystemBarRegionTint 795 * @syscap SystemCapability.WindowManager.WindowManager.Core 796 * @systemapi Hide this for inner system use. 797 * @since 8 798 */ 799 interface SystemBarRegionTint { 800 /** 801 * System bar type 802 * 803 * @type { WindowType } 804 * @syscap SystemCapability.WindowManager.WindowManager.Core 805 * @systemapi Hide this for inner system use. 806 * @since 8 807 */ 808 type: WindowType; 809 810 /** 811 * The visibility of system bar 812 * 813 * @type { ?boolean } 814 * @syscap SystemCapability.WindowManager.WindowManager.Core 815 * @systemapi Hide this for inner system use. 816 * @since 8 817 */ 818 isEnable?: boolean; 819 820 /** 821 * The region of system bar 822 * 823 * @type { ?Rect } 824 * @syscap SystemCapability.WindowManager.WindowManager.Core 825 * @systemapi Hide this for inner system use. 826 * @since 8 827 */ 828 region?: Rect; 829 830 /** 831 * The background color of the system bar. 832 * 833 * @type { ?string } 834 * @syscap SystemCapability.WindowManager.WindowManager.Core 835 * @systemapi Hide this for inner system use. 836 * @since 8 837 */ 838 backgroundColor?: string; 839 840 /** 841 * The content color of the system bar. 842 * 843 * @type { ?string } 844 * @syscap SystemCapability.WindowManager.WindowManager.Core 845 * @systemapi Hide this for inner system use. 846 * @since 8 847 */ 848 contentColor?: string; 849 } 850 851 /** 852 * System bar tint state for systemui 853 * 854 * @interface SystemBarTintState 855 * @syscap SystemCapability.WindowManager.WindowManager.Core 856 * @systemapi Hide this for inner system use. 857 * @since 8 858 */ 859 interface SystemBarTintState { 860 /** 861 * Id of display 862 * 863 * @type { number } 864 * @syscap SystemCapability.WindowManager.WindowManager.Core 865 * @systemapi Hide this for inner system use. 866 * @since 8 867 */ 868 displayId: number; 869 /** 870 * Region tint of systembar 871 * 872 * @type { Array<SystemBarRegionTint> } 873 * @syscap SystemCapability.WindowManager.WindowManager.Core 874 * @systemapi Hide this for inner system use. 875 * @since 8 876 */ 877 regionTint: Array<SystemBarRegionTint>; 878 } 879 880 /** 881 * Rectangle 882 * 883 * @interface Rect 884 * @syscap SystemCapability.WindowManager.WindowManager.Core 885 * @since 7 886 */ 887 /** 888 * Rectangle 889 * 890 * @interface Rect 891 * @syscap SystemCapability.WindowManager.WindowManager.Core 892 * @crossplatform 893 * @since 10 894 */ 895 /** 896 * Rectangle 897 * 898 * @interface Rect 899 * @syscap SystemCapability.WindowManager.WindowManager.Core 900 * @crossplatform 901 * @atomicservice 902 * @since 11 903 */ 904 interface Rect { 905 906 /** 907 * The left of the Rect. 908 * 909 * @syscap SystemCapability.WindowManager.WindowManager.Core 910 * @since 7 911 */ 912 /** 913 * The left of the Rect. 914 * 915 * @syscap SystemCapability.WindowManager.WindowManager.Core 916 * @crossplatform 917 * @since 10 918 */ 919 /** 920 * The left of the Rect. 921 * 922 * @type { number } 923 * @syscap SystemCapability.WindowManager.WindowManager.Core 924 * @crossplatform 925 * @atomicservice 926 * @since 11 927 */ 928 left: number; 929 930 /** 931 * The top of the Rect. 932 * 933 * @syscap SystemCapability.WindowManager.WindowManager.Core 934 * @since 7 935 */ 936 /** 937 * The top of the Rect. 938 * 939 * @syscap SystemCapability.WindowManager.WindowManager.Core 940 * @crossplatform 941 * @since 10 942 */ 943 /** 944 * The top of the Rect. 945 * 946 * @type { number } 947 * @syscap SystemCapability.WindowManager.WindowManager.Core 948 * @crossplatform 949 * @atomicservice 950 * @since 11 951 */ 952 top: number; 953 954 /** 955 * The width of the Rect. 956 * 957 * @syscap SystemCapability.WindowManager.WindowManager.Core 958 * @since 7 959 */ 960 /** 961 * The width of the Rect. 962 * 963 * @syscap SystemCapability.WindowManager.WindowManager.Core 964 * @crossplatform 965 * @since 10 966 */ 967 /** 968 * The width of the Rect. 969 * 970 * @type { number } 971 * @syscap SystemCapability.WindowManager.WindowManager.Core 972 * @crossplatform 973 * @atomicservice 974 * @since 11 975 */ 976 width: number; 977 978 /** 979 * The height of the Rect. 980 * 981 * @syscap SystemCapability.WindowManager.WindowManager.Core 982 * @since 7 983 */ 984 /** 985 * The height of the Rect. 986 * 987 * @syscap SystemCapability.WindowManager.WindowManager.Core 988 * @crossplatform 989 * @since 10 990 */ 991 /** 992 * The height of the Rect. 993 * 994 * @type { number } 995 * @syscap SystemCapability.WindowManager.WindowManager.Core 996 * @crossplatform 997 * @atomicservice 998 * @since 11 999 */ 1000 height: number; 1001 } 1002 1003 /** 1004 * Avoid area 1005 * 1006 * @interface AvoidArea 1007 * @syscap SystemCapability.WindowManager.WindowManager.Core 1008 * @since 7 1009 */ 1010 /** 1011 * Avoid area 1012 * 1013 * @interface AvoidArea 1014 * @syscap SystemCapability.WindowManager.WindowManager.Core 1015 * @atomicservice 1016 * @since 11 1017 */ 1018 /** 1019 * Avoid area 1020 * 1021 * @interface AvoidArea 1022 * @syscap SystemCapability.WindowManager.WindowManager.Core 1023 * @crossplatform 1024 * @atomicservice 1025 * @since 12 1026 */ 1027 interface AvoidArea { 1028 /** 1029 * Whether avoidArea is visible on screen 1030 * 1031 * @type { boolean } 1032 * @syscap SystemCapability.WindowManager.WindowManager.Core 1033 * @since 9 1034 */ 1035 /** 1036 * Whether avoidArea is visible on screen 1037 * 1038 * @type { boolean } 1039 * @syscap SystemCapability.WindowManager.WindowManager.Core 1040 * @atomicservice 1041 * @since 11 1042 */ 1043 visible: boolean; 1044 1045 /** 1046 * Rectangle on the left of the screen 1047 * 1048 * @type { Rect } 1049 * @syscap SystemCapability.WindowManager.WindowManager.Core 1050 * @since 7 1051 */ 1052 /** 1053 * Rectangle on the left of the screen 1054 * 1055 * @type { Rect } 1056 * @syscap SystemCapability.WindowManager.WindowManager.Core 1057 * @atomicservice 1058 * @since 11 1059 */ 1060 /** 1061 * Rectangle on the left of the screen 1062 * 1063 * @type { Rect } 1064 * @syscap SystemCapability.WindowManager.WindowManager.Core 1065 * @crossplatform 1066 * @atomicservice 1067 * @since 12 1068 */ 1069 leftRect: Rect; 1070 1071 /** 1072 * Rectangle on the top of the screen 1073 * 1074 * @type { Rect } 1075 * @syscap SystemCapability.WindowManager.WindowManager.Core 1076 * @since 7 1077 */ 1078 /** 1079 * Rectangle on the top of the screen 1080 * 1081 * @type { Rect } 1082 * @syscap SystemCapability.WindowManager.WindowManager.Core 1083 * @atomicservice 1084 * @since 11 1085 */ 1086 /** 1087 * Rectangle on the top of the screen 1088 * 1089 * @type { Rect } 1090 * @syscap SystemCapability.WindowManager.WindowManager.Core 1091 * @crossplatform 1092 * @atomicservice 1093 * @since 12 1094 */ 1095 topRect: Rect; 1096 1097 /** 1098 * Rectangle on the right of the screen 1099 * 1100 * @type { Rect } 1101 * @syscap SystemCapability.WindowManager.WindowManager.Core 1102 * @since 7 1103 */ 1104 /** 1105 * Rectangle on the right of the screen 1106 * 1107 * @type { Rect } 1108 * @syscap SystemCapability.WindowManager.WindowManager.Core 1109 * @atomicservice 1110 * @since 11 1111 */ 1112 /** 1113 * Rectangle on the right of the screen 1114 * 1115 * @type { Rect } 1116 * @syscap SystemCapability.WindowManager.WindowManager.Core 1117 * @crossplatform 1118 * @atomicservice 1119 * @since 12 1120 */ 1121 rightRect: Rect; 1122 1123 /** 1124 * Rectangle on the bottom of the screen 1125 * 1126 * @type { Rect } 1127 * @syscap SystemCapability.WindowManager.WindowManager.Core 1128 * @since 7 1129 */ 1130 /** 1131 * Rectangle on the bottom of the screen 1132 * 1133 * @type { Rect } 1134 * @syscap SystemCapability.WindowManager.WindowManager.Core 1135 * @atomicservice 1136 * @since 11 1137 */ 1138 /** 1139 * Rectangle on the bottom of the screen 1140 * 1141 * @type { Rect } 1142 * @syscap SystemCapability.WindowManager.WindowManager.Core 1143 * @crossplatform 1144 * @atomicservice 1145 * @since 12 1146 */ 1147 bottomRect: Rect; 1148 } 1149 1150 /** 1151 * Window size 1152 * 1153 * @interface Size 1154 * @syscap SystemCapability.WindowManager.WindowManager.Core 1155 * @since 7 1156 */ 1157 /** 1158 * Window size 1159 * 1160 * @interface Size 1161 * @syscap SystemCapability.WindowManager.WindowManager.Core 1162 * @crossplatform 1163 * @since 10 1164 */ 1165 /** 1166 * Window size 1167 * 1168 * @interface Size 1169 * @syscap SystemCapability.WindowManager.WindowManager.Core 1170 * @crossplatform 1171 * @atomicservice 1172 * @since 11 1173 */ 1174 interface Size { 1175 /** 1176 * The width of the window. 1177 * 1178 * @type { number } 1179 * @syscap SystemCapability.WindowManager.WindowManager.Core 1180 * @since 7 1181 */ 1182 /** 1183 * The width of the window. 1184 * 1185 * @type { number } 1186 * @syscap SystemCapability.WindowManager.WindowManager.Core 1187 * @crossplatform 1188 * @since 10 1189 */ 1190 /** 1191 * The width of the window. 1192 * 1193 * @type { number } 1194 * @syscap SystemCapability.WindowManager.WindowManager.Core 1195 * @crossplatform 1196 * @atomicservice 1197 * @since 11 1198 */ 1199 width: number; 1200 1201 /** 1202 * The height of the window. 1203 * 1204 * @syscap SystemCapability.WindowManager.WindowManager.Core 1205 * @since 7 1206 */ 1207 /** 1208 * The height of the window. 1209 * 1210 * @type { number } 1211 * @syscap SystemCapability.WindowManager.WindowManager.Core 1212 * @crossplatform 1213 * @since 10 1214 */ 1215 /** 1216 * The height of the window. 1217 * 1218 * @type { number } 1219 * @syscap SystemCapability.WindowManager.WindowManager.Core 1220 * @crossplatform 1221 * @atomicservice 1222 * @since 11 1223 */ 1224 height: number; 1225 } 1226 1227 /** 1228 * The info of window 1229 * 1230 * @interface WindowInfo 1231 * @syscap SystemCapability.Window.SessionManager 1232 * @systemapi 1233 * @since 12 1234 */ 1235 interface WindowInfo { 1236 /** 1237 * The position and size of the window 1238 * 1239 * @type { Rect } 1240 * @syscap SystemCapability.Window.SessionManager 1241 * @systemapi 1242 * @since 12 1243 */ 1244 rect: Rect; 1245 1246 /** 1247 * bundleName of window 1248 * 1249 * @type { string } 1250 * @syscap SystemCapability.Window.SessionManager 1251 * @systemapi 1252 * @since 12 1253 */ 1254 bundleName: string; 1255 1256 /** 1257 * abilityName of window 1258 * 1259 * @type { string } 1260 * @syscap SystemCapability.Window.SessionManager 1261 * @systemapi 1262 * @since 12 1263 */ 1264 abilityName: string; 1265 1266 /** 1267 * Indicates target window id. 1268 * 1269 * @type { number } 1270 * @syscap SystemCapability.Window.SessionManager 1271 * @systemapi 1272 * @since 12 1273 */ 1274 windowId: number; 1275 1276 /** 1277 * The window status of an application. 1278 * 1279 * @type { WindowStatusType } 1280 * @syscap SystemCapability.Window.SessionManager 1281 * @systemapi 1282 * @since 12 1283 */ 1284 windowStatusType: WindowStatusType; 1285 1286 /** 1287 * Whether the window is focused. The default value is false. 1288 * 1289 * @type { ?boolean } 1290 * @syscap SystemCapability.Window.SessionManager 1291 * @systemapi 1292 * @since 14 1293 */ 1294 isFocused?: boolean; 1295 } 1296 1297 /** 1298 * The info of window density 1299 * 1300 * @interface WindowDensityInfo 1301 * @syscap SystemCapability.Window.SessionManager 1302 * @atomicservice 1303 * @since 15 1304 */ 1305 interface WindowDensityInfo { 1306 /** 1307 * System density 1308 * 1309 * @type { number } 1310 * @syscap SystemCapability.Window.SessionManager 1311 * @atomicservice 1312 * @since 15 1313 */ 1314 systemDensity: number; 1315 1316 /** 1317 * Default density 1318 * 1319 * @type { number } 1320 * @syscap SystemCapability.Window.SessionManager 1321 * @atomicservice 1322 * @since 15 1323 */ 1324 defaultDensity: number; 1325 1326 /** 1327 * Custom density 1328 * 1329 * @type { number } 1330 * @syscap SystemCapability.Window.SessionManager 1331 * @atomicservice 1332 * @since 15 1333 */ 1334 customDensity: number; 1335 } 1336 1337 /** 1338 * Properties of window, it couldn't update automatically 1339 * 1340 * @interface WindowProperties 1341 * @syscap SystemCapability.WindowManager.WindowManager.Core 1342 * @since 6 1343 */ 1344 /** 1345 * Properties of window, it couldn't update automatically 1346 * 1347 * @interface WindowProperties 1348 * @syscap SystemCapability.WindowManager.WindowManager.Core 1349 * @crossplatform 1350 * @since 10 1351 */ 1352 /** 1353 * Properties of window, it couldn't update automatically 1354 * 1355 * @interface WindowProperties 1356 * @syscap SystemCapability.WindowManager.WindowManager.Core 1357 * @crossplatform 1358 * @atomicservice 1359 * @since 11 1360 */ 1361 interface WindowProperties { 1362 /** 1363 * The position and size of the window 1364 * 1365 * @type { Rect } 1366 * @syscap SystemCapability.WindowManager.WindowManager.Core 1367 * @since 7 1368 */ 1369 /** 1370 * The position and size of the window 1371 * 1372 * @type { Rect } 1373 * @syscap SystemCapability.WindowManager.WindowManager.Core 1374 * @crossplatform 1375 * @since 10 1376 */ 1377 /** 1378 * The position and size of the window 1379 * 1380 * @type { Rect } 1381 * @syscap SystemCapability.WindowManager.WindowManager.Core 1382 * @crossplatform 1383 * @atomicservice 1384 * @since 11 1385 */ 1386 windowRect: Rect; 1387 1388 /** 1389 * The position relative to the window and size of drawable area 1390 * 1391 * @type { Rect } 1392 * @syscap SystemCapability.WindowManager.WindowManager.Core 1393 * @since 11 1394 */ 1395 /** 1396 * The position relative to the window and size of drawable area 1397 * 1398 * @type { Rect } 1399 * @syscap SystemCapability.WindowManager.WindowManager.Core 1400 * @atomicservice 1401 * @since 12 1402 */ 1403 drawableRect: Rect; 1404 1405 /** 1406 * Window type 1407 * 1408 * @type { WindowType } 1409 * @syscap SystemCapability.WindowManager.WindowManager.Core 1410 * @since 7 1411 */ 1412 /** 1413 * Window type 1414 * 1415 * @type { WindowType } 1416 * @syscap SystemCapability.WindowManager.WindowManager.Core 1417 * @atomicservice 1418 * @since 12 1419 */ 1420 type: WindowType; 1421 1422 /** 1423 * Whether the window is displayed in full screen mode. The default value is false. 1424 * 1425 * @type { boolean } 1426 * @syscap SystemCapability.WindowManager.WindowManager.Core 1427 * @since 6 1428 */ 1429 /** 1430 * Whether the window is displayed in full screen mode. The default value is false. 1431 * 1432 * @type { boolean } 1433 * @syscap SystemCapability.WindowManager.WindowManager.Core 1434 * @atomicservice 1435 * @since 12 1436 */ 1437 isFullScreen: boolean; 1438 1439 /** 1440 * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false. 1441 * 1442 * @type { boolean } 1443 * @syscap SystemCapability.WindowManager.WindowManager.Core 1444 * @since 7 1445 */ 1446 /** 1447 * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false. 1448 * 1449 * @type { boolean } 1450 * @syscap SystemCapability.WindowManager.WindowManager.Core 1451 * @atomicservice 1452 * @since 12 1453 */ 1454 isLayoutFullScreen: boolean; 1455 1456 /** 1457 * Whether the window can gain focus. The default value is true 1458 * 1459 * @type { boolean } 1460 * @syscap SystemCapability.WindowManager.WindowManager.Core 1461 * @since 7 1462 */ 1463 /** 1464 * Whether the window can gain focus. The default value is true 1465 * 1466 * @type { boolean } 1467 * @syscap SystemCapability.WindowManager.WindowManager.Core 1468 * @atomicservice 1469 * @since 12 1470 */ 1471 focusable: boolean; 1472 1473 /** 1474 * Whether the window is touchable. The default value is false 1475 * 1476 * @type { boolean } 1477 * @syscap SystemCapability.WindowManager.WindowManager.Core 1478 * @since 7 1479 */ 1480 /** 1481 * Whether the window is touchable. The default value is false 1482 * 1483 * @type { boolean } 1484 * @syscap SystemCapability.WindowManager.WindowManager.Core 1485 * @atomicservice 1486 * @since 12 1487 */ 1488 touchable: boolean; 1489 1490 /** 1491 * Brightness value of window. 1492 * 1493 * @syscap SystemCapability.WindowManager.WindowManager.Core 1494 * @since 6 1495 */ 1496 /** 1497 * Brightness value of window. 1498 * 1499 * @type { number } 1500 * @syscap SystemCapability.WindowManager.WindowManager.Core 1501 * @crossplatform 1502 * @since 10 1503 */ 1504 /** 1505 * Brightness value of window. 1506 * 1507 * @type { number } 1508 * @syscap SystemCapability.WindowManager.WindowManager.Core 1509 * @crossplatform 1510 * @atomicservice 1511 * @since 11 1512 */ 1513 brightness: number; 1514 1515 /** 1516 * The dimbehind value of window. 1517 * 1518 * @type { number } 1519 * @syscap SystemCapability.WindowManager.WindowManager.Core 1520 * @since 7 1521 * @deprecated since 9 1522 */ 1523 dimBehindValue: number; 1524 1525 /** 1526 * Whether keep screen on. 1527 * 1528 * @syscap SystemCapability.WindowManager.WindowManager.Core 1529 * @since 6 1530 */ 1531 /** 1532 * Whether keep screen on. 1533 * 1534 * @type { boolean } 1535 * @syscap SystemCapability.WindowManager.WindowManager.Core 1536 * @crossplatform 1537 * @since 10 1538 */ 1539 /** 1540 * Whether keep screen on. 1541 * 1542 * @type { boolean } 1543 * @syscap SystemCapability.WindowManager.WindowManager.Core 1544 * @crossplatform 1545 * @atomicservice 1546 * @since 11 1547 */ 1548 isKeepScreenOn: boolean; 1549 1550 /** 1551 * Whether make window in privacy mode or not. 1552 * 1553 * @type { boolean } 1554 * @syscap SystemCapability.WindowManager.WindowManager.Core 1555 * @since 7 1556 */ 1557 /** 1558 * Whether make window in privacy mode or not. 1559 * 1560 * @type { boolean } 1561 * @syscap SystemCapability.WindowManager.WindowManager.Core 1562 * @atomicservice 1563 * @since 12 1564 */ 1565 isPrivacyMode: boolean; 1566 1567 /** 1568 * Whether is round corner or not. 1569 * 1570 * @type { boolean } 1571 * @syscap SystemCapability.WindowManager.WindowManager.Core 1572 * @since 7 1573 * @deprecated since 9 1574 */ 1575 isRoundCorner: boolean; 1576 1577 /** 1578 * Whether is transparent or not. 1579 * 1580 * @type { boolean } 1581 * @syscap SystemCapability.WindowManager.WindowManager.Core 1582 * @since 7 1583 */ 1584 /** 1585 * Whether is transparent or not. 1586 * 1587 * @type { boolean } 1588 * @syscap SystemCapability.WindowManager.WindowManager.Core 1589 * @atomicservice 1590 * @since 12 1591 */ 1592 isTransparent: boolean; 1593 1594 /** 1595 * Window id. 1596 * 1597 * @type { number } 1598 * @syscap SystemCapability.WindowManager.WindowManager.Core 1599 * @since 9 1600 */ 1601 /** 1602 * Window id. 1603 * 1604 * @type { number } 1605 * @syscap SystemCapability.WindowManager.WindowManager.Core 1606 * @atomicservice 1607 * @since 12 1608 */ 1609 id: number; 1610 1611 /** 1612 * display id. 1613 * 1614 * @type { ?number } 1615 * @syscap SystemCapability.WindowManager.WindowManager.Core 1616 * @atomicservice 1617 * @since 12 1618 */ 1619 displayId?: number; 1620 } 1621 1622 /** 1623 * The decor button style of the window. 1624 * 1625 * @interface DecorButtonStyle 1626 * @syscap SystemCapability.Window.SessionManager 1627 * @atomicservice 1628 * @since 14 1629 */ 1630 interface DecorButtonStyle { 1631 /** 1632 * color mode. 1633 * 1634 * @type { ?colorMode } 1635 * @syscap SystemCapability.Window.SessionManager 1636 * @atomicservice 1637 * @since 14 1638 */ 1639 colorMode?: ConfigurationConstant.ColorMode; 1640 1641 /** 1642 * button background size when hover. 1643 * 1644 * @type { ?number } 1645 * @syscap SystemCapability.Window.SessionManager 1646 * @atomicservice 1647 * @since 14 1648 */ 1649 buttonBackgroundSize? : number; 1650 1651 /** 1652 * button spacing. 1653 * 1654 * @type { ?number } 1655 * @syscap SystemCapability.Window.SessionManager 1656 * @atomicservice 1657 * @since 14 1658 */ 1659 spacingBetweenButtons? : number; 1660 1661 /** 1662 * close button right Margin. 1663 * 1664 * @type { ?number } 1665 * @syscap SystemCapability.Window.SessionManager 1666 * @atomicservice 1667 * @since 14 1668 */ 1669 closeButtonRightMargin? : number; 1670 } 1671 1672 /** 1673 * Type of allowing the specified of color space. 1674 * 1675 * @enum { number } 1676 * @syscap SystemCapability.WindowManager.WindowManager.Core 1677 * @since 8 1678 */ 1679 /** 1680 * Type of allowing the specified of color space. 1681 * 1682 * @enum { number } 1683 * @syscap SystemCapability.WindowManager.WindowManager.Core 1684 * @crossplatform 1685 * @since 11 1686 */ 1687 /** 1688 * Type of allowing the specified of color space. 1689 * 1690 * @enum { number } 1691 * @syscap SystemCapability.WindowManager.WindowManager.Core 1692 * @crossplatform 1693 * @atomicservice 1694 * @since 12 1695 */ 1696 enum ColorSpace { 1697 /** 1698 * Default color space. 1699 * 1700 * @syscap SystemCapability.WindowManager.WindowManager.Core 1701 * @since 8 1702 */ 1703 /** 1704 * Default color space. 1705 * 1706 * @syscap SystemCapability.WindowManager.WindowManager.Core 1707 * @crossplatform 1708 * @since 11 1709 */ 1710 /** 1711 * Default color space. 1712 * 1713 * @syscap SystemCapability.WindowManager.WindowManager.Core 1714 * @crossplatform 1715 * @atomicservice 1716 * @since 12 1717 */ 1718 DEFAULT, 1719 /** 1720 * Wide gamut color space. The specific wide color gamut depends on thr screen. 1721 * 1722 * @syscap SystemCapability.WindowManager.WindowManager.Core 1723 * @since 8 1724 */ 1725 /** 1726 * Wide gamut color space. The specific wide color gamut depends on thr screen. 1727 * 1728 * @syscap SystemCapability.WindowManager.WindowManager.Core 1729 * @crossplatform 1730 * @since 11 1731 */ 1732 /** 1733 * Wide gamut color space. The specific wide color gamut depends on thr screen. 1734 * 1735 * @syscap SystemCapability.WindowManager.WindowManager.Core 1736 * @crossplatform 1737 * @atomicservice 1738 * @since 12 1739 */ 1740 WIDE_GAMUT 1741 } 1742 /** 1743 * Describes the scale Transition Options of window 1744 * 1745 * @interface ScaleOptions 1746 * @syscap SystemCapability.WindowManager.WindowManager.Core 1747 * @systemapi 1748 * @since 9 1749 */ 1750 interface ScaleOptions { 1751 /** 1752 * The scale param of x direction. Default is 1.f 1753 * 1754 * @type { ?number } 1755 * @syscap SystemCapability.WindowManager.WindowManager.Core 1756 * @systemapi 1757 * @since 9 1758 */ 1759 x?: number; 1760 1761 /** 1762 * The scale param of y direction. Default is 1.f 1763 * 1764 * @type { ?number } 1765 * @syscap SystemCapability.WindowManager.WindowManager.Core 1766 * @systemapi 1767 * @since 9 1768 */ 1769 y?: number; 1770 1771 /** 1772 * The scale param of pivot point of x. Default is 0.5f, Interval is 0.f - 1.f 1773 * 1774 * @type { ?number } 1775 * @syscap SystemCapability.WindowManager.WindowManager.Core 1776 * @systemapi 1777 * @since 9 1778 */ 1779 pivotX?: number; 1780 1781 /** 1782 * The scale param of pivot point of y. Default is 0.5f, Interval is 0.f - 1.f 1783 * 1784 * @type { ?number } 1785 * @syscap SystemCapability.WindowManager.WindowManager.Core 1786 * @systemapi 1787 * @since 9 1788 */ 1789 pivotY?: number; 1790 } 1791 1792 /** 1793 * Describes the rotate Transition Options of window 1794 * 1795 * @interface RotateOptions 1796 * @syscap SystemCapability.WindowManager.WindowManager.Core 1797 * @systemapi 1798 * @since 9 1799 */ 1800 interface RotateOptions { 1801 /** 1802 * The rotate degree of x direction. Default value is 0.f 1803 * 1804 * @type { ?number } 1805 * @syscap SystemCapability.WindowManager.WindowManager.Core 1806 * @systemapi 1807 * @since 9 1808 */ 1809 x?: number; 1810 1811 /** 1812 * The rotate degree of y direction. Default value is 0.f 1813 * 1814 * @type { ?number } 1815 * @syscap SystemCapability.WindowManager.WindowManager.Core 1816 * @systemapi 1817 * @since 9 1818 */ 1819 y?: number; 1820 1821 /** 1822 * The rotate degree of z direction. Default value is 0.f 1823 * 1824 * @type { ?number } 1825 * @syscap SystemCapability.WindowManager.WindowManager.Core 1826 * @systemapi 1827 * @since 9 1828 */ 1829 z?: number; 1830 1831 /** 1832 * The param of pivot point of x. Default is 0.5f, Interval is 0.f - 1.f 1833 * 1834 * @type { ?number } 1835 * @syscap SystemCapability.WindowManager.WindowManager.Core 1836 * @systemapi 1837 * @since 9 1838 */ 1839 pivotX?: number; 1840 1841 /** 1842 * The param of pivot point of y. Default is 0.5f, Interval is 0.f - 1.f 1843 * 1844 * @type { ?number } 1845 * @syscap SystemCapability.WindowManager.WindowManager.Core 1846 * @systemapi 1847 * @since 9 1848 */ 1849 pivotY?: number; 1850 } 1851 1852 /** 1853 * Describes the translate Transition Options of window 1854 * 1855 * @interface TranslateOptions 1856 * @syscap SystemCapability.WindowManager.WindowManager.Core 1857 * @systemapi 1858 * @since 9 1859 */ 1860 interface TranslateOptions { 1861 /** 1862 * The translate pixel param of x direction. Default is 0.f 1863 * 1864 * @type { ?number } 1865 * @syscap SystemCapability.WindowManager.WindowManager.Core 1866 * @systemapi 1867 * @since 9 1868 */ 1869 x?: number; 1870 1871 /** 1872 * The translate pixel param of y direction. Default is 0.f 1873 * 1874 * @type { ?number } 1875 * @syscap SystemCapability.WindowManager.WindowManager.Core 1876 * @systemapi 1877 * @since 9 1878 */ 1879 y?: number; 1880 1881 /** 1882 * The translate pixel param of z direction. Default is 0.f 1883 * 1884 * @type { ?number } 1885 * @syscap SystemCapability.WindowManager.WindowManager.Core 1886 * @systemapi 1887 * @since 9 1888 */ 1889 z?: number; 1890 } 1891 1892 /** 1893 * Transition Context 1894 * 1895 * @interface TransitionContext 1896 * @syscap SystemCapability.WindowManager.WindowManager.Core 1897 * @systemapi 1898 * @since 9 1899 */ 1900 interface TransitionContext { 1901 /** 1902 * The target window with animation 1903 * 1904 * @type { Window } 1905 * @syscap SystemCapability.WindowManager.WindowManager.Core 1906 * @systemapi 1907 * @since 9 1908 */ 1909 toWindow: Window; 1910 1911 /** 1912 * Set complete state of animation transition 1913 * 1914 * @param { boolean } isCompleted - Whether the transition is complete. The value true means that the transition is complete, and false means the opposite. 1915 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1916 * 2. Incorrect parameter types. 1917 * @syscap SystemCapability.WindowManager.WindowManager.Core 1918 * @systemapi 1919 * @since 9 1920 */ 1921 /** 1922 * Set complete state of animation transition 1923 * 1924 * @param { boolean } isCompleted - Whether the transition is complete. The value true means that the transition is complete, and false means the opposite. 1925 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 1926 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1927 * 2. Incorrect parameter types. 1928 * @syscap SystemCapability.WindowManager.WindowManager.Core 1929 * @systemapi 1930 * @since 12 1931 */ 1932 completeTransition(isCompleted: boolean): void; 1933 } 1934 1935 /** 1936 * Transition Controller 1937 * 1938 * @interface TransitionController 1939 * @syscap SystemCapability.WindowManager.WindowManager.Core 1940 * @systemapi 1941 * @since 9 1942 */ 1943 interface TransitionController { 1944 /** 1945 * Animation configuration when showing window 1946 * 1947 * @param { TransitionContext } context - The transition context. 1948 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1949 * 2. Incorrect parameter types. 1950 * @syscap SystemCapability.WindowManager.WindowManager.Core 1951 * @systemapi 1952 * @since 9 1953 */ 1954 /** 1955 * Animation configuration when showing window 1956 * 1957 * @param { TransitionContext } context - The transition context. 1958 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 1959 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1960 * 2. Incorrect parameter types. 1961 * @syscap SystemCapability.WindowManager.WindowManager.Core 1962 * @systemapi 1963 * @since 12 1964 */ 1965 animationForShown(context: TransitionContext): void; 1966 /** 1967 * Animation configuration when hiding window 1968 * 1969 * @param { TransitionContext } context - The transition context. 1970 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1971 * 2. Incorrect parameter types. 1972 * @syscap SystemCapability.WindowManager.WindowManager.Core 1973 * @systemapi 1974 * @since 9 1975 */ 1976 /** 1977 * Animation configuration when hiding window 1978 * 1979 * @param { TransitionContext } context - The transition context. 1980 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 1981 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1982 * 2. Incorrect parameter types. 1983 * @syscap SystemCapability.WindowManager.WindowManager.Core 1984 * @systemapi 1985 * @since 12 1986 */ 1987 animationForHidden(context: TransitionContext): void; 1988 } 1989 1990 /** 1991 * Configuration parameters for window creation. 1992 * 1993 * @interface Configuration 1994 * @syscap SystemCapability.WindowManager.WindowManager.Core 1995 * @since 9 1996 */ 1997 /** 1998 * Configuration parameters for window creation. 1999 * 2000 * @interface Configuration 2001 * @syscap SystemCapability.WindowManager.WindowManager.Core 2002 * @atomicservice 2003 * @since 12 2004 */ 2005 interface Configuration { 2006 /** 2007 * Indicates window id. 2008 * 2009 * @syscap SystemCapability.WindowManager.WindowManager.Core 2010 * @since 9 2011 */ 2012 /** 2013 * Indicates window id. 2014 * 2015 * @type { string } 2016 * @syscap SystemCapability.WindowManager.WindowManager.Core 2017 * @atomicservice 2018 * @since 12 2019 */ 2020 name: string; 2021 2022 /** 2023 * Indicates window type 2024 * 2025 * @type { WindowType } 2026 * @syscap SystemCapability.WindowManager.WindowManager.Core 2027 * @since 9 2028 */ 2029 /** 2030 * Indicates window type 2031 * 2032 * @type { WindowType } 2033 * @syscap SystemCapability.WindowManager.WindowManager.Core 2034 * @atomicservice 2035 * @since 12 2036 */ 2037 windowType: WindowType; 2038 2039 /** 2040 * Indicates window context. 2041 * 2042 * @type { ?BaseContext } 2043 * @syscap SystemCapability.WindowManager.WindowManager.Core 2044 * @since 9 2045 */ 2046 /** 2047 * Indicates window context. 2048 * 2049 * @type { ?BaseContext } 2050 * @syscap SystemCapability.WindowManager.WindowManager.Core 2051 * @atomicservice 2052 * @since 12 2053 */ 2054 ctx?: BaseContext; 2055 2056 /** 2057 * Indicates display ID. 2058 * 2059 * @type { ?number } 2060 * @syscap SystemCapability.WindowManager.WindowManager.Core 2061 * @since 9 2062 */ 2063 /** 2064 * Indicates display ID. 2065 * 2066 * @type { ?number } 2067 * @syscap SystemCapability.WindowManager.WindowManager.Core 2068 * @atomicservice 2069 * @since 12 2070 */ 2071 displayId?: number; 2072 2073 /** 2074 * Indicates Parent window id 2075 * 2076 * @type { ?number } 2077 * @syscap SystemCapability.WindowManager.WindowManager.Core 2078 * @since 9 2079 */ 2080 /** 2081 * Indicates Parent window id 2082 * 2083 * @type { ?number } 2084 * @syscap SystemCapability.WindowManager.WindowManager.Core 2085 * @atomicservice 2086 * @since 12 2087 */ 2088 parentId?: number; 2089 2090 /** 2091 * Indicates whether enable window decor, only support dialog, The default value is false. 2092 * 2093 * @type { ?boolean } 2094 * @syscap SystemCapability.Window.SessionManager 2095 * @atomicservice 2096 * @since 12 2097 */ 2098 decorEnabled?: boolean; 2099 2100 /** 2101 * Indicates dialog window title when decor enabled. 2102 * 2103 * @type { ?string } 2104 * @syscap SystemCapability.Window.SessionManager 2105 * @atomicservice 2106 * @since 12 2107 */ 2108 title?: string; 2109 } 2110 2111 /** 2112 * Limits of window. 2113 * 2114 * @interface WindowLimits 2115 * @syscap SystemCapability.Window.SessionManager 2116 * @since 11 2117 */ 2118 /** 2119 * Limits of window. 2120 * 2121 * @interface WindowLimits 2122 * @syscap SystemCapability.Window.SessionManager 2123 * @atomicservice 2124 * @since 12 2125 */ 2126 interface WindowLimits { 2127 2128 /** 2129 * The maximum width of the window. 2130 * 2131 * @type { ?number } 2132 * @syscap SystemCapability.Window.SessionManager 2133 * @since 11 2134 */ 2135 /** 2136 * The maximum width of the window. 2137 * 2138 * @type { ?number } 2139 * @syscap SystemCapability.Window.SessionManager 2140 * @atomicservice 2141 * @since 12 2142 */ 2143 maxWidth?: number; 2144 2145 /** 2146 * The maximum height of the window. 2147 * 2148 * @type { ?number } 2149 * @syscap SystemCapability.Window.SessionManager 2150 * @since 11 2151 */ 2152 /** 2153 * The maximum height of the window. 2154 * 2155 * @type { ?number } 2156 * @syscap SystemCapability.Window.SessionManager 2157 * @atomicservice 2158 * @since 12 2159 */ 2160 maxHeight?: number; 2161 2162 /** 2163 * The minimum width of the window. 2164 * 2165 * @type { ?number } 2166 * @syscap SystemCapability.Window.SessionManager 2167 * @since 11 2168 */ 2169 /** 2170 * The minimum width of the window. 2171 * 2172 * @type { ?number } 2173 * @syscap SystemCapability.Window.SessionManager 2174 * @atomicservice 2175 * @since 12 2176 */ 2177 minWidth?: number; 2178 2179 /** 2180 * The minimum height of the window. 2181 * 2182 * @type { ?number } 2183 * @syscap SystemCapability.Window.SessionManager 2184 * @since 11 2185 */ 2186 /** 2187 * The minimum height of the window. 2188 * 2189 * @type { ?number } 2190 * @syscap SystemCapability.Window.SessionManager 2191 * @atomicservice 2192 * @since 12 2193 */ 2194 minHeight?: number; 2195 } 2196 2197 /** 2198 * Rectangular area of the title buttons relative to the upper right corner of the window. 2199 * 2200 * @interface TitleButtonRect 2201 * @syscap SystemCapability.Window.SessionManager 2202 * @since 11 2203 */ 2204 /** 2205 * Rectangular area of the title buttons relative to the upper right corner of the window. 2206 * 2207 * @interface TitleButtonRect 2208 * @syscap SystemCapability.Window.SessionManager 2209 * @atomicservice 2210 * @since 12 2211 */ 2212 interface TitleButtonRect { 2213 2214 /** 2215 * The right of the Rect. 2216 * 2217 * @type { number } 2218 * @syscap SystemCapability.Window.SessionManager 2219 * @since 11 2220 */ 2221 /** 2222 * The right of the Rect. 2223 * 2224 * @type { number } 2225 * @syscap SystemCapability.Window.SessionManager 2226 * @atomicservice 2227 * @since 12 2228 */ 2229 right: number; 2230 2231 /** 2232 * The top of the Rect. 2233 * 2234 * @type { number } 2235 * @syscap SystemCapability.Window.SessionManager 2236 * @since 11 2237 */ 2238 /** 2239 * The top of the Rect. 2240 * 2241 * @type { number } 2242 * @syscap SystemCapability.Window.SessionManager 2243 * @atomicservice 2244 * @since 12 2245 */ 2246 top: number; 2247 2248 /** 2249 * The width of the Rect. 2250 * 2251 * @type { number } 2252 * @syscap SystemCapability.Window.SessionManager 2253 * @since 11 2254 */ 2255 /** 2256 * The width of the Rect. 2257 * 2258 * @type { number } 2259 * @syscap SystemCapability.Window.SessionManager 2260 * @atomicservice 2261 * @since 12 2262 */ 2263 width: number; 2264 2265 /** 2266 * The height of the Rect. 2267 * 2268 * @type { number } 2269 * @syscap SystemCapability.Window.SessionManager 2270 * @since 11 2271 */ 2272 /** 2273 * The height of the Rect. 2274 * 2275 * @type { number } 2276 * @syscap SystemCapability.Window.SessionManager 2277 * @atomicservice 2278 * @since 12 2279 */ 2280 height: number; 2281 } 2282 2283 /** 2284 * Rect change options 2285 * 2286 * @interface RectChangeOptions 2287 * @syscap SystemCapability.Window.SessionManager 2288 * @atomicservice 2289 * @since 12 2290 */ 2291 interface RectChangeOptions { 2292 /** 2293 * Rect 2294 * 2295 * @type { Rect } 2296 * @syscap SystemCapability.Window.SessionManager 2297 * @atomicservice 2298 * @since 12 2299 */ 2300 rect: Rect, 2301 2302 /** 2303 * Rect change reason 2304 * 2305 * @type { RectChangeReason } 2306 * @syscap SystemCapability.Window.SessionManager 2307 * @atomicservice 2308 * @since 12 2309 */ 2310 reason: RectChangeReason 2311 } 2312 2313 /** 2314 * Avoid area options 2315 * 2316 * @interface AvoidAreaOptions 2317 * @syscap SystemCapability.WindowManager.WindowManager.Core 2318 * @atomicservice 2319 * @since 12 2320 */ 2321 interface AvoidAreaOptions { 2322 /** 2323 * Avoid area type 2324 * 2325 * @type { AvoidAreaType } 2326 * @syscap SystemCapability.WindowManager.WindowManager.Core 2327 * @atomicservice 2328 * @since 12 2329 */ 2330 type: AvoidAreaType, 2331 2332 /** 2333 * Avoid area 2334 * 2335 * @type { AvoidArea } 2336 * @syscap SystemCapability.WindowManager.WindowManager.Core 2337 * @atomicservice 2338 * @since 12 2339 */ 2340 area: AvoidArea 2341 } 2342 2343 /** 2344 * Window rect change reason. 2345 * 2346 * @enum { number } 2347 * @syscap SystemCapability.Window.SessionManager 2348 * @atomicservice 2349 * @since 12 2350 */ 2351 enum RectChangeReason { 2352 /** 2353 * Default RectChangeReason. 2354 * 2355 * @syscap SystemCapability.Window.SessionManager 2356 * @atomicservice 2357 * @since 12 2358 */ 2359 UNDEFINED = 0, 2360 2361 /** 2362 * Window maximize. 2363 * 2364 * @syscap SystemCapability.Window.SessionManager 2365 * @atomicservice 2366 * @since 12 2367 */ 2368 MAXIMIZE, 2369 2370 /** 2371 * Window recover. 2372 * 2373 * @syscap SystemCapability.Window.SessionManager 2374 * @atomicservice 2375 * @since 12 2376 */ 2377 RECOVER, 2378 2379 /** 2380 * Window move. 2381 * 2382 * @syscap SystemCapability.Window.SessionManager 2383 * @atomicservice 2384 * @since 12 2385 */ 2386 MOVE, 2387 2388 /** 2389 * Window drag. 2390 * 2391 * @syscap SystemCapability.Window.SessionManager 2392 * @atomicservice 2393 * @since 12 2394 */ 2395 DRAG, 2396 2397 /** 2398 * Window drag start. 2399 * 2400 * @syscap SystemCapability.Window.SessionManager 2401 * @atomicservice 2402 * @since 12 2403 */ 2404 DRAG_START, 2405 2406 /** 2407 * Window drag end. 2408 * 2409 * @syscap SystemCapability.Window.SessionManager 2410 * @atomicservice 2411 * @since 12 2412 */ 2413 DRAG_END, 2414 } 2415 2416 /** 2417 * Create a window with a specific configuration 2418 * 2419 * @param { Configuration } config - Parameters for window creation. 2420 * @param { AsyncCallback<Window> } callback - Callback used to return the window created. 2421 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 2422 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2423 * 2. Incorrect parameter types. 2424 * @throws { BusinessError } 1300001 - Repeated operation. 2425 * @throws { BusinessError } 1300006 - This window context is abnormal. 2426 * @throws { BusinessError } 1300008 - The display device is abnormal. 2427 * @throws { BusinessError } 1300009 - The parent window is invalid. 2428 * @syscap SystemCapability.WindowManager.WindowManager.Core 2429 * @since 9 2430 */ 2431 /** 2432 * Create a window with a specific configuration 2433 * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required 2434 * 2435 * @permission ohos.permission.SYSTEM_FLOAT_WINDOW 2436 * @param { Configuration } config - Parameters for window creation. 2437 * @param { AsyncCallback<Window> } callback - Callback used to return the window created. 2438 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 2439 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2440 * 2. Incorrect parameter types. 2441 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2442 * @throws { BusinessError } 1300001 - Repeated operation. 2443 * @throws { BusinessError } 1300002 - This window state is abnormal. 2444 * @throws { BusinessError } 1300004 - Unauthorized operation. 2445 * @throws { BusinessError } 1300006 - This window context is abnormal. 2446 * @throws { BusinessError } 1300008 - The display device is abnormal. 2447 * @throws { BusinessError } 1300009 - The parent window is invalid. 2448 * @syscap SystemCapability.WindowManager.WindowManager.Core 2449 * @atomicservice 2450 * @since 12 2451 */ 2452 function createWindow(config: Configuration, callback: AsyncCallback<Window>): void; 2453 2454 /** 2455 * Create a window with a specific configuration 2456 * 2457 * @param { Configuration } config - Parameters for window creation. 2458 * @returns { Promise<Window> } Promise used to return the window created. 2459 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 2460 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2461 * 2. Incorrect parameter types. 2462 * @throws { BusinessError } 1300001 - Repeated operation. 2463 * @throws { BusinessError } 1300006 - This window context is abnormal. 2464 * @throws { BusinessError } 1300008 - The display device is abnormal. 2465 * @throws { BusinessError } 1300009 - The parent window is invalid. 2466 * @syscap SystemCapability.WindowManager.WindowManager.Core 2467 * @since 9 2468 */ 2469 /** 2470 * Create a window with a specific configuration 2471 * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required 2472 * 2473 * @permission ohos.permission.SYSTEM_FLOAT_WINDOW 2474 * @param { Configuration } config - Parameters for window creation. 2475 * @returns { Promise<Window> } Promise used to return the window created. 2476 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 2477 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2478 * 2. Incorrect parameter types. 2479 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2480 * @throws { BusinessError } 1300001 - Repeated operation. 2481 * @throws { BusinessError } 1300002 - This window state is abnormal. 2482 * @throws { BusinessError } 1300004 - Unauthorized operation. 2483 * @throws { BusinessError } 1300006 - This window context is abnormal. 2484 * @throws { BusinessError } 1300008 - The display device is abnormal. 2485 * @throws { BusinessError } 1300009 - The parent window is invalid. 2486 * @syscap SystemCapability.WindowManager.WindowManager.Core 2487 * @atomicservice 2488 * @since 12 2489 */ 2490 function createWindow(config: Configuration): Promise<Window>; 2491 2492 /** 2493 * Create a sub window with a specific id and type, only support 7. 2494 * 2495 * @param { string } id - Indicates window id. 2496 * @param { WindowType } type - Indicates window type. 2497 * @param { AsyncCallback<Window> } callback - Callback used to return the subwindow created. 2498 * @syscap SystemCapability.WindowManager.WindowManager.Core 2499 * @FAModelOnly 2500 * @since 7 2501 * @deprecated since 9 2502 * @useinstead ohos.window#createWindow 2503 */ 2504 function create(id: string, type: WindowType, callback: AsyncCallback<Window>): void; 2505 2506 /** 2507 * Create a sub window with a specific id and type, only support 7. 2508 * 2509 * @param { string } id - Indicates window id. 2510 * @param { WindowType } type - Indicates window type. 2511 * @returns { Promise<Window> } Promise used to return the subwindow created. 2512 * @syscap SystemCapability.WindowManager.WindowManager.Core 2513 * @FAModelOnly 2514 * @since 7 2515 * @deprecated since 9 2516 * @useinstead ohos.window#createWindow 2517 */ 2518 function create(id: string, type: WindowType): Promise<Window>; 2519 2520 /** 2521 * Create a system or float window with a specific id and type. 2522 * 2523 * @param { BaseContext } ctx - Indicates the context on which the window depends 2524 * @param { string } id - Indicates window id. 2525 * @param { WindowType } type - Indicates window type. 2526 * @returns { Promise<Window> } Promise used to return the window created. 2527 * @syscap SystemCapability.WindowManager.WindowManager.Core 2528 * @since 8 2529 * @deprecated since 9 2530 * @useinstead ohos.window#createWindow 2531 */ 2532 function create(ctx: BaseContext, id: string, type: WindowType): Promise<Window>; 2533 2534 /** 2535 * Create a system or float window with a specific id and type. 2536 * 2537 * @param { BaseContext } ctx - Indicates the context on which the window depends 2538 * @param { string } id - Indicates window id. 2539 * @param { WindowType } type - Indicates window type. 2540 * @param { AsyncCallback<Window> } callback - Callback used to return the window created. 2541 * @syscap SystemCapability.WindowManager.WindowManager.Core 2542 * @since 8 2543 * @deprecated since 9 2544 * @useinstead ohos.window#createWindow 2545 */ 2546 function create(ctx: BaseContext, id: string, type: WindowType, callback: AsyncCallback<Window>): void; 2547 2548 /** 2549 * Find the window by id. 2550 * 2551 * @param { string } id - Indicates window id. 2552 * @param { AsyncCallback<Window> } callback - Callback used to return the window found. 2553 * @syscap SystemCapability.WindowManager.WindowManager.Core 2554 * @since 7 2555 * @deprecated since 9 2556 * @useinstead ohos.window#findWindow 2557 */ 2558 function find(id: string, callback: AsyncCallback<Window>): void; 2559 2560 /** 2561 * Find the window by id. 2562 * 2563 * @param { string } id - Indicates window id. 2564 * @returns { Promise<Window> } Window found. 2565 * @syscap SystemCapability.WindowManager.WindowManager.Core 2566 * @since 7 2567 * @deprecated since 9 2568 * @useinstead ohos.window#findWindow 2569 */ 2570 function find(id: string): Promise<Window>; 2571 2572 /** 2573 * Find the window by name. 2574 * 2575 * @param { string } name - Indicates window name. 2576 * @returns { Window } Window found. 2577 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2578 * 2. Incorrect parameter types. 2579 * @throws { BusinessError } 1300002 - This window state is abnormal. 2580 * @syscap SystemCapability.WindowManager.WindowManager.Core 2581 * @since 9 2582 */ 2583 /** 2584 * Find the window by name. 2585 * 2586 * @param { string } name - Indicates window name. 2587 * @returns { Window } Window found. 2588 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2589 * 2. Incorrect parameter types. 2590 * @throws { BusinessError } 1300002 - This window state is abnormal. 2591 * @syscap SystemCapability.WindowManager.WindowManager.Core 2592 * @crossplatform 2593 * @since 10 2594 */ 2595 /** 2596 * Find the window by name. 2597 * 2598 * @param { string } name - Indicates window name. 2599 * @returns { Window } Window found. 2600 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2601 * 2. Incorrect parameter types. 2602 * @throws { BusinessError } 1300002 - This window state is abnormal. 2603 * @syscap SystemCapability.WindowManager.WindowManager.Core 2604 * @crossplatform 2605 * @atomicservice 2606 * @since 11 2607 */ 2608 function findWindow(name: string): Window; 2609 2610 /** 2611 * Get the final show window. 2612 * 2613 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2614 * @syscap SystemCapability.WindowManager.WindowManager.Core 2615 * @FAModelOnly 2616 * @since 6 2617 * @deprecated since 9 2618 * @useinstead ohos.window#getLastWindow 2619 */ 2620 function getTopWindow(callback: AsyncCallback<Window>): void; 2621 2622 /** 2623 * Get the final show window. 2624 * 2625 * @returns { Promise<Window> } Promise used to return the top window obtained. 2626 * @syscap SystemCapability.WindowManager.WindowManager.Core 2627 * @FAModelOnly 2628 * @since 6 2629 * @deprecated since 9 2630 * @useinstead ohos.window#getLastWindow 2631 */ 2632 function getTopWindow(): Promise<Window>; 2633 2634 /** 2635 * Get the final show window. 2636 * 2637 * @param { BaseContext } ctx - Indicates the context on which the window depends 2638 * @returns { Promise<Window> } Promise used to return the top window obtained. 2639 * @syscap SystemCapability.WindowManager.WindowManager.Core 2640 * @since 8 2641 * @deprecated since 9 2642 * @useinstead ohos.window#getLastWindow 2643 */ 2644 function getTopWindow(ctx: BaseContext): Promise<Window>; 2645 2646 /** 2647 * Get the final show window. 2648 * 2649 * @param { BaseContext } ctx - Indicates the context on which the window depends 2650 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2651 * @syscap SystemCapability.WindowManager.WindowManager.Core 2652 * @since 8 2653 * @deprecated since 9 2654 * @useinstead ohos.window#getLastWindow 2655 */ 2656 function getTopWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void; 2657 2658 /** 2659 * Get the final show window. 2660 * 2661 * @param { BaseContext } ctx - Current application context. 2662 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2663 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2664 * 2. Incorrect parameter types. 2665 * @throws { BusinessError } 1300002 - This window state is abnormal. 2666 * @throws { BusinessError } 1300006 - This window context is abnormal. 2667 * @syscap SystemCapability.WindowManager.WindowManager.Core 2668 * @since 9 2669 */ 2670 /** 2671 * Get the final show window. 2672 * 2673 * @param { BaseContext } ctx - Current application context. 2674 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2675 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2676 * 2. Incorrect parameter types. 2677 * @throws { BusinessError } 1300002 - This window state is abnormal. 2678 * @throws { BusinessError } 1300006 - This window context is abnormal. 2679 * @syscap SystemCapability.WindowManager.WindowManager.Core 2680 * @crossplatform 2681 * @since 10 2682 */ 2683 /** 2684 * Get the final show window. 2685 * 2686 * @param { BaseContext } ctx - Current application context. 2687 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2688 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2689 * 2. Incorrect parameter types. 2690 * @throws { BusinessError } 1300002 - This window state is abnormal. 2691 * @throws { BusinessError } 1300006 - This window context is abnormal. 2692 * @syscap SystemCapability.WindowManager.WindowManager.Core 2693 * @crossplatform 2694 * @atomicservice 2695 * @since 12 2696 */ 2697 function getLastWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void; 2698 2699 /** 2700 * Get the final show window. 2701 * 2702 * @param { BaseContext } ctx - Current application context. 2703 * @returns { Promise<Window> } Promise used to return the top window obtained. 2704 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2705 * 2. Incorrect parameter types. 2706 * @throws { BusinessError } 1300002 - This window state is abnormal. 2707 * @throws { BusinessError } 1300006 - This window context is abnormal. 2708 * @syscap SystemCapability.WindowManager.WindowManager.Core 2709 * @since 9 2710 */ 2711 /** 2712 * Get the final show window. 2713 * 2714 * @param { BaseContext } ctx - Current application context. 2715 * @returns { Promise<Window> } Promise used to return the top window obtained. 2716 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2717 * 2. Incorrect parameter types. 2718 * @throws { BusinessError } 1300002 - This window state is abnormal. 2719 * @throws { BusinessError } 1300006 - This window context is abnormal. 2720 * @syscap SystemCapability.WindowManager.WindowManager.Core 2721 * @crossplatform 2722 * @since 10 2723 */ 2724 /** 2725 * Get the final show window. 2726 * 2727 * @param { BaseContext } ctx - Current application context. 2728 * @returns { Promise<Window> } Promise used to return the top window obtained. 2729 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2730 * 2. Incorrect parameter types. 2731 * @throws { BusinessError } 1300002 - This window state is abnormal. 2732 * @throws { BusinessError } 1300006 - This window context is abnormal. 2733 * @syscap SystemCapability.WindowManager.WindowManager.Core 2734 * @crossplatform 2735 * @atomicservice 2736 * @since 12 2737 */ 2738 function getLastWindow(ctx: BaseContext): Promise<Window>; 2739 2740 /** 2741 * Minimize all app windows. 2742 * 2743 * @param { number } id - ID of the display. 2744 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2745 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2746 * 2. Incorrect parameter types; 2747 * 3. Parameter verification failed. 2748 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2749 * @syscap SystemCapability.WindowManager.WindowManager.Core 2750 * @systemapi Hide this for inner system use. 2751 * @since 9 2752 */ 2753 /** 2754 * Minimize all app windows. 2755 * 2756 * @param { number } id - ID of the display. 2757 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2758 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2759 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2760 * 2. Incorrect parameter types; 2761 * 3. Parameter verification failed. 2762 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2763 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2764 * @syscap SystemCapability.WindowManager.WindowManager.Core 2765 * @systemapi Hide this for inner system use. 2766 * @since 12 2767 */ 2768 function minimizeAll(id: number, callback: AsyncCallback<void>): void; 2769 2770 /** 2771 * Minimize all app windows. 2772 * 2773 * @param { number } id - ID of the display. 2774 * @returns { Promise<void> } Promise that returns no value. 2775 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2776 * 2. Incorrect parameter types; 2777 * 3. Parameter verification failed. 2778 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2779 * @syscap SystemCapability.WindowManager.WindowManager.Core 2780 * @systemapi Hide this for inner system use. 2781 * @since 9 2782 */ 2783 /** 2784 * Minimize all app windows. 2785 * 2786 * @param { number } id - ID of the display. 2787 * @returns { Promise<void> } Promise that returns no value. 2788 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2789 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2790 * 2. Incorrect parameter types; 2791 * 3. Parameter verification failed. 2792 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2793 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2794 * @syscap SystemCapability.WindowManager.WindowManager.Core 2795 * @systemapi Hide this for inner system use. 2796 * @since 12 2797 */ 2798 function minimizeAll(id: number): Promise<void>; 2799 2800 /** 2801 * Toggle shown state for all app windows. Minimize or restore all app windows. 2802 * 2803 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2804 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2805 * @syscap SystemCapability.WindowManager.WindowManager.Core 2806 * @systemapi Hide this for inner system use. 2807 * @since 9 2808 */ 2809 /** 2810 * Toggle shown state for all app windows. Minimize or restore all app windows. 2811 * 2812 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2813 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2814 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2815 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2816 * @syscap SystemCapability.WindowManager.WindowManager.Core 2817 * @systemapi Hide this for inner system use. 2818 * @since 12 2819 */ 2820 function toggleShownStateForAllAppWindows(callback: AsyncCallback<void>): void; 2821 2822 /** 2823 * Toggle shown state for all app windows. Minimize or restore all app windows. 2824 * 2825 * @returns { Promise<void> } Promise that returns no value. 2826 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2827 * @syscap SystemCapability.WindowManager.WindowManager.Core 2828 * @systemapi Hide this for inner system use. 2829 * @since 9 2830 */ 2831 /** 2832 * Toggle shown state for all app windows. Minimize or restore all app windows. 2833 * 2834 * @returns { Promise<void> } Promise that returns no value. 2835 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2836 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2837 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2838 * @syscap SystemCapability.WindowManager.WindowManager.Core 2839 * @systemapi Hide this for inner system use. 2840 * @since 12 2841 */ 2842 function toggleShownStateForAllAppWindows(): Promise<void>; 2843 2844 /** 2845 * Set the layout mode of a window. 2846 * 2847 * @param { WindowLayoutMode } mode - The layout mode of a window. 2848 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2849 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2850 * 2. Incorrect parameter types; 2851 * 3. Parameter verification failed. 2852 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2853 * @syscap SystemCapability.WindowManager.WindowManager.Core 2854 * @systemapi Hide this for inner system use. 2855 * @since 9 2856 */ 2857 /** 2858 * Set the layout mode of a window. 2859 * 2860 * @param { WindowLayoutMode } mode - The layout mode of a window. 2861 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2862 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2863 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2864 * 2. Incorrect parameter types; 2865 * 3. Parameter verification failed. 2866 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2867 * @syscap SystemCapability.WindowManager.WindowManager.Core 2868 * @systemapi Hide this for inner system use. 2869 * @since 12 2870 */ 2871 function setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback<void>): void; 2872 2873 /** 2874 * Set the layout mode of a window. 2875 * 2876 * @param { WindowLayoutMode } mode - The layout mode of a window. 2877 * @returns { Promise<void> } Promise that returns no value. 2878 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2879 * 2. Incorrect parameter types; 2880 * 3. Parameter verification failed. 2881 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2882 * @syscap SystemCapability.WindowManager.WindowManager.Core 2883 * @systemapi Hide this for inner system use. 2884 * @since 9 2885 */ 2886 /** 2887 * Set the layout mode of a window. 2888 * 2889 * @param { WindowLayoutMode } mode - The layout mode of a window. 2890 * @returns { Promise<void> } Promise that returns no value. 2891 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2892 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2893 * 2. Incorrect parameter types; 2894 * 3. Parameter verification failed. 2895 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2896 * @syscap SystemCapability.WindowManager.WindowManager.Core 2897 * @systemapi Hide this for inner system use. 2898 * @since 12 2899 */ 2900 function setWindowLayoutMode(mode: WindowLayoutMode): Promise<void>; 2901 2902 /** 2903 * Sets whether to enable gesture navigation. 2904 * 2905 * @param { boolean } enable - Gesture navigation if true, or disable if false. 2906 * @param { AsyncCallback<void> } callback - The callback of setGestureNavigationEnabled. 2907 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2908 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2909 * 2. Incorrect parameter types. 2910 * @throws { BusinessError } 1300002 - This window state is abnormal. 2911 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2912 * @syscap SystemCapability.WindowManager.WindowManager.Core 2913 * @systemapi Hide this for inner system use. 2914 * @since 10 2915 */ 2916 function setGestureNavigationEnabled(enable: boolean, callback: AsyncCallback<void>): void; 2917 2918 /** 2919 * Sets whether to enable gesture navigation. 2920 * 2921 * @param { boolean } enable - Gesture navigation if true, or disable if false. 2922 * @returns { Promise<void> } - The promise returned by the function. 2923 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2924 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2925 * 2. Incorrect parameter types. 2926 * @throws { BusinessError } 1300002 - This window state is abnormal. 2927 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2928 * @syscap SystemCapability.WindowManager.WindowManager.Core 2929 * @systemapi Hide this for inner system use. 2930 * @since 10 2931 */ 2932 function setGestureNavigationEnabled(enable: boolean): Promise<void>; 2933 2934 /** 2935 * Set watermark image. 2936 * 2937 * @param { image.PixelMap } pixelMap - Watermark image. 2938 * @param { boolean } enable - Show watermark if true. 2939 * @returns { Promise<void> } - Promise that returns no value. 2940 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2941 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2942 * 2. Incorrect parameter types. 2943 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2944 * @syscap SystemCapability.WindowManager.WindowManager.Core 2945 * @systemapi Hide this for inner system use. 2946 * @since 10 2947 */ 2948 function setWaterMarkImage(pixelMap: image.PixelMap, enable: boolean): Promise<void>; 2949 2950 /** 2951 * Set watermark image. 2952 * 2953 * @param { image.PixelMap } pixelMap - Watermark image. 2954 * @param { boolean } enable - Show watermark if true. 2955 * @param { AsyncCallback<void> } callback - The callback of setWaterMarkImage. 2956 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2957 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2958 * 2. Incorrect parameter types. 2959 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2960 * @syscap SystemCapability.WindowManager.WindowManager.Core 2961 * @systemapi Hide this for inner system use. 2962 * @since 10 2963 */ 2964 function setWaterMarkImage(pixelMap: image.PixelMap, enable: boolean, callback: AsyncCallback<void>): void; 2965 2966 /** 2967 * Shift window focus within the same application. And the window type contains only main window and subwindow. 2968 * 2969 * @param { number } sourceWindowId - Window id which the focus shift from. 2970 * @param { number } targetWindowId - Window id which the focus shift to. 2971 * @returns { Promise<void> } - Promise that returns no value. 2972 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2973 * 2. Incorrect parameter types. 2974 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2975 * @throws { BusinessError } 1300002 - This window state is abnormal. 2976 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2977 * @throws { BusinessError } 1300004 - Unauthorized operation. 2978 * @syscap SystemCapability.Window.SessionManager 2979 * @since 11 2980 */ 2981 /** 2982 * Shift window focus within the same application. And the window type contains only main window and subwindow. 2983 * 2984 * @param { number } sourceWindowId - Window id which the focus shift from. 2985 * @param { number } targetWindowId - Window id which the focus shift to. 2986 * @returns { Promise<void> } - Promise that returns no value. 2987 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2988 * 2. Incorrect parameter types. 2989 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2990 * @throws { BusinessError } 1300002 - This window state is abnormal. 2991 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2992 * @throws { BusinessError } 1300004 - Unauthorized operation. 2993 * @syscap SystemCapability.Window.SessionManager 2994 * @atomicservice 2995 * @since 12 2996 */ 2997 function shiftAppWindowFocus(sourceWindowId: number, targetWindowId: number): Promise<void>; 2998 2999 /** 3000 * Shift window pointer event within the same application. And the window type contains only main window and subwindow. 3001 * 3002 * @param { number } sourceWindowId - Window id which the pointer event shift from. 3003 * @param { number } targetWindowId - Window id which the pointer event shift to. 3004 * @returns { Promise<void> } - Promise that returns no value. 3005 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3006 * 2. Incorrect parameter types. 3007 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3008 * @throws { BusinessError } 1300002 - This window state is abnormal. 3009 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3010 * @throws { BusinessError } 1300004 - Unauthorized operation. 3011 * @syscap SystemCapability.Window.SessionManager 3012 * @atomicservice 3013 * @since 15 3014 */ 3015 function shiftAppWindowPointerEvent(sourceWindowId: number, targetWindowId: number): Promise<void>; 3016 3017 /** 3018 * Get info of visible windows. 3019 * 3020 * @returns { Promise<Array<WindowInfo>> } - Promise that returns windowInfo list. 3021 * @throws { BusinessError } 202 - Permission verification failed, non-system application uses system API. 3022 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3023 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3024 * @syscap SystemCapability.Window.SessionManager 3025 * @systemapi Hide this for inner system use. 3026 * @since 12 3027 */ 3028 function getVisibleWindowInfo(): Promise<Array<WindowInfo>>; 3029 3030 /** 3031 * gets snapshot of window 3032 * 3033 * @param { number } windowId - Indicates target window id. 3034 * @returns { Promise<image.PixelMap> } - Promise that returns no value. 3035 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3036 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 3037 * <br>2. Incorrect parameter types. 3.Parameter verification failed. 3038 * @throws { BusinessError } 1300002 - This window state is abnormal. 3039 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3040 * @throws { BusinessError } 1300004 - This operation is not accessible. 3041 * @syscap SystemCapability.WindowManager.WindowManager.Core 3042 * @systemapi Hide this for inner system use. 3043 * @since 12 3044 */ 3045 function getSnapshot(windowId: number): Promise<image.PixelMap>; 3046 3047 /** 3048 * Get windows by coordinate. 3049 * 3050 * @param { number } displayId - Indicate the id of display. 3051 * @param { number } windowNumber - Indicate the Number of query windows. 3052 * @param { number } x - Indicate the X-coordinate of the window. 3053 * @param { number } y - Indicate the Y-coordinate of the window. 3054 * @returns { Promise<Array<Window>> } Promise used to return the window. 3055 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 3056 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3057 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3058 * @syscap SystemCapability.Window.SessionManager 3059 * @atomicservice 3060 * @since 14 3061 */ 3062 function getWindowsByCoordinate(displayId: number, windowNumber?: number, x?: number, y?: number): Promise<Array<Window>>; 3063 3064 /** 3065 * Get Layout info of all windows on the selected display. 3066 * 3067 * @param { number } displayId - Indicate the id of display. 3068 * @returns { Promise<Array<WindowLayoutInfo>> } Promise used to return the WindowLayoutInfo. 3069 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3070 * 2. Incorrect parameter types; 3071 * 3. Parameter verification failed. 3072 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3073 * @throws { BusinessError } 1300002 - This window state is abnormal. 3074 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3075 * @syscap SystemCapability.Window.SessionManager 3076 * @atomicservice 3077 * @since 15 3078 */ 3079 function getAllWindowLayoutInfo(displayId: number): Promise<Array<WindowLayoutInfo>>; 3080 3081 /** 3082 * Register the callback of systemBarTintChange 3083 * 3084 * @param { 'systemBarTintChange' } type - The value is fixed at 'systemBarTintChange', indicating the property change event of the system bar. 3085 * @param { Callback<SystemBarTintState> } callback - Callback used to return the properties of the system bar. 3086 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3087 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3088 * 2. Incorrect parameter types; 3089 * 3. Parameter verification failed. 3090 * @syscap SystemCapability.WindowManager.WindowManager.Core 3091 * @systemapi Hide this for inner system use. 3092 * @since 8 3093 */ 3094 function on(type: 'systemBarTintChange', callback: Callback<SystemBarTintState>): void; 3095 3096 /** 3097 * Unregister the callback of systemBarTintChange 3098 * 3099 * @param { 'systemBarTintChange' } type - The value is fixed at 'systemBarTintChange', indicating the property change event of the system bar. 3100 * @param { Callback<SystemBarTintState> } callback - Callback used to return the properties of the system bar. 3101 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3102 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 3103 * 2. Parameter verification failed. 3104 * @syscap SystemCapability.WindowManager.WindowManager.Core 3105 * @systemapi Hide this for inner system use. 3106 * @since 8 3107 */ 3108 function off(type: 'systemBarTintChange', callback?: Callback<SystemBarTintState>): void; 3109 3110 /** 3111 * Register the callback for gesture navigation enabled changes. 3112 * 3113 * @param { 'gestureNavigationEnabledChange' } type the event of gesture navigation enabled changes. 3114 * @param { Callback<boolean> } callback Callback used to return the result whether gesture navigation enabled or not. 3115 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3116 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3117 * 2. Incorrect parameter types. 3118 * 3. Parameter verification failed. 3119 * @throws { BusinessError } 1300002 - This window state is abnormal. 3120 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3121 * @syscap SystemCapability.WindowManager.WindowManager.Core 3122 * @systemapi Hide this for inner system use. 3123 * @since 10 3124 */ 3125 function on(type: 'gestureNavigationEnabledChange', callback: Callback<boolean>): void; 3126 3127 /** 3128 * Unregister the callback for gesture navigation enabled changes. 3129 * 3130 * @param { 'gestureNavigationEnabledChange' } type the event of gesture navigation enabled changes. 3131 * @param { Callback<boolean> } callback Callback used to return the result whether gesture navigation enabled or not. 3132 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3133 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 3134 * 2. Parameter verification failed. 3135 * @throws { BusinessError } 1300002 - This window state is abnormal. 3136 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3137 * @syscap SystemCapability.WindowManager.WindowManager.Core 3138 * @systemapi Hide this for inner system use. 3139 * @since 10 3140 */ 3141 function off(type: 'gestureNavigationEnabledChange', callback?: Callback<boolean>): void; 3142 3143 /** 3144 * Register the callback for watermark flag change. 3145 * 3146 * @param { 'waterMarkFlagChange' } type the event of watermark flag change. 3147 * @param { Callback<boolean> } callback Callback used to return the result whether watermark flag change or not. 3148 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3149 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 3150 * <br>2. Incorrect parameter types. 3.Parameter verification failed. 3151 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3152 * @syscap SystemCapability.WindowManager.WindowManager.Core 3153 * @systemapi Hide this for inner system use. 3154 * @since 10 3155 */ 3156 function on(type: 'waterMarkFlagChange', callback: Callback<boolean>): void; 3157 3158 /** 3159 * Unregister the callback for watermark flag change. 3160 * 3161 * @param { 'waterMarkFlagChange' } type the event of watermark flag change. 3162 * @param { Callback<boolean> } callback Callback used to return the result whether watermark flag change or not. 3163 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3164 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 3165 * <br>2. Parameter verification failed. 3166 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3167 * @syscap SystemCapability.WindowManager.WindowManager.Core 3168 * @systemapi Hide this for inner system use. 3169 * @since 10 3170 */ 3171 function off(type: 'waterMarkFlagChange', callback?: Callback<boolean>): void; 3172 /** 3173 * Display orientation 3174 * 3175 * @enum { number } 3176 * @syscap SystemCapability.WindowManager.WindowManager.Core 3177 * @since 9 3178 */ 3179 /** 3180 * Display orientation 3181 * 3182 * @enum { number } 3183 * @syscap SystemCapability.WindowManager.WindowManager.Core 3184 * @crossplatform 3185 * @since 10 3186 */ 3187 /** 3188 * Display orientation 3189 * 3190 * @enum { number } 3191 * @syscap SystemCapability.WindowManager.WindowManager.Core 3192 * @crossplatform 3193 * @atomicservice 3194 * @since 11 3195 */ 3196 enum Orientation { 3197 /** 3198 * Default value. The direction mode is not clearly defined. It is determined by the system. 3199 * 3200 * @syscap SystemCapability.WindowManager.WindowManager.Core 3201 * @since 9 3202 */ 3203 /** 3204 * Default value. The direction mode is not clearly defined. It is determined by the system. 3205 * 3206 * @syscap SystemCapability.WindowManager.WindowManager.Core 3207 * @crossplatform 3208 * @since 10 3209 */ 3210 /** 3211 * Default value. The direction mode is not clearly defined. It is determined by the system. 3212 * 3213 * @syscap SystemCapability.WindowManager.WindowManager.Core 3214 * @crossplatform 3215 * @atomicservice 3216 * @since 12 3217 */ 3218 UNSPECIFIED = 0, 3219 3220 /** 3221 * Display in portrait orientation. 3222 * 3223 * @syscap SystemCapability.WindowManager.WindowManager.Core 3224 * @since 9 3225 */ 3226 /** 3227 * Display in portrait orientation. 3228 * 3229 * @syscap SystemCapability.WindowManager.WindowManager.Core 3230 * @crossplatform 3231 * @since 10 3232 */ 3233 /** 3234 * Display in portrait orientation. 3235 * 3236 * @syscap SystemCapability.WindowManager.WindowManager.Core 3237 * @crossplatform 3238 * @atomicservice 3239 * @since 11 3240 */ 3241 PORTRAIT = 1, 3242 3243 /** 3244 * Display in landscape orientation. 3245 * 3246 * @syscap SystemCapability.WindowManager.WindowManager.Core 3247 * @since 9 3248 */ 3249 /** 3250 * Display in landscape orientation. 3251 * 3252 * @syscap SystemCapability.WindowManager.WindowManager.Core 3253 * @crossplatform 3254 * @since 10 3255 */ 3256 /** 3257 * Display in landscape orientation. 3258 * 3259 * @syscap SystemCapability.WindowManager.WindowManager.Core 3260 * @crossplatform 3261 * @atomicservice 3262 * @since 12 3263 */ 3264 LANDSCAPE = 2, 3265 3266 /** 3267 * Display in inverted portrait orientation. 3268 * 3269 * @syscap SystemCapability.WindowManager.WindowManager.Core 3270 * @since 9 3271 */ 3272 /** 3273 * Display in inverted portrait orientation. 3274 * 3275 * @syscap SystemCapability.WindowManager.WindowManager.Core 3276 * @crossplatform 3277 * @since 10 3278 */ 3279 /** 3280 * Display in inverted portrait orientation. 3281 * 3282 * @syscap SystemCapability.WindowManager.WindowManager.Core 3283 * @crossplatform 3284 * @atomicservice 3285 * @since 12 3286 */ 3287 PORTRAIT_INVERTED = 3, 3288 3289 /** 3290 * Display in inverted landscape orientation. 3291 * 3292 * @syscap SystemCapability.WindowManager.WindowManager.Core 3293 * @since 9 3294 */ 3295 /** 3296 * Display in inverted landscape orientation. 3297 * 3298 * @syscap SystemCapability.WindowManager.WindowManager.Core 3299 * @crossplatform 3300 * @since 10 3301 */ 3302 /** 3303 * Display in inverted landscape orientation. 3304 * 3305 * @syscap SystemCapability.WindowManager.WindowManager.Core 3306 * @crossplatform 3307 * @atomicservice 3308 * @since 12 3309 */ 3310 LANDSCAPE_INVERTED = 4, 3311 3312 /** 3313 * Follow the rotation of the sensor, ignore auto rotation lock. 3314 * 3315 * @syscap SystemCapability.WindowManager.WindowManager.Core 3316 * @since 9 3317 */ 3318 /** 3319 * Follow the rotation of the sensor, ignore auto rotation lock. 3320 * 3321 * @syscap SystemCapability.WindowManager.WindowManager.Core 3322 * @atomicservice 3323 * @since 11 3324 */ 3325 AUTO_ROTATION = 5, 3326 3327 /** 3328 * Follow the rotation of the sensor, only work in the vertical direction, ignore auto rotation lock. 3329 * 3330 * @syscap SystemCapability.WindowManager.WindowManager.Core 3331 * @since 9 3332 */ 3333 /** 3334 * Follow the rotation of the sensor, only work in the vertical direction, ignore auto rotation lock. 3335 * 3336 * @syscap SystemCapability.WindowManager.WindowManager.Core 3337 * @atomicservice 3338 * @since 12 3339 */ 3340 AUTO_ROTATION_PORTRAIT = 6, 3341 3342 /** 3343 * Follow the rotation of the sensor, only work in the horizontal direction, ignore auto rotation lock. 3344 * 3345 * @syscap SystemCapability.WindowManager.WindowManager.Core 3346 * @since 9 3347 */ 3348 /** 3349 * Follow the rotation of the sensor, only work in the horizontal direction, ignore auto rotation lock. 3350 * 3351 * @syscap SystemCapability.WindowManager.WindowManager.Core 3352 * @atomicservice 3353 * @since 12 3354 */ 3355 AUTO_ROTATION_LANDSCAPE = 7, 3356 3357 /** 3358 * Follow the rotation of the sensor, controlled by auto rotation lock. 3359 * 3360 * @syscap SystemCapability.WindowManager.WindowManager.Core 3361 * @since 9 3362 */ 3363 /** 3364 * Follow the rotation of the sensor, controlled by auto rotation lock. 3365 * 3366 * @syscap SystemCapability.WindowManager.WindowManager.Core 3367 * @atomicservice 3368 * @since 12 3369 */ 3370 AUTO_ROTATION_RESTRICTED = 8, 3371 3372 /** 3373 * Follow the rotation of the sensor, only work in the vertical direction, controlled by auto rotation lock. 3374 * 3375 * @syscap SystemCapability.WindowManager.WindowManager.Core 3376 * @since 9 3377 */ 3378 /** 3379 * Follow the rotation of the sensor, only work in the vertical direction, controlled by auto rotation lock. 3380 * 3381 * @syscap SystemCapability.WindowManager.WindowManager.Core 3382 * @atomicservice 3383 * @since 12 3384 */ 3385 AUTO_ROTATION_PORTRAIT_RESTRICTED = 9, 3386 3387 /** 3388 * Follow the rotation of the sensor, only work in the horizontal direction, controlled by auto rotation lock. 3389 * 3390 * @syscap SystemCapability.WindowManager.WindowManager.Core 3391 * @since 9 3392 */ 3393 /** 3394 * Follow the rotation of the sensor, only work in the horizontal direction, controlled by auto rotation lock. 3395 * 3396 * @syscap SystemCapability.WindowManager.WindowManager.Core 3397 * @atomicservice 3398 * @since 12 3399 */ 3400 AUTO_ROTATION_LANDSCAPE_RESTRICTED = 10, 3401 3402 /** 3403 * Locked mode, keep the same direction as previous one. 3404 * 3405 * @syscap SystemCapability.WindowManager.WindowManager.Core 3406 * @since 9 3407 */ 3408 /** 3409 * Locked mode, keep the same direction as previous one. 3410 * 3411 * @syscap SystemCapability.WindowManager.WindowManager.Core 3412 * @atomicservice 3413 * @since 12 3414 */ 3415 LOCKED = 11, 3416 3417 /** 3418 * Follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 3419 * 3420 * @syscap SystemCapability.Window.SessionManager 3421 * @atomicservice 3422 * @since 12 3423 */ 3424 AUTO_ROTATION_UNSPECIFIED = 12, 3425 3426 /** 3427 * Display in portrait orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 3428 * 3429 * @syscap SystemCapability.Window.SessionManager 3430 * @atomicservice 3431 * @since 12 3432 */ 3433 USER_ROTATION_PORTRAIT = 13, 3434 3435 /** 3436 * Display in landscape orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 3437 * 3438 * @syscap SystemCapability.Window.SessionManager 3439 * @atomicservice 3440 * @since 12 3441 */ 3442 USER_ROTATION_LANDSCAPE = 14, 3443 3444 /** 3445 * Display in inverted portrait orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 3446 * 3447 * @syscap SystemCapability.Window.SessionManager 3448 * @atomicservice 3449 * @since 12 3450 */ 3451 USER_ROTATION_PORTRAIT_INVERTED = 15, 3452 3453 /** 3454 * Display in inverted landscape orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 3455 * 3456 * @syscap SystemCapability.Window.SessionManager 3457 * @atomicservice 3458 * @since 12 3459 */ 3460 USER_ROTATION_LANDSCAPE_INVERTED = 16, 3461 3462 /** 3463 * Follow the desktop rotate mode. 3464 * 3465 * @syscap SystemCapability.Window.SessionManager 3466 * @atomicservice 3467 * @since 12 3468 */ 3469 FOLLOW_DESKTOP = 17 3470 } 3471 3472 /** 3473 * Type of blur style 3474 * 3475 * @enum { number } 3476 * @syscap SystemCapability.WindowManager.WindowManager.Core 3477 * @systemapi Hide this for inner system use. 3478 * @since 9 3479 */ 3480 enum BlurStyle { 3481 /** 3482 * Close blur. 3483 * 3484 * @syscap SystemCapability.WindowManager.WindowManager.Core 3485 * @systemapi Hide this for inner system use. 3486 * @since 9 3487 */ 3488 OFF, 3489 /** 3490 * Blur style thin. 3491 * 3492 * @syscap SystemCapability.WindowManager.WindowManager.Core 3493 * @systemapi Hide this for inner system use. 3494 * @since 9 3495 */ 3496 THIN, 3497 /** 3498 * Blur style regular. 3499 * 3500 * @syscap SystemCapability.WindowManager.WindowManager.Core 3501 * @systemapi Hide this for inner system use. 3502 * @since 9 3503 */ 3504 REGULAR, 3505 /** 3506 * Blur style thick. 3507 * 3508 * @syscap SystemCapability.WindowManager.WindowManager.Core 3509 * @systemapi Hide this for inner system use. 3510 * @since 9 3511 */ 3512 THICK 3513 } 3514 3515 /** 3516 * Enum for window callback event type 3517 * 3518 * @enum { number } 3519 * @syscap SystemCapability.WindowManager.WindowManager.Core 3520 * @since 10 3521 */ 3522 /** 3523 * Enum for window callback event type 3524 * 3525 * @enum { number } 3526 * @syscap SystemCapability.WindowManager.WindowManager.Core 3527 * @crossplatform 3528 * @atomicservice 3529 * @since 11 3530 */ 3531 enum WindowEventType { 3532 /** 3533 * The value of window event is window show 3534 * 3535 * @syscap SystemCapability.WindowManager.WindowManager.Core 3536 * @since 10 3537 */ 3538 /** 3539 * The value of window event is window show 3540 * 3541 * @syscap SystemCapability.WindowManager.WindowManager.Core 3542 * @crossplatform 3543 * @atomicservice 3544 * @since 11 3545 */ 3546 WINDOW_SHOWN = 1, 3547 /** 3548 * The value of window event is window active 3549 * 3550 * @syscap SystemCapability.WindowManager.WindowManager.Core 3551 * @since 10 3552 */ 3553 /** 3554 * The value of window event is window active 3555 * 3556 * @syscap SystemCapability.WindowManager.WindowManager.Core 3557 * @crossplatform 3558 * @atomicservice 3559 * @since 11 3560 */ 3561 WINDOW_ACTIVE = 2, 3562 /** 3563 * The value of window event is window inactive 3564 * 3565 * @syscap SystemCapability.WindowManager.WindowManager.Core 3566 * @since 10 3567 */ 3568 /** 3569 * The value of window event is window inactive 3570 * 3571 * @syscap SystemCapability.WindowManager.WindowManager.Core 3572 * @crossplatform 3573 * @atomicservice 3574 * @since 11 3575 */ 3576 WINDOW_INACTIVE = 3, 3577 /** 3578 * The value of window event is window hide 3579 * 3580 * @syscap SystemCapability.WindowManager.WindowManager.Core 3581 * @since 10 3582 */ 3583 /** 3584 * The value of window event is window hide 3585 * 3586 * @syscap SystemCapability.WindowManager.WindowManager.Core 3587 * @crossplatform 3588 * @atomicservice 3589 * @since 11 3590 */ 3591 WINDOW_HIDDEN = 4, 3592 /** 3593 * The value of window event is window destroy 3594 * 3595 * @syscap SystemCapability.Window.SessionManager 3596 * @atomicservice 3597 * @since 11 3598 */ 3599 WINDOW_DESTROYED = 7 3600 } 3601 3602 /** 3603 * Enum for window maximize presentation 3604 * 3605 * @enum { number } 3606 * @syscap SystemCapability.Window.SessionManager 3607 * @atomicservice 3608 * @since 12 3609 */ 3610 enum MaximizePresentation { 3611 /** 3612 * The value means follow immersive state which set by app 3613 * 3614 * @syscap SystemCapability.Window.SessionManager 3615 * @atomicservice 3616 * @since 12 3617 */ 3618 FOLLOW_APP_IMMERSIVE_SETTING = 0, 3619 /** 3620 * The value means exit immersive state 3621 * 3622 * @syscap SystemCapability.Window.SessionManager 3623 * @atomicservice 3624 * @since 12 3625 */ 3626 EXIT_IMMERSIVE = 1, 3627 /** 3628 * The value means enter immersive state 3629 * 3630 * @syscap SystemCapability.Window.SessionManager 3631 * @atomicservice 3632 * @since 12 3633 */ 3634 ENTER_IMMERSIVE = 2, 3635 /** 3636 * The value means enter immersive state and the title bar and dock bar cannot be shown, when the mouse hovers over hot area. 3637 * 3638 * @syscap SystemCapability.Window.SessionManager 3639 * @atomicservice 3640 * @since 14 3641 */ 3642 ENTER_IMMERSIVE_DISABLE_TITLE_AND_DOCK_HOVER = 3, 3643 } 3644 3645 /** 3646 * the optional move configuration used in moveWindowToAsync/moveWindowToGlobal 3647 * 3648 * @interface MoveConfiguration 3649 * @syscap SystemCapability.Window.SessionManager 3650 * @atomicservice 3651 * @since 15 3652 */ 3653 interface MoveConfiguration { 3654 /** 3655 * The display id of the screen 3656 * 3657 * @type { ?number } 3658 * @syscap SystemCapability.Window.SessionManager 3659 * @atomicservice 3660 * @since 15 3661 */ 3662 displayId?: number; 3663 } 3664 3665 /** 3666 * Specific system bar type. 3667 * 3668 * @syscap SystemCapability.Window.SessionManager 3669 * @atomicservice 3670 * @since 11 3671 */ 3672 /** 3673 * Specific system bar type. 3674 * 3675 * @typedef {'status' | 'navigation' | 'navigationIndicator'} 3676 * @syscap SystemCapability.Window.SessionManager 3677 * @crossplatform 3678 * @atomicservice 3679 * @since 12 3680 */ 3681 type SpecificSystemBar = 'status' | 'navigation' | 'navigationIndicator'; 3682 3683 /** 3684 * Window 3685 * 3686 * @interface Window 3687 * @syscap SystemCapability.WindowManager.WindowManager.Core 3688 * @since 6 3689 */ 3690 /** 3691 * Window 3692 * 3693 * @interface Window 3694 * @syscap SystemCapability.WindowManager.WindowManager.Core 3695 * @crossplatform 3696 * @atomicservice 3697 * @since 11 3698 */ 3699 interface Window { 3700 /** 3701 * Hide window. 3702 * 3703 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3704 * @throws { BusinessError } 1300002 - This window state is abnormal. 3705 * @syscap SystemCapability.WindowManager.WindowManager.Core 3706 * @systemapi Hide this for inner system use. 3707 * @since 7 3708 */ 3709 /** 3710 * Hide window. 3711 * 3712 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3713 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3714 * @throws { BusinessError } 1300002 - This window state is abnormal. 3715 * @syscap SystemCapability.WindowManager.WindowManager.Core 3716 * @systemapi Hide this for inner system use. 3717 * @since 12 3718 */ 3719 hide(callback: AsyncCallback<void>): void; 3720 3721 /** 3722 * Hide window. 3723 * 3724 * @returns { Promise<void> } Promise that returns no value. 3725 * @throws { BusinessError } 1300002 - This window state is abnormal. 3726 * @syscap SystemCapability.WindowManager.WindowManager.Core 3727 * @systemapi Hide this for inner system use. 3728 * @since 7 3729 */ 3730 /** 3731 * Hide window. 3732 * 3733 * @returns { Promise<void> } Promise that returns no value. 3734 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3735 * @throws { BusinessError } 1300002 - This window state is abnormal. 3736 * @syscap SystemCapability.WindowManager.WindowManager.Core 3737 * @systemapi Hide this for inner system use. 3738 * @since 12 3739 */ 3740 hide(): Promise<void>; 3741 3742 /** 3743 * Hide window with animation. 3744 * 3745 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3746 * @throws { BusinessError } 1300002 - This window state is abnormal. 3747 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3748 * @throws { BusinessError } 1300004 - Unauthorized operation. 3749 * @syscap SystemCapability.WindowManager.WindowManager.Core 3750 * @systemapi 3751 * @since 9 3752 */ 3753 /** 3754 * Hide window with animation. 3755 * 3756 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3757 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3758 * @throws { BusinessError } 1300002 - This window state is abnormal. 3759 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3760 * @throws { BusinessError } 1300004 - Unauthorized operation. 3761 * @syscap SystemCapability.WindowManager.WindowManager.Core 3762 * @systemapi 3763 * @since 12 3764 */ 3765 hideWithAnimation(callback: AsyncCallback<void>): void; 3766 3767 /** 3768 * Hide window with animation. 3769 * 3770 * @returns { Promise<void> } Promise that returns no value. 3771 * @throws { BusinessError } 1300002 - This window state is abnormal. 3772 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3773 * @throws { BusinessError } 1300004 - Unauthorized operation. 3774 * @syscap SystemCapability.WindowManager.WindowManager.Core 3775 * @systemapi 3776 * @since 9 3777 */ 3778 /** 3779 * Hide window with animation. 3780 * 3781 * @returns { Promise<void> } Promise that returns no value. 3782 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3783 * @throws { BusinessError } 1300002 - This window state is abnormal. 3784 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3785 * @throws { BusinessError } 1300004 - Unauthorized operation. 3786 * @syscap SystemCapability.WindowManager.WindowManager.Core 3787 * @systemapi 3788 * @since 12 3789 */ 3790 hideWithAnimation(): Promise<void>; 3791 3792 /** 3793 * Show window. 3794 * 3795 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3796 * @syscap SystemCapability.WindowManager.WindowManager.Core 3797 * @since 7 3798 * @deprecated since 9 3799 * @useinstead ohos.window.Window#showWindow 3800 */ 3801 show(callback: AsyncCallback<void>): void; 3802 3803 /** 3804 * Show window. 3805 * 3806 * @returns { Promise<void> } Promise that returns no value. 3807 * @syscap SystemCapability.WindowManager.WindowManager.Core 3808 * @since 7 3809 * @deprecated since 9 3810 * @useinstead ohos.window.Window#showWindow 3811 */ 3812 show(): Promise<void>; 3813 3814 /** 3815 * Show window. 3816 * 3817 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3818 * @throws { BusinessError } 1300002 - This window state is abnormal. 3819 * @syscap SystemCapability.WindowManager.WindowManager.Core 3820 * @since 9 3821 */ 3822 /** 3823 * Show window. 3824 * 3825 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3826 * @throws { BusinessError } 1300002 - This window state is abnormal. 3827 * @syscap SystemCapability.WindowManager.WindowManager.Core 3828 * @crossplatform 3829 * @since 10 3830 */ 3831 /** 3832 * Show window. 3833 * 3834 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3835 * @throws { BusinessError } 1300002 - This window state is abnormal. 3836 * @syscap SystemCapability.WindowManager.WindowManager.Core 3837 * @crossplatform 3838 * @atomicservice 3839 * @since 11 3840 */ 3841 showWindow(callback: AsyncCallback<void>): void; 3842 3843 /** 3844 * Show window. 3845 * 3846 * @returns { Promise<void> } Promise that returns no value. 3847 * @throws { BusinessError } 1300002 - This window state is abnormal. 3848 * @syscap SystemCapability.WindowManager.WindowManager.Core 3849 * @since 9 3850 */ 3851 /** 3852 * Show window. 3853 * 3854 * @returns { Promise<void> } Promise that returns no value. 3855 * @throws { BusinessError } 1300002 - This window state is abnormal. 3856 * @syscap SystemCapability.WindowManager.WindowManager.Core 3857 * @crossplatform 3858 * @since 10 3859 */ 3860 /** 3861 * Show window. 3862 * 3863 * @returns { Promise<void> } Promise that returns no value. 3864 * @throws { BusinessError } 1300002 - This window state is abnormal. 3865 * @syscap SystemCapability.WindowManager.WindowManager.Core 3866 * @crossplatform 3867 * @atomicservice 3868 * @since 11 3869 */ 3870 showWindow(): Promise<void>; 3871 3872 /** 3873 * Show window with animation. 3874 * 3875 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3876 * @throws { BusinessError } 1300002 - This window state is abnormal. 3877 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3878 * @throws { BusinessError } 1300004 - Unauthorized operation. 3879 * @syscap SystemCapability.WindowManager.WindowManager.Core 3880 * @systemapi 3881 * @since 9 3882 */ 3883 /** 3884 * Show window with animation. 3885 * 3886 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3887 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3888 * @throws { BusinessError } 1300002 - This window state is abnormal. 3889 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3890 * @throws { BusinessError } 1300004 - Unauthorized operation. 3891 * @syscap SystemCapability.WindowManager.WindowManager.Core 3892 * @systemapi 3893 * @since 12 3894 */ 3895 showWithAnimation(callback: AsyncCallback<void>): void; 3896 3897 /** 3898 * Show window with animation. 3899 * 3900 * @returns { Promise<void> } Promise that returns no value. 3901 * @throws { BusinessError } 1300002 - This window state is abnormal. 3902 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3903 * @throws { BusinessError } 1300004 - Unauthorized operation. 3904 * @syscap SystemCapability.WindowManager.WindowManager.Core 3905 * @systemapi 3906 * @since 9 3907 */ 3908 /** 3909 * Show window with animation. 3910 * 3911 * @returns { Promise<void> } Promise that returns no value. 3912 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3913 * @throws { BusinessError } 1300002 - This window state is abnormal. 3914 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3915 * @throws { BusinessError } 1300004 - Unauthorized operation. 3916 * @syscap SystemCapability.WindowManager.WindowManager.Core 3917 * @systemapi 3918 * @since 12 3919 */ 3920 showWithAnimation(): Promise<void>; 3921 3922 /** 3923 * Destroy the window. 3924 * 3925 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3926 * @syscap SystemCapability.WindowManager.WindowManager.Core 3927 * @since 7 3928 * @deprecated since 9 3929 * @useinstead ohos.window.Window#destroyWindow 3930 */ 3931 destroy(callback: AsyncCallback<void>): void; 3932 3933 /** 3934 * Destroy the window. 3935 * 3936 * @returns { Promise<void> } Promise that returns no value. 3937 * @syscap SystemCapability.WindowManager.WindowManager.Core 3938 * @since 7 3939 * @deprecated since 9 3940 * @useinstead ohos.window.Window#destroyWindow 3941 */ 3942 destroy(): Promise<void>; 3943 3944 /** 3945 * Destroy the window. 3946 * 3947 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3948 * @throws { BusinessError } 1300002 - This window state is abnormal. 3949 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3950 * @syscap SystemCapability.WindowManager.WindowManager.Core 3951 * @since 9 3952 */ 3953 /** 3954 * Destroy the window. 3955 * 3956 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3957 * @throws { BusinessError } 1300002 - This window state is abnormal. 3958 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3959 * @syscap SystemCapability.WindowManager.WindowManager.Core 3960 * @crossplatform 3961 * @since 10 3962 */ 3963 /** 3964 * Destroy the window. 3965 * 3966 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3967 * @throws { BusinessError } 1300002 - This window state is abnormal. 3968 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3969 * @syscap SystemCapability.WindowManager.WindowManager.Core 3970 * @crossplatform 3971 * @atomicservice 3972 * @since 11 3973 */ 3974 destroyWindow(callback: AsyncCallback<void>): void; 3975 3976 /** 3977 * Destroy the window. 3978 * 3979 * @returns { Promise<void> } Promise that returns no value. 3980 * @throws { BusinessError } 1300002 - This window state is abnormal. 3981 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3982 * @syscap SystemCapability.WindowManager.WindowManager.Core 3983 * @since 9 3984 */ 3985 /** 3986 * Destroy the window. 3987 * 3988 * @returns { Promise<void> } Promise that returns no value. 3989 * @throws { BusinessError } 1300002 - This window state is abnormal. 3990 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3991 * @syscap SystemCapability.WindowManager.WindowManager.Core 3992 * @crossplatform 3993 * @since 10 3994 */ 3995 /** 3996 * Destroy the window. 3997 * 3998 * @returns { Promise<void> } Promise that returns no value. 3999 * @throws { BusinessError } 1300002 - This window state is abnormal. 4000 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4001 * @syscap SystemCapability.WindowManager.WindowManager.Core 4002 * @crossplatform 4003 * @atomicservice 4004 * @since 11 4005 */ 4006 destroyWindow(): Promise<void>; 4007 4008 /** 4009 * Set the position of a window. 4010 * 4011 * @param { number } x - Indicate the X-coordinate of the window. 4012 * @param { number } y - Indicate the Y-coordinate of the window. 4013 * @returns { Promise<void> } Promise that returns no value. 4014 * @syscap SystemCapability.WindowManager.WindowManager.Core 4015 * @since 7 4016 * @deprecated since 9 4017 * @useinstead ohos.window.Window#moveWindowTo 4018 */ 4019 moveTo(x: number, y: number): Promise<void>; 4020 4021 /** 4022 * Set the position of a window. 4023 * 4024 * @param { number } x - Indicate the X-coordinate of the window. 4025 * @param { number } y - Indicate the Y-coordinate of the window. 4026 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4027 * @syscap SystemCapability.WindowManager.WindowManager.Core 4028 * @since 7 4029 * @deprecated since 9 4030 * @useinstead ohos.window.Window#moveWindowTo 4031 */ 4032 moveTo(x: number, y: number, callback: AsyncCallback<void>): void; 4033 4034 /** 4035 * Set the position of a window. 4036 * 4037 * @param { number } x - Indicate the X-coordinate of the window. 4038 * @param { number } y - Indicate the Y-coordinate of the window. 4039 * @returns { Promise<void> } Promise that returns no value. 4040 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4041 * 2. Incorrect parameter types. 4042 * @throws { BusinessError } 1300002 - This window state is abnormal. 4043 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4044 * @syscap SystemCapability.WindowManager.WindowManager.Core 4045 * @since 9 4046 */ 4047 /** 4048 * Set the position of a window. 4049 * 4050 * @param { number } x - Indicate the X-coordinate of the window. 4051 * @param { number } y - Indicate the Y-coordinate of the window. 4052 * @returns { Promise<void> } Promise that returns no value. 4053 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4054 * 2. Incorrect parameter types. 4055 * @throws { BusinessError } 1300002 - This window state is abnormal. 4056 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4057 * @syscap SystemCapability.WindowManager.WindowManager.Core 4058 * @crossplatform 4059 * @since 10 4060 */ 4061 /** 4062 * Set the position of a window. 4063 * 4064 * @param { number } x - Indicate the X-coordinate of the window. 4065 * @param { number } y - Indicate the Y-coordinate of the window. 4066 * @returns { Promise<void> } Promise that returns no value. 4067 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4068 * 2. Incorrect parameter types. 4069 * @throws { BusinessError } 1300002 - This window state is abnormal. 4070 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4071 * @syscap SystemCapability.WindowManager.WindowManager.Core 4072 * @crossplatform 4073 * @atomicservice 4074 * @since 11 4075 */ 4076 moveWindowTo(x: number, y: number): Promise<void>; 4077 4078 /** 4079 * Set the position of a window. 4080 * 4081 * @param { number } x - Indicate the X-coordinate of the window. 4082 * @param { number } y - Indicate the Y-coordinate of the window. 4083 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4084 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4085 * 2. Incorrect parameter types. 4086 * @throws { BusinessError } 1300002 - This window state is abnormal. 4087 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4088 * @syscap SystemCapability.WindowManager.WindowManager.Core 4089 * @since 9 4090 */ 4091 /** 4092 * Set the position of a window. 4093 * 4094 * @param { number } x - Indicate the X-coordinate of the window. 4095 * @param { number } y - Indicate the Y-coordinate of the window. 4096 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4097 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4098 * 2. Incorrect parameter types. 4099 * @throws { BusinessError } 1300002 - This window state is abnormal. 4100 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4101 * @syscap SystemCapability.WindowManager.WindowManager.Core 4102 * @crossplatform 4103 * @since 10 4104 */ 4105 /** 4106 * Set the position of a window. 4107 * 4108 * @param { number } x - Indicate the X-coordinate of the window. 4109 * @param { number } y - Indicate the Y-coordinate of the window. 4110 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4111 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4112 * 2. Incorrect parameter types. 4113 * @throws { BusinessError } 1300002 - This window state is abnormal. 4114 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4115 * @syscap SystemCapability.WindowManager.WindowManager.Core 4116 * @crossplatform 4117 * @atomicservice 4118 * @since 11 4119 */ 4120 moveWindowTo(x: number, y: number, callback: AsyncCallback<void>): void; 4121 4122 /** 4123 * Move window to the position. 4124 * 4125 * @param { number } x - Indicate the X-coordinate of the window. 4126 * @param { number } y - Indicate the Y-coordinate of the window. 4127 * @returns { Promise<void> } Promise that returns no value. 4128 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4129 * 2. Incorrect parameter types. 4130 * 3. Parameter verification failed. 4131 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4132 * @throws { BusinessError } 1300002 - This window state is abnormal. 4133 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4134 * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. 4135 * @syscap SystemCapability.Window.SessionManager 4136 * @atomicservice 4137 * @since 12 4138 */ 4139 moveWindowToAsync(x: number, y: number): Promise<void>; 4140 4141 /** 4142 * Move window to the position. 4143 * 4144 * @param { number } x - Indicate the X-coordinate of the window. 4145 * @param { number } y - Indicate the Y-coordinate of the window. 4146 * @param { ?MoveConfiguration } moveConfiguration - Indicate the window move configuration. 4147 * @returns { Promise<void> } Promise that returns no value. 4148 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4149 * 2. Incorrect parameter types. 4150 * 3. Parameter verification failed. 4151 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4152 * @throws { BusinessError } 1300002 - This window state is abnormal. 4153 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4154 * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. 4155 * @syscap SystemCapability.Window.SessionManager 4156 * @atomicservice 4157 * @since 15 4158 */ 4159 moveWindowToAsync(x: number, y: number, moveConfiguration?: MoveConfiguration): Promise<void>; 4160 4161 /** 4162 * Move window to the position relative to current screen. 4163 * 4164 * @param { number } x - Indicate the X-coordinate of the window relative to current screen. 4165 * @param { number } y - Indicate the Y-coordinate of the window relative to current screen. 4166 * @returns { Promise<void> } Promise that returns no value. 4167 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4168 * 2. Incorrect parameter types. 4169 * 3. Parameter verification failed. 4170 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4171 * @throws { BusinessError } 1300002 - This window state is abnormal. 4172 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4173 * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. 4174 * @syscap SystemCapability.Window.SessionManager 4175 * @atomicservice 4176 * @since 13 4177 */ 4178 moveWindowToGlobal(x: number, y: number): Promise<void>; 4179 4180 /** 4181 * Move window to the position relative to current screen. 4182 * 4183 * @param { number } x - Indicate the X-coordinate of the window relative to current screen. 4184 * @param { number } y - Indicate the Y-coordinate of the window relative to current screen. 4185 * @param { ?MoveConfiguration } moveConfiguration - Indicate the window move configuration. 4186 * @returns { Promise<void> } Promise that returns no value. 4187 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4188 * 2. Incorrect parameter types. 4189 * 3. Parameter verification failed. 4190 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4191 * @throws { BusinessError } 1300002 - This window state is abnormal. 4192 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4193 * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. 4194 * @syscap SystemCapability.Window.SessionManager 4195 * @atomicservice 4196 * @since 15 4197 */ 4198 moveWindowToGlobal(x: number, y: number, moveConfiguration?: MoveConfiguration): Promise<void>; 4199 4200 /** 4201 * Set the size of a window . 4202 * 4203 * @param { number } width - Indicates the width of the window. 4204 * @param { number } height - Indicates the height of the window. 4205 * @returns { Promise<void> } Promise that returns no value. 4206 * @syscap SystemCapability.WindowManager.WindowManager.Core 4207 * @since 7 4208 * @deprecated since 9 4209 * @useinstead ohos.window.Window#resize 4210 */ 4211 resetSize(width: number, height: number): Promise<void>; 4212 4213 /** 4214 * Set the size of a window . 4215 * 4216 * @param { number } width - Indicates the width of the window. 4217 * @param { number } height - Indicates the height of the window. 4218 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4219 * @syscap SystemCapability.WindowManager.WindowManager.Core 4220 * @since 7 4221 * @deprecated since 9 4222 * @useinstead ohos.window.Window#resize 4223 */ 4224 resetSize(width: number, height: number, callback: AsyncCallback<void>): void; 4225 4226 /** 4227 * Set the size of a window . 4228 * 4229 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4230 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4231 * @returns { Promise<void> } Promise that returns no value. 4232 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4233 * 2. Incorrect parameter types; 4234 * 3. Parameter verification failed. 4235 * @throws { BusinessError } 1300002 - This window state is abnormal. 4236 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4237 * @syscap SystemCapability.WindowManager.WindowManager.Core 4238 * @since 9 4239 */ 4240 /** 4241 * Set the size of a window . 4242 * 4243 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4244 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4245 * @returns { Promise<void> } Promise that returns no value. 4246 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4247 * 2. Incorrect parameter types; 4248 * 3. Parameter verification failed. 4249 * @throws { BusinessError } 1300002 - This window state is abnormal. 4250 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4251 * @syscap SystemCapability.WindowManager.WindowManager.Core 4252 * @crossplatform 4253 * @since 10 4254 */ 4255 /** 4256 * Set the size of a window . 4257 * 4258 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4259 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4260 * @returns { Promise<void> } Promise that returns no value. 4261 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4262 * 2. Incorrect parameter types; 4263 * 3. Parameter verification failed. 4264 * @throws { BusinessError } 1300002 - This window state is abnormal. 4265 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4266 * @syscap SystemCapability.WindowManager.WindowManager.Core 4267 * @crossplatform 4268 * @atomicservice 4269 * @since 11 4270 */ 4271 resize(width: number, height: number): Promise<void>; 4272 4273 /** 4274 * Set the size of a window . 4275 * 4276 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4277 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4278 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4279 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4280 * 2. Incorrect parameter types; 4281 * 3. Parameter verification failed. 4282 * @throws { BusinessError } 1300002 - This window state is abnormal. 4283 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4284 * @syscap SystemCapability.WindowManager.WindowManager.Core 4285 * @since 9 4286 */ 4287 /** 4288 * Set the size of a window . 4289 * 4290 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4291 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4292 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4293 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4294 * 2. Incorrect parameter types; 4295 * 3. Parameter verification failed. 4296 * @throws { BusinessError } 1300002 - This window state is abnormal. 4297 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4298 * @syscap SystemCapability.WindowManager.WindowManager.Core 4299 * @crossplatform 4300 * @since 10 4301 */ 4302 /** 4303 * Set the size of a window . 4304 * 4305 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4306 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4307 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4308 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4309 * 2. Incorrect parameter types; 4310 * 3. Parameter verification failed. 4311 * @throws { BusinessError } 1300002 - This window state is abnormal. 4312 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4313 * @syscap SystemCapability.WindowManager.WindowManager.Core 4314 * @crossplatform 4315 * @atomicservice 4316 * @since 11 4317 */ 4318 resize(width: number, height: number, callback: AsyncCallback<void>): void; 4319 4320 /** 4321 * Set the size of a window. 4322 * 4323 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 4324 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 4325 * @returns { Promise<void> } Promise that returns no value. 4326 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4327 * 2. Incorrect parameter types; 4328 * 3. Parameter verification failed. 4329 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4330 * @throws { BusinessError } 1300002 - This window state is abnormal. 4331 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4332 * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. 4333 * @syscap SystemCapability.Window.SessionManager 4334 * @atomicservice 4335 * @since 12 4336 */ 4337 resizeAsync(width: number, height: number): Promise<void>; 4338 4339 /** 4340 * Set the type of a window. 4341 * 4342 * @param { WindowType } type - Indicate the type of a window. 4343 * @returns { Promise<void> } Promise that returns no value. 4344 * @syscap SystemCapability.WindowManager.WindowManager.Core 4345 * @systemapi Hide this for inner system use. 4346 * @since 7 4347 * @deprecated since 9 4348 */ 4349 setWindowType(type: WindowType): Promise<void>; 4350 4351 /** 4352 * Set the type of a window. 4353 * 4354 * @param { WindowType } type - Indicate the type of a window. 4355 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4356 * @syscap SystemCapability.WindowManager.WindowManager.Core 4357 * @systemapi Hide this for inner system use. 4358 * @since 7 4359 * @deprecated since 9 4360 */ 4361 setWindowType(type: WindowType, callback: AsyncCallback<void>): void; 4362 4363 /** 4364 * Set the mode of a window. 4365 * 4366 * @param { WindowMode } mode - Indicate the mode of a window. 4367 * @returns { Promise<void> } Promise that returns no value. 4368 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4369 * 2. Incorrect parameter types; 4370 * 3. Parameter verification failed. 4371 * @throws { BusinessError } 1300002 - This window state is abnormal. 4372 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4373 * @syscap SystemCapability.WindowManager.WindowManager.Core 4374 * @systemapi Hide this for inner system use. 4375 * @since 9 4376 */ 4377 /** 4378 * Set the mode of a window. 4379 * 4380 * @param { WindowMode } mode - Indicate the mode of a window. 4381 * @returns { Promise<void> } Promise that returns no value. 4382 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 4383 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4384 * 2. Incorrect parameter types; 4385 * 3. Parameter verification failed. 4386 * @throws { BusinessError } 1300002 - This window state is abnormal. 4387 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4388 * @syscap SystemCapability.WindowManager.WindowManager.Core 4389 * @systemapi Hide this for inner system use. 4390 * @since 12 4391 */ 4392 setWindowMode(mode: WindowMode): Promise<void>; 4393 4394 /** 4395 * Set the mode of a window. 4396 * 4397 * @param { WindowMode } mode - Indicate the mode of a window. 4398 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4399 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4400 * 2. Incorrect parameter types; 4401 * 3. Parameter verification failed. 4402 * @throws { BusinessError } 1300002 - This window state is abnormal. 4403 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4404 * @syscap SystemCapability.WindowManager.WindowManager.Core 4405 * @systemapi Hide this for inner system use. 4406 * @since 9 4407 */ 4408 /** 4409 * Set the mode of a window. 4410 * 4411 * @param { WindowMode } mode - Indicate the mode of a window. 4412 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4413 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 4414 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4415 * 2. Incorrect parameter types; 4416 * 3. Parameter verification failed. 4417 * @throws { BusinessError } 1300002 - This window state is abnormal. 4418 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4419 * @syscap SystemCapability.WindowManager.WindowManager.Core 4420 * @systemapi Hide this for inner system use. 4421 * @since 12 4422 */ 4423 setWindowMode(mode: WindowMode, callback: AsyncCallback<void>): void; 4424 4425 /** 4426 * Get the properties of current window 4427 * 4428 * @param { AsyncCallback<WindowProperties> } callback - Callback used to return the window properties. 4429 * @syscap SystemCapability.WindowManager.WindowManager.Core 4430 * @since 6 4431 * @deprecated since 9 4432 * @useinstead ohos.window.Window#getWindowProperties 4433 */ 4434 getProperties(callback: AsyncCallback<WindowProperties>): void; 4435 4436 /** 4437 * Get the window rectangular area quadruple {left,top,weight,height}, left and top represent relative to screen coordinates 4438 * and are affected by parent window scaling, weight and height are the scaling width and height. 4439 * 4440 * @returns { Rect } The quadruple {left,top,weight,height} represents respectively the X-coordinate 4441 * and Y-coordinate of the window relative to current screen, the scaled window width and scaled window height. 4442 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4443 * @throws { BusinessError } 1300002 - This window state is abnormal. 4444 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4445 * @syscap SystemCapability.Window.SessionManager 4446 * @atomicservice 4447 * @since 13 4448 */ 4449 getGlobalRect(): Rect; 4450 4451 /** 4452 * Get the properties of current window 4453 * 4454 * @returns { Promise<WindowProperties> } Promise used to return the window properties. 4455 * @syscap SystemCapability.WindowManager.WindowManager.Core 4456 * @since 6 4457 * @deprecated since 9 4458 * @useinstead ohos.window.Window#getWindowProperties 4459 */ 4460 getProperties(): Promise<WindowProperties>; 4461 4462 /** 4463 * Get the properties of current window 4464 * 4465 * @returns { WindowProperties } Return the window properties. 4466 * @throws { BusinessError } 1300002 - This window state is abnormal. 4467 * @syscap SystemCapability.WindowManager.WindowManager.Core 4468 * @since 9 4469 */ 4470 /** 4471 * Get the properties of current window 4472 * 4473 * @returns { WindowProperties } Return the window properties. 4474 * @throws { BusinessError } 1300002 - This window state is abnormal. 4475 * @syscap SystemCapability.WindowManager.WindowManager.Core 4476 * @crossplatform 4477 * @since 10 4478 */ 4479 /** 4480 * Get the properties of current window 4481 * 4482 * @returns { WindowProperties } Return the window properties. 4483 * @throws { BusinessError } 1300002 - This window state is abnormal. 4484 * @syscap SystemCapability.WindowManager.WindowManager.Core 4485 * @crossplatform 4486 * @atomicservice 4487 * @since 11 4488 */ 4489 getWindowProperties(): WindowProperties; 4490 4491 /** 4492 * Get the window density of current window. 4493 * 4494 * @returns { WindowDensityInfo } Return system density, default density and custom density of window. 4495 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4496 * @throws { BusinessError } 1300002 - This window state is abnormal. 4497 * @syscap SystemCapability.Window.SessionManager 4498 * @atomicservice 4499 * @since 15 4500 */ 4501 getWindowDensityInfo(): WindowDensityInfo; 4502 4503 /** 4504 * Get the avoid area 4505 * 4506 * @param { AvoidAreaType } type - Type of the area 4507 * @param { AsyncCallback<AvoidArea> } callback - Callback used to return the area. 4508 * @syscap SystemCapability.WindowManager.WindowManager.Core 4509 * @since 7 4510 * @deprecated since 9 4511 * @useinstead ohos.window.Window#getWindowAvoidArea 4512 */ 4513 getAvoidArea(type: AvoidAreaType, callback: AsyncCallback<AvoidArea>): void; 4514 4515 /** 4516 * Get the avoid area 4517 * 4518 * @param { AvoidAreaType } type - Type of the area 4519 * @returns { Promise<AvoidArea> } Area where the window cannot be displayed. 4520 * @syscap SystemCapability.WindowManager.WindowManager.Core 4521 * @since 7 4522 * @deprecated since 9 4523 * @useinstead ohos.window.Window#getWindowAvoidArea 4524 */ 4525 getAvoidArea(type: AvoidAreaType): Promise<AvoidArea>; 4526 4527 /** 4528 * Get the avoid area 4529 * 4530 * @param { AvoidAreaType } type - Type of the area 4531 * @returns { AvoidArea } Area where the window cannot be displayed. 4532 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4533 * 2. Incorrect parameter types; 4534 * 3. Parameter verification failed. 4535 * @throws { BusinessError } 1300002 - This window state is abnormal. 4536 * @syscap SystemCapability.WindowManager.WindowManager.Core 4537 * @since 9 4538 */ 4539 /** 4540 * Get the avoid area 4541 * 4542 * @param { AvoidAreaType } type - Type of the area 4543 * @returns { AvoidArea } Area where the window cannot be displayed. 4544 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4545 * 2. Incorrect parameter types; 4546 * 3. Parameter verification failed. 4547 * @throws { BusinessError } 1300002 - This window state is abnormal. 4548 * @syscap SystemCapability.WindowManager.WindowManager.Core 4549 * @atomicservice 4550 * @since 11 4551 */ 4552 /** 4553 * Get the avoid area 4554 * 4555 * @param { AvoidAreaType } type - Type of the area 4556 * @returns { AvoidArea } Area where the window cannot be displayed. 4557 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4558 * 2. Incorrect parameter types; 4559 * 3. Parameter verification failed. 4560 * @throws { BusinessError } 1300002 - This window state is abnormal. 4561 * @syscap SystemCapability.WindowManager.WindowManager.Core 4562 * @crossplatform 4563 * @atomicservice 4564 * @since 12 4565 */ 4566 getWindowAvoidArea(type: AvoidAreaType): AvoidArea; 4567 4568 /** 4569 * Set the flag of the window is shown full screen 4570 * 4571 * @param { boolean } isFullScreen - The flag of the window is shown full screen 4572 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4573 * @syscap SystemCapability.WindowManager.WindowManager.Core 4574 * @since 6 4575 * @deprecated since 9 4576 * @useinstead ohos.window.Window#setWindowSystemBarEnable 4577 */ 4578 setFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void; 4579 4580 /** 4581 * Set the flag of the window is shown full screen 4582 * 4583 * @param { boolean } isFullScreen - The flag of the window is shown full screen 4584 * @returns { Promise<void> } Promise that returns no value. 4585 * @syscap SystemCapability.WindowManager.WindowManager.Core 4586 * @since 6 4587 * @deprecated since 9 4588 * @useinstead ohos.window.Window#setWindowSystemBarEnable 4589 */ 4590 setFullScreen(isFullScreen: boolean): Promise<void>; 4591 4592 /** 4593 * Set the property of the window can layout in full screen 4594 * 4595 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 4596 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4597 * @syscap SystemCapability.WindowManager.WindowManager.Core 4598 * @since 7 4599 * @deprecated since 9 4600 * @useinstead ohos.window.Window#setWindowLayoutFullScreen 4601 */ 4602 setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void; 4603 4604 /** 4605 * Set the property of the window can layout in full screen 4606 * 4607 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 4608 * @returns { Promise<void> } Promise that returns no value. 4609 * @syscap SystemCapability.WindowManager.WindowManager.Core 4610 * @since 7 4611 * @deprecated since 9 4612 * @useinstead ohos.window.Window#setWindowLayoutFullScreen 4613 */ 4614 setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>; 4615 4616 /** 4617 * Set the property of the window can layout in full screen 4618 * 4619 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 4620 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4621 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4622 * 2. Incorrect parameter types. 4623 * @throws { BusinessError } 1300002 - This window state is abnormal. 4624 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4625 * @syscap SystemCapability.WindowManager.WindowManager.Core 4626 * @since 9 4627 */ 4628 /** 4629 * Set the property of the window can layout in full screen 4630 * 4631 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 4632 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4633 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4634 * 2. Incorrect parameter types. 4635 * @throws { BusinessError } 1300002 - This window state is abnormal. 4636 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4637 * @syscap SystemCapability.WindowManager.WindowManager.Core 4638 * @crossplatform 4639 * @atomicservice 4640 * @since 12 4641 * @deprecated since 12 4642 * @useinstead ohos.window.Window#setWindowLayoutFullScreen 4643 */ 4644 setWindowLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void; 4645 4646 /** 4647 * Set the property of the window can layout in full screen 4648 * 4649 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 4650 * @returns { Promise<void> } Promise that returns no value. 4651 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4652 * 2. Incorrect parameter types. 4653 * @throws { BusinessError } 1300002 - This window state is abnormal. 4654 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4655 * @syscap SystemCapability.WindowManager.WindowManager.Core 4656 * @since 9 4657 */ 4658 /** 4659 * Set the property of the window can layout in full screen 4660 * 4661 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 4662 * @returns { Promise<void> } Promise that returns no value. 4663 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4664 * 2. Incorrect parameter types. 4665 * @throws { BusinessError } 1300002 - This window state is abnormal. 4666 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4667 * @syscap SystemCapability.WindowManager.WindowManager.Core 4668 * @crossplatform 4669 * @atomicservice 4670 * @since 12 4671 */ 4672 setWindowLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>; 4673 4674 /** 4675 * Set the system bar to have visible. 4676 * 4677 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4678 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4679 * @syscap SystemCapability.WindowManager.WindowManager.Core 4680 * @since 7 4681 * @deprecated since 9 4682 * @useinstead ohos.window.Window#setWindowSystemBarEnable 4683 */ 4684 setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback<void>): void; 4685 4686 /** 4687 * Set the system bar to have visible. 4688 * 4689 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4690 * @returns { Promise<void> } Promise that returns no value. 4691 * @syscap SystemCapability.WindowManager.WindowManager.Core 4692 * @since 7 4693 * @deprecated since 9 4694 * @useinstead ohos.window.Window#setWindowSystemBarEnable 4695 */ 4696 setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void>; 4697 4698 /** 4699 * Set the system bar to have visible. 4700 * 4701 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4702 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4703 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4704 * 2. Incorrect parameter types. 4705 * @throws { BusinessError } 1300002 - This window state is abnormal. 4706 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4707 * @syscap SystemCapability.WindowManager.WindowManager.Core 4708 * @since 9 4709 */ 4710 /** 4711 * Set the system bar to have visible. 4712 * 4713 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4714 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4715 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4716 * 2. Incorrect parameter types. 4717 * @throws { BusinessError } 1300002 - This window state is abnormal. 4718 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4719 * @syscap SystemCapability.WindowManager.WindowManager.Core 4720 * @crossplatform 4721 * @since 10 4722 */ 4723 /** 4724 * Set the system bar to have visible. 4725 * 4726 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4727 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4728 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Mandatory parameters are left unspecified; 4729 * 2.Incorrect parameter types. 4730 * @throws { BusinessError } 1300002 - This window state is abnormal. 4731 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4732 * @syscap SystemCapability.WindowManager.WindowManager.Core 4733 * @crossplatform 4734 * @atomicservice 4735 * @since 12 4736 * @deprecated since 12 4737 * @useinstead ohos.window.Window#setWindowSystemBarEnable 4738 */ 4739 setWindowSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback<void>): void; 4740 4741 /** 4742 * Set the system bar to have visible. 4743 * 4744 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4745 * @returns { Promise<void> } Promise that returns no value. 4746 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4747 * 2. Incorrect parameter types. 4748 * @throws { BusinessError } 1300002 - This window state is abnormal. 4749 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4750 * @syscap SystemCapability.WindowManager.WindowManager.Core 4751 * @since 9 4752 */ 4753 /** 4754 * Set the system bar to have visible. 4755 * 4756 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4757 * @returns { Promise<void> } Promise that returns no value. 4758 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4759 * 2. Incorrect parameter types. 4760 * @throws { BusinessError } 1300002 - This window state is abnormal. 4761 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4762 * @syscap SystemCapability.WindowManager.WindowManager.Core 4763 * @crossplatform 4764 * @since 10 4765 */ 4766 /** 4767 * Set the system bar to have visible. 4768 * 4769 * @param { Array<'status' | 'navigation'> } names - The set of system bar 4770 * @returns { Promise<void> } Promise that returns no value. 4771 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Mandatory parameters are left unspecified; 4772 * 2.Incorrect parameter types. 4773 * @throws { BusinessError } 1300002 - This window state is abnormal. 4774 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4775 * @syscap SystemCapability.WindowManager.WindowManager.Core 4776 * @crossplatform 4777 * @atomicservice 4778 * @since 12 4779 */ 4780 setWindowSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void>; 4781 4782 /** 4783 * Set specific system bar to have visible. 4784 * 4785 * @param {SpecificSystemBar} name - the set of system bar 4786 * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false. 4787 * @returns { Promise<void> } Promise that returns no value. 4788 * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4789 * 2. Incorrect parameter types. 4790 * @throws {BusinessError} 1300002 - This window state is abnormal. 4791 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 4792 * @syscap SystemCapability.Window.SessionManager 4793 * @atomicservice 4794 * @since 11 4795 */ 4796 /** 4797 * Set specific system bar to have visible. 4798 * 4799 * @param {SpecificSystemBar} name - the set of system bar 4800 * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false. 4801 * @param {boolean} enableAnimation - Whether using animation during this setting, using animation if true or not using animation if false. 4802 * @returns { Promise<void> } Promise that returns no value. 4803 * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4804 * 2. Incorrect parameter types. 4805 * @throws {BusinessError} 1300002 - This window state is abnormal. 4806 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 4807 * @syscap SystemCapability.Window.SessionManager 4808 * @crossplatform 4809 * @atomicservice 4810 * @since 12 4811 */ 4812 setSpecificSystemBarEnabled(name: SpecificSystemBar, enable: boolean, enableAnimation?: boolean): Promise<void>; 4813 4814 /** 4815 * Set the properties of system bar 4816 * 4817 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 4818 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4819 * @syscap SystemCapability.WindowManager.WindowManager.Core 4820 * @since 6 4821 * @deprecated since 9 4822 * @useinstead ohos.window.Window#setWindowSystemBarProperties 4823 */ 4824 setSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void; 4825 4826 /** 4827 * Set the properties of system bar 4828 * 4829 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 4830 * @returns { Promise<void> } Promise that returns no value. 4831 * @syscap SystemCapability.WindowManager.WindowManager.Core 4832 * @since 6 4833 * @deprecated since 9 4834 * @useinstead ohos.window.Window#setWindowSystemBarProperties 4835 */ 4836 setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>; 4837 4838 /** 4839 * Set the properties of system bar 4840 * 4841 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 4842 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4843 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4844 * 2. Incorrect parameter types. 4845 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4846 * @throws { BusinessError } 1300002 - This window state is abnormal. 4847 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4848 * @syscap SystemCapability.WindowManager.WindowManager.Core 4849 * @since 9 4850 */ 4851 /** 4852 * Set the properties of system bar 4853 * 4854 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 4855 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4856 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4857 * 2. Incorrect parameter types. 4858 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4859 * @throws { BusinessError } 1300002 - This window state is abnormal. 4860 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4861 * @syscap SystemCapability.WindowManager.WindowManager.Core 4862 * @atomicservice 4863 * @since 12 4864 * @deprecated since 12 4865 * @useinstead ohos.window.Window#setWindowSystemBarProperties 4866 */ 4867 setWindowSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void; 4868 4869 /** 4870 * Set the properties of system bar 4871 * 4872 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 4873 * @returns { Promise<void> } Promise that returns no value. 4874 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4875 * 2. Incorrect parameter types. 4876 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4877 * @throws { BusinessError } 1300002 - This window state is abnormal. 4878 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4879 * @syscap SystemCapability.WindowManager.WindowManager.Core 4880 * @since 9 4881 */ 4882 /** 4883 * Set the properties of system bar 4884 * 4885 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 4886 * @returns { Promise<void> } Promise that returns no value. 4887 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4888 * 2. Incorrect parameter types. 4889 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4890 * @throws { BusinessError } 1300002 - This window state is abnormal. 4891 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4892 * @syscap SystemCapability.WindowManager.WindowManager.Core 4893 * @atomicservice 4894 * @since 12 4895 */ 4896 setWindowSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>; 4897 4898 /** 4899 * Get the properties of system bar 4900 * 4901 * @returns { SystemBarProperties } Return system bar properties. 4902 * @throws { BusinessError } 1300002 - This window state is abnormal. 4903 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4904 * @throws { BusinessError } 1300004 - Unauthorized operation. 4905 * @syscap SystemCapability.WindowManager.WindowManager.Core 4906 * @atomicservice 4907 * @since 12 4908 */ 4909 getWindowSystemBarProperties(): SystemBarProperties; 4910 4911 /** 4912 * Set whether to disable the gesture back function. 4913 * 4914 * @param { boolean } enabled - If true then enable the gesture back function, false then disable the gesture back function. 4915 * @returns { Promise<void> } Promise that returns no value. 4916 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4917 * 2. Incorrect parameter types. 4918 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4919 * @throws { BusinessError } 1300002 - This window state is abnormal. 4920 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4921 * @throws { BusinessError } 1300004 - Unauthorized operation. 4922 * @syscap SystemCapability.Window.SessionManager 4923 * @atomicservice 4924 * @since 13 4925 */ 4926 setGestureBackEnabled(enabled: boolean): Promise<void>; 4927 4928 /** 4929 * Get whether the gesture back function is currently disabled. 4930 * 4931 * @returns { boolean } enabled - If true then the gesture back function is currently enabled, false then the gesture back function is currently disabled. 4932 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4933 * @throws { BusinessError } 1300002 - This window state is abnormal. 4934 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4935 * @throws { BusinessError } 1300004 - Unauthorized operation. 4936 * @syscap SystemCapability.Window.SessionManager 4937 * @atomicservice 4938 * @since 13 4939 */ 4940 isGestureBackEnabled(): boolean; 4941 4942 /** 4943 * Set the preferred orientation config of the window 4944 * 4945 * @param { Orientation } orientation - The orientation config of the window 4946 * @returns { Promise<void> } Promise that returns no value. 4947 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4948 * 2. Incorrect parameter types; 4949 * 3. Parameter verification failed. 4950 * @throws { BusinessError } 1300002 - This window state is abnormal. 4951 * @syscap SystemCapability.WindowManager.WindowManager.Core 4952 * @since 9 4953 */ 4954 /** 4955 * Set the preferred orientation config of the window 4956 * 4957 * @param { Orientation } orientation - The orientation config of the window 4958 * @returns { Promise<void> } Promise that returns no value. 4959 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4960 * 2. Incorrect parameter types; 4961 * 3. Parameter verification failed. 4962 * @throws { BusinessError } 1300002 - This window state is abnormal. 4963 * @syscap SystemCapability.WindowManager.WindowManager.Core 4964 * @crossplatform 4965 * @since 10 4966 */ 4967 /** 4968 * Set the preferred orientation config of the window 4969 * 4970 * @param { Orientation } orientation - The orientation config of the window 4971 * @returns { Promise<void> } Promise that returns no value. 4972 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4973 * 2. Incorrect parameter types; 4974 * 3. Parameter verification failed. 4975 * @throws { BusinessError } 1300002 - This window state is abnormal. 4976 * @syscap SystemCapability.WindowManager.WindowManager.Core 4977 * @crossplatform 4978 * @atomicservice 4979 * @since 11 4980 */ 4981 setPreferredOrientation(orientation: Orientation): Promise<void>; 4982 4983 /** 4984 * Set the preferred orientation config of the window 4985 * 4986 * @param { Orientation } orientation - The orientation config of the window 4987 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4988 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4989 * 2. Incorrect parameter types; 4990 * 3. Parameter verification failed. 4991 * @throws { BusinessError } 1300002 - This window state is abnormal. 4992 * @syscap SystemCapability.WindowManager.WindowManager.Core 4993 * @since 9 4994 */ 4995 /** 4996 * Set the preferred orientation config of the window 4997 * 4998 * @param { Orientation } orientation - The orientation config of the window 4999 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5000 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5001 * 2. Incorrect parameter types; 5002 * 3. Parameter verification failed. 5003 * @throws { BusinessError } 1300002 - This window state is abnormal. 5004 * @syscap SystemCapability.WindowManager.WindowManager.Core 5005 * @crossplatform 5006 * @since 10 5007 */ 5008 /** 5009 * Set the preferred orientation config of the window 5010 * 5011 * @param { Orientation } orientation - The orientation config of the window 5012 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5013 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5014 * 2. Incorrect parameter types; 5015 * 3. Parameter verification failed. 5016 * @throws { BusinessError } 1300002 - This window state is abnormal. 5017 * @syscap SystemCapability.WindowManager.WindowManager.Core 5018 * @crossplatform 5019 * @atomicservice 5020 * @since 11 5021 */ 5022 setPreferredOrientation(orientation: Orientation, callback: AsyncCallback<void>): void; 5023 5024 /** 5025 * Get the preferred orientation config of the window 5026 * 5027 * @returns { Orientation } orientation - The orientation config of the window 5028 * @throws { BusinessError } 1300002 - This window state is abnormal. 5029 * @syscap SystemCapability.WindowManager.WindowManager.Core 5030 * @atomicservice 5031 * @since 12 5032 */ 5033 getPreferredOrientation(): Orientation; 5034 5035 /** 5036 * Loads content 5037 * 5038 * @param { string } path - Path of the page to which the content will be loaded 5039 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 5040 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5041 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5042 * 2. Incorrect parameter types. 5043 * @throws { BusinessError } 1300002 - This window state is abnormal. 5044 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5045 * @syscap SystemCapability.WindowManager.WindowManager.Core 5046 * @StageModelOnly 5047 * @since 9 5048 */ 5049 /** 5050 * Loads content 5051 * 5052 * @param { string } path - Path of the page to which the content will be loaded 5053 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 5054 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5055 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5056 * 2. Incorrect parameter types. 5057 * @throws { BusinessError } 1300002 - This window state is abnormal. 5058 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5059 * @syscap SystemCapability.WindowManager.WindowManager.Core 5060 * @StageModelOnly 5061 * @crossplatform 5062 * @since 10 5063 */ 5064 /** 5065 * Loads content 5066 * 5067 * @param { string } path - Path of the page to which the content will be loaded 5068 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 5069 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5070 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5071 * 2. Incorrect parameter types. 5072 * @throws { BusinessError } 1300002 - This window state is abnormal. 5073 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5074 * @syscap SystemCapability.WindowManager.WindowManager.Core 5075 * @StageModelOnly 5076 * @crossplatform 5077 * @atomicservice 5078 * @since 11 5079 */ 5080 loadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 5081 5082 /** 5083 * Loads content 5084 * 5085 * @param { string } path - Path of the page to which the content will be loaded 5086 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 5087 * @returns { Promise<void> } Promise that returns no value. 5088 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5089 * 2. Incorrect parameter types. 5090 * @throws { BusinessError } 1300002 - This window state is abnormal. 5091 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5092 * @syscap SystemCapability.WindowManager.WindowManager.Core 5093 * @StageModelOnly 5094 * @since 9 5095 */ 5096 /** 5097 * Loads content 5098 * 5099 * @param { string } path - Path of the page to which the content will be loaded 5100 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 5101 * @returns { Promise<void> } Promise that returns no value. 5102 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5103 * 2. Incorrect parameter types. 5104 * @throws { BusinessError } 1300002 - This window state is abnormal. 5105 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5106 * @syscap SystemCapability.WindowManager.WindowManager.Core 5107 * @StageModelOnly 5108 * @crossplatform 5109 * @since 10 5110 */ 5111 /** 5112 * Loads content 5113 * 5114 * @param { string } path - Path of the page to which the content will be loaded 5115 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 5116 * @returns { Promise<void> } Promise that returns no value. 5117 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5118 * 2. Incorrect parameter types. 5119 * @throws { BusinessError } 1300002 - This window state is abnormal. 5120 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5121 * @syscap SystemCapability.WindowManager.WindowManager.Core 5122 * @StageModelOnly 5123 * @crossplatform 5124 * @atomicservice 5125 * @since 11 5126 */ 5127 loadContent(path: string, storage: LocalStorage): Promise<void>; 5128 5129 /** 5130 * Loads content 5131 * 5132 * @param { string } path - Path of the page to which the content will be loaded 5133 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5134 * @syscap SystemCapability.WindowManager.WindowManager.Core 5135 * @since 7 5136 * @deprecated since 9 5137 * @useinstead ohos.window.Window#setUIContent 5138 */ 5139 loadContent(path: string, callback: AsyncCallback<void>): void; 5140 5141 /** 5142 * Loads content 5143 * 5144 * @param { string } path - Path of the page to which the content will be loaded 5145 * @returns { Promise<void> } Promise that returns no value. 5146 * @syscap SystemCapability.WindowManager.WindowManager.Core 5147 * @since 7 5148 * @deprecated since 9 5149 * @useinstead ohos.window.Window#setUIContent 5150 */ 5151 loadContent(path: string): Promise<void>; 5152 5153 /** 5154 * Get the UIContext associate with the window content. 5155 * 5156 * @returns { UIContext } the object of UIContext. 5157 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5158 * 2. Incorrect parameter types; 5159 * 3. Parameter verification failed. 5160 * @throws { BusinessError } 1300002 - This window state is abnormal. 5161 * @syscap SystemCapability.WindowManager.WindowManager.Core 5162 * @stagemodelonly 5163 * @crossplatform 5164 * @since 10 5165 */ 5166 /** 5167 * Get the UIContext associate with the window content. 5168 * 5169 * @returns { UIContext } the object of UIContext. 5170 * @throws { BusinessError } 1300002 - This window state is abnormal. 5171 * @syscap SystemCapability.WindowManager.WindowManager.Core 5172 * @stagemodelonly 5173 * @crossplatform 5174 * @atomicservice 5175 * @since 11 5176 */ 5177 getUIContext() : UIContext; 5178 5179 /** 5180 * Loads content 5181 * 5182 * @param { string } path - Path of the page to which the content will be loaded 5183 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5184 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5185 * 2. Incorrect parameter types. 5186 * @throws { BusinessError } 1300002 - This window state is abnormal. 5187 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5188 * @syscap SystemCapability.WindowManager.WindowManager.Core 5189 * @since 9 5190 */ 5191 /** 5192 * Loads content 5193 * 5194 * @param { string } path - Path of the page to which the content will be loaded 5195 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5196 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5197 * 2. Incorrect parameter types. 5198 * @throws { BusinessError } 1300002 - This window state is abnormal. 5199 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5200 * @syscap SystemCapability.WindowManager.WindowManager.Core 5201 * @crossplatform 5202 * @since 10 5203 */ 5204 /** 5205 * Loads content 5206 * 5207 * @param { string } path - Path of the page to which the content will be loaded 5208 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5209 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5210 * 2. Incorrect parameter types. 5211 * @throws { BusinessError } 1300002 - This window state is abnormal. 5212 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5213 * @syscap SystemCapability.WindowManager.WindowManager.Core 5214 * @crossplatform 5215 * @atomicservice 5216 * @since 11 5217 */ 5218 setUIContent(path: string, callback: AsyncCallback<void>): void; 5219 5220 /** 5221 * Loads content 5222 * 5223 * @param { string } path - Path of the page to which the content will be loaded 5224 * @returns { Promise<void> } Promise that returns no value. 5225 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5226 * 2. Incorrect parameter types. 5227 * @throws { BusinessError } 1300002 - This window state is abnormal. 5228 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5229 * @syscap SystemCapability.WindowManager.WindowManager.Core 5230 * @since 9 5231 */ 5232 /** 5233 * Loads content 5234 * 5235 * @param { string } path - Path of the page to which the content will be loaded 5236 * @returns { Promise<void> } Promise that returns no value. 5237 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5238 * 2. Incorrect parameter types. 5239 * @throws { BusinessError } 1300002 - This window state is abnormal. 5240 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5241 * @syscap SystemCapability.WindowManager.WindowManager.Core 5242 * @crossplatform 5243 * @since 10 5244 */ 5245 /** 5246 * Loads content 5247 * 5248 * @param { string } path - Path of the page to which the content will be loaded 5249 * @returns { Promise<void> } Promise that returns no value. 5250 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5251 * 2. Incorrect parameter types. 5252 * @throws { BusinessError } 1300002 - This window state is abnormal. 5253 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5254 * @syscap SystemCapability.WindowManager.WindowManager.Core 5255 * @crossplatform 5256 * @atomicservice 5257 * @since 11 5258 */ 5259 setUIContent(path: string): Promise<void>; 5260 5261 /** 5262 * Loads content by named router 5263 * 5264 * @param { string } name - name of the page to which the content will be loaded. 5265 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 5266 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5267 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5268 * 2. Incorrect parameter types. 5269 * @throws { BusinessError } 1300002 - This window state is abnormal. 5270 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5271 * @syscap SystemCapability.WindowManager.WindowManager.Core 5272 * @stagemodelonly 5273 * @crossplatform 5274 * @atomicservice 5275 * @since 11 5276 */ 5277 loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 5278 5279 /** 5280 * Loads content by named router 5281 * 5282 * @param { string } name - name of the page to which the content will be loaded. 5283 * @param { AsyncCallback<void> } callback - Callback used to return the result. 5284 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5285 * 2. Incorrect parameter types. 5286 * @throws { BusinessError } 1300002 - This window state is abnormal. 5287 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5288 * @syscap SystemCapability.WindowManager.WindowManager.Core 5289 * @stagemodelonly 5290 * @crossplatform 5291 * @atomicservice 5292 * @since 11 5293 */ 5294 loadContentByName(name: string, callback: AsyncCallback<void>): void; 5295 5296 /** 5297 * Loads content by named router 5298 * 5299 * @param { string } name - name of the page to which the content will be loaded. 5300 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 5301 * @returns { Promise<void> } Promise that returns no value. 5302 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5303 * 2. Incorrect parameter types. 5304 * @throws { BusinessError } 1300002 - This window state is abnormal. 5305 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5306 * @syscap SystemCapability.WindowManager.WindowManager.Core 5307 * @stagemodelonly 5308 * @crossplatform 5309 * @atomicservice 5310 * @since 11 5311 */ 5312 loadContentByName(name: string, storage?: LocalStorage): Promise<void>; 5313 5314 /** 5315 * Checks whether the window is displayed 5316 * 5317 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 5318 * @syscap SystemCapability.WindowManager.WindowManager.Core 5319 * @since 7 5320 * @deprecated since 9 5321 * @useinstead ohos.window.Window#isWindowShowing 5322 */ 5323 isShowing(callback: AsyncCallback<boolean>): void; 5324 5325 /** 5326 * Checks whether the window is displayed 5327 * 5328 * @returns { Promise<boolean> } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 5329 * @syscap SystemCapability.WindowManager.WindowManager.Core 5330 * @since 7 5331 * @deprecated since 9 5332 * @useinstead ohos.window.Window#isWindowShowing 5333 */ 5334 isShowing(): Promise<boolean>; 5335 5336 /** 5337 * Checks whether the window is displayed 5338 * 5339 * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 5340 * @throws { BusinessError } 1300002 - This window state is abnormal. 5341 * @syscap SystemCapability.WindowManager.WindowManager.Core 5342 * @since 9 5343 */ 5344 /** 5345 * Checks whether the window is displayed 5346 * 5347 * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 5348 * @throws { BusinessError } 1300002 - This window state is abnormal. 5349 * @syscap SystemCapability.WindowManager.WindowManager.Core 5350 * @crossplatform 5351 * @since 10 5352 */ 5353 /** 5354 * Checks whether the window is displayed 5355 * 5356 * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 5357 * @throws { BusinessError } 1300002 - This window state is abnormal. 5358 * @syscap SystemCapability.WindowManager.WindowManager.Core 5359 * @crossplatform 5360 * @atomicservice 5361 * @since 11 5362 */ 5363 isWindowShowing(): boolean; 5364 5365 /** 5366 * Register the callback of windowSizeChange 5367 * 5368 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 5369 * @param { Callback<Size> } callback - Callback used to return the window size. 5370 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5371 * 2. Incorrect parameter types; 5372 * 3. Parameter verification failed. 5373 * @syscap SystemCapability.WindowManager.WindowManager.Core 5374 * @since 7 5375 */ 5376 /** 5377 * Register the callback of windowSizeChange 5378 * 5379 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 5380 * @param { Callback<Size> } callback - Callback used to return the window size. 5381 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5382 * 2. Incorrect parameter types; 5383 * 3. Parameter verification failed. 5384 * @syscap SystemCapability.WindowManager.WindowManager.Core 5385 * @atomicservice 5386 * @since 11 5387 */ 5388 /** 5389 * Register the callback of windowSizeChange 5390 * 5391 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 5392 * @param { Callback<Size> } callback - Callback used to return the window size. 5393 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5394 * 2. Incorrect parameter types; 5395 * 3. Parameter verification failed. 5396 * @syscap SystemCapability.WindowManager.WindowManager.Core 5397 * @crossplatform 5398 * @atomicservice 5399 * @since 12 5400 */ 5401 on(type: 'windowSizeChange', callback: Callback<Size>): void; 5402 5403 /** 5404 * Unregister the callback of windowSizeChange 5405 * 5406 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 5407 * @param { Callback<Size> } callback - Callback used to return the window size. 5408 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5409 * 2. Parameter verification failed. 5410 * @syscap SystemCapability.WindowManager.WindowManager.Core 5411 * @since 7 5412 */ 5413 /** 5414 * Unregister the callback of windowSizeChange 5415 * 5416 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 5417 * @param { Callback<Size> } callback - Callback used to return the window size. 5418 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5419 * 2. Parameter verification failed. 5420 * @syscap SystemCapability.WindowManager.WindowManager.Core 5421 * @atomicservice 5422 * @since 11 5423 */ 5424 /** 5425 * Unregister the callback of windowSizeChange 5426 * 5427 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 5428 * @param { Callback<Size> } callback - Callback used to return the window size. 5429 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5430 * 2. Parameter verification failed. 5431 * @syscap SystemCapability.WindowManager.WindowManager.Core 5432 * @crossplatform 5433 * @atomicservice 5434 * @since 12 5435 */ 5436 off(type: 'windowSizeChange', callback?: Callback<Size>): void; 5437 5438 /** 5439 * Register the callback of systemAvoidAreaChange 5440 * 5441 * @param { 'systemAvoidAreaChange' } type - The value is fixed at 'systemAvoidAreaChange', indicating the event of changes to the avoid area. 5442 * @param { Callback<AvoidArea> } callback - Callback used to return the area. 5443 * @syscap SystemCapability.WindowManager.WindowManager.Core 5444 * @since 7 5445 * @deprecated since 9 5446 * @useinstead ohos.window.Window#on_avoidAreaChange 5447 */ 5448 on(type: 'systemAvoidAreaChange', callback: Callback<AvoidArea>): void; 5449 5450 /** 5451 * Unregister the callback of systemAvoidAreaChange 5452 * 5453 * @param { 'systemAvoidAreaChange' } type - The value is fixed at 'systemAvoidAreaChange', indicating the event of changes to the avoid area. 5454 * @param { Callback<AvoidArea> } callback - Callback used to return the area. 5455 * @syscap SystemCapability.WindowManager.WindowManager.Core 5456 * @since 7 5457 * @deprecated since 9 5458 * @useinstead ohos.window.Window#off_avoidAreaChange 5459 */ 5460 off(type: 'systemAvoidAreaChange', callback?: Callback<AvoidArea>): void; 5461 5462 /** 5463 * Register the callback of avoidAreaChange 5464 * 5465 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 5466 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 5467 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5468 * 2. Incorrect parameter types; 5469 * 3. Parameter verification failed. 5470 * @syscap SystemCapability.WindowManager.WindowManager.Core 5471 * @since 9 5472 */ 5473 /** 5474 * Register the callback of avoidAreaChange 5475 * 5476 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 5477 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 5478 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5479 * 2. Incorrect parameter types; 5480 * 3. Parameter verification failed. 5481 * @syscap SystemCapability.WindowManager.WindowManager.Core 5482 * @atomicservice 5483 * @since 11 5484 */ 5485 /** 5486 * Register the callback of avoidAreaChange 5487 * 5488 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 5489 * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area. 5490 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5491 * 2. Incorrect parameter types; 5492 * 3. Parameter verification failed. 5493 * @syscap SystemCapability.WindowManager.WindowManager.Core 5494 * @atomicservice 5495 * @since 12 5496 */ 5497 on(type: 'avoidAreaChange', callback: Callback<AvoidAreaOptions>): void; 5498 5499 /** 5500 * Unregister the callback of avoidAreaChange 5501 * 5502 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 5503 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 5504 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 5505 * 2. Parameter verification failed. 5506 * @syscap SystemCapability.WindowManager.WindowManager.Core 5507 * @since 9 5508 */ 5509 /** 5510 * Unregister the callback of avoidAreaChange 5511 * 5512 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 5513 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 5514 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 5515 * 2. Parameter verification failed. 5516 * @syscap SystemCapability.WindowManager.WindowManager.Core 5517 * @atomicservice 5518 * @since 11 5519 */ 5520 /** 5521 * Unregister the callback of avoidAreaChange 5522 * 5523 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 5524 * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area. 5525 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 5526 * 2. Parameter verification failed. 5527 * @syscap SystemCapability.WindowManager.WindowManager.Core 5528 * @atomicservice 5529 * @since 12 5530 */ 5531 off(type: 'avoidAreaChange', callback?: Callback<AvoidAreaOptions>): void; 5532 5533 /** 5534 * Register the callback of keyboardHeightChange 5535 * 5536 * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. 5537 * @param { Callback<number> } callback - Callback used to return the current keyboard height. 5538 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5539 * 2. Incorrect parameter types; 5540 * 3. Parameter verification failed. 5541 * @syscap SystemCapability.WindowManager.WindowManager.Core 5542 * @since 7 5543 */ 5544 /** 5545 * Register the callback of keyboardHeightChange 5546 * 5547 * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. 5548 * @param { Callback<number> } callback - Callback used to return the current keyboard height. 5549 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5550 * 2. Incorrect parameter types; 5551 * 3. Parameter verification failed. 5552 * @syscap SystemCapability.WindowManager.WindowManager.Core 5553 * @atomicservice 5554 * @since 12 5555 */ 5556 on(type: 'keyboardHeightChange', callback: Callback<number>): void; 5557 5558 /** 5559 * Unregister the callback of keyboardHeightChange 5560 * 5561 * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. 5562 * @param { Callback<number> } callback - Callback used to return the current keyboard height. 5563 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5564 * 2. Parameter verification failed. 5565 * @syscap SystemCapability.WindowManager.WindowManager.Core 5566 * @since 7 5567 */ 5568 /** 5569 * Unregister the callback of keyboardHeightChange 5570 * 5571 * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. 5572 * @param { Callback<number> } callback - Callback used to return the current keyboard height. 5573 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5574 * 2. Parameter verification failed. 5575 * @syscap SystemCapability.WindowManager.WindowManager.Core 5576 * @atomicservice 5577 * @since 12 5578 */ 5579 off(type: 'keyboardHeightChange', callback?: Callback<number>): void; 5580 5581 /** 5582 * Touch outside callback on. 5583 * 5584 * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. 5585 * @param { Callback<void> } callback - Callback used to return the click event outside this window. 5586 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5587 * 2. Incorrect parameter types; 5588 * 3. Parameter verification failed. 5589 * @syscap SystemCapability.WindowManager.WindowManager.Core 5590 * @atomicservice 5591 * @since 11 5592 */ 5593 on(type: 'touchOutside', callback: Callback<void>): void; 5594 5595 /** 5596 * Touch outside callback off. 5597 * 5598 * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. 5599 * @param { Callback<void> } callback - Callback used to return the click event outside this window. 5600 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5601 * 2. Parameter verification failed. 5602 * @syscap SystemCapability.WindowManager.WindowManager.Core 5603 * @atomicservice 5604 * @since 11 5605 */ 5606 off(type: 'touchOutside', callback?: Callback<void>): void; 5607 5608 /** 5609 * Window displayId change callback on. 5610 * 5611 * @param { 'displayIdChange' } type - The value is fixed at 'displayIdChange', indicating the Display this window is current showing has changed. 5612 * @param { Callback<number> } callback - Callback used to notify the Display this window is current showing has changed. 5613 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5614 * 2. Incorrect parameter types; 5615 * 3. Parameter verification failed. 5616 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5617 * @throws { BusinessError } 1300002 - This window state is abnormal. 5618 * @syscap SystemCapability.Window.SessionManager 5619 * @atomicservice 5620 * @since 14 5621 */ 5622 on(type: 'displayIdChange', callback: Callback<number>): void; 5623 5624 /** 5625 * Window displayId change callback off. 5626 * 5627 * @param { 'displayIdChange' } type - The value is fixed at 'displayIdChange', indicating the Display this window is current showing has changed. 5628 * @param { Callback<number> } callback - Callback used to notify the Display this window is current showing has changed. 5629 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5630 * 2. Parameter verification failed. 5631 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5632 * @throws { BusinessError } 1300002 - This window state is abnormal. 5633 * @syscap SystemCapability.Window.SessionManager 5634 * @atomicservice 5635 * @since 14 5636 */ 5637 off(type: 'displayIdChange', callback?: Callback<number>): void; 5638 5639 /** 5640 * Window visibility change callback on. 5641 * 5642 * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. 5643 * @param { Callback<boolean> } callback - Callback used to notify the window visibility change. 5644 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5645 * 2. Incorrect parameter types; 5646 * 3. Parameter verification failed. 5647 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5648 * @throws { BusinessError } 1300002 - This window state is abnormal. 5649 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5650 * @syscap SystemCapability.Window.SessionManager 5651 * @since 11 5652 */ 5653 /** 5654 * Window visibility change callback on. 5655 * 5656 * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. 5657 * @param { Callback<boolean> } callback - Callback used to notify the window visibility change. 5658 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5659 * 2. Incorrect parameter types; 5660 * 3. Parameter verification failed. 5661 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5662 * @throws { BusinessError } 1300002 - This window state is abnormal. 5663 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5664 * @syscap SystemCapability.Window.SessionManager 5665 * @atomicservice 5666 * @since 12 5667 */ 5668 on(type: 'windowVisibilityChange', callback: Callback<boolean>): void; 5669 5670 /** 5671 * Window visibility change callback off. 5672 * 5673 * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. 5674 * @param { Callback<boolean> } callback - Callback used to notify the window visibility change. 5675 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5676 * 2. Parameter verification failed. 5677 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5678 * @throws { BusinessError } 1300002 - This window state is abnormal. 5679 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5680 * @syscap SystemCapability.Window.SessionManager 5681 * @since 11 5682 */ 5683 /** 5684 * Window visibility change callback off. 5685 * 5686 * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. 5687 * @param { Callback<boolean> } callback - Callback used to notify the window visibility change. 5688 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5689 * 2. Parameter verification failed. 5690 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5691 * @throws { BusinessError } 1300002 - This window state is abnormal. 5692 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5693 * @syscap SystemCapability.Window.SessionManager 5694 * @atomicservice 5695 * @since 12 5696 */ 5697 off(type: 'windowVisibilityChange', callback?: Callback<boolean>): void; 5698 5699 /** 5700 * System density change callback on. 5701 * 5702 * @param { 'systemDensityChange' } type - The value is fixed at 'systemDensityChange', indicating the system density is current has changed. 5703 * @param { Callback<number> } callback - Callback used to notify the system density is current has changed. 5704 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5705 * 2. Incorrect parameter types; 5706 * 3. Parameter verification failed. 5707 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5708 * @throws { BusinessError } 1300002 - This window state is abnormal. 5709 * @syscap SystemCapability.Window.SessionManager 5710 * @atomicservice 5711 * @since 15 5712 */ 5713 on(type: 'systemDensityChange', callback: Callback<number>): void; 5714 5715 /** 5716 * System density change callback off. 5717 * 5718 * @param { 'systemDensityChange' } type - The value is fixed at 'systemDensityChange', indicating the system density is current showing has changed. 5719 * @param { Callback<number> } callback - Callback used to notify the system density is current has changed. 5720 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5721 * 2. Parameter verification failed. 5722 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5723 * @throws { BusinessError } 1300002 - This window state is abnormal. 5724 * @syscap SystemCapability.Window.SessionManager 5725 * @atomicservice 5726 * @since 15 5727 */ 5728 off(type: 'systemDensityChange', callback?: Callback<number>): void; 5729 5730 /** 5731 * Register the callback function that has no interaction for a long time. 5732 * 5733 * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. 5734 * @param { number } timeout - The timeout(in seconds) of no interaction detection. 5735 * @param { Callback<void> } callback - Callback used to notify the window has no interaction for a long time. 5736 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5737 * 2. Incorrect parameter types; 5738 * 3. Parameter verification failed. 5739 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5740 * @throws { BusinessError } 1300002 - This window state is abnormal. 5741 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5742 * @syscap SystemCapability.Window.SessionManager 5743 * @atomicservice 5744 * @since 12 5745 */ 5746 on(type: 'noInteractionDetected', timeout: number, callback: Callback<void>): void; 5747 5748 /** 5749 * Unregister the callback function that has no interaction for a long time. 5750 * 5751 * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. 5752 * @param { Callback<void> } callback - Callback used to notify the window has no interaction for a long time. 5753 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5754 * 2. Parameter verification failed. 5755 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5756 * @throws { BusinessError } 1300002 - This window state is abnormal. 5757 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5758 * @syscap SystemCapability.Window.SessionManager 5759 * @atomicservice 5760 * @since 12 5761 */ 5762 off(type: 'noInteractionDetected', callback?: Callback<void>): void; 5763 5764 /** 5765 * Register the callback of screenshot, only the focused window called back 5766 * 5767 * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event. 5768 * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs. 5769 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5770 * 2. Incorrect parameter types; 5771 * 3. Parameter verification failed. 5772 * @syscap SystemCapability.WindowManager.WindowManager.Core 5773 * @since 9 5774 */ 5775 /** 5776 * Register the callback of screenshot, only the focused window called back 5777 * 5778 * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event. 5779 * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs. 5780 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5781 * 2. Incorrect parameter types; 5782 * 3. Parameter verification failed. 5783 * @syscap SystemCapability.WindowManager.WindowManager.Core 5784 * @atomicservice 5785 * @since 12 5786 */ 5787 on(type: 'screenshot', callback: Callback<void>): void; 5788 5789 /** 5790 * Unregister the callback of screenshot 5791 * 5792 * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event. 5793 * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs. 5794 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5795 * 2. Parameter verification failed. 5796 * @syscap SystemCapability.WindowManager.WindowManager.Core 5797 * @since 9 5798 */ 5799 /** 5800 * Unregister the callback of screenshot 5801 * 5802 * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event. 5803 * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs. 5804 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5805 * 2. Parameter verification failed. 5806 * @syscap SystemCapability.WindowManager.WindowManager.Core 5807 * @atomicservice 5808 * @since 12 5809 */ 5810 off(type: 'screenshot', callback?: Callback<void>): void; 5811 5812 /** 5813 * Register the callback of dialogTargetTouch 5814 * 5815 * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode. 5816 * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode. 5817 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5818 * 2. Incorrect parameter types; 5819 * 3. Parameter verification failed. 5820 * @syscap SystemCapability.WindowManager.WindowManager.Core 5821 * @since 10 5822 */ 5823 /** 5824 * Register the callback of dialogTargetTouch 5825 * 5826 * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode. 5827 * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode. 5828 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5829 * 2. Incorrect parameter types; 5830 * 3. Parameter verification failed. 5831 * @syscap SystemCapability.WindowManager.WindowManager.Core 5832 * @atomicservice 5833 * @since 12 5834 */ 5835 on(type: 'dialogTargetTouch', callback: Callback<void>): void; 5836 5837 /** 5838 * Unregister the callback of dialogTargetTouch 5839 * 5840 * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', 5841 * indicating the click event of the target window in the modal window mode. 5842 * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode. 5843 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5844 * 2. Parameter verification failed. 5845 * @syscap SystemCapability.WindowManager.WindowManager.Core 5846 * @since 10 5847 */ 5848 /** 5849 * Unregister the callback of dialogTargetTouch 5850 * 5851 * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', 5852 * indicating the click event of the target window in the modal window mode. 5853 * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode. 5854 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5855 * 2. Parameter verification failed. 5856 * @syscap SystemCapability.WindowManager.WindowManager.Core 5857 * @atomicservice 5858 * @since 12 5859 */ 5860 off(type: 'dialogTargetTouch', callback?: Callback<void>): void; 5861 5862 /** 5863 * Register the callback of windowEvent 5864 * 5865 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 5866 * @param { Callback<WindowEventType> } callback - the callback of window event 5867 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5868 * 2. Incorrect parameter types; 5869 * 3. Parameter verification failed. 5870 * @syscap SystemCapability.WindowManager.WindowManager.Core 5871 * @since 10 5872 */ 5873 /** 5874 * Register the callback of windowEvent 5875 * 5876 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 5877 * @param { Callback<WindowEventType> } callback - the callback of window event 5878 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5879 * 2. Incorrect parameter types; 5880 * 3. Parameter verification failed. 5881 * @syscap SystemCapability.WindowManager.WindowManager.Core 5882 * @crossplatform 5883 * @atomicservice 5884 * @since 11 5885 */ 5886 on(type: 'windowEvent', callback: Callback<WindowEventType>): void; 5887 5888 /** 5889 * Unregister the callback of windowEvent 5890 * 5891 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 5892 * @param { Callback<WindowEventType> } callback - the callback of window event 5893 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5894 * 2. Parameter verification failed. 5895 * @syscap SystemCapability.WindowManager.WindowManager.Core 5896 * @since 10 5897 */ 5898 /** 5899 * Unregister the callback of windowEvent 5900 * 5901 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 5902 * @param { Callback<WindowEventType> } callback - the callback of window event 5903 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5904 * 2. Parameter verification failed. 5905 * @syscap SystemCapability.WindowManager.WindowManager.Core 5906 * @crossplatform 5907 * @atomicservice 5908 * @since 11 5909 */ 5910 off(type: 'windowEvent', callback?: Callback<WindowEventType>): void; 5911 5912 /** 5913 * Register the callback of windowStatusChange 5914 * 5915 * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. 5916 * @param { Callback<WindowStatusType> } callback - Callback used to return the window status. 5917 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5918 * 2. Incorrect parameter types; 5919 * 3. Parameter verification failed. 5920 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5921 * @syscap SystemCapability.Window.SessionManager 5922 * @since 11 5923 */ 5924 /** 5925 * Register the callback of windowStatusChange 5926 * 5927 * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. 5928 * @param { Callback<WindowStatusType> } callback - Callback used to return the window status. 5929 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5930 * 2. Incorrect parameter types; 5931 * 3. Parameter verification failed. 5932 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5933 * @syscap SystemCapability.Window.SessionManager 5934 * @atomicservice 5935 * @since 12 5936 */ 5937 on(type: 'windowStatusChange', callback: Callback<WindowStatusType>): void; 5938 5939 /** 5940 * Unregister the callback of windowStatusChange 5941 * 5942 * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. 5943 * @param { Callback<WindowStatusType> } callback - Callback used to return the window status. 5944 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5945 * 2. Parameter verification failed. 5946 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5947 * @syscap SystemCapability.Window.SessionManager 5948 * @since 11 5949 */ 5950 /** 5951 * Unregister the callback of windowStatusChange 5952 * 5953 * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. 5954 * @param { Callback<WindowStatusType> } callback - Callback used to return the window status. 5955 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5956 * 2. Parameter verification failed. 5957 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5958 * @syscap SystemCapability.Window.SessionManager 5959 * @atomicservice 5960 * @since 12 5961 */ 5962 off(type: 'windowStatusChange', callback?: Callback<WindowStatusType>): void; 5963 5964 /** 5965 * Register the callback of subWindowClose 5966 * 5967 * @param { 'subWindowClose' } type - The value is fixed at 'subWindowClose', indicating the subwindow close event. 5968 * @param { Callback<void> } callback - Callback used to return whether to terminate the subwindow close process. 5969 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5970 * 2. Parameter verification failed. 5971 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5972 * @throws { BusinessError } 1300002 - This window state is abnormal. 5973 * @throws { BusinessError } 1300004 - Unauthorized operation. 5974 * @syscap SystemCapability.Window.SessionManager 5975 * @atomicservice 5976 * @since 12 5977 */ 5978 on(type: 'subWindowClose', callback: Callback<void>): void; 5979 5980 /** 5981 * Unregister the callback of subWindowClose 5982 * 5983 * @param { 'subWindowClose' } type - The value is fixed at 'subWindowClose', indicating the subwindow close event. 5984 * @param { Callback<void> } callback - Callback used to return whether to terminate the subwindow close process. 5985 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 5986 * 2. Parameter verification failed. 5987 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5988 * @throws { BusinessError } 1300002 - This window state is abnormal. 5989 * @throws { BusinessError } 1300004 - Unauthorized operation. 5990 * @syscap SystemCapability.Window.SessionManager 5991 * @atomicservice 5992 * @since 12 5993 */ 5994 off(type: 'subWindowClose', callback?: Callback<void>): void; 5995 5996 /** 5997 * Asynchronous callback event for closing the registration window. 5998 * 5999 * @param { 'windowWillClose' } type - The value is fixed at 'windowWillClose', indicating the window close event. 6000 * @param { Callback<void, Promise<boolean>> } callback - The callback function returns a Promise<boolean> to decide whether to close the window. 6001 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 6002 * 2. Parameter verification failed. 6003 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6004 * @throws { BusinessError } 1300002 - This window state is abnormal. 6005 * @throws { BusinessError } 1300004 - Unauthorized operation. 6006 * @syscap SystemCapability.Window.SessionManager 6007 * @atomicservice 6008 * @since 15 6009 */ 6010 on(type: 'windowWillClose', callback: Callback<void, Promise<boolean>>): void; 6011 6012 /** 6013 * Cancel the asynchronous callback event for closing the registration window. 6014 * 6015 * @param { 'windowWillClose' } type - The value is fixed at 'windowWillClose', indicating the window close event. 6016 * @param { Callback<void, Promise<boolean>> } callback - The callback function returns a Promise<boolean> to decide whether to close the window. 6017 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 6018 * 2. Parameter verification failed. 6019 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6020 * @throws { BusinessError } 1300002 - This window state is abnormal. 6021 * @throws { BusinessError } 1300004 - Unauthorized operation. 6022 * @syscap SystemCapability.Window.SessionManager 6023 * @atomicservice 6024 * @since 15 6025 */ 6026 off(type: 'windowWillClose', callback?: Callback<void, Promise<boolean>>): void; 6027 6028 /** 6029 * Register the callback of window highlight state change 6030 * 6031 * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight state change event. 6032 * @param { Callback<boolean> } callback - Callback used to return the highlight status of the window. 6033 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6034 * 2. Incorrect parameter types; 6035 * 3. Parameter verification failed. 6036 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6037 * @throws { BusinessError } 1300002 - This window state is abnormal. 6038 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6039 * @syscap SystemCapability.Window.SessionManager 6040 * @atomicservice 6041 * @since 15 6042 */ 6043 on(type: 'windowHighlightChange', callback: Callback<boolean>): void; 6044 6045 /** 6046 * Unregister the callback of window highlight state change 6047 * 6048 * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight change event. 6049 * @param { Callback<boolean> } callback - Callback used to return the highlight status of the window. 6050 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6051 * 2. Incorrect parameter types; 6052 * 3. Parameter verification failed. 6053 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6054 * @throws { BusinessError } 1300002 - This window state is abnormal. 6055 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6056 * @syscap SystemCapability.Window.SessionManager 6057 * @atomicservice 6058 * @since 15 6059 */ 6060 off(type: 'windowHighlightChange', callback?: Callback<boolean>): void; 6061 6062 /** 6063 * Bind dialog to the target window. 6064 * 6065 * @param { rpc.RemoteObject } token - token of the target window. 6066 * @param { Callback<void> } deathCallback - the callback of dialogDeath. 6067 * @returns { Promise<void> } Promise that returns no value. 6068 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6069 * @throws { BusinessError } 1300002 - This window state is abnormal. 6070 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6071 * @syscap SystemCapability.WindowManager.WindowManager.Core 6072 * @systemapi Hide this for inner system use. 6073 * @since 9 6074 */ 6075 /** 6076 * Bind dialog to the target window. 6077 * 6078 * @param { rpc.RemoteObject } token - token of the target window. 6079 * @param { Callback<void> } deathCallback - the callback of dialogDeath. 6080 * @returns { Promise<void> } Promise that returns no value. 6081 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6082 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6083 * @throws { BusinessError } 1300002 - This window state is abnormal. 6084 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6085 * @syscap SystemCapability.WindowManager.WindowManager.Core 6086 * @systemapi Hide this for inner system use. 6087 * @since 12 6088 */ 6089 bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>): Promise<void>; 6090 6091 /** 6092 * Bind dialog to the target window. 6093 * 6094 * @param { rpc.RemoteObject } token token of the target window. 6095 * @param { Callback<void> } deathCallback the callback of dialogDeath. 6096 * @param { AsyncCallback<void> } callback Callback used to return the result. 6097 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6098 * @throws { BusinessError } 1300002 - This window state is abnormal. 6099 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6100 * @syscap SystemCapability.WindowManager.WindowManager.Core 6101 * @systemapi Hide this for inner system use. 6102 * @since 9 6103 */ 6104 /** 6105 * Bind dialog to the target window. 6106 * 6107 * @param { rpc.RemoteObject } token token of the target window. 6108 * @param { Callback<void> } deathCallback the callback of dialogDeath. 6109 * @param { AsyncCallback<void> } callback Callback used to return the result. 6110 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6111 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6112 * @throws { BusinessError } 1300002 - This window state is abnormal. 6113 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6114 * @syscap SystemCapability.WindowManager.WindowManager.Core 6115 * @systemapi Hide this for inner system use. 6116 * @since 12 6117 */ 6118 bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>, callback: AsyncCallback<void>): void; 6119 6120 /** 6121 * Bind dialog to the target window. 6122 * 6123 * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window. 6124 * @param { Callback<void> } deathCallback the callback of dialogDeath. 6125 * @returns { Promise<void> } Promise that returns no value. 6126 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6127 * @throws { BusinessError } 1300002 - This window state is abnormal. 6128 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6129 * @syscap SystemCapability.WindowManager.WindowManager.Core 6130 * @systemapi Hide this for inner system use. 6131 * @since 9 6132 */ 6133 /** 6134 * Bind dialog to the target window. 6135 * 6136 * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window. 6137 * @param { Callback<void> } deathCallback the callback of dialogDeath. 6138 * @returns { Promise<void> } Promise that returns no value. 6139 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6140 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6141 * @throws { BusinessError } 1300002 - This window state is abnormal. 6142 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6143 * @syscap SystemCapability.WindowManager.WindowManager.Core 6144 * @systemapi Hide this for inner system use. 6145 * @since 12 6146 */ 6147 bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback<void>): Promise<void>; 6148 6149 /** 6150 * Bind dialog to the target window. 6151 * 6152 * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window. 6153 * @param { Callback<void> } deathCallback the callback of dialogDeath. 6154 * @param { AsyncCallback<void> } callback Callback used to return the result. 6155 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6156 * @throws { BusinessError } 1300002 - This window state is abnormal. 6157 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6158 * @syscap SystemCapability.WindowManager.WindowManager.Core 6159 * @systemapi Hide this for inner system use. 6160 * @since 9 6161 */ 6162 /** 6163 * Bind dialog to the target window. 6164 * 6165 * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window. 6166 * @param { Callback<void> } deathCallback the callback of dialogDeath. 6167 * @param { AsyncCallback<void> } callback Callback used to return the result. 6168 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6169 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6170 * @throws { BusinessError } 1300002 - This window state is abnormal. 6171 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6172 * @syscap SystemCapability.WindowManager.WindowManager.Core 6173 * @systemapi Hide this for inner system use. 6174 * @since 12 6175 */ 6176 bindDialogTarget( 6177 requestInfo: dialogRequest.RequestInfo, 6178 deathCallback: Callback<void>, 6179 callback: AsyncCallback<void> 6180 ): void; 6181 6182 /** 6183 * Set whether the dialog window responds to back gesture. 6184 * 6185 * @param { boolean } enabled - Responds to back gesture if true, or ignore back gesture if false. 6186 * @returns { Promise<void> } Promise that returns no value. 6187 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6188 * 2. Incorrect parameter types. 6189 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6190 * @throws { BusinessError } 1300002 - This window state is abnormal. 6191 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6192 * @throws { BusinessError } 1300004 - Unauthorized operation. 6193 * @syscap SystemCapability.Window.SessionManager 6194 * @atomicservice 6195 * @since 12 6196 */ 6197 setDialogBackGestureEnabled(enabled: boolean): Promise<void>; 6198 6199 /** 6200 * Whether the window supports thr wide gamut setting. 6201 * 6202 * @returns { Promise<boolean> } Promise used to return the result. The value true means that the wide-gamut color space is supported, and false means the opposite. 6203 * @syscap SystemCapability.WindowManager.WindowManager.Core 6204 * @since 8 6205 * @deprecated since 9 6206 * @useinstead ohos.window.Window#isWindowSupportWideGamut 6207 */ 6208 isSupportWideGamut(): Promise<boolean>; 6209 6210 /** 6211 * Whether the window supports thr wide gamut setting. 6212 * 6213 * @param { AsyncCallback<boolean> } callback Callback used to return the result. 6214 * @syscap SystemCapability.WindowManager.WindowManager.Core 6215 * @since 8 6216 * @deprecated since 9 6217 * @useinstead ohos.window.Window#isWindowSupportWideGamut 6218 */ 6219 isSupportWideGamut(callback: AsyncCallback<boolean>): void; 6220 6221 /** 6222 * Whether the window supports thr wide gamut setting. 6223 * 6224 * @returns { Promise<boolean> } Promise used to return the result. 6225 * The value true means that the wide-gamut color space is supported, and false means the opposite. 6226 * @throws { BusinessError } 1300002 - This window state is abnormal. 6227 * @syscap SystemCapability.WindowManager.WindowManager.Core 6228 * @since 9 6229 */ 6230 /** 6231 * Whether the window supports thr wide gamut setting. 6232 * 6233 * @returns { Promise<boolean> } Promise used to return the result. 6234 * The value true means that the wide-gamut color space is supported, and false means the opposite. 6235 * @throws { BusinessError } 1300002 - This window state is abnormal. 6236 * @syscap SystemCapability.WindowManager.WindowManager.Core 6237 * @atomicservice 6238 * @since 12 6239 */ 6240 isWindowSupportWideGamut(): Promise<boolean>; 6241 6242 /** 6243 * Whether the window supports thr wide gamut setting. 6244 * 6245 * @param { AsyncCallback<boolean> } callback Callback used to return the result. 6246 * @throws { BusinessError } 1300002 - This window state is abnormal. 6247 * @syscap SystemCapability.WindowManager.WindowManager.Core 6248 * @since 9 6249 */ 6250 /** 6251 * Whether the window supports thr wide gamut setting. 6252 * 6253 * @param { AsyncCallback<boolean> } callback Callback used to return the result. 6254 * @throws { BusinessError } 1300002 - This window state is abnormal. 6255 * @syscap SystemCapability.WindowManager.WindowManager.Core 6256 * @atomicservice 6257 * @since 12 6258 */ 6259 isWindowSupportWideGamut(callback: AsyncCallback<boolean>): void; 6260 6261 /** 6262 * Sets the specified color space. 6263 * 6264 * @param { ColorSpace } colorSpace the specified color space. 6265 * @returns { Promise<void> } Promise that returns no value. 6266 * @syscap SystemCapability.WindowManager.WindowManager.Core 6267 * @since 8 6268 * @deprecated since 9 6269 * @useinstead ohos.window.Window#setWindowColorSpace 6270 */ 6271 setColorSpace(colorSpace: ColorSpace): Promise<void>; 6272 6273 /** 6274 * Sets the specified color space. 6275 * 6276 * @param { ColorSpace } colorSpace the specified color space. 6277 * @param { AsyncCallback<void> } callback Callback used to return the result. 6278 * @syscap SystemCapability.WindowManager.WindowManager.Core 6279 * @since 8 6280 * @deprecated since 9 6281 * @useinstead ohos.window.Window#setWindowColorSpace 6282 */ 6283 setColorSpace(colorSpace: ColorSpace, callback: AsyncCallback<void>): void; 6284 6285 /** 6286 * Sets the specified color space. 6287 * 6288 * @param { ColorSpace } colorSpace the specified color space. 6289 * @returns { Promise<void> } Promise that returns no value. 6290 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6291 * 2. Incorrect parameter types; 6292 * 3. Parameter verification failed. 6293 * @throws { BusinessError } 1300002 - This window state is abnormal. 6294 * @syscap SystemCapability.WindowManager.WindowManager.Core 6295 * @since 9 6296 */ 6297 /** 6298 * Sets the specified color space. 6299 * 6300 * @param { ColorSpace } colorSpace the specified color space. 6301 * @returns { Promise<void> } Promise that returns no value. 6302 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6303 * 2. Incorrect parameter types; 6304 * 3. Parameter verification failed. 6305 * @throws { BusinessError } 1300002 - This window state is abnormal. 6306 * @syscap SystemCapability.WindowManager.WindowManager.Core 6307 * @crossplatform 6308 * @since 11 6309 */ 6310 /** 6311 * Sets the specified color space. 6312 * 6313 * @param { ColorSpace } colorSpace the specified color space. 6314 * @returns { Promise<void> } Promise that returns no value. 6315 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6316 * 2. Incorrect parameter types; 6317 * 3. Parameter verification failed. 6318 * @throws { BusinessError } 1300002 - This window state is abnormal. 6319 * @syscap SystemCapability.WindowManager.WindowManager.Core 6320 * @crossplatform 6321 * @atomicservice 6322 * @since 12 6323 */ 6324 setWindowColorSpace(colorSpace: ColorSpace): Promise<void>; 6325 6326 /** 6327 * Sets the specified color space. 6328 * 6329 * @param { ColorSpace } colorSpace the specified color space. 6330 * @param { AsyncCallback<void> } callback Callback used to return the result. 6331 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6332 * 2. Incorrect parameter types; 6333 * 3. Parameter verification failed. 6334 * @throws { BusinessError } 1300002 - This window state is abnormal. 6335 * @syscap SystemCapability.WindowManager.WindowManager.Core 6336 * @since 9 6337 */ 6338 /** 6339 * Sets the specified color space. 6340 * 6341 * @param { ColorSpace } colorSpace the specified color space. 6342 * @param { AsyncCallback<void> } callback Callback used to return the result. 6343 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6344 * 2. Incorrect parameter types; 6345 * 3. Parameter verification failed. 6346 * @throws { BusinessError } 1300002 - This window state is abnormal. 6347 * @syscap SystemCapability.WindowManager.WindowManager.Core 6348 * @crossplatform 6349 * @since 11 6350 */ 6351 /** 6352 * Sets the specified color space. 6353 * 6354 * @param { ColorSpace } colorSpace the specified color space. 6355 * @param { AsyncCallback<void> } callback Callback used to return the result. 6356 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6357 * 2. Incorrect parameter types; 6358 * 3. Parameter verification failed. 6359 * @throws { BusinessError } 1300002 - This window state is abnormal. 6360 * @syscap SystemCapability.WindowManager.WindowManager.Core 6361 * @crossplatform 6362 * @atomicservice 6363 * @since 12 6364 */ 6365 setWindowColorSpace(colorSpace: ColorSpace, callback: AsyncCallback<void>): void; 6366 6367 /** 6368 * Obtains the set color space. 6369 * 6370 * @returns { Promise<ColorSpace> } Promise used to return the current color space. 6371 * @syscap SystemCapability.WindowManager.WindowManager.Core 6372 * @since 8 6373 * @deprecated since 9 6374 * @useinstead ohos.window.Window#getWindowColorSpace 6375 */ 6376 getColorSpace(): Promise<ColorSpace>; 6377 6378 /** 6379 * Obtains the set color space. 6380 * 6381 * @param { AsyncCallback<ColorSpace> } callback Callback used to return the result. 6382 * @syscap SystemCapability.WindowManager.WindowManager.Core 6383 * @since 8 6384 * @deprecated since 9 6385 * @useinstead ohos.window.Window#getWindowColorSpace 6386 */ 6387 getColorSpace(callback: AsyncCallback<ColorSpace>): void; 6388 6389 /** 6390 * Obtains the set color space. 6391 * 6392 * @returns { ColorSpace } Color space obtained. 6393 * @throws { BusinessError } 1300002 - This window state is abnormal. 6394 * @syscap SystemCapability.WindowManager.WindowManager.Core 6395 * @since 9 6396 */ 6397 /** 6398 * Obtains the set color space. 6399 * 6400 * @returns { ColorSpace } Color space obtained. 6401 * @throws { BusinessError } 1300002 - This window state is abnormal. 6402 * @syscap SystemCapability.WindowManager.WindowManager.Core 6403 * @crossplatform 6404 * @since 11 6405 */ 6406 /** 6407 * Obtains the set color space. 6408 * 6409 * @returns { ColorSpace } Color space obtained. 6410 * @throws { BusinessError } 1300002 - This window state is abnormal. 6411 * @syscap SystemCapability.WindowManager.WindowManager.Core 6412 * @crossplatform 6413 * @atomicservice 6414 * @since 12 6415 */ 6416 getWindowColorSpace(): ColorSpace; 6417 6418 /** 6419 * Sets the background color of window. 6420 * 6421 * @param { string } color the specified color. 6422 * @returns { Promise<void> } Promise that returns no value. 6423 * @syscap SystemCapability.WindowManager.WindowManager.Core 6424 * @since 6 6425 * @deprecated since 9 6426 * @useinstead ohos.window.Window#setWindowBackgroundColor 6427 */ 6428 setBackgroundColor(color: string): Promise<void>; 6429 6430 /** 6431 * Sets the background color of window. 6432 * 6433 * @param { string } color the specified color. 6434 * @param { AsyncCallback<void> } callback Callback used to return the result. 6435 * @syscap SystemCapability.WindowManager.WindowManager.Core 6436 * @since 6 6437 * @deprecated since 9 6438 * @useinstead ohos.window.Window#setWindowBackgroundColor 6439 */ 6440 setBackgroundColor(color: string, callback: AsyncCallback<void>): void; 6441 6442 /** 6443 * Sets the background color of window. 6444 * 6445 * @param { string } color the specified color. 6446 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6447 * 2. Incorrect parameter types. 6448 * @throws { BusinessError } 1300002 - This window state is abnormal. 6449 * @syscap SystemCapability.WindowManager.WindowManager.Core 6450 * @since 9 6451 */ 6452 /** 6453 * Sets the background color of window. 6454 * 6455 * @param { string } color the specified color. 6456 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6457 * 2. Incorrect parameter types. 6458 * @throws { BusinessError } 1300002 - This window state is abnormal. 6459 * @syscap SystemCapability.WindowManager.WindowManager.Core 6460 * @crossplatform 6461 * @since 10 6462 */ 6463 /** 6464 * Sets the background color of window. 6465 * 6466 * @param { string } color the specified color. 6467 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6468 * 2. Incorrect parameter types. 6469 * @throws { BusinessError } 1300002 - This window state is abnormal. 6470 * @syscap SystemCapability.WindowManager.WindowManager.Core 6471 * @crossplatform 6472 * @atomicservice 6473 * @since 11 6474 */ 6475 setWindowBackgroundColor(color: string): void; 6476 6477 /** 6478 * Sets the brightness of window. 6479 * 6480 * @param { number } brightness the specified brightness value. 6481 * @returns { Promise<void> } Promise that returns no value. 6482 * @syscap SystemCapability.WindowManager.WindowManager.Core 6483 * @since 6 6484 * @deprecated since 9 6485 * @useinstead ohos.window.Window#setWindowBrightness 6486 */ 6487 setBrightness(brightness: number): Promise<void>; 6488 6489 /** 6490 * Sets the brightness of window. 6491 * 6492 * @param { number } brightness the specified brightness value. 6493 * @param { AsyncCallback<void> } callback Callback used to return the result. 6494 * @syscap SystemCapability.WindowManager.WindowManager.Core 6495 * @since 6 6496 * @deprecated since 9 6497 * @useinstead ohos.window.Window#setWindowBrightness 6498 */ 6499 setBrightness(brightness: number, callback: AsyncCallback<void>): void; 6500 6501 /** 6502 * Set whether the main window is topmost. 6503 * 6504 * @param { boolean } isTopmost - Main window is topmost if true. 6505 * @returns { Promise<void> } Promise that returns no value. 6506 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6507 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6508 * 2. Incorrect parameter types. 6509 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6510 * @throws { BusinessError } 1300002 - This window state is abnormal. 6511 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6512 * @throws { BusinessError } 1300004 - Unauthorized operation. 6513 * @syscap SystemCapability.Window.SessionManager 6514 * @systemapi 6515 * @since 12 6516 */ 6517 setTopmost(isTopmost: boolean): Promise<void>; 6518 6519 /** 6520 * Set whether the main window is topmost. 6521 * 6522 * @permission ohos.permission.WINDOW_TOPMOST 6523 * @param { boolean } isWindowTopmost - Main window is topmost if true. 6524 * @returns { Promise<void> } Promise that returns no value. 6525 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 6526 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6527 * 2. Incorrect parameter types. 6528 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6529 * @throws { BusinessError } 1300002 - This window state is abnormal. 6530 * @throws { BusinessError } 1300004 - Unauthorized operation. 6531 * @syscap SystemCapability.Window.SessionManager 6532 * @atomicservice 6533 * @since 14 6534 */ 6535 setWindowTopmost(isWindowTopmost: boolean): Promise<void>; 6536 6537 /** 6538 * Sets the brightness of window. 6539 * 6540 * @param { number } brightness the specified brightness value. 6541 * @returns { Promise<void> } Promise that returns no value. 6542 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6543 * 2. Incorrect parameter types. 6544 * @throws { BusinessError } 1300002 - This window state is abnormal. 6545 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6546 * @syscap SystemCapability.WindowManager.WindowManager.Core 6547 * @since 9 6548 */ 6549 /** 6550 * Sets the brightness of window. 6551 * 6552 * @param { number } brightness the specified brightness value. 6553 * @returns { Promise<void> } Promise that returns no value. 6554 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6555 * 2. Incorrect parameter types. 6556 * @throws { BusinessError } 1300002 - This window state is abnormal. 6557 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6558 * @syscap SystemCapability.WindowManager.WindowManager.Core 6559 * @crossplatform 6560 * @since 10 6561 */ 6562 /** 6563 * Sets the brightness of window. 6564 * 6565 * @param { number } brightness the specified brightness value. 6566 * @returns { Promise<void> } Promise that returns no value. 6567 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6568 * 2. Incorrect parameter types. 6569 * @throws { BusinessError } 1300002 - This window state is abnormal. 6570 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6571 * @syscap SystemCapability.WindowManager.WindowManager.Core 6572 * @crossplatform 6573 * @atomicservice 6574 * @since 11 6575 */ 6576 setWindowBrightness(brightness: number): Promise<void>; 6577 6578 /** 6579 * Sets the brightness of window. 6580 * 6581 * @param { number } brightness the specified brightness value. 6582 * @param { AsyncCallback<void> } callback Callback used to return the result. 6583 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6584 * 2. Incorrect parameter types. 6585 * @throws { BusinessError } 1300002 - This window state is abnormal. 6586 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6587 * @syscap SystemCapability.WindowManager.WindowManager.Core 6588 * @since 9 6589 */ 6590 /** 6591 * Sets the brightness of window. 6592 * 6593 * @param { number } brightness the specified brightness value. 6594 * @param { AsyncCallback<void> } callback Callback used to return the result. 6595 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6596 * 2. Incorrect parameter types. 6597 * @throws { BusinessError } 1300002 - This window state is abnormal. 6598 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6599 * @syscap SystemCapability.WindowManager.WindowManager.Core 6600 * @crossplatform 6601 * @since 10 6602 */ 6603 /** 6604 * Sets the brightness of window. 6605 * 6606 * @param { number } brightness the specified brightness value. 6607 * @param { AsyncCallback<void> } callback Callback used to return the result. 6608 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6609 * 2. Incorrect parameter types. 6610 * @throws { BusinessError } 1300002 - This window state is abnormal. 6611 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6612 * @syscap SystemCapability.WindowManager.WindowManager.Core 6613 * @crossplatform 6614 * @atomicservice 6615 * @since 11 6616 */ 6617 setWindowBrightness(brightness: number, callback: AsyncCallback<void>): void; 6618 6619 /** 6620 * Sets the dimBehind of window. 6621 * 6622 * @param { number } dimBehindValue - The specified dimBehind. 6623 * @param { AsyncCallback<void> } callback Callback used to return the result. 6624 * @syscap SystemCapability.WindowManager.WindowManager.Core 6625 * @since 7 6626 * @deprecated since 9 6627 */ 6628 setDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void; 6629 6630 /** 6631 * Sets the dimBehind of window. 6632 * 6633 * @param { number } dimBehindValue - The specified dimBehind. 6634 * @returns { Promise<void> } Promise that returns no value. 6635 * @syscap SystemCapability.WindowManager.WindowManager.Core 6636 * @since 7 6637 * @deprecated since 9 6638 */ 6639 setDimBehind(dimBehindValue: number): Promise<void>; 6640 6641 /** 6642 * Sets whether focusable or not. 6643 * 6644 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 6645 * @returns { Promise<void> } Promise that returns no value. 6646 * @syscap SystemCapability.WindowManager.WindowManager.Core 6647 * @since 7 6648 * @deprecated since 9 6649 * @useinstead ohos.window.Window#setWindowFocusable 6650 */ 6651 setFocusable(isFocusable: boolean): Promise<void>; 6652 6653 /** 6654 * Sets whether focusable or not. 6655 * 6656 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 6657 * @param { AsyncCallback<void> } callback Callback used to return the result. 6658 * @syscap SystemCapability.WindowManager.WindowManager.Core 6659 * @since 7 6660 * @deprecated since 9 6661 * @useinstead ohos.window.Window#setWindowFocusable 6662 */ 6663 setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void; 6664 6665 /** 6666 * Sets whether focusable or not. 6667 * 6668 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 6669 * @returns { Promise<void> } Promise that returns no value. 6670 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6671 * 2. Incorrect parameter types. 6672 * @throws { BusinessError } 1300002 - This window state is abnormal. 6673 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6674 * @syscap SystemCapability.WindowManager.WindowManager.Core 6675 * @since 9 6676 */ 6677 /** 6678 * Sets whether focusable or not. 6679 * 6680 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 6681 * @returns { Promise<void> } Promise that returns no value. 6682 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6683 * 2. Incorrect parameter types. 6684 * @throws { BusinessError } 1300002 - This window state is abnormal. 6685 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6686 * @syscap SystemCapability.WindowManager.WindowManager.Core 6687 * @atomicservice 6688 * @since 12 6689 */ 6690 setWindowFocusable(isFocusable: boolean): Promise<void>; 6691 6692 /** 6693 * Sets whether focusable or not. 6694 * 6695 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 6696 * @param { AsyncCallback<void> } callback Callback used to return the result. 6697 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6698 * 2. Incorrect parameter types. 6699 * @throws { BusinessError } 1300002 - This window state is abnormal. 6700 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6701 * @syscap SystemCapability.WindowManager.WindowManager.Core 6702 * @since 9 6703 */ 6704 /** 6705 * Sets whether focusable or not. 6706 * 6707 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 6708 * @param { AsyncCallback<void> } callback Callback used to return the result. 6709 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6710 * 2. Incorrect parameter types. 6711 * @throws { BusinessError } 1300002 - This window state is abnormal. 6712 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6713 * @syscap SystemCapability.WindowManager.WindowManager.Core 6714 * @atomicservice 6715 * @since 12 6716 */ 6717 setWindowFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void; 6718 6719 /** 6720 * Window requests to get focus or lose focus. 6721 * 6722 * @param { boolean } isFocused - Window requests to get focus if true, requests to lose focus if false. 6723 * @returns { Promise<void> } - Promise that returns no value. 6724 * @throws { BusinessError } 202 - Permission verification failed, non-system application uses system API. 6725 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6726 * 2. Incorrect parameter types. 6727 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6728 * @throws { BusinessError } 1300002 - This window state is abnormal. 6729 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6730 * @syscap SystemCapability.Window.SessionManager 6731 * @systemapi 6732 * @since 13 6733 */ 6734 requestFocus(isFocused: boolean): Promise<void>; 6735 6736 /** 6737 * Sets whether exclusively highlighted or not. 6738 * 6739 * @param { boolean } exclusivelyHighlighted Whether the window can become highlight exclusively when it gain focus. The value 6740 * true means that the window can cause the window outside the current window link to 6741 * lose its highlight state, and false means the opposite. 6742 * @returns { Promise<void> } - Promise that returns no value. 6743 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6744 * 2. Incorrect parameter types; 6745 * 3. Parameter verification failed. 6746 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6747 * @throws { BusinessError } 1300002 - This window state is abnormal. 6748 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6749 * @throws { BusinessError } 1300004 - Unauthorized operation. 6750 * @syscap SystemCapability.Window.SessionManager 6751 * @atomicservice 6752 * @since 15 6753 */ 6754 setExclusivelyHighlighted(exclusivelyHighlighted: boolean): Promise<void>; 6755 6756 /** 6757 * Sets whether keep screen on or not. 6758 * 6759 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6760 * @returns { Promise<void> } that returns no value. 6761 * @syscap SystemCapability.WindowManager.WindowManager.Core 6762 * @since 6 6763 * @deprecated since 9 6764 * @useinstead ohos.window.Window#setWindowKeepScreenOn 6765 */ 6766 setKeepScreenOn(isKeepScreenOn: boolean): Promise<void>; 6767 6768 /** 6769 * Sets whether keep screen on or not. 6770 * 6771 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6772 * @param { AsyncCallback<void> } callback Callback used to return the result. 6773 * @syscap SystemCapability.WindowManager.WindowManager.Core 6774 * @since 6 6775 * @deprecated since 9 6776 * @useinstead ohos.window.Window#setWindowKeepScreenOn 6777 */ 6778 setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void; 6779 6780 /** 6781 * Sets whether keep screen on or not. 6782 * 6783 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6784 * @returns { Promise<void> } Promise that returns no value. 6785 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6786 * 2. Incorrect parameter types. 6787 * @throws { BusinessError } 1300002 - This window state is abnormal. 6788 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6789 * @syscap SystemCapability.WindowManager.WindowManager.Core 6790 * @since 9 6791 */ 6792 /** 6793 * Sets whether keep screen on or not. 6794 * 6795 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6796 * @returns { Promise<void> } Promise that returns no value. 6797 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6798 * 2. Incorrect parameter types. 6799 * @throws { BusinessError } 1300002 - This window state is abnormal. 6800 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6801 * @syscap SystemCapability.WindowManager.WindowManager.Core 6802 * @crossplatform 6803 * @since 10 6804 */ 6805 /** 6806 * Sets whether keep screen on or not. 6807 * 6808 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6809 * @returns { Promise<void> } Promise that returns no value. 6810 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6811 * 2. Incorrect parameter types. 6812 * @throws { BusinessError } 1300002 - This window state is abnormal. 6813 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6814 * @syscap SystemCapability.WindowManager.WindowManager.Core 6815 * @crossplatform 6816 * @atomicservice 6817 * @since 11 6818 */ 6819 setWindowKeepScreenOn(isKeepScreenOn: boolean): Promise<void>; 6820 6821 /** 6822 * Sets whether keep screen on or not. 6823 * 6824 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6825 * @param { AsyncCallback<void> } callback Callback used to return the result. 6826 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6827 * 2. Incorrect parameter types. 6828 * @throws { BusinessError } 1300002 - This window state is abnormal. 6829 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6830 * @syscap SystemCapability.WindowManager.WindowManager.Core 6831 * @since 9 6832 */ 6833 /** 6834 * Sets whether keep screen on or not. 6835 * 6836 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6837 * @param { AsyncCallback<void> } callback Callback used to return the result. 6838 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6839 * 2. Incorrect parameter types. 6840 * @throws { BusinessError } 1300002 - This window state is abnormal. 6841 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6842 * @syscap SystemCapability.WindowManager.WindowManager.Core 6843 * @crossplatform 6844 * @since 10 6845 */ 6846 /** 6847 * Sets whether keep screen on or not. 6848 * 6849 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 6850 * @param { AsyncCallback<void> } callback Callback used to return the result. 6851 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6852 * 2. Incorrect parameter types. 6853 * @throws { BusinessError } 1300002 - This window state is abnormal. 6854 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6855 * @syscap SystemCapability.WindowManager.WindowManager.Core 6856 * @crossplatform 6857 * @atomicservice 6858 * @since 11 6859 */ 6860 setWindowKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void; 6861 6862 /** 6863 * Sets whether to wake up the screen when this ability is restored. 6864 * 6865 * @param { boolean } wakeUp Specifies whether to wake up the screen. True means to wake it up, false means not. 6866 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6867 * 2. Incorrect parameter types. 6868 * @throws { BusinessError } 1300002 - This window state is abnormal. 6869 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6870 * @syscap SystemCapability.WindowManager.WindowManager.Core 6871 * @systemapi Hide this for inner system use. 6872 * @since 9 6873 */ 6874 /** 6875 * Sets whether to wake up the screen when this ability is restored. 6876 * 6877 * @param { boolean } wakeUp Specifies whether to wake up the screen. True means to wake it up, false means not. 6878 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6879 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6880 * 2. Incorrect parameter types. 6881 * @throws { BusinessError } 1300002 - This window state is abnormal. 6882 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6883 * @syscap SystemCapability.WindowManager.WindowManager.Core 6884 * @systemapi Hide this for inner system use. 6885 * @since 12 6886 */ 6887 setWakeUpScreen(wakeUp: boolean): void; 6888 6889 /** 6890 * Sets whether outside can be touch or not. 6891 * 6892 * @param { boolean } touchable outside can be touch if true, or not if false. 6893 * @returns { Promise<void> } Promise that returns no value. 6894 * @syscap SystemCapability.WindowManager.WindowManager.Core 6895 * @since 7 6896 * @deprecated since 9 6897 */ 6898 setOutsideTouchable(touchable: boolean): Promise<void>; 6899 6900 /** 6901 * Sets whether outside can be touch or not. 6902 * 6903 * @param { boolean } touchable outside can be touch if true, or not if false. 6904 * @param { AsyncCallback<void> } callback Callback used to return the result. 6905 * @syscap SystemCapability.WindowManager.WindowManager.Core 6906 * @since 7 6907 * @deprecated since 9 6908 */ 6909 setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void; 6910 6911 /** 6912 * Sets whether is private mode or not. 6913 * 6914 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 6915 * @returns { Promise<void> } Promise that returns no value. 6916 * @syscap SystemCapability.WindowManager.WindowManager.Core 6917 * @since 7 6918 * @deprecated since 9 6919 * @useinstead ohos.window.Window#setWindowPrivacyMode 6920 */ 6921 setPrivacyMode(isPrivacyMode: boolean): Promise<void>; 6922 6923 /** 6924 * Sets whether is private mode or not. 6925 * 6926 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 6927 * @param { AsyncCallback<void> } callback Callback used to return the result. 6928 * @syscap SystemCapability.WindowManager.WindowManager.Core 6929 * @since 7 6930 * @deprecated since 9 6931 * @useinstead ohos.window.Window#setWindowPrivacyMode 6932 */ 6933 setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void; 6934 6935 /** 6936 * Sets whether is private mode or not. 6937 * 6938 * @permission ohos.permission.PRIVACY_WINDOW 6939 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 6940 * @returns { Promise<void> } Promise that returns no value. 6941 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 6942 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6943 * 2. Incorrect parameter types. 6944 * @throws { BusinessError } 1300002 - This window state is abnormal. 6945 * @syscap SystemCapability.WindowManager.WindowManager.Core 6946 * @since 9 6947 */ 6948 /** 6949 * Sets whether is private mode or not. 6950 * 6951 * @permission ohos.permission.PRIVACY_WINDOW 6952 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 6953 * @returns { Promise<void> } Promise that returns no value. 6954 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 6955 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6956 * 2. Incorrect parameter types. 6957 * @throws { BusinessError } 1300002 - This window state is abnormal. 6958 * @syscap SystemCapability.WindowManager.WindowManager.Core 6959 * @atomicservice 6960 * @since 12 6961 */ 6962 setWindowPrivacyMode(isPrivacyMode: boolean): Promise<void>; 6963 6964 /** 6965 * Sets whether is private mode or not. 6966 * 6967 * @permission ohos.permission.PRIVACY_WINDOW 6968 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 6969 * @param { AsyncCallback<void> } callback Callback used to return the result. 6970 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 6971 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6972 * 2. Incorrect parameter types. 6973 * @throws { BusinessError } 1300002 - This window state is abnormal. 6974 * @syscap SystemCapability.WindowManager.WindowManager.Core 6975 * @since 9 6976 */ 6977 /** 6978 * Sets whether is private mode or not. 6979 * 6980 * @permission ohos.permission.PRIVACY_WINDOW 6981 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 6982 * @param { AsyncCallback<void> } callback Callback used to return the result. 6983 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 6984 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6985 * 2. Incorrect parameter types. 6986 * @throws { BusinessError } 1300002 - This window state is abnormal. 6987 * @syscap SystemCapability.WindowManager.WindowManager.Core 6988 * @atomicservice 6989 * @since 12 6990 */ 6991 setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void; 6992 6993 /** 6994 * Ignore this window during screenshot. 6995 * 6996 * @param { boolean } isSkip skip if true, or not if false. 6997 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6998 * 2. Incorrect parameter types. 6999 * @throws { BusinessError } 1300002 - This window state is abnormal. 7000 * @syscap SystemCapability.WindowManager.WindowManager.Core 7001 * @systemapi Hide this for inner system use. 7002 * @since 9 7003 */ 7004 /** 7005 * Ignore this window during screenshot. 7006 * 7007 * @param { boolean } isSkip skip if true, or not if false. 7008 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7009 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7010 * 2. Incorrect parameter types. 7011 * @throws { BusinessError } 1300002 - This window state is abnormal. 7012 * @syscap SystemCapability.WindowManager.WindowManager.Core 7013 * @systemapi Hide this for inner system use. 7014 * @since 12 7015 */ 7016 setSnapshotSkip(isSkip: boolean): void; 7017 7018 /** 7019 * Sets whether is touchable or not. 7020 * 7021 * @param { boolean } isTouchable is touchable if true, or not if false. 7022 * @returns { Promise<void> } Promise that returns no value. 7023 * @syscap SystemCapability.WindowManager.WindowManager.Core 7024 * @since 7 7025 * @deprecated since 9 7026 * @useinstead ohos.window.Window#setWindowTouchable 7027 */ 7028 setTouchable(isTouchable: boolean): Promise<void>; 7029 7030 /** 7031 * Sets whether is touchable or not. 7032 * 7033 * @param { boolean } isTouchable is touchable if true, or not if false. 7034 * @param { AsyncCallback<void> } callback Callback used to return the result. 7035 * @syscap SystemCapability.WindowManager.WindowManager.Core 7036 * @since 7 7037 * @deprecated since 9 7038 * @useinstead ohos.window.Window#setWindowTouchable 7039 */ 7040 setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void; 7041 7042 /** 7043 * Sets whether is touchable or not. 7044 * 7045 * @param { boolean } isTouchable is touchable if true, or not if false. 7046 * @returns { Promise<void> } Promise that returns no value. 7047 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7048 * 2. Incorrect parameter types. 7049 * @throws { BusinessError } 1300002 - This window state is abnormal. 7050 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7051 * @syscap SystemCapability.WindowManager.WindowManager.Core 7052 * @since 9 7053 */ 7054 /** 7055 * Sets whether is touchable or not. 7056 * 7057 * @param { boolean } isTouchable is touchable if true, or not if false. 7058 * @returns { Promise<void> } Promise that returns no value. 7059 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7060 * 2. Incorrect parameter types. 7061 * @throws { BusinessError } 1300002 - This window state is abnormal. 7062 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7063 * @syscap SystemCapability.WindowManager.WindowManager.Core 7064 * @atomicservice 7065 * @since 12 7066 */ 7067 setWindowTouchable(isTouchable: boolean): Promise<void>; 7068 7069 /** 7070 * Sets whether is touchable or not. 7071 * 7072 * @param { boolean } isTouchable is touchable if true, or not if false. 7073 * @param { AsyncCallback<void> } callback Callback used to return the result. 7074 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7075 * 2. Incorrect parameter types. 7076 * @throws { BusinessError } 1300002 - This window state is abnormal. 7077 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7078 * @syscap SystemCapability.WindowManager.WindowManager.Core 7079 * @since 9 7080 */ 7081 /** 7082 * Sets whether is touchable or not. 7083 * 7084 * @param { boolean } isTouchable is touchable if true, or not if false. 7085 * @param { AsyncCallback<void> } callback Callback used to return the result. 7086 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7087 * 2. Incorrect parameter types. 7088 * @throws { BusinessError } 1300002 - This window state is abnormal. 7089 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7090 * @syscap SystemCapability.WindowManager.WindowManager.Core 7091 * @atomicservice 7092 * @since 12 7093 */ 7094 setWindowTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void; 7095 7096 /** 7097 * Set handwrite flag on the window. This flag means only response handwrite event. 7098 * 7099 * @param { boolean } enable - Add handwrite flag to window if true, or remove flag if false. 7100 * @returns { Promise<void> } - The promise returned by the function. 7101 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7102 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7103 * 2. Incorrect parameter types. 7104 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7105 * @throws { BusinessError } 1300002 - This window state is abnormal. 7106 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7107 * @syscap SystemCapability.Window.SessionManager 7108 * @systemapi Hide this for inner system use. 7109 * @since 12 7110 */ 7111 setHandwritingFlag(enable: boolean): Promise<void>; 7112 7113 /** 7114 * Sets the flag of the window is forbidden to move in split screen mode 7115 * 7116 * @param { boolean } isForbidSplitMove the flag of the window is forbidden to move in split screen mode 7117 * @param { AsyncCallback<void> } callback Callback used to return the result. 7118 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7119 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7120 * 2. Incorrect parameter types. 7121 * @throws { BusinessError } 1300002 - This window state is abnormal. 7122 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7123 * @syscap SystemCapability.WindowManager.WindowManager.Core 7124 * @systemapi 7125 * @since 9 7126 */ 7127 setForbidSplitMove(isForbidSplitMove: boolean, callback: AsyncCallback<void>): void; 7128 7129 /** 7130 * Sets the flag of the window is forbidden to move in split screen mode 7131 * 7132 * @param { boolean } isForbidSplitMove the flag of the window is forbidden to move in split screen mode 7133 * @returns { Promise<void> } Promise that returns no value. 7134 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7135 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7136 * 2. Incorrect parameter types. 7137 * @throws { BusinessError } 1300002 - This window state is abnormal. 7138 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7139 * @syscap SystemCapability.WindowManager.WindowManager.Core 7140 * @systemapi 7141 * @since 9 7142 */ 7143 setForbidSplitMove(isForbidSplitMove: boolean): Promise<void>; 7144 7145 /** 7146 * Obtains snapshot of window 7147 * 7148 * @param { AsyncCallback<image.PixelMap> } callback Callback used to return the result. 7149 * @throws { BusinessError } 1300002 - This window state is abnormal. 7150 * @syscap SystemCapability.WindowManager.WindowManager.Core 7151 * @since 9 7152 */ 7153 /** 7154 * Obtains snapshot of window 7155 * 7156 * @param { AsyncCallback<image.PixelMap> } callback Callback used to return the result. 7157 * @throws { BusinessError } 1300002 - This window state is abnormal. 7158 * @syscap SystemCapability.WindowManager.WindowManager.Core 7159 * @atomicservice 7160 * @since 12 7161 */ 7162 snapshot(callback: AsyncCallback<image.PixelMap>): void; 7163 7164 /** 7165 * Obtains snapshot of window 7166 * 7167 * @returns { Promise<image.PixelMap> } Promise that returns no value. 7168 * @throws { BusinessError } 1300002 - This window state is abnormal. 7169 * @syscap SystemCapability.WindowManager.WindowManager.Core 7170 * @since 9 7171 */ 7172 /** 7173 * Obtains snapshot of window 7174 * 7175 * @returns { Promise<image.PixelMap> } Promise that returns no value. 7176 * @throws { BusinessError } 1300002 - This window state is abnormal. 7177 * @syscap SystemCapability.WindowManager.WindowManager.Core 7178 * @atomicservice 7179 * @since 12 7180 */ 7181 snapshot(): Promise<image.PixelMap>; 7182 7183 /** 7184 * Sets opacity of window 7185 * 7186 * @param { number } opacity Interval is 0.f-1.f. 7187 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7188 * 2. Incorrect parameter types; 7189 * 3. Parameter verification failed. 7190 * @throws { BusinessError } 1300002 - This window state is abnormal. 7191 * @throws { BusinessError } 1300004 - Unauthorized operation. 7192 * @syscap SystemCapability.WindowManager.WindowManager.Core 7193 * @systemapi 7194 * @since 9 7195 */ 7196 /** 7197 * Sets opacity of window 7198 * 7199 * @param { number } opacity Interval is 0.f-1.f. 7200 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7201 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7202 * 2. Incorrect parameter types; 7203 * 3. Parameter verification failed. 7204 * @throws { BusinessError } 1300002 - This window state is abnormal. 7205 * @throws { BusinessError } 1300004 - Unauthorized operation. 7206 * @syscap SystemCapability.WindowManager.WindowManager.Core 7207 * @systemapi 7208 * @since 12 7209 */ 7210 opacity(opacity: number): void; 7211 7212 /** 7213 * Sets scale options of window. 7214 * 7215 * @param { ScaleOptions } scaleOptions scale param of window. 7216 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7217 * 2. Incorrect parameter types; 7218 * 3. Parameter verification failed. 7219 * @throws { BusinessError } 1300002 - This window state is abnormal. 7220 * @throws { BusinessError } 1300004 - Unauthorized operation. 7221 * @syscap SystemCapability.WindowManager.WindowManager.Core 7222 * @systemapi 7223 * @since 9 7224 */ 7225 /** 7226 * Sets scale options of window. 7227 * 7228 * @param { ScaleOptions } scaleOptions scale param of window. 7229 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7230 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7231 * 2. Incorrect parameter types; 7232 * 3. Parameter verification failed. 7233 * @throws { BusinessError } 1300002 - This window state is abnormal. 7234 * @throws { BusinessError } 1300004 - Unauthorized operation. 7235 * @syscap SystemCapability.WindowManager.WindowManager.Core 7236 * @systemapi 7237 * @since 12 7238 */ 7239 scale(scaleOptions: ScaleOptions): void; 7240 7241 /** 7242 * Sets rotate options of window. 7243 * 7244 * @param { RotateOptions } rotateOptions rotate param of window. 7245 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7246 * 2. Incorrect parameter types; 7247 * 3. Parameter verification failed. 7248 * @throws { BusinessError } 1300002 - This window state is abnormal. 7249 * @throws { BusinessError } 1300004 - Unauthorized operation. 7250 * @syscap SystemCapability.WindowManager.WindowManager.Core 7251 * @systemapi 7252 * @since 9 7253 */ 7254 /** 7255 * Sets rotate options of window. 7256 * 7257 * @param { RotateOptions } rotateOptions rotate param of window. 7258 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7259 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7260 * 2. Incorrect parameter types; 7261 * 3. Parameter verification failed. 7262 * @throws { BusinessError } 1300002 - This window state is abnormal. 7263 * @throws { BusinessError } 1300004 - Unauthorized operation. 7264 * @syscap SystemCapability.WindowManager.WindowManager.Core 7265 * @systemapi 7266 * @since 12 7267 */ 7268 rotate(rotateOptions: RotateOptions): void; 7269 7270 /** 7271 * Sets translate options of window. 7272 * 7273 * @param { TranslateOptions } translateOptions translate param of window. 7274 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7275 * 2. Incorrect parameter types; 7276 * 3. Parameter verification failed. 7277 * @throws { BusinessError } 1300002 - This window state is abnormal. 7278 * @throws { BusinessError } 1300004 - Unauthorized operation. 7279 * @syscap SystemCapability.WindowManager.WindowManager.Core 7280 * @systemapi 7281 * @since 9 7282 */ 7283 /** 7284 * Sets translate options of window. 7285 * 7286 * @param { TranslateOptions } translateOptions translate param of window. 7287 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7288 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7289 * 2. Incorrect parameter types; 7290 * 3. Parameter verification failed. 7291 * @throws { BusinessError } 1300002 - This window state is abnormal. 7292 * @throws { BusinessError } 1300004 - Unauthorized operation. 7293 * @syscap SystemCapability.WindowManager.WindowManager.Core 7294 * @systemapi 7295 * @since 12 7296 */ 7297 translate(translateOptions: TranslateOptions): void; 7298 7299 /** 7300 * Get Transition Controller. 7301 * 7302 * @returns { TransitionController } 7303 * @throws { BusinessError } 1300002 - This window state is abnormal. 7304 * @throws { BusinessError } 1300004 - Unauthorized operation. 7305 * @syscap SystemCapability.WindowManager.WindowManager.Core 7306 * @systemapi 7307 * @since 9 7308 */ 7309 /** 7310 * Get Transition Controller. 7311 * 7312 * @returns { TransitionController } 7313 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7314 * @throws { BusinessError } 1300002 - This window state is abnormal. 7315 * @throws { BusinessError } 1300004 - Unauthorized operation. 7316 * @syscap SystemCapability.WindowManager.WindowManager.Core 7317 * @systemapi 7318 * @since 12 7319 */ 7320 getTransitionController(): TransitionController; 7321 7322 /** 7323 * Sets the window blur radius. 7324 * 7325 * @param { number } radius the blur radius. 7326 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7327 * 2. Incorrect parameter types; 7328 * 3. Parameter verification failed. 7329 * @throws { BusinessError } 1300002 - This window state is abnormal. 7330 * @throws { BusinessError } 1300004 - Unauthorized operation. 7331 * @syscap SystemCapability.WindowManager.WindowManager.Core 7332 * @systemapi Hide this for inner system use. 7333 * @since 9 7334 */ 7335 /** 7336 * Sets the window blur radius. 7337 * 7338 * @param { number } radius the blur radius. 7339 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7340 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7341 * 2. Incorrect parameter types; 7342 * 3. Parameter verification failed. 7343 * @throws { BusinessError } 1300002 - This window state is abnormal. 7344 * @throws { BusinessError } 1300004 - Unauthorized operation. 7345 * @syscap SystemCapability.WindowManager.WindowManager.Core 7346 * @systemapi Hide this for inner system use. 7347 * @since 12 7348 */ 7349 setBlur(radius: number): void; 7350 7351 /** 7352 * Sets the window backdrop blur radius. 7353 * 7354 * @param { number } radius the blur radius. 7355 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7356 * 2. Incorrect parameter types; 7357 * 3. Parameter verification failed. 7358 * @throws { BusinessError } 1300002 - This window state is abnormal. 7359 * @throws { BusinessError } 1300004 - Unauthorized operation. 7360 * @syscap SystemCapability.WindowManager.WindowManager.Core 7361 * @systemapi Hide this for inner system use. 7362 * @since 9 7363 */ 7364 /** 7365 * Sets the window backdrop blur radius. 7366 * 7367 * @param { number } radius the blur radius. 7368 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7369 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7370 * 2. Incorrect parameter types; 7371 * 3. Parameter verification failed. 7372 * @throws { BusinessError } 1300002 - This window state is abnormal. 7373 * @throws { BusinessError } 1300004 - Unauthorized operation. 7374 * @syscap SystemCapability.WindowManager.WindowManager.Core 7375 * @systemapi Hide this for inner system use. 7376 * @since 12 7377 */ 7378 setBackdropBlur(radius: number): void; 7379 7380 /** 7381 * Sets the window backdrop blur style. 7382 * 7383 * @param { BlurStyle } blurStyle the specified blur style. 7384 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7385 * 2. Incorrect parameter types; 7386 * 3. Parameter verification failed. 7387 * @throws { BusinessError } 1300002 - This window state is abnormal. 7388 * @throws { BusinessError } 1300004 - Unauthorized operation. 7389 * @syscap SystemCapability.WindowManager.WindowManager.Core 7390 * @systemapi Hide this for inner system use. 7391 * @since 9 7392 */ 7393 /** 7394 * Sets the window backdrop blur style. 7395 * 7396 * @param { BlurStyle } blurStyle the specified blur style. 7397 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7398 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7399 * 2. Incorrect parameter types; 7400 * 3. Parameter verification failed. 7401 * @throws { BusinessError } 1300002 - This window state is abnormal. 7402 * @throws { BusinessError } 1300004 - Unauthorized operation. 7403 * @syscap SystemCapability.WindowManager.WindowManager.Core 7404 * @systemapi Hide this for inner system use. 7405 * @since 12 7406 */ 7407 setBackdropBlurStyle(blurStyle: BlurStyle): void; 7408 7409 /** 7410 * Sets shadow. 7411 * 7412 * @param { number } radius the radius of the shadow. 7413 * @param { string } color the color of the shadow. 7414 * @param { number } offsetX the offset of the shadow on the x-axis. 7415 * @param { number } offsetY the offset of the shadow on the y-axis. 7416 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7417 * 2. Incorrect parameter types; 7418 * 3. Parameter verification failed. 7419 * @throws { BusinessError } 1300002 - This window state is abnormal. 7420 * @throws { BusinessError } 1300004 - Unauthorized operation. 7421 * @syscap SystemCapability.WindowManager.WindowManager.Core 7422 * @systemapi Hide this for inner system use. 7423 * @since 9 7424 */ 7425 /** 7426 * Sets shadow. 7427 * 7428 * @param { number } radius the radius of the shadow. 7429 * @param { string } color the color of the shadow. 7430 * @param { number } offsetX the offset of the shadow on the x-axis. 7431 * @param { number } offsetY the offset of the shadow on the y-axis. 7432 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7433 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7434 * 2. Incorrect parameter types; 7435 * 3. Parameter verification failed. 7436 * @throws { BusinessError } 1300002 - This window state is abnormal. 7437 * @throws { BusinessError } 1300004 - Unauthorized operation. 7438 * @syscap SystemCapability.WindowManager.WindowManager.Core 7439 * @systemapi Hide this for inner system use. 7440 * @since 12 7441 */ 7442 setShadow(radius: number, color?: string, offsetX?: number, offsetY?: number): void; 7443 7444 /** 7445 * Sets corner radius. 7446 * 7447 * @param { number } cornerRadius the corner radius. 7448 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7449 * 2. Incorrect parameter types; 7450 * 3. Parameter verification failed. 7451 * @throws { BusinessError } 1300002 - This window state is abnormal. 7452 * @throws { BusinessError } 1300004 - Unauthorized operation. 7453 * @syscap SystemCapability.WindowManager.WindowManager.Core 7454 * @systemapi Hide this for inner system use. 7455 * @since 9 7456 */ 7457 /** 7458 * Sets corner radius. 7459 * 7460 * @param { number } cornerRadius the corner radius. 7461 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7462 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7463 * 2. Incorrect parameter types; 7464 * 3. Parameter verification failed. 7465 * @throws { BusinessError } 1300002 - This window state is abnormal. 7466 * @throws { BusinessError } 1300004 - Unauthorized operation. 7467 * @syscap SystemCapability.WindowManager.WindowManager.Core 7468 * @systemapi Hide this for inner system use. 7469 * @since 12 7470 */ 7471 setCornerRadius(cornerRadius: number): void; 7472 7473 /** 7474 * Raise app sub window to app top 7475 * 7476 * @param { AsyncCallback<void> } callback - The callback of raiseToAppTop 7477 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7478 * @throws { BusinessError } 1300002 - This window state is abnormal. 7479 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7480 * @throws { BusinessError } 1300004 - Unauthorized operation. 7481 * @throws { BusinessError } 1300009 - The parent window is invalid. 7482 * @syscap SystemCapability.WindowManager.WindowManager.Core 7483 * @systemapi Hide this for inner system use. 7484 * @since 10 7485 */ 7486 raiseToAppTop(callback: AsyncCallback<void>): void; 7487 7488 /** 7489 * Raise app sub window to app top 7490 * 7491 * @returns { Promise<void> } - The promise returned by the function 7492 * @throws { BusinessError } 1300002 - This window state is abnormal. 7493 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7494 * @throws { BusinessError } 1300004 - Unauthorized operation. 7495 * @throws { BusinessError } 1300009 - The parent window is invalid. 7496 * @syscap SystemCapability.WindowManager.WindowManager.Core 7497 * @since 14 7498 */ 7499 raiseToAppTop(): Promise<void>; 7500 7501 /** 7502 * Sets the aspect ratio of window 7503 * 7504 * @param { number } ratio - The aspect ratio of window except decoration 7505 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 7506 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7507 * 2. Incorrect parameter types; 7508 * 3. Parameter verification failed. 7509 * @throws { BusinessError } 1300002 - This window state is abnormal. 7510 * @throws { BusinessError } 1300004 - Unauthorized operation. 7511 * @syscap SystemCapability.WindowManager.WindowManager.Core 7512 * @since 10 7513 */ 7514 /** 7515 * Sets the aspect ratio of window 7516 * 7517 * @param { number } ratio - The aspect ratio of window except decoration 7518 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 7519 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7520 * 2. Incorrect parameter types; 7521 * 3. Parameter verification failed. 7522 * @throws { BusinessError } 1300002 - This window state is abnormal. 7523 * @throws { BusinessError } 1300004 - Unauthorized operation. 7524 * @syscap SystemCapability.WindowManager.WindowManager.Core 7525 * @atomicservice 7526 * @since 12 7527 */ 7528 setAspectRatio(ratio: number, callback: AsyncCallback<void>): void; 7529 7530 /** 7531 * Sets the aspect ratio of window 7532 * 7533 * @param { number } ratio - The aspect ratio of window except decoration 7534 * @returns { Promise<void> } - The promise returned by the function. 7535 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7536 * 2. Incorrect parameter types; 7537 * 3. Parameter verification failed. 7538 * @throws { BusinessError } 1300002 - This window state is abnormal. 7539 * @throws { BusinessError } 1300004 - Unauthorized operation. 7540 * @syscap SystemCapability.WindowManager.WindowManager.Core 7541 * @since 10 7542 */ 7543 /** 7544 * Sets the aspect ratio of window 7545 * 7546 * @param { number } ratio - The aspect ratio of window except decoration 7547 * @returns { Promise<void> } - The promise returned by the function. 7548 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7549 * 2. Incorrect parameter types; 7550 * 3. Parameter verification failed. 7551 * @throws { BusinessError } 1300002 - This window state is abnormal. 7552 * @throws { BusinessError } 1300004 - Unauthorized operation. 7553 * @syscap SystemCapability.WindowManager.WindowManager.Core 7554 * @atomicservice 7555 * @since 12 7556 */ 7557 setAspectRatio(ratio: number): Promise<void>; 7558 7559 /** 7560 * Resets the aspect ratio of window 7561 * 7562 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 7563 * @throws { BusinessError } 1300002 - This window state is abnormal. 7564 * @throws { BusinessError } 1300004 - Unauthorized operation. 7565 * @syscap SystemCapability.WindowManager.WindowManager.Core 7566 * @since 10 7567 */ 7568 /** 7569 * Resets the aspect ratio of window 7570 * 7571 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 7572 * @throws { BusinessError } 1300002 - This window state is abnormal. 7573 * @throws { BusinessError } 1300004 - Unauthorized operation. 7574 * @syscap SystemCapability.WindowManager.WindowManager.Core 7575 * @atomicservice 7576 * @since 12 7577 */ 7578 resetAspectRatio(callback: AsyncCallback<void>): void; 7579 7580 /** 7581 * Resets the aspect ratio of window 7582 * 7583 * @returns { Promise<void> } - The promise returned by the function. 7584 * @throws { BusinessError } 1300002 - This window state is abnormal. 7585 * @throws { BusinessError } 1300004 - Unauthorized operation. 7586 * @syscap SystemCapability.WindowManager.WindowManager.Core 7587 * @since 10 7588 */ 7589 /** 7590 * Resets the aspect ratio of window 7591 * 7592 * @returns { Promise<void> } - The promise returned by the function. 7593 * @throws { BusinessError } 1300002 - This window state is abnormal. 7594 * @throws { BusinessError } 1300004 - Unauthorized operation. 7595 * @syscap SystemCapability.WindowManager.WindowManager.Core 7596 * @atomicservice 7597 * @since 12 7598 */ 7599 resetAspectRatio(): Promise<void>; 7600 7601 /** 7602 * Set the watermark flag on the window. 7603 * 7604 * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false. 7605 * @param { AsyncCallback<void> } callback - The callback of setWaterMarkFlag. 7606 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 7607 * <br>2. Incorrect parameter types. 7608 * @throws { BusinessError } 1300002 - This window state is abnormal. 7609 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7610 * @throws { BusinessError } 1300008 - The display device is abnormal. 7611 * @syscap SystemCapability.WindowManager.WindowManager.Core 7612 * @systemapi Hide this for inner system use. 7613 * @since 10 7614 */ 7615 /** 7616 * Set the watermark flag on the window. 7617 * 7618 * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false. 7619 * @param { AsyncCallback<void> } callback - The callback of setWaterMarkFlag. 7620 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7621 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 7622 * <br>2. Incorrect parameter types. 7623 * @throws { BusinessError } 1300002 - This window state is abnormal. 7624 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7625 * @throws { BusinessError } 1300008 - The display device is abnormal. 7626 * @syscap SystemCapability.WindowManager.WindowManager.Core 7627 * @systemapi Hide this for inner system use. 7628 * @since 12 7629 */ 7630 setWaterMarkFlag(enable: boolean, callback: AsyncCallback<void>): void; 7631 7632 /** 7633 * Set the watermark flag on the window 7634 * 7635 * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false 7636 * @returns { Promise<void> } - The promise returned by the function 7637 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 7638 * <br>2. Incorrect parameter types. 7639 * @throws { BusinessError } 1300002 - This window state is abnormal. 7640 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7641 * @throws { BusinessError } 1300008 - The display device is abnormal. 7642 * @syscap SystemCapability.WindowManager.WindowManager.Core 7643 * @systemapi Hide this for inner system use. 7644 * @since 10 7645 */ 7646 /** 7647 * Set the watermark flag on the window 7648 * 7649 * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false 7650 * @returns { Promise<void> } - The promise returned by the function 7651 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7652 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 7653 * <br>2. Incorrect parameter types. 7654 * @throws { BusinessError } 1300002 - This window state is abnormal. 7655 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7656 * @throws { BusinessError } 1300008 - The display device is abnormal. 7657 * @syscap SystemCapability.WindowManager.WindowManager.Core 7658 * @systemapi Hide this for inner system use. 7659 * @since 12 7660 */ 7661 setWaterMarkFlag(enable: boolean): Promise<void>; 7662 7663 /** 7664 * Raise one app sub window above another. 7665 * 7666 * @param { number } windowId - Indicates target window id. 7667 * @param { AsyncCallback<void> } callback - The callback of raiseAboveTarget. 7668 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7669 * @throws { BusinessError } 401 - Parameter error. Possible cause: Mandatory parameters are left unspecified. 7670 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7671 * @throws { BusinessError } 1300002 - This window state is abnormal. 7672 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7673 * @throws { BusinessError } 1300004 - Unauthorized operation. 7674 * @throws { BusinessError } 1300009 - The parent window is invalid. 7675 * @syscap SystemCapability.Window.SessionManager 7676 * @systemapi Hide this for inner system use. 7677 * @since 10 7678 */ 7679 raiseAboveTarget(windowId: number, callback: AsyncCallback<void>): void; 7680 7681 /** 7682 * Raise one app sub window above another. 7683 * 7684 * @param { number } windowId - Indicates target window id. 7685 * @returns { Promise<void> } - The promise returned by the function. 7686 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7687 * @throws { BusinessError } 401 - Parameter error. Possible cause: Mandatory parameters are left unspecified. 7688 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7689 * @throws { BusinessError } 1300002 - This window state is abnormal. 7690 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7691 * @throws { BusinessError } 1300004 - Unauthorized operation. 7692 * @throws { BusinessError } 1300009 - The parent window is invalid. 7693 * @syscap SystemCapability.Window.SessionManager 7694 * @systemapi Hide this for inner system use. 7695 * @since 10 7696 */ 7697 raiseAboveTarget(windowId: number): Promise<void>; 7698 7699 /** 7700 * Set whether to enable an app sub window to raise itself by click. 7701 * 7702 * @param { boolean } enable - Disable app sub window to raise itself by by click if false. 7703 * @param { AsyncCallback<void> } callback - The callback of setRaiseByClickEnabled. 7704 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7705 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7706 * 2. Incorrect parameter types. 7707 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7708 * @throws { BusinessError } 1300002 - This window state is abnormal. 7709 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7710 * @throws { BusinessError } 1300004 - Unauthorized operation. 7711 * @throws { BusinessError } 1300009 - The parent window is invalid. 7712 * @syscap SystemCapability.Window.SessionManager 7713 * @systemapi Hide this for inner system use. 7714 * @since 10 7715 */ 7716 setRaiseByClickEnabled(enable: boolean, callback: AsyncCallback<void>): void; 7717 7718 /** 7719 * Set whether to enable an app sub window to raise itself by click. 7720 * 7721 * @param { boolean } enable - Disable app sub window to raise itself by by click if false. 7722 * @returns { Promise<void> } - The promise returned by the function. 7723 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7724 * 2. Incorrect parameter types. 7725 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7726 * @throws { BusinessError } 1300002 - This window state is abnormal. 7727 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7728 * @throws { BusinessError } 1300004 - Unauthorized operation. 7729 * @throws { BusinessError } 1300009 - The parent window is invalid. 7730 * @syscap SystemCapability.Window.SessionManager 7731 * @since 14 7732 */ 7733 setRaiseByClickEnabled(enable: boolean): Promise<void>; 7734 7735 /** 7736 * Minimize app main window and hide app subWindow. 7737 * 7738 * @param { AsyncCallback<void> } callback - The callback of Minimize. 7739 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7740 * @throws { BusinessError } 1300002 - This window state is abnormal. 7741 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7742 * @syscap SystemCapability.Window.SessionManager 7743 * @since 11 7744 */ 7745 /** 7746 * Minimize app main window and hide app subWindow. 7747 * 7748 * @param { AsyncCallback<void> } callback - The callback of Minimize. 7749 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7750 * @throws { BusinessError } 1300002 - This window state is abnormal. 7751 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7752 * @syscap SystemCapability.Window.SessionManager 7753 * @atomicservice 7754 * @since 12 7755 */ 7756 minimize(callback: AsyncCallback<void>): void; 7757 7758 /** 7759 * Minimize app main window and hide app subWindow. 7760 * 7761 * @returns { Promise<void> } - The promise returned by the function. 7762 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7763 * @throws { BusinessError } 1300002 - This window state is abnormal. 7764 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7765 * @syscap SystemCapability.Window.SessionManager 7766 * @since 11 7767 */ 7768 /** 7769 * Minimize app main window and hide app subWindow. 7770 * 7771 * @returns { Promise<void> } - The promise returned by the function. 7772 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7773 * @throws { BusinessError } 1300002 - This window state is abnormal. 7774 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7775 * @syscap SystemCapability.Window.SessionManager 7776 * @atomicservice 7777 * @since 12 7778 */ 7779 minimize(): Promise<void>; 7780 7781 /** 7782 * Maximize app main window. 7783 * @param { MaximizePresentation } presentation - set window presentation when maximize. 7784 * @returns { Promise<void> } - The promise returned by the function. 7785 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7786 * @throws { BusinessError } 1300002 - This window state is abnormal. 7787 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7788 * @throws { BusinessError } 1300004 - Unauthorized operation. 7789 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7790 * @syscap SystemCapability.Window.SessionManager 7791 * @atomicservice 7792 * @since 12 7793 */ 7794 maximize(presentation?: MaximizePresentation): Promise<void>; 7795 7796 /** 7797 * Set whether to enable a window to resize by drag. 7798 * 7799 * @param { boolean } enable - Disable window to resize by drag if false. 7800 * @param { AsyncCallback<void> } callback - The callback of setResizeByDragEnabled. 7801 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7802 * 2. Incorrect parameter types. 7803 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7804 * @throws { BusinessError } 1300002 - This window state is abnormal. 7805 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7806 * @syscap SystemCapability.Window.SessionManager 7807 * @atomicservice 7808 * @since 14 7809 */ 7810 setResizeByDragEnabled(enable: boolean, callback: AsyncCallback<void>): void; 7811 7812 /** 7813 * Set whether to enable a window to resize by drag. 7814 * 7815 * @param { boolean } enable - Disable window to resize by drag if false. 7816 * @returns { Promise<void> } - The promise returned by the function. 7817 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7818 * 2. Incorrect parameter types. 7819 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7820 * @throws { BusinessError } 1300002 - This window state is abnormal. 7821 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7822 * @syscap SystemCapability.Window.SessionManager 7823 * @atomicservice 7824 * @since 14 7825 */ 7826 setResizeByDragEnabled(enable: boolean): Promise<void>; 7827 7828 /** 7829 * Hide the non-system floating windows. 7830 * 7831 * @param { boolean } shouldHide - Hide the non-system floating windows if true, otherwise means the opposite. 7832 * @param { AsyncCallback<void> } callback - The callback of hideNonSystemFloatingWindows. 7833 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7834 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7835 * 2. Incorrect parameter types. 7836 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7837 * @throws { BusinessError } 1300002 - This window state is abnormal. 7838 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7839 * @throws { BusinessError } 1300004 - Unauthorized operation. 7840 * @syscap SystemCapability.Window.SessionManager 7841 * @systemapi Hide this for inner system use. 7842 * @since 11 7843 */ 7844 hideNonSystemFloatingWindows(shouldHide: boolean, callback: AsyncCallback<void>): void; 7845 7846 /** 7847 * Hide the non-system floating windows. 7848 * 7849 * @param { boolean } shouldHide - Hide the non-system floating windows if true, otherwise means the opposite. 7850 * @returns { Promise<void> } - The promise returned by the function. 7851 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7852 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7853 * 2. Incorrect parameter types. 7854 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7855 * @throws { BusinessError } 1300002 - This window state is abnormal. 7856 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7857 * @throws { BusinessError } 1300004 - Unauthorized operation. 7858 * @syscap SystemCapability.Window.SessionManager 7859 * @systemapi Hide this for inner system use. 7860 * @since 11 7861 */ 7862 hideNonSystemFloatingWindows(shouldHide: boolean): Promise<void>; 7863 7864 /** 7865 * Get the window limits of current window. 7866 * 7867 * @returns { WindowLimits } - The limits of window. 7868 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7869 * @throws { BusinessError } 1300002 - This window state is abnormal. 7870 * @syscap SystemCapability.Window.SessionManager 7871 * @since 11 7872 */ 7873 /** 7874 * Get the window limits of current window. 7875 * 7876 * @returns { WindowLimits } - The limits of window. 7877 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7878 * @throws { BusinessError } 1300002 - This window state is abnormal. 7879 * @syscap SystemCapability.Window.SessionManager 7880 * @atomicservice 7881 * @since 12 7882 */ 7883 getWindowLimits(): WindowLimits; 7884 7885 /** 7886 * Set the window limits of a window. 7887 * 7888 * @param { WindowLimits } windowLimits - window limits of the window. 7889 * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window. 7890 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7891 * 2. Incorrect parameter types; 7892 * 3. Parameter verification failed. 7893 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7894 * @throws { BusinessError } 1300002 - This window state is abnormal. 7895 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7896 * @throws { BusinessError } 1300004 - Unauthorized operation. 7897 * @syscap SystemCapability.Window.SessionManager 7898 * @since 11 7899 */ 7900 /** 7901 * Set the window limits of a window. 7902 * 7903 * @param { WindowLimits } windowLimits - window limits of the window. 7904 * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window. 7905 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7906 * 2. Incorrect parameter types; 7907 * 3. Parameter verification failed. 7908 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7909 * @throws { BusinessError } 1300002 - This window state is abnormal. 7910 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7911 * @throws { BusinessError } 1300004 - Unauthorized operation. 7912 * @syscap SystemCapability.Window.SessionManager 7913 * @atomicservice 7914 * @since 12 7915 */ 7916 setWindowLimits(windowLimits: WindowLimits): Promise<WindowLimits>; 7917 7918 /** 7919 * Set the window limits of a window. 7920 * 7921 * @param { WindowLimits } windowLimits - Window limits of the window. 7922 * @param { boolean } isForcible - Ignore system limits. 7923 * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window. 7924 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7925 * 2. Incorrect parameter types; 7926 * 3. Parameter verification failed. 7927 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7928 * @throws { BusinessError } 1300002 - This window state is abnormal. 7929 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7930 * @throws { BusinessError } 1300004 - Unauthorized operation. 7931 * @syscap SystemCapability.Window.SessionManager 7932 * @atomicservice 7933 * @since 15 7934 */ 7935 setWindowLimits(windowLimits: WindowLimits, isForcible: boolean): Promise<WindowLimits>; 7936 7937 /** 7938 * Set whether to enable the single frame composer. 7939 * 7940 * @param { boolean } enable - Enable the single frame composer if true, otherwise means the opposite. 7941 * @returns { Promise<void> } - The promise returned by the function. 7942 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 7943 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7944 * 2. Incorrect parameter types. 7945 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7946 * @throws { BusinessError } 1300002 - This window state is abnormal. 7947 * @syscap SystemCapability.Window.SessionManager 7948 * @systemapi Hide this for inner system use. 7949 * @since 11 7950 */ 7951 setSingleFrameComposerEnabled(enable: boolean): Promise<void>; 7952 7953 /** 7954 * When get focused, keep the keyboard created by other windows, support system window and app subwindow. 7955 * 7956 * @param { boolean } keepKeyboardFlag - keep the keyboard if true, otherwise means the opposite. 7957 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7958 * 2. Incorrect parameter types. 7959 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7960 * @throws { BusinessError } 1300002 - This window state is abnormal. 7961 * @throws { BusinessError } 1300004 - Unauthorized operation. 7962 * @syscap SystemCapability.Window.SessionManager 7963 * @since 11 7964 */ 7965 /** 7966 * When get focused, keep the keyboard created by other windows, support system window and app subwindow. 7967 * 7968 * @param { boolean } keepKeyboardFlag - keep the keyboard if true, otherwise means the opposite. 7969 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7970 * 2. Incorrect parameter types. 7971 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7972 * @throws { BusinessError } 1300002 - This window state is abnormal. 7973 * @throws { BusinessError } 1300004 - Unauthorized operation. 7974 * @syscap SystemCapability.Window.SessionManager 7975 * @atomicservice 7976 * @since 12 7977 */ 7978 keepKeyboardOnFocus(keepKeyboardFlag: boolean): void; 7979 7980 /** 7981 * Recover app main window. 7982 * 7983 * @returns { Promise<void> } - The promise returned by the function. 7984 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7985 * @throws { BusinessError } 1300001 - Repeated operation. 7986 * @throws { BusinessError } 1300002 - This window state is abnormal. 7987 * @syscap SystemCapability.Window.SessionManager 7988 * @since 11 7989 */ 7990 /** 7991 * Recover app main window. 7992 * 7993 * @returns { Promise<void> } - The promise returned by the function. 7994 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7995 * @throws { BusinessError } 1300001 - Repeated operation. 7996 * @throws { BusinessError } 1300002 - This window state is abnormal. 7997 * @syscap SystemCapability.Window.SessionManager 7998 * @atomicservice 7999 * @since 12 8000 */ 8001 recover(): Promise<void>; 8002 8003 /** 8004 * After the app main window is minimized, if the Ability is not in the background state, you can restore app main window. 8005 * 8006 * @returns { Promise<void> } - The promise returned by the function. 8007 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8008 * @throws { BusinessError } 1300002 - This window state is abnormal. 8009 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8010 * @throws { BusinessError } 1300004 - Unauthorized operation. 8011 * @syscap SystemCapability.Window.SessionManager 8012 * @atomicservice 8013 * @since 14 8014 */ 8015 restore(): Promise<void>; 8016 8017 /** 8018 * Set the visibility of the window decor. 8019 * 8020 * @param { boolean } - Enable the decor visible if true, otherwise means the opposite. 8021 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8022 * 2. Incorrect parameter types. 8023 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8024 * @throws { BusinessError } 1300002 - This window state is abnormal. 8025 * @throws { BusinessError } 1300004 - Unauthorized operation. 8026 * @syscap SystemCapability.Window.SessionManager 8027 * @since 11 8028 */ 8029 /** 8030 * Set the visibility of the window decor. 8031 * 8032 * @param { boolean } isVisible - Enable the decor visible if true, otherwise means the opposite. 8033 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8034 * 2. Incorrect parameter types. 8035 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8036 * @throws { BusinessError } 1300002 - This window state is abnormal. 8037 * @throws { BusinessError } 1300004 - Unauthorized operation. 8038 * @syscap SystemCapability.Window.SessionManager 8039 * @atomicservice 8040 * @since 12 8041 */ 8042 setWindowDecorVisible(isVisible: boolean): void; 8043 8044 /** 8045 * Set whether window can be moved by drag title. 8046 * 8047 * @param { boolean } enabled - Enable the window title move if true, otherwise means the opposite. 8048 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8049 * 2. Incorrect parameter types. 8050 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8051 * @throws { BusinessError } 1300002 - This window state is abnormal. 8052 * @throws { BusinessError } 1300004 - Unauthorized operation. 8053 * @syscap SystemCapability.Window.SessionManager 8054 * @atomicservice 8055 * @since 14 8056 */ 8057 setWindowTitleMoveEnabled(enabled: boolean): void; 8058 8059 /** 8060 * Set the title bar name of the window 8061 * 8062 * @param { string } titleName - The name of the title bar that needs to be set 8063 * @returns { Promise<void> } Promise that returns no value. 8064 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8065 * 2. Incorrect parameter types. 8066 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8067 * @throws { BusinessError } 1300002 - This window state is abnormal. 8068 * @syscap SystemCapability.Window.SessionManager 8069 * @atomicservice 8070 * @since 15 8071 */ 8072 setWindowTitle(titleName: string): Promise<void>; 8073 8074 /** 8075 * Set the modality of the window. 8076 * 8077 * @param { boolean } isModal - Enable the window modal if true, otherwise means the opposite. 8078 * @returns { Promise<void> } Promise that returns no value. 8079 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8080 * 2. Incorrect parameter types. 8081 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8082 * @throws { BusinessError } 1300002 - This window state is abnormal. 8083 * @throws { BusinessError } 1300004 - Unauthorized operation. 8084 * @syscap SystemCapability.Window.SessionManager 8085 * @atomicservice 8086 * @since 12 8087 */ 8088 setSubWindowModal(isModal: boolean): Promise<void>; 8089 8090 /** 8091 * Set the modality of the window. 8092 * 8093 * @param { boolean } isModal - Enable the window modal if true, otherwise means the opposite. 8094 * @param { ModalityType } modalityType - Set modality type when the window modal is true. 8095 * @returns { Promise<void> } Promise that returns no value. 8096 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8097 * 2. Incorrect parameter types. 8098 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8099 * @throws { BusinessError } 1300002 - This window state is abnormal. 8100 * @throws { BusinessError } 1300004 - Unauthorized operation. 8101 * @syscap SystemCapability.Window.SessionManager 8102 * @atomicservice 8103 * @since 14 8104 */ 8105 setSubWindowModal(isModal: boolean, modalityType: ModalityType): Promise<void>; 8106 8107 /** 8108 * Set the height of the window decor. 8109 * 8110 * @param { number } - The height of window decor. 8111 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8112 * 2. Incorrect parameter types; 8113 * 3. Parameter verification failed. 8114 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8115 * @throws { BusinessError } 1300002 - This window state is abnormal. 8116 * @syscap SystemCapability.Window.SessionManager 8117 * @since 11 8118 */ 8119 /** 8120 * Set the height of the window decor. 8121 * 8122 * @param { number } height - The height of window decor. 8123 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8124 * 2. Incorrect parameter types; 8125 * 3. Parameter verification failed. 8126 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8127 * @throws { BusinessError } 1300002 - This window state is abnormal. 8128 * @syscap SystemCapability.Window.SessionManager 8129 * @atomicservice 8130 * @since 12 8131 */ 8132 setWindowDecorHeight(height: number): void; 8133 8134 /** 8135 * Get the height of the window decor. 8136 * 8137 * @returns { number } - The height of window decor. 8138 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8139 * @throws { BusinessError } 1300002 - This window state is abnormal. 8140 * @syscap SystemCapability.Window.SessionManager 8141 * @since 11 8142 */ 8143 /** 8144 * Get the height of the window decor. 8145 * 8146 * @returns { number } - The height of window decor. 8147 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8148 * @throws { BusinessError } 1300002 - This window state is abnormal. 8149 * @syscap SystemCapability.Window.SessionManager 8150 * @atomicservice 8151 * @since 12 8152 */ 8153 getWindowDecorHeight(): number; 8154 8155 /** 8156 * Set the style of the window decor. 8157 * 8158 * @param { DecorButtonStyle } dectorStyle - The style of window decor. 8159 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8160 * 2. Incorrect parameter types; 8161 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8162 * @throws { BusinessError } 1300002 - This window state is abnormal. 8163 * @throws { BusinessError } 1300004 - Unauthorized operation. 8164 * @syscap SystemCapability.Window.SessionManager 8165 * @atomicservice 8166 * @since 14 8167 */ 8168 setDecorButtonStyle(dectorStyle: DecorButtonStyle): void; 8169 8170 /** 8171 * Get the style of the window decor. 8172 * 8173 * @returns { DecorButtonStyle } - The style of window decor. 8174 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8175 * @throws { BusinessError } 1300002 - This window state is abnormal. 8176 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8177 * @throws { BusinessError } 1300004 - Unauthorized operation. 8178 * @syscap SystemCapability.Window.SessionManager 8179 * @atomicservice 8180 * @since 14 8181 */ 8182 getDecorButtonStyle(): DecorButtonStyle; 8183 8184 /** 8185 * Set touchable areas. By default, the entire window area is touchable. 8186 * If touchable areas are set in the window, touch events outside the areas will be transparent transmitted. 8187 * If the window area changes, you need to reset it. 8188 * 8189 * @param { Array<Rect> } rects - Touchable areas. The maximum size cannot exceed 10, touchable area cannot exceed the window's area. 8190 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 8191 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8192 * 2. Incorrect parameter types. 8193 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8194 * @throws { BusinessError } 1300002 - This window state is abnormal. 8195 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8196 * @syscap SystemCapability.Window.SessionManager 8197 * @systemapi 8198 * @since 12 8199 */ 8200 setTouchableAreas(rects: Array<Rect>): void; 8201 8202 /** 8203 * Get the area of window title buttons. 8204 * 8205 * @returns { TitleButtonRect } - The area of window title buttons. 8206 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8207 * @throws { BusinessError } 1300002 - This window state is abnormal. 8208 * @syscap SystemCapability.Window.SessionManager 8209 * @since 11 8210 */ 8211 /** 8212 * Get the area of window title buttons. 8213 * 8214 * @returns { TitleButtonRect } - The area of window title buttons. 8215 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8216 * @throws { BusinessError } 1300002 - This window state is abnormal. 8217 * @syscap SystemCapability.Window.SessionManager 8218 * @atomicservice 8219 * @since 12 8220 */ 8221 getTitleButtonRect(): TitleButtonRect; 8222 8223 /** 8224 * Set whether to display the maximize, minimize, split buttons of main window. 8225 * 8226 * @param { boolean } isMaximizeVisible - Display maximize button if true, or hide maximize button if false. 8227 * @param { boolean } isMinimizeVisible - Display minimize button if true, or hide minimize button if false. 8228 * @param { boolean } isSplitVisible - Display split button if true, or hide split button if false. 8229 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 8230 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8231 * 2. Incorrect parameter types. 8232 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8233 * @throws { BusinessError } 1300002 - This window state is abnormal. 8234 * @throws { BusinessError } 1300004 - Unauthorized operation. 8235 * @syscap SystemCapability.Window.SessionManager 8236 * @systemapi Hide this for inner system use. 8237 * @since 12 8238 */ 8239 setTitleButtonVisible(isMaximizeVisible: boolean, isMinimizeVisible: boolean, isSplitVisible: boolean): void; 8240 8241 /** 8242 * Set whether to display the maximize, minimize, close buttons of main window. 8243 * 8244 * @param { boolean } isMaximizeButtonVisible - Display maximize button if true, or hide maximize button if false. 8245 * @param { boolean } isMinimizeButtonVisible - Display minimize button if true, or hide minimize button if false. 8246 * @param { boolean } isCloseButtonVisible - Display close button if true, or hide close button if false. 8247 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8248 * 2. Incorrect parameter types. 8249 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8250 * @throws { BusinessError } 1300002 - This window state is abnormal. 8251 * @throws { BusinessError } 1300004 - Unauthorized operation. 8252 * @syscap SystemCapability.Window.SessionManager 8253 * @atomicservice 8254 * @since 14 8255 */ 8256 setWindowTitleButtonVisible(isMaximizeButtonVisible: boolean, isMinimizeButtonVisible: boolean, isCloseButtonVisible?: boolean): void; 8257 8258 /** 8259 * Enable landscape multiWindow 8260 * 8261 * @returns { Promise<void> } Promise that returns no value. 8262 * @throws {BusinessError} 1300002 - This window state is abnormal. 8263 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 8264 * @syscap SystemCapability.Window.SessionManager 8265 * @atomicservice 8266 * @since 12 8267 */ 8268 enableLandscapeMultiWindow(): Promise<void>; 8269 8270 /** 8271 * Start moving window. 8272 * 8273 * @returns { Promise<void> } Promise that returns no value. 8274 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8275 * @throws { BusinessError } 1300001 - Repeated operation. 8276 * @throws { BusinessError } 1300002 - This window state is abnormal. 8277 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8278 * @throws { BusinessError } 1300004 - Unauthorized operation. 8279 * @syscap SystemCapability.Window.SessionManager 8280 * @atomicservice 8281 * @since 14 8282 */ 8283 startMoving(): Promise<void>; 8284 8285 /** 8286 * Start moving window. 8287 * 8288 * @param { number } offsetX - Expected pointer position x-axis offset in window when start moving. 8289 * @param { number } offsetY - Expected pointer position y-axis offset in window when start moving. 8290 * @returns { Promise<void> } Promise that returns no value. 8291 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8292 * 2. Incorrect parameter types; 8293 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8294 * @throws { BusinessError } 1300001 - Repeated operation. 8295 * @throws { BusinessError } 1300002 - This window state is abnormal. 8296 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8297 * @throws { BusinessError } 1300004 - Unauthorized operation. 8298 * @syscap SystemCapability.Window.SessionManager 8299 * @atomicservice 8300 * @since 15 8301 */ 8302 startMoving(offsetX: number, offsetY: number): Promise<void>; 8303 8304 /** 8305 * Stop moving window. 8306 * 8307 * @returns { Promise<void> } Promise that returns no value. 8308 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8309 * @throws { BusinessError } 1300002 - This window state is abnormal. 8310 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8311 * @throws { BusinessError } 1300004 - Unauthorized operation. 8312 * @syscap SystemCapability.Window.SessionManager 8313 * @atomicservice 8314 * @since 15 8315 */ 8316 stopMoving(): Promise<void>; 8317 8318 /** 8319 * Enable drag window. 8320 * 8321 * @param { boolean } enable - The value true means to enable window dragging, and false means the opposite. 8322 * @returns { Promise<void> } Promise that returns no value. 8323 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 8324 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8325 * 2. Incorrect parameter types; 8326 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8327 * @throws { BusinessError } 1300002 - This window state is abnormal. 8328 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8329 * @throws { BusinessError } 1300004 - Unauthorized operation. 8330 * @syscap SystemCapability.Window.SessionManager 8331 * @systemapi Hide this for inner system use. 8332 * @since 14 8333 */ 8334 enableDrag(enable: boolean): Promise<void>; 8335 8336 /** 8337 * Disable landscape multiWindow 8338 * 8339 * @returns { Promise<void> } Promise that returns no value. 8340 * @throws {BusinessError} 1300002 - This window state is abnormal. 8341 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 8342 * @syscap SystemCapability.Window.SessionManager 8343 * @atomicservice 8344 * @since 12 8345 */ 8346 disableLandscapeMultiWindow(): Promise<void>; 8347 8348 /** 8349 * Register the callback of title buttons area change. 8350 * 8351 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 8352 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 8353 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8354 * 2. Incorrect parameter types; 8355 * 3. Parameter verification failed. 8356 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8357 * @throws { BusinessError } 1300002 - This window state is abnormal. 8358 * @syscap SystemCapability.Window.SessionManager 8359 * @since 11 8360 */ 8361 /** 8362 * Register the callback of title buttons area change. 8363 * 8364 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 8365 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 8366 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8367 * 2. Incorrect parameter types; 8368 * 3. Parameter verification failed. 8369 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8370 * @throws { BusinessError } 1300002 - This window state is abnormal. 8371 * @syscap SystemCapability.Window.SessionManager 8372 * @atomicservice 8373 * @since 12 8374 */ 8375 on(type: 'windowTitleButtonRectChange', callback: Callback<TitleButtonRect>): void; 8376 8377 /** 8378 * Unregister the callback of title buttons area change. 8379 * 8380 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 8381 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 8382 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 8383 * 2. Parameter verification failed. 8384 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8385 * @throws { BusinessError } 1300002 - This window state is abnormal. 8386 * @syscap SystemCapability.Window.SessionManager 8387 * @since 11 8388 */ 8389 /** 8390 * Unregister the callback of title buttons area change. 8391 * 8392 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 8393 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 8394 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 8395 * 2. Parameter verification failed. 8396 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8397 * @throws { BusinessError } 1300002 - This window state is abnormal. 8398 * @syscap SystemCapability.Window.SessionManager 8399 * @atomicservice 8400 * @since 12 8401 */ 8402 off(type: 'windowTitleButtonRectChange', callback?: Callback<TitleButtonRect>): void; 8403 8404 /** 8405 * Set the window mask of window 8406 * 8407 * @param { Array<Array<number>> } windowMask - The mask of window. The value of the array is 0 and 1, the other number is illegal value. 8408 * @returns { Promise<void> } Promise that returns no value. 8409 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8410 * 2. Incorrect parameter types. 8411 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8412 * @throws { BusinessError } 1300002 - This window state is abnormal. 8413 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8414 * @throws { BusinessError } 1300004 - Unauthorized operation. 8415 * @syscap SystemCapability.Window.SessionManager 8416 * @atomicservice 8417 * @since 12 8418 */ 8419 setWindowMask(windowMask: Array<Array<number>>): Promise<void>; 8420 8421 /** 8422 * Register the callback of windowRectChange 8423 * 8424 * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. 8425 * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions. 8426 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8427 * 2. Incorrect parameter types; 8428 * 3. Parameter verification failed. 8429 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8430 * @throws { BusinessError } 1300002 - This window state is abnormal. 8431 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8432 * @syscap SystemCapability.Window.SessionManager 8433 * @atomicservice 8434 * @since 12 8435 */ 8436 on(type: 'windowRectChange', callback: Callback<RectChangeOptions>): void; 8437 8438 /** 8439 * Unregister the callback of windowRectChange 8440 * 8441 * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. 8442 * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions. 8443 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 8444 * 2. Parameter verification failed. 8445 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8446 * @throws { BusinessError } 1300002 - This window state is abnormal. 8447 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8448 * @syscap SystemCapability.Window.SessionManager 8449 * @atomicservice 8450 * @since 12 8451 */ 8452 off(type: 'windowRectChange', callback?: Callback<RectChangeOptions>): void; 8453 8454 /** 8455 * Set gray scale of window. 8456 * 8457 * @param { number } grayScale - The value of gray scale. 8458 * @returns { Promise<void> } - The promise returned by the function. 8459 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8460 * 2. Incorrect parameter types; 8461 * 3. Parameter verification failed. 8462 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8463 * @throws { BusinessError } 1300002 - This window state is abnormal. 8464 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8465 * @syscap SystemCapability.Window.SessionManager 8466 * @atomicservice 8467 * @since 12 8468 */ 8469 setWindowGrayScale(grayScale: number): Promise<void>; 8470 8471 /** 8472 * Set whether to enable immersive mode. 8473 * 8474 * @param { boolean } enabled - The value true means to enable immersive mode, and false means the opposite. 8475 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8476 * 2. Incorrect parameter types; 8477 * @throws { BusinessError } 1300002 - This window state is abnormal. 8478 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8479 * @throws { BusinessError } 1300004 - Unauthorized operation. 8480 * @syscap SystemCapability.WindowManager.WindowManager.Core 8481 * @atomicservice 8482 * @since 12 8483 */ 8484 setImmersiveModeEnabledState(enabled: boolean): void; 8485 8486 /** 8487 * Get whether the immersive mode is enabled or not. 8488 * 8489 * @returns { boolean } - The value true means the immersive mode is enabled, and false means the opposite. 8490 * @throws { BusinessError } 1300002 - This window state is abnormal. 8491 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8492 * @throws { BusinessError } 1300004 - Unauthorized operation. 8493 * @syscap SystemCapability.WindowManager.WindowManager.Core 8494 * @atomicservice 8495 * @since 12 8496 */ 8497 getImmersiveModeEnabledState(): boolean; 8498 8499 /** 8500 * Get the window status of current window. 8501 * 8502 * @returns { WindowStatusType } - The status of window. 8503 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8504 * @throws { BusinessError } 1300002 - This window state is abnormal. 8505 * @syscap SystemCapability.Window.SessionManager 8506 * @atomicservice 8507 * @since 12 8508 */ 8509 getWindowStatus(): WindowStatusType; 8510 8511 /** 8512 * Checks whether the window is focused. 8513 * 8514 * @returns { boolean } - Whether the window is focused. The value true means that the window is focused, and false means the opposite. 8515 * @throws { BusinessError } 1300002 - This window state is abnormal. 8516 * @syscap SystemCapability.WindowManager.WindowManager.Core 8517 * @atomicservice 8518 * @since 12 8519 */ 8520 isFocused(): boolean; 8521 8522 /** 8523 * Create sub window with options. 8524 * 8525 * @param { string } name - window name of sub window 8526 * @param { SubWindowOptions } options - options of sub window creation 8527 * @returns { Promise<Window> } Promise used to return the subwindow. 8528 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 8529 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8530 * @throws { BusinessError } 1300002 - This window state is abnormal. 8531 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 8532 * @throws { BusinessError } 1300004 - Unauthorized operation. 8533 * @syscap SystemCapability.Window.SessionManager 8534 * @StageModelOnly 8535 * @atomicservice 8536 * @since 12 8537 */ 8538 createSubWindowWithOptions(name: string, options: SubWindowOptions): Promise<Window>; 8539 8540 /** 8541 * Set whether the title bar and dock bar will show, when the mouse hovers over hot area. 8542 * 8543 * @param { boolean } isTitleHoverShown - The value true means to display the title bar, and false means the opposite. 8544 * @param { boolean } isDockHoverShown - The value true means to display the dock bar, and false means the opposite. 8545 * @returns { Promise<void> } Promise that returns no value. 8546 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 8547 * 2. Incorrect parameter types; 8548 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 8549 * @throws { BusinessError } 1300002 - This window state is abnormal. 8550 * @throws { BusinessError } 1300004 - Unauthorized operation. 8551 * @syscap SystemCapability.Window.SessionManager 8552 * @atomicservice 8553 * @since 14 8554 */ 8555 setTitleAndDockHoverShown(isTitleHoverShown?: boolean, isDockHoverShown?: boolean): Promise<void>; 8556 } 8557 8558 /** 8559 * Window stage callback event type 8560 * 8561 * @enum { number } 8562 * @syscap SystemCapability.WindowManager.WindowManager.Core 8563 * @StageModelOnly 8564 * @since 9 8565 */ 8566 /** 8567 * Window stage callback event type 8568 * 8569 * @enum { number } 8570 * @syscap SystemCapability.WindowManager.WindowManager.Core 8571 * @StageModelOnly 8572 * @crossplatform 8573 * @since 10 8574 */ 8575 /** 8576 * Window stage callback event type 8577 * 8578 * @enum { number } 8579 * @syscap SystemCapability.WindowManager.WindowManager.Core 8580 * @StageModelOnly 8581 * @crossplatform 8582 * @atomicservice 8583 * @since 11 8584 */ 8585 enum WindowStageEventType { 8586 /** 8587 * The window stage is running in the foreground. 8588 * 8589 * @syscap SystemCapability.WindowManager.WindowManager.Core 8590 * @StageModelOnly 8591 * @since 9 8592 */ 8593 /** 8594 * The window stage is running in the foreground. 8595 * 8596 * @syscap SystemCapability.WindowManager.WindowManager.Core 8597 * @StageModelOnly 8598 * @crossplatform 8599 * @since 10 8600 */ 8601 /** 8602 * The window stage is running in the foreground. 8603 * 8604 * @syscap SystemCapability.WindowManager.WindowManager.Core 8605 * @StageModelOnly 8606 * @crossplatform 8607 * @atomicservice 8608 * @since 11 8609 */ 8610 SHOWN = 1, 8611 /** 8612 * The window stage gains focus. 8613 * 8614 * @syscap SystemCapability.WindowManager.WindowManager.Core 8615 * @StageModelOnly 8616 * @since 9 8617 */ 8618 /** 8619 * The window stage gains focus. 8620 * 8621 * @syscap SystemCapability.WindowManager.WindowManager.Core 8622 * @StageModelOnly 8623 * @crossplatform 8624 * @since 10 8625 */ 8626 /** 8627 * The window stage gains focus. 8628 * 8629 * @syscap SystemCapability.WindowManager.WindowManager.Core 8630 * @StageModelOnly 8631 * @crossplatform 8632 * @atomicservice 8633 * @since 11 8634 */ 8635 ACTIVE, 8636 /** 8637 * The window stage loses focus. 8638 * 8639 * @syscap SystemCapability.WindowManager.WindowManager.Core 8640 * @StageModelOnly 8641 * @since 9 8642 */ 8643 /** 8644 * The window stage loses focus. 8645 * 8646 * @syscap SystemCapability.WindowManager.WindowManager.Core 8647 * @StageModelOnly 8648 * @crossplatform 8649 * @since 10 8650 */ 8651 /** 8652 * The window stage loses focus. 8653 * 8654 * @syscap SystemCapability.WindowManager.WindowManager.Core 8655 * @StageModelOnly 8656 * @crossplatform 8657 * @atomicservice 8658 * @since 11 8659 */ 8660 INACTIVE, 8661 /** 8662 * The window stage is running in the background. 8663 * 8664 * @syscap SystemCapability.WindowManager.WindowManager.Core 8665 * @StageModelOnly 8666 * @since 9 8667 */ 8668 /** 8669 * The window stage is running in the background. 8670 * 8671 * @syscap SystemCapability.WindowManager.WindowManager.Core 8672 * @StageModelOnly 8673 * @crossplatform 8674 * @since 10 8675 */ 8676 /** 8677 * The window stage is running in the background. 8678 * 8679 * @syscap SystemCapability.WindowManager.WindowManager.Core 8680 * @StageModelOnly 8681 * @crossplatform 8682 * @atomicservice 8683 * @since 11 8684 */ 8685 HIDDEN, 8686 /** 8687 * The window stage is interactive in the foreground. 8688 * 8689 * @syscap SystemCapability.WindowManager.WindowManager.Core 8690 * @StageModelOnly 8691 * @crossplatform 8692 * @atomicservice 8693 * @since 11 8694 */ 8695 RESUMED, 8696 /** 8697 * The window stage is not interactive in the foreground. 8698 * 8699 * @syscap SystemCapability.WindowManager.WindowManager.Core 8700 * @StageModelOnly 8701 * @crossplatform 8702 * @atomicservice 8703 * @since 11 8704 */ 8705 PAUSED 8706 } 8707 8708 /** 8709 * Enum for window modality Type 8710 * 8711 * @enum { number } 8712 * @syscap SystemCapability.Window.SessionManager 8713 * @atomicservice 8714 * @since 14 8715 */ 8716 enum ModalityType { 8717 /** 8718 * The value means window modality. 8719 * 8720 * @syscap SystemCapability.Window.SessionManager 8721 * @atomicservice 8722 * @since 14 8723 */ 8724 WINDOW_MODALITY = 0, 8725 /** 8726 * The value means application modality. 8727 * 8728 * @syscap SystemCapability.Window.SessionManager 8729 * @atomicservice 8730 * @since 14 8731 */ 8732 APPLICATION_MODALITY = 1, 8733 } 8734 8735 /** 8736 * Options for subwindow creation 8737 * 8738 * @interface SubWindowOptions 8739 * @syscap SystemCapability.Window.SessionManager 8740 * @since 11 8741 */ 8742 /** 8743 * Options for subwindow creation 8744 * 8745 * @interface SubWindowOptions 8746 * @syscap SystemCapability.Window.SessionManager 8747 * @atomicservice 8748 * @since 12 8749 */ 8750 interface SubWindowOptions { 8751 /** 8752 * Indicates subwindow title 8753 * 8754 * @type { string } 8755 * @syscap SystemCapability.Window.SessionManager 8756 * @since 11 8757 */ 8758 /** 8759 * Indicates subwindow title 8760 * 8761 * @type { string } 8762 * @syscap SystemCapability.Window.SessionManager 8763 * @atomicservice 8764 * @since 12 8765 */ 8766 title: string; 8767 /** 8768 * Indicates decor of subwindow 8769 * 8770 * @type { boolean } 8771 * @syscap SystemCapability.Window.SessionManager 8772 * @since 11 8773 */ 8774 /** 8775 * Indicates decor of subwindow 8776 * 8777 * @type { boolean } 8778 * @syscap SystemCapability.Window.SessionManager 8779 * @atomicservice 8780 * @since 12 8781 */ 8782 decorEnabled: boolean; 8783 /** 8784 * Indicates modality of subwindow 8785 * 8786 * @type { ?boolean } 8787 * @syscap SystemCapability.Window.SessionManager 8788 * @atomicservice 8789 * @since 12 8790 */ 8791 isModal?: boolean; 8792 /** 8793 * Indicates whether subwindow is topmost 8794 * 8795 * @type { ?boolean } 8796 * @syscap SystemCapability.Window.SessionManager 8797 * @systemapi Hide this for inner system use. 8798 * @since 12 8799 */ 8800 isTopmost?: boolean; 8801 /** 8802 * Indicates modality type of subwindow 8803 * 8804 * @type { ?ModalityType } 8805 * @syscap SystemCapability.Window.SessionManager 8806 * @atomicservice 8807 * @since 14 8808 */ 8809 modalityType?: ModalityType; 8810 } 8811 /** 8812 * WindowStage 8813 * 8814 * @interface WindowStage 8815 * @syscap SystemCapability.WindowManager.WindowManager.Core 8816 * @since 9 8817 */ 8818 /** 8819 * WindowStage 8820 * 8821 * @interface WindowStage 8822 * @syscap SystemCapability.WindowManager.WindowManager.Core 8823 * @crossplatform 8824 * @since 10 8825 */ 8826 /** 8827 * WindowStage 8828 * 8829 * @interface WindowStage 8830 * @syscap SystemCapability.WindowManager.WindowManager.Core 8831 * @crossplatform 8832 * @atomicservice 8833 * @since 11 8834 */ 8835 interface WindowStage { 8836 /** 8837 * Get main window of the stage. 8838 * 8839 * @returns { Promise<Window> } Callback used to return the subwindow. 8840 * @throws { BusinessError } 1300002 - This window state is abnormal. 8841 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8842 * @syscap SystemCapability.WindowManager.WindowManager.Core 8843 * @StageModelOnly 8844 * @since 9 8845 */ 8846 /** 8847 * Get main window of the stage. 8848 * 8849 * @returns { Promise<Window> } Callback used to return the subwindow. 8850 * @throws { BusinessError } 1300002 - This window state is abnormal. 8851 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8852 * @syscap SystemCapability.WindowManager.WindowManager.Core 8853 * @StageModelOnly 8854 * @crossplatform 8855 * @since 10 8856 */ 8857 /** 8858 * Get main window of the stage. 8859 * 8860 * @returns { Promise<Window> } Callback used to return the subwindow. 8861 * @throws { BusinessError } 1300002 - This window state is abnormal. 8862 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8863 * @syscap SystemCapability.WindowManager.WindowManager.Core 8864 * @StageModelOnly 8865 * @crossplatform 8866 * @atomicservice 8867 * @since 11 8868 */ 8869 getMainWindow(): Promise<Window>; 8870 /** 8871 * Get main window of the stage. 8872 * 8873 * @param { AsyncCallback<Window> } callback Callback used to return the main window. 8874 * @throws { BusinessError } 1300002 - This window state is abnormal. 8875 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8876 * @syscap SystemCapability.WindowManager.WindowManager.Core 8877 * @StageModelOnly 8878 * @since 9 8879 */ 8880 /** 8881 * Get main window of the stage. 8882 * 8883 * @param { AsyncCallback<Window> } callback Callback used to return the main window. 8884 * @throws { BusinessError } 1300002 - This window state is abnormal. 8885 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8886 * @syscap SystemCapability.WindowManager.WindowManager.Core 8887 * @StageModelOnly 8888 * @crossplatform 8889 * @since 10 8890 */ 8891 /** 8892 * Get main window of the stage. 8893 * 8894 * @param { AsyncCallback<Window> } callback Callback used to return the main window. 8895 * @throws { BusinessError } 1300002 - This window state is abnormal. 8896 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8897 * @syscap SystemCapability.WindowManager.WindowManager.Core 8898 * @StageModelOnly 8899 * @crossplatform 8900 * @atomicservice 8901 * @since 11 8902 */ 8903 getMainWindow(callback: AsyncCallback<Window>): void; 8904 /** 8905 * Get main window of the stage. 8906 * 8907 * @returns { Window } 8908 * @throws { BusinessError } 1300002 - This window state is abnormal. 8909 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8910 * @syscap SystemCapability.WindowManager.WindowManager.Core 8911 * @StageModelOnly 8912 * @since 9 8913 */ 8914 /** 8915 * Get main window of the stage. 8916 * 8917 * @returns { Window } 8918 * @throws { BusinessError } 1300002 - This window state is abnormal. 8919 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8920 * @syscap SystemCapability.WindowManager.WindowManager.Core 8921 * @StageModelOnly 8922 * @crossplatform 8923 * @since 10 8924 */ 8925 /** 8926 * Get main window of the stage. 8927 * 8928 * @returns { Window } 8929 * @throws { BusinessError } 1300002 - This window state is abnormal. 8930 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8931 * @syscap SystemCapability.WindowManager.WindowManager.Core 8932 * @StageModelOnly 8933 * @crossplatform 8934 * @atomicservice 8935 * @since 11 8936 */ 8937 getMainWindowSync(): Window; 8938 /** 8939 * Create sub window of the stage. 8940 * 8941 * @param { string } name window name of sub window 8942 * @returns { Promise<Window> } Promise used to return the subwindow. 8943 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 8944 * @throws { BusinessError } 1300002 - This window state is abnormal. 8945 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8946 * @syscap SystemCapability.WindowManager.WindowManager.Core 8947 * @StageModelOnly 8948 * @since 9 8949 */ 8950 /** 8951 * Create sub window of the stage. 8952 * 8953 * @param { string } name window name of sub window 8954 * @returns { Promise<Window> } Promise used to return the subwindow. 8955 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 8956 * @throws { BusinessError } 1300002 - This window state is abnormal. 8957 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8958 * @syscap SystemCapability.WindowManager.WindowManager.Core 8959 * @StageModelOnly 8960 * @crossplatform 8961 * @since 10 8962 */ 8963 /** 8964 * Create sub window of the stage. 8965 * 8966 * @param { string } name window name of sub window 8967 * @returns { Promise<Window> } Promise used to return the subwindow. 8968 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 8969 * @throws { BusinessError } 1300002 - This window state is abnormal. 8970 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8971 * @syscap SystemCapability.WindowManager.WindowManager.Core 8972 * @StageModelOnly 8973 * @crossplatform 8974 * @atomicservice 8975 * @since 11 8976 */ 8977 createSubWindow(name: string): Promise<Window>; 8978 /** 8979 * Create sub window of the stage. 8980 * 8981 * @param { string } name window name of sub window 8982 * @param { AsyncCallback<Window> } callback Callback used to return the subwindow. 8983 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 8984 * @throws { BusinessError } 1300002 - This window state is abnormal. 8985 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8986 * @syscap SystemCapability.WindowManager.WindowManager.Core 8987 * @StageModelOnly 8988 * @since 9 8989 */ 8990 /** 8991 * Create sub window of the stage. 8992 * 8993 * @param { string } name window name of sub window 8994 * @param { AsyncCallback<Window> } callback Callback used to return the subwindow. 8995 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 8996 * @throws { BusinessError } 1300002 - This window state is abnormal. 8997 * @throws { BusinessError } 1300005 - This window stage is abnormal. 8998 * @syscap SystemCapability.WindowManager.WindowManager.Core 8999 * @StageModelOnly 9000 * @crossplatform 9001 * @since 10 9002 */ 9003 /** 9004 * Create sub window of the stage. 9005 * 9006 * @param { string } name window name of sub window 9007 * @param { AsyncCallback<Window> } callback Callback used to return the subwindow. 9008 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 9009 * @throws { BusinessError } 1300002 - This window state is abnormal. 9010 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9011 * @syscap SystemCapability.WindowManager.WindowManager.Core 9012 * @StageModelOnly 9013 * @crossplatform 9014 * @atomicservice 9015 * @since 11 9016 */ 9017 createSubWindow(name: string, callback: AsyncCallback<Window>): void; 9018 /** 9019 * Create sub window of the stage. 9020 * 9021 * @param { string } name - window name of sub window 9022 * @param { SubWindowOptions } options - options of sub window creation 9023 * @returns { Promise<Window> } Promise used to return the subwindow. 9024 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 9025 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9026 * @throws { BusinessError } 1300002 - This window state is abnormal. 9027 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9028 * @syscap SystemCapability.Window.SessionManager 9029 * @StageModelOnly 9030 * @since 11 9031 */ 9032 /** 9033 * Create sub window of the stage. 9034 * 9035 * @param { string } name - window name of sub window 9036 * @param { SubWindowOptions } options - options of sub window creation 9037 * @returns { Promise<Window> } Promise used to return the subwindow. 9038 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 9039 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9040 * @throws { BusinessError } 1300002 - This window state is abnormal. 9041 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9042 * @syscap SystemCapability.Window.SessionManager 9043 * @StageModelOnly 9044 * @atomicservice 9045 * @since 12 9046 */ 9047 createSubWindowWithOptions(name: string, options: SubWindowOptions): Promise<Window>; 9048 /** 9049 * Get sub window of the stage. 9050 * 9051 * @returns { Promise<Array<Window>> } 9052 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9053 * @syscap SystemCapability.WindowManager.WindowManager.Core 9054 * @StageModelOnly 9055 * @since 9 9056 */ 9057 /** 9058 * Get sub window of the stage. 9059 * 9060 * @returns { Promise<Array<Window>> } 9061 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9062 * @syscap SystemCapability.WindowManager.WindowManager.Core 9063 * @StageModelOnly 9064 * @crossplatform 9065 * @since 10 9066 */ 9067 /** 9068 * Get sub window of the stage. 9069 * 9070 * @returns { Promise<Array<Window>> } 9071 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9072 * @syscap SystemCapability.WindowManager.WindowManager.Core 9073 * @StageModelOnly 9074 * @crossplatform 9075 * @atomicservice 9076 * @since 11 9077 */ 9078 getSubWindow(): Promise<Array<Window>>; 9079 /** 9080 * Get sub window of the stage. 9081 * 9082 * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows. 9083 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9084 * @syscap SystemCapability.WindowManager.WindowManager.Core 9085 * @StageModelOnly 9086 * @since 9 9087 */ 9088 /** 9089 * Get sub window of the stage. 9090 * 9091 * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows. 9092 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9093 * @syscap SystemCapability.WindowManager.WindowManager.Core 9094 * @StageModelOnly 9095 * @crossplatform 9096 * @since 10 9097 */ 9098 /** 9099 * Get sub window of the stage. 9100 * 9101 * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows. 9102 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9103 * @syscap SystemCapability.WindowManager.WindowManager.Core 9104 * @StageModelOnly 9105 * @crossplatform 9106 * @atomicservice 9107 * @since 11 9108 */ 9109 getSubWindow(callback: AsyncCallback<Array<Window>>): void; 9110 /** 9111 * Loads content 9112 * 9113 * @param { string } path Path of the page to which the content will be loaded 9114 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 9115 * @param { AsyncCallback<void> } callback Callback used to return the result. 9116 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9117 * 2. Incorrect parameter types. 9118 * @throws { BusinessError } 1300002 - This window state is abnormal. 9119 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9120 * @syscap SystemCapability.WindowManager.WindowManager.Core 9121 * @StageModelOnly 9122 * @since 9 9123 */ 9124 /** 9125 * Loads content 9126 * 9127 * @param { string } path Path of the page to which the content will be loaded 9128 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 9129 * @param { AsyncCallback<void> } callback Callback used to return the result. 9130 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9131 * 2. Incorrect parameter types. 9132 * @throws { BusinessError } 1300002 - This window state is abnormal. 9133 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9134 * @syscap SystemCapability.WindowManager.WindowManager.Core 9135 * @StageModelOnly 9136 * @crossplatform 9137 * @since 10 9138 */ 9139 /** 9140 * Loads content 9141 * 9142 * @param { string } path Path of the page to which the content will be loaded 9143 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 9144 * @param { AsyncCallback<void> } callback Callback used to return the result. 9145 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9146 * 2. Incorrect parameter types. 9147 * @throws { BusinessError } 1300002 - This window state is abnormal. 9148 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9149 * @syscap SystemCapability.WindowManager.WindowManager.Core 9150 * @StageModelOnly 9151 * @crossplatform 9152 * @atomicservice 9153 * @since 11 9154 */ 9155 loadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 9156 /** 9157 * Loads content 9158 * 9159 * @param { string } path of the page to which the content will be loaded 9160 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 9161 * @returns { Promise<void> } 9162 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9163 * 2. Incorrect parameter types. 9164 * @throws { BusinessError } 1300002 - This window state is abnormal. 9165 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9166 * @syscap SystemCapability.WindowManager.WindowManager.Core 9167 * @StageModelOnly 9168 * @since 9 9169 */ 9170 /** 9171 * Loads content 9172 * 9173 * @param { string } path of the page to which the content will be loaded 9174 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 9175 * @returns { Promise<void> } 9176 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9177 * 2. Incorrect parameter types. 9178 * @throws { BusinessError } 1300002 - This window state is abnormal. 9179 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9180 * @syscap SystemCapability.WindowManager.WindowManager.Core 9181 * @StageModelOnly 9182 * @crossplatform 9183 * @since 10 9184 */ 9185 /** 9186 * Loads content 9187 * 9188 * @param { string } path of the page to which the content will be loaded 9189 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 9190 * @returns { Promise<void> } 9191 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9192 * 2. Incorrect parameter types. 9193 * @throws { BusinessError } 1300002 - This window state is abnormal. 9194 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9195 * @syscap SystemCapability.WindowManager.WindowManager.Core 9196 * @StageModelOnly 9197 * @crossplatform 9198 * @atomicservice 9199 * @since 11 9200 */ 9201 loadContent(path: string, storage?: LocalStorage): Promise<void>; 9202 /** 9203 * Loads content 9204 * 9205 * @param { string } path of the page to which the content will be loaded 9206 * @param { AsyncCallback<void> } callback Callback used to return the result. 9207 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9208 * 2. Incorrect parameter types. 9209 * @throws { BusinessError } 1300002 - This window state is abnormal. 9210 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9211 * @syscap SystemCapability.WindowManager.WindowManager.Core 9212 * @StageModelOnly 9213 * @since 9 9214 */ 9215 /** 9216 * Loads content 9217 * 9218 * @param { string } path of the page to which the content will be loaded 9219 * @param { AsyncCallback<void> } callback Callback used to return the result. 9220 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9221 * 2. Incorrect parameter types. 9222 * @throws { BusinessError } 1300002 - This window state is abnormal. 9223 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9224 * @syscap SystemCapability.WindowManager.WindowManager.Core 9225 * @StageModelOnly 9226 * @crossplatform 9227 * @since 10 9228 */ 9229 /** 9230 * Loads content 9231 * 9232 * @param { string } path of the page to which the content will be loaded 9233 * @param { AsyncCallback<void> } callback Callback used to return the result. 9234 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9235 * 2. Incorrect parameter types. 9236 * @throws { BusinessError } 1300002 - This window state is abnormal. 9237 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9238 * @syscap SystemCapability.WindowManager.WindowManager.Core 9239 * @StageModelOnly 9240 * @crossplatform 9241 * @atomicservice 9242 * @since 11 9243 */ 9244 loadContent(path: string, callback: AsyncCallback<void>): void; 9245 9246 /** 9247 * Loads content by named router 9248 * 9249 * @param { string } name - name of the page to which the content will be loaded. 9250 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 9251 * @param { AsyncCallback<void> } callback - Callback used to return the result. 9252 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9253 * 2. Incorrect parameter types. 9254 * @throws { BusinessError } 1300002 - This window state is abnormal. 9255 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9256 * @syscap SystemCapability.WindowManager.WindowManager.Core 9257 * @stagemodelonly 9258 * @crossplatform 9259 * @atomicservice 9260 * @since 11 9261 */ 9262 loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 9263 9264 /** 9265 * Loads content by named router 9266 * 9267 * @param { string } name - name of the page to which the content will be loaded. 9268 * @param { AsyncCallback<void> } callback - Callback used to return the result. 9269 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9270 * 2. Incorrect parameter types. 9271 * @throws { BusinessError } 1300002 - This window state is abnormal. 9272 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9273 * @syscap SystemCapability.WindowManager.WindowManager.Core 9274 * @stagemodelonly 9275 * @crossplatform 9276 * @atomicservice 9277 * @since 11 9278 */ 9279 loadContentByName(name: string, callback: AsyncCallback<void>): void; 9280 9281 /** 9282 * Loads content by named router 9283 * 9284 * @param { string } name - name of the page to which the content will be loaded. 9285 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 9286 * @returns { Promise<void> } Promise that returns no value. 9287 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9288 * 2. Incorrect parameter types. 9289 * @throws { BusinessError } 1300002 - This window state is abnormal. 9290 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9291 * @syscap SystemCapability.WindowManager.WindowManager.Core 9292 * @stagemodelonly 9293 * @crossplatform 9294 * @atomicservice 9295 * @since 11 9296 */ 9297 loadContentByName(name: string, storage?: LocalStorage): Promise<void>; 9298 9299 /** 9300 * Window stage event callback on. 9301 * 9302 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 9303 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 9304 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9305 * 2. Incorrect parameter types; 9306 * 3. Parameter verification failed. 9307 * @throws { BusinessError } 1300002 - This window state is abnormal. 9308 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9309 * @syscap SystemCapability.WindowManager.WindowManager.Core 9310 * @StageModelOnly 9311 * @since 9 9312 */ 9313 /** 9314 * Window stage event callback on. 9315 * 9316 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 9317 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 9318 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9319 * 2. Incorrect parameter types; 9320 * 3. Parameter verification failed. 9321 * @throws { BusinessError } 1300002 - This window state is abnormal. 9322 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9323 * @syscap SystemCapability.WindowManager.WindowManager.Core 9324 * @StageModelOnly 9325 * @crossplatform 9326 * @since 10 9327 */ 9328 /** 9329 * Window stage event callback on. 9330 * 9331 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 9332 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 9333 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9334 * 2. Incorrect parameter types; 9335 * 3. Parameter verification failed. 9336 * @throws { BusinessError } 1300002 - This window state is abnormal. 9337 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9338 * @syscap SystemCapability.WindowManager.WindowManager.Core 9339 * @StageModelOnly 9340 * @crossplatform 9341 * @atomicservice 9342 * @since 11 9343 */ 9344 on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void; 9345 /** 9346 * Window stage event callback off. 9347 * 9348 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 9349 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 9350 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 9351 * 2. Parameter verification failed. 9352 * @throws { BusinessError } 1300002 - This window state is abnormal. 9353 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9354 * @syscap SystemCapability.WindowManager.WindowManager.Core 9355 * @StageModelOnly 9356 * @since 9 9357 */ 9358 /** 9359 * Window stage event callback off. 9360 * 9361 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 9362 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 9363 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 9364 * 2. Parameter verification failed. 9365 * @throws { BusinessError } 1300002 - This window state is abnormal. 9366 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9367 * @syscap SystemCapability.WindowManager.WindowManager.Core 9368 * @StageModelOnly 9369 * @crossplatform 9370 * @since 10 9371 */ 9372 /** 9373 * Window stage event callback off. 9374 * 9375 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 9376 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 9377 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 9378 * 2. Parameter verification failed. 9379 * @throws { BusinessError } 1300002 - This window state is abnormal. 9380 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9381 * @syscap SystemCapability.WindowManager.WindowManager.Core 9382 * @StageModelOnly 9383 * @crossplatform 9384 * @atomicservice 9385 * @since 11 9386 */ 9387 off(eventType: 'windowStageEvent', callback?: Callback<WindowStageEventType>): void; 9388 9389 /** 9390 * Window stage close callback on. 9391 * 9392 * @param { 'windowStageClose' } eventType The value is fixed at 'windowStageClose', indicating the window stage close event. 9393 * @param { Callback<void> } callback Callback function requires a boolean return value to determine whether to close the current main window. 9394 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9395 * 2. Incorrect parameter types; 9396 * 3. Parameter verification failed. 9397 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9398 * @throws { BusinessError } 1300002 - This window state is abnormal. 9399 * @syscap SystemCapability.Window.SessionManager 9400 * @stagemodelonly 9401 * @atomicservice 9402 * @since 14 9403 */ 9404 on(eventType: 'windowStageClose', callback: Callback<void>): void; 9405 9406 /** 9407 * Window stage close callback off. 9408 * 9409 * @param { 'windowStageClose' } eventType The value is fixed at 'windowStageClose', indicating the window stage close event. 9410 * @param { Callback<void> } callback Callback function requires a boolean return value to determine whether to close the current main window. 9411 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9412 * 2. Incorrect parameter types; 9413 * 3. Parameter verification failed. 9414 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9415 * @throws { BusinessError } 1300002 - This window state is abnormal. 9416 * @syscap SystemCapability.Window.SessionManager 9417 * @stagemodelonly 9418 * @atomicservice 9419 * @since 14 9420 */ 9421 off(eventType: 'windowStageClose', callback?: Callback<void>): void; 9422 9423 /** 9424 * Disable window decoration. It must be called before loadContent. 9425 * 9426 * @throws { BusinessError } 1300002 - This window state is abnormal. 9427 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9428 * @syscap SystemCapability.WindowManager.WindowManager.Core 9429 * @systemapi 9430 * @StageModelOnly 9431 * @since 9 9432 */ 9433 /** 9434 * Disable window decoration. It must be called before loadContent. 9435 * 9436 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 9437 * @throws { BusinessError } 1300002 - This window state is abnormal. 9438 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9439 * @syscap SystemCapability.WindowManager.WindowManager.Core 9440 * @systemapi 9441 * @StageModelOnly 9442 * @since 12 9443 */ 9444 disableWindowDecor(): void; 9445 9446 /** 9447 * Sets whether can show on lock screen or not 9448 * 9449 * @param { boolean } showOnLockScreen can show on lock screen if true, or not if false 9450 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9451 * 2. Incorrect parameter types. 9452 * @throws { BusinessError } 1300002 - This window state is abnormal. 9453 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9454 * @syscap SystemCapability.WindowManager.WindowManager.Core 9455 * @systemapi Hide this for inner system use. 9456 * @StageModelOnly 9457 * @since 9 9458 */ 9459 /** 9460 * Sets whether can show on lock screen or not 9461 * 9462 * @param { boolean } showOnLockScreen can show on lock screen if true, or not if false 9463 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 9464 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9465 * 2. Incorrect parameter types. 9466 * @throws { BusinessError } 1300002 - This window state is abnormal. 9467 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9468 * @syscap SystemCapability.WindowManager.WindowManager.Core 9469 * @systemapi Hide this for inner system use. 9470 * @StageModelOnly 9471 * @since 12 9472 */ 9473 setShowOnLockScreen(showOnLockScreen: boolean): void; 9474 9475 /** 9476 * Set whether to use default density. 9477 * 9478 * @param { boolean } enabled - Use default density if true, or follow system density change if false 9479 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9480 * 2. Incorrect parameter types. 9481 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9482 * @throws { BusinessError } 1300002 - This window state is abnormal. 9483 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9484 * @syscap SystemCapability.Window.SessionManager 9485 * @StageModelOnly 9486 * @atomicservice 9487 * @since 12 9488 */ 9489 setDefaultDensityEnabled(enabled: boolean): void; 9490 9491 /** 9492 * Sets the custom density of ability. 9493 * 9494 * @param { number } density - the specified custom density value. 9495 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9496 * 2. Incorrect parameter types. 9497 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9498 * @throws { BusinessError } 1300002 - This window state is abnormal. 9499 * @throws { BusinessError } 1300005 - This window stage is abnormal. 9500 * @syscap SystemCapability.Window.SessionManager 9501 * @StageModelOnly 9502 * @atomicservice 9503 * @since 15 9504 */ 9505 setCustomDensity(density: number): void; 9506 9507 /** 9508 * Remove the starting window, it must be used with configuration "enable.remove.starting.window". 9509 * 9510 * @returns { Promise<void> } - The promise returned by the function. 9511 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9512 * @throws { BusinessError } 1300002 - This window state is abnormal. 9513 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9514 * @syscap SystemCapability.Window.SessionManager 9515 * @StageModelOnly 9516 * @atomicservice 9517 * @since 14 9518 */ 9519 removeStartingWindow(): Promise<void>; 9520 9521 /** 9522 * Set the application modality of the windowStage. 9523 * 9524 * @param { boolean } isModal - Enable the window modal if true, otherwise means the opposite. 9525 * @returns { Promise<void> } Promise that returns no value. 9526 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9527 * 2. Incorrect parameter types. 9528 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9529 * @throws { BusinessError } 1300002 - This window state is abnormal. 9530 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9531 * @syscap SystemCapability.Window.SessionManager 9532 * @StageModelOnly 9533 * @atomicservice 9534 * @since 14 9535 */ 9536 setWindowModal(isModal: boolean): Promise<void>; 9537 9538 /** 9539 * Set to automatically save the window rect. 9540 * 9541 * @param { boolean } enabled - Enable the window rect auto-save if true, otherwise means the opposite. 9542 * @returns { Promise<void> } Promise that returns no value. 9543 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9544 * 2. Incorrect parameter types. 9545 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9546 * @throws { BusinessError } 1300002 - This window state is abnormal. 9547 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9548 * @syscap SystemCapability.Window.SessionManager 9549 * @StageModelOnly 9550 * @atomicservice 9551 * @since 14 9552 */ 9553 setWindowRectAutoSave(enabled: boolean): Promise<void>; 9554 9555 /** 9556 * Whether the window supports the window rect auto-save. 9557 * 9558 * @returns { Promise<boolean> } Promise used to return the result. 9559 * The value true means that the window rect auto-save is supported, and false means the opposite. 9560 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9561 * @throws { BusinessError } 1300002 - This window state is abnormal. 9562 * @syscap SystemCapability.Window.SessionManager 9563 * @StageModelOnly 9564 * @atomicservice 9565 * @since 14 9566 */ 9567 isWindowRectAutoSave(): Promise<boolean>; 9568 9569 /** 9570 * Sets the supported window modes. 9571 * 9572 * @param { Array<bundleManager.SupportWindowMode> } supportedWindowModes - The supported modes of window. 9573 * @returns { Promise<void> } Promise that returns no value. 9574 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 9575 * 2. Incorrect parameter types. 9576 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 9577 * @throws { BusinessError } 1300002 - This window state is abnormal. 9578 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 9579 * @syscap SystemCapability.Window.SessionManager 9580 * @stagemodelonly 9581 * @atomicservice 9582 * @since 15 9583 */ 9584 setSupportedWindowModes(supportedWindowModes: Array<bundleManager.SupportWindowMode>): Promise<void>; 9585 } 9586 9587 /** 9588 * Attribute of the window for UI service extension ability. 9589 * 9590 * @enum { number } 9591 * @syscap SystemCapability.Window.SessionManager 9592 * @systemapi Hide this for inner system use. 9593 * @stagemodelonly 9594 * @since 14 9595 */ 9596 enum ExtensionWindowAttribute { 9597 /** 9598 * System window. 9599 * 9600 * @syscap SystemCapability.Window.SessionManager 9601 * @systemapi Hide this for inner system use. 9602 * @stagemodelonly 9603 * @since 14 9604 */ 9605 SYSTEM_WINDOW, 9606 9607 /** 9608 * Sub window. 9609 * 9610 * @syscap SystemCapability.Window.SessionManager 9611 * @systemapi Hide this for inner system use. 9612 * @stagemodelonly 9613 * @since 14 9614 */ 9615 SUB_WINDOW 9616 } 9617 9618 /** 9619 * Options for system window creation. 9620 * 9621 * @interface SystemWindowOptions 9622 * @syscap SystemCapability.Window.SessionManager 9623 * @systemapi Hide this for inner system use. 9624 * @stagemodelonly 9625 * @since 14 9626 */ 9627 interface SystemWindowOptions { 9628 /** 9629 * Indicates window type. 9630 * 9631 * @type { WindowType } 9632 * @syscap SystemCapability.Window.SessionManager 9633 * @systemapi Hide this for inner system use. 9634 * @stagemodelonly 9635 * @since 14 9636 */ 9637 windowType: WindowType; 9638 } 9639 9640 /** 9641 * Configuration of the window for UI service extension ability. 9642 * 9643 * @interface ExtensionWindowConfig 9644 * @syscap SystemCapability.Window.SessionManager 9645 * @systemapi Hide this for inner system use. 9646 * @stagemodelonly 9647 * @since 14 9648 */ 9649 interface ExtensionWindowConfig { 9650 /** 9651 * Window name. 9652 * 9653 * @type { string } 9654 * @syscap SystemCapability.Window.SessionManager 9655 * @systemapi Hide this for inner system use. 9656 * @stagemodelonly 9657 * @since 14 9658 */ 9659 windowName: string; 9660 9661 /** 9662 * Defines whether the window is a subwindow or a system window. 9663 * 9664 * @type { ExtensionWindowAttribute } 9665 * @syscap SystemCapability.Window.SessionManager 9666 * @systemapi Hide this for inner system use. 9667 * @stagemodelonly 9668 * @since 14 9669 */ 9670 windowAttribute: ExtensionWindowAttribute; 9671 9672 /** 9673 * The position and size of window. 9674 * 9675 * @type { Rect } 9676 * @syscap SystemCapability.Window.SessionManager 9677 * @systemapi Hide this for inner system use. 9678 * @stagemodelonly 9679 * @since 14 9680 */ 9681 windowRect: Rect; 9682 9683 /** 9684 * The options of sub window creation. 9685 * 9686 * @type { ?SubWindowOptions } 9687 * @syscap SystemCapability.Window.SessionManager 9688 * @systemapi Hide this for inner system use. 9689 * @stagemodelonly 9690 * @since 14 9691 */ 9692 subWindowOptions?: SubWindowOptions; 9693 9694 /** 9695 * The options of system window creation. 9696 * 9697 * @type { ?SystemWindowOptions } 9698 * @syscap SystemCapability.Window.SessionManager 9699 * @systemapi Hide this for inner system use. 9700 * @stagemodelonly 9701 * @since 14 9702 */ 9703 systemWindowOptions?: SystemWindowOptions; 9704 } 9705 9706 /** 9707 * The layout info of Window. 9708 * 9709 * @interface WindowLayoutInfo 9710 * @syscap SystemCapability.Window.SessionManager 9711 * @atomicservice 9712 * @since 15 9713 */ 9714 interface WindowLayoutInfo { 9715 /** 9716 * The position and size of window. 9717 * 9718 * @type { Rect } 9719 * @syscap SystemCapability.Window.SessionManager 9720 * @atomicservice 9721 * @since 15 9722 */ 9723 windowRect: Rect; 9724 } 9725} 9726 9727export default window; 9728