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 21/// <reference path="../component/common_ts_ets_api.d.ts"/> 22 23import { AsyncCallback, BusinessError, Callback } from './@ohos.base'; 24import BaseContext from './application/BaseContext'; 25import { LocalStorage } from 'StateManagement'; 26import image from './@ohos.multimedia.image'; 27import rpc from './@ohos.rpc'; 28import dialogRequest from './@ohos.app.ability.dialogRequest'; 29import { UIContext } from './@ohos.arkui.UIContext'; 30 31/** 32 * Window manager. 33 * 34 * @namespace window 35 * @syscap SystemCapability.WindowManager.WindowManager.Core 36 */ 37/** 38 * Window manager. 39 * 40 * @namespace window 41 * @syscap SystemCapability.WindowManager.WindowManager.Core 42 * @crossplatform 43 * @since 10 44 */ 45/** 46 * Window manager. 47 * 48 * @namespace window 49 * @syscap SystemCapability.WindowManager.WindowManager.Core 50 * @crossplatform 51 * @atomicservice 52 * @since 11 53 */ 54declare namespace window { 55 /** 56 * The type of a window. 57 * 58 * @enum { number } 59 * @syscap SystemCapability.WindowManager.WindowManager.Core 60 * @since 7 61 */ 62 enum WindowType { 63 /** 64 * App. 65 * 66 * @syscap SystemCapability.WindowManager.WindowManager.Core 67 * @FAModelOnly 68 * @since 7 69 */ 70 TYPE_APP, 71 /** 72 * System alert. 73 * 74 * @syscap SystemCapability.WindowManager.WindowManager.Core 75 * @since 7 76 * @deprecated since 11 77 */ 78 TYPE_SYSTEM_ALERT, 79 /** 80 * Input method. 81 * 82 * @syscap SystemCapability.WindowManager.WindowManager.Core 83 * @systemapi Hide this for inner system use. 84 * @StageModelOnly 85 * @since 9 86 */ 87 TYPE_INPUT_METHOD, 88 /** 89 * Status bar. 90 * 91 * @syscap SystemCapability.WindowManager.WindowManager.Core 92 * @systemapi Hide this for inner system use. 93 * @StageModelOnly 94 * @since 9 95 */ 96 TYPE_STATUS_BAR, 97 /** 98 * Panel. 99 * 100 * @syscap SystemCapability.WindowManager.WindowManager.Core 101 * @systemapi Hide this for inner system use. 102 * @StageModelOnly 103 * @since 9 104 */ 105 TYPE_PANEL, 106 /** 107 * Keyguard. 108 * 109 * @syscap SystemCapability.WindowManager.WindowManager.Core 110 * @systemapi Hide this for inner system use. 111 * @StageModelOnly 112 * @since 9 113 */ 114 TYPE_KEYGUARD, 115 /** 116 * Volume. 117 * 118 * @syscap SystemCapability.WindowManager.WindowManager.Core 119 * @systemapi Hide this for inner system use. 120 * @StageModelOnly 121 * @since 9 122 */ 123 TYPE_VOLUME_OVERLAY, 124 /** 125 * Navigation bar. 126 * 127 * @syscap SystemCapability.WindowManager.WindowManager.Core 128 * @systemapi Hide this for inner system use. 129 * @StageModelOnly 130 * @since 9 131 */ 132 TYPE_NAVIGATION_BAR, 133 /** 134 * Float. 135 * 136 * @permission ohos.permission.SYSTEM_FLOAT_WINDOW 137 * @syscap SystemCapability.WindowManager.WindowManager.Core 138 * @StageModelOnly 139 * @since 9 140 */ 141 TYPE_FLOAT, 142 /** 143 * Wallpaper. 144 * 145 * @syscap SystemCapability.WindowManager.WindowManager.Core 146 * @systemapi Hide this for inner system use. 147 * @StageModelOnly 148 * @since 9 149 */ 150 TYPE_WALLPAPER, 151 /** 152 * Desktop. 153 * 154 * @syscap SystemCapability.WindowManager.WindowManager.Core 155 * @systemapi Hide this for inner system use. 156 * @StageModelOnly 157 * @since 9 158 */ 159 TYPE_DESKTOP, 160 /** 161 * Recent. 162 * 163 * @syscap SystemCapability.WindowManager.WindowManager.Core 164 * @systemapi Hide this for inner system use. 165 * @StageModelOnly 166 * @since 9 167 */ 168 TYPE_LAUNCHER_RECENT, 169 /** 170 * Dock. 171 * 172 * @syscap SystemCapability.WindowManager.WindowManager.Core 173 * @systemapi Hide this for inner system use. 174 * @StageModelOnly 175 * @since 9 176 */ 177 TYPE_LAUNCHER_DOCK, 178 /** 179 * Voice interaction. 180 * 181 * @syscap SystemCapability.WindowManager.WindowManager.Core 182 * @systemapi Hide this for inner system use. 183 * @StageModelOnly 184 * @since 9 185 */ 186 TYPE_VOICE_INTERACTION, 187 /** 188 * Pointer. 189 * 190 * @syscap SystemCapability.WindowManager.WindowManager.Core 191 * @systemapi Hide this for inner system use. 192 * @StageModelOnly 193 * @since 9 194 */ 195 TYPE_POINTER, 196 /** 197 * Float camera. 198 * 199 * @syscap SystemCapability.WindowManager.WindowManager.Core 200 * @systemapi Hide this for inner system use. 201 * @StageModelOnly 202 * @since 9 203 */ 204 TYPE_FLOAT_CAMERA, 205 /** 206 * Dialog. 207 * 208 * @syscap SystemCapability.WindowManager.WindowManager.Core 209 * @StageModelOnly 210 * @since 10 211 */ 212 TYPE_DIALOG, 213 /** 214 * Screenshot. 215 * 216 * @syscap SystemCapability.WindowManager.WindowManager.Core 217 * @systemapi Hide this for inner system use. 218 * @StageModelOnly 219 * @since 9 220 */ 221 TYPE_SCREENSHOT, 222 /** 223 * System Toast. 224 * 225 * @syscap SystemCapability.WindowManager.WindowManager.Core 226 * @systemapi Hide this for inner system use. 227 * @StageModelOnly 228 * @since 11 229 */ 230 TYPE_SYSTEM_TOAST, 231 /** 232 * Divider. 233 * 234 * @syscap SystemCapability.WindowManager.WindowManager.Core 235 * @systemapi Hide this for inner system use. 236 * @StageModelOnly 237 * @since 11 238 */ 239 TYPE_DIVIDER, 240 /** 241 * Global Search. 242 * 243 * @syscap SystemCapability.WindowManager.WindowManager.Core 244 * @systemapi Hide this for inner system use. 245 * @StageModelOnly 246 * @since 11 247 */ 248 TYPE_GLOBAL_SEARCH, 249 /** 250 * Handwrite. 251 * 252 * @syscap SystemCapability.Window.SessionManager 253 * @systemapi Hide this for inner system use. 254 * @StageModelOnly 255 * @since 12 256 */ 257 TYPE_HANDWRITE 258 } 259 260 /** 261 * Describes the type of avoid area 262 * 263 * @enum { number } 264 * @syscap SystemCapability.WindowManager.WindowManager.Core 265 * @since 7 266 */ 267 /** 268 * Describes the type of avoid area 269 * 270 * @enum { number } 271 * @syscap SystemCapability.WindowManager.WindowManager.Core 272 * @atomicservice 273 * @since 11 274 */ 275 /** 276 * Describes the type of avoid area 277 * 278 * @enum { number } 279 * @syscap SystemCapability.WindowManager.WindowManager.Core 280 * @crossplatform 281 * @atomicservice 282 * @since 12 283 */ 284 enum AvoidAreaType { 285 /** 286 * Default area of the system 287 * 288 * @syscap SystemCapability.WindowManager.WindowManager.Core 289 * @since 7 290 */ 291 /** 292 * Default area of the system 293 * 294 * @syscap SystemCapability.WindowManager.WindowManager.Core 295 * @atomicservice 296 * @since 11 297 */ 298 /** 299 * Default area of the system 300 * 301 * @syscap SystemCapability.WindowManager.WindowManager.Core 302 * @crossplatform 303 * @atomicservice 304 * @since 12 305 */ 306 TYPE_SYSTEM, 307 308 /** 309 * Notch 310 * 311 * @syscap SystemCapability.WindowManager.WindowManager.Core 312 * @since 7 313 */ 314 /** 315 * Notch 316 * 317 * @syscap SystemCapability.WindowManager.WindowManager.Core 318 * @atomicservice 319 * @since 11 320 */ 321 /** 322 * Notch 323 * 324 * @syscap SystemCapability.WindowManager.WindowManager.Core 325 * @crossplatform 326 * @atomicservice 327 * @since 12 328 */ 329 TYPE_CUTOUT, 330 331 /** 332 * Area for system gesture 333 * 334 * @syscap SystemCapability.WindowManager.WindowManager.Core 335 * @since 9 336 */ 337 /** 338 * Area for system gesture 339 * 340 * @syscap SystemCapability.WindowManager.WindowManager.Core 341 * @atomicservice 342 * @since 11 343 */ 344 /** 345 * Area for system gesture 346 * 347 * @syscap SystemCapability.WindowManager.WindowManager.Core 348 * @crossplatform 349 * @atomicservice 350 * @since 12 351 */ 352 TYPE_SYSTEM_GESTURE, 353 354 /** 355 * Area for keyboard 356 * 357 * @syscap SystemCapability.WindowManager.WindowManager.Core 358 * @since 9 359 */ 360 /** 361 * Area for keyboard 362 * 363 * @syscap SystemCapability.WindowManager.WindowManager.Core 364 * @atomicservice 365 * @since 11 366 */ 367 /** 368 * Area for keyboard 369 * 370 * @syscap SystemCapability.WindowManager.WindowManager.Core 371 * @crossplatform 372 * @atomicservice 373 * @since 12 374 */ 375 TYPE_KEYBOARD, 376 377 /** 378 * Area for navigation indicator 379 * 380 * @syscap SystemCapability.WindowManager.WindowManager.Core 381 * @atomicservice 382 * @since 11 383 */ 384 /** 385 * Area for navigation indicator 386 * 387 * @syscap SystemCapability.WindowManager.WindowManager.Core 388 * @crossplatform 389 * @atomicservice 390 * @since 12 391 */ 392 TYPE_NAVIGATION_INDICATOR 393 } 394 /** 395 * Describes the window mode of an application 396 * 397 * @enum { number } 398 * @syscap SystemCapability.WindowManager.WindowManager.Core 399 * @systemapi Hide this for inner system use. 400 * @since 7 401 */ 402 enum WindowMode { 403 /** 404 * Undefined mode of the window 405 * 406 * @syscap SystemCapability.WindowManager.WindowManager.Core 407 * @systemapi Hide this for inner system use. 408 * @since 7 409 */ 410 UNDEFINED = 1, 411 /** 412 * Fullscreen mode of the window 413 * 414 * @syscap SystemCapability.WindowManager.WindowManager.Core 415 * @systemapi Hide this for inner system use. 416 * @since 7 417 */ 418 FULLSCREEN, 419 /** 420 * Primary mode of the window 421 * 422 * @syscap SystemCapability.WindowManager.WindowManager.Core 423 * @systemapi Hide this for inner system use. 424 * @since 7 425 */ 426 PRIMARY, 427 /** 428 * Secondary mode of the window 429 * 430 * @syscap SystemCapability.WindowManager.WindowManager.Core 431 * @systemapi Hide this for inner system use. 432 * @since 7 433 */ 434 SECONDARY, 435 /** 436 * Floating mode of the window 437 * 438 * @syscap SystemCapability.WindowManager.WindowManager.Core 439 * @systemapi Hide this for inner system use. 440 * @since 7 441 */ 442 FLOATING 443 } 444 445 /** 446 * Describes the mode of window layout 447 * 448 * @enum { number } 449 * @syscap SystemCapability.WindowManager.WindowManager.Core 450 * @systemapi Hide this for inner system use. 451 * @since 9 452 */ 453 enum WindowLayoutMode { 454 /** 455 * CASCADE 456 * 457 * @syscap SystemCapability.WindowManager.WindowManager.Core 458 * @systemapi Hide this for inner system use. 459 * @since 9 460 */ 461 WINDOW_LAYOUT_MODE_CASCADE, 462 /** 463 * TILE 464 * 465 * @syscap SystemCapability.WindowManager.WindowManager.Core 466 * @systemapi Hide this for inner system use. 467 * @since 9 468 */ 469 WINDOW_LAYOUT_MODE_TILE 470 } 471 472 /** 473 * Describes the window status of an application 474 * 475 * @enum { number } 476 * @syscap SystemCapability.Window.SessionManager 477 * @since 11 478 */ 479 enum WindowStatusType { 480 /** 481 * Undefined status of the window 482 * 483 * @syscap SystemCapability.Window.SessionManager 484 * @since 11 485 */ 486 UNDEFINED = 0, 487 /** 488 * Full screen status of the window 489 * 490 * @syscap SystemCapability.Window.SessionManager 491 * @since 11 492 */ 493 FULL_SCREEN, 494 /** 495 * Maximize status of the window 496 * 497 * @syscap SystemCapability.Window.SessionManager 498 * @since 11 499 */ 500 MAXIMIZE, 501 /** 502 * Minimize status of the window 503 * 504 * @syscap SystemCapability.Window.SessionManager 505 * @since 11 506 */ 507 MINIMIZE, 508 /** 509 * Floating status of the window 510 * 511 * @syscap SystemCapability.Window.SessionManager 512 * @since 11 513 */ 514 FLOATING, 515 /** 516 * Split screen status of the window 517 * 518 * @syscap SystemCapability.Window.SessionManager 519 * @since 11 520 */ 521 SPLIT_SCREEN 522 } 523 524 /** 525 * Properties of status bar and navigation bar, it couldn't update automatically 526 * 527 * @interface SystemBarProperties 528 * @syscap SystemCapability.WindowManager.WindowManager.Core 529 * @since 6 530 */ 531 /** 532 * Properties of status bar and navigation bar, it couldn't update automatically 533 * 534 * @interface SystemBarProperties 535 * @syscap SystemCapability.WindowManager.WindowManager.Core 536 * @atomicservice 537 * @since 12 538 */ 539 interface SystemBarProperties { 540 /** 541 * The color of the status bar. 542 * 543 * @syscap SystemCapability.WindowManager.WindowManager.Core 544 * @since 6 545 */ 546 /** 547 * The color of the status bar. 548 * 549 * @syscap SystemCapability.WindowManager.WindowManager.Core 550 * @atomicservice 551 * @since 12 552 */ 553 statusBarColor?: string; 554 555 /** 556 * The light icon of the status bar. 557 * 558 * @syscap SystemCapability.WindowManager.WindowManager.Core 559 * @since 7 560 */ 561 /** 562 * The light icon of the status bar. 563 * 564 * @syscap SystemCapability.WindowManager.WindowManager.Core 565 * @atomicservice 566 * @since 12 567 */ 568 isStatusBarLightIcon?: boolean; 569 570 /** 571 * The content color of the status bar 572 * 573 * @syscap SystemCapability.WindowManager.WindowManager.Core 574 * @since 8 575 */ 576 /** 577 * The content color of the status bar 578 * 579 * @syscap SystemCapability.WindowManager.WindowManager.Core 580 * @atomicservice 581 * @since 12 582 */ 583 statusBarContentColor?: string; 584 585 /** 586 * The color of the navigation bar. 587 * 588 * @syscap SystemCapability.WindowManager.WindowManager.Core 589 * @since 6 590 */ 591 /** 592 * The color of the navigation bar. 593 * 594 * @syscap SystemCapability.WindowManager.WindowManager.Core 595 * @atomicservice 596 * @since 12 597 */ 598 navigationBarColor?: string; 599 600 /** 601 * The light icon of the navigation bar. 602 * 603 * @syscap SystemCapability.WindowManager.WindowManager.Core 604 * @since 7 605 */ 606 /** 607 * The light icon of the navigation bar. 608 * 609 * @syscap SystemCapability.WindowManager.WindowManager.Core 610 * @atomicservice 611 * @since 12 612 */ 613 isNavigationBarLightIcon?: boolean; 614 615 /** 616 * The content color of the navigation bar 617 * 618 * @syscap SystemCapability.WindowManager.WindowManager.Core 619 * @since 8 620 */ 621 /** 622 * The content color of the navigation bar 623 * 624 * @syscap SystemCapability.WindowManager.WindowManager.Core 625 * @atomicservice 626 * @since 12 627 */ 628 navigationBarContentColor?: string; 629 630 /** 631 * Enable the animation of the status bar. 632 * 633 * @syscap SystemCapability.Window.SessionManager 634 * @atomicservice 635 * @since 12 636 */ 637 enableStatusBarAnimation?: boolean; 638 639 /** 640 * Enable the animation of the navigation bar. 641 * 642 * @syscap SystemCapability.Window.SessionManager 643 * @atomicservice 644 * @since 12 645 */ 646 enableNavigationBarAnimation?: boolean; 647 } 648 649 /** 650 * System bar tint of region 651 * 652 * @interface SystemBarRegionTint 653 * @syscap SystemCapability.WindowManager.WindowManager.Core 654 * @systemapi Hide this for inner system use. 655 * @since 8 656 */ 657 interface SystemBarRegionTint { 658 /** 659 * System bar type 660 * 661 * @syscap SystemCapability.WindowManager.WindowManager.Core 662 * @systemapi Hide this for inner system use. 663 * @since 8 664 */ 665 type: WindowType; 666 667 /** 668 * The visibility of system bar 669 * 670 * @syscap SystemCapability.WindowManager.WindowManager.Core 671 * @systemapi Hide this for inner system use. 672 * @since 8 673 */ 674 isEnable?: boolean; 675 676 /** 677 * The region of system bar 678 * 679 * @syscap SystemCapability.WindowManager.WindowManager.Core 680 * @systemapi Hide this for inner system use. 681 * @since 8 682 */ 683 region?: Rect; 684 685 /** 686 * The background color of the system bar. 687 * 688 * @syscap SystemCapability.WindowManager.WindowManager.Core 689 * @systemapi Hide this for inner system use. 690 * @since 8 691 */ 692 backgroundColor?: string; 693 694 /** 695 * The content color of the system bar. 696 * 697 * @syscap SystemCapability.WindowManager.WindowManager.Core 698 * @systemapi Hide this for inner system use. 699 * @since 8 700 */ 701 contentColor?: string; 702 } 703 704 /** 705 * System bar tint state for systemui 706 * 707 * @interface SystemBarTintState 708 * @syscap SystemCapability.WindowManager.WindowManager.Core 709 * @systemapi Hide this for inner system use. 710 * @since 8 711 */ 712 interface SystemBarTintState { 713 /** 714 * Id of display 715 * 716 * @syscap SystemCapability.WindowManager.WindowManager.Core 717 * @systemapi Hide this for inner system use. 718 * @since 8 719 */ 720 displayId: number; 721 /** 722 * Region tint of systembar 723 * 724 * @syscap SystemCapability.WindowManager.WindowManager.Core 725 * @systemapi Hide this for inner system use. 726 * @since 8 727 */ 728 regionTint: Array<SystemBarRegionTint>; 729 } 730 731 /** 732 * Rectangle 733 * 734 * @interface Rect 735 * @syscap SystemCapability.WindowManager.WindowManager.Core 736 * @since 7 737 */ 738 /** 739 * Rectangle 740 * 741 * @interface Rect 742 * @syscap SystemCapability.WindowManager.WindowManager.Core 743 * @crossplatform 744 * @since 10 745 */ 746 /** 747 * Rectangle 748 * 749 * @interface Rect 750 * @syscap SystemCapability.WindowManager.WindowManager.Core 751 * @crossplatform 752 * @atomicservice 753 * @since 11 754 */ 755 interface Rect { 756 757 /** 758 * The left of the Rect. 759 * 760 * @syscap SystemCapability.WindowManager.WindowManager.Core 761 * @since 7 762 */ 763 /** 764 * The left of the Rect. 765 * 766 * @syscap SystemCapability.WindowManager.WindowManager.Core 767 * @crossplatform 768 * @since 10 769 */ 770 /** 771 * The left of the Rect. 772 * 773 * @syscap SystemCapability.WindowManager.WindowManager.Core 774 * @crossplatform 775 * @atomicservice 776 * @since 11 777 */ 778 left: number; 779 780 /** 781 * The top of the Rect. 782 * 783 * @syscap SystemCapability.WindowManager.WindowManager.Core 784 * @since 7 785 */ 786 /** 787 * The top of the Rect. 788 * 789 * @syscap SystemCapability.WindowManager.WindowManager.Core 790 * @crossplatform 791 * @since 10 792 */ 793 /** 794 * The top of the Rect. 795 * 796 * @syscap SystemCapability.WindowManager.WindowManager.Core 797 * @crossplatform 798 * @atomicservice 799 * @since 11 800 */ 801 top: number; 802 803 /** 804 * The width of the Rect. 805 * 806 * @syscap SystemCapability.WindowManager.WindowManager.Core 807 * @since 7 808 */ 809 /** 810 * The width of the Rect. 811 * 812 * @syscap SystemCapability.WindowManager.WindowManager.Core 813 * @crossplatform 814 * @since 10 815 */ 816 /** 817 * The width of the Rect. 818 * 819 * @syscap SystemCapability.WindowManager.WindowManager.Core 820 * @crossplatform 821 * @atomicservice 822 * @since 11 823 */ 824 width: number; 825 826 /** 827 * The height of the Rect. 828 * 829 * @syscap SystemCapability.WindowManager.WindowManager.Core 830 * @since 7 831 */ 832 /** 833 * The height of the Rect. 834 * 835 * @syscap SystemCapability.WindowManager.WindowManager.Core 836 * @crossplatform 837 * @since 10 838 */ 839 /** 840 * The height of the Rect. 841 * 842 * @syscap SystemCapability.WindowManager.WindowManager.Core 843 * @crossplatform 844 * @atomicservice 845 * @since 11 846 */ 847 height: number; 848 } 849 850 /** 851 * Avoid area 852 * 853 * @interface AvoidArea 854 * @syscap SystemCapability.WindowManager.WindowManager.Core 855 * @since 7 856 */ 857 /** 858 * Avoid area 859 * 860 * @interface AvoidArea 861 * @syscap SystemCapability.WindowManager.WindowManager.Core 862 * @atomicservice 863 * @since 11 864 */ 865 /** 866 * Avoid area 867 * 868 * @interface AvoidArea 869 * @syscap SystemCapability.WindowManager.WindowManager.Core 870 * @crossplatform 871 * @atomicservice 872 * @since 12 873 */ 874 interface AvoidArea { 875 /** 876 * Whether avoidArea is visible on screen 877 * 878 * @type { boolean } 879 * @syscap SystemCapability.WindowManager.WindowManager.Core 880 * @since 9 881 */ 882 /** 883 * Whether avoidArea is visible on screen 884 * 885 * @type { boolean } 886 * @syscap SystemCapability.WindowManager.WindowManager.Core 887 * @atomicservice 888 * @since 11 889 */ 890 visible: boolean; 891 892 /** 893 * Rectangle on the left of the screen 894 * 895 * @type { Rect } 896 * @syscap SystemCapability.WindowManager.WindowManager.Core 897 * @since 7 898 */ 899 /** 900 * Rectangle on the left of the screen 901 * 902 * @type { Rect } 903 * @syscap SystemCapability.WindowManager.WindowManager.Core 904 * @atomicservice 905 * @since 11 906 */ 907 /** 908 * Rectangle on the left of the screen 909 * 910 * @type { Rect } 911 * @syscap SystemCapability.WindowManager.WindowManager.Core 912 * @crossplatform 913 * @atomicservice 914 * @since 12 915 */ 916 leftRect: Rect; 917 918 /** 919 * Rectangle on the top of the screen 920 * 921 * @type { Rect } 922 * @syscap SystemCapability.WindowManager.WindowManager.Core 923 * @since 7 924 */ 925 /** 926 * Rectangle on the top of the screen 927 * 928 * @type { Rect } 929 * @syscap SystemCapability.WindowManager.WindowManager.Core 930 * @atomicservice 931 * @since 11 932 */ 933 /** 934 * Rectangle on the top of the screen 935 * 936 * @type { Rect } 937 * @syscap SystemCapability.WindowManager.WindowManager.Core 938 * @crossplatform 939 * @atomicservice 940 * @since 12 941 */ 942 topRect: Rect; 943 944 /** 945 * Rectangle on the right of the screen 946 * 947 * @type { Rect } 948 * @syscap SystemCapability.WindowManager.WindowManager.Core 949 * @since 7 950 */ 951 /** 952 * Rectangle on the right of the screen 953 * 954 * @type { Rect } 955 * @syscap SystemCapability.WindowManager.WindowManager.Core 956 * @atomicservice 957 * @since 11 958 */ 959 /** 960 * Rectangle on the right of the screen 961 * 962 * @type { Rect } 963 * @syscap SystemCapability.WindowManager.WindowManager.Core 964 * @crossplatform 965 * @atomicservice 966 * @since 12 967 */ 968 rightRect: Rect; 969 970 /** 971 * Rectangle on the bottom of the screen 972 * 973 * @type { Rect } 974 * @syscap SystemCapability.WindowManager.WindowManager.Core 975 * @since 7 976 */ 977 /** 978 * Rectangle on the bottom of the screen 979 * 980 * @type { Rect } 981 * @syscap SystemCapability.WindowManager.WindowManager.Core 982 * @atomicservice 983 * @since 11 984 */ 985 /** 986 * Rectangle on the bottom of the screen 987 * 988 * @type { Rect } 989 * @syscap SystemCapability.WindowManager.WindowManager.Core 990 * @crossplatform 991 * @atomicservice 992 * @since 12 993 */ 994 bottomRect: Rect; 995 } 996 997 /** 998 * Window size 999 * 1000 * @interface Size 1001 * @syscap SystemCapability.WindowManager.WindowManager.Core 1002 * @since 7 1003 */ 1004 /** 1005 * Window size 1006 * 1007 * @interface Size 1008 * @syscap SystemCapability.WindowManager.WindowManager.Core 1009 * @crossplatform 1010 * @since 10 1011 */ 1012 /** 1013 * Window size 1014 * 1015 * @interface Size 1016 * @syscap SystemCapability.WindowManager.WindowManager.Core 1017 * @crossplatform 1018 * @atomicservice 1019 * @since 11 1020 */ 1021 interface Size { 1022 /** 1023 * The width of the window. 1024 * 1025 * @type { number } 1026 * @syscap SystemCapability.WindowManager.WindowManager.Core 1027 * @since 7 1028 */ 1029 /** 1030 * The width of the window. 1031 * 1032 * @type { number } 1033 * @syscap SystemCapability.WindowManager.WindowManager.Core 1034 * @crossplatform 1035 * @since 10 1036 */ 1037 /** 1038 * The width of the window. 1039 * 1040 * @type { number } 1041 * @syscap SystemCapability.WindowManager.WindowManager.Core 1042 * @crossplatform 1043 * @atomicservice 1044 * @since 11 1045 */ 1046 width: number; 1047 1048 /** 1049 * The height of the window. 1050 * 1051 * @syscap SystemCapability.WindowManager.WindowManager.Core 1052 * @since 7 1053 */ 1054 /** 1055 * The height of the window. 1056 * 1057 * @type { number } 1058 * @syscap SystemCapability.WindowManager.WindowManager.Core 1059 * @crossplatform 1060 * @since 10 1061 */ 1062 /** 1063 * The height of the window. 1064 * 1065 * @type { number } 1066 * @syscap SystemCapability.WindowManager.WindowManager.Core 1067 * @crossplatform 1068 * @atomicservice 1069 * @since 11 1070 */ 1071 height: number; 1072 } 1073 1074 /** 1075 * Properties of window, it couldn't update automatically 1076 * 1077 * @interface WindowProperties 1078 * @syscap SystemCapability.WindowManager.WindowManager.Core 1079 * @since 6 1080 */ 1081 /** 1082 * Properties of window, it couldn't update automatically 1083 * 1084 * @interface WindowProperties 1085 * @syscap SystemCapability.WindowManager.WindowManager.Core 1086 * @crossplatform 1087 * @since 10 1088 */ 1089 /** 1090 * Properties of window, it couldn't update automatically 1091 * 1092 * @interface WindowProperties 1093 * @syscap SystemCapability.WindowManager.WindowManager.Core 1094 * @crossplatform 1095 * @atomicservice 1096 * @since 11 1097 */ 1098 interface WindowProperties { 1099 /** 1100 * The position and size of the window 1101 * 1102 * @type { Rect } 1103 * @syscap SystemCapability.WindowManager.WindowManager.Core 1104 * @since 7 1105 */ 1106 /** 1107 * The position and size of the window 1108 * 1109 * @type { Rect } 1110 * @syscap SystemCapability.WindowManager.WindowManager.Core 1111 * @crossplatform 1112 * @since 10 1113 */ 1114 /** 1115 * The position and size of the window 1116 * 1117 * @type { Rect } 1118 * @syscap SystemCapability.WindowManager.WindowManager.Core 1119 * @crossplatform 1120 * @atomicservice 1121 * @since 11 1122 */ 1123 windowRect: Rect; 1124 1125 /** 1126 * The position relative to the window and size of drawable area 1127 * 1128 * @type { Rect } 1129 * @syscap SystemCapability.WindowManager.WindowManager.Core 1130 * @since 11 1131 */ 1132 drawableRect: Rect; 1133 1134 /** 1135 * Window type 1136 * 1137 * @type { WindowType } 1138 * @syscap SystemCapability.WindowManager.WindowManager.Core 1139 * @since 7 1140 */ 1141 type: WindowType; 1142 1143 /** 1144 * Whether the window is displayed in full screen mode. The default value is false. 1145 * 1146 * @type { boolean } 1147 * @syscap SystemCapability.WindowManager.WindowManager.Core 1148 * @since 6 1149 */ 1150 /** 1151 * Whether the window is displayed in full screen mode. The default value is false. 1152 * 1153 * @type { boolean } 1154 * @syscap SystemCapability.WindowManager.WindowManager.Core 1155 * @atomicservice 1156 * @since 12 1157 */ 1158 isFullScreen: boolean; 1159 1160 /** 1161 * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false. 1162 * 1163 * @type { boolean } 1164 * @syscap SystemCapability.WindowManager.WindowManager.Core 1165 * @since 7 1166 */ 1167 /** 1168 * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false. 1169 * 1170 * @type { boolean } 1171 * @syscap SystemCapability.WindowManager.WindowManager.Core 1172 * @atomicservice 1173 * @since 12 1174 */ 1175 isLayoutFullScreen: boolean; 1176 1177 /** 1178 * Whether the window can gain focus. The default value is true 1179 * 1180 * @type { boolean } 1181 * @syscap SystemCapability.WindowManager.WindowManager.Core 1182 * @since 7 1183 */ 1184 focusable: boolean; 1185 1186 /** 1187 * Whether the window is touchable. The default value is false 1188 * 1189 * @type { boolean } 1190 * @syscap SystemCapability.WindowManager.WindowManager.Core 1191 * @since 7 1192 */ 1193 touchable: boolean; 1194 1195 /** 1196 * Brightness value of window. 1197 * 1198 * @syscap SystemCapability.WindowManager.WindowManager.Core 1199 * @since 6 1200 */ 1201 /** 1202 * Brightness value of window. 1203 * 1204 * @type { number } 1205 * @syscap SystemCapability.WindowManager.WindowManager.Core 1206 * @crossplatform 1207 * @since 10 1208 */ 1209 /** 1210 * Brightness value of window. 1211 * 1212 * @type { number } 1213 * @syscap SystemCapability.WindowManager.WindowManager.Core 1214 * @crossplatform 1215 * @atomicservice 1216 * @since 11 1217 */ 1218 brightness: number; 1219 1220 /** 1221 * The dimbehind value of window. 1222 * 1223 * @type { number } 1224 * @syscap SystemCapability.WindowManager.WindowManager.Core 1225 * @since 7 1226 * @deprecated since 9 1227 */ 1228 dimBehindValue: number; 1229 1230 /** 1231 * Whether keep screen on. 1232 * 1233 * @syscap SystemCapability.WindowManager.WindowManager.Core 1234 * @since 6 1235 */ 1236 /** 1237 * Whether keep screen on. 1238 * 1239 * @type { boolean } 1240 * @syscap SystemCapability.WindowManager.WindowManager.Core 1241 * @crossplatform 1242 * @since 10 1243 */ 1244 /** 1245 * Whether keep screen on. 1246 * 1247 * @type { boolean } 1248 * @syscap SystemCapability.WindowManager.WindowManager.Core 1249 * @crossplatform 1250 * @atomicservice 1251 * @since 11 1252 */ 1253 isKeepScreenOn: boolean; 1254 1255 /** 1256 * Whether make window in privacy mode or not. 1257 * 1258 * @type { boolean } 1259 * @syscap SystemCapability.WindowManager.WindowManager.Core 1260 * @since 7 1261 */ 1262 isPrivacyMode: boolean; 1263 1264 /** 1265 * Whether is round corner or not. 1266 * 1267 * @type { boolean } 1268 * @syscap SystemCapability.WindowManager.WindowManager.Core 1269 * @since 7 1270 * @deprecated since 9 1271 */ 1272 isRoundCorner: boolean; 1273 1274 /** 1275 * Whether is transparent or not. 1276 * 1277 * @type { boolean } 1278 * @syscap SystemCapability.WindowManager.WindowManager.Core 1279 * @since 7 1280 */ 1281 isTransparent: boolean; 1282 1283 /** 1284 * Window id. 1285 * 1286 * @type { number } 1287 * @syscap SystemCapability.WindowManager.WindowManager.Core 1288 * @since 9 1289 */ 1290 id: number; 1291 } 1292 1293 /** 1294 * Type of allowing the specified of color space. 1295 * 1296 * @enum { number } 1297 * @syscap SystemCapability.WindowManager.WindowManager.Core 1298 * @since 8 1299 */ 1300 /** 1301 * Type of allowing the specified of color space. 1302 * 1303 * @enum { number } 1304 * @syscap SystemCapability.WindowManager.WindowManager.Core 1305 * @crossplatform 1306 * @since 11 1307 */ 1308 enum ColorSpace { 1309 /** 1310 * Default color space. 1311 * 1312 * @syscap SystemCapability.WindowManager.WindowManager.Core 1313 * @since 8 1314 */ 1315 /** 1316 * Default color space. 1317 * 1318 * @syscap SystemCapability.WindowManager.WindowManager.Core 1319 * @crossplatform 1320 * @since 11 1321 */ 1322 DEFAULT, 1323 /** 1324 * Wide gamut color space. The specific wide color gamut depends on thr screen. 1325 * 1326 * @syscap SystemCapability.WindowManager.WindowManager.Core 1327 * @since 8 1328 */ 1329 /** 1330 * Wide gamut color space. The specific wide color gamut depends on thr screen. 1331 * 1332 * @syscap SystemCapability.WindowManager.WindowManager.Core 1333 * @crossplatform 1334 * @since 11 1335 */ 1336 WIDE_GAMUT 1337 } 1338 /** 1339 * Describes the scale Transition Options of window 1340 * 1341 * @interface ScaleOptions 1342 * @syscap SystemCapability.WindowManager.WindowManager.Core 1343 * @systemapi 1344 * @since 9 1345 */ 1346 interface ScaleOptions { 1347 /** 1348 * The scale param of x direction. Default is 1.f 1349 * 1350 * @syscap SystemCapability.WindowManager.WindowManager.Core 1351 * @systemapi 1352 * @since 9 1353 */ 1354 x?: number; 1355 1356 /** 1357 * The scale param of y direction. Default is 1.f 1358 * 1359 * @syscap SystemCapability.WindowManager.WindowManager.Core 1360 * @systemapi 1361 * @since 9 1362 */ 1363 y?: number; 1364 1365 /** 1366 * The scale param of pivot point of x. Default is 0.5f, Interval is 0.f - 1.f 1367 * 1368 * @syscap SystemCapability.WindowManager.WindowManager.Core 1369 * @systemapi 1370 * @since 9 1371 */ 1372 pivotX?: number; 1373 1374 /** 1375 * The scale param of pivot point of y. Default is 0.5f, Interval is 0.f - 1.f 1376 * 1377 * @syscap SystemCapability.WindowManager.WindowManager.Core 1378 * @systemapi 1379 * @since 9 1380 */ 1381 pivotY?: number; 1382 } 1383 1384 /** 1385 * Describes the rotate Transition Options of window 1386 * 1387 * @interface RotateOptions 1388 * @syscap SystemCapability.WindowManager.WindowManager.Core 1389 * @systemapi 1390 * @since 9 1391 */ 1392 interface RotateOptions { 1393 /** 1394 * The rotate degree of x direction. Default value is 0.f 1395 * 1396 * @type { ?number } 1397 * @syscap SystemCapability.WindowManager.WindowManager.Core 1398 * @systemapi 1399 * @since 9 1400 */ 1401 x?: number; 1402 1403 /** 1404 * The rotate degree of y direction. Default value is 0.f 1405 * 1406 * @type { ?number } 1407 * @syscap SystemCapability.WindowManager.WindowManager.Core 1408 * @systemapi 1409 * @since 9 1410 */ 1411 y?: number; 1412 1413 /** 1414 * The rotate degree of z direction. Default value is 0.f 1415 * 1416 * @type { ?number } 1417 * @syscap SystemCapability.WindowManager.WindowManager.Core 1418 * @systemapi 1419 * @since 9 1420 */ 1421 z?: number; 1422 1423 /** 1424 * The param of pivot point of x. Default is 0.5f, Interval is 0.f - 1.f 1425 * 1426 * @type { ?number } 1427 * @syscap SystemCapability.WindowManager.WindowManager.Core 1428 * @systemapi 1429 * @since 9 1430 */ 1431 pivotX?: number; 1432 1433 /** 1434 * The param of pivot point of y. Default is 0.5f, Interval is 0.f - 1.f 1435 * 1436 * @type { ?number } 1437 * @syscap SystemCapability.WindowManager.WindowManager.Core 1438 * @systemapi 1439 * @since 9 1440 */ 1441 pivotY?: number; 1442 } 1443 1444 /** 1445 * Describes the translate Transition Options of window 1446 * 1447 * @interface TranslateOptions 1448 * @syscap SystemCapability.WindowManager.WindowManager.Core 1449 * @systemapi 1450 * @since 9 1451 */ 1452 interface TranslateOptions { 1453 /** 1454 * The translate pixel param of x direction. Default is 0.f 1455 * 1456 * @type { ?number } 1457 * @syscap SystemCapability.WindowManager.WindowManager.Core 1458 * @systemapi 1459 * @since 9 1460 */ 1461 x?: number; 1462 1463 /** 1464 * The translate pixel param of y direction. Default is 0.f 1465 * 1466 * @type { ?number } 1467 * @syscap SystemCapability.WindowManager.WindowManager.Core 1468 * @systemapi 1469 * @since 9 1470 */ 1471 y?: number; 1472 1473 /** 1474 * The translate pixel param of z direction. Default is 0.f 1475 * 1476 * @type { ?number } 1477 * @syscap SystemCapability.WindowManager.WindowManager.Core 1478 * @systemapi 1479 * @since 9 1480 */ 1481 z?: number; 1482 } 1483 1484 /** 1485 * Transition Context 1486 * 1487 * @interface TransitionContext 1488 * @syscap SystemCapability.WindowManager.WindowManager.Core 1489 * @systemapi 1490 * @since 9 1491 */ 1492 interface TransitionContext { 1493 /** 1494 * The target window with animation 1495 * 1496 * @type { Window } 1497 * @syscap SystemCapability.WindowManager.WindowManager.Core 1498 * @systemapi 1499 * @since 9 1500 */ 1501 toWindow: Window; 1502 1503 /** 1504 * Set complete state of animation transition 1505 * 1506 * @param { boolean } isCompleted - Whether the transition is complete. The value true means that the transition is complete, and false means the opposite. 1507 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1508 * 2. Incorrect parameter types. 1509 * @syscap SystemCapability.WindowManager.WindowManager.Core 1510 * @systemapi 1511 * @since 9 1512 */ 1513 completeTransition(isCompleted: boolean): void; 1514 } 1515 1516 /** 1517 * Transition Controller 1518 * 1519 * @interface TransitionController 1520 * @syscap SystemCapability.WindowManager.WindowManager.Core 1521 * @systemapi 1522 * @since 9 1523 */ 1524 interface TransitionController { 1525 /** 1526 * Animation configuration when showing window 1527 * 1528 * @param { TransitionContext } context - The transition context. 1529 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1530 * 2. Incorrect parameter types. 1531 * @syscap SystemCapability.WindowManager.WindowManager.Core 1532 * @systemapi 1533 * @since 9 1534 */ 1535 animationForShown(context: TransitionContext): void; 1536 /** 1537 * Animation configuration when hiding window 1538 * 1539 * @param { TransitionContext } context - The transition context. 1540 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1541 * 2. Incorrect parameter types. 1542 * @syscap SystemCapability.WindowManager.WindowManager.Core 1543 * @systemapi 1544 * @since 9 1545 */ 1546 animationForHidden(context: TransitionContext): void; 1547 } 1548 1549 /** 1550 * Configuration parameters for window creation. 1551 * 1552 * @interface Configuration 1553 * @syscap SystemCapability.WindowManager.WindowManager.Core 1554 * @since 9 1555 */ 1556 interface Configuration { 1557 /** 1558 * Indicates window id. 1559 * 1560 * @syscap SystemCapability.WindowManager.WindowManager.Core 1561 * @since 9 1562 */ 1563 name: string; 1564 1565 /** 1566 * Indicates window type 1567 * 1568 * @type { WindowType } 1569 * @syscap SystemCapability.WindowManager.WindowManager.Core 1570 * @since 9 1571 */ 1572 windowType: WindowType; 1573 1574 /** 1575 * Indicates window context. 1576 * 1577 * @type { ?BaseContext } 1578 * @syscap SystemCapability.WindowManager.WindowManager.Core 1579 * @since 9 1580 */ 1581 ctx?: BaseContext; 1582 1583 /** 1584 * Indicates display ID. 1585 * 1586 * @type { ?number } 1587 * @syscap SystemCapability.WindowManager.WindowManager.Core 1588 * @since 9 1589 */ 1590 displayId?: number; 1591 1592 /** 1593 * Indicates Parent window id 1594 * 1595 * @type { ?number } 1596 * @syscap SystemCapability.WindowManager.WindowManager.Core 1597 * @since 9 1598 */ 1599 parentId?: number; 1600 1601 /** 1602 * Indicates whether enable window decor, only support dialog, The default value is false. 1603 * 1604 * @type { ?boolean } 1605 * @syscap SystemCapability.Window.SessionManager 1606 * @since 12 1607 */ 1608 decorEnabled?: boolean; 1609 1610 /** 1611 * Indicates dialog window title when decor enabled. 1612 * 1613 * @type { ?string } 1614 * @syscap SystemCapability.Window.SessionManager 1615 * @since 12 1616 */ 1617 title?: string; 1618 } 1619 1620 /** 1621 * Limits of window. 1622 * 1623 * @interface WindowLimits 1624 * @syscap SystemCapability.Window.SessionManager 1625 * @since 11 1626 */ 1627 /** 1628 * Limits of window. 1629 * 1630 * @interface WindowLimits 1631 * @syscap SystemCapability.Window.SessionManager 1632 * @atomicservice 1633 * @since 12 1634 */ 1635 interface WindowLimits { 1636 1637 /** 1638 * The maximum width of the window. 1639 * 1640 * @type { ?number } 1641 * @syscap SystemCapability.Window.SessionManager 1642 * @since 11 1643 */ 1644 /** 1645 * The maximum width of the window. 1646 * 1647 * @type { ?number } 1648 * @syscap SystemCapability.Window.SessionManager 1649 * @atomicservice 1650 * @since 12 1651 */ 1652 maxWidth?: number; 1653 1654 /** 1655 * The maximum height of the window. 1656 * 1657 * @type { ?number } 1658 * @syscap SystemCapability.Window.SessionManager 1659 * @since 11 1660 */ 1661 /** 1662 * The maximum height of the window. 1663 * 1664 * @type { ?number } 1665 * @syscap SystemCapability.Window.SessionManager 1666 * @atomicservice 1667 * @since 12 1668 */ 1669 maxHeight?: number; 1670 1671 /** 1672 * The minimum width of the window. 1673 * 1674 * @type { ?number } 1675 * @syscap SystemCapability.Window.SessionManager 1676 * @since 11 1677 */ 1678 /** 1679 * The minimum width of the window. 1680 * 1681 * @type { ?number } 1682 * @syscap SystemCapability.Window.SessionManager 1683 * @atomicservice 1684 * @since 12 1685 */ 1686 minWidth?: number; 1687 1688 /** 1689 * The minimum height of the window. 1690 * 1691 * @type { ?number } 1692 * @syscap SystemCapability.Window.SessionManager 1693 * @since 11 1694 */ 1695 /** 1696 * The minimum height of the window. 1697 * 1698 * @type { ?number } 1699 * @syscap SystemCapability.Window.SessionManager 1700 * @atomicservice 1701 * @since 12 1702 */ 1703 minHeight?: number; 1704 } 1705 1706 /** 1707 * Rectangular area of the title buttons relative to the upper right corner of the window. 1708 * 1709 * @interface TitleButtonRect 1710 * @syscap SystemCapability.Window.SessionManager 1711 * @since 11 1712 */ 1713 /** 1714 * Rectangular area of the title buttons relative to the upper right corner of the window. 1715 * 1716 * @interface TitleButtonRect 1717 * @syscap SystemCapability.Window.SessionManager 1718 * @atomicservice 1719 * @since 12 1720 */ 1721 interface TitleButtonRect { 1722 1723 /** 1724 * The right of the Rect. 1725 * 1726 * @type { number } 1727 * @syscap SystemCapability.Window.SessionManager 1728 * @since 11 1729 */ 1730 /** 1731 * The right of the Rect. 1732 * 1733 * @type { number } 1734 * @syscap SystemCapability.Window.SessionManager 1735 * @atomicservice 1736 * @since 12 1737 */ 1738 right: number; 1739 1740 /** 1741 * The top of the Rect. 1742 * 1743 * @type { number } 1744 * @syscap SystemCapability.Window.SessionManager 1745 * @since 11 1746 */ 1747 /** 1748 * The top of the Rect. 1749 * 1750 * @type { number } 1751 * @syscap SystemCapability.Window.SessionManager 1752 * @atomicservice 1753 * @since 12 1754 */ 1755 top: number; 1756 1757 /** 1758 * The width of the Rect. 1759 * 1760 * @type { number } 1761 * @syscap SystemCapability.Window.SessionManager 1762 * @since 11 1763 */ 1764 /** 1765 * The width of the Rect. 1766 * 1767 * @type { number } 1768 * @syscap SystemCapability.Window.SessionManager 1769 * @atomicservice 1770 * @since 12 1771 */ 1772 width: number; 1773 1774 /** 1775 * The height of the Rect. 1776 * 1777 * @type { number } 1778 * @syscap SystemCapability.Window.SessionManager 1779 * @since 11 1780 */ 1781 /** 1782 * The height of the Rect. 1783 * 1784 * @type { number } 1785 * @syscap SystemCapability.Window.SessionManager 1786 * @atomicservice 1787 * @since 12 1788 */ 1789 height: number; 1790 } 1791 1792 /** 1793 * Rect change options 1794 * 1795 * @interface RectChangeOptions 1796 * @syscap SystemCapability.Window.SessionManager 1797 * @atomicservice 1798 * @since 12 1799 */ 1800 interface RectChangeOptions { 1801 /** 1802 * Rect 1803 * 1804 * @type { Rect } 1805 * @syscap SystemCapability.Window.SessionManager 1806 * @atomicservice 1807 * @since 12 1808 */ 1809 rect: Rect, 1810 1811 /** 1812 * Rect change reason 1813 * 1814 * @type { RectChangeReason } 1815 * @syscap SystemCapability.Window.SessionManager 1816 * @atomicservice 1817 * @since 12 1818 */ 1819 reason: RectChangeReason 1820 } 1821 1822 /** 1823 * Avoid area options 1824 * 1825 * @interface AvoidAreaOptions 1826 * @syscap SystemCapability.WindowManager.WindowManager.Core 1827 * @atomicservice 1828 * @since 12 1829 */ 1830 interface AvoidAreaOptions { 1831 /** 1832 * Avoid area type 1833 * 1834 * @type { AvoidAreaType } 1835 * @syscap SystemCapability.WindowManager.WindowManager.Core 1836 * @atomicservice 1837 * @since 12 1838 */ 1839 type: AvoidAreaType, 1840 1841 /** 1842 * Avoid area 1843 * 1844 * @type { AvoidArea } 1845 * @syscap SystemCapability.WindowManager.WindowManager.Core 1846 * @atomicservice 1847 * @since 12 1848 */ 1849 area: AvoidArea 1850 } 1851 1852 /** 1853 * Window rect change reason. 1854 * 1855 * @enum { number } 1856 * @syscap SystemCapability.Window.SessionManager 1857 * @atomicservice 1858 * @since 12 1859 */ 1860 enum RectChangeReason { 1861 /** 1862 * Default RectChangeReason. 1863 * 1864 * @syscap SystemCapability.Window.SessionManager 1865 * @atomicservice 1866 * @since 12 1867 */ 1868 UNDEFINED = 0, 1869 1870 /** 1871 * Window maximize. 1872 * 1873 * @syscap SystemCapability.Window.SessionManager 1874 * @atomicservice 1875 * @since 12 1876 */ 1877 MAXIMIZE, 1878 1879 /** 1880 * Window recover. 1881 * 1882 * @syscap SystemCapability.Window.SessionManager 1883 * @atomicservice 1884 * @since 12 1885 */ 1886 RECOVER, 1887 1888 /** 1889 * Window move. 1890 * 1891 * @syscap SystemCapability.Window.SessionManager 1892 * @atomicservice 1893 * @since 12 1894 */ 1895 MOVE, 1896 1897 /** 1898 * Window drag. 1899 * 1900 * @syscap SystemCapability.Window.SessionManager 1901 * @atomicservice 1902 * @since 12 1903 */ 1904 DRAG, 1905 1906 /** 1907 * Window drag start. 1908 * 1909 * @syscap SystemCapability.Window.SessionManager 1910 * @atomicservice 1911 * @since 12 1912 */ 1913 DRAG_START, 1914 1915 /** 1916 * Window drag end. 1917 * 1918 * @syscap SystemCapability.Window.SessionManager 1919 * @atomicservice 1920 * @since 12 1921 */ 1922 DRAG_END, 1923 } 1924 1925 /** 1926 * Create a window with a specific configuration 1927 * 1928 * @param { Configuration } config - Parameters for window creation. 1929 * @param { AsyncCallback<Window> } callback - Callback used to return the window created. 1930 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 1931 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1932 * 2. Incorrect parameter types. 1933 * @throws { BusinessError } 1300001 - Repeated operation. 1934 * @throws { BusinessError } 1300006 - This window context is abnormal. 1935 * @throws { BusinessError } 1300008 - The display device is abnormal. 1936 * @throws { BusinessError } 1300009 - The parent window is invalid. 1937 * @syscap SystemCapability.WindowManager.WindowManager.Core 1938 * @since 9 1939 */ 1940 function createWindow(config: Configuration, callback: AsyncCallback<Window>): void; 1941 1942 /** 1943 * Create a window with a specific configuration 1944 * 1945 * @param { Configuration } config - Parameters for window creation. 1946 * @returns { Promise<Window> } Promise used to return the window created. 1947 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 1948 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 1949 * 2. Incorrect parameter types. 1950 * @throws { BusinessError } 1300001 - Repeated operation. 1951 * @throws { BusinessError } 1300006 - This window context is abnormal. 1952 * @throws { BusinessError } 1300008 - The display device is abnormal. 1953 * @throws { BusinessError } 1300009 - The parent window is invalid. 1954 * @syscap SystemCapability.WindowManager.WindowManager.Core 1955 * @since 9 1956 */ 1957 function createWindow(config: Configuration): Promise<Window>; 1958 1959 /** 1960 * Create a sub window with a specific id and type, only support 7. 1961 * 1962 * @param { string } id - Indicates window id. 1963 * @param { WindowType } type - Indicates window type. 1964 * @param { AsyncCallback<Window> } callback - Callback used to return the subwindow created. 1965 * @syscap SystemCapability.WindowManager.WindowManager.Core 1966 * @FAModelOnly 1967 * @since 7 1968 * @deprecated since 9 1969 * @useinstead ohos.window#createWindow 1970 */ 1971 function create(id: string, type: WindowType, callback: AsyncCallback<Window>): void; 1972 1973 /** 1974 * Create a sub window with a specific id and type, only support 7. 1975 * 1976 * @param { string } id - Indicates window id. 1977 * @param { WindowType } type - Indicates window type. 1978 * @returns { Promise<Window> } Promise used to return the subwindow created. 1979 * @syscap SystemCapability.WindowManager.WindowManager.Core 1980 * @FAModelOnly 1981 * @since 7 1982 * @deprecated since 9 1983 * @useinstead ohos.window#createWindow 1984 */ 1985 function create(id: string, type: WindowType): Promise<Window>; 1986 1987 /** 1988 * Create a system or float window with a specific id and type. 1989 * 1990 * @param { BaseContext } ctx - Indicates the context on which the window depends 1991 * @param { string } id - Indicates window id. 1992 * @param { WindowType } type - Indicates window type. 1993 * @returns { Promise<Window> } Promise used to return the window created. 1994 * @syscap SystemCapability.WindowManager.WindowManager.Core 1995 * @since 8 1996 * @deprecated since 9 1997 * @useinstead ohos.window#createWindow 1998 */ 1999 function create(ctx: BaseContext, id: string, type: WindowType): Promise<Window>; 2000 2001 /** 2002 * Create a system or float window with a specific id and type. 2003 * 2004 * @param { BaseContext } ctx - Indicates the context on which the window depends 2005 * @param { string } id - Indicates window id. 2006 * @param { WindowType } type - Indicates window type. 2007 * @param { AsyncCallback<Window> } callback - Callback used to return the window created. 2008 * @syscap SystemCapability.WindowManager.WindowManager.Core 2009 * @since 8 2010 * @deprecated since 9 2011 * @useinstead ohos.window#createWindow 2012 */ 2013 function create(ctx: BaseContext, id: string, type: WindowType, callback: AsyncCallback<Window>): void; 2014 2015 /** 2016 * Find the window by id. 2017 * 2018 * @param { string } id - Indicates window id. 2019 * @param { AsyncCallback<Window> } callback - Callback used to return the window found. 2020 * @syscap SystemCapability.WindowManager.WindowManager.Core 2021 * @since 7 2022 * @deprecated since 9 2023 * @useinstead ohos.window#findWindow 2024 */ 2025 function find(id: string, callback: AsyncCallback<Window>): void; 2026 2027 /** 2028 * Find the window by id. 2029 * 2030 * @param { string } id - Indicates window id. 2031 * @returns { Promise<Window> } Window found. 2032 * @syscap SystemCapability.WindowManager.WindowManager.Core 2033 * @since 7 2034 * @deprecated since 9 2035 * @useinstead ohos.window#findWindow 2036 */ 2037 function find(id: string): Promise<Window>; 2038 2039 /** 2040 * Find the window by name. 2041 * 2042 * @param { string } name - Indicates window name. 2043 * @returns { Window } Window found. 2044 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2045 * 2. Incorrect parameter types. 2046 * @throws { BusinessError } 1300002 - This window state is abnormal. 2047 * @syscap SystemCapability.WindowManager.WindowManager.Core 2048 * @since 9 2049 */ 2050 /** 2051 * Find the window by name. 2052 * 2053 * @param { string } name - Indicates window name. 2054 * @returns { Window } Window found. 2055 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2056 * 2. Incorrect parameter types. 2057 * @throws { BusinessError } 1300002 - This window state is abnormal. 2058 * @syscap SystemCapability.WindowManager.WindowManager.Core 2059 * @crossplatform 2060 * @since 10 2061 */ 2062 /** 2063 * Find the window by name. 2064 * 2065 * @param { string } name - Indicates window name. 2066 * @returns { Window } Window found. 2067 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2068 * 2. Incorrect parameter types. 2069 * @throws { BusinessError } 1300002 - This window state is abnormal. 2070 * @syscap SystemCapability.WindowManager.WindowManager.Core 2071 * @crossplatform 2072 * @atomicservice 2073 * @since 11 2074 */ 2075 function findWindow(name: string): Window; 2076 2077 /** 2078 * Get the final show window. 2079 * 2080 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2081 * @syscap SystemCapability.WindowManager.WindowManager.Core 2082 * @FAModelOnly 2083 * @since 6 2084 * @deprecated since 9 2085 * @useinstead ohos.window#getLastWindow 2086 */ 2087 function getTopWindow(callback: AsyncCallback<Window>): void; 2088 2089 /** 2090 * Get the final show window. 2091 * 2092 * @returns { Promise<Window> } Promise used to return the top window obtained. 2093 * @syscap SystemCapability.WindowManager.WindowManager.Core 2094 * @FAModelOnly 2095 * @since 6 2096 * @deprecated since 9 2097 * @useinstead ohos.window#getLastWindow 2098 */ 2099 function getTopWindow(): Promise<Window>; 2100 2101 /** 2102 * Get the final show window. 2103 * 2104 * @param { BaseContext } ctx - Indicates the context on which the window depends 2105 * @returns { Promise<Window> } Promise used to return the top window obtained. 2106 * @syscap SystemCapability.WindowManager.WindowManager.Core 2107 * @since 8 2108 * @deprecated since 9 2109 * @useinstead ohos.window#getLastWindow 2110 */ 2111 function getTopWindow(ctx: BaseContext): Promise<Window>; 2112 2113 /** 2114 * Get the final show window. 2115 * 2116 * @param { BaseContext } ctx - Indicates the context on which the window depends 2117 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2118 * @syscap SystemCapability.WindowManager.WindowManager.Core 2119 * @since 8 2120 * @deprecated since 9 2121 * @useinstead ohos.window#getLastWindow 2122 */ 2123 function getTopWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void; 2124 2125 /** 2126 * Get the final show window. 2127 * 2128 * @param { BaseContext } ctx - Current application context. 2129 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2130 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2131 * 2. Incorrect parameter types. 2132 * @throws { BusinessError } 1300002 - This window state is abnormal. 2133 * @throws { BusinessError } 1300006 - This window context is abnormal. 2134 * @syscap SystemCapability.WindowManager.WindowManager.Core 2135 * @since 9 2136 */ 2137 /** 2138 * Get the final show window. 2139 * 2140 * @param { BaseContext } ctx - Current application context. 2141 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2142 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2143 * 2. Incorrect parameter types. 2144 * @throws { BusinessError } 1300002 - This window state is abnormal. 2145 * @throws { BusinessError } 1300006 - This window context is abnormal. 2146 * @syscap SystemCapability.WindowManager.WindowManager.Core 2147 * @crossplatform 2148 * @since 10 2149 */ 2150 /** 2151 * Get the final show window. 2152 * 2153 * @param { BaseContext } ctx - Current application context. 2154 * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained. 2155 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2156 * 2. Incorrect parameter types. 2157 * @throws { BusinessError } 1300002 - This window state is abnormal. 2158 * @throws { BusinessError } 1300006 - This window context is abnormal. 2159 * @syscap SystemCapability.WindowManager.WindowManager.Core 2160 * @crossplatform 2161 * @atomicservice 2162 * @since 12 2163 */ 2164 function getLastWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void; 2165 2166 /** 2167 * Get the final show window. 2168 * 2169 * @param { BaseContext } ctx - Current application context. 2170 * @returns { Promise<Window> } Promise used to return the top window obtained. 2171 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2172 * 2. Incorrect parameter types. 2173 * @throws { BusinessError } 1300002 - This window state is abnormal. 2174 * @throws { BusinessError } 1300006 - This window context is abnormal. 2175 * @syscap SystemCapability.WindowManager.WindowManager.Core 2176 * @since 9 2177 */ 2178 /** 2179 * Get the final show window. 2180 * 2181 * @param { BaseContext } ctx - Current application context. 2182 * @returns { Promise<Window> } Promise used to return the top window obtained. 2183 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2184 * 2. Incorrect parameter types. 2185 * @throws { BusinessError } 1300002 - This window state is abnormal. 2186 * @throws { BusinessError } 1300006 - This window context is abnormal. 2187 * @syscap SystemCapability.WindowManager.WindowManager.Core 2188 * @crossplatform 2189 * @since 10 2190 */ 2191 /** 2192 * Get the final show window. 2193 * 2194 * @param { BaseContext } ctx - Current application context. 2195 * @returns { Promise<Window> } Promise used to return the top window obtained. 2196 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2197 * 2. Incorrect parameter types. 2198 * @throws { BusinessError } 1300002 - This window state is abnormal. 2199 * @throws { BusinessError } 1300006 - This window context is abnormal. 2200 * @syscap SystemCapability.WindowManager.WindowManager.Core 2201 * @crossplatform 2202 * @atomicservice 2203 * @since 12 2204 */ 2205 function getLastWindow(ctx: BaseContext): Promise<Window>; 2206 2207 /** 2208 * Minimize all app windows. 2209 * 2210 * @param { number } id - ID of the display. 2211 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2212 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2213 * 2. Incorrect parameter types; 2214 * 3. Parameter verification failed. 2215 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2216 * @syscap SystemCapability.WindowManager.WindowManager.Core 2217 * @systemapi Hide this for inner system use. 2218 * @since 9 2219 */ 2220 function minimizeAll(id: number, callback: AsyncCallback<void>): void; 2221 2222 /** 2223 * Minimize all app windows. 2224 * 2225 * @param { number } id - ID of the display. 2226 * @returns { Promise<void> } Promise that returns no value. 2227 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2228 * 2. Incorrect parameter types; 2229 * 3. Parameter verification failed. 2230 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2231 * @syscap SystemCapability.WindowManager.WindowManager.Core 2232 * @systemapi Hide this for inner system use. 2233 * @since 9 2234 */ 2235 function minimizeAll(id: number): Promise<void>; 2236 2237 /** 2238 * Toggle shown state for all app windows. Minimize or restore all app windows. 2239 * 2240 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2241 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2242 * @syscap SystemCapability.WindowManager.WindowManager.Core 2243 * @systemapi Hide this for inner system use. 2244 * @since 9 2245 */ 2246 function toggleShownStateForAllAppWindows(callback: AsyncCallback<void>): void; 2247 2248 /** 2249 * Toggle shown state for all app windows. Minimize or restore all app windows. 2250 * 2251 * @returns { Promise<void> } Promise that returns no value. 2252 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2253 * @syscap SystemCapability.WindowManager.WindowManager.Core 2254 * @systemapi Hide this for inner system use. 2255 * @since 9 2256 */ 2257 function toggleShownStateForAllAppWindows(): Promise<void>; 2258 2259 /** 2260 * Set the layout mode of a window. 2261 * 2262 * @param { WindowLayoutMode } mode - The layout mode of a window. 2263 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2264 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2265 * 2. Incorrect parameter types; 2266 * 3. Parameter verification failed. 2267 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2268 * @syscap SystemCapability.WindowManager.WindowManager.Core 2269 * @systemapi Hide this for inner system use. 2270 * @since 9 2271 */ 2272 function setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback<void>): void; 2273 2274 /** 2275 * Set the layout mode of a window. 2276 * 2277 * @param { WindowLayoutMode } mode - The layout mode of a window. 2278 * @returns { Promise<void> } Promise that returns no value. 2279 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2280 * 2. Incorrect parameter types; 2281 * 3. Parameter verification failed. 2282 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2283 * @syscap SystemCapability.WindowManager.WindowManager.Core 2284 * @systemapi Hide this for inner system use. 2285 * @since 9 2286 */ 2287 function setWindowLayoutMode(mode: WindowLayoutMode): Promise<void>; 2288 2289 /** 2290 * Sets whether to enable gesture navigation. 2291 * 2292 * @param { boolean } enable - Gesture navigation if true, or disable if false. 2293 * @param { AsyncCallback<void> } callback - The callback of setGestureNavigationEnabled. 2294 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2295 * 2. Incorrect parameter types. 2296 * @throws { BusinessError } 1300002 - This window state is abnormal. 2297 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2298 * @syscap SystemCapability.WindowManager.WindowManager.Core 2299 * @systemapi Hide this for inner system use. 2300 * @since 10 2301 */ 2302 function setGestureNavigationEnabled(enable: boolean, callback: AsyncCallback<void>): void; 2303 2304 /** 2305 * Sets whether to enable gesture navigation. 2306 * 2307 * @param { boolean } enable - Gesture navigation if true, or disable if false. 2308 * @returns { Promise<void> } - The promise returned by the function. 2309 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2310 * 2. Incorrect parameter types. 2311 * @throws { BusinessError } 1300002 - This window state is abnormal. 2312 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2313 * @syscap SystemCapability.WindowManager.WindowManager.Core 2314 * @systemapi Hide this for inner system use. 2315 * @since 10 2316 */ 2317 function setGestureNavigationEnabled(enable: boolean): Promise<void>; 2318 2319 /** 2320 * Set watermark image. 2321 * 2322 * @param { image.PixelMap } pixelMap - Watermark image. 2323 * @param { boolean } enable - Show watermark if true. 2324 * @returns { Promise<void> } - Promise that returns no value. 2325 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2326 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2327 * 2. Incorrect parameter types. 2328 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2329 * @syscap SystemCapability.WindowManager.WindowManager.Core 2330 * @systemapi Hide this for inner system use. 2331 * @since 10 2332 */ 2333 function setWaterMarkImage(pixelMap: image.PixelMap, enable: boolean): Promise<void>; 2334 2335 /** 2336 * Set watermark image. 2337 * 2338 * @param { image.PixelMap } pixelMap - Watermark image. 2339 * @param { boolean } enable - Show watermark if true. 2340 * @param { AsyncCallback<void> } callback - The callback of setWaterMarkImage. 2341 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2342 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2343 * 2. Incorrect parameter types. 2344 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2345 * @syscap SystemCapability.WindowManager.WindowManager.Core 2346 * @systemapi Hide this for inner system use. 2347 * @since 10 2348 */ 2349 function setWaterMarkImage(pixelMap: image.PixelMap, enable: boolean, callback: AsyncCallback<void>): void; 2350 2351 /** 2352 * Shift window focus within the same application. And the window type contains only main window and subwindow. 2353 * 2354 * @param { number } sourceWindowId - Window id which the focus shift from. 2355 * @param { number } targetWindowId - Window id which the focus shift to. 2356 * @returns { Promise<void> } - Promise that returns no value. 2357 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2358 * 2. Incorrect parameter types. 2359 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 2360 * @throws { BusinessError } 1300002 - This window state is abnormal. 2361 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2362 * @throws { BusinessError } 1300004 - Unauthorized operation. 2363 * @syscap SystemCapability.Window.SessionManager 2364 * @since 11 2365 */ 2366 function shiftAppWindowFocus(sourceWindowId: number, targetWindowId: number): Promise<void>; 2367 2368 /** 2369 * Register the callback of systemBarTintChange 2370 * 2371 * @param { 'systemBarTintChange' } type - The value is fixed at 'systemBarTintChange', indicating the property change event of the system bar. 2372 * @param { Callback<SystemBarTintState> } callback - Callback used to return the properties of the system bar. 2373 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2374 * 2. Incorrect parameter types; 2375 * 3. Parameter verification failed. 2376 * @syscap SystemCapability.WindowManager.WindowManager.Core 2377 * @systemapi Hide this for inner system use. 2378 * @since 8 2379 */ 2380 function on(type: 'systemBarTintChange', callback: Callback<SystemBarTintState>): void; 2381 2382 /** 2383 * Unregister the callback of systemBarTintChange 2384 * 2385 * @param { 'systemBarTintChange' } type - The value is fixed at 'systemBarTintChange', indicating the property change event of the system bar. 2386 * @param { Callback<SystemBarTintState> } callback - Callback used to return the properties of the system bar. 2387 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 2388 * 2. Parameter verification failed. 2389 * @syscap SystemCapability.WindowManager.WindowManager.Core 2390 * @systemapi Hide this for inner system use. 2391 * @since 8 2392 */ 2393 function off(type: 'systemBarTintChange', callback?: Callback<SystemBarTintState>): void; 2394 2395 /** 2396 * Register the callback for gesture navigation enabled changes. 2397 * 2398 * @param { 'gestureNavigationEnabledChange' } type the event of gesture navigation enabled changes. 2399 * @param { Callback<boolean> } callback Callback used to return the result whether gesture navigation enabled or not. 2400 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 2401 * 2. Incorrect parameter types. 2402 * 3. Parameter verification failed. 2403 * @throws { BusinessError } 1300002 - This window state is abnormal. 2404 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2405 * @syscap SystemCapability.WindowManager.WindowManager.Core 2406 * @systemapi Hide this for inner system use. 2407 * @since 10 2408 */ 2409 function on(type: 'gestureNavigationEnabledChange', callback: Callback<boolean>): void; 2410 2411 /** 2412 * Unregister the callback for gesture navigation enabled changes. 2413 * 2414 * @param { 'gestureNavigationEnabledChange' } type the event of gesture navigation enabled changes. 2415 * @param { Callback<boolean> } callback Callback used to return the result whether gesture navigation enabled or not. 2416 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 2417 * 2. Parameter verification failed. 2418 * @throws { BusinessError } 1300002 - This window state is abnormal. 2419 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2420 * @syscap SystemCapability.WindowManager.WindowManager.Core 2421 * @systemapi Hide this for inner system use. 2422 * @since 10 2423 */ 2424 function off(type: 'gestureNavigationEnabledChange', callback?: Callback<boolean>): void; 2425 2426 /** 2427 * Register the callback for watermark flag change. 2428 * 2429 * @param { 'waterMarkFlagChange' } type the event of watermark flag change. 2430 * @param { Callback<boolean> } callback Callback used to return the result whether watermark flag change or not. 2431 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2432 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2433 * @syscap SystemCapability.WindowManager.WindowManager.Core 2434 * @systemapi Hide this for inner system use. 2435 * @since 10 2436 */ 2437 function on(type: 'waterMarkFlagChange', callback: Callback<boolean>): void; 2438 2439 /** 2440 * Unregister the callback for watermark flag change. 2441 * 2442 * @param { 'waterMarkFlagChange' } type the event of watermark flag change. 2443 * @param { Callback<boolean> } callback Callback used to return the result whether watermark flag change or not. 2444 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 2445 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2446 * @syscap SystemCapability.WindowManager.WindowManager.Core 2447 * @systemapi Hide this for inner system use. 2448 * @since 10 2449 */ 2450 function off(type: 'waterMarkFlagChange', callback?: Callback<boolean>): void; 2451 /** 2452 * Display orientation 2453 * 2454 * @enum { number } 2455 * @syscap SystemCapability.WindowManager.WindowManager.Core 2456 * @since 9 2457 */ 2458 /** 2459 * Display orientation 2460 * 2461 * @enum { number } 2462 * @syscap SystemCapability.WindowManager.WindowManager.Core 2463 * @crossplatform 2464 * @since 10 2465 */ 2466 /** 2467 * Display orientation 2468 * 2469 * @enum { number } 2470 * @syscap SystemCapability.WindowManager.WindowManager.Core 2471 * @crossplatform 2472 * @atomicservice 2473 * @since 11 2474 */ 2475 enum Orientation { 2476 /** 2477 * Default value. The direction mode is not clearly defined. It is determined by the system. 2478 * 2479 * @syscap SystemCapability.WindowManager.WindowManager.Core 2480 * @since 9 2481 */ 2482 /** 2483 * Default value. The direction mode is not clearly defined. It is determined by the system. 2484 * 2485 * @syscap SystemCapability.WindowManager.WindowManager.Core 2486 * @crossplatform 2487 * @since 10 2488 */ 2489 UNSPECIFIED = 0, 2490 2491 /** 2492 * Display in portrait orientation. 2493 * 2494 * @syscap SystemCapability.WindowManager.WindowManager.Core 2495 * @since 9 2496 */ 2497 /** 2498 * Display in portrait orientation. 2499 * 2500 * @syscap SystemCapability.WindowManager.WindowManager.Core 2501 * @crossplatform 2502 * @since 10 2503 */ 2504 /** 2505 * Display in portrait orientation. 2506 * 2507 * @syscap SystemCapability.WindowManager.WindowManager.Core 2508 * @crossplatform 2509 * @atomicservice 2510 * @since 11 2511 */ 2512 PORTRAIT = 1, 2513 2514 /** 2515 * Display in landscape orientation. 2516 * 2517 * @syscap SystemCapability.WindowManager.WindowManager.Core 2518 * @since 9 2519 */ 2520 /** 2521 * Display in landscape orientation. 2522 * 2523 * @syscap SystemCapability.WindowManager.WindowManager.Core 2524 * @crossplatform 2525 * @since 10 2526 */ 2527 /** 2528 * Display in landscape orientation. 2529 * 2530 * @syscap SystemCapability.WindowManager.WindowManager.Core 2531 * @crossplatform 2532 * @atomicservice 2533 * @since 12 2534 */ 2535 LANDSCAPE = 2, 2536 2537 /** 2538 * Display in inverted portrait orientation. 2539 * 2540 * @syscap SystemCapability.WindowManager.WindowManager.Core 2541 * @since 9 2542 */ 2543 /** 2544 * Display in inverted portrait orientation. 2545 * 2546 * @syscap SystemCapability.WindowManager.WindowManager.Core 2547 * @crossplatform 2548 * @since 10 2549 */ 2550 /** 2551 * Display in inverted portrait orientation. 2552 * 2553 * @syscap SystemCapability.WindowManager.WindowManager.Core 2554 * @crossplatform 2555 * @atomicservice 2556 * @since 12 2557 */ 2558 PORTRAIT_INVERTED = 3, 2559 2560 /** 2561 * Display in inverted landscape orientation. 2562 * 2563 * @syscap SystemCapability.WindowManager.WindowManager.Core 2564 * @since 9 2565 */ 2566 /** 2567 * Display in inverted landscape orientation. 2568 * 2569 * @syscap SystemCapability.WindowManager.WindowManager.Core 2570 * @crossplatform 2571 * @since 10 2572 */ 2573 /** 2574 * Display in inverted landscape orientation. 2575 * 2576 * @syscap SystemCapability.WindowManager.WindowManager.Core 2577 * @crossplatform 2578 * @atomicservice 2579 * @since 12 2580 */ 2581 LANDSCAPE_INVERTED = 4, 2582 2583 /** 2584 * Follow the rotation of the sensor, ignore auto rotation lock. 2585 * 2586 * @syscap SystemCapability.WindowManager.WindowManager.Core 2587 * @since 9 2588 */ 2589 /** 2590 * Follow the rotation of the sensor, ignore auto rotation lock. 2591 * 2592 * @syscap SystemCapability.WindowManager.WindowManager.Core 2593 * @atomicservice 2594 * @since 11 2595 */ 2596 AUTO_ROTATION = 5, 2597 2598 /** 2599 * Follow the rotation of the sensor, only work in the vertical direction, ignore auto rotation lock. 2600 * 2601 * @syscap SystemCapability.WindowManager.WindowManager.Core 2602 * @since 9 2603 */ 2604 AUTO_ROTATION_PORTRAIT = 6, 2605 2606 /** 2607 * Follow the rotation of the sensor, only work in the horizontal direction, ignore auto rotation lock. 2608 * 2609 * @syscap SystemCapability.WindowManager.WindowManager.Core 2610 * @since 9 2611 */ 2612 /** 2613 * Follow the rotation of the sensor, only work in the horizontal direction, ignore auto rotation lock. 2614 * 2615 * @syscap SystemCapability.WindowManager.WindowManager.Core 2616 * @atomicservice 2617 * @since 12 2618 */ 2619 AUTO_ROTATION_LANDSCAPE = 7, 2620 2621 /** 2622 * Follow the rotation of the sensor, controlled by auto rotation lock. 2623 * 2624 * @syscap SystemCapability.WindowManager.WindowManager.Core 2625 * @since 9 2626 */ 2627 /** 2628 * Follow the rotation of the sensor, controlled by auto rotation lock. 2629 * 2630 * @syscap SystemCapability.WindowManager.WindowManager.Core 2631 * @atomicservice 2632 * @since 12 2633 */ 2634 AUTO_ROTATION_RESTRICTED = 8, 2635 2636 /** 2637 * Follow the rotation of the sensor, only work in the vertical direction, controlled by auto rotation lock. 2638 * 2639 * @syscap SystemCapability.WindowManager.WindowManager.Core 2640 * @since 9 2641 */ 2642 AUTO_ROTATION_PORTRAIT_RESTRICTED = 9, 2643 2644 /** 2645 * Follow the rotation of the sensor, only work in the horizontal direction, controlled by auto rotation lock. 2646 * 2647 * @syscap SystemCapability.WindowManager.WindowManager.Core 2648 * @since 9 2649 */ 2650 AUTO_ROTATION_LANDSCAPE_RESTRICTED = 10, 2651 2652 /** 2653 * Locked mode, keep the same direction as previous one. 2654 * 2655 * @syscap SystemCapability.WindowManager.WindowManager.Core 2656 * @since 9 2657 */ 2658 LOCKED = 11, 2659 2660 /** 2661 * Follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 2662 * 2663 * @syscap SystemCapability.Window.SessionManager 2664 * @since 12 2665 */ 2666 AUTO_ROTATION_UNSPECIFIED = 12, 2667 2668 /** 2669 * Display in portrait orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 2670 * 2671 * @syscap SystemCapability.Window.SessionManager 2672 * @since 12 2673 */ 2674 USER_ROTATION_PORTRAIT = 13, 2675 2676 /** 2677 * Display in landscape orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 2678 * 2679 * @syscap SystemCapability.Window.SessionManager 2680 * @since 12 2681 */ 2682 USER_ROTATION_LANDSCAPE = 14, 2683 2684 /** 2685 * Display in inverted portrait orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 2686 * 2687 * @syscap SystemCapability.Window.SessionManager 2688 * @since 12 2689 */ 2690 USER_ROTATION_PORTRAIT_INVERTED = 15, 2691 2692 /** 2693 * Display in inverted landscape orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock. 2694 * 2695 * @syscap SystemCapability.Window.SessionManager 2696 * @since 12 2697 */ 2698 USER_ROTATION_LANDSCAPE_INVERTED = 16, 2699 2700 /** 2701 * Follow the desktop rotate mode. 2702 * 2703 * @syscap SystemCapability.Window.SessionManager 2704 * @since 12 2705 */ 2706 FOLLOW_DESKTOP = 17 2707 } 2708 2709 /** 2710 * Type of blur style 2711 * 2712 * @enum { number } 2713 * @syscap SystemCapability.WindowManager.WindowManager.Core 2714 * @systemapi Hide this for inner system use. 2715 * @since 9 2716 */ 2717 enum BlurStyle { 2718 /** 2719 * Close blur. 2720 * 2721 * @syscap SystemCapability.WindowManager.WindowManager.Core 2722 * @systemapi Hide this for inner system use. 2723 * @since 9 2724 */ 2725 OFF, 2726 /** 2727 * Blur style thin. 2728 * 2729 * @syscap SystemCapability.WindowManager.WindowManager.Core 2730 * @systemapi Hide this for inner system use. 2731 * @since 9 2732 */ 2733 THIN, 2734 /** 2735 * Blur style regular. 2736 * 2737 * @syscap SystemCapability.WindowManager.WindowManager.Core 2738 * @systemapi Hide this for inner system use. 2739 * @since 9 2740 */ 2741 REGULAR, 2742 /** 2743 * Blur style thick. 2744 * 2745 * @syscap SystemCapability.WindowManager.WindowManager.Core 2746 * @systemapi Hide this for inner system use. 2747 * @since 9 2748 */ 2749 THICK 2750 } 2751 2752 /** 2753 * Enum for window callback event type 2754 * 2755 * @enum { number } 2756 * @syscap SystemCapability.WindowManager.WindowManager.Core 2757 * @since 10 2758 */ 2759 /** 2760 * Enum for window callback event type 2761 * 2762 * @enum { number } 2763 * @syscap SystemCapability.WindowManager.WindowManager.Core 2764 * @crossplatform 2765 * @atomicservice 2766 * @since 11 2767 */ 2768 enum WindowEventType { 2769 /** 2770 * The value of window event is window show 2771 * 2772 * @syscap SystemCapability.WindowManager.WindowManager.Core 2773 * @since 10 2774 */ 2775 /** 2776 * The value of window event is window show 2777 * 2778 * @syscap SystemCapability.WindowManager.WindowManager.Core 2779 * @crossplatform 2780 * @atomicservice 2781 * @since 11 2782 */ 2783 WINDOW_SHOWN = 1, 2784 /** 2785 * The value of window event is window active 2786 * 2787 * @syscap SystemCapability.WindowManager.WindowManager.Core 2788 * @since 10 2789 */ 2790 /** 2791 * The value of window event is window active 2792 * 2793 * @syscap SystemCapability.WindowManager.WindowManager.Core 2794 * @crossplatform 2795 * @atomicservice 2796 * @since 11 2797 */ 2798 WINDOW_ACTIVE = 2, 2799 /** 2800 * The value of window event is window inactive 2801 * 2802 * @syscap SystemCapability.WindowManager.WindowManager.Core 2803 * @since 10 2804 */ 2805 /** 2806 * The value of window event is window inactive 2807 * 2808 * @syscap SystemCapability.WindowManager.WindowManager.Core 2809 * @crossplatform 2810 * @atomicservice 2811 * @since 11 2812 */ 2813 WINDOW_INACTIVE = 3, 2814 /** 2815 * The value of window event is window hide 2816 * 2817 * @syscap SystemCapability.WindowManager.WindowManager.Core 2818 * @since 10 2819 */ 2820 /** 2821 * The value of window event is window hide 2822 * 2823 * @syscap SystemCapability.WindowManager.WindowManager.Core 2824 * @crossplatform 2825 * @atomicservice 2826 * @since 11 2827 */ 2828 WINDOW_HIDDEN = 4, 2829 /** 2830 * The value of window event is window destroy 2831 * 2832 * @syscap SystemCapability.Window.SessionManager 2833 * @atomicservice 2834 * @since 11 2835 */ 2836 WINDOW_DESTROYED = 7 2837 } 2838 2839 /** 2840 * Specific system bar type. 2841 * 2842 * @syscap SystemCapability.Window.SessionManager 2843 * @atomicservice 2844 * @since 11 2845 */ 2846 /** 2847 * Specific system bar type. 2848 * 2849 * @typedef {'status' | 'navigation' | 'navigationIndicator'} 2850 * @syscap SystemCapability.Window.SessionManager 2851 * @crossplatform 2852 * @atomicservice 2853 * @since 12 2854 */ 2855 type SpecificSystemBar = 'status' | 'navigation' | 'navigationIndicator'; 2856 2857 /** 2858 * Window 2859 * 2860 * @interface Window 2861 * @syscap SystemCapability.WindowManager.WindowManager.Core 2862 * @since 6 2863 */ 2864 /** 2865 * Window 2866 * 2867 * @interface Window 2868 * @syscap SystemCapability.WindowManager.WindowManager.Core 2869 * @crossplatform 2870 * @atomicservice 2871 * @since 11 2872 */ 2873 interface Window { 2874 /** 2875 * Hide window. 2876 * 2877 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2878 * @throws { BusinessError } 1300002 - This window state is abnormal. 2879 * @syscap SystemCapability.WindowManager.WindowManager.Core 2880 * @systemapi Hide this for inner system use. 2881 * @since 7 2882 */ 2883 hide(callback: AsyncCallback<void>): void; 2884 2885 /** 2886 * Hide window. 2887 * 2888 * @returns { Promise<void> } Promise that returns no value. 2889 * @throws { BusinessError } 1300002 - This window state is abnormal. 2890 * @syscap SystemCapability.WindowManager.WindowManager.Core 2891 * @systemapi Hide this for inner system use. 2892 * @since 7 2893 */ 2894 hide(): Promise<void>; 2895 2896 /** 2897 * Hide window with animation. 2898 * 2899 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2900 * @throws { BusinessError } 1300002 - This window state is abnormal. 2901 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2902 * @throws { BusinessError } 1300004 - Unauthorized operation. 2903 * @syscap SystemCapability.WindowManager.WindowManager.Core 2904 * @systemapi 2905 * @since 9 2906 */ 2907 hideWithAnimation(callback: AsyncCallback<void>): void; 2908 2909 /** 2910 * Hide window with animation. 2911 * 2912 * @returns { Promise<void> } Promise that returns no value. 2913 * @throws { BusinessError } 1300002 - This window state is abnormal. 2914 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 2915 * @throws { BusinessError } 1300004 - Unauthorized operation. 2916 * @syscap SystemCapability.WindowManager.WindowManager.Core 2917 * @systemapi 2918 * @since 9 2919 */ 2920 hideWithAnimation(): Promise<void>; 2921 2922 /** 2923 * Show window. 2924 * 2925 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2926 * @syscap SystemCapability.WindowManager.WindowManager.Core 2927 * @since 7 2928 * @deprecated since 9 2929 * @useinstead ohos.window.Window#showWindow 2930 */ 2931 show(callback: AsyncCallback<void>): void; 2932 2933 /** 2934 * Show window. 2935 * 2936 * @returns { Promise<void> } Promise that returns no value. 2937 * @syscap SystemCapability.WindowManager.WindowManager.Core 2938 * @since 7 2939 * @deprecated since 9 2940 * @useinstead ohos.window.Window#showWindow 2941 */ 2942 show(): Promise<void>; 2943 2944 /** 2945 * Show window. 2946 * 2947 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2948 * @throws { BusinessError } 1300002 - This window state is abnormal. 2949 * @syscap SystemCapability.WindowManager.WindowManager.Core 2950 * @since 9 2951 */ 2952 /** 2953 * Show window. 2954 * 2955 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2956 * @throws { BusinessError } 1300002 - This window state is abnormal. 2957 * @syscap SystemCapability.WindowManager.WindowManager.Core 2958 * @crossplatform 2959 * @since 10 2960 */ 2961 /** 2962 * Show window. 2963 * 2964 * @param { AsyncCallback<void> } callback - Callback used to return the result. 2965 * @throws { BusinessError } 1300002 - This window state is abnormal. 2966 * @syscap SystemCapability.WindowManager.WindowManager.Core 2967 * @crossplatform 2968 * @atomicservice 2969 * @since 11 2970 */ 2971 showWindow(callback: AsyncCallback<void>): void; 2972 2973 /** 2974 * Show window. 2975 * 2976 * @returns { Promise<void> } Promise that returns no value. 2977 * @throws { BusinessError } 1300002 - This window state is abnormal. 2978 * @syscap SystemCapability.WindowManager.WindowManager.Core 2979 * @since 9 2980 */ 2981 /** 2982 * Show window. 2983 * 2984 * @returns { Promise<void> } Promise that returns no value. 2985 * @throws { BusinessError } 1300002 - This window state is abnormal. 2986 * @syscap SystemCapability.WindowManager.WindowManager.Core 2987 * @crossplatform 2988 * @since 10 2989 */ 2990 /** 2991 * Show window. 2992 * 2993 * @returns { Promise<void> } Promise that returns no value. 2994 * @throws { BusinessError } 1300002 - This window state is abnormal. 2995 * @syscap SystemCapability.WindowManager.WindowManager.Core 2996 * @crossplatform 2997 * @atomicservice 2998 * @since 11 2999 */ 3000 showWindow(): Promise<void>; 3001 3002 /** 3003 * Show window with animation. 3004 * 3005 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3006 * @throws { BusinessError } 1300002 - This window state is abnormal. 3007 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3008 * @throws { BusinessError } 1300004 - Unauthorized operation. 3009 * @syscap SystemCapability.WindowManager.WindowManager.Core 3010 * @systemapi 3011 * @since 9 3012 */ 3013 showWithAnimation(callback: AsyncCallback<void>): void; 3014 3015 /** 3016 * Show window with animation. 3017 * 3018 * @returns { Promise<void> } Promise that returns no value. 3019 * @throws { BusinessError } 1300002 - This window state is abnormal. 3020 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3021 * @throws { BusinessError } 1300004 - Unauthorized operation. 3022 * @syscap SystemCapability.WindowManager.WindowManager.Core 3023 * @systemapi 3024 * @since 9 3025 */ 3026 showWithAnimation(): Promise<void>; 3027 3028 /** 3029 * Destroy the window. 3030 * 3031 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3032 * @syscap SystemCapability.WindowManager.WindowManager.Core 3033 * @since 7 3034 * @deprecated since 9 3035 * @useinstead ohos.window.Window#destroyWindow 3036 */ 3037 destroy(callback: AsyncCallback<void>): void; 3038 3039 /** 3040 * Destroy the window. 3041 * 3042 * @returns { Promise<void> } Promise that returns no value. 3043 * @syscap SystemCapability.WindowManager.WindowManager.Core 3044 * @since 7 3045 * @deprecated since 9 3046 * @useinstead ohos.window.Window#destroyWindow 3047 */ 3048 destroy(): Promise<void>; 3049 3050 /** 3051 * Destroy the window. 3052 * 3053 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3054 * @throws { BusinessError } 1300002 - This window state is abnormal. 3055 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3056 * @syscap SystemCapability.WindowManager.WindowManager.Core 3057 * @since 9 3058 */ 3059 /** 3060 * Destroy the window. 3061 * 3062 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3063 * @throws { BusinessError } 1300002 - This window state is abnormal. 3064 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3065 * @syscap SystemCapability.WindowManager.WindowManager.Core 3066 * @crossplatform 3067 * @since 10 3068 */ 3069 /** 3070 * Destroy the window. 3071 * 3072 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3073 * @throws { BusinessError } 1300002 - This window state is abnormal. 3074 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3075 * @syscap SystemCapability.WindowManager.WindowManager.Core 3076 * @crossplatform 3077 * @atomicservice 3078 * @since 11 3079 */ 3080 destroyWindow(callback: AsyncCallback<void>): void; 3081 3082 /** 3083 * Destroy the window. 3084 * 3085 * @returns { Promise<void> } Promise that returns no value. 3086 * @throws { BusinessError } 1300002 - This window state is abnormal. 3087 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3088 * @syscap SystemCapability.WindowManager.WindowManager.Core 3089 * @since 9 3090 */ 3091 /** 3092 * Destroy the window. 3093 * 3094 * @returns { Promise<void> } Promise that returns no value. 3095 * @throws { BusinessError } 1300002 - This window state is abnormal. 3096 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3097 * @syscap SystemCapability.WindowManager.WindowManager.Core 3098 * @crossplatform 3099 * @since 10 3100 */ 3101 /** 3102 * Destroy the window. 3103 * 3104 * @returns { Promise<void> } Promise that returns no value. 3105 * @throws { BusinessError } 1300002 - This window state is abnormal. 3106 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3107 * @syscap SystemCapability.WindowManager.WindowManager.Core 3108 * @crossplatform 3109 * @atomicservice 3110 * @since 11 3111 */ 3112 destroyWindow(): Promise<void>; 3113 3114 /** 3115 * Set the position of a window. 3116 * 3117 * @param { number } x - Indicate the X-coordinate of the window. 3118 * @param { number } y - Indicate the Y-coordinate of the window. 3119 * @returns { Promise<void> } Promise that returns no value. 3120 * @syscap SystemCapability.WindowManager.WindowManager.Core 3121 * @since 7 3122 * @deprecated since 9 3123 * @useinstead ohos.window.Window#moveWindowTo 3124 */ 3125 moveTo(x: number, y: number): Promise<void>; 3126 3127 /** 3128 * Set the position of a window. 3129 * 3130 * @param { number } x - Indicate the X-coordinate of the window. 3131 * @param { number } y - Indicate the Y-coordinate of the window. 3132 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3133 * @syscap SystemCapability.WindowManager.WindowManager.Core 3134 * @since 7 3135 * @deprecated since 9 3136 * @useinstead ohos.window.Window#moveWindowTo 3137 */ 3138 moveTo(x: number, y: number, callback: AsyncCallback<void>): void; 3139 3140 /** 3141 * Set the position of a window. 3142 * 3143 * @param { number } x - Indicate the X-coordinate of the window. 3144 * @param { number } y - Indicate the Y-coordinate of the window. 3145 * @returns { Promise<void> } Promise that returns no value. 3146 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3147 * 2. Incorrect parameter types. 3148 * @throws { BusinessError } 1300002 - This window state is abnormal. 3149 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3150 * @syscap SystemCapability.WindowManager.WindowManager.Core 3151 * @since 9 3152 */ 3153 /** 3154 * Set the position of a window. 3155 * 3156 * @param { number } x - Indicate the X-coordinate of the window. 3157 * @param { number } y - Indicate the Y-coordinate of the window. 3158 * @returns { Promise<void> } Promise that returns no value. 3159 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3160 * 2. Incorrect parameter types. 3161 * @throws { BusinessError } 1300002 - This window state is abnormal. 3162 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3163 * @syscap SystemCapability.WindowManager.WindowManager.Core 3164 * @crossplatform 3165 * @since 10 3166 */ 3167 /** 3168 * Set the position of a window. 3169 * 3170 * @param { number } x - Indicate the X-coordinate of the window. 3171 * @param { number } y - Indicate the Y-coordinate of the window. 3172 * @returns { Promise<void> } Promise that returns no value. 3173 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3174 * 2. Incorrect parameter types. 3175 * @throws { BusinessError } 1300002 - This window state is abnormal. 3176 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3177 * @syscap SystemCapability.WindowManager.WindowManager.Core 3178 * @crossplatform 3179 * @atomicservice 3180 * @since 11 3181 */ 3182 moveWindowTo(x: number, y: number): Promise<void>; 3183 3184 /** 3185 * Set the position of a window. 3186 * 3187 * @param { number } x - Indicate the X-coordinate of the window. 3188 * @param { number } y - Indicate the Y-coordinate of the window. 3189 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3190 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3191 * 2. Incorrect parameter types. 3192 * @throws { BusinessError } 1300002 - This window state is abnormal. 3193 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3194 * @syscap SystemCapability.WindowManager.WindowManager.Core 3195 * @since 9 3196 */ 3197 /** 3198 * Set the position of a window. 3199 * 3200 * @param { number } x - Indicate the X-coordinate of the window. 3201 * @param { number } y - Indicate the Y-coordinate of the window. 3202 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3203 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3204 * 2. Incorrect parameter types. 3205 * @throws { BusinessError } 1300002 - This window state is abnormal. 3206 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3207 * @syscap SystemCapability.WindowManager.WindowManager.Core 3208 * @crossplatform 3209 * @since 10 3210 */ 3211 /** 3212 * Set the position of a window. 3213 * 3214 * @param { number } x - Indicate the X-coordinate of the window. 3215 * @param { number } y - Indicate the Y-coordinate of the window. 3216 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3217 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3218 * 2. Incorrect parameter types. 3219 * @throws { BusinessError } 1300002 - This window state is abnormal. 3220 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3221 * @syscap SystemCapability.WindowManager.WindowManager.Core 3222 * @crossplatform 3223 * @atomicservice 3224 * @since 11 3225 */ 3226 moveWindowTo(x: number, y: number, callback: AsyncCallback<void>): void; 3227 3228 /** 3229 * Set the size of a window . 3230 * 3231 * @param { number } width - Indicates the width of the window. 3232 * @param { number } height - Indicates the height of the window. 3233 * @returns { Promise<void> } Promise that returns no value. 3234 * @syscap SystemCapability.WindowManager.WindowManager.Core 3235 * @since 7 3236 * @deprecated since 9 3237 * @useinstead ohos.window.Window#resize 3238 */ 3239 resetSize(width: number, height: number): Promise<void>; 3240 3241 /** 3242 * Set the size of a window . 3243 * 3244 * @param { number } width - Indicates the width of the window. 3245 * @param { number } height - Indicates the height of the window. 3246 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3247 * @syscap SystemCapability.WindowManager.WindowManager.Core 3248 * @since 7 3249 * @deprecated since 9 3250 * @useinstead ohos.window.Window#resize 3251 */ 3252 resetSize(width: number, height: number, callback: AsyncCallback<void>): void; 3253 3254 /** 3255 * Set the size of a window . 3256 * 3257 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 3258 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 3259 * @returns { Promise<void> } Promise that returns no value. 3260 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3261 * 2. Incorrect parameter types; 3262 * 3. Parameter verification failed. 3263 * @throws { BusinessError } 1300002 - This window state is abnormal. 3264 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3265 * @syscap SystemCapability.WindowManager.WindowManager.Core 3266 * @since 9 3267 */ 3268 /** 3269 * Set the size of a window . 3270 * 3271 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 3272 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 3273 * @returns { Promise<void> } Promise that returns no value. 3274 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3275 * 2. Incorrect parameter types; 3276 * 3. Parameter verification failed. 3277 * @throws { BusinessError } 1300002 - This window state is abnormal. 3278 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3279 * @syscap SystemCapability.WindowManager.WindowManager.Core 3280 * @crossplatform 3281 * @since 10 3282 */ 3283 /** 3284 * Set the size of a window . 3285 * 3286 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 3287 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 3288 * @returns { Promise<void> } Promise that returns no value. 3289 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3290 * 2. Incorrect parameter types; 3291 * 3. Parameter verification failed. 3292 * @throws { BusinessError } 1300002 - This window state is abnormal. 3293 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3294 * @syscap SystemCapability.WindowManager.WindowManager.Core 3295 * @crossplatform 3296 * @atomicservice 3297 * @since 11 3298 */ 3299 resize(width: number, height: number): Promise<void>; 3300 3301 /** 3302 * Set the size of a window . 3303 * 3304 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 3305 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 3306 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3307 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3308 * 2. Incorrect parameter types; 3309 * 3. Parameter verification failed. 3310 * @throws { BusinessError } 1300002 - This window state is abnormal. 3311 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3312 * @syscap SystemCapability.WindowManager.WindowManager.Core 3313 * @since 9 3314 */ 3315 /** 3316 * Set the size of a window . 3317 * 3318 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 3319 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 3320 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3321 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3322 * 2. Incorrect parameter types; 3323 * 3. Parameter verification failed. 3324 * @throws { BusinessError } 1300002 - This window state is abnormal. 3325 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3326 * @syscap SystemCapability.WindowManager.WindowManager.Core 3327 * @crossplatform 3328 * @since 10 3329 */ 3330 /** 3331 * Set the size of a window . 3332 * 3333 * @param { number } width - Indicates the width of the window. The width should be greater than 0. 3334 * @param { number } height - Indicates the height of the window. The height should be greater than 0. 3335 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3336 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3337 * 2. Incorrect parameter types; 3338 * 3. Parameter verification failed. 3339 * @throws { BusinessError } 1300002 - This window state is abnormal. 3340 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3341 * @syscap SystemCapability.WindowManager.WindowManager.Core 3342 * @crossplatform 3343 * @atomicservice 3344 * @since 11 3345 */ 3346 resize(width: number, height: number, callback: AsyncCallback<void>): void; 3347 3348 /** 3349 * Set the type of a window. 3350 * 3351 * @param { WindowType } type - Indicate the type of a window. 3352 * @returns { Promise<void> } Promise that returns no value. 3353 * @syscap SystemCapability.WindowManager.WindowManager.Core 3354 * @systemapi Hide this for inner system use. 3355 * @since 7 3356 * @deprecated since 9 3357 */ 3358 setWindowType(type: WindowType): Promise<void>; 3359 3360 /** 3361 * Set the type of a window. 3362 * 3363 * @param { WindowType } type - Indicate the type of a window. 3364 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3365 * @syscap SystemCapability.WindowManager.WindowManager.Core 3366 * @systemapi Hide this for inner system use. 3367 * @since 7 3368 * @deprecated since 9 3369 */ 3370 setWindowType(type: WindowType, callback: AsyncCallback<void>): void; 3371 3372 /** 3373 * Set the mode of a window. 3374 * 3375 * @param { WindowMode } mode - Indicate the mode of a window. 3376 * @returns { Promise<void> } Promise that returns no value. 3377 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3378 * 2. Incorrect parameter types; 3379 * 3. Parameter verification failed. 3380 * @throws { BusinessError } 1300002 - This window state is abnormal. 3381 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3382 * @syscap SystemCapability.WindowManager.WindowManager.Core 3383 * @systemapi Hide this for inner system use. 3384 * @since 9 3385 */ 3386 setWindowMode(mode: WindowMode): Promise<void>; 3387 3388 /** 3389 * Set the mode of a window. 3390 * 3391 * @param { WindowMode } mode - Indicate the mode of a window. 3392 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3393 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3394 * 2. Incorrect parameter types; 3395 * 3. Parameter verification failed. 3396 * @throws { BusinessError } 1300002 - This window state is abnormal. 3397 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3398 * @syscap SystemCapability.WindowManager.WindowManager.Core 3399 * @systemapi Hide this for inner system use. 3400 * @since 9 3401 */ 3402 setWindowMode(mode: WindowMode, callback: AsyncCallback<void>): void; 3403 3404 /** 3405 * Get the properties of current window 3406 * 3407 * @param { AsyncCallback<WindowProperties> } callback - Callback used to return the window properties. 3408 * @syscap SystemCapability.WindowManager.WindowManager.Core 3409 * @since 6 3410 * @deprecated since 9 3411 * @useinstead ohos.window.Window#getWindowProperties 3412 */ 3413 getProperties(callback: AsyncCallback<WindowProperties>): void; 3414 3415 /** 3416 * Get the properties of current window 3417 * 3418 * @returns { Promise<WindowProperties> } Promise used to return the window properties. 3419 * @syscap SystemCapability.WindowManager.WindowManager.Core 3420 * @since 6 3421 * @deprecated since 9 3422 * @useinstead ohos.window.Window#getWindowProperties 3423 */ 3424 getProperties(): Promise<WindowProperties>; 3425 3426 /** 3427 * Get the properties of current window 3428 * 3429 * @returns { WindowProperties } Return the window properties. 3430 * @throws { BusinessError } 1300002 - This window state is abnormal. 3431 * @syscap SystemCapability.WindowManager.WindowManager.Core 3432 * @since 9 3433 */ 3434 /** 3435 * Get the properties of current window 3436 * 3437 * @returns { WindowProperties } Return the window properties. 3438 * @throws { BusinessError } 1300002 - This window state is abnormal. 3439 * @syscap SystemCapability.WindowManager.WindowManager.Core 3440 * @crossplatform 3441 * @since 10 3442 */ 3443 /** 3444 * Get the properties of current window 3445 * 3446 * @returns { WindowProperties } Return the window properties. 3447 * @throws { BusinessError } 1300002 - This window state is abnormal. 3448 * @syscap SystemCapability.WindowManager.WindowManager.Core 3449 * @crossplatform 3450 * @atomicservice 3451 * @since 11 3452 */ 3453 getWindowProperties(): WindowProperties; 3454 3455 /** 3456 * Get the avoid area 3457 * 3458 * @param { AvoidAreaType } type - Type of the area 3459 * @param { AsyncCallback<AvoidArea> } callback - Callback used to return the area. 3460 * @syscap SystemCapability.WindowManager.WindowManager.Core 3461 * @since 7 3462 * @deprecated since 9 3463 * @useinstead ohos.window.Window#getWindowAvoidArea 3464 */ 3465 getAvoidArea(type: AvoidAreaType, callback: AsyncCallback<AvoidArea>): void; 3466 3467 /** 3468 * Get the avoid area 3469 * 3470 * @param { AvoidAreaType } type - Type of the area 3471 * @returns { Promise<AvoidArea> } Area where the window cannot be displayed. 3472 * @syscap SystemCapability.WindowManager.WindowManager.Core 3473 * @since 7 3474 * @deprecated since 9 3475 * @useinstead ohos.window.Window#getWindowAvoidArea 3476 */ 3477 getAvoidArea(type: AvoidAreaType): Promise<AvoidArea>; 3478 3479 /** 3480 * Get the avoid area 3481 * 3482 * @param { AvoidAreaType } type - Type of the area 3483 * @returns { AvoidArea } Area where the window cannot be displayed. 3484 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3485 * 2. Incorrect parameter types; 3486 * 3. Parameter verification failed. 3487 * @throws { BusinessError } 1300002 - This window state is abnormal. 3488 * @syscap SystemCapability.WindowManager.WindowManager.Core 3489 * @since 9 3490 */ 3491 /** 3492 * Get the avoid area 3493 * 3494 * @param { AvoidAreaType } type - Type of the area 3495 * @returns { AvoidArea } Area where the window cannot be displayed. 3496 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3497 * 2. Incorrect parameter types; 3498 * 3. Parameter verification failed. 3499 * @throws { BusinessError } 1300002 - This window state is abnormal. 3500 * @syscap SystemCapability.WindowManager.WindowManager.Core 3501 * @atomicservice 3502 * @since 11 3503 */ 3504 /** 3505 * Get the avoid area 3506 * 3507 * @param { AvoidAreaType } type - Type of the area 3508 * @returns { AvoidArea } Area where the window cannot be displayed. 3509 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3510 * 2. Incorrect parameter types; 3511 * 3. Parameter verification failed. 3512 * @throws { BusinessError } 1300002 - This window state is abnormal. 3513 * @syscap SystemCapability.WindowManager.WindowManager.Core 3514 * @crossplatform 3515 * @atomicservice 3516 * @since 12 3517 */ 3518 getWindowAvoidArea(type: AvoidAreaType): AvoidArea; 3519 3520 /** 3521 * Set the flag of the window is shown full screen 3522 * 3523 * @param { boolean } isFullScreen - The flag of the window is shown full screen 3524 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3525 * @syscap SystemCapability.WindowManager.WindowManager.Core 3526 * @since 6 3527 * @deprecated since 9 3528 * @useinstead ohos.window.Window#setWindowSystemBarEnable 3529 */ 3530 setFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void; 3531 3532 /** 3533 * Set the flag of the window is shown full screen 3534 * 3535 * @param { boolean } isFullScreen - The flag of the window is shown full screen 3536 * @returns { Promise<void> } Promise that returns no value. 3537 * @syscap SystemCapability.WindowManager.WindowManager.Core 3538 * @since 6 3539 * @deprecated since 9 3540 * @useinstead ohos.window.Window#setWindowSystemBarEnable 3541 */ 3542 setFullScreen(isFullScreen: boolean): Promise<void>; 3543 3544 /** 3545 * Set the property of the window can layout in full screen 3546 * 3547 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 3548 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3549 * @syscap SystemCapability.WindowManager.WindowManager.Core 3550 * @since 7 3551 * @deprecated since 9 3552 * @useinstead ohos.window.Window#setWindowLayoutFullScreen 3553 */ 3554 setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void; 3555 3556 /** 3557 * Set the property of the window can layout in full screen 3558 * 3559 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 3560 * @returns { Promise<void> } Promise that returns no value. 3561 * @syscap SystemCapability.WindowManager.WindowManager.Core 3562 * @since 7 3563 * @deprecated since 9 3564 * @useinstead ohos.window.Window#setWindowLayoutFullScreen 3565 */ 3566 setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>; 3567 3568 /** 3569 * Set the property of the window can layout in full screen 3570 * 3571 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 3572 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3573 * @throws { BusinessError } 401 - Parameter error. 3574 * @throws { BusinessError } 1300002 - This window state is abnormal. 3575 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3576 * @syscap SystemCapability.WindowManager.WindowManager.Core 3577 * @since 9 3578 */ 3579 /** 3580 * Set the property of the window can layout in full screen 3581 * 3582 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 3583 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3584 * @throws { BusinessError } 401 - Parameter error. 3585 * @throws { BusinessError } 1300002 - This window state is abnormal. 3586 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3587 * @syscap SystemCapability.WindowManager.WindowManager.Core 3588 * @atomicservice 3589 * @since 12 3590 */ 3591 setWindowLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void; 3592 3593 /** 3594 * Set the property of the window can layout in full screen 3595 * 3596 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 3597 * @returns { Promise<void> } Promise that returns no value. 3598 * @throws { BusinessError } 401 - Parameter error. 3599 * @throws { BusinessError } 1300002 - This window state is abnormal. 3600 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3601 * @syscap SystemCapability.WindowManager.WindowManager.Core 3602 * @since 9 3603 */ 3604 /** 3605 * Set the property of the window can layout in full screen 3606 * 3607 * @param { boolean } isLayoutFullScreen - The window can layout in full screen 3608 * @returns { Promise<void> } Promise that returns no value. 3609 * @throws { BusinessError } 401 - Parameter error. 3610 * @throws { BusinessError } 1300002 - This window state is abnormal. 3611 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3612 * @syscap SystemCapability.WindowManager.WindowManager.Core 3613 * @atomicservice 3614 * @since 12 3615 */ 3616 setWindowLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>; 3617 3618 /** 3619 * Set the system bar to have visible. 3620 * 3621 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3622 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3623 * @syscap SystemCapability.WindowManager.WindowManager.Core 3624 * @since 7 3625 * @deprecated since 9 3626 * @useinstead ohos.window.Window#setWindowSystemBarEnable 3627 */ 3628 setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback<void>): void; 3629 3630 /** 3631 * Set the system bar to have visible. 3632 * 3633 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3634 * @returns { Promise<void> } Promise that returns no value. 3635 * @syscap SystemCapability.WindowManager.WindowManager.Core 3636 * @since 7 3637 * @deprecated since 9 3638 * @useinstead ohos.window.Window#setWindowSystemBarEnable 3639 */ 3640 setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void>; 3641 3642 /** 3643 * Set the system bar to have visible. 3644 * 3645 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3646 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3647 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3648 * 2. Incorrect parameter types. 3649 * @throws { BusinessError } 1300002 - This window state is abnormal. 3650 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3651 * @syscap SystemCapability.WindowManager.WindowManager.Core 3652 * @since 9 3653 */ 3654 /** 3655 * Set the system bar to have visible. 3656 * 3657 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3658 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3659 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3660 * 2. Incorrect parameter types. 3661 * @throws { BusinessError } 1300002 - This window state is abnormal. 3662 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3663 * @syscap SystemCapability.WindowManager.WindowManager.Core 3664 * @crossplatform 3665 * @since 10 3666 */ 3667 /** 3668 * Set the system bar to have visible. 3669 * 3670 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3671 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3672 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3673 * 2. Incorrect parameter types. 3674 * @throws { BusinessError } 1300002 - This window state is abnormal. 3675 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3676 * @syscap SystemCapability.WindowManager.WindowManager.Core 3677 * @crossplatform 3678 * @atomicservice 3679 * @since 12 3680 */ 3681 setWindowSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback<void>): void; 3682 3683 /** 3684 * Set the system bar to have visible. 3685 * 3686 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3687 * @returns { Promise<void> } Promise that returns no value. 3688 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3689 * 2. Incorrect parameter types. 3690 * @throws { BusinessError } 1300002 - This window state is abnormal. 3691 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3692 * @syscap SystemCapability.WindowManager.WindowManager.Core 3693 * @since 9 3694 */ 3695 /** 3696 * Set the system bar to have visible. 3697 * 3698 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3699 * @returns { Promise<void> } Promise that returns no value. 3700 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3701 * 2. Incorrect parameter types. 3702 * @throws { BusinessError } 1300002 - This window state is abnormal. 3703 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3704 * @syscap SystemCapability.WindowManager.WindowManager.Core 3705 * @crossplatform 3706 * @since 10 3707 */ 3708 /** 3709 * Set the system bar to have visible. 3710 * 3711 * @param { Array<'status' | 'navigation'> } names - The set of system bar 3712 * @returns { Promise<void> } Promise that returns no value. 3713 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3714 * 2. Incorrect parameter types. 3715 * @throws { BusinessError } 1300002 - This window state is abnormal. 3716 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3717 * @syscap SystemCapability.WindowManager.WindowManager.Core 3718 * @crossplatform 3719 * @atomicservice 3720 * @since 12 3721 */ 3722 setWindowSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void>; 3723 3724 /** 3725 * Set specific system bar to have visible. 3726 * 3727 * @param {SpecificSystemBar} name - the set of system bar 3728 * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false. 3729 * @returns { Promise<void> } Promise that returns no value. 3730 * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3731 * 2. Incorrect parameter types. 3732 * @throws {BusinessError} 1300002 - This window state is abnormal. 3733 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 3734 * @syscap SystemCapability.Window.SessionManager 3735 * @atomicservice 3736 * @since 11 3737 */ 3738 /** 3739 * Set specific system bar to have visible. 3740 * 3741 * @param {SpecificSystemBar} name - the set of system bar 3742 * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false. 3743 * @param {boolean} enableAnimation - Whether using animation during this setting, using animation if true or not using animation if false. 3744 * @returns { Promise<void> } Promise that returns no value. 3745 * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3746 * 2. Incorrect parameter types. 3747 * @throws {BusinessError} 1300002 - This window state is abnormal. 3748 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 3749 * @syscap SystemCapability.Window.SessionManager 3750 * @crossplatform 3751 * @atomicservice 3752 * @since 12 3753 */ 3754 setSpecificSystemBarEnabled(name: SpecificSystemBar, enable: boolean, enableAnimation?: boolean): Promise<void>; 3755 3756 /** 3757 * Set the properties of system bar 3758 * 3759 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 3760 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3761 * @syscap SystemCapability.WindowManager.WindowManager.Core 3762 * @since 6 3763 * @deprecated since 9 3764 * @useinstead ohos.window.Window#setWindowSystemBarProperties 3765 */ 3766 setSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void; 3767 3768 /** 3769 * Set the properties of system bar 3770 * 3771 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 3772 * @returns { Promise<void> } Promise that returns no value. 3773 * @syscap SystemCapability.WindowManager.WindowManager.Core 3774 * @since 6 3775 * @deprecated since 9 3776 * @useinstead ohos.window.Window#setWindowSystemBarProperties 3777 */ 3778 setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>; 3779 3780 /** 3781 * Set the properties of system bar 3782 * 3783 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 3784 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3785 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3786 * 2. Incorrect parameter types. 3787 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3788 * @throws { BusinessError } 1300002 - This window state is abnormal. 3789 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3790 * @syscap SystemCapability.WindowManager.WindowManager.Core 3791 * @since 9 3792 */ 3793 /** 3794 * Set the properties of system bar 3795 * 3796 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 3797 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3798 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3799 * 2. Incorrect parameter types. 3800 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3801 * @throws { BusinessError } 1300002 - This window state is abnormal. 3802 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3803 * @syscap SystemCapability.WindowManager.WindowManager.Core 3804 * @atomicservice 3805 * @since 12 3806 */ 3807 setWindowSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void; 3808 3809 /** 3810 * Set the properties of system bar 3811 * 3812 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 3813 * @returns { Promise<void> } Promise that returns no value. 3814 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3815 * 2. Incorrect parameter types. 3816 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3817 * @throws { BusinessError } 1300002 - This window state is abnormal. 3818 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3819 * @syscap SystemCapability.WindowManager.WindowManager.Core 3820 * @since 9 3821 */ 3822 /** 3823 * Set the properties of system bar 3824 * 3825 * @param { SystemBarProperties } systemBarProperties - The properties of system bar 3826 * @returns { Promise<void> } Promise that returns no value. 3827 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3828 * 2. Incorrect parameter types. 3829 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 3830 * @throws { BusinessError } 1300002 - This window state is abnormal. 3831 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3832 * @syscap SystemCapability.WindowManager.WindowManager.Core 3833 * @atomicservice 3834 * @since 12 3835 */ 3836 setWindowSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>; 3837 3838 /** 3839 * Get the properties of system bar 3840 * 3841 * @returns { SystemBarProperties } Return system bar properties. 3842 * @throws { BusinessError } 1300002 - This window state is abnormal. 3843 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3844 * @throws { BusinessError } 1300004 - Unauthorized operation. 3845 * @syscap SystemCapability.WindowManager.WindowManager.Core 3846 * @atomicservice 3847 * @since 12 3848 */ 3849 getWindowSystemBarProperties(): SystemBarProperties; 3850 3851 /** 3852 * Set the preferred orientation config of the window 3853 * 3854 * @param { Orientation } orientation - The orientation config of the window 3855 * @returns { Promise<void> } Promise that returns no value. 3856 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3857 * 2. Incorrect parameter types; 3858 * 3. Parameter verification failed. 3859 * @throws { BusinessError } 1300002 - This window state is abnormal. 3860 * @syscap SystemCapability.WindowManager.WindowManager.Core 3861 * @since 9 3862 */ 3863 /** 3864 * Set the preferred orientation config of the window 3865 * 3866 * @param { Orientation } orientation - The orientation config of the window 3867 * @returns { Promise<void> } Promise that returns no value. 3868 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3869 * 2. Incorrect parameter types; 3870 * 3. Parameter verification failed. 3871 * @throws { BusinessError } 1300002 - This window state is abnormal. 3872 * @syscap SystemCapability.WindowManager.WindowManager.Core 3873 * @crossplatform 3874 * @since 10 3875 */ 3876 /** 3877 * Set the preferred orientation config of the window 3878 * 3879 * @param { Orientation } orientation - The orientation config of the window 3880 * @returns { Promise<void> } Promise that returns no value. 3881 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3882 * 2. Incorrect parameter types; 3883 * 3. Parameter verification failed. 3884 * @throws { BusinessError } 1300002 - This window state is abnormal. 3885 * @syscap SystemCapability.WindowManager.WindowManager.Core 3886 * @crossplatform 3887 * @atomicservice 3888 * @since 11 3889 */ 3890 setPreferredOrientation(orientation: Orientation): Promise<void>; 3891 3892 /** 3893 * Set the preferred orientation config of the window 3894 * 3895 * @param { Orientation } orientation - The orientation config of the window 3896 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3897 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3898 * 2. Incorrect parameter types; 3899 * 3. Parameter verification failed. 3900 * @throws { BusinessError } 1300002 - This window state is abnormal. 3901 * @syscap SystemCapability.WindowManager.WindowManager.Core 3902 * @since 9 3903 */ 3904 /** 3905 * Set the preferred orientation config of the window 3906 * 3907 * @param { Orientation } orientation - The orientation config of the window 3908 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3909 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3910 * 2. Incorrect parameter types; 3911 * 3. Parameter verification failed. 3912 * @throws { BusinessError } 1300002 - This window state is abnormal. 3913 * @syscap SystemCapability.WindowManager.WindowManager.Core 3914 * @crossplatform 3915 * @since 10 3916 */ 3917 /** 3918 * Set the preferred orientation config of the window 3919 * 3920 * @param { Orientation } orientation - The orientation config of the window 3921 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3922 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3923 * 2. Incorrect parameter types; 3924 * 3. Parameter verification failed. 3925 * @throws { BusinessError } 1300002 - This window state is abnormal. 3926 * @syscap SystemCapability.WindowManager.WindowManager.Core 3927 * @crossplatform 3928 * @atomicservice 3929 * @since 11 3930 */ 3931 setPreferredOrientation(orientation: Orientation, callback: AsyncCallback<void>): void; 3932 3933 /** 3934 * Get the preferred orientation config of the window 3935 * 3936 * @returns { Orientation } orientation - The orientation config of the window 3937 * @throws { BusinessError } 1300002 - This window state is abnormal. 3938 * @syscap SystemCapability.WindowManager.WindowManager.Core 3939 * @atomicservice 3940 * @since 12 3941 */ 3942 getPreferredOrientation(): Orientation; 3943 3944 /** 3945 * Loads content 3946 * 3947 * @param { string } path - Path of the page to which the content will be loaded 3948 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 3949 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3950 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3951 * 2. Incorrect parameter types. 3952 * @throws { BusinessError } 1300002 - This window state is abnormal. 3953 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3954 * @syscap SystemCapability.WindowManager.WindowManager.Core 3955 * @StageModelOnly 3956 * @since 9 3957 */ 3958 /** 3959 * Loads content 3960 * 3961 * @param { string } path - Path of the page to which the content will be loaded 3962 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 3963 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3964 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3965 * 2. Incorrect parameter types. 3966 * @throws { BusinessError } 1300002 - This window state is abnormal. 3967 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3968 * @syscap SystemCapability.WindowManager.WindowManager.Core 3969 * @StageModelOnly 3970 * @crossplatform 3971 * @since 10 3972 */ 3973 /** 3974 * Loads content 3975 * 3976 * @param { string } path - Path of the page to which the content will be loaded 3977 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 3978 * @param { AsyncCallback<void> } callback - Callback used to return the result. 3979 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3980 * 2. Incorrect parameter types. 3981 * @throws { BusinessError } 1300002 - This window state is abnormal. 3982 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 3983 * @syscap SystemCapability.WindowManager.WindowManager.Core 3984 * @StageModelOnly 3985 * @crossplatform 3986 * @atomicservice 3987 * @since 11 3988 */ 3989 loadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 3990 3991 /** 3992 * Loads content 3993 * 3994 * @param { string } path - Path of the page to which the content will be loaded 3995 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 3996 * @returns { Promise<void> } Promise that returns no value. 3997 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 3998 * 2. Incorrect parameter types. 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 * @StageModelOnly 4003 * @since 9 4004 */ 4005 /** 4006 * Loads content 4007 * 4008 * @param { string } path - Path of the page to which the content will be loaded 4009 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 4010 * @returns { Promise<void> } Promise that returns no value. 4011 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4012 * 2. Incorrect parameter types. 4013 * @throws { BusinessError } 1300002 - This window state is abnormal. 4014 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4015 * @syscap SystemCapability.WindowManager.WindowManager.Core 4016 * @StageModelOnly 4017 * @crossplatform 4018 * @since 10 4019 */ 4020 /** 4021 * Loads content 4022 * 4023 * @param { string } path - Path of the page to which the content will be loaded 4024 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window 4025 * @returns { Promise<void> } Promise that returns no value. 4026 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4027 * 2. Incorrect parameter types. 4028 * @throws { BusinessError } 1300002 - This window state is abnormal. 4029 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4030 * @syscap SystemCapability.WindowManager.WindowManager.Core 4031 * @StageModelOnly 4032 * @crossplatform 4033 * @atomicservice 4034 * @since 11 4035 */ 4036 loadContent(path: string, storage: LocalStorage): Promise<void>; 4037 4038 /** 4039 * Loads content 4040 * 4041 * @param { string } path - Path of the page to which the content will be loaded 4042 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4043 * @syscap SystemCapability.WindowManager.WindowManager.Core 4044 * @since 7 4045 * @deprecated since 9 4046 * @useinstead ohos.window.Window#setUIContent 4047 */ 4048 loadContent(path: string, callback: AsyncCallback<void>): void; 4049 4050 /** 4051 * Loads content 4052 * 4053 * @param { string } path - Path of the page to which the content will be loaded 4054 * @returns { Promise<void> } Promise that returns no value. 4055 * @syscap SystemCapability.WindowManager.WindowManager.Core 4056 * @since 7 4057 * @deprecated since 9 4058 * @useinstead ohos.window.Window#setUIContent 4059 */ 4060 loadContent(path: string): Promise<void>; 4061 4062 /** 4063 * Get the UIContext associate with the window content. 4064 * 4065 * @returns { UIContext } the object of UIContext. 4066 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4067 * 2. Incorrect parameter types; 4068 * 3. Parameter verification failed. 4069 * @throws { BusinessError } 1300002 - This window state is abnormal. 4070 * @syscap SystemCapability.WindowManager.WindowManager.Core 4071 * @stagemodelonly 4072 * @crossplatform 4073 * @since 10 4074 */ 4075 /** 4076 * Get the UIContext associate with the window content. 4077 * 4078 * @returns { UIContext } the object of UIContext. 4079 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4080 * 2. Incorrect parameter types; 4081 * 3. Parameter verification failed. 4082 * @throws { BusinessError } 1300002 - This window state is abnormal. 4083 * @syscap SystemCapability.WindowManager.WindowManager.Core 4084 * @stagemodelonly 4085 * @crossplatform 4086 * @atomicservice 4087 * @since 11 4088 */ 4089 getUIContext() : UIContext; 4090 4091 /** 4092 * Loads content 4093 * 4094 * @param { string } path - Path of the page to which the content will be loaded 4095 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4096 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4097 * 2. Incorrect parameter types. 4098 * @throws { BusinessError } 1300002 - This window state is abnormal. 4099 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4100 * @syscap SystemCapability.WindowManager.WindowManager.Core 4101 * @since 9 4102 */ 4103 /** 4104 * Loads content 4105 * 4106 * @param { string } path - Path of the page to which the content will be loaded 4107 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4108 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4109 * 2. Incorrect parameter types. 4110 * @throws { BusinessError } 1300002 - This window state is abnormal. 4111 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4112 * @syscap SystemCapability.WindowManager.WindowManager.Core 4113 * @crossplatform 4114 * @since 10 4115 */ 4116 /** 4117 * Loads content 4118 * 4119 * @param { string } path - Path of the page to which the content will be loaded 4120 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4121 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4122 * 2. Incorrect parameter types. 4123 * @throws { BusinessError } 1300002 - This window state is abnormal. 4124 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4125 * @syscap SystemCapability.WindowManager.WindowManager.Core 4126 * @crossplatform 4127 * @atomicservice 4128 * @since 11 4129 */ 4130 setUIContent(path: string, callback: AsyncCallback<void>): void; 4131 4132 /** 4133 * Loads content 4134 * 4135 * @param { string } path - Path of the page to which the content will be loaded 4136 * @returns { Promise<void> } Promise that returns no value. 4137 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4138 * 2. Incorrect parameter types. 4139 * @throws { BusinessError } 1300002 - This window state is abnormal. 4140 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4141 * @syscap SystemCapability.WindowManager.WindowManager.Core 4142 * @since 9 4143 */ 4144 /** 4145 * Loads content 4146 * 4147 * @param { string } path - Path of the page to which the content will be loaded 4148 * @returns { Promise<void> } Promise that returns no value. 4149 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4150 * 2. Incorrect parameter types. 4151 * @throws { BusinessError } 1300002 - This window state is abnormal. 4152 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4153 * @syscap SystemCapability.WindowManager.WindowManager.Core 4154 * @crossplatform 4155 * @since 10 4156 */ 4157 /** 4158 * Loads content 4159 * 4160 * @param { string } path - Path of the page to which the content will be loaded 4161 * @returns { Promise<void> } Promise that returns no value. 4162 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4163 * 2. Incorrect parameter types. 4164 * @throws { BusinessError } 1300002 - This window state is abnormal. 4165 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4166 * @syscap SystemCapability.WindowManager.WindowManager.Core 4167 * @crossplatform 4168 * @atomicservice 4169 * @since 11 4170 */ 4171 setUIContent(path: string): Promise<void>; 4172 4173 /** 4174 * Loads content by named router 4175 * 4176 * @param { string } name - name of the page to which the content will be loaded. 4177 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 4178 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4179 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4180 * 2. Incorrect parameter types. 4181 * @throws { BusinessError } 1300002 - This window state is abnormal. 4182 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4183 * @syscap SystemCapability.WindowManager.WindowManager.Core 4184 * @stagemodelonly 4185 * @crossplatform 4186 * @atomicservice 4187 * @since 11 4188 */ 4189 loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 4190 4191 /** 4192 * Loads content by named router 4193 * 4194 * @param { string } name - name of the page to which the content will be loaded. 4195 * @param { AsyncCallback<void> } callback - Callback used to return the result. 4196 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4197 * 2. Incorrect parameter types. 4198 * @throws { BusinessError } 1300002 - This window state is abnormal. 4199 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4200 * @syscap SystemCapability.WindowManager.WindowManager.Core 4201 * @stagemodelonly 4202 * @crossplatform 4203 * @atomicservice 4204 * @since 11 4205 */ 4206 loadContentByName(name: string, callback: AsyncCallback<void>): void; 4207 4208 /** 4209 * Loads content by named router 4210 * 4211 * @param { string } name - name of the page to which the content will be loaded. 4212 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 4213 * @returns { Promise<void> } Promise that returns no value. 4214 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4215 * 2. Incorrect parameter types. 4216 * @throws { BusinessError } 1300002 - This window state is abnormal. 4217 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4218 * @syscap SystemCapability.WindowManager.WindowManager.Core 4219 * @stagemodelonly 4220 * @crossplatform 4221 * @atomicservice 4222 * @since 11 4223 */ 4224 loadContentByName(name: string, storage?: LocalStorage): Promise<void>; 4225 4226 /** 4227 * Checks whether the window is displayed 4228 * 4229 * @param { AsyncCallback<boolean> } callback - Callback used to return the result. 4230 * @syscap SystemCapability.WindowManager.WindowManager.Core 4231 * @since 7 4232 * @deprecated since 9 4233 * @useinstead ohos.window.Window#isWindowShowing 4234 */ 4235 isShowing(callback: AsyncCallback<boolean>): void; 4236 4237 /** 4238 * Checks whether the window is displayed 4239 * 4240 * @returns { Promise<boolean> } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 4241 * @syscap SystemCapability.WindowManager.WindowManager.Core 4242 * @since 7 4243 * @deprecated since 9 4244 * @useinstead ohos.window.Window#isWindowShowing 4245 */ 4246 isShowing(): Promise<boolean>; 4247 4248 /** 4249 * Checks whether the window is displayed 4250 * 4251 * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 4252 * @throws { BusinessError } 1300002 - This window state is abnormal. 4253 * @syscap SystemCapability.WindowManager.WindowManager.Core 4254 * @since 9 4255 */ 4256 /** 4257 * Checks whether the window is displayed 4258 * 4259 * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 4260 * @throws { BusinessError } 1300002 - This window state is abnormal. 4261 * @syscap SystemCapability.WindowManager.WindowManager.Core 4262 * @crossplatform 4263 * @since 10 4264 */ 4265 /** 4266 * Checks whether the window is displayed 4267 * 4268 * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite. 4269 * @throws { BusinessError } 1300002 - This window state is abnormal. 4270 * @syscap SystemCapability.WindowManager.WindowManager.Core 4271 * @crossplatform 4272 * @atomicservice 4273 * @since 11 4274 */ 4275 isWindowShowing(): boolean; 4276 4277 /** 4278 * Register the callback of windowSizeChange 4279 * 4280 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 4281 * @param { Callback<Size> } callback - Callback used to return the window size. 4282 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4283 * 2. Incorrect parameter types; 4284 * 3. Parameter verification failed. 4285 * @syscap SystemCapability.WindowManager.WindowManager.Core 4286 * @since 7 4287 */ 4288 /** 4289 * Register the callback of windowSizeChange 4290 * 4291 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 4292 * @param { Callback<Size> } callback - Callback used to return the window size. 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 * @syscap SystemCapability.WindowManager.WindowManager.Core 4297 * @atomicservice 4298 * @since 11 4299 */ 4300 /** 4301 * Register the callback of windowSizeChange 4302 * 4303 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 4304 * @param { Callback<Size> } callback - Callback used to return the window size. 4305 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4306 * 2. Incorrect parameter types; 4307 * 3. Parameter verification failed. 4308 * @syscap SystemCapability.WindowManager.WindowManager.Core 4309 * @crossplatform 4310 * @atomicservice 4311 * @since 12 4312 */ 4313 on(type: 'windowSizeChange', callback: Callback<Size>): void; 4314 4315 /** 4316 * Unregister the callback of windowSizeChange 4317 * 4318 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 4319 * @param { Callback<Size> } callback - Callback used to return the window size. 4320 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4321 * 2. Parameter verification failed. 4322 * @syscap SystemCapability.WindowManager.WindowManager.Core 4323 * @since 7 4324 */ 4325 /** 4326 * Unregister the callback of windowSizeChange 4327 * 4328 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 4329 * @param { Callback<Size> } callback - Callback used to return the window size. 4330 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4331 * 2. Parameter verification failed. 4332 * @syscap SystemCapability.WindowManager.WindowManager.Core 4333 * @atomicservice 4334 * @since 11 4335 */ 4336 /** 4337 * Unregister the callback of windowSizeChange 4338 * 4339 * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. 4340 * @param { Callback<Size> } callback - Callback used to return the window size. 4341 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4342 * 2. Parameter verification failed. 4343 * @syscap SystemCapability.WindowManager.WindowManager.Core 4344 * @crossplatform 4345 * @atomicservice 4346 * @since 12 4347 */ 4348 off(type: 'windowSizeChange', callback?: Callback<Size>): void; 4349 4350 /** 4351 * Register the callback of systemAvoidAreaChange 4352 * 4353 * @param { 'systemAvoidAreaChange' } type - The value is fixed at 'systemAvoidAreaChange', indicating the event of changes to the avoid area. 4354 * @param { Callback<AvoidArea> } callback - Callback used to return the area. 4355 * @syscap SystemCapability.WindowManager.WindowManager.Core 4356 * @since 7 4357 * @deprecated since 9 4358 * @useinstead ohos.window.Window#on_avoidAreaChange 4359 */ 4360 on(type: 'systemAvoidAreaChange', callback: Callback<AvoidArea>): void; 4361 4362 /** 4363 * Unregister the callback of systemAvoidAreaChange 4364 * 4365 * @param { 'systemAvoidAreaChange' } type - The value is fixed at 'systemAvoidAreaChange', indicating the event of changes to the avoid area. 4366 * @param { Callback<AvoidArea> } callback - Callback used to return the area. 4367 * @syscap SystemCapability.WindowManager.WindowManager.Core 4368 * @since 7 4369 * @deprecated since 9 4370 * @useinstead ohos.window.Window#off_avoidAreaChange 4371 */ 4372 off(type: 'systemAvoidAreaChange', callback?: Callback<AvoidArea>): void; 4373 4374 /** 4375 * Register the callback of avoidAreaChange 4376 * 4377 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 4378 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 4379 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4380 * 2. Incorrect parameter types; 4381 * 3. Parameter verification failed. 4382 * @syscap SystemCapability.WindowManager.WindowManager.Core 4383 * @since 9 4384 */ 4385 /** 4386 * Register the callback of avoidAreaChange 4387 * 4388 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 4389 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 4390 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4391 * 2. Incorrect parameter types; 4392 * 3. Parameter verification failed. 4393 * @syscap SystemCapability.WindowManager.WindowManager.Core 4394 * @atomicservice 4395 * @since 11 4396 */ 4397 /** 4398 * Register the callback of avoidAreaChange 4399 * 4400 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 4401 * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area. 4402 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4403 * 2. Incorrect parameter types; 4404 * 3. Parameter verification failed. 4405 * @syscap SystemCapability.WindowManager.WindowManager.Core 4406 * @atomicservice 4407 * @since 12 4408 */ 4409 on(type: 'avoidAreaChange', callback: Callback<AvoidAreaOptions>): void; 4410 4411 /** 4412 * Unregister the callback of avoidAreaChange 4413 * 4414 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 4415 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 4416 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4417 * 2. Incorrect parameter types; 4418 * 3. Parameter verification failed. 4419 * @syscap SystemCapability.WindowManager.WindowManager.Core 4420 * @since 9 4421 */ 4422 /** 4423 * Unregister the callback of avoidAreaChange 4424 * 4425 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 4426 * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area. 4427 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4428 * 2. Incorrect parameter types; 4429 * 3. Parameter verification failed. 4430 * @syscap SystemCapability.WindowManager.WindowManager.Core 4431 * @atomicservice 4432 * @since 11 4433 */ 4434 /** 4435 * Unregister the callback of avoidAreaChange 4436 * 4437 * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. 4438 * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area. 4439 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4440 * 2. Incorrect parameter types; 4441 * 3. Parameter verification failed. 4442 * @syscap SystemCapability.WindowManager.WindowManager.Core 4443 * @atomicservice 4444 * @since 12 4445 */ 4446 off(type: 'avoidAreaChange', callback?: Callback<AvoidAreaOptions>): void; 4447 4448 /** 4449 * Register the callback of keyboardHeightChange 4450 * 4451 * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. 4452 * @param { Callback<number> } callback - Callback used to return the current keyboard height. 4453 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4454 * 2. Incorrect parameter types; 4455 * 3. Parameter verification failed. 4456 * @syscap SystemCapability.WindowManager.WindowManager.Core 4457 * @since 7 4458 */ 4459 on(type: 'keyboardHeightChange', callback: Callback<number>): void; 4460 4461 /** 4462 * Unregister the callback of keyboardHeightChange 4463 * 4464 * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. 4465 * @param { Callback<number> } callback - Callback used to return the current keyboard height. 4466 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4467 * 2. Parameter verification failed. 4468 * @syscap SystemCapability.WindowManager.WindowManager.Core 4469 * @since 7 4470 */ 4471 off(type: 'keyboardHeightChange', callback?: Callback<number>): void; 4472 4473 /** 4474 * Touch outside callback on. 4475 * 4476 * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. 4477 * @param { Callback<void> } callback - Callback used to return the click event outside this window. 4478 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4479 * 2. Incorrect parameter types; 4480 * 3. Parameter verification failed. 4481 * @syscap SystemCapability.WindowManager.WindowManager.Core 4482 * @atomicservice 4483 * @since 11 4484 */ 4485 on(type: 'touchOutside', callback: Callback<void>): void; 4486 4487 /** 4488 * Touch outside callback off. 4489 * 4490 * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. 4491 * @param { Callback<void> } callback - Callback used to return the click event outside this window. 4492 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4493 * 2. Parameter verification failed. 4494 * @syscap SystemCapability.WindowManager.WindowManager.Core 4495 * @atomicservice 4496 * @since 11 4497 */ 4498 off(type: 'touchOutside', callback?: Callback<void>): void; 4499 4500 /** 4501 * Window visibility change callback on. 4502 * 4503 * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. 4504 * @param { Callback<boolean> } callback - Callback used to notify the window visibility change. 4505 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4506 * 2. Incorrect parameter types; 4507 * 3. Parameter verification failed. 4508 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4509 * @throws { BusinessError } 1300002 - This window state is abnormal. 4510 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4511 * @syscap SystemCapability.Window.SessionManager 4512 * @since 11 4513 */ 4514 on(type: 'windowVisibilityChange', callback: Callback<boolean>): void; 4515 4516 /** 4517 * Window visibility change callback off. 4518 * 4519 * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. 4520 * @param { Callback<boolean> } callback - Callback used to notify the window visibility change. 4521 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4522 * 2. Parameter verification failed. 4523 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4524 * @throws { BusinessError } 1300002 - This window state is abnormal. 4525 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4526 * @syscap SystemCapability.Window.SessionManager 4527 * @since 11 4528 */ 4529 off(type: 'windowVisibilityChange', callback?: Callback<boolean>): void; 4530 4531 /** 4532 * Register the callback function that has no interaction for a long time. 4533 * 4534 * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. 4535 * @param { number } timeout - The timeout(in seconds) of no interaction detection. 4536 * @param { Callback<void> } callback - Callback used to notify the window has no interaction for a long time. 4537 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4538 * 2. Incorrect parameter types; 4539 * 3. Parameter verification failed. 4540 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4541 * @throws { BusinessError } 1300002 - This window state is abnormal. 4542 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4543 * @syscap SystemCapability.Window.SessionManager 4544 * @since 12 4545 */ 4546 on(type: 'noInteractionDetected', timeout: number, callback: Callback<void>): void; 4547 4548 /** 4549 * Unregister the callback function that has no interaction for a long time. 4550 * 4551 * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. 4552 * @param { Callback<void> } callback - Callback used to notify the window has no interaction for a long time. 4553 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4554 * @throws { BusinessError } 1300002 - This window state is abnormal. 4555 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4556 * @syscap SystemCapability.Window.SessionManager 4557 * @since 12 4558 */ 4559 off(type: 'noInteractionDetected', callback?: Callback<void>): void; 4560 4561 /** 4562 * Register the callback of screenshot, only the focused window called back 4563 * 4564 * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event. 4565 * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs. 4566 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4567 * 2. Incorrect parameter types; 4568 * 3. Parameter verification failed. 4569 * @syscap SystemCapability.WindowManager.WindowManager.Core 4570 * @since 9 4571 */ 4572 on(type: 'screenshot', callback: Callback<void>): void; 4573 4574 /** 4575 * Unregister the callback of screenshot 4576 * 4577 * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event. 4578 * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs. 4579 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4580 * 2. Parameter verification failed. 4581 * @syscap SystemCapability.WindowManager.WindowManager.Core 4582 * @since 9 4583 */ 4584 off(type: 'screenshot', callback?: Callback<void>): void; 4585 4586 /** 4587 * Register the callback of dialogTargetTouch 4588 * 4589 * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode. 4590 * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode. 4591 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4592 * 2. Incorrect parameter types; 4593 * 3. Parameter verification failed. 4594 * @syscap SystemCapability.WindowManager.WindowManager.Core 4595 * @since 10 4596 */ 4597 on(type: 'dialogTargetTouch', callback: Callback<void>): void; 4598 4599 /** 4600 * Unregister the callback of dialogTargetTouch 4601 * 4602 * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', 4603 * indicating the click event of the target window in the modal window mode. 4604 * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode. 4605 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4606 * 2. Parameter verification failed. 4607 * @syscap SystemCapability.WindowManager.WindowManager.Core 4608 * @since 10 4609 */ 4610 off(type: 'dialogTargetTouch', callback?: Callback<void>): void; 4611 4612 /** 4613 * Register the callback of windowEvent 4614 * 4615 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 4616 * @param { Callback<WindowEventType> } callback - the callback of window event 4617 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4618 * 2. Incorrect parameter types; 4619 * 3. Parameter verification failed. 4620 * @syscap SystemCapability.WindowManager.WindowManager.Core 4621 * @since 10 4622 */ 4623 /** 4624 * Register the callback of windowEvent 4625 * 4626 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 4627 * @param { Callback<WindowEventType> } callback - the callback of window event 4628 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4629 * 2. Incorrect parameter types; 4630 * 3. Parameter verification failed. 4631 * @syscap SystemCapability.WindowManager.WindowManager.Core 4632 * @crossplatform 4633 * @atomicservice 4634 * @since 11 4635 */ 4636 on(type: 'windowEvent', callback: Callback<WindowEventType>): void; 4637 4638 /** 4639 * Unregister the callback of windowEvent 4640 * 4641 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 4642 * @param { Callback<WindowEventType> } callback - the callback of window event 4643 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4644 * 2. Parameter verification failed. 4645 * @syscap SystemCapability.WindowManager.WindowManager.Core 4646 * @since 10 4647 */ 4648 /** 4649 * Unregister the callback of windowEvent 4650 * 4651 * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. 4652 * @param { Callback<WindowEventType> } callback - the callback of window event 4653 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4654 * 2. Parameter verification failed. 4655 * @syscap SystemCapability.WindowManager.WindowManager.Core 4656 * @crossplatform 4657 * @atomicservice 4658 * @since 11 4659 */ 4660 off(type: 'windowEvent', callback?: Callback<WindowEventType>): void; 4661 4662 /** 4663 * Register the callback of windowStatusChange 4664 * 4665 * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. 4666 * @param { Callback<WindowStatusType> } callback - Callback used to return the window status. 4667 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4668 * 2. Incorrect parameter types; 4669 * 3. Parameter verification failed. 4670 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4671 * @syscap SystemCapability.Window.SessionManager 4672 * @since 11 4673 */ 4674 on(type: 'windowStatusChange', callback: Callback<WindowStatusType>): void; 4675 4676 /** 4677 * Unregister the callback of windowStatusChange 4678 * 4679 * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. 4680 * @param { Callback<WindowStatusType> } callback - Callback used to return the window status. 4681 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 4682 * 2. Parameter verification failed. 4683 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 4684 * @syscap SystemCapability.Window.SessionManager 4685 * @since 11 4686 */ 4687 off(type: 'windowStatusChange', callback?: Callback<WindowStatusType>): void; 4688 4689 /** 4690 * Bind dialog to the target window. 4691 * 4692 * @param { rpc.RemoteObject } token - token of the target window. 4693 * @param { Callback<void> } deathCallback - the callback of dialogDeath. 4694 * @returns { Promise<void> } Promise that returns no value. 4695 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 4696 * @throws { BusinessError } 1300002 - This window state is abnormal. 4697 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4698 * @syscap SystemCapability.WindowManager.WindowManager.Core 4699 * @systemapi Hide this for inner system use. 4700 * @since 9 4701 */ 4702 bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>): Promise<void>; 4703 4704 /** 4705 * Bind dialog to the target window. 4706 * 4707 * @param { rpc.RemoteObject } token token of the target window. 4708 * @param { Callback<void> } deathCallback the callback of dialogDeath. 4709 * @param { AsyncCallback<void> } callback Callback used to return the result. 4710 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 4711 * @throws { BusinessError } 1300002 - This window state is abnormal. 4712 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4713 * @syscap SystemCapability.WindowManager.WindowManager.Core 4714 * @systemapi Hide this for inner system use. 4715 * @since 9 4716 */ 4717 bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>, callback: AsyncCallback<void>): void; 4718 4719 /** 4720 * Bind dialog to the target window. 4721 * 4722 * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window. 4723 * @param { Callback<void> } deathCallback the callback of dialogDeath. 4724 * @returns { Promise<void> } Promise that returns no value. 4725 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 4726 * @throws { BusinessError } 1300002 - This window state is abnormal. 4727 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4728 * @syscap SystemCapability.WindowManager.WindowManager.Core 4729 * @systemapi Hide this for inner system use. 4730 * @since 9 4731 */ 4732 bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback<void>): Promise<void>; 4733 4734 /** 4735 * Bind dialog to the target window. 4736 * 4737 * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window. 4738 * @param { Callback<void> } deathCallback the callback of dialogDeath. 4739 * @param { AsyncCallback<void> } callback Callback used to return the result. 4740 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 4741 * @throws { BusinessError } 1300002 - This window state is abnormal. 4742 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 4743 * @syscap SystemCapability.WindowManager.WindowManager.Core 4744 * @systemapi Hide this for inner system use. 4745 * @since 9 4746 */ 4747 bindDialogTarget( 4748 requestInfo: dialogRequest.RequestInfo, 4749 deathCallback: Callback<void>, 4750 callback: AsyncCallback<void> 4751 ): void; 4752 4753 /** 4754 * Whether the window supports thr wide gamut setting. 4755 * 4756 * @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. 4757 * @syscap SystemCapability.WindowManager.WindowManager.Core 4758 * @since 8 4759 * @deprecated since 9 4760 * @useinstead ohos.window.Window#isWindowSupportWideGamut 4761 */ 4762 isSupportWideGamut(): Promise<boolean>; 4763 4764 /** 4765 * Whether the window supports thr wide gamut setting. 4766 * 4767 * @param { AsyncCallback<boolean> } callback Callback used to return the result. 4768 * @syscap SystemCapability.WindowManager.WindowManager.Core 4769 * @since 8 4770 * @deprecated since 9 4771 * @useinstead ohos.window.Window#isWindowSupportWideGamut 4772 */ 4773 isSupportWideGamut(callback: AsyncCallback<boolean>): void; 4774 4775 /** 4776 * Whether the window supports thr wide gamut setting. 4777 * 4778 * @returns { Promise<boolean> } Promise used to return the result. 4779 * The value true means that the wide-gamut color space is supported, and false means the opposite. 4780 * @throws { BusinessError } 1300002 - This window state is abnormal. 4781 * @syscap SystemCapability.WindowManager.WindowManager.Core 4782 * @since 9 4783 */ 4784 /** 4785 * Whether the window supports thr wide gamut setting. 4786 * 4787 * @returns { Promise<boolean> } Promise used to return the result. 4788 * The value true means that the wide-gamut color space is supported, and false means the opposite. 4789 * @throws { BusinessError } 1300002 - This window state is abnormal. 4790 * @syscap SystemCapability.WindowManager.WindowManager.Core 4791 * @atomicservice 4792 * @since 12 4793 */ 4794 isWindowSupportWideGamut(): Promise<boolean>; 4795 4796 /** 4797 * Whether the window supports thr wide gamut setting. 4798 * 4799 * @param { AsyncCallback<boolean> } callback Callback used to return the result. 4800 * @throws { BusinessError } 1300002 - This window state is abnormal. 4801 * @syscap SystemCapability.WindowManager.WindowManager.Core 4802 * @since 9 4803 */ 4804 /** 4805 * Whether the window supports thr wide gamut setting. 4806 * 4807 * @param { AsyncCallback<boolean> } callback Callback used to return the result. 4808 * @throws { BusinessError } 1300002 - This window state is abnormal. 4809 * @syscap SystemCapability.WindowManager.WindowManager.Core 4810 * @atomicservice 4811 * @since 12 4812 */ 4813 isWindowSupportWideGamut(callback: AsyncCallback<boolean>): void; 4814 4815 /** 4816 * Sets the specified color space. 4817 * 4818 * @param { ColorSpace } colorSpace the specified color space. 4819 * @returns { Promise<void> } Promise that returns no value. 4820 * @syscap SystemCapability.WindowManager.WindowManager.Core 4821 * @since 8 4822 * @deprecated since 9 4823 * @useinstead ohos.window.Window#setWindowColorSpace 4824 */ 4825 setColorSpace(colorSpace: ColorSpace): Promise<void>; 4826 4827 /** 4828 * Sets the specified color space. 4829 * 4830 * @param { ColorSpace } colorSpace the specified color space. 4831 * @param { AsyncCallback<void> } callback Callback used to return the result. 4832 * @syscap SystemCapability.WindowManager.WindowManager.Core 4833 * @since 8 4834 * @deprecated since 9 4835 * @useinstead ohos.window.Window#setWindowColorSpace 4836 */ 4837 setColorSpace(colorSpace: ColorSpace, callback: AsyncCallback<void>): void; 4838 4839 /** 4840 * Sets the specified color space. 4841 * 4842 * @param { ColorSpace } colorSpace the specified color space. 4843 * @returns { Promise<void> } Promise that returns no value. 4844 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4845 * 2. Incorrect parameter types; 4846 * 3. Parameter verification failed. 4847 * @throws { BusinessError } 1300002 - This window state is abnormal. 4848 * @syscap SystemCapability.WindowManager.WindowManager.Core 4849 * @since 9 4850 */ 4851 /** 4852 * Sets the specified color space. 4853 * 4854 * @param { ColorSpace } colorSpace the specified color space. 4855 * @returns { Promise<void> } Promise that returns no value. 4856 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4857 * 2. Incorrect parameter types; 4858 * 3. Parameter verification failed. 4859 * @throws { BusinessError } 1300002 - This window state is abnormal. 4860 * @syscap SystemCapability.WindowManager.WindowManager.Core 4861 * @crossplatform 4862 * @since 11 4863 */ 4864 /** 4865 * Sets the specified color space. 4866 * 4867 * @param { ColorSpace } colorSpace the specified color space. 4868 * @returns { Promise<void> } Promise that returns no value. 4869 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4870 * 2. Incorrect parameter types; 4871 * 3. Parameter verification failed. 4872 * @throws { BusinessError } 1300002 - This window state is abnormal. 4873 * @syscap SystemCapability.WindowManager.WindowManager.Core 4874 * @crossplatform 4875 * @atomicservice 4876 * @since 12 4877 */ 4878 setWindowColorSpace(colorSpace: ColorSpace): Promise<void>; 4879 4880 /** 4881 * Sets the specified color space. 4882 * 4883 * @param { ColorSpace } colorSpace the specified color space. 4884 * @param { AsyncCallback<void> } callback Callback used to return the result. 4885 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4886 * 2. Incorrect parameter types; 4887 * 3. Parameter verification failed. 4888 * @throws { BusinessError } 1300002 - This window state is abnormal. 4889 * @syscap SystemCapability.WindowManager.WindowManager.Core 4890 * @since 9 4891 */ 4892 /** 4893 * Sets the specified color space. 4894 * 4895 * @param { ColorSpace } colorSpace the specified color space. 4896 * @param { AsyncCallback<void> } callback Callback used to return the result. 4897 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4898 * 2. Incorrect parameter types; 4899 * 3. Parameter verification failed. 4900 * @throws { BusinessError } 1300002 - This window state is abnormal. 4901 * @syscap SystemCapability.WindowManager.WindowManager.Core 4902 * @crossplatform 4903 * @since 11 4904 */ 4905 /** 4906 * Sets the specified color space. 4907 * 4908 * @param { ColorSpace } colorSpace the specified color space. 4909 * @param { AsyncCallback<void> } callback Callback used to return the result. 4910 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 4911 * 2. Incorrect parameter types; 4912 * 3. Parameter verification failed. 4913 * @throws { BusinessError } 1300002 - This window state is abnormal. 4914 * @syscap SystemCapability.WindowManager.WindowManager.Core 4915 * @crossplatform 4916 * @atomicservice 4917 * @since 12 4918 */ 4919 setWindowColorSpace(colorSpace: ColorSpace, callback: AsyncCallback<void>): void; 4920 4921 /** 4922 * Obtains the set color space. 4923 * 4924 * @returns { Promise<ColorSpace> } Promise used to return the current color space. 4925 * @syscap SystemCapability.WindowManager.WindowManager.Core 4926 * @since 8 4927 * @deprecated since 9 4928 * @useinstead ohos.window.Window#getWindowColorSpace 4929 */ 4930 getColorSpace(): Promise<ColorSpace>; 4931 4932 /** 4933 * Obtains the set color space. 4934 * 4935 * @param { AsyncCallback<ColorSpace> } callback Callback used to return the result. 4936 * @syscap SystemCapability.WindowManager.WindowManager.Core 4937 * @since 8 4938 * @deprecated since 9 4939 * @useinstead ohos.window.Window#getWindowColorSpace 4940 */ 4941 getColorSpace(callback: AsyncCallback<ColorSpace>): void; 4942 4943 /** 4944 * Obtains the set color space. 4945 * 4946 * @returns { ColorSpace } Color space obtained. 4947 * @throws { BusinessError } 1300002 - This window state is abnormal. 4948 * @syscap SystemCapability.WindowManager.WindowManager.Core 4949 * @since 9 4950 */ 4951 /** 4952 * Obtains the set color space. 4953 * 4954 * @returns { ColorSpace } Color space obtained. 4955 * @throws { BusinessError } 1300002 - This window state is abnormal. 4956 * @syscap SystemCapability.WindowManager.WindowManager.Core 4957 * @crossplatform 4958 * @since 11 4959 */ 4960 /** 4961 * Obtains the set color space. 4962 * 4963 * @returns { ColorSpace } Color space obtained. 4964 * @throws { BusinessError } 1300002 - This window state is abnormal. 4965 * @syscap SystemCapability.WindowManager.WindowManager.Core 4966 * @crossplatform 4967 * @atomicservice 4968 * @since 12 4969 */ 4970 getWindowColorSpace(): ColorSpace; 4971 4972 /** 4973 * Sets the background color of window. 4974 * 4975 * @param { string } color the specified color. 4976 * @returns { Promise<void> } Promise that returns no value. 4977 * @syscap SystemCapability.WindowManager.WindowManager.Core 4978 * @since 6 4979 * @deprecated since 9 4980 * @useinstead ohos.window.Window#setWindowBackgroundColor 4981 */ 4982 setBackgroundColor(color: string): Promise<void>; 4983 4984 /** 4985 * Sets the background color of window. 4986 * 4987 * @param { string } color the specified color. 4988 * @param { AsyncCallback<void> } callback Callback used to return the result. 4989 * @syscap SystemCapability.WindowManager.WindowManager.Core 4990 * @since 6 4991 * @deprecated since 9 4992 * @useinstead ohos.window.Window#setWindowBackgroundColor 4993 */ 4994 setBackgroundColor(color: string, callback: AsyncCallback<void>): void; 4995 4996 /** 4997 * Sets the background color of window. 4998 * 4999 * @param { string } color the specified color. 5000 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5001 * 2. Incorrect parameter types. 5002 * @throws { BusinessError } 1300002 - This window state is abnormal. 5003 * @syscap SystemCapability.WindowManager.WindowManager.Core 5004 * @since 9 5005 */ 5006 /** 5007 * Sets the background color of window. 5008 * 5009 * @param { string } color the specified color. 5010 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5011 * 2. Incorrect parameter types. 5012 * @throws { BusinessError } 1300002 - This window state is abnormal. 5013 * @syscap SystemCapability.WindowManager.WindowManager.Core 5014 * @crossplatform 5015 * @since 10 5016 */ 5017 /** 5018 * Sets the background color of window. 5019 * 5020 * @param { string } color the specified color. 5021 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5022 * 2. Incorrect parameter types. 5023 * @throws { BusinessError } 1300002 - This window state is abnormal. 5024 * @syscap SystemCapability.WindowManager.WindowManager.Core 5025 * @crossplatform 5026 * @atomicservice 5027 * @since 11 5028 */ 5029 setWindowBackgroundColor(color: string): void; 5030 5031 /** 5032 * Sets the brightness of window. 5033 * 5034 * @param { number } brightness the specified brightness value. 5035 * @returns { Promise<void> } Promise that returns no value. 5036 * @syscap SystemCapability.WindowManager.WindowManager.Core 5037 * @since 6 5038 * @deprecated since 9 5039 * @useinstead ohos.window.Window#setWindowBrightness 5040 */ 5041 setBrightness(brightness: number): Promise<void>; 5042 5043 /** 5044 * Sets the brightness of window. 5045 * 5046 * @param { number } brightness the specified brightness value. 5047 * @param { AsyncCallback<void> } callback Callback used to return the result. 5048 * @syscap SystemCapability.WindowManager.WindowManager.Core 5049 * @since 6 5050 * @deprecated since 9 5051 * @useinstead ohos.window.Window#setWindowBrightness 5052 */ 5053 setBrightness(brightness: number, callback: AsyncCallback<void>): void; 5054 5055 /** 5056 * Set whether the main window is topmost. 5057 * 5058 * @param { boolean } isTopmost - Main window is topmost if true. 5059 * @returns { Promise<void> } Promise that returns no value. 5060 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 5061 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5062 * 2. Incorrect parameter types. 5063 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5064 * @throws { BusinessError } 1300002 - This window state is abnormal. 5065 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5066 * @throws { BusinessError } 1300004 - Unauthorized operation. 5067 * @syscap SystemCapability.Window.SessionManager 5068 * @systemapi 5069 * @since 12 5070 */ 5071 setTopmost(isTopmost: boolean): Promise<void>; 5072 5073 /** 5074 * Sets the brightness of window. 5075 * 5076 * @param { number } brightness the specified brightness value. 5077 * @returns { Promise<void> } Promise that returns no value. 5078 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5079 * 2. Incorrect parameter types. 5080 * @throws { BusinessError } 1300002 - This window state is abnormal. 5081 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5082 * @syscap SystemCapability.WindowManager.WindowManager.Core 5083 * @since 9 5084 */ 5085 /** 5086 * Sets the brightness of window. 5087 * 5088 * @param { number } brightness the specified brightness value. 5089 * @returns { Promise<void> } Promise that returns no value. 5090 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5091 * 2. Incorrect parameter types. 5092 * @throws { BusinessError } 1300002 - This window state is abnormal. 5093 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5094 * @syscap SystemCapability.WindowManager.WindowManager.Core 5095 * @crossplatform 5096 * @since 10 5097 */ 5098 /** 5099 * Sets the brightness of window. 5100 * 5101 * @param { number } brightness the specified brightness value. 5102 * @returns { Promise<void> } Promise that returns no value. 5103 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5104 * 2. Incorrect parameter types. 5105 * @throws { BusinessError } 1300002 - This window state is abnormal. 5106 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5107 * @syscap SystemCapability.WindowManager.WindowManager.Core 5108 * @crossplatform 5109 * @atomicservice 5110 * @since 11 5111 */ 5112 setWindowBrightness(brightness: number): Promise<void>; 5113 5114 /** 5115 * Sets the brightness of window. 5116 * 5117 * @param { number } brightness the specified brightness value. 5118 * @param { AsyncCallback<void> } callback Callback used to return the result. 5119 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5120 * 2. Incorrect parameter types. 5121 * @throws { BusinessError } 1300002 - This window state is abnormal. 5122 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5123 * @syscap SystemCapability.WindowManager.WindowManager.Core 5124 * @since 9 5125 */ 5126 /** 5127 * Sets the brightness of window. 5128 * 5129 * @param { number } brightness the specified brightness value. 5130 * @param { AsyncCallback<void> } callback Callback used to return the result. 5131 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5132 * 2. Incorrect parameter types. 5133 * @throws { BusinessError } 1300002 - This window state is abnormal. 5134 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5135 * @syscap SystemCapability.WindowManager.WindowManager.Core 5136 * @crossplatform 5137 * @since 10 5138 */ 5139 /** 5140 * Sets the brightness of window. 5141 * 5142 * @param { number } brightness the specified brightness value. 5143 * @param { AsyncCallback<void> } callback Callback used to return the result. 5144 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5145 * 2. Incorrect parameter types. 5146 * @throws { BusinessError } 1300002 - This window state is abnormal. 5147 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5148 * @syscap SystemCapability.WindowManager.WindowManager.Core 5149 * @crossplatform 5150 * @atomicservice 5151 * @since 11 5152 */ 5153 setWindowBrightness(brightness: number, callback: AsyncCallback<void>): void; 5154 5155 /** 5156 * Sets the dimBehind of window. 5157 * 5158 * @param { number } dimBehindValue - The specified dimBehind. 5159 * @param { AsyncCallback<void> } callback Callback used to return the result. 5160 * @syscap SystemCapability.WindowManager.WindowManager.Core 5161 * @since 7 5162 * @deprecated since 9 5163 */ 5164 setDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void; 5165 5166 /** 5167 * Sets the dimBehind of window. 5168 * 5169 * @param { number } dimBehindValue - The specified dimBehind. 5170 * @returns { Promise<void> } Promise that returns no value. 5171 * @syscap SystemCapability.WindowManager.WindowManager.Core 5172 * @since 7 5173 * @deprecated since 9 5174 */ 5175 setDimBehind(dimBehindValue: number): Promise<void>; 5176 5177 /** 5178 * Sets whether focusable or not. 5179 * 5180 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 5181 * @returns { Promise<void> } Promise that returns no value. 5182 * @syscap SystemCapability.WindowManager.WindowManager.Core 5183 * @since 7 5184 * @deprecated since 9 5185 * @useinstead ohos.window.Window#setWindowFocusable 5186 */ 5187 setFocusable(isFocusable: boolean): Promise<void>; 5188 5189 /** 5190 * Sets whether focusable or not. 5191 * 5192 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 5193 * @param { AsyncCallback<void> } callback Callback used to return the result. 5194 * @syscap SystemCapability.WindowManager.WindowManager.Core 5195 * @since 7 5196 * @deprecated since 9 5197 * @useinstead ohos.window.Window#setWindowFocusable 5198 */ 5199 setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void; 5200 5201 /** 5202 * Sets whether focusable or not. 5203 * 5204 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 5205 * @returns { Promise<void> } Promise that returns no value. 5206 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5207 * 2. Incorrect parameter types. 5208 * @throws { BusinessError } 1300002 - This window state is abnormal. 5209 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5210 * @syscap SystemCapability.WindowManager.WindowManager.Core 5211 * @since 9 5212 */ 5213 /** 5214 * Sets whether focusable or not. 5215 * 5216 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 5217 * @returns { Promise<void> } Promise that returns no value. 5218 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5219 * 2. Incorrect parameter types. 5220 * @throws { BusinessError } 1300002 - This window state is abnormal. 5221 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5222 * @syscap SystemCapability.WindowManager.WindowManager.Core 5223 * @atomicservice 5224 * @since 12 5225 */ 5226 setWindowFocusable(isFocusable: boolean): Promise<void>; 5227 5228 /** 5229 * Sets whether focusable or not. 5230 * 5231 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 5232 * @param { AsyncCallback<void> } callback Callback used to return the result. 5233 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5234 * 2. Incorrect parameter types. 5235 * @throws { BusinessError } 1300002 - This window state is abnormal. 5236 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5237 * @syscap SystemCapability.WindowManager.WindowManager.Core 5238 * @since 9 5239 */ 5240 /** 5241 * Sets whether focusable or not. 5242 * 5243 * @param { boolean } isFocusable can be focus if true, or can not be focus if false. 5244 * @param { AsyncCallback<void> } callback Callback used to return the result. 5245 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5246 * 2. Incorrect parameter types. 5247 * @throws { BusinessError } 1300002 - This window state is abnormal. 5248 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5249 * @syscap SystemCapability.WindowManager.WindowManager.Core 5250 * @atomicservice 5251 * @since 12 5252 */ 5253 setWindowFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void; 5254 5255 /** 5256 * Sets whether keep screen on or not. 5257 * 5258 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5259 * @returns { Promise<void> } that returns no value. 5260 * @syscap SystemCapability.WindowManager.WindowManager.Core 5261 * @since 6 5262 * @deprecated since 9 5263 * @useinstead ohos.window.Window#setWindowKeepScreenOn 5264 */ 5265 setKeepScreenOn(isKeepScreenOn: boolean): Promise<void>; 5266 5267 /** 5268 * Sets whether keep screen on or not. 5269 * 5270 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5271 * @param { AsyncCallback<void> } callback Callback used to return the result. 5272 * @syscap SystemCapability.WindowManager.WindowManager.Core 5273 * @since 6 5274 * @deprecated since 9 5275 * @useinstead ohos.window.Window#setWindowKeepScreenOn 5276 */ 5277 setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void; 5278 5279 /** 5280 * Sets whether keep screen on or not. 5281 * 5282 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5283 * @returns { Promise<void> } Promise that returns no value. 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 * @since 9 5290 */ 5291 /** 5292 * Sets whether keep screen on or not. 5293 * 5294 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5295 * @returns { Promise<void> } Promise that returns no value. 5296 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5297 * 2. Incorrect parameter types. 5298 * @throws { BusinessError } 1300002 - This window state is abnormal. 5299 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5300 * @syscap SystemCapability.WindowManager.WindowManager.Core 5301 * @crossplatform 5302 * @since 10 5303 */ 5304 /** 5305 * Sets whether keep screen on or not. 5306 * 5307 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5308 * @returns { Promise<void> } Promise that returns no value. 5309 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5310 * 2. Incorrect parameter types. 5311 * @throws { BusinessError } 1300002 - This window state is abnormal. 5312 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5313 * @syscap SystemCapability.WindowManager.WindowManager.Core 5314 * @crossplatform 5315 * @atomicservice 5316 * @since 11 5317 */ 5318 setWindowKeepScreenOn(isKeepScreenOn: boolean): Promise<void>; 5319 5320 /** 5321 * Sets whether keep screen on or not. 5322 * 5323 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5324 * @param { AsyncCallback<void> } callback Callback used to return the result. 5325 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5326 * 2. Incorrect parameter types. 5327 * @throws { BusinessError } 1300002 - This window state is abnormal. 5328 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5329 * @syscap SystemCapability.WindowManager.WindowManager.Core 5330 * @since 9 5331 */ 5332 /** 5333 * Sets whether keep screen on or not. 5334 * 5335 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5336 * @param { AsyncCallback<void> } callback Callback used to return the result. 5337 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5338 * 2. Incorrect parameter types. 5339 * @throws { BusinessError } 1300002 - This window state is abnormal. 5340 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5341 * @syscap SystemCapability.WindowManager.WindowManager.Core 5342 * @crossplatform 5343 * @since 10 5344 */ 5345 /** 5346 * Sets whether keep screen on or not. 5347 * 5348 * @param { boolean } isKeepScreenOn keep screen on if true, or not if false. 5349 * @param { AsyncCallback<void> } callback Callback used to return the result. 5350 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5351 * 2. Incorrect parameter types. 5352 * @throws { BusinessError } 1300002 - This window state is abnormal. 5353 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5354 * @syscap SystemCapability.WindowManager.WindowManager.Core 5355 * @crossplatform 5356 * @atomicservice 5357 * @since 11 5358 */ 5359 setWindowKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void; 5360 5361 /** 5362 * Sets whether to wake up the screen when this ability is restored. 5363 * 5364 * @param { boolean } wakeUp Specifies whether to wake up the screen. True means to wake it up, false means not. 5365 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5366 * 2. Incorrect parameter types. 5367 * @throws { BusinessError } 1300002 - This window state is abnormal. 5368 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5369 * @syscap SystemCapability.WindowManager.WindowManager.Core 5370 * @systemapi Hide this for inner system use. 5371 * @since 9 5372 */ 5373 setWakeUpScreen(wakeUp: boolean): void; 5374 5375 /** 5376 * Sets whether outside can be touch or not. 5377 * 5378 * @param { boolean } touchable outside can be touch if true, or not if false. 5379 * @returns { Promise<void> } Promise that returns no value. 5380 * @syscap SystemCapability.WindowManager.WindowManager.Core 5381 * @since 7 5382 * @deprecated since 9 5383 */ 5384 setOutsideTouchable(touchable: boolean): Promise<void>; 5385 5386 /** 5387 * Sets whether outside can be touch or not. 5388 * 5389 * @param { boolean } touchable outside can be touch if true, or not if false. 5390 * @param { AsyncCallback<void> } callback Callback used to return the result. 5391 * @syscap SystemCapability.WindowManager.WindowManager.Core 5392 * @since 7 5393 * @deprecated since 9 5394 */ 5395 setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void; 5396 5397 /** 5398 * Sets whether is private mode or not. 5399 * 5400 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 5401 * @returns { Promise<void> } Promise that returns no value. 5402 * @syscap SystemCapability.WindowManager.WindowManager.Core 5403 * @since 7 5404 * @deprecated since 9 5405 * @useinstead ohos.window.Window#setWindowPrivacyMode 5406 */ 5407 setPrivacyMode(isPrivacyMode: boolean): Promise<void>; 5408 5409 /** 5410 * Sets whether is private mode or not. 5411 * 5412 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 5413 * @param { AsyncCallback<void> } callback Callback used to return the result. 5414 * @syscap SystemCapability.WindowManager.WindowManager.Core 5415 * @since 7 5416 * @deprecated since 9 5417 * @useinstead ohos.window.Window#setWindowPrivacyMode 5418 */ 5419 setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void; 5420 5421 /** 5422 * Sets whether is private mode or not. 5423 * 5424 * @permission ohos.permission.PRIVACY_WINDOW 5425 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 5426 * @returns { Promise<void> } Promise that returns no value. 5427 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 5428 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5429 * 2. Incorrect parameter types. 5430 * @throws { BusinessError } 1300002 - This window state is abnormal. 5431 * @syscap SystemCapability.WindowManager.WindowManager.Core 5432 * @since 9 5433 */ 5434 /** 5435 * Sets whether is private mode or not. 5436 * 5437 * @permission ohos.permission.PRIVACY_WINDOW 5438 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 5439 * @returns { Promise<void> } Promise that returns no value. 5440 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 5441 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5442 * 2. Incorrect parameter types. 5443 * @throws { BusinessError } 1300002 - This window state is abnormal. 5444 * @syscap SystemCapability.WindowManager.WindowManager.Core 5445 * @atomicservice 5446 * @since 12 5447 */ 5448 setWindowPrivacyMode(isPrivacyMode: boolean): Promise<void>; 5449 5450 /** 5451 * Sets whether is private mode or not. 5452 * 5453 * @permission ohos.permission.PRIVACY_WINDOW 5454 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 5455 * @param { AsyncCallback<void> } callback Callback used to return the result. 5456 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 5457 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5458 * 2. Incorrect parameter types. 5459 * @throws { BusinessError } 1300002 - This window state is abnormal. 5460 * @syscap SystemCapability.WindowManager.WindowManager.Core 5461 * @since 9 5462 */ 5463 /** 5464 * Sets whether is private mode or not. 5465 * 5466 * @permission ohos.permission.PRIVACY_WINDOW 5467 * @param { boolean } isPrivacyMode in private mode if true, or not if false. 5468 * @param { AsyncCallback<void> } callback Callback used to return the result. 5469 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 5470 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5471 * 2. Incorrect parameter types. 5472 * @throws { BusinessError } 1300002 - This window state is abnormal. 5473 * @syscap SystemCapability.WindowManager.WindowManager.Core 5474 * @atomicservice 5475 * @since 12 5476 */ 5477 setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void; 5478 5479 /** 5480 * Ignore this window during screenshot. 5481 * 5482 * @param { boolean } isSkip skip if true, or not if false. 5483 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5484 * 2. Incorrect parameter types. 5485 * @throws { BusinessError } 1300002 - This window state is abnormal. 5486 * @syscap SystemCapability.WindowManager.WindowManager.Core 5487 * @systemapi Hide this for inner system use. 5488 * @since 9 5489 */ 5490 setSnapshotSkip(isSkip: boolean): void; 5491 5492 /** 5493 * Sets whether is touchable or not. 5494 * 5495 * @param { boolean } isTouchable is touchable if true, or not if false. 5496 * @returns { Promise<void> } Promise that returns no value. 5497 * @syscap SystemCapability.WindowManager.WindowManager.Core 5498 * @since 7 5499 * @deprecated since 9 5500 * @useinstead ohos.window.Window#setWindowTouchable 5501 */ 5502 setTouchable(isTouchable: boolean): Promise<void>; 5503 5504 /** 5505 * Sets whether is touchable or not. 5506 * 5507 * @param { boolean } isTouchable is touchable if true, or not if false. 5508 * @param { AsyncCallback<void> } callback Callback used to return the result. 5509 * @syscap SystemCapability.WindowManager.WindowManager.Core 5510 * @since 7 5511 * @deprecated since 9 5512 * @useinstead ohos.window.Window#setWindowTouchable 5513 */ 5514 setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void; 5515 5516 /** 5517 * Sets whether is touchable or not. 5518 * 5519 * @param { boolean } isTouchable is touchable if true, or not if false. 5520 * @returns { Promise<void> } Promise that returns no value. 5521 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5522 * 2. Incorrect parameter types. 5523 * @throws { BusinessError } 1300002 - This window state is abnormal. 5524 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5525 * @syscap SystemCapability.WindowManager.WindowManager.Core 5526 * @since 9 5527 */ 5528 /** 5529 * Sets whether is touchable or not. 5530 * 5531 * @param { boolean } isTouchable is touchable if true, or not if false. 5532 * @returns { Promise<void> } Promise that returns no value. 5533 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5534 * 2. Incorrect parameter types. 5535 * @throws { BusinessError } 1300002 - This window state is abnormal. 5536 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5537 * @syscap SystemCapability.WindowManager.WindowManager.Core 5538 * @atomicservice 5539 * @since 12 5540 */ 5541 setWindowTouchable(isTouchable: boolean): Promise<void>; 5542 5543 /** 5544 * Sets whether is touchable or not. 5545 * 5546 * @param { boolean } isTouchable is touchable if true, or not if false. 5547 * @param { AsyncCallback<void> } callback Callback used to return the result. 5548 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5549 * 2. Incorrect parameter types. 5550 * @throws { BusinessError } 1300002 - This window state is abnormal. 5551 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5552 * @syscap SystemCapability.WindowManager.WindowManager.Core 5553 * @since 9 5554 */ 5555 /** 5556 * Sets whether is touchable or not. 5557 * 5558 * @param { boolean } isTouchable is touchable if true, or not if false. 5559 * @param { AsyncCallback<void> } callback Callback used to return the result. 5560 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5561 * 2. Incorrect parameter types. 5562 * @throws { BusinessError } 1300002 - This window state is abnormal. 5563 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5564 * @syscap SystemCapability.WindowManager.WindowManager.Core 5565 * @atomicservice 5566 * @since 12 5567 */ 5568 setWindowTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void; 5569 5570 /** 5571 * Set handwrite flag on the window. This flag means only response handwrite event. 5572 * 5573 * @param { boolean } enable - Add handwrite flag to window if true, or remove flag if false. 5574 * @returns { Promise<void> } - The promise returned by the function. 5575 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 5576 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5577 * 2. Incorrect parameter types. 5578 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5579 * @throws { BusinessError } 1300002 - This window state is abnormal. 5580 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5581 * @syscap SystemCapability.Window.SessionManager 5582 * @systemapi Hide this for inner system use. 5583 * @since 12 5584 */ 5585 setHandwritingFlag(enable: boolean): Promise<void>; 5586 5587 /** 5588 * Sets the flag of the window is forbidden to move in split screen mode 5589 * 5590 * @param { boolean } isForbidSplitMove the flag of the window is forbidden to move in split screen mode 5591 * @param { AsyncCallback<void> } callback Callback used to return the result. 5592 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5593 * 2. Incorrect parameter types. 5594 * @throws { BusinessError } 1300002 - This window state is abnormal. 5595 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5596 * @syscap SystemCapability.WindowManager.WindowManager.Core 5597 * @systemapi 5598 * @since 9 5599 */ 5600 setForbidSplitMove(isForbidSplitMove: boolean, callback: AsyncCallback<void>): void; 5601 5602 /** 5603 * Sets the flag of the window is forbidden to move in split screen mode 5604 * 5605 * @param { boolean } isForbidSplitMove the flag of the window is forbidden to move in split screen mode 5606 * @returns { Promise<void> } Promise that returns no value. 5607 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5608 * 2. Incorrect parameter types. 5609 * @throws { BusinessError } 1300002 - This window state is abnormal. 5610 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5611 * @syscap SystemCapability.WindowManager.WindowManager.Core 5612 * @systemapi 5613 * @since 9 5614 */ 5615 setForbidSplitMove(isForbidSplitMove: boolean): Promise<void>; 5616 5617 /** 5618 * Obtains snapshot of window 5619 * 5620 * @param { AsyncCallback<image.PixelMap> } callback Callback used to return the result. 5621 * @throws { BusinessError } 1300002 - This window state is abnormal. 5622 * @syscap SystemCapability.WindowManager.WindowManager.Core 5623 * @since 9 5624 */ 5625 /** 5626 * Obtains snapshot of window 5627 * 5628 * @param { AsyncCallback<image.PixelMap> } callback Callback used to return the result. 5629 * @throws { BusinessError } 1300002 - This window state is abnormal. 5630 * @syscap SystemCapability.WindowManager.WindowManager.Core 5631 * @atomicservice 5632 * @since 12 5633 */ 5634 snapshot(callback: AsyncCallback<image.PixelMap>): void; 5635 5636 /** 5637 * Obtains snapshot of window 5638 * 5639 * @returns { Promise<image.PixelMap> } Promise that returns no value. 5640 * @throws { BusinessError } 1300002 - This window state is abnormal. 5641 * @syscap SystemCapability.WindowManager.WindowManager.Core 5642 * @since 9 5643 */ 5644 /** 5645 * Obtains snapshot of window 5646 * 5647 * @returns { Promise<image.PixelMap> } Promise that returns no value. 5648 * @throws { BusinessError } 1300002 - This window state is abnormal. 5649 * @syscap SystemCapability.WindowManager.WindowManager.Core 5650 * @atomicservice 5651 * @since 12 5652 */ 5653 snapshot(): Promise<image.PixelMap>; 5654 5655 /** 5656 * Sets opacity of window 5657 * 5658 * @param { number } opacity Interval is 0.f-1.f. 5659 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5660 * 2. Incorrect parameter types; 5661 * 3. Parameter verification failed. 5662 * @throws { BusinessError } 1300002 - This window state is abnormal. 5663 * @throws { BusinessError } 1300004 - Unauthorized operation. 5664 * @syscap SystemCapability.WindowManager.WindowManager.Core 5665 * @systemapi 5666 * @since 9 5667 */ 5668 opacity(opacity: number): void; 5669 5670 /** 5671 * Sets scale options of window. 5672 * 5673 * @param { ScaleOptions } scaleOptions scale param of window. 5674 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5675 * 2. Incorrect parameter types; 5676 * 3. Parameter verification failed. 5677 * @throws { BusinessError } 1300002 - This window state is abnormal. 5678 * @throws { BusinessError } 1300004 - Unauthorized operation. 5679 * @syscap SystemCapability.WindowManager.WindowManager.Core 5680 * @systemapi 5681 * @since 9 5682 */ 5683 scale(scaleOptions: ScaleOptions): void; 5684 5685 /** 5686 * Sets rotate options of window. 5687 * 5688 * @param { RotateOptions } rotateOptions rotate param of window. 5689 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5690 * 2. Incorrect parameter types; 5691 * 3. Parameter verification failed. 5692 * @throws { BusinessError } 1300002 - This window state is abnormal. 5693 * @throws { BusinessError } 1300004 - Unauthorized operation. 5694 * @syscap SystemCapability.WindowManager.WindowManager.Core 5695 * @systemapi 5696 * @since 9 5697 */ 5698 rotate(rotateOptions: RotateOptions): void; 5699 5700 /** 5701 * Sets translate options of window. 5702 * 5703 * @param { TranslateOptions } translateOptions translate param of window. 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 } 1300002 - This window state is abnormal. 5708 * @throws { BusinessError } 1300004 - Unauthorized operation. 5709 * @syscap SystemCapability.WindowManager.WindowManager.Core 5710 * @systemapi 5711 * @since 9 5712 */ 5713 translate(translateOptions: TranslateOptions): void; 5714 5715 /** 5716 * Get Transition Controller. 5717 * 5718 * @returns { TransitionController } 5719 * @throws { BusinessError } 1300002 - This window state is abnormal. 5720 * @throws { BusinessError } 1300004 - Unauthorized operation. 5721 * @syscap SystemCapability.WindowManager.WindowManager.Core 5722 * @systemapi 5723 * @since 9 5724 */ 5725 getTransitionController(): TransitionController; 5726 5727 /** 5728 * Sets the window blur radius. 5729 * 5730 * @param { number } radius the blur radius. 5731 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5732 * 2. Incorrect parameter types; 5733 * 3. Parameter verification failed. 5734 * @throws { BusinessError } 1300002 - This window state is abnormal. 5735 * @throws { BusinessError } 1300004 - Unauthorized operation. 5736 * @syscap SystemCapability.WindowManager.WindowManager.Core 5737 * @systemapi Hide this for inner system use. 5738 * @since 9 5739 */ 5740 setBlur(radius: number): void; 5741 5742 /** 5743 * Sets the window backdrop blur radius. 5744 * 5745 * @param { number } radius the blur radius. 5746 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5747 * 2. Incorrect parameter types; 5748 * 3. Parameter verification failed. 5749 * @throws { BusinessError } 1300002 - This window state is abnormal. 5750 * @throws { BusinessError } 1300004 - Unauthorized operation. 5751 * @syscap SystemCapability.WindowManager.WindowManager.Core 5752 * @systemapi Hide this for inner system use. 5753 * @since 9 5754 */ 5755 setBackdropBlur(radius: number): void; 5756 5757 /** 5758 * Sets the window backdrop blur style. 5759 * 5760 * @param { BlurStyle } blurStyle the specified blur style. 5761 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5762 * 2. Incorrect parameter types; 5763 * 3. Parameter verification failed. 5764 * @throws { BusinessError } 1300002 - This window state is abnormal. 5765 * @throws { BusinessError } 1300004 - Unauthorized operation. 5766 * @syscap SystemCapability.WindowManager.WindowManager.Core 5767 * @systemapi Hide this for inner system use. 5768 * @since 9 5769 */ 5770 setBackdropBlurStyle(blurStyle: BlurStyle): void; 5771 5772 /** 5773 * Sets shadow. 5774 * 5775 * @param { number } radius the radius of the shadow. 5776 * @param { string } color the color of the shadow. 5777 * @param { number } offsetX the offset of the shadow on the x-axis. 5778 * @param { number } offsetY the offset of the shadow on the y-axis. 5779 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5780 * 2. Incorrect parameter types; 5781 * 3. Parameter verification failed. 5782 * @throws { BusinessError } 1300002 - This window state is abnormal. 5783 * @throws { BusinessError } 1300004 - Unauthorized operation. 5784 * @syscap SystemCapability.WindowManager.WindowManager.Core 5785 * @systemapi Hide this for inner system use. 5786 * @since 9 5787 */ 5788 setShadow(radius: number, color?: string, offsetX?: number, offsetY?: number): void; 5789 5790 /** 5791 * Sets corner radius. 5792 * 5793 * @param { number } cornerRadius the corner radius. 5794 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5795 * 2. Incorrect parameter types; 5796 * 3. Parameter verification failed. 5797 * @throws { BusinessError } 1300002 - This window state is abnormal. 5798 * @throws { BusinessError } 1300004 - Unauthorized operation. 5799 * @syscap SystemCapability.WindowManager.WindowManager.Core 5800 * @systemapi Hide this for inner system use. 5801 * @since 9 5802 */ 5803 setCornerRadius(cornerRadius: number): void; 5804 5805 /** 5806 * Raise app sub window to app top 5807 * 5808 * @param { AsyncCallback<void> } callback - The callback of raiseToAppTop 5809 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 5810 * @throws { BusinessError } 1300002 - This window state is abnormal. 5811 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5812 * @throws { BusinessError } 1300004 - Unauthorized operation. 5813 * @throws { BusinessError } 1300009 - The parent window is invalid. 5814 * @syscap SystemCapability.WindowManager.WindowManager.Core 5815 * @systemapi Hide this for inner system use. 5816 * @since 10 5817 */ 5818 raiseToAppTop(callback: AsyncCallback<void>): void; 5819 5820 /** 5821 * Raise app sub window to app top 5822 * 5823 * @returns { Promise<void> } - The promise returned by the function 5824 * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 5825 * @throws { BusinessError } 1300002 - This window state is abnormal. 5826 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5827 * @throws { BusinessError } 1300004 - Unauthorized operation. 5828 * @throws { BusinessError } 1300009 - The parent window is invalid. 5829 * @syscap SystemCapability.WindowManager.WindowManager.Core 5830 * @systemapi Hide this for inner system use. 5831 * @since 10 5832 */ 5833 raiseToAppTop(): Promise<void>; 5834 5835 /** 5836 * Sets the aspect ratio of window 5837 * 5838 * @param { number } ratio - The aspect ratio of window except decoration 5839 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 5840 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5841 * 2. Incorrect parameter types; 5842 * 3. Parameter verification failed. 5843 * @throws { BusinessError } 1300002 - This window state is abnormal. 5844 * @throws { BusinessError } 1300004 - Unauthorized operation. 5845 * @syscap SystemCapability.WindowManager.WindowManager.Core 5846 * @since 10 5847 */ 5848 /** 5849 * Sets the aspect ratio of window 5850 * 5851 * @param { number } ratio - The aspect ratio of window except decoration 5852 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 5853 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5854 * 2. Incorrect parameter types; 5855 * 3. Parameter verification failed. 5856 * @throws { BusinessError } 1300002 - This window state is abnormal. 5857 * @throws { BusinessError } 1300004 - Unauthorized operation. 5858 * @syscap SystemCapability.WindowManager.WindowManager.Core 5859 * @atomicservice 5860 * @since 12 5861 */ 5862 setAspectRatio(ratio: number, callback: AsyncCallback<void>): void; 5863 5864 /** 5865 * Sets the aspect ratio of window 5866 * 5867 * @param { number } ratio - The aspect ratio of window except decoration 5868 * @returns { Promise<void> } - The promise returned by the function. 5869 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5870 * 2. Incorrect parameter types; 5871 * 3. Parameter verification failed. 5872 * @throws { BusinessError } 1300002 - This window state is abnormal. 5873 * @throws { BusinessError } 1300004 - Unauthorized operation. 5874 * @syscap SystemCapability.WindowManager.WindowManager.Core 5875 * @since 10 5876 */ 5877 /** 5878 * Sets the aspect ratio of window 5879 * 5880 * @param { number } ratio - The aspect ratio of window except decoration 5881 * @returns { Promise<void> } - The promise returned by the function. 5882 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 5883 * 2. Incorrect parameter types; 5884 * 3. Parameter verification failed. 5885 * @throws { BusinessError } 1300002 - This window state is abnormal. 5886 * @throws { BusinessError } 1300004 - Unauthorized operation. 5887 * @syscap SystemCapability.WindowManager.WindowManager.Core 5888 * @atomicservice 5889 * @since 12 5890 */ 5891 setAspectRatio(ratio: number): Promise<void>; 5892 5893 /** 5894 * Resets the aspect ratio of window 5895 * 5896 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 5897 * @throws { BusinessError } 1300002 - This window state is abnormal. 5898 * @throws { BusinessError } 1300004 - Unauthorized operation. 5899 * @syscap SystemCapability.WindowManager.WindowManager.Core 5900 * @since 10 5901 */ 5902 /** 5903 * Resets the aspect ratio of window 5904 * 5905 * @param { AsyncCallback<void> } callback - The callback of setAspectRatio. 5906 * @throws { BusinessError } 1300002 - This window state is abnormal. 5907 * @throws { BusinessError } 1300004 - Unauthorized operation. 5908 * @syscap SystemCapability.WindowManager.WindowManager.Core 5909 * @atomicservice 5910 * @since 12 5911 */ 5912 resetAspectRatio(callback: AsyncCallback<void>): void; 5913 5914 /** 5915 * Resets the aspect ratio of window 5916 * 5917 * @returns { Promise<void> } - The promise returned by the function. 5918 * @throws { BusinessError } 1300002 - This window state is abnormal. 5919 * @throws { BusinessError } 1300004 - Unauthorized operation. 5920 * @syscap SystemCapability.WindowManager.WindowManager.Core 5921 * @since 10 5922 */ 5923 /** 5924 * Resets the aspect ratio of window 5925 * 5926 * @returns { Promise<void> } - The promise returned by the function. 5927 * @throws { BusinessError } 1300002 - This window state is abnormal. 5928 * @throws { BusinessError } 1300004 - Unauthorized operation. 5929 * @syscap SystemCapability.WindowManager.WindowManager.Core 5930 * @atomicservice 5931 * @since 12 5932 */ 5933 resetAspectRatio(): Promise<void>; 5934 5935 /** 5936 * Set the watermark flag on the window. 5937 * 5938 * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false. 5939 * @param { AsyncCallback<void> } callback - The callback of setWaterMarkFlag. 5940 * @throws { BusinessError } 1300002 - This window state is abnormal. 5941 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5942 * @throws { BusinessError } 1300008 - The display device is abnormal. 5943 * @syscap SystemCapability.WindowManager.WindowManager.Core 5944 * @systemapi Hide this for inner system use. 5945 * @since 10 5946 */ 5947 setWaterMarkFlag(enable: boolean, callback: AsyncCallback<void>): void; 5948 5949 /** 5950 * Set the watermark flag on the window 5951 * 5952 * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false 5953 * @returns { Promise<void> } - The promise returned by the function 5954 * @throws { BusinessError } 1300002 - This window state is abnormal. 5955 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5956 * @throws { BusinessError } 1300008 - The display device is abnormal. 5957 * @syscap SystemCapability.WindowManager.WindowManager.Core 5958 * @systemapi Hide this for inner system use. 5959 * @since 10 5960 */ 5961 setWaterMarkFlag(enable: boolean): Promise<void>; 5962 5963 /** 5964 * Raise one app sub window above another. 5965 * 5966 * @param { number } windowId - Indicates target window id. 5967 * @param { AsyncCallback<void> } callback - The callback of raiseAboveTarget. 5968 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 5969 * @throws { BusinessError } 401 - Parameter error. Possible cause: Mandatory parameters are left unspecified. 5970 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5971 * @throws { BusinessError } 1300002 - This window state is abnormal. 5972 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5973 * @throws { BusinessError } 1300004 - Unauthorized operation. 5974 * @throws { BusinessError } 1300009 - The parent window is invalid. 5975 * @syscap SystemCapability.Window.SessionManager 5976 * @systemapi Hide this for inner system use. 5977 * @since 10 5978 */ 5979 raiseAboveTarget(windowId: number, callback: AsyncCallback<void>): void; 5980 5981 /** 5982 * Raise one app sub window above another. 5983 * 5984 * @param { number } windowId - Indicates target window id. 5985 * @returns { Promise<void> } - The promise returned by the function. 5986 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 5987 * @throws { BusinessError } 401 - Parameter error. Possible cause: Mandatory parameters are left unspecified. 5988 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 5989 * @throws { BusinessError } 1300002 - This window state is abnormal. 5990 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 5991 * @throws { BusinessError } 1300004 - Unauthorized operation. 5992 * @throws { BusinessError } 1300009 - The parent window is invalid. 5993 * @syscap SystemCapability.Window.SessionManager 5994 * @systemapi Hide this for inner system use. 5995 * @since 10 5996 */ 5997 raiseAboveTarget(windowId: number): Promise<void>; 5998 5999 /** 6000 * Set whether to enable an app sub window to raise itself by click. 6001 * 6002 * @param { boolean } enable - Disable app sub window to raise itself by by click if false. 6003 * @param { AsyncCallback<void> } callback - The callback of setRaiseByClickEnabled. 6004 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6005 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6006 * 2. Incorrect parameter types. 6007 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6008 * @throws { BusinessError } 1300002 - This window state is abnormal. 6009 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6010 * @throws { BusinessError } 1300004 - Unauthorized operation. 6011 * @throws { BusinessError } 1300009 - The parent window is invalid. 6012 * @syscap SystemCapability.Window.SessionManager 6013 * @systemapi Hide this for inner system use. 6014 * @since 10 6015 */ 6016 setRaiseByClickEnabled(enable: boolean, callback: AsyncCallback<void>): void; 6017 6018 /** 6019 * Set whether to enable an app sub window to raise itself by click. 6020 * 6021 * @param { boolean } enable - Disable app sub window to raise itself by by click if false. 6022 * @returns { Promise<void> } - The promise returned by the function. 6023 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6024 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6025 * 2. Incorrect parameter types. 6026 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6027 * @throws { BusinessError } 1300002 - This window state is abnormal. 6028 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6029 * @throws { BusinessError } 1300004 - Unauthorized operation. 6030 * @throws { BusinessError } 1300009 - The parent window is invalid. 6031 * @syscap SystemCapability.Window.SessionManager 6032 * @systemapi Hide this for inner system use. 6033 * @since 10 6034 */ 6035 setRaiseByClickEnabled(enable: boolean): Promise<void>; 6036 6037 /** 6038 * Minimize app main window and hide app subWindow. 6039 * 6040 * @param { AsyncCallback<void> } callback - The callback of Minimize. 6041 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6042 * @throws { BusinessError } 1300002 - This window state is abnormal. 6043 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6044 * @syscap SystemCapability.Window.SessionManager 6045 * @since 11 6046 */ 6047 /** 6048 * Minimize app main window and hide app subWindow. 6049 * 6050 * @param { AsyncCallback<void> } callback - The callback of Minimize. 6051 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6052 * @throws { BusinessError } 1300002 - This window state is abnormal. 6053 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6054 * @syscap SystemCapability.Window.SessionManager 6055 * @atomicservice 6056 * @since 12 6057 */ 6058 minimize(callback: AsyncCallback<void>): void; 6059 6060 /** 6061 * Minimize app main window and hide app subWindow. 6062 * 6063 * @returns { Promise<void> } - The promise returned by the function. 6064 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6065 * @throws { BusinessError } 1300002 - This window state is abnormal. 6066 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6067 * @syscap SystemCapability.Window.SessionManager 6068 * @since 11 6069 */ 6070 /** 6071 * Minimize app main window and hide app subWindow. 6072 * 6073 * @returns { Promise<void> } - The promise returned by the function. 6074 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6075 * @throws { BusinessError } 1300002 - This window state is abnormal. 6076 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6077 * @syscap SystemCapability.Window.SessionManager 6078 * @atomicservice 6079 * @since 12 6080 */ 6081 minimize(): Promise<void>; 6082 6083 /** 6084 * Maximize app main window. 6085 * 6086 * @returns { Promise<void> } - The promise returned by the function. 6087 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6088 * @throws { BusinessError } 1300002 - This window state is abnormal. 6089 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6090 * @throws { BusinessError } 1300004 - Unauthorized operation. 6091 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6092 * @syscap SystemCapability.Window.SessionManager 6093 * @atomicservice 6094 * @since 12 6095 */ 6096 maximize(): Promise<void>; 6097 6098 /** 6099 * Set whether to enable a window to resize by drag. 6100 * 6101 * @param { boolean } enable - Disable window to resize by drag if false. 6102 * @param { AsyncCallback<void> } callback - The callback of setResizeByDragEnabled. 6103 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6104 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6105 * 2. Incorrect parameter types. 6106 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6107 * @throws { BusinessError } 1300002 - This window state is abnormal. 6108 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6109 * @throws { BusinessError } 1300004 - Unauthorized operation. 6110 * @syscap SystemCapability.Window.SessionManager 6111 * @systemapi Hide this for inner system use. 6112 * @since 10 6113 */ 6114 /** 6115 * Set whether to enable a window to resize by drag. 6116 * 6117 * @param { boolean } enable - Disable window to resize by drag if false. 6118 * @param { AsyncCallback<void> } callback - The callback of setResizeByDragEnabled. 6119 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6120 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6121 * 2. Incorrect parameter types. 6122 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6123 * @throws { BusinessError } 1300002 - This window state is abnormal. 6124 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6125 * @syscap SystemCapability.Window.SessionManager 6126 * @systemapi Hide this for inner system use. 6127 * @since 11 6128 */ 6129 setResizeByDragEnabled(enable: boolean, callback: AsyncCallback<void>): void; 6130 6131 /** 6132 * Set whether to enable a window to resize by drag. 6133 * 6134 * @param { boolean } enable - Disable window to resize by drag if false. 6135 * @returns { Promise<void> } - The promise returned by the function. 6136 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6137 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6138 * 2. Incorrect parameter types. 6139 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6140 * @throws { BusinessError } 1300002 - This window state is abnormal. 6141 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6142 * @syscap SystemCapability.Window.SessionManager 6143 * @systemapi Hide this for inner system use. 6144 * @since 10 6145 */ 6146 setResizeByDragEnabled(enable: boolean): Promise<void>; 6147 6148 /** 6149 * Hide the non-system floating windows. 6150 * 6151 * @param { boolean } shouldHide - Hide the non-system floating windows if true, otherwise means the opposite. 6152 * @param { AsyncCallback<void> } callback - The callback of hideNonSystemFloatingWindows. 6153 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6154 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6155 * 2. Incorrect parameter types. 6156 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6157 * @throws { BusinessError } 1300002 - This window state is abnormal. 6158 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6159 * @throws { BusinessError } 1300004 - Unauthorized operation. 6160 * @syscap SystemCapability.Window.SessionManager 6161 * @systemapi Hide this for inner system use. 6162 * @since 11 6163 */ 6164 hideNonSystemFloatingWindows(shouldHide: boolean, callback: AsyncCallback<void>): void; 6165 6166 /** 6167 * Hide the non-system floating windows. 6168 * 6169 * @param { boolean } shouldHide - Hide the non-system floating windows if true, otherwise means the opposite. 6170 * @returns { Promise<void> } - The promise returned by the function. 6171 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6172 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6173 * 2. Incorrect parameter types. 6174 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6175 * @throws { BusinessError } 1300002 - This window state is abnormal. 6176 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6177 * @throws { BusinessError } 1300004 - Unauthorized operation. 6178 * @syscap SystemCapability.Window.SessionManager 6179 * @systemapi Hide this for inner system use. 6180 * @since 11 6181 */ 6182 hideNonSystemFloatingWindows(shouldHide: boolean): Promise<void>; 6183 6184 /** 6185 * Get the window limits of current window. 6186 * 6187 * @returns { WindowLimits } - The limits of window. 6188 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6189 * @throws { BusinessError } 1300002 - This window state is abnormal. 6190 * @syscap SystemCapability.Window.SessionManager 6191 * @since 11 6192 */ 6193 /** 6194 * Get the window limits of current window. 6195 * 6196 * @returns { WindowLimits } - The limits of window. 6197 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6198 * @throws { BusinessError } 1300002 - This window state is abnormal. 6199 * @syscap SystemCapability.Window.SessionManager 6200 * @atomicservice 6201 * @since 12 6202 */ 6203 getWindowLimits(): WindowLimits; 6204 6205 /** 6206 * Set the window limits of a window. 6207 * 6208 * @param { WindowLimits } windowLimits - window limits of the window. 6209 * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window. 6210 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6211 * 2. Incorrect parameter types; 6212 * 3. Parameter verification failed. 6213 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6214 * @throws { BusinessError } 1300002 - This window state is abnormal. 6215 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6216 * @throws { BusinessError } 1300004 - Unauthorized operation. 6217 * @syscap SystemCapability.Window.SessionManager 6218 * @since 11 6219 */ 6220 /** 6221 * Set the window limits of a window. 6222 * 6223 * @param { WindowLimits } windowLimits - window limits of the window. 6224 * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window. 6225 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6226 * 2. Incorrect parameter types; 6227 * 3. Parameter verification failed. 6228 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6229 * @throws { BusinessError } 1300002 - This window state is abnormal. 6230 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6231 * @throws { BusinessError } 1300004 - Unauthorized operation. 6232 * @syscap SystemCapability.Window.SessionManager 6233 * @atomicservice 6234 * @since 12 6235 */ 6236 setWindowLimits(windowLimits: WindowLimits): Promise<WindowLimits>; 6237 6238 /** 6239 * Set whether to enable the single frame composer. 6240 * 6241 * @param { boolean } enable - Enable the single frame composer if true, otherwise means the opposite. 6242 * @returns { Promise<void> } - The promise returned by the function. 6243 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6244 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6245 * 2. Incorrect parameter types. 6246 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6247 * @throws { BusinessError } 1300002 - This window state is abnormal. 6248 * @syscap SystemCapability.Window.SessionManager 6249 * @systemapi Hide this for inner system use. 6250 * @since 11 6251 */ 6252 setSingleFrameComposerEnabled(enable: boolean): Promise<void>; 6253 6254 /** 6255 * When get focused, keep the keyboard created by other windows, support system window and app subwindow. 6256 * 6257 * @param { boolean } keepKeyboardFlag - keep the keyboard if true, otherwise means the opposite. 6258 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6259 * 2. Incorrect parameter types. 6260 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6261 * @throws { BusinessError } 1300002 - This window state is abnormal. 6262 * @throws { BusinessError } 1300004 - Unauthorized operation. 6263 * @syscap SystemCapability.Window.SessionManager 6264 * @since 11 6265 */ 6266 /** 6267 * When get focused, keep the keyboard created by other windows, support system window and app subwindow. 6268 * 6269 * @param { boolean } keepKeyboardFlag - keep the keyboard if true, otherwise means the opposite. 6270 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6271 * 2. Incorrect parameter types. 6272 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6273 * @throws { BusinessError } 1300002 - This window state is abnormal. 6274 * @throws { BusinessError } 1300004 - Unauthorized operation. 6275 * @syscap SystemCapability.Window.SessionManager 6276 * @atomicservice 6277 * @since 12 6278 */ 6279 keepKeyboardOnFocus(keepKeyboardFlag: boolean): void; 6280 6281 /** 6282 * Recover app main window. 6283 * 6284 * @returns { Promise<void> } - The promise returned by the function. 6285 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6286 * @throws { BusinessError } 1300001 - Repeated operation. 6287 * @throws { BusinessError } 1300002 - This window state is abnormal. 6288 * @syscap SystemCapability.Window.SessionManager 6289 * @since 11 6290 */ 6291 /** 6292 * Recover app main window. 6293 * 6294 * @returns { Promise<void> } - The promise returned by the function. 6295 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6296 * @throws { BusinessError } 1300001 - Repeated operation. 6297 * @throws { BusinessError } 1300002 - This window state is abnormal. 6298 * @syscap SystemCapability.Window.SessionManager 6299 * @atomicservice 6300 * @since 12 6301 */ 6302 recover(): Promise<void>; 6303 6304 /** 6305 * Set the visibility of the window decor. 6306 * 6307 * @param { boolean } - Enable the decor visible if true, otherwise means the opposite. 6308 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6309 * 2. Incorrect parameter types. 6310 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6311 * @throws { BusinessError } 1300002 - This window state is abnormal. 6312 * @throws { BusinessError } 1300004 - Unauthorized operation. 6313 * @syscap SystemCapability.Window.SessionManager 6314 * @since 11 6315 */ 6316 /** 6317 * Set the visibility of the window decor. 6318 * 6319 * @param { boolean } - Enable the decor visible if true, otherwise means the opposite. 6320 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6321 * 2. Incorrect parameter types. 6322 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6323 * @throws { BusinessError } 1300002 - This window state is abnormal. 6324 * @throws { BusinessError } 1300004 - Unauthorized operation. 6325 * @syscap SystemCapability.Window.SessionManager 6326 * @atomicservice 6327 * @since 12 6328 */ 6329 setWindowDecorVisible(isVisible: boolean): void; 6330 6331 /** 6332 * Set the modality of the window. 6333 * 6334 * @param { boolean } - Enable the window modal if true, otherwise means the opposite. 6335 * @returns { Promise<void> } Promise that returns no value. 6336 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6337 * 2. Incorrect parameter types. 6338 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6339 * @throws { BusinessError } 1300002 - This window state is abnormal. 6340 * @throws { BusinessError } 1300004 - Unauthorized operation. 6341 * @syscap SystemCapability.Window.SessionManager 6342 * @atomicservice 6343 * @since 12 6344 */ 6345 setSubWindowModal(isModal: boolean): Promise<void>; 6346 6347 /** 6348 * Set the height of the window decor. 6349 * 6350 * @param { number } - The height of window decor. 6351 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6352 * 2. Incorrect parameter types; 6353 * 3. Parameter verification failed. 6354 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6355 * @throws { BusinessError } 1300002 - This window state is abnormal. 6356 * @syscap SystemCapability.Window.SessionManager 6357 * @since 11 6358 */ 6359 /** 6360 * Set the height of the window decor. 6361 * 6362 * @param { number } - The height of window decor. 6363 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6364 * 2. Incorrect parameter types; 6365 * 3. Parameter verification failed. 6366 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6367 * @throws { BusinessError } 1300002 - This window state is abnormal. 6368 * @syscap SystemCapability.Window.SessionManager 6369 * @atomicservice 6370 * @since 12 6371 */ 6372 setWindowDecorHeight(height: number): void; 6373 6374 /** 6375 * Get the height of the window decor. 6376 * 6377 * @returns { number } - The height of window decor. 6378 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6379 * @throws { BusinessError } 1300002 - This window state is abnormal. 6380 * @syscap SystemCapability.Window.SessionManager 6381 * @since 11 6382 */ 6383 /** 6384 * Get the height of the window decor. 6385 * 6386 * @returns { number } - The height of window decor. 6387 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6388 * @throws { BusinessError } 1300002 - This window state is abnormal. 6389 * @syscap SystemCapability.Window.SessionManager 6390 * @atomicservice 6391 * @since 12 6392 */ 6393 getWindowDecorHeight(): number; 6394 6395 /** 6396 * Set touchable areas. By default, the entire window area is touchable. 6397 * If touchable areas are set in the window, touch events outside the areas will be transparent transmitted. 6398 * If the window area changes, you need to reset it. 6399 * 6400 * @param { Array<Rect> } rects - Touchable areas. The maximum size cannot exceed 10, touchable area cannot exceed the window's area. 6401 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6402 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6403 * 2. Incorrect parameter types. 6404 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6405 * @throws { BusinessError } 1300002 - This window state is abnormal. 6406 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6407 * @syscap SystemCapability.Window.SessionManager 6408 * @systemapi 6409 * @since 12 6410 */ 6411 setTouchableAreas(rects: Array<Rect>): void; 6412 6413 /** 6414 * Get the area of window title buttons. 6415 * 6416 * @returns { TitleButtonRect } - The area of window title buttons. 6417 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6418 * @throws { BusinessError } 1300002 - This window state is abnormal. 6419 * @syscap SystemCapability.Window.SessionManager 6420 * @since 11 6421 */ 6422 /** 6423 * Get the area of window title buttons. 6424 * 6425 * @returns { TitleButtonRect } - The area of window title buttons. 6426 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6427 * @throws { BusinessError } 1300002 - This window state is abnormal. 6428 * @syscap SystemCapability.Window.SessionManager 6429 * @atomicservice 6430 * @since 12 6431 */ 6432 getTitleButtonRect(): TitleButtonRect; 6433 6434 /** 6435 * Set whether to display the maximize, minimize, split buttons of main window. 6436 * 6437 * @param { boolean } isMaximizeVisible - Display maximize button if true, or hide maximize button if false. 6438 * @param { boolean } isMinimizeVisible - Display minimize button if true, or hide minimize button if false. 6439 * @param { boolean } isSplitVisible - Display split button if true, or hide split button if false. 6440 * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6441 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6442 * 2. Incorrect parameter types. 6443 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6444 * @throws { BusinessError } 1300002 - This window state is abnormal. 6445 * @throws { BusinessError } 1300004 - Unauthorized operation. 6446 * @syscap SystemCapability.Window.SessionManager 6447 * @systemapi Hide this for inner system use. 6448 * @since 12 6449 */ 6450 setTitleButtonVisible(isMaximizeVisible: boolean, isMinimizeVisible: boolean, isSplitVisible: boolean): void; 6451 6452 /** 6453 * Enable landscape multiWindow 6454 * 6455 * @returns { Promise<void> } Promise that returns no value. 6456 * @throws {BusinessError} 401 - Parameter error. 6457 * @throws {BusinessError} 1300002 - This window state is abnormal. 6458 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 6459 * @syscap SystemCapability.Window.SessionManager 6460 * @atomicservice 6461 * @since 12 6462 */ 6463 enableLandscapeMultiWindow(): Promise<void>; 6464 6465 /** 6466 * Disable landscape multiWindow 6467 * 6468 * @returns { Promise<void> } Promise that returns no value. 6469 * @throws {BusinessError} 401 - Parameter error. 6470 * @throws {BusinessError} 1300002 - This window state is abnormal. 6471 * @throws {BusinessError} 1300003 - This window manager service works abnormally. 6472 * @syscap SystemCapability.Window.SessionManager 6473 * @atomicservice 6474 * @since 12 6475 */ 6476 disableLandscapeMultiWindow(): Promise<void>; 6477 6478 /** 6479 * Register the callback of title buttons area change. 6480 * 6481 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 6482 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 6483 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6484 * 2. Incorrect parameter types; 6485 * 3. Parameter verification failed. 6486 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6487 * @throws { BusinessError } 1300002 - This window state is abnormal. 6488 * @syscap SystemCapability.Window.SessionManager 6489 * @since 11 6490 */ 6491 /** 6492 * Register the callback of title buttons area change. 6493 * 6494 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 6495 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 6496 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6497 * 2. Incorrect parameter types; 6498 * 3. Parameter verification failed. 6499 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6500 * @throws { BusinessError } 1300002 - This window state is abnormal. 6501 * @syscap SystemCapability.Window.SessionManager 6502 * @atomicservice 6503 * @since 12 6504 */ 6505 on(type: 'windowTitleButtonRectChange', callback: Callback<TitleButtonRect>): void; 6506 6507 /** 6508 * Unregister the callback of title buttons area change. 6509 * 6510 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 6511 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 6512 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 6513 * 2. Parameter verification failed. 6514 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6515 * @throws { BusinessError } 1300002 - This window state is abnormal. 6516 * @syscap SystemCapability.Window.SessionManager 6517 * @since 11 6518 */ 6519 /** 6520 * Unregister the callback of title buttons area change. 6521 * 6522 * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. 6523 * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area. 6524 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 6525 * 2. Parameter verification failed. 6526 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6527 * @throws { BusinessError } 1300002 - This window state is abnormal. 6528 * @syscap SystemCapability.Window.SessionManager 6529 * @atomicservice 6530 * @since 12 6531 */ 6532 off(type: 'windowTitleButtonRectChange', callback?: Callback<TitleButtonRect>): void; 6533 6534 /** 6535 * Set the window mask of window 6536 * 6537 * @param { Array<Array<number>> } windowMask - The mask of window. The value of the array is 0 and 1, the other number is illegal value. 6538 * @returns { Promise<void> } Promise that returns no value. 6539 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6540 * 2. Incorrect parameter types. 6541 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6542 * @throws { BusinessError } 1300002 - This window state is abnormal. 6543 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6544 * @syscap SystemCapability.Window.SessionManager 6545 * @atomicservice 6546 * @since 12 6547 */ 6548 setWindowMask(windowMask: Array<Array<number>>): Promise<void>; 6549 6550 /** 6551 * Register the callback of windowRectChange 6552 * 6553 * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. 6554 * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions. 6555 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6556 * 2. Incorrect parameter types; 6557 * 3. Parameter verification failed. 6558 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6559 * @throws { BusinessError } 1300002 - This window state is abnormal. 6560 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6561 * @syscap SystemCapability.Window.SessionManager 6562 * @atomicservice 6563 * @since 12 6564 */ 6565 on(type: 'windowRectChange', callback: Callback<RectChangeOptions>): void; 6566 6567 /** 6568 * Unregister the callback of windowRectChange 6569 * 6570 * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. 6571 * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions. 6572 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 6573 * 2. Parameter verification failed. 6574 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6575 * @throws { BusinessError } 1300002 - This window state is abnormal. 6576 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6577 * @syscap SystemCapability.Window.SessionManager 6578 * @atomicservice 6579 * @since 12 6580 */ 6581 off(type: 'windowRectChange', callback?: Callback<RectChangeOptions>): void; 6582 6583 /** 6584 * Set gray scale of window. 6585 * 6586 * @param { number } grayScale - The value of gray scale. 6587 * @returns { Promise<void> } - The promise returned by the function. 6588 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 6589 * 2. Incorrect parameter types; 6590 * 3. Parameter verification failed. 6591 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6592 * @throws { BusinessError } 1300002 - This window state is abnormal. 6593 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 6594 * @syscap SystemCapability.Window.SessionManager 6595 * @atomicservice 6596 * @since 12 6597 */ 6598 setWindowGrayScale(grayScale: number): Promise<void>; 6599 } 6600 6601 /** 6602 * Window stage callback event type 6603 * 6604 * @enum { number } 6605 * @syscap SystemCapability.WindowManager.WindowManager.Core 6606 * @StageModelOnly 6607 * @since 9 6608 */ 6609 /** 6610 * Window stage callback event type 6611 * 6612 * @enum { number } 6613 * @syscap SystemCapability.WindowManager.WindowManager.Core 6614 * @StageModelOnly 6615 * @crossplatform 6616 * @since 10 6617 */ 6618 /** 6619 * Window stage callback event type 6620 * 6621 * @enum { number } 6622 * @syscap SystemCapability.WindowManager.WindowManager.Core 6623 * @StageModelOnly 6624 * @crossplatform 6625 * @atomicservice 6626 * @since 11 6627 */ 6628 enum WindowStageEventType { 6629 /** 6630 * The window stage is running in the foreground. 6631 * 6632 * @syscap SystemCapability.WindowManager.WindowManager.Core 6633 * @StageModelOnly 6634 * @since 9 6635 */ 6636 /** 6637 * The window stage is running in the foreground. 6638 * 6639 * @syscap SystemCapability.WindowManager.WindowManager.Core 6640 * @StageModelOnly 6641 * @crossplatform 6642 * @since 10 6643 */ 6644 /** 6645 * The window stage is running in the foreground. 6646 * 6647 * @syscap SystemCapability.WindowManager.WindowManager.Core 6648 * @StageModelOnly 6649 * @crossplatform 6650 * @atomicservice 6651 * @since 11 6652 */ 6653 SHOWN = 1, 6654 /** 6655 * The window stage gains focus. 6656 * 6657 * @syscap SystemCapability.WindowManager.WindowManager.Core 6658 * @StageModelOnly 6659 * @since 9 6660 */ 6661 /** 6662 * The window stage gains focus. 6663 * 6664 * @syscap SystemCapability.WindowManager.WindowManager.Core 6665 * @StageModelOnly 6666 * @crossplatform 6667 * @since 10 6668 */ 6669 /** 6670 * The window stage gains focus. 6671 * 6672 * @syscap SystemCapability.WindowManager.WindowManager.Core 6673 * @StageModelOnly 6674 * @crossplatform 6675 * @atomicservice 6676 * @since 11 6677 */ 6678 ACTIVE, 6679 /** 6680 * The window stage loses focus. 6681 * 6682 * @syscap SystemCapability.WindowManager.WindowManager.Core 6683 * @StageModelOnly 6684 * @since 9 6685 */ 6686 /** 6687 * The window stage loses focus. 6688 * 6689 * @syscap SystemCapability.WindowManager.WindowManager.Core 6690 * @StageModelOnly 6691 * @crossplatform 6692 * @since 10 6693 */ 6694 /** 6695 * The window stage loses focus. 6696 * 6697 * @syscap SystemCapability.WindowManager.WindowManager.Core 6698 * @StageModelOnly 6699 * @crossplatform 6700 * @atomicservice 6701 * @since 11 6702 */ 6703 INACTIVE, 6704 /** 6705 * The window stage is running in the background. 6706 * 6707 * @syscap SystemCapability.WindowManager.WindowManager.Core 6708 * @StageModelOnly 6709 * @since 9 6710 */ 6711 /** 6712 * The window stage is running in the background. 6713 * 6714 * @syscap SystemCapability.WindowManager.WindowManager.Core 6715 * @StageModelOnly 6716 * @crossplatform 6717 * @since 10 6718 */ 6719 /** 6720 * The window stage is running in the background. 6721 * 6722 * @syscap SystemCapability.WindowManager.WindowManager.Core 6723 * @StageModelOnly 6724 * @crossplatform 6725 * @atomicservice 6726 * @since 11 6727 */ 6728 HIDDEN, 6729 /** 6730 * The window stage is interactive in the foreground. 6731 * 6732 * @syscap SystemCapability.WindowManager.WindowManager.Core 6733 * @StageModelOnly 6734 * @crossplatform 6735 * @atomicservice 6736 * @since 11 6737 */ 6738 RESUMED, 6739 /** 6740 * The window stage is not interactive in the foreground. 6741 * 6742 * @syscap SystemCapability.WindowManager.WindowManager.Core 6743 * @StageModelOnly 6744 * @crossplatform 6745 * @atomicservice 6746 * @since 11 6747 */ 6748 PAUSED 6749 } 6750 /** 6751 * Options for subwindow creation 6752 * 6753 * @interface SubWindowOptions 6754 * @syscap SystemCapability.Window.SessionManager 6755 * @since 11 6756 */ 6757 interface SubWindowOptions { 6758 /** 6759 * Indicates subwindow title 6760 * 6761 * @type { string } 6762 * @syscap SystemCapability.Window.SessionManager 6763 * @since 11 6764 */ 6765 title: string; 6766 /** 6767 * Indicates decor of subwindow 6768 * 6769 * @type { boolean } 6770 * @syscap SystemCapability.Window.SessionManager 6771 * @since 11 6772 */ 6773 decorEnabled: boolean; 6774 /** 6775 * Indicates modality of subwindow 6776 * 6777 * @type { ?boolean } 6778 * @syscap SystemCapability.Window.SessionManager 6779 * @since 12 6780 */ 6781 isModal?: boolean; 6782 } 6783 /** 6784 * WindowStage 6785 * 6786 * @interface WindowStage 6787 * @syscap SystemCapability.WindowManager.WindowManager.Core 6788 * @since 9 6789 */ 6790 /** 6791 * WindowStage 6792 * 6793 * @interface WindowStage 6794 * @syscap SystemCapability.WindowManager.WindowManager.Core 6795 * @crossplatform 6796 * @since 10 6797 */ 6798 /** 6799 * WindowStage 6800 * 6801 * @interface WindowStage 6802 * @syscap SystemCapability.WindowManager.WindowManager.Core 6803 * @crossplatform 6804 * @atomicservice 6805 * @since 11 6806 */ 6807 interface WindowStage { 6808 /** 6809 * Get main window of the stage. 6810 * 6811 * @returns { Promise<Window> } Callback used to return the subwindow. 6812 * @throws { BusinessError } 1300002 - This window state is abnormal. 6813 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6814 * @syscap SystemCapability.WindowManager.WindowManager.Core 6815 * @StageModelOnly 6816 * @since 9 6817 */ 6818 /** 6819 * Get main window of the stage. 6820 * 6821 * @returns { Promise<Window> } Callback used to return the subwindow. 6822 * @throws { BusinessError } 1300002 - This window state is abnormal. 6823 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6824 * @syscap SystemCapability.WindowManager.WindowManager.Core 6825 * @StageModelOnly 6826 * @crossplatform 6827 * @since 10 6828 */ 6829 /** 6830 * Get main window of the stage. 6831 * 6832 * @returns { Promise<Window> } Callback used to return the subwindow. 6833 * @throws { BusinessError } 1300002 - This window state is abnormal. 6834 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6835 * @syscap SystemCapability.WindowManager.WindowManager.Core 6836 * @StageModelOnly 6837 * @crossplatform 6838 * @atomicservice 6839 * @since 11 6840 */ 6841 getMainWindow(): Promise<Window>; 6842 /** 6843 * Get main window of the stage. 6844 * 6845 * @param { AsyncCallback<Window> } callback Callback used to return the main window. 6846 * @throws { BusinessError } 1300002 - This window state is abnormal. 6847 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6848 * @syscap SystemCapability.WindowManager.WindowManager.Core 6849 * @StageModelOnly 6850 * @since 9 6851 */ 6852 /** 6853 * Get main window of the stage. 6854 * 6855 * @param { AsyncCallback<Window> } callback Callback used to return the main window. 6856 * @throws { BusinessError } 1300002 - This window state is abnormal. 6857 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6858 * @syscap SystemCapability.WindowManager.WindowManager.Core 6859 * @StageModelOnly 6860 * @crossplatform 6861 * @since 10 6862 */ 6863 /** 6864 * Get main window of the stage. 6865 * 6866 * @param { AsyncCallback<Window> } callback Callback used to return the main window. 6867 * @throws { BusinessError } 1300002 - This window state is abnormal. 6868 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6869 * @syscap SystemCapability.WindowManager.WindowManager.Core 6870 * @StageModelOnly 6871 * @crossplatform 6872 * @atomicservice 6873 * @since 11 6874 */ 6875 getMainWindow(callback: AsyncCallback<Window>): void; 6876 /** 6877 * Get main window of the stage. 6878 * 6879 * @returns { Window } 6880 * @throws { BusinessError } 1300002 - This window state is abnormal. 6881 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6882 * @syscap SystemCapability.WindowManager.WindowManager.Core 6883 * @StageModelOnly 6884 * @since 9 6885 */ 6886 /** 6887 * Get main window of the stage. 6888 * 6889 * @returns { Window } 6890 * @throws { BusinessError } 1300002 - This window state is abnormal. 6891 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6892 * @syscap SystemCapability.WindowManager.WindowManager.Core 6893 * @StageModelOnly 6894 * @crossplatform 6895 * @since 10 6896 */ 6897 /** 6898 * Get main window of the stage. 6899 * 6900 * @returns { Window } 6901 * @throws { BusinessError } 1300002 - This window state is abnormal. 6902 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6903 * @syscap SystemCapability.WindowManager.WindowManager.Core 6904 * @StageModelOnly 6905 * @crossplatform 6906 * @atomicservice 6907 * @since 11 6908 */ 6909 getMainWindowSync(): Window; 6910 /** 6911 * Create sub window of the stage. 6912 * 6913 * @param { string } name window name of sub window 6914 * @returns { Promise<Window> } Promise used to return the subwindow. 6915 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6916 * @throws { BusinessError } 1300002 - This window state is abnormal. 6917 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6918 * @syscap SystemCapability.WindowManager.WindowManager.Core 6919 * @StageModelOnly 6920 * @since 9 6921 */ 6922 /** 6923 * Create sub window of the stage. 6924 * 6925 * @param { string } name window name of sub window 6926 * @returns { Promise<Window> } Promise used to return the subwindow. 6927 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6928 * @throws { BusinessError } 1300002 - This window state is abnormal. 6929 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6930 * @syscap SystemCapability.WindowManager.WindowManager.Core 6931 * @StageModelOnly 6932 * @crossplatform 6933 * @since 10 6934 */ 6935 /** 6936 * Create sub window of the stage. 6937 * 6938 * @param { string } name window name of sub window 6939 * @returns { Promise<Window> } Promise used to return the subwindow. 6940 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6941 * @throws { BusinessError } 1300002 - This window state is abnormal. 6942 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6943 * @syscap SystemCapability.WindowManager.WindowManager.Core 6944 * @StageModelOnly 6945 * @crossplatform 6946 * @atomicservice 6947 * @since 11 6948 */ 6949 createSubWindow(name: string): Promise<Window>; 6950 /** 6951 * Create sub window of the stage. 6952 * 6953 * @param { string } name window name of sub window 6954 * @param { AsyncCallback<Window> } callback Callback used to return the subwindow. 6955 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6956 * @throws { BusinessError } 1300002 - This window state is abnormal. 6957 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6958 * @syscap SystemCapability.WindowManager.WindowManager.Core 6959 * @StageModelOnly 6960 * @since 9 6961 */ 6962 /** 6963 * Create sub window of the stage. 6964 * 6965 * @param { string } name window name of sub window 6966 * @param { AsyncCallback<Window> } callback Callback used to return the subwindow. 6967 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6968 * @throws { BusinessError } 1300002 - This window state is abnormal. 6969 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6970 * @syscap SystemCapability.WindowManager.WindowManager.Core 6971 * @StageModelOnly 6972 * @crossplatform 6973 * @since 10 6974 */ 6975 /** 6976 * Create sub window of the stage. 6977 * 6978 * @param { string } name window name of sub window 6979 * @param { AsyncCallback<Window> } callback Callback used to return the subwindow. 6980 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6981 * @throws { BusinessError } 1300002 - This window state is abnormal. 6982 * @throws { BusinessError } 1300005 - This window stage is abnormal. 6983 * @syscap SystemCapability.WindowManager.WindowManager.Core 6984 * @StageModelOnly 6985 * @crossplatform 6986 * @atomicservice 6987 * @since 11 6988 */ 6989 createSubWindow(name: string, callback: AsyncCallback<Window>): void; 6990 /** 6991 * Create sub window of the stage. 6992 * 6993 * @param { string } name - window name of sub window 6994 * @param { SubWindowOptions } options - options of sub window creation 6995 * @returns { Promise<Window> } Promise used to return the subwindow. 6996 * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. 6997 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 6998 * @throws { BusinessError } 1300002 - This window state is abnormal. 6999 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7000 * @syscap SystemCapability.Window.SessionManager 7001 * @StageModelOnly 7002 * @since 11 7003 */ 7004 createSubWindowWithOptions(name: string, options: SubWindowOptions): Promise<Window>; 7005 /** 7006 * Get sub window of the stage. 7007 * 7008 * @returns { Promise<Array<Window>> } 7009 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7010 * @syscap SystemCapability.WindowManager.WindowManager.Core 7011 * @StageModelOnly 7012 * @since 9 7013 */ 7014 /** 7015 * Get sub window of the stage. 7016 * 7017 * @returns { Promise<Array<Window>> } 7018 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7019 * @syscap SystemCapability.WindowManager.WindowManager.Core 7020 * @StageModelOnly 7021 * @crossplatform 7022 * @since 10 7023 */ 7024 /** 7025 * Get sub window of the stage. 7026 * 7027 * @returns { Promise<Array<Window>> } 7028 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7029 * @syscap SystemCapability.WindowManager.WindowManager.Core 7030 * @StageModelOnly 7031 * @crossplatform 7032 * @atomicservice 7033 * @since 11 7034 */ 7035 getSubWindow(): Promise<Array<Window>>; 7036 /** 7037 * Get sub window of the stage. 7038 * 7039 * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows. 7040 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7041 * @syscap SystemCapability.WindowManager.WindowManager.Core 7042 * @StageModelOnly 7043 * @since 9 7044 */ 7045 /** 7046 * Get sub window of the stage. 7047 * 7048 * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows. 7049 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7050 * @syscap SystemCapability.WindowManager.WindowManager.Core 7051 * @StageModelOnly 7052 * @crossplatform 7053 * @since 10 7054 */ 7055 /** 7056 * Get sub window of the stage. 7057 * 7058 * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows. 7059 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7060 * @syscap SystemCapability.WindowManager.WindowManager.Core 7061 * @StageModelOnly 7062 * @crossplatform 7063 * @atomicservice 7064 * @since 11 7065 */ 7066 getSubWindow(callback: AsyncCallback<Array<Window>>): void; 7067 /** 7068 * Loads content 7069 * 7070 * @param { string } path Path of the page to which the content will be loaded 7071 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 7072 * @param { AsyncCallback<void> } callback Callback used to return the result. 7073 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7074 * 2. Incorrect parameter types. 7075 * @throws { BusinessError } 1300002 - This window state is abnormal. 7076 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7077 * @syscap SystemCapability.WindowManager.WindowManager.Core 7078 * @StageModelOnly 7079 * @since 9 7080 */ 7081 /** 7082 * Loads content 7083 * 7084 * @param { string } path Path of the page to which the content will be loaded 7085 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 7086 * @param { AsyncCallback<void> } callback Callback used to return the result. 7087 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7088 * 2. Incorrect parameter types. 7089 * @throws { BusinessError } 1300002 - This window state is abnormal. 7090 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7091 * @syscap SystemCapability.WindowManager.WindowManager.Core 7092 * @StageModelOnly 7093 * @crossplatform 7094 * @since 10 7095 */ 7096 /** 7097 * Loads content 7098 * 7099 * @param { string } path Path of the page to which the content will be loaded 7100 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 7101 * @param { AsyncCallback<void> } callback Callback used to return the result. 7102 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7103 * 2. Incorrect parameter types. 7104 * @throws { BusinessError } 1300002 - This window state is abnormal. 7105 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7106 * @syscap SystemCapability.WindowManager.WindowManager.Core 7107 * @StageModelOnly 7108 * @crossplatform 7109 * @atomicservice 7110 * @since 11 7111 */ 7112 loadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 7113 /** 7114 * Loads content 7115 * 7116 * @param { string } path of the page to which the content will be loaded 7117 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 7118 * @returns { Promise<void> } 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 } 1300005 - This window stage is abnormal. 7123 * @syscap SystemCapability.WindowManager.WindowManager.Core 7124 * @StageModelOnly 7125 * @since 9 7126 */ 7127 /** 7128 * Loads content 7129 * 7130 * @param { string } path of the page to which the content will be loaded 7131 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 7132 * @returns { Promise<void> } 7133 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7134 * 2. Incorrect parameter types. 7135 * @throws { BusinessError } 1300002 - This window state is abnormal. 7136 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7137 * @syscap SystemCapability.WindowManager.WindowManager.Core 7138 * @StageModelOnly 7139 * @crossplatform 7140 * @since 10 7141 */ 7142 /** 7143 * Loads content 7144 * 7145 * @param { string } path of the page to which the content will be loaded 7146 * @param { LocalStorage } storage The data object shared within the content instance loaded by the window 7147 * @returns { Promise<void> } 7148 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7149 * 2. Incorrect parameter types. 7150 * @throws { BusinessError } 1300002 - This window state is abnormal. 7151 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7152 * @syscap SystemCapability.WindowManager.WindowManager.Core 7153 * @StageModelOnly 7154 * @crossplatform 7155 * @atomicservice 7156 * @since 11 7157 */ 7158 loadContent(path: string, storage?: LocalStorage): Promise<void>; 7159 /** 7160 * Loads content 7161 * 7162 * @param { string } path of the page to which the content will be loaded 7163 * @param { AsyncCallback<void> } callback Callback used to return the result. 7164 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7165 * 2. Incorrect parameter types. 7166 * @throws { BusinessError } 1300002 - This window state is abnormal. 7167 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7168 * @syscap SystemCapability.WindowManager.WindowManager.Core 7169 * @StageModelOnly 7170 * @since 9 7171 */ 7172 /** 7173 * Loads content 7174 * 7175 * @param { string } path of the page to which the content will be loaded 7176 * @param { AsyncCallback<void> } callback Callback used to return the result. 7177 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7178 * 2. Incorrect parameter types. 7179 * @throws { BusinessError } 1300002 - This window state is abnormal. 7180 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7181 * @syscap SystemCapability.WindowManager.WindowManager.Core 7182 * @StageModelOnly 7183 * @crossplatform 7184 * @since 10 7185 */ 7186 /** 7187 * Loads content 7188 * 7189 * @param { string } path of the page to which the content will be loaded 7190 * @param { AsyncCallback<void> } callback Callback used to return the result. 7191 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7192 * 2. Incorrect parameter types. 7193 * @throws { BusinessError } 1300002 - This window state is abnormal. 7194 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7195 * @syscap SystemCapability.WindowManager.WindowManager.Core 7196 * @StageModelOnly 7197 * @crossplatform 7198 * @atomicservice 7199 * @since 11 7200 */ 7201 loadContent(path: string, callback: AsyncCallback<void>): void; 7202 7203 /** 7204 * Loads content by named router 7205 * 7206 * @param { string } name - name of the page to which the content will be loaded. 7207 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 7208 * @param { AsyncCallback<void> } callback - Callback used to return the result. 7209 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7210 * 2. Incorrect parameter types. 7211 * @throws { BusinessError } 1300002 - This window state is abnormal. 7212 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7213 * @syscap SystemCapability.WindowManager.WindowManager.Core 7214 * @stagemodelonly 7215 * @crossplatform 7216 * @atomicservice 7217 * @since 11 7218 */ 7219 loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback<void>): void; 7220 7221 /** 7222 * Loads content by named router 7223 * 7224 * @param { string } name - name of the page to which the content will be loaded. 7225 * @param { AsyncCallback<void> } callback - Callback used to return the result. 7226 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7227 * 2. Incorrect parameter types. 7228 * @throws { BusinessError } 1300002 - This window state is abnormal. 7229 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7230 * @syscap SystemCapability.WindowManager.WindowManager.Core 7231 * @stagemodelonly 7232 * @crossplatform 7233 * @atomicservice 7234 * @since 11 7235 */ 7236 loadContentByName(name: string, callback: AsyncCallback<void>): void; 7237 7238 /** 7239 * Loads content by named router 7240 * 7241 * @param { string } name - name of the page to which the content will be loaded. 7242 * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. 7243 * @returns { Promise<void> } Promise that returns no value. 7244 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7245 * 2. Incorrect parameter types. 7246 * @throws { BusinessError } 1300002 - This window state is abnormal. 7247 * @throws { BusinessError } 1300003 - This window manager service works abnormally. 7248 * @syscap SystemCapability.WindowManager.WindowManager.Core 7249 * @stagemodelonly 7250 * @crossplatform 7251 * @atomicservice 7252 * @since 11 7253 */ 7254 loadContentByName(name: string, storage?: LocalStorage): Promise<void>; 7255 7256 /** 7257 * Window stage event callback on. 7258 * 7259 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 7260 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 7261 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7262 * 2. Incorrect parameter types; 7263 * 3. Parameter verification failed. 7264 * @throws { BusinessError } 1300002 - This window state is abnormal. 7265 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7266 * @syscap SystemCapability.WindowManager.WindowManager.Core 7267 * @StageModelOnly 7268 * @since 9 7269 */ 7270 /** 7271 * Window stage event callback on. 7272 * 7273 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 7274 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 7275 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7276 * 2. Incorrect parameter types; 7277 * 3. Parameter verification failed. 7278 * @throws { BusinessError } 1300002 - This window state is abnormal. 7279 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7280 * @syscap SystemCapability.WindowManager.WindowManager.Core 7281 * @StageModelOnly 7282 * @crossplatform 7283 * @since 10 7284 */ 7285 /** 7286 * Window stage event callback on. 7287 * 7288 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 7289 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 7290 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7291 * 2. Incorrect parameter types; 7292 * 3. Parameter verification failed. 7293 * @throws { BusinessError } 1300002 - This window state is abnormal. 7294 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7295 * @syscap SystemCapability.WindowManager.WindowManager.Core 7296 * @StageModelOnly 7297 * @crossplatform 7298 * @atomicservice 7299 * @since 11 7300 */ 7301 on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void; 7302 /** 7303 * Window stage event callback off. 7304 * 7305 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 7306 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 7307 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 7308 * 2. Parameter verification failed. 7309 * @throws { BusinessError } 1300002 - This window state is abnormal. 7310 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7311 * @syscap SystemCapability.WindowManager.WindowManager.Core 7312 * @StageModelOnly 7313 * @since 9 7314 */ 7315 /** 7316 * Window stage event callback off. 7317 * 7318 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 7319 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 7320 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 7321 * 2. Parameter verification failed. 7322 * @throws { BusinessError } 1300002 - This window state is abnormal. 7323 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7324 * @syscap SystemCapability.WindowManager.WindowManager.Core 7325 * @StageModelOnly 7326 * @crossplatform 7327 * @since 10 7328 */ 7329 /** 7330 * Window stage event callback off. 7331 * 7332 * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. 7333 * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state. 7334 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; 7335 * 2. Parameter verification failed. 7336 * @throws { BusinessError } 1300002 - This window state is abnormal. 7337 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7338 * @syscap SystemCapability.WindowManager.WindowManager.Core 7339 * @StageModelOnly 7340 * @crossplatform 7341 * @atomicservice 7342 * @since 11 7343 */ 7344 off(eventType: 'windowStageEvent', callback?: Callback<WindowStageEventType>): void; 7345 7346 /** 7347 * Disable window decoration. It must be called before loadContent. 7348 * 7349 * @throws { BusinessError } 1300002 - This window state is abnormal. 7350 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7351 * @syscap SystemCapability.WindowManager.WindowManager.Core 7352 * @systemapi 7353 * @StageModelOnly 7354 * @since 9 7355 */ 7356 disableWindowDecor(): void; 7357 7358 /** 7359 * Sets whether can show on lock screen or not 7360 * 7361 * @param { boolean } showOnLockScreen can show on lock screen if true, or not if false 7362 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7363 * 2. Incorrect parameter types. 7364 * @throws { BusinessError } 1300002 - This window state is abnormal. 7365 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7366 * @syscap SystemCapability.WindowManager.WindowManager.Core 7367 * @systemapi Hide this for inner system use. 7368 * @StageModelOnly 7369 * @since 9 7370 */ 7371 setShowOnLockScreen(showOnLockScreen: boolean): void; 7372 7373 /** 7374 * Set whether to use default density. 7375 * 7376 * @param { boolean } enabled - Use default density if true, or follow system density change if false 7377 * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; 7378 * 2. Incorrect parameter types. 7379 * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. 7380 * @throws { BusinessError } 1300002 - This window state is abnormal. 7381 * @throws { BusinessError } 1300005 - This window stage is abnormal. 7382 * @syscap SystemCapability.Window.SessionManager 7383 * @StageModelOnly 7384 * @since 12 7385 */ 7386 setDefaultDensityEnabled(enabled: boolean): void; 7387 } 7388} 7389 7390export default window; 7391