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