• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21import { AsyncCallback, BusinessError } from './@ohos.base';
22import BaseContext from './application/BaseContext';
23import image from './@ohos.multimedia.image';
24import rpc from './@ohos.rpc';
25import dialogRequest from './@ohos.app.ability.dialogRequest';
26/*** if arkts 1.1 */
27import { UIContext } from './@ohos.arkui.UIContext';
28import { ColorMetrics } from './@ohos.arkui.node';
29/*** endif */
30import ConfigurationConstant from './@ohos.app.ability.ConfigurationConstant';
31import bundleManager from './@ohos.bundle.bundleManager';
32/*** if arkts 1.2 */
33import { LocalStorage } from '@ohos.arkui.stateManagement';
34import { UIContext } from '@ohos.arkui.UIContext';
35import { ColorMetrics } from '@ohos.arkui.node';
36import { Callback } from './@ohos.base';
37/*** endif */
38
39/*** if arkts 1.1 */
40/**
41 * Defines the window callback.
42 *
43 * @typedef Callback<T, V = void>
44 * @syscap SystemCapability.Window.SessionManager
45 * @atomicservice
46 * @since 15
47 */
48declare interface Callback<T, V = void> {
49  /**
50   * Defines the callback info.
51   *
52   * @param { T } data - the data will be used in the callback.
53   * @returns { V } - Returns result of the callback.
54   * @syscap SystemCapability.Window.SessionManager
55   * @atomicservice
56   * @since 15
57   */
58  (data: T): V;
59}
60/*** endif */
61
62/**
63   * Defines the window animation curve param.
64   *
65   * @typedef { Array<number> } AnimationCurveParam
66   * @syscap SystemCapability.Window.SessionManager
67   * @atomicservice
68   * @since 20
69   */
70declare type WindowAnimationCurveParam = Array<number>;
71
72/**
73 * Window manager.
74 *
75 * @namespace window
76 * @syscap SystemCapability.WindowManager.WindowManager.Core
77 * @since 6
78 */
79/**
80 * Window manager.
81 *
82 * @namespace window
83 * @syscap SystemCapability.WindowManager.WindowManager.Core
84 * @crossplatform
85 * @since 10
86 */
87/**
88 * Window manager.
89 *
90 * @namespace window
91 * @syscap SystemCapability.WindowManager.WindowManager.Core
92 * @crossplatform
93 * @atomicservice
94 * @since arkts {'1.1':'11', '1.2':'20'}
95 * @arkts 1.1&1.2
96 */
97declare namespace window {
98  /**
99   * The type of a window.
100   *
101   * @enum { number }
102   * @syscap SystemCapability.WindowManager.WindowManager.Core
103   * @since 7
104   */
105  /**
106   * The type of a window.
107   *
108   * @enum { number }
109   * @syscap SystemCapability.WindowManager.WindowManager.Core
110   * @atomicservice
111   * @since arkts {'1.1':'12', '1.2':'20'}
112   * @arkts 1.1&1.2
113   */
114  enum WindowType {
115    /**
116     * App.
117     *
118     * @syscap SystemCapability.WindowManager.WindowManager.Core
119     * @FAModelOnly
120     * @since arkts {'1.1':'7', '1.2':'20'}
121     * @arkts 1.1&1.2
122     */
123    TYPE_APP = 0,
124    /**
125     * System alert.
126     *
127     * @syscap SystemCapability.WindowManager.WindowManager.Core
128     * @since 7
129     * @deprecated since 11
130     */
131    TYPE_SYSTEM_ALERT,
132    /**
133     * Input method.
134     *
135     * @syscap SystemCapability.WindowManager.WindowManager.Core
136     * @systemapi Hide this for inner system use.
137     * @StageModelOnly
138     * @since 9
139     * @deprecated since 13
140     */
141    TYPE_INPUT_METHOD,
142    /**
143     * Status bar.
144     *
145     * @syscap SystemCapability.WindowManager.WindowManager.Core
146     * @systemapi Hide this for inner system use.
147     * @StageModelOnly
148     * @since arkts {'1.1':'9', '1.2':'20'}
149     * @arkts 1.1&1.2
150     */
151    TYPE_STATUS_BAR = 3,
152    /**
153     * Panel.
154     *
155     * @syscap SystemCapability.WindowManager.WindowManager.Core
156     * @systemapi Hide this for inner system use.
157     * @StageModelOnly
158     * @since arkts {'1.1':'9', '1.2':'20'}
159     * @arkts 1.1&1.2
160     */
161    TYPE_PANEL = 4,
162    /**
163     * Keyguard.
164     *
165     * @syscap SystemCapability.WindowManager.WindowManager.Core
166     * @systemapi Hide this for inner system use.
167     * @StageModelOnly
168     * @since arkts {'1.1':'9', '1.2':'20'}
169     * @arkts 1.1&1.2
170     */
171    TYPE_KEYGUARD = 5,
172    /**
173     * Volume.
174     *
175     * @syscap SystemCapability.WindowManager.WindowManager.Core
176     * @systemapi Hide this for inner system use.
177     * @StageModelOnly
178     * @since arkts {'1.1':'9', '1.2':'20'}
179     * @arkts 1.1&1.2
180     */
181    TYPE_VOLUME_OVERLAY = 6,
182    /**
183     * Navigation bar.
184     *
185     * @syscap SystemCapability.WindowManager.WindowManager.Core
186     * @systemapi Hide this for inner system use.
187     * @StageModelOnly
188     * @since arkts {'1.1':'9', '1.2':'20'}
189     * @arkts 1.1&1.2
190     */
191    TYPE_NAVIGATION_BAR = 7,
192    /**
193     * Float.
194     *
195     * @permission ohos.permission.SYSTEM_FLOAT_WINDOW
196     * @syscap SystemCapability.WindowManager.WindowManager.Core
197     * @StageModelOnly
198     * @since 9
199     */
200    /**
201     * Float.
202     * Require "ohos.permission.SYSTEM_FLOAT_WINDOW" permission
203     *
204     * @syscap SystemCapability.WindowManager.WindowManager.Core
205     * @StageModelOnly
206     * @atomicservice
207     * @since arkts {'1.1':'12', '1.2':'20'}
208     * @arkts 1.1&1.2
209     */
210    TYPE_FLOAT = 8,
211    /**
212     * Wallpaper.
213     *
214     * @syscap SystemCapability.WindowManager.WindowManager.Core
215     * @systemapi Hide this for inner system use.
216     * @StageModelOnly
217     * @since arkts {'1.1':'9', '1.2':'20'}
218     * @arkts 1.1&1.2
219     */
220    TYPE_WALLPAPER = 9,
221    /**
222     * Desktop.
223     *
224     * @syscap SystemCapability.WindowManager.WindowManager.Core
225     * @systemapi Hide this for inner system use.
226     * @StageModelOnly
227     * @since arkts {'1.1':'9', '1.2':'20'}
228     * @arkts 1.1&1.2
229     */
230    TYPE_DESKTOP = 10,
231    /**
232     * Recent.
233     *
234     * @syscap SystemCapability.WindowManager.WindowManager.Core
235     * @systemapi Hide this for inner system use.
236     * @StageModelOnly
237     * @since arkts {'1.1':'9', '1.2':'20'}
238     * @arkts 1.1&1.2
239     */
240    TYPE_LAUNCHER_RECENT = 11,
241    /**
242     * Dock.
243     *
244     * @syscap SystemCapability.WindowManager.WindowManager.Core
245     * @systemapi Hide this for inner system use.
246     * @StageModelOnly
247     * @since arkts {'1.1':'9', '1.2':'20'}
248     * @arkts 1.1&1.2
249     */
250    TYPE_LAUNCHER_DOCK = 12,
251    /**
252     * Voice interaction.
253     *
254     * @syscap SystemCapability.WindowManager.WindowManager.Core
255     * @systemapi Hide this for inner system use.
256     * @StageModelOnly
257     * @since arkts {'1.1':'9', '1.2':'20'}
258     * @arkts 1.1&1.2
259     */
260    TYPE_VOICE_INTERACTION = 13,
261    /**
262     * Pointer.
263     *
264     * @syscap SystemCapability.WindowManager.WindowManager.Core
265     * @systemapi Hide this for inner system use.
266     * @StageModelOnly
267     * @since arkts {'1.1':'9', '1.2':'20'}
268     * @arkts 1.1&1.2
269     */
270    TYPE_POINTER = 14,
271    /**
272     * Float camera.
273     *
274     * @syscap SystemCapability.WindowManager.WindowManager.Core
275     * @systemapi Hide this for inner system use.
276     * @StageModelOnly
277     * @since arkts {'1.1':'9', '1.2':'20'}
278     * @arkts 1.1&1.2
279     */
280    TYPE_FLOAT_CAMERA = 15,
281    /**
282     * Dialog.
283     *
284     * @syscap SystemCapability.WindowManager.WindowManager.Core
285     * @StageModelOnly
286     * @since 10
287     */
288    /**
289     * Dialog.
290     *
291     * @syscap SystemCapability.WindowManager.WindowManager.Core
292     * @StageModelOnly
293     * @atomicservice
294     * @since arkts {'1.1':'12', '1.2':'20'}
295     * @arkts 1.1&1.2
296     */
297    TYPE_DIALOG= 16,
298    /**
299     * Screenshot.
300     *
301     * @syscap SystemCapability.WindowManager.WindowManager.Core
302     * @systemapi Hide this for inner system use.
303     * @StageModelOnly
304     * @since arkts {'1.1':'9', '1.2':'20'}
305     * @arkts 1.1&1.2
306     */
307    TYPE_SCREENSHOT = 17,
308    /**
309     * System Toast.
310     *
311     * @syscap SystemCapability.WindowManager.WindowManager.Core
312     * @systemapi Hide this for inner system use.
313     * @StageModelOnly
314     * @since arkts {'1.1':'11', '1.2':'20'}
315     * @arkts 1.1&1.2
316     */
317    TYPE_SYSTEM_TOAST = 18,
318    /**
319     * Divider.
320     *
321     * @syscap SystemCapability.WindowManager.WindowManager.Core
322     * @systemapi Hide this for inner system use.
323     * @StageModelOnly
324     * @since arkts {'1.1':'11', '1.2':'20'}
325     * @arkts 1.1&1.2
326     */
327    TYPE_DIVIDER= 19,
328    /**
329     * Global Search.
330     *
331     * @syscap SystemCapability.WindowManager.WindowManager.Core
332     * @systemapi Hide this for inner system use.
333     * @StageModelOnly
334     * @since arkts {'1.1':'11', '1.2':'20'}
335     * @arkts 1.1&1.2
336     */
337    TYPE_GLOBAL_SEARCH= 20,
338    /**
339     * Handwrite.
340     *
341     * @syscap SystemCapability.Window.SessionManager
342     * @systemapi Hide this for inner system use.
343     * @StageModelOnly
344     * @since arkts {'1.1':'12', '1.2':'20'}
345     * @arkts 1.1&1.2
346     */
347    TYPE_HANDWRITE = 21,
348    /**
349     * TYPE_WALLET_SWIPE_CARD.
350     *
351     * @syscap SystemCapability.Window.SessionManager
352     * @systemapi Hide this for inner system use.
353     * @stagemodelonly
354     * @since arkts {'1.1':'15', '1.2':'20'}
355     * @arkts 1.1&1.2
356     */
357    TYPE_WALLET_SWIPE_CARD = 22,
358    /**
359     * Screen Control
360     *
361     * @syscap SystemCapability.Window.SessionManager
362     * @systemapi Hide this for inner system use.
363     * @stagemodelonly
364     * @since arkts {'1.1':'15', '1.2':'20'}
365     * @arkts 1.1&1.2
366     */
367    TYPE_SCREEN_CONTROL = 23,
368    /**
369     * TYPE_FLOAT_NAVIGATION.
370     *
371     * @syscap SystemCapability.Window.SessionManager
372     * @systemapi Hide this for inner system use.
373     * @stagemodelonly
374     * @since arkts {'1.1':'17', '1.2':'20'}
375     * @arkts 1.1&1.2
376     */
377    TYPE_FLOAT_NAVIGATION = 24,
378    /**
379     * TYPE_DYNAMIC.
380     *
381     * @syscap SystemCapability.Window.SessionManager
382     * @systemapi Hide this for inner system use.
383     * @stagemodelonly
384     * @since 20
385     */
386    TYPE_DYNAMIC,
387    /**
388     * TYPE_MUTISCREEN_COLLABORATION.
389     *
390     * @syscap SystemCapability.Window.SessionManager
391     * @systemapi Hide this for inner system use.
392     * @stagemodelonly
393     * @since 20
394     */
395    TYPE_MUTISCREEN_COLLABORATION = 26,
396    /**
397     * Main.
398     *
399     * @syscap SystemCapability.WindowManager.WindowManager.Core
400     * @since 18
401     */
402    TYPE_MAIN = 32
403  }
404
405  /**
406   * Describes the type of avoid area
407   *
408   * @enum { number }
409   * @syscap SystemCapability.WindowManager.WindowManager.Core
410   * @since 7
411   */
412  /**
413   * Describes the type of avoid area
414   *
415   * @enum { number }
416   * @syscap SystemCapability.WindowManager.WindowManager.Core
417   * @atomicservice
418   * @since 11
419   */
420  /**
421   * Describes the type of avoid area
422   *
423   * @enum { number }
424   * @syscap SystemCapability.WindowManager.WindowManager.Core
425   * @crossplatform
426   * @atomicservice
427   * @since arkts {'1.1':'12', '1.2':'20'}
428   * @arkts 1.1&1.2
429   */
430  enum AvoidAreaType {
431    /**
432     * Default area of the system
433     *
434     * @syscap SystemCapability.WindowManager.WindowManager.Core
435     * @since 7
436     */
437    /**
438     * Default area of the system
439     *
440     * @syscap SystemCapability.WindowManager.WindowManager.Core
441     * @atomicservice
442     * @since 11
443     */
444    /**
445     * Default area of the system
446     *
447     * @syscap SystemCapability.WindowManager.WindowManager.Core
448     * @crossplatform
449     * @atomicservice
450     * @since arkts {'1.1':'12', '1.2':'20'}
451     * @arkts 1.1&1.2
452     */
453    TYPE_SYSTEM = 0,
454
455    /**
456     * Notch
457     *
458     * @syscap SystemCapability.WindowManager.WindowManager.Core
459     * @since 7
460     */
461    /**
462     * Notch
463     *
464     * @syscap SystemCapability.WindowManager.WindowManager.Core
465     * @atomicservice
466     * @since 11
467     */
468    /**
469     * Notch
470     *
471     * @syscap SystemCapability.WindowManager.WindowManager.Core
472     * @crossplatform
473     * @atomicservice
474     * @since arkts {'1.1':'12', '1.2':'20'}
475     * @arkts 1.1&1.2
476     */
477    TYPE_CUTOUT = 1,
478
479    /**
480     * Area for system gesture
481     *
482     * @syscap SystemCapability.WindowManager.WindowManager.Core
483     * @since 9
484     */
485    /**
486     * Area for system gesture
487     *
488     * @syscap SystemCapability.WindowManager.WindowManager.Core
489     * @atomicservice
490     * @since 11
491     */
492    /**
493     * Area for system gesture
494     *
495     * @syscap SystemCapability.WindowManager.WindowManager.Core
496     * @crossplatform
497     * @atomicservice
498     * @since arkts {'1.1':'12', '1.2':'20'}
499     * @arkts 1.1&1.2
500     */
501    TYPE_SYSTEM_GESTURE = 2,
502
503    /**
504     * Area for keyboard
505     *
506     * @syscap SystemCapability.WindowManager.WindowManager.Core
507     * @since 9
508     */
509    /**
510     * Area for keyboard
511     *
512     * @syscap SystemCapability.WindowManager.WindowManager.Core
513     * @atomicservice
514     * @since 11
515     */
516    /**
517     * Area for keyboard
518     *
519     * @syscap SystemCapability.WindowManager.WindowManager.Core
520     * @crossplatform
521     * @atomicservice
522     * @since arkts {'1.1':'12', '1.2':'20'}
523     * @arkts 1.1&1.2
524     */
525    TYPE_KEYBOARD = 3,
526
527    /**
528     * Area for navigation indicator
529     *
530     * @syscap SystemCapability.WindowManager.WindowManager.Core
531     * @atomicservice
532     * @since 11
533     */
534    /**
535     * Area for navigation indicator
536     *
537     * @syscap SystemCapability.WindowManager.WindowManager.Core
538     * @crossplatform
539     * @atomicservice
540     * @since arkts {'1.1':'12', '1.2':'20'}
541     * @arkts 1.1&1.2
542     */
543    TYPE_NAVIGATION_INDICATOR = 4
544  }
545  /**
546   * Describes the window mode of an application
547   *
548   * @enum { number }
549   * @syscap SystemCapability.WindowManager.WindowManager.Core
550   * @systemapi Hide this for inner system use.
551   * @since arkts {'1.1':'7', '1.2':'20'}
552   * @arkts 1.1&1.2
553   */
554  enum WindowMode {
555    /**
556     * Undefined mode of the window
557     *
558     * @syscap SystemCapability.WindowManager.WindowManager.Core
559     * @systemapi Hide this for inner system use.
560     * @since 7
561     */
562    UNDEFINED = 1,
563    /**
564     * Fullscreen mode of the window
565     *
566     * @syscap SystemCapability.WindowManager.WindowManager.Core
567     * @systemapi Hide this for inner system use.
568     * @since 7
569     */
570    FULLSCREEN,
571    /**
572     * Primary mode of the window
573     *
574     * @syscap SystemCapability.WindowManager.WindowManager.Core
575     * @systemapi Hide this for inner system use.
576     * @since 7
577     */
578    PRIMARY,
579    /**
580     * Secondary mode of the window
581     *
582     * @syscap SystemCapability.WindowManager.WindowManager.Core
583     * @systemapi Hide this for inner system use.
584     * @since 7
585     */
586    SECONDARY,
587    /**
588     * Floating mode of the window
589     *
590     * @syscap SystemCapability.WindowManager.WindowManager.Core
591     * @systemapi Hide this for inner system use.
592     * @since arkts {'1.1':'7', '1.2':'20'}
593     * @arkts 1.1&1.2
594     */
595    FLOATING = 5
596  }
597
598  /**
599   * Describes the mode of window layout
600   *
601   * @enum { number }
602   * @syscap SystemCapability.WindowManager.WindowManager.Core
603   * @systemapi Hide this for inner system use.
604   * @since 9
605   */
606  enum WindowLayoutMode {
607    /**
608     * CASCADE
609     *
610     * @syscap SystemCapability.WindowManager.WindowManager.Core
611     * @systemapi Hide this for inner system use.
612     * @since 9
613     */
614    WINDOW_LAYOUT_MODE_CASCADE,
615    /**
616     * TILE
617     *
618     * @syscap SystemCapability.WindowManager.WindowManager.Core
619     * @systemapi Hide this for inner system use.
620     * @since 9
621     */
622    WINDOW_LAYOUT_MODE_TILE
623  }
624
625  /**
626   * Describes the window status of an application
627   *
628   * @enum { number }
629   * @syscap SystemCapability.Window.SessionManager
630   * @since 11
631   */
632  /**
633   * Describes the window status of an application
634   *
635   * @enum { number }
636   * @syscap SystemCapability.Window.SessionManager
637   * @atomicservice
638   * @since 12
639   */
640  /**
641   * Describes the window status of an application
642   *
643   * @enum { number }
644   * @syscap SystemCapability.Window.SessionManager
645   * @crossplatform
646   * @atomicservice
647   * @since arkts {'1.1':'20', '1.2':'20'}
648   * @arkts 1.1&1.2
649   */
650  enum WindowStatusType {
651    /**
652     * Undefined status of the window
653     *
654     * @syscap SystemCapability.Window.SessionManager
655     * @since 11
656     */
657    /**
658     * Undefined status of the window
659     *
660     * @syscap SystemCapability.Window.SessionManager
661     * @atomicservice
662     * @since 12
663     */
664    /**
665     * Undefined status of the window
666     *
667     * @syscap SystemCapability.Window.SessionManager
668     * @crossplatform
669     * @atomicservice
670     * @since arkts {'1.1':'20', '1.2':'20'}
671     * @arkts 1.1&1.2
672     */
673    UNDEFINED = 0,
674    /**
675     * Full screen status of the window
676     *
677     * @syscap SystemCapability.Window.SessionManager
678     * @since 11
679     */
680    /**
681     * Full screen status of the window
682     *
683     * @syscap SystemCapability.Window.SessionManager
684     * @atomicservice
685     * @since 12
686     */
687    /**
688     * Full screen status of the window
689     *
690     * @syscap SystemCapability.Window.SessionManager
691     * @crossplatform
692     * @atomicservice
693     * @since arkts {'1.1':'20', '1.2':'20'}
694     * @arkts 1.1&1.2
695     */
696    FULL_SCREEN = 1,
697    /**
698     * Maximize status of the window
699     *
700     * @syscap SystemCapability.Window.SessionManager
701     * @since 11
702     */
703    /**
704     * Maximize status of the window
705     *
706     * @syscap SystemCapability.Window.SessionManager
707     * @atomicservice
708     * @since arkts {'1.1':'12', '1.2':'20'}
709     * @arkts 1.1&1.2
710     */
711    MAXIMIZE = 2,
712    /**
713     * Minimize status of the window
714     *
715     * @syscap SystemCapability.Window.SessionManager
716     * @since 11
717     */
718    /**
719     * Minimize status of the window
720     *
721     * @syscap SystemCapability.Window.SessionManager
722     * @atomicservice
723     * @since 12
724     */
725    /**
726     * Minimize status of the window
727     *
728     * @syscap SystemCapability.Window.SessionManager
729     * @crossplatform
730     * @atomicservice
731     * @since arkts {'1.1':'20', '1.2':'20'}
732     * @arkts 1.1&1.2
733     */
734    MINIMIZE = 3,
735    /**
736     * Floating status of the window
737     *
738     * @syscap SystemCapability.Window.SessionManager
739     * @since 11
740     */
741    /**
742     * Floating status of the window
743     *
744     * @syscap SystemCapability.Window.SessionManager
745     * @atomicservice
746     * @since 12
747     */
748    /**
749     * Floating status of the window
750     *
751     * @syscap SystemCapability.Window.SessionManager
752     * @crossplatform
753     * @atomicservice
754     * @since arkts {'1.1':'20', '1.2':'20'}
755     * @arkts 1.1&1.2
756     */
757    FLOATING = 4,
758    /**
759     * Split screen status of the window
760     *
761     * @syscap SystemCapability.Window.SessionManager
762     * @since 11
763     */
764    /**
765     * Split screen status of the window
766     *
767     * @syscap SystemCapability.Window.SessionManager
768     * @atomicservice
769     * @since 12
770     */
771    /**
772     * Split screen status of the window
773     *
774     * @syscap SystemCapability.Window.SessionManager
775     * @crossplatform
776     * @atomicservice
777     * @since arkts {'1.1':'20', '1.2':'20'}
778     * @arkts 1.1&1.2
779     */
780    SPLIT_SCREEN = 5
781  }
782
783  /**
784   * Properties of status bar and navigation bar, it couldn't update automatically
785   *
786   * @interface SystemBarProperties
787   * @syscap SystemCapability.WindowManager.WindowManager.Core
788   * @since 6
789   */
790  /**
791   * Properties of status bar and navigation bar, it couldn't update automatically
792   *
793   * @interface SystemBarProperties
794   * @syscap SystemCapability.WindowManager.WindowManager.Core
795   * @atomicservice
796   * @since 12
797   */
798  /**
799   * Properties of status bar and navigation bar, it couldn't update automatically
800   *
801   * @interface SystemBarProperties
802   * @syscap SystemCapability.WindowManager.WindowManager.Core
803   * @crossplatform
804   * @atomicservice
805   * @since arkts {'1.1':'20', '1.2':'20'}
806   * @arkts 1.1&1.2
807   */
808  interface SystemBarProperties {
809    /**
810     * The color of the status bar.
811     *
812     * @syscap SystemCapability.WindowManager.WindowManager.Core
813     * @since 6
814     */
815    /**
816     * The color of the status bar.
817     *
818     * @type { ?string }
819     * @syscap SystemCapability.WindowManager.WindowManager.Core
820     * @atomicservice
821     * @since 12
822     */
823    /**
824     * The color of the status bar.
825     *
826     * @type { ?string }
827     * @syscap SystemCapability.WindowManager.WindowManager.Core
828     * @crossplatform
829     * @atomicservice
830     * @since arkts {'1.1':'20', '1.2':'20'}
831     * @arkts 1.1&1.2
832     */
833    statusBarColor?: string;
834
835    /**
836     * The light icon of the status bar.
837     *
838     * @syscap SystemCapability.WindowManager.WindowManager.Core
839     * @since 7
840     */
841    /**
842     * The light icon of the status bar.
843     *
844     * @type { ?boolean }
845     * @syscap SystemCapability.WindowManager.WindowManager.Core
846     * @atomicservice
847     * @since 12
848     */
849    /**
850     * The light icon of the status bar.
851     *
852     * @type { ?boolean }
853     * @syscap SystemCapability.WindowManager.WindowManager.Core
854     * @crossplatform
855     * @atomicservice
856     * @since arkts {'1.1':'20', '1.2':'20'}
857     * @arkts 1.1&1.2
858     */
859    isStatusBarLightIcon?: boolean;
860
861    /**
862     * The content color of the status bar
863     *
864     * @syscap SystemCapability.WindowManager.WindowManager.Core
865     * @since 8
866     */
867    /**
868     * The content color of the status bar
869     *
870     * @type { ?string }
871     * @syscap SystemCapability.WindowManager.WindowManager.Core
872     * @atomicservice
873     * @since arkts {'1.1':'12', '1.2':'20'}
874     * @arkts 1.1&1.2
875     */
876    statusBarContentColor?: string;
877
878    /**
879     * The color of the navigation bar.
880     *
881     * @syscap SystemCapability.WindowManager.WindowManager.Core
882     * @since 6
883     */
884    /**
885     * The color of the navigation bar.
886     *
887     * @type { ?string }
888     * @syscap SystemCapability.WindowManager.WindowManager.Core
889     * @atomicservice
890     * @since 12
891     */
892    /**
893     * The color of the navigation bar.
894     *
895     * @type { ?string }
896     * @syscap SystemCapability.WindowManager.WindowManager.Core
897     * @crossplatform
898     * @atomicservice
899     * @since arkts {'1.1':'20', '1.2':'20'}
900     * @arkts 1.1&1.2
901     */
902
903    navigationBarColor?: string;
904
905    /**
906     * The light icon of the navigation bar.
907     *
908     * @syscap SystemCapability.WindowManager.WindowManager.Core
909     * @since 7
910     */
911    /**
912     * The light icon of the navigation bar.
913     *
914     * @type { ?boolean }
915     * @syscap SystemCapability.WindowManager.WindowManager.Core
916     * @atomicservice
917     * @since 12
918     */
919    /**
920     * The light icon of the navigation bar.
921     *
922     * @type { ?boolean }
923     * @syscap SystemCapability.WindowManager.WindowManager.Core
924     * @crossplatform
925     * @atomicservice
926     * @since arkts {'1.1':'20', '1.2':'20'}
927     * @arkts 1.1&1.2
928     */
929    isNavigationBarLightIcon?: boolean;
930
931    /**
932     * The content color of the navigation bar
933     *
934     * @syscap SystemCapability.WindowManager.WindowManager.Core
935     * @since 8
936     */
937    /**
938     * The content color of the navigation bar
939     *
940     * @type { ?string }
941     * @syscap SystemCapability.WindowManager.WindowManager.Core
942     * @atomicservice
943     * @since arkts {'1.1':'12', '1.2':'20'}
944     * @arkts 1.1&1.2
945     */
946    navigationBarContentColor?: string;
947
948    /**
949     * Enable the animation of the status bar.
950     *
951     * @type { ?boolean }
952     * @syscap SystemCapability.Window.SessionManager
953     * @atomicservice
954     * @since 12
955     */
956    /**
957     * Enable the animation of the status bar.
958     *
959     * @type { ?boolean }
960     * @syscap SystemCapability.Window.SessionManager
961     * @crossplatform
962     * @atomicservice
963     * @since arkts {'1.1':'20', '1.2':'20'}
964     * @arkts 1.1&1.2
965     */
966    enableStatusBarAnimation?: boolean;
967
968    /**
969     * Enable the animation of the navigation bar.
970     *
971     * @type { ?boolean }
972     * @syscap SystemCapability.Window.SessionManager
973     * @atomicservice
974     * @since arkts {'1.1':'12', '1.2':'20'}
975     * @arkts 1.1&1.2
976     */
977    enableNavigationBarAnimation?: boolean;
978  }
979
980  /**
981   * Properties of status bar.
982   *
983   * @interface StatusBarProperty
984   * @syscap SystemCapability.Window.SessionManager
985   * @atomicservice
986   * @since 18
987   */
988  interface StatusBarProperty {
989    /**
990     * The content color of the status bar.
991     *
992     * @type { string }
993     * @syscap SystemCapability.Window.SessionManager
994     * @atomicservice
995     * @since 18
996     */
997    contentColor: string;
998  }
999
1000  /**
1001   * Properties of status bar, it couldn't update automatically
1002   *
1003   * @interface SystemBarStyle
1004   * @syscap SystemCapability.WindowManager.WindowManager.Core
1005   * @atomicservice
1006   * @since arkts {'1.1':'12', '1.2':'20'}
1007   * @arkts 1.1&1.2
1008   */
1009  interface SystemBarStyle {
1010    /**
1011     * The content color of the status bar
1012     *
1013     * @type { ?string }
1014     * @syscap SystemCapability.WindowManager.WindowManager.Core
1015     * @atomicservice
1016     * @since arkts {'1.1':'12', '1.2':'20'}
1017     * @arkts 1.1&1.2
1018     */
1019    statusBarContentColor?: string;
1020  }
1021
1022  /**
1023   * System bar tint of region
1024   *
1025   * @interface SystemBarRegionTint
1026   * @syscap SystemCapability.WindowManager.WindowManager.Core
1027   * @systemapi Hide this for inner system use.
1028   * @since arkts {'1.1':'8', '1.2':'20'}
1029   * @arkts 1.1&1.2
1030   */
1031  interface SystemBarRegionTint {
1032    /**
1033     * System bar type
1034     *
1035     * @type { WindowType }
1036     * @syscap SystemCapability.WindowManager.WindowManager.Core
1037     * @systemapi Hide this for inner system use.
1038     * @since 8
1039     */
1040    type: WindowType;
1041
1042    /**
1043     * The visibility of system bar
1044     *
1045     * @type { ?boolean }
1046     * @syscap SystemCapability.WindowManager.WindowManager.Core
1047     * @systemapi Hide this for inner system use.
1048     * @since 8
1049     */
1050    isEnable?: boolean;
1051
1052    /**
1053     * The region of system bar
1054     *
1055     * @type { ?Rect }
1056     * @syscap SystemCapability.WindowManager.WindowManager.Core
1057     * @systemapi Hide this for inner system use.
1058     * @since 8
1059     */
1060    region?: Rect;
1061
1062    /**
1063     * The background color of the system bar.
1064     *
1065     * @type { ?string }
1066     * @syscap SystemCapability.WindowManager.WindowManager.Core
1067     * @systemapi Hide this for inner system use.
1068     * @since 8
1069     */
1070    backgroundColor?: string;
1071
1072    /**
1073     * The content color of the system bar.
1074     *
1075     * @type { ?string }
1076     * @syscap SystemCapability.WindowManager.WindowManager.Core
1077     * @systemapi Hide this for inner system use.
1078     * @since 8
1079     */
1080    contentColor?: string;
1081  }
1082
1083  /**
1084   * System bar tint state for systemui
1085   *
1086   * @interface SystemBarTintState
1087   * @syscap SystemCapability.WindowManager.WindowManager.Core
1088   * @systemapi Hide this for inner system use.
1089   * @since arkts {'1.1':'8', '1.2':'20'}
1090   * @arkts 1.1&1.2
1091   */
1092  interface SystemBarTintState {
1093    /**
1094     * Id of display
1095     *
1096     * @type { number }
1097     * @syscap SystemCapability.WindowManager.WindowManager.Core
1098     * @systemapi Hide this for inner system use.
1099     * @since 8
1100     */
1101    displayId: number;
1102    /**
1103     * Region tint of systembar
1104     *
1105     * @type { Array<SystemBarRegionTint> }
1106     * @syscap SystemCapability.WindowManager.WindowManager.Core
1107     * @systemapi Hide this for inner system use.
1108     * @since 8
1109     */
1110    regionTint: Array<SystemBarRegionTint>;
1111  }
1112
1113  /**
1114   * Rectangle
1115   *
1116   * @interface Rect
1117   * @syscap SystemCapability.WindowManager.WindowManager.Core
1118   * @since 7
1119   */
1120  /**
1121   * Rectangle
1122   *
1123   * @interface Rect
1124   * @syscap SystemCapability.WindowManager.WindowManager.Core
1125   * @crossplatform
1126   * @since 10
1127   */
1128  /**
1129   * Rectangle
1130   *
1131   * @interface Rect
1132   * @syscap SystemCapability.WindowManager.WindowManager.Core
1133   * @crossplatform
1134   * @atomicservice
1135   * @since arkts {'1.1':'11', '1.2':'20'}
1136   * @arkts 1.1&1.2
1137   */
1138  interface Rect {
1139
1140    /**
1141     * The left of the Rect.
1142     *
1143     * @syscap SystemCapability.WindowManager.WindowManager.Core
1144     * @since 7
1145     */
1146    /**
1147     * The left of the Rect.
1148     *
1149     * @syscap SystemCapability.WindowManager.WindowManager.Core
1150     * @crossplatform
1151     * @since 10
1152     */
1153    /**
1154     * The left of the Rect.
1155     *
1156     * @type { number }
1157     * @syscap SystemCapability.WindowManager.WindowManager.Core
1158     * @crossplatform
1159     * @atomicservice
1160     * @since arkts {'1.1':'11', '1.2':'20'}
1161     * @arkts 1.1&1.2
1162     */
1163    left: number;
1164
1165    /**
1166     * The top of the Rect.
1167     *
1168     * @syscap SystemCapability.WindowManager.WindowManager.Core
1169     * @since 7
1170     */
1171    /**
1172     * The top of the Rect.
1173     *
1174     * @syscap SystemCapability.WindowManager.WindowManager.Core
1175     * @crossplatform
1176     * @since 10
1177     */
1178    /**
1179     * The top of the Rect.
1180     *
1181     * @type { number }
1182     * @syscap SystemCapability.WindowManager.WindowManager.Core
1183     * @crossplatform
1184     * @atomicservice
1185     * @since arkts {'1.1':'11', '1.2':'20'}
1186     * @arkts 1.1&1.2
1187     */
1188    top: number;
1189
1190    /**
1191     * The width of the Rect.
1192     *
1193     * @syscap SystemCapability.WindowManager.WindowManager.Core
1194     * @since 7
1195     */
1196    /**
1197     * The width of the Rect.
1198     *
1199     * @syscap SystemCapability.WindowManager.WindowManager.Core
1200     * @crossplatform
1201     * @since 10
1202     */
1203    /**
1204     * The width of the Rect.
1205     *
1206     * @type { number }
1207     * @syscap SystemCapability.WindowManager.WindowManager.Core
1208     * @crossplatform
1209     * @atomicservice
1210     * @since arkts {'1.1':'11', '1.2':'20'}
1211     * @arkts 1.1&1.2
1212     */
1213    width: number;
1214
1215    /**
1216     * The height of the Rect.
1217     *
1218     * @syscap SystemCapability.WindowManager.WindowManager.Core
1219     * @since 7
1220     */
1221    /**
1222     * The height of the Rect.
1223     *
1224     * @syscap SystemCapability.WindowManager.WindowManager.Core
1225     * @crossplatform
1226     * @since 10
1227     */
1228    /**
1229     * The height of the Rect.
1230     *
1231     * @type { number }
1232     * @syscap SystemCapability.WindowManager.WindowManager.Core
1233     * @crossplatform
1234     * @atomicservice
1235     * @since arkts {'1.1':'11', '1.2':'20'}
1236     * @arkts 1.1&1.2
1237     */
1238    height: number;
1239  }
1240
1241  /**
1242   * Position
1243   *
1244   * @interface Position
1245   * @syscap SystemCapability.Window.SessionManager
1246   * @since 20
1247   */
1248  export interface Position {
1249
1250    /**
1251     * The X-coordinate
1252     *
1253     * @type { number }
1254     * @syscap SystemCapability.Window.SessionManager
1255     * @since 20
1256     */
1257    x: number;
1258
1259    /**
1260     * The Y-coordinate
1261     *
1262     * @type { number }
1263     * @syscap SystemCapability.Window.SessionManager
1264     * @since 20
1265     */
1266    y: number;
1267  }
1268
1269  /**
1270   * Enum for window anchor
1271   *
1272   * @enum { number }
1273   * @syscap SystemCapability.Window.SessionManager
1274   * @since 20
1275   */
1276  enum WindowAnchor {
1277    /**
1278     * The value means window top left corner.
1279     *
1280     * @syscap SystemCapability.Window.SessionManager
1281     * @since 20
1282     */
1283    TOP_START = 0,
1284    /**
1285     * The value means horizontal midpoint of the border on the window.
1286     *
1287     * @syscap SystemCapability.Window.SessionManager
1288     * @since 20
1289     */
1290    TOP = 1,
1291    /**
1292     * The value means window top right corner.
1293     *
1294     * @syscap SystemCapability.Window.SessionManager
1295     * @since 20
1296     */
1297    TOP_END = 2,
1298    /**
1299     * The value means vertical midpoint of the left border of the window.
1300     *
1301     * @syscap SystemCapability.Window.SessionManager
1302     * @since 20
1303     */
1304    START = 3,
1305    /**
1306     * The value means window horizontal and vertical midpoint.
1307     *
1308     * @syscap SystemCapability.Window.SessionManager
1309     * @since 20
1310     */
1311    CENTER = 4,
1312    /**
1313     * The value means vertical midpoint of the right border of the window.
1314     *
1315     * @syscap SystemCapability.Window.SessionManager
1316     * @since 20
1317     */
1318    END = 5,
1319    /**
1320     * The value means window bottom left corner.
1321     *
1322     * @syscap SystemCapability.Window.SessionManager
1323     * @since 20
1324     */
1325    BOTTOM_START = 6,
1326    /**
1327     * The value means horizontal midpoint of the lower border of the window.
1328     *
1329     * @syscap SystemCapability.Window.SessionManager
1330     * @since 20
1331     */
1332    BOTTOM = 7,
1333    /**
1334     * The value means window bottom right corner.
1335     *
1336     * @syscap SystemCapability.Window.SessionManager
1337     * @since 20
1338     */
1339    BOTTOM_END = 8,
1340  }
1341
1342  /**
1343   * Avoid area
1344   *
1345   * @interface AvoidArea
1346   * @syscap SystemCapability.WindowManager.WindowManager.Core
1347   * @since 7
1348   */
1349  /**
1350   * Avoid area
1351   *
1352   * @interface AvoidArea
1353   * @syscap SystemCapability.WindowManager.WindowManager.Core
1354   * @atomicservice
1355   * @since 11
1356   */
1357  /**
1358   * Avoid area
1359   *
1360   * @interface AvoidArea
1361   * @syscap SystemCapability.WindowManager.WindowManager.Core
1362   * @crossplatform
1363   * @atomicservice
1364   * @since arkts {'1.1':'12', '1.2':'20'}
1365   * @arkts 1.1&1.2
1366   */
1367  interface AvoidArea {
1368    /**
1369     * Whether avoidArea is visible on screen
1370     *
1371     * @type { boolean }
1372     * @syscap SystemCapability.WindowManager.WindowManager.Core
1373     * @since 9
1374     */
1375    /**
1376     * Whether avoidArea is visible on screen
1377     *
1378     * @type { boolean }
1379     * @syscap SystemCapability.WindowManager.WindowManager.Core
1380     * @atomicservice
1381     * @since arkts {'1.1':'11', '1.2':'20'}
1382     * @arkts 1.1&1.2
1383     */
1384    visible: boolean;
1385
1386    /**
1387     * Rectangle on the left of the screen
1388     *
1389     * @type { Rect }
1390     * @syscap SystemCapability.WindowManager.WindowManager.Core
1391     * @since 7
1392     */
1393    /**
1394     * Rectangle on the left of the screen
1395     *
1396     * @type { Rect }
1397     * @syscap SystemCapability.WindowManager.WindowManager.Core
1398     * @atomicservice
1399     * @since 11
1400     */
1401    /**
1402     * Rectangle on the left of the screen
1403     *
1404     * @type { Rect }
1405     * @syscap SystemCapability.WindowManager.WindowManager.Core
1406     * @crossplatform
1407     * @atomicservice
1408     * @since arkts {'1.1':'12', '1.2':'20'}
1409     * @arkts 1.1&1.2
1410     */
1411    leftRect: Rect;
1412
1413    /**
1414     * Rectangle on the top of the screen
1415     *
1416     * @type { Rect }
1417     * @syscap SystemCapability.WindowManager.WindowManager.Core
1418     * @since 7
1419     */
1420    /**
1421     * Rectangle on the top of the screen
1422     *
1423     * @type { Rect }
1424     * @syscap SystemCapability.WindowManager.WindowManager.Core
1425     * @atomicservice
1426     * @since 11
1427     */
1428    /**
1429     * Rectangle on the top of the screen
1430     *
1431     * @type { Rect }
1432     * @syscap SystemCapability.WindowManager.WindowManager.Core
1433     * @crossplatform
1434     * @atomicservice
1435     * @since arkts {'1.1':'12', '1.2':'20'}
1436     * @arkts 1.1&1.2
1437     */
1438    topRect: Rect;
1439
1440    /**
1441     * Rectangle on the right of the screen
1442     *
1443     * @type { Rect }
1444     * @syscap SystemCapability.WindowManager.WindowManager.Core
1445     * @since 7
1446     */
1447    /**
1448     * Rectangle on the right of the screen
1449     *
1450     * @type { Rect }
1451     * @syscap SystemCapability.WindowManager.WindowManager.Core
1452     * @atomicservice
1453     * @since 11
1454     */
1455    /**
1456     * Rectangle on the right of the screen
1457     *
1458     * @type { Rect }
1459     * @syscap SystemCapability.WindowManager.WindowManager.Core
1460     * @crossplatform
1461     * @atomicservice
1462     * @since arkts {'1.1':'12', '1.2':'20'}
1463     * @arkts 1.1&1.2
1464     */
1465    rightRect: Rect;
1466
1467    /**
1468     * Rectangle on the bottom of the screen
1469     *
1470     * @type { Rect }
1471     * @syscap SystemCapability.WindowManager.WindowManager.Core
1472     * @since 7
1473     */
1474    /**
1475     * Rectangle on the bottom of the screen
1476     *
1477     * @type { Rect }
1478     * @syscap SystemCapability.WindowManager.WindowManager.Core
1479     * @atomicservice
1480     * @since 11
1481     */
1482    /**
1483     * Rectangle on the bottom of the screen
1484     *
1485     * @type { Rect }
1486     * @syscap SystemCapability.WindowManager.WindowManager.Core
1487     * @crossplatform
1488     * @atomicservice
1489     * @since arkts {'1.1':'12', '1.2':'20'}
1490     * @arkts 1.1&1.2
1491     */
1492    bottomRect: Rect;
1493  }
1494
1495  /**
1496   * Window size
1497   *
1498   * @interface Size
1499   * @syscap SystemCapability.WindowManager.WindowManager.Core
1500   * @since 7
1501   */
1502  /**
1503   * Window size
1504   *
1505   * @interface Size
1506   * @syscap SystemCapability.WindowManager.WindowManager.Core
1507   * @crossplatform
1508   * @since 10
1509   */
1510  /**
1511   * Window size
1512   *
1513   * @interface Size
1514   * @syscap SystemCapability.WindowManager.WindowManager.Core
1515   * @crossplatform
1516   * @atomicservice
1517   * @since arkts {'1.1':'11', '1.2':'20'}
1518   * @arkts 1.1&1.2
1519   */
1520  interface Size {
1521    /**
1522     * The width of the window.
1523     *
1524     * @type { number }
1525     * @syscap SystemCapability.WindowManager.WindowManager.Core
1526     * @since 7
1527     */
1528    /**
1529     * The width of the window.
1530     *
1531     * @type { number }
1532     * @syscap SystemCapability.WindowManager.WindowManager.Core
1533     * @crossplatform
1534     * @since 10
1535     */
1536    /**
1537     * The width of the window.
1538     *
1539     * @type { number }
1540     * @syscap SystemCapability.WindowManager.WindowManager.Core
1541     * @crossplatform
1542     * @atomicservice
1543     * @since arkts {'1.1':'11', '1.2':'20'}
1544     * @arkts 1.1&1.2
1545     */
1546    width: number;
1547
1548    /**
1549     * The height of the window.
1550     *
1551     * @syscap SystemCapability.WindowManager.WindowManager.Core
1552     * @since 7
1553     */
1554    /**
1555     * The height of the window.
1556     *
1557     * @type { number }
1558     * @syscap SystemCapability.WindowManager.WindowManager.Core
1559     * @crossplatform
1560     * @since 10
1561     */
1562    /**
1563     * The height of the window.
1564     *
1565     * @type { number }
1566     * @syscap SystemCapability.WindowManager.WindowManager.Core
1567     * @crossplatform
1568     * @atomicservice
1569     * @since arkts {'1.1':'11', '1.2':'20'}
1570     * @arkts 1.1&1.2
1571     */
1572    height: number;
1573  }
1574
1575  /**
1576   * The info of window
1577   *
1578   * @interface WindowInfo
1579   * @syscap SystemCapability.Window.SessionManager
1580   * @systemapi
1581   * @since 12
1582   */
1583  /**
1584   * The info of window
1585   *
1586   * @interface WindowInfo
1587   * @syscap SystemCapability.Window.SessionManager
1588   * @since 18
1589   */
1590  interface WindowInfo {
1591    /**
1592     * The position and size of the window
1593     *
1594     * @type { Rect }
1595     * @syscap SystemCapability.Window.SessionManager
1596     * @systemapi
1597     * @since 12
1598     */
1599    /**
1600     * The position and size of the window
1601     *
1602     * @type { Rect }
1603     * @syscap SystemCapability.Window.SessionManager
1604     * @since arkts {'1.1':'18', '1.2':'20'}
1605     * @arkts 1.1&1.2
1606     */
1607    rect: Rect;
1608
1609    /**
1610     * Global display rect.
1611     *
1612     * @type { ?Rect }
1613     * @syscap SystemCapability.Window.SessionManager
1614     * @since 20
1615     */
1616    globalDisplayRect?: Rect;
1617
1618    /**
1619     * bundleName of window
1620     *
1621     * @type { string }
1622     * @syscap SystemCapability.Window.SessionManager
1623     * @systemapi
1624     * @since 12
1625     */
1626    /**
1627     * bundleName of window
1628     *
1629     * @type { string }
1630     * @syscap SystemCapability.Window.SessionManager
1631     * @since 18
1632     */
1633    bundleName: string;
1634
1635    /**
1636     * abilityName of window
1637     *
1638     * @type { string }
1639     * @syscap SystemCapability.Window.SessionManager
1640     * @systemapi
1641     * @since 12
1642     */
1643    /**
1644     * abilityName of window
1645     *
1646     * @type { string }
1647     * @syscap SystemCapability.Window.SessionManager
1648     * @since 18
1649     */
1650    abilityName: string;
1651
1652    /**
1653     * Indicates target window id.
1654     *
1655     * @type { number }
1656     * @syscap SystemCapability.Window.SessionManager
1657     * @systemapi
1658     * @since 12
1659     */
1660    /**
1661     * Indicates target window id.
1662     *
1663     * @type { number }
1664     * @syscap SystemCapability.Window.SessionManager
1665     * @since 18
1666     */
1667    windowId: number;
1668
1669    /**
1670     * The window status of an application.
1671     *
1672     * @type { WindowStatusType }
1673     * @syscap SystemCapability.Window.SessionManager
1674     * @systemapi
1675     * @since 12
1676     */
1677    /**
1678     * The window status of an application.
1679     *
1680     * @type { WindowStatusType }
1681     * @syscap SystemCapability.Window.SessionManager
1682     * @since 18
1683     */
1684    /**
1685     * The window status of an application.
1686     *
1687     * @type { WindowStatusType }
1688     * @syscap SystemCapability.Window.SessionManager
1689     * @crossplatform
1690     * @since 20
1691     */
1692    windowStatusType: WindowStatusType;
1693
1694    /**
1695     * Whether the window is focused. The default value is false.
1696     *
1697     * @type { ?boolean }
1698     * @syscap SystemCapability.Window.SessionManager
1699     * @systemapi
1700     * @since 14
1701     */
1702    /**
1703     * Whether the window is focused. The default value is false.
1704     *
1705     * @type { ?boolean }
1706     * @syscap SystemCapability.Window.SessionManager
1707     * @since 18
1708     */
1709    isFocused?: boolean;
1710  }
1711
1712  /**
1713   * The info of window density
1714   *
1715   * @interface WindowDensityInfo
1716   * @syscap SystemCapability.Window.SessionManager
1717   * @atomicservice
1718   * @since arkts {'1.1':'15', '1.2':'20'}
1719   * @arkts 1.1&1.2
1720   */
1721  interface WindowDensityInfo {
1722    /**
1723     * System density
1724     *
1725     * @type { number }
1726     * @syscap SystemCapability.Window.SessionManager
1727     * @atomicservice
1728     * @since arkts {'1.1':'15', '1.2':'20'}
1729     * @arkts 1.1&1.2
1730     */
1731    systemDensity: number;
1732
1733    /**
1734     * Default density
1735     *
1736     * @type { number }
1737     * @syscap SystemCapability.Window.SessionManager
1738     * @atomicservice
1739     * @since arkts {'1.1':'15', '1.2':'20'}
1740     * @arkts 1.1&1.2
1741     */
1742    defaultDensity: number;
1743
1744    /**
1745     * Custom density
1746     *
1747     * @type { number }
1748     * @syscap SystemCapability.Window.SessionManager
1749     * @atomicservice
1750     * @since arkts {'1.1':'15', '1.2':'20'}
1751     * @arkts 1.1&1.2
1752     */
1753    customDensity: number;
1754  }
1755
1756  /**
1757   * Properties of window, it couldn't update automatically
1758   *
1759   * @interface WindowProperties
1760   * @syscap SystemCapability.WindowManager.WindowManager.Core
1761   * @since 6
1762   */
1763  /**
1764   * Properties of window, it couldn't update automatically
1765   *
1766   * @interface WindowProperties
1767   * @syscap SystemCapability.WindowManager.WindowManager.Core
1768   * @crossplatform
1769   * @since 10
1770   */
1771  /**
1772   * Properties of window, it couldn't update automatically
1773   *
1774   * @interface WindowProperties
1775   * @syscap SystemCapability.WindowManager.WindowManager.Core
1776   * @crossplatform
1777   * @atomicservice
1778   * @since arkts {'1.1':'11', '1.2':'20'}
1779   * @arkts 1.1&1.2
1780   */
1781  interface WindowProperties {
1782    /**
1783     * The position and size of the window
1784     *
1785     * @type { Rect }
1786     * @syscap SystemCapability.WindowManager.WindowManager.Core
1787     * @since 7
1788     */
1789    /**
1790     * The position and size of the window
1791     *
1792     * @type { Rect }
1793     * @syscap SystemCapability.WindowManager.WindowManager.Core
1794     * @crossplatform
1795     * @since 10
1796     */
1797    /**
1798     * The position and size of the window
1799     *
1800     * @type { Rect }
1801     * @syscap SystemCapability.WindowManager.WindowManager.Core
1802     * @crossplatform
1803     * @atomicservice
1804     * @since arkts {'1.1':'11', '1.2':'20'}
1805     * @arkts 1.1&1.2
1806     */
1807    windowRect: Rect;
1808
1809    /**
1810     * The position relative to the window and size of drawable area
1811     *
1812     * @type { Rect }
1813     * @syscap SystemCapability.WindowManager.WindowManager.Core
1814     * @since 11
1815     */
1816    /**
1817     * The position relative to the window and size of drawable area
1818     *
1819     * @type { Rect }
1820     * @syscap SystemCapability.WindowManager.WindowManager.Core
1821     * @atomicservice
1822     * @since arkts {'1.1':'12', '1.2':'20'}
1823     * @arkts 1.1&1.2
1824     */
1825    drawableRect: Rect;
1826
1827    /**
1828     * Global display rect.
1829     *
1830     * @type { ?Rect }
1831     * @syscap SystemCapability.Window.SessionManager
1832     * @since 20
1833     */
1834    globalDisplayRect?: Rect;
1835
1836    /**
1837     * Window type
1838     *
1839     * @type { WindowType }
1840     * @syscap SystemCapability.WindowManager.WindowManager.Core
1841     * @since 7
1842     */
1843    /**
1844     * Window type
1845     *
1846     * @type { WindowType }
1847     * @syscap SystemCapability.WindowManager.WindowManager.Core
1848     * @atomicservice
1849     * @since arkts {'1.1':'12', '1.2':'20'}
1850     * @arkts 1.1&1.2
1851     */
1852    type: WindowType;
1853
1854    /**
1855     * Whether the window is displayed in full screen mode. The default value is false.
1856     *
1857     * @type { boolean }
1858     * @syscap SystemCapability.WindowManager.WindowManager.Core
1859     * @since 6
1860     */
1861    /**
1862     * Whether the window is displayed in full screen mode. The default value is false.
1863     *
1864     * @type { boolean }
1865     * @syscap SystemCapability.WindowManager.WindowManager.Core
1866     * @atomicservice
1867     * @since arkts {'1.1':'12', '1.2':'20'}
1868     * @arkts 1.1&1.2
1869     */
1870    isFullScreen: boolean;
1871
1872    /**
1873     * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false.
1874     *
1875     * @type { boolean }
1876     * @syscap SystemCapability.WindowManager.WindowManager.Core
1877     * @since 7
1878     */
1879    /**
1880     * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false.
1881     *
1882     * @type { boolean }
1883     * @syscap SystemCapability.WindowManager.WindowManager.Core
1884     * @atomicservice
1885     * @since arkts {'1.1':'12', '1.2':'20'}
1886     * @arkts 1.1&1.2
1887     */
1888    isLayoutFullScreen: boolean;
1889
1890    /**
1891     * Whether the window can gain focus. The default value is true
1892     *
1893     * @type { boolean }
1894     * @syscap SystemCapability.WindowManager.WindowManager.Core
1895     * @since 7
1896     */
1897    /**
1898     * Whether the window can gain focus. The default value is true
1899     *
1900     * @type { boolean }
1901     * @syscap SystemCapability.WindowManager.WindowManager.Core
1902     * @atomicservice
1903     * @since arkts {'1.1':'12', '1.2':'20'}
1904     * @arkts 1.1&1.2
1905     */
1906    focusable: boolean;
1907
1908    /**
1909     * Whether the window is touchable. The default value is false
1910     *
1911     * @type { boolean }
1912     * @syscap SystemCapability.WindowManager.WindowManager.Core
1913     * @since 7
1914     */
1915    /**
1916     * Whether the window is touchable. The default value is false
1917     *
1918     * @type { boolean }
1919     * @syscap SystemCapability.WindowManager.WindowManager.Core
1920     * @atomicservice
1921     * @since arkts {'1.1':'12', '1.2':'20'}
1922     * @arkts 1.1&1.2
1923     */
1924    touchable: boolean;
1925
1926    /**
1927     * Brightness value of window.
1928     *
1929     * @syscap SystemCapability.WindowManager.WindowManager.Core
1930     * @since 6
1931     */
1932    /**
1933     * Brightness value of window.
1934     *
1935     * @type { number }
1936     * @syscap SystemCapability.WindowManager.WindowManager.Core
1937     * @crossplatform
1938     * @since 10
1939     */
1940    /**
1941     * Brightness value of window.
1942     *
1943     * @type { number }
1944     * @syscap SystemCapability.WindowManager.WindowManager.Core
1945     * @crossplatform
1946     * @atomicservice
1947     * @since arkts {'1.1':'11', '1.2':'20'}
1948     * @arkts 1.1&1.2
1949     */
1950    brightness: number;
1951
1952    /**
1953     * The dimbehind value of window.
1954     *
1955     * @type { number }
1956     * @syscap SystemCapability.WindowManager.WindowManager.Core
1957     * @since 7
1958     * @deprecated since 9
1959     */
1960    dimBehindValue: number;
1961
1962    /**
1963     * Whether keep screen on.
1964     *
1965     * @syscap SystemCapability.WindowManager.WindowManager.Core
1966     * @since 6
1967     */
1968    /**
1969     * Whether keep screen on.
1970     *
1971     * @type { boolean }
1972     * @syscap SystemCapability.WindowManager.WindowManager.Core
1973     * @crossplatform
1974     * @since 10
1975     */
1976    /**
1977     * Whether keep screen on.
1978     *
1979     * @type { boolean }
1980     * @syscap SystemCapability.WindowManager.WindowManager.Core
1981     * @crossplatform
1982     * @atomicservice
1983     * @since arkts {'1.1':'11', '1.2':'20'}
1984     * @arkts 1.1&1.2
1985     */
1986    isKeepScreenOn: boolean;
1987
1988    /**
1989     * Whether make window in privacy mode or not.
1990     *
1991     * @type { boolean }
1992     * @syscap SystemCapability.WindowManager.WindowManager.Core
1993     * @since 7
1994     */
1995    /**
1996     * Whether make window in privacy mode or not.
1997     *
1998     * @type { boolean }
1999     * @syscap SystemCapability.WindowManager.WindowManager.Core
2000     * @atomicservice
2001     * @since arkts {'1.1':'12', '1.2':'20'}
2002     * @arkts 1.1&1.2
2003     */
2004    isPrivacyMode: boolean;
2005
2006    /**
2007     * Whether is round corner or not.
2008     *
2009     * @type { boolean }
2010     * @syscap SystemCapability.WindowManager.WindowManager.Core
2011     * @since 7
2012     * @deprecated since 9
2013     */
2014    isRoundCorner: boolean;
2015
2016    /**
2017     * Whether is transparent or not.
2018     *
2019     * @type { boolean }
2020     * @syscap SystemCapability.WindowManager.WindowManager.Core
2021     * @since 7
2022     */
2023    /**
2024     * Whether is transparent or not.
2025     *
2026     * @type { boolean }
2027     * @syscap SystemCapability.WindowManager.WindowManager.Core
2028     * @atomicservice
2029     * @since arkts {'1.1':'12', '1.2':'20'}
2030     * @arkts 1.1&1.2
2031     */
2032    isTransparent: boolean;
2033
2034    /**
2035     * Window id.
2036     *
2037     * @type { number }
2038     * @syscap SystemCapability.WindowManager.WindowManager.Core
2039     * @since 9
2040     */
2041    /**
2042     * Window id.
2043     *
2044     * @type { number }
2045     * @syscap SystemCapability.WindowManager.WindowManager.Core
2046     * @atomicservice
2047     * @since arkts {'1.1':'12', '1.2':'20'}
2048     * @arkts 1.1&1.2
2049     */
2050    id: number;
2051
2052    /**
2053     * display id.
2054     *
2055     * @type { ?number }
2056     * @syscap SystemCapability.WindowManager.WindowManager.Core
2057     * @atomicservice
2058     * @since arkts {'1.1':'12', '1.2':'20'}
2059     * @arkts 1.1&1.2
2060     */
2061    displayId?: number;
2062
2063    /**
2064     * window name.
2065     *
2066     * @type { ?string }
2067     * @syscap SystemCapability.WindowManager.WindowManager.Core
2068     * @atomicservice
2069     * @since arkts {'1.1':'18', '1.2':'20'}
2070     * @arkts 1.1&1.2
2071     */
2072    name?: string;
2073  }
2074
2075  /**
2076   * The decor button style of the window.
2077   *
2078   * @interface DecorButtonStyle
2079   * @syscap SystemCapability.Window.SessionManager
2080   * @atomicservice
2081   * @since arkts {'1.1':'14', '1.2':'20'}
2082   * @arkts 1.1&1.2
2083   */
2084  interface DecorButtonStyle {
2085    /**
2086     * color mode.
2087     *
2088     * @type { ?colorMode }
2089     * @syscap SystemCapability.Window.SessionManager
2090     * @atomicservice
2091     * @since 14
2092     */
2093    colorMode?: ConfigurationConstant.ColorMode;
2094
2095    /**
2096     * button background size when hover.
2097     *
2098     * @type { ?number }
2099     * @syscap SystemCapability.Window.SessionManager
2100     * @atomicservice
2101     * @since 14
2102     */
2103    buttonBackgroundSize? : number;
2104
2105    /**
2106     * button spacing.
2107     *
2108     * @type { ?number }
2109     * @syscap SystemCapability.Window.SessionManager
2110     * @atomicservice
2111     * @since 14
2112     */
2113    spacingBetweenButtons? : number;
2114
2115    /**
2116     * close button right Margin.
2117     *
2118     * @type { ?number }
2119     * @syscap SystemCapability.Window.SessionManager
2120     * @atomicservice
2121     * @since 14
2122     */
2123    closeButtonRightMargin? : number;
2124
2125    /**
2126     * button icon size.
2127     *
2128     * @type { ?number }
2129     * @syscap SystemCapability.Window.SessionManager
2130     * @atomicservice
2131     * @since 20
2132     */
2133    buttonIconSize? : number;
2134
2135    /**
2136     * corner radius of button background when hover.
2137     *
2138     * @type { ?number }
2139     * @syscap SystemCapability.Window.SessionManager
2140     * @atomicservice
2141     * @since 20
2142     */
2143    buttonBackgroundCornerRadius? : number;
2144  }
2145
2146  /**
2147   * Type of allowing the specified of color space.
2148   *
2149   * @enum { number }
2150   * @syscap SystemCapability.WindowManager.WindowManager.Core
2151   * @since 8
2152   */
2153  /**
2154   * Type of allowing the specified of color space.
2155   *
2156   * @enum { number }
2157   * @syscap SystemCapability.WindowManager.WindowManager.Core
2158   * @crossplatform
2159   * @since 11
2160   */
2161  /**
2162   * Type of allowing the specified of color space.
2163   *
2164   * @enum { number }
2165   * @syscap SystemCapability.WindowManager.WindowManager.Core
2166   * @crossplatform
2167   * @atomicservice
2168   * @since arkts {'1.1':'12', '1.2':'20'}
2169   * @arkts 1.1&1.2
2170   */
2171  enum ColorSpace {
2172    /**
2173     * Default color space.
2174     *
2175     * @syscap SystemCapability.WindowManager.WindowManager.Core
2176     * @since 8
2177     */
2178    /**
2179     * Default color space.
2180     *
2181     * @syscap SystemCapability.WindowManager.WindowManager.Core
2182     * @crossplatform
2183     * @since 11
2184     */
2185    /**
2186     * Default color space.
2187     *
2188     * @syscap SystemCapability.WindowManager.WindowManager.Core
2189     * @crossplatform
2190     * @atomicservice
2191     * @since arkts {'1.1':'12', '1.2':'20'}
2192     * @arkts 1.1&1.2
2193     */
2194    DEFAULT = 0,
2195    /**
2196     * Wide gamut color space. The specific wide color gamut depends on thr screen.
2197     *
2198     * @syscap SystemCapability.WindowManager.WindowManager.Core
2199     * @since 8
2200     */
2201    /**
2202     * Wide gamut color space. The specific wide color gamut depends on thr screen.
2203     *
2204     * @syscap SystemCapability.WindowManager.WindowManager.Core
2205     * @crossplatform
2206     * @since 11
2207     */
2208    /**
2209     * Wide gamut color space. The specific wide color gamut depends on thr screen.
2210     *
2211     * @syscap SystemCapability.WindowManager.WindowManager.Core
2212     * @crossplatform
2213     * @atomicservice
2214     * @since arkts {'1.1':'12', '1.2':'20'}
2215     * @arkts 1.1&1.2
2216     */
2217    WIDE_GAMUT = 1
2218  }
2219  /**
2220   * Describes the scale Transition Options of window
2221   *
2222   * @interface ScaleOptions
2223   * @syscap SystemCapability.WindowManager.WindowManager.Core
2224   * @systemapi
2225   * @since arkts {'1.1':'9', '1.2':'20'}
2226   * @arkts 1.1&1.2
2227   */
2228  interface ScaleOptions {
2229    /**
2230     * The scale param of x direction. Default is 1.f
2231     *
2232     * @type { ?number }
2233     * @syscap SystemCapability.WindowManager.WindowManager.Core
2234     * @systemapi
2235     * @since arkts {'1.1':'9', '1.2':'20'}
2236     * @arkts 1.1&1.2
2237     */
2238    x?: number;
2239
2240    /**
2241     * The scale param of y direction. Default is 1.f
2242     *
2243     * @type { ?number }
2244     * @syscap SystemCapability.WindowManager.WindowManager.Core
2245     * @systemapi
2246     * @since arkts {'1.1':'9', '1.2':'20'}
2247     * @arkts 1.1&1.2
2248     */
2249    y?: number;
2250
2251    /**
2252     * The scale param of pivot point of x. Default is 0.5f, Interval is 0.f - 1.f
2253     *
2254     * @type { ?number }
2255     * @syscap SystemCapability.WindowManager.WindowManager.Core
2256     * @systemapi
2257     * @since arkts {'1.1':'9', '1.2':'20'}
2258     * @arkts 1.1&1.2
2259     */
2260    pivotX?: number;
2261
2262    /**
2263     * The scale param of pivot point of y. Default is 0.5f, Interval is 0.f - 1.f
2264     *
2265     * @type { ?number }
2266     * @syscap SystemCapability.WindowManager.WindowManager.Core
2267     * @systemapi
2268     * @since arkts {'1.1':'9', '1.2':'20'}
2269     * @arkts 1.1&1.2
2270     */
2271    pivotY?: number;
2272  }
2273
2274  /**
2275   * Describes the rotate Transition Options of window
2276   *
2277   * @interface RotateOptions
2278   * @syscap SystemCapability.WindowManager.WindowManager.Core
2279   * @systemapi
2280   * @since arkts {'1.1':'9', '1.2':'20'}
2281   * @arkts 1.1&1.2
2282   */
2283  interface RotateOptions {
2284    /**
2285     * The rotate degree of x direction. Default value is 0.f
2286     *
2287     * @type { ?number }
2288     * @syscap SystemCapability.WindowManager.WindowManager.Core
2289     * @systemapi
2290     * @since arkts {'1.1':'9', '1.2':'20'}
2291     * @arkts 1.1&1.2
2292     */
2293    x?: number;
2294
2295    /**
2296     * The rotate degree of y direction. Default value is 0.f
2297     *
2298     * @type { ?number }
2299     * @syscap SystemCapability.WindowManager.WindowManager.Core
2300     * @systemapi
2301     * @since arkts {'1.1':'9', '1.2':'20'}
2302     * @arkts 1.1&1.2
2303     */
2304    y?: number;
2305
2306    /**
2307     * The rotate degree of z direction. Default value is 0.f
2308     *
2309     * @type { ?number }
2310     * @syscap SystemCapability.WindowManager.WindowManager.Core
2311     * @systemapi
2312     * @since arkts {'1.1':'9', '1.2':'20'}
2313     * @arkts 1.1&1.2
2314     */
2315    z?: number;
2316
2317    /**
2318     * The param of pivot point of x. Default is 0.5f, Interval is 0.f - 1.f
2319     *
2320     * @type { ?number }
2321     * @syscap SystemCapability.WindowManager.WindowManager.Core
2322     * @systemapi
2323     * @since arkts {'1.1':'9', '1.2':'20'}
2324     * @arkts 1.1&1.2
2325     */
2326    pivotX?: number;
2327
2328    /**
2329     * The param of pivot point of y. Default is 0.5f, Interval is 0.f - 1.f
2330     *
2331     * @type { ?number }
2332     * @syscap SystemCapability.WindowManager.WindowManager.Core
2333     * @systemapi
2334     * @since arkts {'1.1':'9', '1.2':'20'}
2335     * @arkts 1.1&1.2
2336     */
2337    pivotY?: number;
2338  }
2339
2340  /**
2341   * Describes the translate Transition Options of window
2342   *
2343   * @interface TranslateOptions
2344   * @syscap SystemCapability.WindowManager.WindowManager.Core
2345   * @systemapi
2346   * @since arkts {'1.1':'9', '1.2':'20'}
2347   * @arkts 1.1&1.2
2348   */
2349  interface TranslateOptions {
2350    /**
2351     * The translate pixel param of x direction. Default is 0.f
2352     *
2353     * @type { ?number }
2354     * @syscap SystemCapability.WindowManager.WindowManager.Core
2355     * @systemapi
2356     * @since arkts {'1.1':'9', '1.2':'20'}
2357     * @arkts 1.1&1.2
2358     */
2359    x?: number;
2360
2361    /**
2362     * The translate pixel param of y direction. Default is 0.f
2363     *
2364     * @type { ?number }
2365     * @syscap SystemCapability.WindowManager.WindowManager.Core
2366     * @systemapi
2367     * @since arkts {'1.1':'9', '1.2':'20'}
2368     * @arkts 1.1&1.2
2369     */
2370    y?: number;
2371
2372    /**
2373     * The translate pixel param of z direction. Default is 0.f
2374     *
2375     * @type { ?number }
2376     * @syscap SystemCapability.WindowManager.WindowManager.Core
2377     * @systemapi
2378     * @since arkts {'1.1':'9', '1.2':'20'}
2379     * @arkts 1.1&1.2
2380     */
2381    z?: number;
2382  }
2383
2384  /**
2385   * Transition Context
2386   *
2387   * @interface TransitionContext
2388   * @syscap SystemCapability.WindowManager.WindowManager.Core
2389   * @systemapi
2390   * @since arkts {'1.1':'9', '1.2':'20'}
2391   * @arkts 1.1&1.2
2392   */
2393  interface TransitionContext {
2394    /**
2395     * The target window with animation
2396     *
2397     * @type { Window }
2398     * @syscap SystemCapability.WindowManager.WindowManager.Core
2399     * @systemapi
2400     * @since arkts {'1.1':'9', '1.2':'20'}
2401     * @arkts 1.1&1.2
2402     */
2403    toWindow: Window;
2404
2405    /**
2406     * Set complete state of animation transition
2407     *
2408     * @param { boolean } isCompleted - Whether the transition is complete. The value true means that the transition is complete, and false means the opposite.
2409     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2410     *                                                                  2. Incorrect parameter types.
2411     * @syscap SystemCapability.WindowManager.WindowManager.Core
2412     * @systemapi
2413     * @since 9
2414     */
2415    /**
2416     * Set complete state of animation transition
2417     *
2418     * @param { boolean } isCompleted - Whether the transition is complete. The value true means that the transition is complete, and false means the opposite.
2419     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
2420     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2421     *                                                                  2. Incorrect parameter types.
2422     * @syscap SystemCapability.WindowManager.WindowManager.Core
2423     * @systemapi
2424     * @since arkts {'1.1':'12', '1.2':'20'}
2425     * @arkts 1.1&1.2
2426     */
2427    completeTransition(isCompleted: boolean): void;
2428  }
2429
2430  /**
2431   * Transition Controller
2432   *
2433   * @interface TransitionController
2434   * @syscap SystemCapability.WindowManager.WindowManager.Core
2435   * @systemapi
2436   * @since arkts {'1.1':'9', '1.2':'20'}
2437   * @arkts 1.1&1.2
2438   */
2439  interface TransitionController {
2440    /**
2441     * Animation configuration when showing window
2442     *
2443     * @param { TransitionContext } context - The transition context.
2444     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2445     *                                                                  2. Incorrect parameter types.
2446     * @syscap SystemCapability.WindowManager.WindowManager.Core
2447     * @systemapi
2448     * @since 9
2449     */
2450    /**
2451     * Animation configuration when showing window
2452     *
2453     * @param { TransitionContext } context - The transition context.
2454     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
2455     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2456     *                                                                  2. Incorrect parameter types.
2457     * @syscap SystemCapability.WindowManager.WindowManager.Core
2458     * @systemapi
2459     * @since arkts {'1.1':'12', '1.2':'20'}
2460     * @arkts 1.1&1.2
2461     */
2462    animationForShown(context: TransitionContext): void;
2463    /**
2464     * Animation configuration when hiding window
2465     *
2466     * @param { TransitionContext } context - The transition context.
2467     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2468     *                                                                  2. Incorrect parameter types.
2469     * @syscap SystemCapability.WindowManager.WindowManager.Core
2470     * @systemapi
2471     * @since 9
2472     */
2473    /**
2474     * Animation configuration when hiding window
2475     *
2476     * @param { TransitionContext } context - The transition context.
2477     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
2478     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2479     *                                                                  2. Incorrect parameter types.
2480     * @syscap SystemCapability.WindowManager.WindowManager.Core
2481     * @systemapi
2482     * @since arkts {'1.1':'12', '1.2':'20'}
2483     * @arkts 1.1&1.2
2484     */
2485    animationForHidden(context: TransitionContext): void;
2486  }
2487
2488  /**
2489   * Configuration parameters for window creation.
2490   *
2491   * @interface Configuration
2492   * @syscap SystemCapability.WindowManager.WindowManager.Core
2493   * @since 9
2494   */
2495  /**
2496   * Configuration parameters for window creation.
2497   *
2498   * @interface Configuration
2499   * @syscap SystemCapability.WindowManager.WindowManager.Core
2500   * @atomicservice
2501   * @since 12
2502   */
2503  interface Configuration {
2504    /**
2505     * Indicates window id.
2506     *
2507     * @syscap SystemCapability.WindowManager.WindowManager.Core
2508     * @since 9
2509     */
2510    /**
2511     * Indicates window id.
2512     *
2513     * @type { string }
2514     * @syscap SystemCapability.WindowManager.WindowManager.Core
2515     * @atomicservice
2516     * @since 12
2517     */
2518    name: string;
2519
2520    /**
2521     * Indicates window type
2522     *
2523     * @type { WindowType }
2524     * @syscap SystemCapability.WindowManager.WindowManager.Core
2525     * @since 9
2526     */
2527    /**
2528     * Indicates window type
2529     *
2530     * @type { WindowType }
2531     * @syscap SystemCapability.WindowManager.WindowManager.Core
2532     * @atomicservice
2533     * @since 12
2534     */
2535    windowType: WindowType;
2536
2537    /**
2538     * Indicates window context.
2539     *
2540     * @type { ?BaseContext }
2541     * @syscap SystemCapability.WindowManager.WindowManager.Core
2542     * @since 9
2543     */
2544    /**
2545     * Indicates window context.
2546     *
2547     * @type { ?BaseContext }
2548     * @syscap SystemCapability.WindowManager.WindowManager.Core
2549     * @atomicservice
2550     * @since 12
2551     */
2552    ctx?: BaseContext;
2553
2554    /**
2555     * Indicates display ID.
2556     *
2557     * @type { ?number }
2558     * @syscap SystemCapability.WindowManager.WindowManager.Core
2559     * @since 9
2560     */
2561    /**
2562     * Indicates display ID.
2563     *
2564     * @type { ?number }
2565     * @syscap SystemCapability.WindowManager.WindowManager.Core
2566     * @atomicservice
2567     * @since 12
2568     */
2569    displayId?: number;
2570
2571    /**
2572     * Indicates Parent window id
2573     *
2574     * @type { ?number }
2575     * @syscap SystemCapability.WindowManager.WindowManager.Core
2576     * @since 9
2577     */
2578    /**
2579     * Indicates Parent window id
2580     *
2581     * @type { ?number }
2582     * @syscap SystemCapability.WindowManager.WindowManager.Core
2583     * @atomicservice
2584     * @since 12
2585     */
2586    parentId?: number;
2587
2588    /**
2589     * Indicates whether enable window decor, only support dialog, The default value is false.
2590     *
2591     * @type { ?boolean }
2592     * @syscap SystemCapability.Window.SessionManager
2593     * @atomicservice
2594     * @since 12
2595     */
2596    decorEnabled?: boolean;
2597
2598    /**
2599     * Indicates dialog window title when decor enabled.
2600     *
2601     * @type { ?string }
2602     * @syscap SystemCapability.Window.SessionManager
2603     * @atomicservice
2604     * @since 12
2605     */
2606    title?: string;
2607
2608    /**
2609     * Indicates window container zIndex.
2610     *
2611     * @type { ?number }
2612     * @syscap SystemCapability.Window.SessionManager
2613     * @systemapi Hide this for inner system use.
2614     * @since 20
2615     */
2616    zIndex?: number;
2617
2618    /**
2619     * Indicates whether to use default density.
2620     *
2621     * @type { ?boolean }
2622     * @syscap SystemCapability.Window.SessionManager
2623     * @systemapi Hide this for inner system use.
2624     * @since 20
2625     */
2626    defaultDensityEnabled?: boolean;
2627  }
2628
2629  /**
2630   * Limits of window.
2631   *
2632   * @interface WindowLimits
2633   * @syscap SystemCapability.Window.SessionManager
2634   * @since 11
2635   */
2636  /**
2637   * Limits of window.
2638   *
2639   * @interface WindowLimits
2640   * @syscap SystemCapability.Window.SessionManager
2641   * @atomicservice
2642   * @since arkts {'1.1':'12', '1.2':'20'}
2643   * @arkts 1.1&1.2
2644   */
2645  interface WindowLimits {
2646
2647    /**
2648     * The maximum width of the window.
2649     *
2650     * @type { ?number }
2651     * @syscap SystemCapability.Window.SessionManager
2652     * @since 11
2653     */
2654    /**
2655     * The maximum width of the window.
2656     *
2657     * @type { ?number }
2658     * @syscap SystemCapability.Window.SessionManager
2659     * @atomicservice
2660     * @since arkts {'1.1':'12', '1.2':'20'}
2661     * @arkts 1.1&1.2
2662     */
2663    maxWidth?: number;
2664
2665    /**
2666     * The maximum height of the window.
2667     *
2668     * @type { ?number }
2669     * @syscap SystemCapability.Window.SessionManager
2670     * @since 11
2671     */
2672    /**
2673     * The maximum height of the window.
2674     *
2675     * @type { ?number }
2676     * @syscap SystemCapability.Window.SessionManager
2677     * @atomicservice
2678     * @since arkts {'1.1':'12', '1.2':'20'}
2679     * @arkts 1.1&1.2
2680     */
2681    maxHeight?: number;
2682
2683    /**
2684     * The minimum width of the window.
2685     *
2686     * @type { ?number }
2687     * @syscap SystemCapability.Window.SessionManager
2688     * @since 11
2689     */
2690    /**
2691     * The minimum width of the window.
2692     *
2693     * @type { ?number }
2694     * @syscap SystemCapability.Window.SessionManager
2695     * @atomicservice
2696     * @since arkts {'1.1':'12', '1.2':'20'}
2697     * @arkts 1.1&1.2
2698     */
2699    minWidth?: number;
2700
2701    /**
2702     * The minimum height of the window.
2703     *
2704     * @type { ?number }
2705     * @syscap SystemCapability.Window.SessionManager
2706     * @since 11
2707     */
2708    /**
2709     * The minimum height of the window.
2710     *
2711     * @type { ?number }
2712     * @syscap SystemCapability.Window.SessionManager
2713     * @atomicservice
2714     * @since arkts {'1.1':'12', '1.2':'20'}
2715     * @arkts 1.1&1.2
2716     */
2717    minHeight?: number;
2718  }
2719
2720  /**
2721   * Rectangular area of the title buttons relative to the upper right corner of the window.
2722   *
2723   * @interface TitleButtonRect
2724   * @syscap SystemCapability.Window.SessionManager
2725   * @since 11
2726   */
2727  /**
2728   * Rectangular area of the title buttons relative to the upper right corner of the window.
2729   *
2730   * @interface TitleButtonRect
2731   * @syscap SystemCapability.Window.SessionManager
2732   * @atomicservice
2733   * @since arkts {'1.1':'12', '1.2':'20'}
2734   * @arkts 1.1&1.2
2735   */
2736  interface TitleButtonRect {
2737
2738    /**
2739     * The right of the Rect.
2740     *
2741     * @type { number }
2742     * @syscap SystemCapability.Window.SessionManager
2743     * @since 11
2744     */
2745    /**
2746     * The right of the Rect.
2747     *
2748     * @type { number }
2749     * @syscap SystemCapability.Window.SessionManager
2750     * @atomicservice
2751     * @since 12
2752     */
2753    right: number;
2754
2755    /**
2756     * The top of the Rect.
2757     *
2758     * @type { number }
2759     * @syscap SystemCapability.Window.SessionManager
2760     * @since 11
2761     */
2762    /**
2763     * The top of the Rect.
2764     *
2765     * @type { number }
2766     * @syscap SystemCapability.Window.SessionManager
2767     * @atomicservice
2768     * @since 12
2769     */
2770    top: number;
2771
2772    /**
2773     * The width of the Rect.
2774     *
2775     * @type { number }
2776     * @syscap SystemCapability.Window.SessionManager
2777     * @since 11
2778     */
2779    /**
2780     * The width of the Rect.
2781     *
2782     * @type { number }
2783     * @syscap SystemCapability.Window.SessionManager
2784     * @atomicservice
2785     * @since arkts {'1.1':'12', '1.2':'20'}
2786     * @arkts 1.1&1.2
2787     */
2788    width: number;
2789
2790    /**
2791     * The height of the Rect.
2792     *
2793     * @type { number }
2794     * @syscap SystemCapability.Window.SessionManager
2795     * @since 11
2796     */
2797    /**
2798     * The height of the Rect.
2799     *
2800     * @type { number }
2801     * @syscap SystemCapability.Window.SessionManager
2802     * @atomicservice
2803     * @since 12
2804     */
2805    height: number;
2806  }
2807
2808  /**
2809   * Rect change options
2810   *
2811   * @interface RectChangeOptions
2812   * @syscap SystemCapability.Window.SessionManager
2813   * @atomicservice
2814   * @since arkts {'1.1':'12', '1.2':'20'}
2815   * @arkts 1.1&1.2
2816   */
2817  interface RectChangeOptions {
2818    /**
2819     * Rect
2820     *
2821     * @type { Rect }
2822     * @syscap SystemCapability.Window.SessionManager
2823     * @atomicservice
2824     * @since 12
2825     */
2826    rect: Rect,
2827
2828    /**
2829     * Rect change reason
2830     *
2831     * @type { RectChangeReason }
2832     * @syscap SystemCapability.Window.SessionManager
2833     * @atomicservice
2834     * @since arkts {'1.1':'12', '1.2':'20'}
2835     * @arkts 1.1&1.2
2836     */
2837    reason: RectChangeReason
2838  }
2839
2840  /**
2841   * Avoid area options
2842   *
2843   * @interface AvoidAreaOptions
2844   * @syscap SystemCapability.WindowManager.WindowManager.Core
2845   * @atomicservice
2846   * @since 12
2847   */
2848  /**
2849   * Avoid area options
2850   *
2851   * @interface AvoidAreaOptions
2852   * @syscap SystemCapability.WindowManager.WindowManager.Core
2853   * @crossplatform
2854   * @atomicservice
2855   * @since arkts {'1.1':'20', '1.2':'20'}
2856   * @arkts 1.1&1.2
2857   */
2858  interface AvoidAreaOptions {
2859    /**
2860     * Avoid area type
2861     *
2862     * @type { AvoidAreaType }
2863     * @syscap SystemCapability.WindowManager.WindowManager.Core
2864     * @atomicservice
2865     * @since 12
2866     */
2867    /**
2868     * Avoid area type
2869     *
2870     * @type { AvoidAreaType }
2871     * @syscap SystemCapability.WindowManager.WindowManager.Core
2872     * @crossplatform
2873     * @atomicservice
2874     * @since arkts {'1.1':'20', '1.2':'20'}
2875     * @arkts 1.1&1.2
2876     */
2877    type: AvoidAreaType,
2878
2879    /**
2880     * Avoid area
2881     *
2882     * @type { AvoidArea }
2883     * @syscap SystemCapability.WindowManager.WindowManager.Core
2884     * @atomicservice
2885     * @since 12
2886     */
2887    /**
2888     * Avoid area
2889     *
2890     * @type { AvoidArea }
2891     * @syscap SystemCapability.WindowManager.WindowManager.Core
2892     * @crossplatform
2893     * @atomicservice
2894     * @since arkts {'1.1':'20', '1.2':'20'}
2895     * @arkts 1.1&1.2
2896     */
2897    area: AvoidArea
2898  }
2899
2900  /**
2901   * Window rect change reason.
2902   *
2903   * @enum { number }
2904   * @syscap SystemCapability.Window.SessionManager
2905   * @atomicservice
2906   * @since arkts {'1.1':'12', '1.2':'20'}
2907   * @arkts 1.1&1.2
2908   */
2909  enum RectChangeReason {
2910    /**
2911     * Default RectChangeReason.
2912     *
2913     * @syscap SystemCapability.Window.SessionManager
2914     * @atomicservice
2915     * @since arkts {'1.1':'12', '1.2':'20'}
2916     * @arkts 1.1&1.2
2917     */
2918    UNDEFINED = 0,
2919
2920    /**
2921     * Window maximize.
2922     *
2923     * @syscap SystemCapability.Window.SessionManager
2924     * @atomicservice
2925     * @since arkts {'1.1':'12', '1.2':'20'}
2926     * @arkts 1.1&1.2
2927     */
2928    MAXIMIZE = 1,
2929
2930    /**
2931     * Window recover.
2932     *
2933     * @syscap SystemCapability.Window.SessionManager
2934     * @atomicservice
2935     * @since arkts {'1.1':'12', '1.2':'20'}
2936     * @arkts 1.1&1.2
2937     */
2938    RECOVER = 2,
2939
2940    /**
2941     * Window move.
2942     *
2943     * @syscap SystemCapability.Window.SessionManager
2944     * @atomicservice
2945     * @since arkts {'1.1':'12', '1.2':'20'}
2946     * @arkts 1.1&1.2
2947     */
2948    MOVE = 3,
2949
2950    /**
2951     * Window drag.
2952     *
2953     * @syscap SystemCapability.Window.SessionManager
2954     * @atomicservice
2955     * @since arkts {'1.1':'12', '1.2':'20'}
2956     * @arkts 1.1&1.2
2957     */
2958    DRAG = 4,
2959
2960    /**
2961     * Window drag start.
2962     *
2963     * @syscap SystemCapability.Window.SessionManager
2964     * @atomicservice
2965     * @since arkts {'1.1':'12', '1.2':'20'}
2966     * @arkts 1.1&1.2
2967     */
2968    DRAG_START = 5,
2969
2970    /**
2971     * Window drag end.
2972     *
2973     * @syscap SystemCapability.Window.SessionManager
2974     * @atomicservice
2975     * @since arkts {'1.1':'12', '1.2':'20'}
2976     * @arkts 1.1&1.2
2977     */
2978    DRAG_END = 6,
2979  }
2980
2981  /**
2982   * Create a window with a specific configuration
2983   *
2984   * @param { Configuration } config - Parameters for window creation.
2985   * @param { AsyncCallback<Window> } callback - Callback used to return the window created.
2986   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
2987   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
2988   *                                                                  2. Incorrect parameter types.
2989   * @throws { BusinessError } 1300001 - Repeated operation.
2990   * @throws { BusinessError } 1300006 - This window context is abnormal.
2991   * @throws { BusinessError } 1300008 - The display device is abnormal.
2992   * @throws { BusinessError } 1300009 - The parent window is invalid.
2993   * @syscap SystemCapability.WindowManager.WindowManager.Core
2994   * @since 9
2995   */
2996  /**
2997   * Create a window with a specific configuration
2998   * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required
2999   *
3000   * @permission ohos.permission.SYSTEM_FLOAT_WINDOW
3001   * @param { Configuration } config - Parameters for window creation.
3002   * @param { AsyncCallback<Window> } callback - Callback used to return the window created.
3003   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
3004   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3005   *                                                                  2. Incorrect parameter types.
3006   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3007   * @throws { BusinessError } 1300001 - Repeated operation.
3008   * @throws { BusinessError } 1300002 - This window state is abnormal.
3009   * @throws { BusinessError } 1300004 - Unauthorized operation.
3010   * @throws { BusinessError } 1300006 - This window context is abnormal.
3011   * @throws { BusinessError } 1300008 - The display device is abnormal.
3012   * @throws { BusinessError } 1300009 - The parent window is invalid.
3013   * @syscap SystemCapability.WindowManager.WindowManager.Core
3014   * @atomicservice
3015   * @since 12
3016   */
3017  /**
3018   * Creates a child window or system window. This API uses an asynchronous callback to return the result.
3019   *
3020   * @permission ohos.permission.SYSTEM_FLOAT_WINDOW
3021   * @param { Configuration } config - Parameters used for creating the window.
3022   * @param { AsyncCallback<Window> } callback - Callback used to return the window created.
3023   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
3024   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3025   *                                                                  2. Incorrect parameter types.
3026   * @throws { BusinessError } 801 - Capability not supported.createWindow can not work correctly due to limited device capabilities.
3027   * @throws { BusinessError } 1300001 - Repeated operation.
3028   * @throws { BusinessError } 1300002 - This window state is abnormal.
3029   * @throws { BusinessError } 1300004 - Unauthorized operation.
3030   * @throws { BusinessError } 1300006 - This window context is abnormal.
3031   * @throws { BusinessError } 1300009 - The parent window is invalid.
3032   * @syscap SystemCapability.WindowManager.WindowManager.Core
3033   * @atomicservice
3034   * @since 17
3035   */
3036  function createWindow(config: Configuration, callback: AsyncCallback<Window>): void;
3037
3038  /**
3039   * Create a window with a specific configuration
3040   *
3041   * @param { Configuration } config - Parameters for window creation.
3042   * @returns { Promise<Window> } Promise used to return the window created.
3043   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
3044   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3045   *                                                                  2. Incorrect parameter types.
3046   * @throws { BusinessError } 1300001 - Repeated operation.
3047   * @throws { BusinessError } 1300006 - This window context is abnormal.
3048   * @throws { BusinessError } 1300008 - The display device is abnormal.
3049   * @throws { BusinessError } 1300009 - The parent window is invalid.
3050   * @syscap SystemCapability.WindowManager.WindowManager.Core
3051   * @since 9
3052   */
3053  /**
3054   * Create a window with a specific configuration
3055   * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required
3056   *
3057   * @permission ohos.permission.SYSTEM_FLOAT_WINDOW
3058   * @param { Configuration } config - Parameters for window creation.
3059   * @returns { Promise<Window> } Promise used to return the window created.
3060   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
3061   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3062   *                                                                  2. Incorrect parameter types.
3063   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3064   * @throws { BusinessError } 1300001 - Repeated operation.
3065   * @throws { BusinessError } 1300002 - This window state is abnormal.
3066   * @throws { BusinessError } 1300004 - Unauthorized operation.
3067   * @throws { BusinessError } 1300006 - This window context is abnormal.
3068   * @throws { BusinessError } 1300008 - The display device is abnormal.
3069   * @throws { BusinessError } 1300009 - The parent window is invalid.
3070   * @syscap SystemCapability.WindowManager.WindowManager.Core
3071   * @atomicservice
3072   * @since 12
3073   */
3074  /**
3075   * Create a window with a specific configuration
3076   * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required
3077   *
3078   * @permission ohos.permission.SYSTEM_FLOAT_WINDOW
3079   * @param { Configuration } config - Parameters for window creation.
3080   * @returns { Promise<Window> } Promise used to return the window created.
3081   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
3082   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3083   *                                                                  2. Incorrect parameter types.
3084   * @throws { BusinessError } 801 - Capability not supported.createWindow can not work correctly due to limited device capabilities.
3085   * @throws { BusinessError } 1300001 - Repeated operation.
3086   * @throws { BusinessError } 1300002 - This window state is abnormal.
3087   * @throws { BusinessError } 1300004 - Unauthorized operation.
3088   * @throws { BusinessError } 1300006 - This window context is abnormal.
3089   * @throws { BusinessError } 1300009 - The parent window is invalid.
3090   * @syscap SystemCapability.WindowManager.WindowManager.Core
3091   * @atomicservice
3092   * @since 17
3093   */
3094  function createWindow(config: Configuration): Promise<Window>;
3095
3096  /**
3097   * Create a sub window with a specific id and type, only support 7.
3098   *
3099   * @param { string } id - Indicates window id.
3100   * @param { WindowType } type - Indicates window type.
3101   * @param { AsyncCallback<Window> } callback - Callback used to return the subwindow created.
3102   * @syscap SystemCapability.WindowManager.WindowManager.Core
3103   * @FAModelOnly
3104   * @since 7
3105   * @deprecated since 9
3106   * @useinstead ohos.window#createWindow
3107   */
3108  function create(id: string, type: WindowType, callback: AsyncCallback<Window>): void;
3109
3110  /**
3111   * Create a sub window with a specific id and type, only support 7.
3112   *
3113   * @param { string } id - Indicates window id.
3114   * @param { WindowType } type - Indicates window type.
3115   * @returns { Promise<Window> } Promise used to return the subwindow created.
3116   * @syscap SystemCapability.WindowManager.WindowManager.Core
3117   * @FAModelOnly
3118   * @since 7
3119   * @deprecated since 9
3120   * @useinstead ohos.window#createWindow
3121   */
3122  function create(id: string, type: WindowType): Promise<Window>;
3123
3124  /**
3125   * Create a system or float window with a specific id and type.
3126   *
3127   * @param { BaseContext } ctx - Indicates the context on which the window depends
3128   * @param { string } id - Indicates window id.
3129   * @param { WindowType } type - Indicates window type.
3130   * @returns { Promise<Window> } Promise used to return the window created.
3131   * @syscap SystemCapability.WindowManager.WindowManager.Core
3132   * @since 8
3133   * @deprecated since 9
3134   * @useinstead ohos.window#createWindow
3135   */
3136  function create(ctx: BaseContext, id: string, type: WindowType): Promise<Window>;
3137
3138  /**
3139   * Create a system or float window with a specific id and type.
3140   *
3141   * @param { BaseContext } ctx - Indicates the context on which the window depends
3142   * @param { string } id - Indicates window id.
3143   * @param { WindowType } type - Indicates window type.
3144   * @param { AsyncCallback<Window> } callback - Callback used to return the window created.
3145   * @syscap SystemCapability.WindowManager.WindowManager.Core
3146   * @since 8
3147   * @deprecated since 9
3148   * @useinstead ohos.window#createWindow
3149   */
3150  function create(ctx: BaseContext, id: string, type: WindowType, callback: AsyncCallback<Window>): void;
3151
3152  /**
3153   * Find the window by id.
3154   *
3155   * @param { string } id - Indicates window id.
3156   * @param { AsyncCallback<Window> } callback - Callback used to return the window found.
3157   * @syscap SystemCapability.WindowManager.WindowManager.Core
3158   * @since 7
3159   * @deprecated since 9
3160   * @useinstead ohos.window#findWindow
3161   */
3162  function find(id: string, callback: AsyncCallback<Window>): void;
3163
3164  /**
3165   * Find the window by id.
3166   *
3167   * @param { string } id - Indicates window id.
3168   * @returns { Promise<Window> } Window found.
3169   * @syscap SystemCapability.WindowManager.WindowManager.Core
3170   * @since 7
3171   * @deprecated since 9
3172   * @useinstead ohos.window#findWindow
3173   */
3174  function find(id: string): Promise<Window>;
3175
3176  /**
3177   * Find the window by name.
3178   *
3179   * @param { string } name - Indicates window name.
3180   * @returns { Window } Window found.
3181   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3182   *                                                                  2. Incorrect parameter types.
3183   * @throws { BusinessError } 1300002 - This window state is abnormal.
3184   * @syscap SystemCapability.WindowManager.WindowManager.Core
3185   * @since 9
3186   */
3187  /**
3188   * Find the window by name.
3189   *
3190   * @param { string } name - Indicates window name.
3191   * @returns { Window } Window found.
3192   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3193   *                                                                  2. Incorrect parameter types.
3194   * @throws { BusinessError } 1300002 - This window state is abnormal.
3195   * @syscap SystemCapability.WindowManager.WindowManager.Core
3196   * @crossplatform
3197   * @since 10
3198   */
3199  /**
3200   * Finds a window based on the name.
3201   *
3202   * @param { string } name - Window name, that is, the value of name in Configuration.
3203   * @returns { Window } Window found.
3204   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3205   *                                                                  2. Incorrect parameter types.
3206   * @throws { BusinessError } 1300002 - This window state is abnormal.
3207   * @syscap SystemCapability.WindowManager.WindowManager.Core
3208   * @crossplatform
3209   * @atomicservice
3210   * @since arkts {'1.1':'11', '1.2':'20'}
3211   * @arkts 1.1&1.2
3212   */
3213  function findWindow(name: string): Window;
3214
3215  /**
3216   * Get the final show window.
3217   *
3218   * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained.
3219   * @syscap SystemCapability.WindowManager.WindowManager.Core
3220   * @FAModelOnly
3221   * @since 6
3222   * @deprecated since 9
3223   * @useinstead ohos.window#getLastWindow
3224   */
3225  function getTopWindow(callback: AsyncCallback<Window>): void;
3226
3227  /**
3228   * Get the final show window.
3229   *
3230   * @returns { Promise<Window> } Promise used to return the top window obtained.
3231   * @syscap SystemCapability.WindowManager.WindowManager.Core
3232   * @FAModelOnly
3233   * @since 6
3234   * @deprecated since 9
3235   * @useinstead ohos.window#getLastWindow
3236   */
3237  function getTopWindow(): Promise<Window>;
3238
3239  /**
3240   * Get the final show window.
3241   *
3242   * @param { BaseContext } ctx - Indicates the context on which the window depends
3243   * @returns { Promise<Window> } Promise used to return the top window obtained.
3244   * @syscap SystemCapability.WindowManager.WindowManager.Core
3245   * @since 8
3246   * @deprecated since 9
3247   * @useinstead ohos.window#getLastWindow
3248   */
3249  function getTopWindow(ctx: BaseContext): Promise<Window>;
3250
3251  /**
3252   * Get the final show window.
3253   *
3254   * @param { BaseContext } ctx - Indicates the context on which the window depends
3255   * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained.
3256   * @syscap SystemCapability.WindowManager.WindowManager.Core
3257   * @since 8
3258   * @deprecated since 9
3259   * @useinstead ohos.window#getLastWindow
3260   */
3261  function getTopWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void;
3262
3263  /**
3264   * Get the final show window.
3265   *
3266   * @param { BaseContext } ctx - Current application context.
3267   * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained.
3268   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3269   *                                                                  2. Incorrect parameter types.
3270   * @throws { BusinessError } 1300002 - This window state is abnormal.
3271   * @throws { BusinessError } 1300006 - This window context is abnormal.
3272   * @syscap SystemCapability.WindowManager.WindowManager.Core
3273   * @since 9
3274   */
3275  /**
3276   * Get the final show window.
3277   *
3278   * @param { BaseContext } ctx - Current application context.
3279   * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained.
3280   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3281   *                                                                  2. Incorrect parameter types.
3282   * @throws { BusinessError } 1300002 - This window state is abnormal.
3283   * @throws { BusinessError } 1300006 - This window context is abnormal.
3284   * @syscap SystemCapability.WindowManager.WindowManager.Core
3285   * @crossplatform
3286   * @since 10
3287   */
3288  /**
3289   * Obtains the top window of the current application. This API uses an asynchronous callback to return the result.
3290   * If no child window is available, the main window of the application is returned.
3291   *
3292   * @param { BaseContext } ctx - Current application context.
3293   * @param { AsyncCallback<Window> } callback - Callback used to return the top window obtained.
3294   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3295   *                                                                  2. Incorrect parameter types.
3296   * @throws { BusinessError } 1300002 - This window state is abnormal. Top window or main window is null or destroyed.
3297   * @throws { BusinessError } 1300006 - This window context is abnormal.
3298   * @syscap SystemCapability.WindowManager.WindowManager.Core
3299   * @crossplatform
3300   * @atomicservice
3301   * @since arkts {'1.1':'12', '1.2':'20'}
3302   * @arkts 1.1&1.2
3303   */
3304  function getLastWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void;
3305
3306  /**
3307   * Get the final show window.
3308   *
3309   * @param { BaseContext } ctx - Current application context.
3310   * @returns { Promise<Window> } Promise used to return the top window obtained.
3311   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3312   *                                                                  2. Incorrect parameter types.
3313   * @throws { BusinessError } 1300002 - This window state is abnormal.
3314   * @throws { BusinessError } 1300006 - This window context is abnormal.
3315   * @syscap SystemCapability.WindowManager.WindowManager.Core
3316   * @since 9
3317   */
3318  /**
3319   * Get the final show window.
3320   *
3321   * @param { BaseContext } ctx - Current application context.
3322   * @returns { Promise<Window> } Promise used to return the top window obtained.
3323   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3324   *                                                                  2. Incorrect parameter types.
3325   * @throws { BusinessError } 1300002 - This window state is abnormal.
3326   * @throws { BusinessError } 1300006 - This window context is abnormal.
3327   * @syscap SystemCapability.WindowManager.WindowManager.Core
3328   * @crossplatform
3329   * @since 10
3330   */
3331  /**
3332   * Obtains the top window of the current application. This API uses a promise to return the result.
3333   * If no child window is available, the main window of the application is returned.
3334   *
3335   * @param { BaseContext } ctx - Current application context.
3336   * @returns { Promise<Window> } Promise used to return the top window obtained.
3337   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3338   *                                                                  2. Incorrect parameter types.
3339   * @throws { BusinessError } 1300002 - This window state is abnormal. Top window or main window is null or destroyed.
3340   * @throws { BusinessError } 1300006 - This window context is abnormal.
3341   * @syscap SystemCapability.WindowManager.WindowManager.Core
3342   * @crossplatform
3343   * @atomicservice
3344   * @since arkts {'1.1':'12', '1.2':'20'}
3345   * @arkts 1.1&1.2
3346   */
3347  function getLastWindow(ctx: BaseContext): Promise<Window>;
3348
3349  /**
3350   * Minimize all app windows.
3351   *
3352   * @param { number } id - ID of the display.
3353   * @param { AsyncCallback<void> } callback - Callback used to return the result.
3354   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3355   *                                                                  2. Incorrect parameter types;
3356   *                                                                  3. Parameter verification failed.
3357   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3358   * @syscap SystemCapability.WindowManager.WindowManager.Core
3359   * @systemapi Hide this for inner system use.
3360   * @since 9
3361   */
3362  /**
3363   * Minimize all app windows.
3364   *
3365   * @param { number } id - ID of the display.
3366   * @param { AsyncCallback<void> } callback - Callback used to return the result.
3367   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3368   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3369   *                                                                  2. Incorrect parameter types;
3370   *                                                                  3. Parameter verification failed.
3371   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3372   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3373   * @syscap SystemCapability.WindowManager.WindowManager.Core
3374   * @systemapi Hide this for inner system use.
3375   * @since arkts {'1.1':'12', '1.2':'20'}
3376   * @arkts 1.1&1.2
3377   */
3378  function minimizeAll(id: number, callback: AsyncCallback<void>): void;
3379
3380  /**
3381   * Minimize all app windows.
3382   *
3383   * @param { number } id - ID of the display.
3384   * @returns { Promise<void> } Promise that returns no value.
3385   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3386   *                                                                  2. Incorrect parameter types;
3387   *                                                                  3. Parameter verification failed.
3388   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3389   * @syscap SystemCapability.WindowManager.WindowManager.Core
3390   * @systemapi Hide this for inner system use.
3391   * @since 9
3392   */
3393  /**
3394   * Minimize all app windows.
3395   *
3396   * @param { number } id - ID of the display.
3397   * @returns { Promise<void> } Promise that returns no value.
3398   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3399   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3400   *                                                                  2. Incorrect parameter types;
3401   *                                                                  3. Parameter verification failed.
3402   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3403   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3404   * @syscap SystemCapability.WindowManager.WindowManager.Core
3405   * @systemapi Hide this for inner system use.
3406   * @since arkts {'1.1':'12', '1.2':'20'}
3407   * @arkts 1.1&1.2
3408   */
3409  function minimizeAll(id: number): Promise<void>;
3410
3411  /**
3412   * Toggle shown state for all app windows. Minimize or restore all app windows.
3413   *
3414   * @param { AsyncCallback<void> } callback - Callback used to return the result.
3415   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3416   * @syscap SystemCapability.WindowManager.WindowManager.Core
3417   * @systemapi Hide this for inner system use.
3418   * @since 9
3419   */
3420  /**
3421   * Toggle shown state for all app windows. Minimize or restore all app windows.
3422   *
3423   * @param { AsyncCallback<void> } callback - Callback used to return the result.
3424   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3425   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3426   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3427   * @syscap SystemCapability.WindowManager.WindowManager.Core
3428   * @systemapi Hide this for inner system use.
3429   * @since 12
3430   */
3431  function toggleShownStateForAllAppWindows(callback: AsyncCallback<void>): void;
3432
3433  /**
3434   * Toggle shown state for all app windows. Minimize or restore all app windows.
3435   *
3436   * @returns { Promise<void> } Promise that returns no value.
3437   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3438   * @syscap SystemCapability.WindowManager.WindowManager.Core
3439   * @systemapi Hide this for inner system use.
3440   * @since 9
3441   */
3442  /**
3443   * Toggle shown state for all app windows. Minimize or restore all app windows.
3444   *
3445   * @returns { Promise<void> } Promise that returns no value.
3446   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3447   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3448   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3449   * @syscap SystemCapability.WindowManager.WindowManager.Core
3450   * @systemapi Hide this for inner system use.
3451   * @since 12
3452   */
3453  function toggleShownStateForAllAppWindows(): Promise<void>;
3454
3455  /**
3456   * Set the layout mode of a window.
3457   *
3458   * @param { WindowLayoutMode } mode - The layout mode of a window.
3459   * @param { AsyncCallback<void> } callback - Callback used to return the result.
3460   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3461   *                                                                  2. Incorrect parameter types;
3462   *                                                                  3. Parameter verification failed.
3463   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3464   * @syscap SystemCapability.WindowManager.WindowManager.Core
3465   * @systemapi Hide this for inner system use.
3466   * @since 9
3467   */
3468  /**
3469   * Set the layout mode of a window.
3470   *
3471   * @param { WindowLayoutMode } mode - The layout mode of a window.
3472   * @param { AsyncCallback<void> } callback - Callback used to return the result.
3473   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3474   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3475   *                                                                  2. Incorrect parameter types;
3476   *                                                                  3. Parameter verification failed.
3477   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3478   * @syscap SystemCapability.WindowManager.WindowManager.Core
3479   * @systemapi Hide this for inner system use.
3480   * @since 12
3481   */
3482  function setWindowLayoutMode(mode: WindowLayoutMode, callback: AsyncCallback<void>): void;
3483
3484  /**
3485   * Set the layout mode of a window.
3486   *
3487   * @param { WindowLayoutMode } mode - The layout mode of a window.
3488   * @returns { Promise<void> } Promise that returns no value.
3489   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3490   *                                                                  2. Incorrect parameter types;
3491   *                                                                  3. Parameter verification failed.
3492   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3493   * @syscap SystemCapability.WindowManager.WindowManager.Core
3494   * @systemapi Hide this for inner system use.
3495   * @since 9
3496   */
3497  /**
3498   * Set the layout mode of a window.
3499   *
3500   * @param { WindowLayoutMode } mode - The layout mode of a window.
3501   * @returns { Promise<void> } Promise that returns no value.
3502   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3503   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3504   *                                                                  2. Incorrect parameter types;
3505   *                                                                  3. Parameter verification failed.
3506   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3507   * @syscap SystemCapability.WindowManager.WindowManager.Core
3508   * @systemapi Hide this for inner system use.
3509   * @since 12
3510   */
3511  function setWindowLayoutMode(mode: WindowLayoutMode): Promise<void>;
3512
3513  /**
3514   * Sets whether to enable gesture navigation.
3515   *
3516   * @param { boolean } enable - Gesture navigation if true, or disable if false.
3517   * @param { AsyncCallback<void> } callback - The callback of setGestureNavigationEnabled.
3518   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3519   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3520   *                                                                  2. Incorrect parameter types.
3521   * @throws { BusinessError } 1300002 - This window state is abnormal.
3522   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3523   * @syscap SystemCapability.WindowManager.WindowManager.Core
3524   * @systemapi Hide this for inner system use.
3525   * @since 10
3526   */
3527  function setGestureNavigationEnabled(enable: boolean, callback: AsyncCallback<void>): void;
3528
3529  /**
3530   * Sets whether to enable gesture navigation.
3531   *
3532   * @param { boolean } enable - Gesture navigation if true, or disable if false.
3533   * @returns { Promise<void> } - The promise returned by the function.
3534   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3535   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3536   *                                                                  2. Incorrect parameter types.
3537   * @throws { BusinessError } 1300002 - This window state is abnormal.
3538   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3539   * @syscap SystemCapability.WindowManager.WindowManager.Core
3540   * @systemapi Hide this for inner system use.
3541   * @since 10
3542   */
3543  function setGestureNavigationEnabled(enable: boolean): Promise<void>;
3544
3545  /**
3546   * Set watermark image.
3547   *
3548   * @param { image.PixelMap } pixelMap - Watermark image.
3549   * @param { boolean } enable - Show watermark if true.
3550   * @returns { Promise<void> } - Promise that returns no value.
3551   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3552   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3553   *                                                                  2. Incorrect parameter types.
3554   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3555   * @syscap SystemCapability.WindowManager.WindowManager.Core
3556   * @systemapi Hide this for inner system use.
3557   * @since 10
3558   */
3559  function setWaterMarkImage(pixelMap: image.PixelMap, enable: boolean): Promise<void>;
3560
3561  /**
3562   * Set watermark image.
3563   *
3564   * @param { image.PixelMap } pixelMap - Watermark image.
3565   * @param { boolean } enable - Show watermark if true.
3566   * @param { AsyncCallback<void> } callback - The callback of setWaterMarkImage.
3567   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3568   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3569   *                                                                  2. Incorrect parameter types.
3570   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3571   * @syscap SystemCapability.WindowManager.WindowManager.Core
3572   * @systemapi Hide this for inner system use.
3573   * @since 10
3574   */
3575  function setWaterMarkImage(pixelMap: image.PixelMap, enable: boolean, callback: AsyncCallback<void>): void;
3576
3577  /**
3578   * Shift window focus within the same application. And the window type contains only main window and subwindow.
3579   *
3580   * @param { number } sourceWindowId - Window id which the focus shift from.
3581   * @param { number } targetWindowId - Window id which the focus shift to.
3582   * @returns { Promise<void> } - Promise that returns no value.
3583   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3584   *                                                                  2. Incorrect parameter types.
3585   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3586   * @throws { BusinessError } 1300002 - This window state is abnormal.
3587   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3588   * @throws { BusinessError } 1300004 - Unauthorized operation.
3589   * @syscap SystemCapability.Window.SessionManager
3590   * @since 11
3591   */
3592  /**
3593   * Shifts the window focus from the source window to the target window in the same application.
3594   * The window focus can be shifted between the main window and a child window.
3595   *
3596   * @param { number } sourceWindowId - Window id which the focus shift from.
3597   * @param { number } targetWindowId - Window id which the focus shift to.
3598   * @returns { Promise<void> } - Promise that returns no value.
3599   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3600   *                                                                  2. Incorrect parameter types.
3601   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3602   * @throws { BusinessError } 1300002 - This window state is abnormal.
3603   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3604   * @throws { BusinessError } 1300004 - Unauthorized operation.
3605   * @syscap SystemCapability.Window.SessionManager
3606   * @atomicservice
3607   * @since arkts {'1.1':'12', '1.2':'20'}
3608   * @arkts 1.1&1.2
3609   */
3610  function shiftAppWindowFocus(sourceWindowId: number, targetWindowId: number): Promise<void>;
3611
3612  /**
3613   * Transfers an input event from one window to another within the same application, particularly in split-window scenarios.
3614   * It takes effect only for the main window and its child windows on 2-in-1 devices.
3615   *
3616   * @param { number } sourceWindowId - ID of the source window. You are advised to call getWindowProperties() to obtain the window ID.
3617   * @param { number } targetWindowId - ID of the target window. You are advised to call getWindowProperties() to obtain the window ID.
3618   * @returns { Promise<void> } - Promise that returns no value.
3619   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3620   *                                                                  2. Incorrect parameter types.
3621   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3622   * @throws { BusinessError } 1300002 - This window state is abnormal.
3623   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3624   * @throws { BusinessError } 1300004 - Unauthorized operation.
3625   * @syscap SystemCapability.Window.SessionManager
3626   * @atomicservice
3627   * @since 15
3628   */
3629  function shiftAppWindowPointerEvent(sourceWindowId: number, targetWindowId: number): Promise<void>;
3630
3631  /**
3632   * Shift window touch event within the same application. And the window type contains only main window and subwindow.
3633   *
3634   * @param { number } sourceWindowId - Window id which the touch event shift from.
3635   * @param { number } targetWindowId - Window id which the touch event shift to.
3636   * @param { number } fingerId - Finger id in touch event.
3637   * @returns { Promise<void> } - Promise that returns no value.
3638   * @throws { BusinessError } 801 - Capability not supported. Function shiftAppWindowTouchEvent can not work correctly due to limited device capabilities.
3639   * @throws { BusinessError } 1300002 - This window state is abnormal.
3640   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3641   * @throws { BusinessError } 1300004 - Unauthorized operation.
3642   * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
3643   * @syscap SystemCapability.Window.SessionManager
3644   * @since 20
3645   */
3646  function shiftAppWindowTouchEvent(sourceWindowId: number, targetWindowId: number, fingerId: number): Promise<void>;
3647
3648  /**
3649   * Get info of visible windows.
3650   *
3651   * @returns { Promise<Array<WindowInfo>> } - Promise that returns windowInfo list.
3652   * @throws { BusinessError } 202 - Permission verification failed, non-system application uses system API.
3653   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3654   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3655   * @syscap SystemCapability.Window.SessionManager
3656   * @systemapi Hide this for inner system use.
3657   * @since 12
3658   */
3659  /**
3660   * Get info of visible windows.
3661   *
3662   * @permission ohos.permission.VISIBLE_WINDOW_INFO
3663   * @returns { Promise<Array<WindowInfo>> } - Promise that returns windowInfo list.
3664   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
3665   * @throws { BusinessError } 801 - Capability not supported. Function getVisibleWindowInfo can not work correctly due to limited device capabilities.
3666   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3667   * @syscap SystemCapability.Window.SessionManager
3668   * @since 18
3669   */
3670  function getVisibleWindowInfo(): Promise<Array<WindowInfo>>;
3671
3672  /**
3673   * gets snapshot of window
3674   *
3675   * @param { number } windowId - Indicates target window id.
3676   * @returns { Promise<image.PixelMap> } - Promise that returns no value.
3677   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3678   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
3679   * <br>2. Incorrect parameter types. 3.Parameter verification failed.
3680   * @throws { BusinessError } 1300002 - This window state is abnormal.
3681   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3682   * @throws { BusinessError } 1300004 - This operation is not accessible.
3683   * @syscap SystemCapability.WindowManager.WindowManager.Core
3684   * @systemapi Hide this for inner system use.
3685   * @since 12
3686   */
3687  function getSnapshot(windowId: number): Promise<image.PixelMap>;
3688
3689  /**
3690   * Get windows by coordinate.
3691   *
3692   * @param { number } displayId - Indicate the id of display.
3693   * @param { number } windowNumber - Indicate the Number of query windows.
3694   * @param { number } x - Indicate the X-coordinate of the window.
3695   * @param { number } y - Indicate the Y-coordinate of the window.
3696   * @returns { Promise<Array<Window>> } Promise used to return the window.
3697   * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
3698   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3699   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3700   * @syscap SystemCapability.Window.SessionManager
3701   * @atomicservice
3702   * @since 14
3703   */
3704  function getWindowsByCoordinate(displayId: number, windowNumber?: number, x?: number, y?: number):
3705      Promise<Array<Window>>;
3706
3707  /**
3708   * Get Layout info of all windows on the selected display.
3709   *
3710   * @param { number } displayId - Indicate the id of display.
3711   * @returns { Promise<Array<WindowLayoutInfo>> } Promise used to return the WindowLayoutInfo.
3712   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3713   *                                                                  2. Incorrect parameter types;
3714   *                                                                  3. Parameter verification failed.
3715   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3716   * @throws { BusinessError } 1300002 - This window state is abnormal.
3717   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3718   * @syscap SystemCapability.Window.SessionManager
3719   * @atomicservice
3720   * @since 15
3721   */
3722  /**
3723   * Get Layout info of all windows on the selected display.
3724   *
3725   * @param { number } displayId - Indicate the id of display.
3726   * @returns { Promise<Array<WindowLayoutInfo>> } Promise used to return the WindowLayoutInfo.
3727   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3728   *                                                                  2. Incorrect parameter types;
3729   *                                                                  3. Parameter verification failed.
3730   * @throws { BusinessError } 801 - Capability not supported. function getAllWindowLayoutInfo can not work correctly due to limited device capabilities.
3731   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3732   * @syscap SystemCapability.Window.SessionManager
3733   * @atomicservice
3734   * @since 19
3735   */
3736  function getAllWindowLayoutInfo(displayId: number): Promise<Array<WindowLayoutInfo>>;
3737
3738  /**
3739   * List the window modes of the foreground window on the specified display.
3740   *
3741   * @param { number } displayId - Indicate the id of display.
3742   * @returns { Promise<number> } Promise used to return the window modes.
3743   * @throws { BusinessError } 801 - Capability not supported. function getGlobalWindowMode can not work correctly due to limited device capabilities.
3744   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3745   * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
3746   * @syscap SystemCapability.Window.SessionManager
3747   * @atomicservice
3748   * @since 20
3749   */
3750  function getGlobalWindowMode(displayId?: number): Promise<number>;
3751
3752  /**
3753   * Get the name of the top navigation destination.
3754   *
3755   * @param { number } windowId - Indicates target window id.
3756   * @returns { Promise<string> } The name of the top navigation destination.
3757   * @throws { BusinessError } 202 - Permission verification failed, non-system application uses system API.
3758   * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
3759   * @throws { BusinessError } 1300002 - This window state is abnormal.
3760   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3761   * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
3762   * @syscap SystemCapability.Window.SessionManager
3763   * @systemapi Hide this for inner system use.
3764   * @since 20
3765   */
3766  function getTopNavDestinationName(windowId: number): Promise<string>;
3767
3768  /**
3769   * Register the callback of systemBarTintChange
3770   *
3771   * @param { 'systemBarTintChange' } type - The value is fixed at 'systemBarTintChange', indicating the property change event of the system bar.
3772   * @param { Callback<SystemBarTintState> } callback - Callback used to return the properties of the system bar.
3773   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3774   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3775   *                                                                  2. Incorrect parameter types;
3776   *                                                                  3. Parameter verification failed.
3777   * @syscap SystemCapability.WindowManager.WindowManager.Core
3778   * @systemapi Hide this for inner system use.
3779   * @since arkts {'1.1':'8', '1.2':'20'}
3780   * @arkts 1.1&1.2
3781   */
3782  function on(type: 'systemBarTintChange', callback: Callback<SystemBarTintState>): void;
3783
3784  /**
3785   * Unregister the callback of systemBarTintChange
3786   *
3787   * @param { 'systemBarTintChange' } type - The value is fixed at 'systemBarTintChange', indicating the property change event of the system bar.
3788   * @param { Callback<SystemBarTintState> } callback - Callback used to return the properties of the system bar.
3789   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3790   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
3791   *                                                                  2. Parameter verification failed.
3792   * @syscap SystemCapability.WindowManager.WindowManager.Core
3793   * @systemapi Hide this for inner system use.
3794   * @since arkts {'1.1':'8', '1.2':'20'}
3795   * @arkts 1.1&1.2
3796   */
3797  function off(type: 'systemBarTintChange', callback?: Callback<SystemBarTintState>): void;
3798
3799  /**
3800   * Register the callback for gesture navigation enabled changes.
3801   *
3802   * @param { 'gestureNavigationEnabledChange' } type the event of gesture navigation enabled changes.
3803   * @param { Callback<boolean> } callback Callback used to return the result whether gesture navigation enabled or not.
3804   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3805   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
3806   *                                                                  2. Incorrect parameter types.
3807   *                                                                  3. Parameter verification failed.
3808   * @throws { BusinessError } 1300002 - This window state is abnormal.
3809   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3810   * @syscap SystemCapability.WindowManager.WindowManager.Core
3811   * @systemapi Hide this for inner system use.
3812   * @since arkts {'1.1':'10', '1.2':'20'}
3813   * @arkts 1.1&1.2
3814   */
3815  function on(type: 'gestureNavigationEnabledChange', callback: Callback<boolean>): void;
3816
3817  /**
3818   * Unregister the callback for gesture navigation enabled changes.
3819   *
3820   * @param { 'gestureNavigationEnabledChange' } type the event of gesture navigation enabled changes.
3821   * @param { Callback<boolean> } callback Callback used to return the result whether gesture navigation enabled or not.
3822   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3823   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
3824   *                                                                  2. Parameter verification failed.
3825   * @throws { BusinessError } 1300002 - This window state is abnormal.
3826   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3827   * @syscap SystemCapability.WindowManager.WindowManager.Core
3828   * @systemapi Hide this for inner system use.
3829   * @since arkts {'1.1':'10', '1.2':'20'}
3830   * @arkts 1.1&1.2
3831   */
3832  function off(type: 'gestureNavigationEnabledChange', callback?: Callback<boolean>): void;
3833
3834  /**
3835   * Register the callback for watermark flag change.
3836   *
3837   * @param { 'waterMarkFlagChange' } type the event of watermark flag change.
3838   * @param { Callback<boolean> } callback Callback used to return the result whether watermark flag change or not.
3839   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3840   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
3841   * <br>2. Incorrect parameter types. 3.Parameter verification failed.
3842   * @throws { BusinessError } 1300002 - This window state is abnormal.
3843   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3844   * @syscap SystemCapability.WindowManager.WindowManager.Core
3845   * @systemapi Hide this for inner system use.
3846   * @since arkts {'1.1':'10', '1.2':'20'}
3847   * @arkts 1.1&1.2
3848   */
3849  function on(type: 'waterMarkFlagChange', callback: Callback<boolean>): void;
3850
3851  /**
3852   * Unregister the callback for watermark flag change.
3853   *
3854   * @param { 'waterMarkFlagChange' } type the event of watermark flag change.
3855   * @param { Callback<boolean> } callback Callback used to return the result whether watermark flag change or not.
3856   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3857   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
3858   * <br>2. Parameter verification failed.
3859   * @throws { BusinessError } 1300002 - This window state is abnormal.
3860   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3861   * @syscap SystemCapability.WindowManager.WindowManager.Core
3862   * @systemapi Hide this for inner system use.
3863   * @since arkts {'1.1':'10', '1.2':'20'}
3864   * @arkts 1.1&1.2
3865   */
3866  function off(type: 'waterMarkFlagChange', callback?: Callback<boolean>): void;
3867
3868  /**
3869   * Sets starting window background color
3870   *
3871   * @param { string } moduleName - module Name that needs to be set.
3872   * @param { string } abilityName - ability Name that needs to be set.
3873   * @param { ColorMetrics } color - Color metrics.
3874   * @returns { Promise<void> } Promise that returns no value.
3875   * @throws { BusinessError } 801 - Capability not supported.function setStartWindowBackgroundColor can not to work correctly due to limited device capabilities.
3876   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3877   * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
3878   * @syscap SystemCapability.Window.SessionManager
3879   * @atomicservice
3880   * @since 20
3881   */
3882  function setStartWindowBackgroundColor(moduleName: string, abilityName: string, color: ColorMetrics): Promise<void>;
3883
3884  /**
3885   * Notify screenshot event
3886   *
3887   * @param { ScreenshotEventType } eventType - Screenshot event type.
3888   * @returns { Promise<void> } Promise that returns no value.
3889   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
3890   * @throws { BusinessError } 1300003 - This window manager service works abnormally.
3891   * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
3892   * @syscap SystemCapability.WindowManager.WindowManager.Core
3893   * @systemapi Hide this for inner system use.
3894   * @since 20
3895   */
3896  function notifyScreenshotEvent(eventType: ScreenshotEventType): Promise<void>;
3897
3898  /**
3899   * Display orientation
3900   *
3901   * @enum { number }
3902   * @syscap SystemCapability.WindowManager.WindowManager.Core
3903   * @since 9
3904   */
3905  /**
3906   * Display orientation
3907   *
3908   * @enum { number }
3909   * @syscap SystemCapability.WindowManager.WindowManager.Core
3910   * @crossplatform
3911   * @since 10
3912   */
3913  /**
3914   * Display orientation
3915   *
3916   * @enum { number }
3917   * @syscap SystemCapability.WindowManager.WindowManager.Core
3918   * @crossplatform
3919   * @atomicservice
3920   * @since arkts {'1.1':'11', '1.2':'20'}
3921   * @arkts 1.1&1.2
3922   */
3923  enum Orientation {
3924    /**
3925     * Default value. The direction mode is not clearly defined. It is determined by the system.
3926     *
3927     * @syscap SystemCapability.WindowManager.WindowManager.Core
3928     * @since 9
3929     */
3930    /**
3931     * Default value. The direction mode is not clearly defined. It is determined by the system.
3932     *
3933     * @syscap SystemCapability.WindowManager.WindowManager.Core
3934     * @crossplatform
3935     * @since 10
3936     */
3937    /**
3938     * Default value. The direction mode is not clearly defined. It is determined by the system.
3939     *
3940     * @syscap SystemCapability.WindowManager.WindowManager.Core
3941     * @crossplatform
3942     * @atomicservice
3943     * @since arkts {'1.1':'12', '1.2':'20'}
3944     * @arkts 1.1&1.2
3945     */
3946    UNSPECIFIED = 0,
3947
3948    /**
3949     * Display in portrait orientation.
3950     *
3951     * @syscap SystemCapability.WindowManager.WindowManager.Core
3952     * @since 9
3953     */
3954    /**
3955     * Display in portrait orientation.
3956     *
3957     * @syscap SystemCapability.WindowManager.WindowManager.Core
3958     * @crossplatform
3959     * @since 10
3960     */
3961    /**
3962     * Display in portrait orientation.
3963     *
3964     * @syscap SystemCapability.WindowManager.WindowManager.Core
3965     * @crossplatform
3966     * @atomicservice
3967     * @since arkts {'1.1':'11', '1.2':'20'}
3968     * @arkts 1.1&1.2
3969     */
3970    PORTRAIT = 1,
3971
3972    /**
3973     * Display in landscape orientation.
3974     *
3975     * @syscap SystemCapability.WindowManager.WindowManager.Core
3976     * @since 9
3977     */
3978    /**
3979     * Display in landscape orientation.
3980     *
3981     * @syscap SystemCapability.WindowManager.WindowManager.Core
3982     * @crossplatform
3983     * @since 10
3984     */
3985    /**
3986     * Display in landscape orientation.
3987     *
3988     * @syscap SystemCapability.WindowManager.WindowManager.Core
3989     * @crossplatform
3990     * @atomicservice
3991     * @since arkts {'1.1':'12', '1.2':'20'}
3992     * @arkts 1.1&1.2
3993     */
3994    LANDSCAPE = 2,
3995
3996    /**
3997     * Display in inverted portrait orientation.
3998     *
3999     * @syscap SystemCapability.WindowManager.WindowManager.Core
4000     * @since 9
4001     */
4002    /**
4003     * Display in inverted portrait orientation.
4004     *
4005     * @syscap SystemCapability.WindowManager.WindowManager.Core
4006     * @crossplatform
4007     * @since 10
4008     */
4009    /**
4010     * Display in inverted portrait orientation.
4011     *
4012     * @syscap SystemCapability.WindowManager.WindowManager.Core
4013     * @crossplatform
4014     * @atomicservice
4015     * @since arkts {'1.1':'12', '1.2':'20'}
4016     * @arkts 1.1&1.2
4017     */
4018    PORTRAIT_INVERTED = 3,
4019
4020    /**
4021     * Display in inverted landscape orientation.
4022     *
4023     * @syscap SystemCapability.WindowManager.WindowManager.Core
4024     * @since 9
4025     */
4026    /**
4027     * Display in inverted landscape orientation.
4028     *
4029     * @syscap SystemCapability.WindowManager.WindowManager.Core
4030     * @crossplatform
4031     * @since 10
4032     */
4033    /**
4034     * Display in inverted landscape orientation.
4035     *
4036     * @syscap SystemCapability.WindowManager.WindowManager.Core
4037     * @crossplatform
4038     * @atomicservice
4039     * @since arkts {'1.1':'12', '1.2':'20'}
4040     * @arkts 1.1&1.2
4041     */
4042    LANDSCAPE_INVERTED = 4,
4043
4044    /**
4045     * Follow the rotation of the sensor, ignore auto rotation lock.
4046     *
4047     * @syscap SystemCapability.WindowManager.WindowManager.Core
4048     * @since 9
4049     */
4050    /**
4051     * Follow the rotation of the sensor, ignore auto rotation lock.
4052     *
4053     * @syscap SystemCapability.WindowManager.WindowManager.Core
4054     * @atomicservice
4055     * @since arkts {'1.1':'11', '1.2':'20'}
4056     * @arkts 1.1&1.2
4057     */
4058    AUTO_ROTATION = 5,
4059
4060    /**
4061     * Follow the rotation of the sensor, only work in the vertical direction, ignore auto rotation lock.
4062     *
4063     * @syscap SystemCapability.WindowManager.WindowManager.Core
4064     * @since 9
4065     */
4066    /**
4067     * Follow the rotation of the sensor, only work in the vertical direction, ignore auto rotation lock.
4068     *
4069     * @syscap SystemCapability.WindowManager.WindowManager.Core
4070     * @atomicservice
4071     * @since arkts {'1.1':'12', '1.2':'20'}
4072     * @arkts 1.1&1.2
4073     */
4074    AUTO_ROTATION_PORTRAIT = 6,
4075
4076    /**
4077     * Follow the rotation of the sensor, only work in the horizontal direction, ignore auto rotation lock.
4078     *
4079     * @syscap SystemCapability.WindowManager.WindowManager.Core
4080     * @since 9
4081     */
4082    /**
4083     * Follow the rotation of the sensor, only work in the horizontal direction, ignore auto rotation lock.
4084     *
4085     * @syscap SystemCapability.WindowManager.WindowManager.Core
4086     * @atomicservice
4087     * @since arkts {'1.1':'12', '1.2':'20'}
4088     * @arkts 1.1&1.2
4089     */
4090    AUTO_ROTATION_LANDSCAPE = 7,
4091
4092    /**
4093     * Follow the rotation of the sensor, controlled by auto rotation lock.
4094     *
4095     * @syscap SystemCapability.WindowManager.WindowManager.Core
4096     * @since 9
4097     */
4098    /**
4099     * Follow the rotation of the sensor, controlled by auto rotation lock.
4100     *
4101     * @syscap SystemCapability.WindowManager.WindowManager.Core
4102     * @atomicservice
4103     * @since arkts {'1.1':'12', '1.2':'20'}
4104     * @arkts 1.1&1.2
4105     */
4106    AUTO_ROTATION_RESTRICTED = 8,
4107
4108    /**
4109     * Follow the rotation of the sensor, only work in the vertical direction, controlled by auto rotation lock.
4110     *
4111     * @syscap SystemCapability.WindowManager.WindowManager.Core
4112     * @since 9
4113     */
4114    /**
4115     * Follow the rotation of the sensor, only work in the vertical direction, controlled by auto rotation lock.
4116     *
4117     * @syscap SystemCapability.WindowManager.WindowManager.Core
4118     * @atomicservice
4119     * @since arkts {'1.1':'12', '1.2':'20'}
4120     * @arkts 1.1&1.2
4121     */
4122    AUTO_ROTATION_PORTRAIT_RESTRICTED = 9,
4123
4124    /**
4125     * Follow the rotation of the sensor, only work in the horizontal direction, controlled by auto rotation lock.
4126     *
4127     * @syscap SystemCapability.WindowManager.WindowManager.Core
4128     * @since 9
4129     */
4130    /**
4131     * Follow the rotation of the sensor, only work in the horizontal direction, controlled by auto rotation lock.
4132     *
4133     * @syscap SystemCapability.WindowManager.WindowManager.Core
4134     * @atomicservice
4135     * @since arkts {'1.1':'12', '1.2':'20'}
4136     * @arkts 1.1&1.2
4137     */
4138    AUTO_ROTATION_LANDSCAPE_RESTRICTED = 10,
4139
4140    /**
4141     * Locked mode, keep the same direction as previous one.
4142     *
4143     * @syscap SystemCapability.WindowManager.WindowManager.Core
4144     * @since 9
4145     */
4146    /**
4147     * Locked mode, keep the same direction as previous one.
4148     *
4149     * @syscap SystemCapability.WindowManager.WindowManager.Core
4150     * @atomicservice
4151     * @since arkts {'1.1':'12', '1.2':'20'}
4152     * @arkts 1.1&1.2
4153     */
4154    LOCKED = 11,
4155
4156    /**
4157     * Follow the rotation of the sensor, determined by the system, controlled by auto rotation lock.
4158     *
4159     * @syscap SystemCapability.Window.SessionManager
4160     * @atomicservice
4161     * @since arkts {'1.1':'12', '1.2':'20'}
4162     * @arkts 1.1&1.2
4163     */
4164    AUTO_ROTATION_UNSPECIFIED = 12,
4165
4166    /**
4167     * Display in portrait orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock.
4168     *
4169     * @syscap SystemCapability.Window.SessionManager
4170     * @atomicservice
4171     * @since arkts {'1.1':'12', '1.2':'20'}
4172     * @arkts 1.1&1.2
4173     */
4174    USER_ROTATION_PORTRAIT = 13,
4175
4176    /**
4177     * Display in landscape orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock.
4178     *
4179     * @syscap SystemCapability.Window.SessionManager
4180     * @atomicservice
4181     * @since arkts {'1.1':'12', '1.2':'20'}
4182     * @arkts 1.1&1.2
4183     */
4184    USER_ROTATION_LANDSCAPE = 14,
4185
4186    /**
4187     * Display in inverted portrait orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock.
4188     *
4189     * @syscap SystemCapability.Window.SessionManager
4190     * @atomicservice
4191     * @since arkts {'1.1':'12', '1.2':'20'}
4192     * @arkts 1.1&1.2
4193     */
4194    USER_ROTATION_PORTRAIT_INVERTED = 15,
4195
4196    /**
4197     * Display in inverted landscape orientation, and then, follow the rotation of the sensor, determined by the system, controlled by auto rotation lock.
4198     *
4199     * @syscap SystemCapability.Window.SessionManager
4200     * @atomicservice
4201     * @since arkts {'1.1':'12', '1.2':'20'}
4202     * @arkts 1.1&1.2
4203     */
4204    USER_ROTATION_LANDSCAPE_INVERTED = 16,
4205
4206    /**
4207     * Follow the desktop rotate mode.
4208     *
4209     * @syscap SystemCapability.Window.SessionManager
4210     * @atomicservice
4211     * @since arkts {'1.1':'12', '1.2':'20'}
4212     * @arkts 1.1&1.2
4213     */
4214    FOLLOW_DESKTOP = 17
4215  }
4216
4217  /**
4218   * Type of blur style
4219   *
4220   * @enum { number }
4221   * @syscap SystemCapability.WindowManager.WindowManager.Core
4222   * @systemapi Hide this for inner system use.
4223   * @since arkts {'1.1':'9', '1.2':'20'}
4224   * @arkts 1.1&1.2
4225   */
4226  enum BlurStyle {
4227    /**
4228     * Close blur.
4229     *
4230     * @syscap SystemCapability.WindowManager.WindowManager.Core
4231     * @systemapi Hide this for inner system use.
4232     * @since arkts {'1.1':'9', '1.2':'20'}
4233     * @arkts 1.1&1.2
4234     */
4235    OFF = 0,
4236    /**
4237     * Blur style thin.
4238     *
4239     * @syscap SystemCapability.WindowManager.WindowManager.Core
4240     * @systemapi Hide this for inner system use.
4241     * @since arkts {'1.1':'9', '1.2':'20'}
4242     * @arkts 1.1&1.2
4243     */
4244    THIN = 1,
4245    /**
4246     * Blur style regular.
4247     *
4248     * @syscap SystemCapability.WindowManager.WindowManager.Core
4249     * @systemapi Hide this for inner system use.
4250     * @since arkts {'1.1':'9', '1.2':'20'}
4251     * @arkts 1.1&1.2
4252     */
4253    REGULAR = 2,
4254    /**
4255     * Blur style thick.
4256     *
4257     * @syscap SystemCapability.WindowManager.WindowManager.Core
4258     * @systemapi Hide this for inner system use.
4259     * @since arkts {'1.1':'9', '1.2':'20'}
4260     * @arkts 1.1&1.2
4261     */
4262    THICK = 3
4263  }
4264
4265  /**
4266   * Enum for window callback event type
4267   *
4268   * @enum { number }
4269   * @syscap SystemCapability.WindowManager.WindowManager.Core
4270   * @since 10
4271   */
4272  /**
4273   * Enum for window callback event type
4274   *
4275   * @enum { number }
4276   * @syscap SystemCapability.WindowManager.WindowManager.Core
4277   * @crossplatform
4278   * @atomicservice
4279   * @since arkts {'1.1':'11', '1.2':'20'}
4280   * @arkts 1.1&1.2
4281   */
4282  enum WindowEventType {
4283    /**
4284     * The value of window event is window show
4285     *
4286     * @syscap SystemCapability.WindowManager.WindowManager.Core
4287     * @since 10
4288     */
4289    /**
4290     * The value of window event is window show
4291     *
4292     * @syscap SystemCapability.WindowManager.WindowManager.Core
4293     * @crossplatform
4294     * @atomicservice
4295     * @since arkts {'1.1':'11', '1.2':'20'}
4296     * @arkts 1.1&1.2
4297     */
4298    WINDOW_SHOWN = 1,
4299    /**
4300     * The value of window event is window active
4301     *
4302     * @syscap SystemCapability.WindowManager.WindowManager.Core
4303     * @since 10
4304     */
4305    /**
4306     * The value of window event is window active
4307     *
4308     * @syscap SystemCapability.WindowManager.WindowManager.Core
4309     * @crossplatform
4310     * @atomicservice
4311     * @since arkts {'1.1':'11', '1.2':'20'}
4312     * @arkts 1.1&1.2
4313     */
4314    WINDOW_ACTIVE = 2,
4315    /**
4316     * The value of window event is window inactive
4317     *
4318     * @syscap SystemCapability.WindowManager.WindowManager.Core
4319     * @since 10
4320     */
4321    /**
4322     * The value of window event is window inactive
4323     *
4324     * @syscap SystemCapability.WindowManager.WindowManager.Core
4325     * @crossplatform
4326     * @atomicservice
4327     * @since arkts {'1.1':'11', '1.2':'20'}
4328     * @arkts 1.1&1.2
4329     */
4330    WINDOW_INACTIVE = 3,
4331    /**
4332     * The value of window event is window hide
4333     *
4334     * @syscap SystemCapability.WindowManager.WindowManager.Core
4335     * @since 10
4336     */
4337    /**
4338     * The value of window event is window hide
4339     *
4340     * @syscap SystemCapability.WindowManager.WindowManager.Core
4341     * @crossplatform
4342     * @atomicservice
4343     * @since arkts {'1.1':'11', '1.2':'20'}
4344     * @arkts 1.1&1.2
4345     */
4346    WINDOW_HIDDEN = 4,
4347    /**
4348     * The value of window event is window destroy
4349     *
4350     * @syscap SystemCapability.Window.SessionManager
4351     * @atomicservice
4352     * @since arkts {'1.1':'11', '1.2':'20'}
4353     * @arkts 1.1&1.2
4354     */
4355    WINDOW_DESTROYED = 7
4356  }
4357
4358  /**
4359   * Enum for window maximize presentation
4360   *
4361   * @enum { number }
4362   * @syscap SystemCapability.Window.SessionManager
4363   * @atomicservice
4364   * @since arkts {'1.1':'12', '1.2':'20'}
4365   * @arkts 1.1&1.2
4366   */
4367  enum MaximizePresentation {
4368    /**
4369     * The value means follow immersive state which set by app
4370     *
4371     * @syscap SystemCapability.Window.SessionManager
4372     * @atomicservice
4373     * @since arkts {'1.1':'12', '1.2':'20'}
4374     * @arkts 1.1&1.2
4375     */
4376    FOLLOW_APP_IMMERSIVE_SETTING = 0,
4377    /**
4378     * The value means exit immersive state
4379     *
4380     * @syscap SystemCapability.Window.SessionManager
4381     * @atomicservice
4382     * @since arkts {'1.1':'12', '1.2':'20'}
4383     * @arkts 1.1&1.2
4384     */
4385    EXIT_IMMERSIVE = 1,
4386    /**
4387     * The value means enter immersive state
4388     *
4389     * @syscap SystemCapability.Window.SessionManager
4390     * @atomicservice
4391     * @since arkts {'1.1':'12', '1.2':'20'}
4392     * @arkts 1.1&1.2
4393     */
4394    ENTER_IMMERSIVE = 2,
4395    /**
4396     * The value means enter immersive state and the title bar and dock bar cannot be shown, when the mouse hovers over hot area.
4397     *
4398     * @syscap SystemCapability.Window.SessionManager
4399     * @atomicservice
4400     * @since 14
4401     */
4402    ENTER_IMMERSIVE_DISABLE_TITLE_AND_DOCK_HOVER = 3,
4403  }
4404
4405  /**
4406   * the optional move configuration used in moveWindowToAsync/moveWindowToGlobal
4407   *
4408   * @interface MoveConfiguration
4409   * @syscap SystemCapability.Window.SessionManager
4410   * @atomicservice
4411   * @since arkts {'1.1':'15', '1.2':'20'}
4412   * @arkts 1.1&1.2
4413   */
4414  interface MoveConfiguration {
4415    /**
4416     * The display id of the screen
4417     *
4418     * @type { ?number }
4419     * @syscap SystemCapability.Window.SessionManager
4420     * @atomicservice
4421     * @since arkts {'1.1':'15', '1.2':'20'}
4422     * @arkts 1.1&1.2
4423     */
4424    displayId?: number;
4425  }
4426
4427  /**
4428   * Specific system bar type.
4429   *
4430   * @syscap SystemCapability.Window.SessionManager
4431   * @atomicservice
4432   * @since 11
4433   */
4434  /**
4435   * Specific system bar type.
4436   *
4437   * @typedef {'status' | 'navigation' | 'navigationIndicator'}
4438   * @syscap SystemCapability.Window.SessionManager
4439   * @crossplatform
4440   * @atomicservice
4441   * @since arkts {'1.1':'12', '1.2':'20'}
4442   * @arkts 1.1&1.2
4443   */
4444  type SpecificSystemBar = 'status' | 'navigation' | 'navigationIndicator';
4445
4446  /**
4447   * Describes the window transition type
4448   *
4449   * @enum { number }
4450   * @syscap SystemCapability.Window.SessionManager
4451   * @atomicservice
4452   * @since 20
4453   */
4454  enum WindowTransitionType {
4455    /**
4456     * Destroy transition
4457     *
4458     * @syscap SystemCapability.Window.SessionManager
4459     * @atomicservice
4460     * @since 20
4461     */
4462    DESTROY = 0,
4463  }
4464
4465  /**
4466   * Describes the window animation type
4467   *
4468   * @enum { number }
4469   * @syscap SystemCapability.Window.SessionManager
4470   * @since 20
4471   */
4472  enum AnimationType {
4473    /**
4474     * Window animation type fade in out
4475     *
4476     * @syscap SystemCapability.Window.SessionManager
4477     * @since 20
4478     */
4479    FADE_IN_OUT = 0,
4480    /**
4481     * Window animation type fade in
4482     *
4483     * @syscap SystemCapability.Window.SessionManager
4484     * @systemapi Hide this for inner system use.
4485     * @since 20
4486     */
4487    FADE_IN = 1,
4488  }
4489
4490  /**
4491   * Describes the window animation curve
4492   *
4493   * @enum { number }
4494   * @syscap SystemCapability.Window.SessionManager
4495   * @atomicservice
4496   * @since 20
4497   */
4498  enum WindowAnimationCurve {
4499    /**
4500     * Animation curve type linear
4501     *
4502     * @syscap SystemCapability.Window.SessionManager
4503     * @atomicservice
4504     * @since 20
4505     */
4506    LINEAR = 0,
4507
4508    /**
4509     * Animation curve type interpolation spring
4510     *
4511     * @syscap SystemCapability.Window.SessionManager
4512     * @atomicservice
4513     * @since 20
4514     */
4515    INTERPOLATION_SPRING = 1,
4516
4517    /**
4518     * Animation curve type cubic bezier
4519     *
4520     * @syscap SystemCapability.Window.SessionManager
4521     * @atomicservice
4522     * @since 20
4523     */
4524    CUBIC_BEZIER = 2,
4525  }
4526
4527  /**
4528   * Window animation config
4529   *
4530   * @interface WindowAnimationConfig
4531   * @syscap SystemCapability.Window.SessionManager
4532   * @atomicservice
4533   * @since 20
4534   */
4535  interface WindowAnimationConfig {
4536    /**
4537     * Curve of the animation
4538     *
4539     * @type { WindowAnimationCurve }
4540     * @syscap SystemCapability.Window.SessionManager
4541     * @atomicservice
4542     * @since 20
4543     */
4544    curve: WindowAnimationCurve;
4545
4546    /**
4547     * Duration of the animation
4548     *
4549     * @type { ?number }
4550     * @syscap SystemCapability.Window.SessionManager
4551     * @atomicservice
4552     * @since 20
4553     */
4554    duration?: number;
4555
4556    /**
4557     * Param of animation curve
4558     *
4559     * @type { ?WindowAnimationCurveParam }
4560     * @syscap SystemCapability.Window.SessionManager
4561     * @atomicservice
4562     * @since 20
4563     */
4564    param?: WindowAnimationCurveParam;
4565  }
4566
4567  /**
4568   * The animation configuration of window transition
4569   *
4570   * @interface TransitionAnimation
4571   * @syscap SystemCapability.Window.SessionManager
4572   * @atomicservice
4573   * @since 20
4574   */
4575  interface TransitionAnimation {
4576    /**
4577     * The config of window animation
4578     *
4579     * @type { WindowAnimationConfig }
4580     * @syscap SystemCapability.Window.SessionManager
4581     * @atomicservice
4582     * @since 20
4583     */
4584    config: WindowAnimationConfig;
4585    /**
4586     * The opacity of window
4587     *
4588     * @type { ?number }
4589     * @syscap SystemCapability.Window.SessionManager
4590     * @atomicservice
4591     * @since 20
4592     */
4593    opacity?: number;
4594  }
4595
4596  /**
4597   * The params of start animation
4598   *
4599   * @interface StartAnimationSystemParams
4600   * @syscap SystemCapability.Window.SessionManager
4601   * @systemapi Hide this for inner system use.
4602   * @since 20
4603   */
4604  interface StartAnimationSystemParams {
4605    /**
4606     * The type of window animation
4607     *
4608     * @type { AnimationType }
4609     * @syscap SystemCapability.Window.SessionManager
4610     * @systemapi Hide this for inner system use.
4611     * @since 20
4612     */
4613    type: AnimationType;
4614    /**
4615     * The configuration of start animation
4616     *
4617     * @type { ?WindowAnimationConfig }
4618     * @syscap SystemCapability.Window.SessionManager
4619     * @systemapi Hide this for inner system use.
4620     * @since 20
4621     */
4622    animationConfig?: WindowAnimationConfig;
4623  }
4624
4625  /**
4626   * The params of start animation
4627   *
4628   * @interface StartAnimationParams
4629   * @syscap SystemCapability.Window.SessionManager
4630   * @since 20
4631   */
4632  interface StartAnimationParams {
4633    /**
4634     * The type of window animation
4635     *
4636     * @type { AnimationType }
4637     * @syscap SystemCapability.Window.SessionManager
4638     * @since 20
4639     */
4640    type: AnimationType;
4641  }
4642
4643  /**
4644   * Window create params
4645   *
4646   * @interface WindowCreateParams
4647   * @syscap SystemCapability.Window.SessionManager
4648   * @since 20
4649   */
4650  interface WindowCreateParams {
4651    /**
4652     * The params of start animation
4653     *
4654     * @type { ?StartAnimationParams }
4655     * @syscap SystemCapability.Window.SessionManager
4656     * @since 20
4657     */
4658    animationParams?: StartAnimationParams;
4659    /**
4660     * The params of system start animation
4661     *
4662     * @type { ?StartAnimationSystemParams }
4663     * @syscap SystemCapability.Window.SessionManager
4664     * @systemapi Hide this for inner system use.
4665     * @since 20
4666     */
4667    systemAnimationParams?: StartAnimationSystemParams;
4668  }
4669
4670  /**
4671   * The information of keyboard
4672   *
4673   * @interface KeyboardInfo
4674   * @syscap SystemCapability.Window.SessionManager
4675   * @atomicservice
4676   * @since arkts {'1.1':'18', '1.2':'20'}
4677   * @arkts 1.1&1.2
4678   */
4679  interface KeyboardInfo {
4680    /**
4681     * The position and size of keyboard before animation.
4682     *
4683     * @type { Rect }
4684     * @syscap SystemCapability.Window.SessionManager
4685     * @atomicservice
4686     * @since 18
4687     */
4688    beginRect: Rect;
4689
4690    /**
4691     * The position and size of keyboard after animation completed.
4692     *
4693     * @type { Rect }
4694     * @syscap SystemCapability.Window.SessionManager
4695     * @atomicservice
4696     * @since 18
4697     */
4698    endRect: Rect;
4699
4700    /**
4701     * Indicates whether animation exists.
4702     *
4703     * @type { ?boolean }
4704     * @syscap SystemCapability.Window.SessionManager
4705     * @atomicservice
4706     * @since 20
4707     */
4708    animated?: boolean;
4709
4710    /**
4711     * The configuration of keyboard animation.
4712     *
4713     * @type { ?WindowAnimationConfig }
4714     * @syscap SystemCapability.Window.SessionManager
4715     * @atomicservice
4716     * @since 20
4717     */
4718    config?: WindowAnimationConfig;
4719  }
4720
4721  /**
4722   * The policy of key frame.
4723   *
4724   * @interface KeyFramePolicy
4725   * @syscap SystemCapability.Window.SessionManager
4726   * @since 20
4727   */
4728  interface KeyFramePolicy {
4729    /**
4730     * Whether to use key frame.
4731     *
4732     * @type { boolean }
4733     * @syscap SystemCapability.Window.SessionManager
4734     * @since 20
4735     */
4736    enable: boolean;
4737
4738    /**
4739     * Set the drag interval to notify rect change in millisecond.
4740     *
4741     * @type { ?number }
4742     * @syscap SystemCapability.Window.SessionManager
4743     * @since 20
4744     */
4745    interval?: number;
4746
4747    /**
4748     * Set the drag distance to notify rect change in px.
4749     *
4750     * @type { ?number }
4751     * @syscap SystemCapability.Window.SessionManager
4752     * @since 20
4753     */
4754    distance?: number;
4755
4756    /**
4757     * Set the rect change animation duration in millisecond.
4758     *
4759     * @type { ?number }
4760     * @syscap SystemCapability.Window.SessionManager
4761     * @since 20
4762     */
4763    animationDuration?: number;
4764
4765    /**
4766     * Set then rect change animation delay in millisecond
4767     *
4768     * @type { ?number }
4769     * @syscap SystemCapability.Window.SessionManager
4770     * @since 20
4771     */
4772    animationDelay?: number;
4773  }
4774
4775  /**
4776   * Window
4777   *
4778   * @interface Window
4779   * @syscap SystemCapability.WindowManager.WindowManager.Core
4780   * @since 6
4781   */
4782  /**
4783   * Window
4784   *
4785   * @interface Window
4786   * @syscap SystemCapability.WindowManager.WindowManager.Core
4787   * @crossplatform
4788   * @atomicservice
4789   * @since arkts {'1.1':'11', '1.2':'20'}
4790   * @arkts 1.1&1.2
4791   */
4792  interface Window {
4793    /**
4794     * Hide window.
4795     *
4796     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4797     * @throws { BusinessError } 1300002 - This window state is abnormal.
4798     * @syscap SystemCapability.WindowManager.WindowManager.Core
4799     * @systemapi Hide this for inner system use.
4800     * @since 7
4801     */
4802    /**
4803     * Hide window.
4804     *
4805     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4806     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
4807     * @throws { BusinessError } 1300002 - This window state is abnormal.
4808     * @syscap SystemCapability.WindowManager.WindowManager.Core
4809     * @systemapi Hide this for inner system use.
4810     * @since 12
4811     */
4812    hide(callback: AsyncCallback<void>): void;
4813
4814    /**
4815     * Hide window.
4816     *
4817     * @returns { Promise<void> } Promise that returns no value.
4818     * @throws { BusinessError } 1300002 - This window state is abnormal.
4819     * @syscap SystemCapability.WindowManager.WindowManager.Core
4820     * @systemapi Hide this for inner system use.
4821     * @since 7
4822     */
4823    /**
4824     * Hide window.
4825     *
4826     * @returns { Promise<void> } Promise that returns no value.
4827     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
4828     * @throws { BusinessError } 1300002 - This window state is abnormal.
4829     * @syscap SystemCapability.WindowManager.WindowManager.Core
4830     * @systemapi Hide this for inner system use.
4831     * @since 12
4832     */
4833    hide(): Promise<void>;
4834
4835    /**
4836     * Hide window with animation.
4837     *
4838     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4839     * @throws { BusinessError } 1300002 - This window state is abnormal.
4840     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
4841     * @throws { BusinessError } 1300004 - Unauthorized operation.
4842     * @syscap SystemCapability.WindowManager.WindowManager.Core
4843     * @systemapi
4844     * @since 9
4845     */
4846    /**
4847     * Hide window with animation.
4848     *
4849     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4850     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
4851     * @throws { BusinessError } 1300002 - This window state is abnormal.
4852     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
4853     * @throws { BusinessError } 1300004 - Unauthorized operation.
4854     * @syscap SystemCapability.WindowManager.WindowManager.Core
4855     * @systemapi
4856     * @since arkts {'1.1':'12', '1.2':'20'}
4857     * @arkts 1.1&1.2
4858     */
4859    hideWithAnimation(callback: AsyncCallback<void>): void;
4860
4861    /**
4862     * Hide window with animation.
4863     *
4864     * @returns { Promise<void> } Promise that returns no value.
4865     * @throws { BusinessError } 1300002 - This window state is abnormal.
4866     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
4867     * @throws { BusinessError } 1300004 - Unauthorized operation.
4868     * @syscap SystemCapability.WindowManager.WindowManager.Core
4869     * @systemapi
4870     * @since 9
4871     */
4872    /**
4873     * Hide window with animation.
4874     *
4875     * @returns { Promise<void> } Promise that returns no value.
4876     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
4877     * @throws { BusinessError } 1300002 - This window state is abnormal.
4878     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
4879     * @throws { BusinessError } 1300004 - Unauthorized operation.
4880     * @syscap SystemCapability.WindowManager.WindowManager.Core
4881     * @systemapi
4882     * @since arkts {'1.1':'12', '1.2':'20'}
4883     * @arkts 1.1&1.2
4884     */
4885    hideWithAnimation(): Promise<void>;
4886
4887    /**
4888     * Show window.
4889     *
4890     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4891     * @syscap SystemCapability.WindowManager.WindowManager.Core
4892     * @since 7
4893     * @deprecated since 9
4894     * @useinstead ohos.window.Window#showWindow
4895     */
4896    show(callback: AsyncCallback<void>): void;
4897
4898    /**
4899     * Show window.
4900     *
4901     * @returns { Promise<void> } Promise that returns no value.
4902     * @syscap SystemCapability.WindowManager.WindowManager.Core
4903     * @since 7
4904     * @deprecated since 9
4905     * @useinstead ohos.window.Window#showWindow
4906     */
4907    show(): Promise<void>;
4908
4909    /**
4910     * Show window.
4911     *
4912     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4913     * @throws { BusinessError } 1300002 - This window state is abnormal.
4914     * @syscap SystemCapability.WindowManager.WindowManager.Core
4915     * @since 9
4916     */
4917    /**
4918     * Show window.
4919     *
4920     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4921     * @throws { BusinessError } 1300002 - This window state is abnormal.
4922     * @syscap SystemCapability.WindowManager.WindowManager.Core
4923     * @crossplatform
4924     * @since 10
4925     */
4926    /**
4927     * Shows this window. This API uses an asynchronous callback to return the result.
4928     * This API takes effect only for a system window or an application child window.
4929     * For the main window of an application, this API moves it at the top when the main window is already displayed.
4930     *
4931     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4932     * @throws { BusinessError } 1300002 - This window state is abnormal.
4933     * @syscap SystemCapability.WindowManager.WindowManager.Core
4934     * @crossplatform
4935     * @atomicservice
4936     * @since arkts {'1.1':'11', '1.2':'20'}
4937     * @arkts 1.1&1.2
4938     */
4939    showWindow(callback: AsyncCallback<void>): void;
4940
4941    /**
4942     * Show window.
4943     *
4944     * @returns { Promise<void> } Promise that returns no value.
4945     * @throws { BusinessError } 1300002 - This window state is abnormal.
4946     * @syscap SystemCapability.WindowManager.WindowManager.Core
4947     * @since 9
4948     */
4949    /**
4950     * Show window.
4951     *
4952     * @returns { Promise<void> } Promise that returns no value.
4953     * @throws { BusinessError } 1300002 - This window state is abnormal.
4954     * @syscap SystemCapability.WindowManager.WindowManager.Core
4955     * @crossplatform
4956     * @since 10
4957     */
4958    /**
4959     * Shows this window. This API uses a promise to return the result.
4960     * This API takes effect only for a system window or an application child window.
4961     * For the main window of an application, this API moves it at the top when the main window is already displayed.
4962     *
4963     * @returns { Promise<void> } Promise that returns no value.
4964     * @throws { BusinessError } 1300002 - This window state is abnormal.
4965     * @syscap SystemCapability.WindowManager.WindowManager.Core
4966     * @crossplatform
4967     * @atomicservice
4968     * @since arkts {'1.1':'11', '1.2':'20'}
4969     * @arkts 1.1&1.2
4970     */
4971    showWindow(): Promise<void>;
4972
4973    /**
4974     * Show window.
4975     *
4976     * @param { ShowWindowOptions } options - options of window shown
4977     * @returns { Promise<void> } Promise that returns no value.
4978     * @throws { BusinessError } 801 - Capability not supported. Function showWindow can not work correctly due to limited device capabilities.
4979     * @throws { BusinessError } 1300002 - This window state is abnormal.
4980     * @throws { BusinessError } 1300004 - Unauthorized operation.
4981     * @throws { BusinessError } 1300016 - Parameter validation error. Possible cause: 1. The value of the parameter is out of the allowed range;
4982     *                                                                                 2. The length of the parameter exceeds the allowed length;
4983     *                                                                                 3. The parameter format is incorrect.
4984     * @syscap SystemCapability.Window.SessionManager
4985     * @atomicservice
4986     * @since 20
4987     */
4988    showWindow(options: ShowWindowOptions): Promise<void>;
4989
4990    /**
4991     * Show window with animation.
4992     *
4993     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4994     * @throws { BusinessError } 1300002 - This window state is abnormal.
4995     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
4996     * @throws { BusinessError } 1300004 - Unauthorized operation.
4997     * @syscap SystemCapability.WindowManager.WindowManager.Core
4998     * @systemapi
4999     * @since 9
5000     */
5001    /**
5002     * Show window with animation.
5003     *
5004     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5005     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
5006     * @throws { BusinessError } 1300002 - This window state is abnormal.
5007     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5008     * @throws { BusinessError } 1300004 - Unauthorized operation.
5009     * @syscap SystemCapability.WindowManager.WindowManager.Core
5010     * @systemapi
5011     * @since arkts {'1.1':'12', '1.2':'20'}
5012     * @arkts 1.1&1.2
5013     */
5014    showWithAnimation(callback: AsyncCallback<void>): void;
5015
5016    /**
5017     * Show window with animation.
5018     *
5019     * @returns { Promise<void> } Promise that returns no value.
5020     * @throws { BusinessError } 1300002 - This window state is abnormal.
5021     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5022     * @throws { BusinessError } 1300004 - Unauthorized operation.
5023     * @syscap SystemCapability.WindowManager.WindowManager.Core
5024     * @systemapi
5025     * @since 9
5026     */
5027    /**
5028     * Show window with animation.
5029     *
5030     * @returns { Promise<void> } Promise that returns no value.
5031     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
5032     * @throws { BusinessError } 1300002 - This window state is abnormal.
5033     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5034     * @throws { BusinessError } 1300004 - Unauthorized operation.
5035     * @syscap SystemCapability.WindowManager.WindowManager.Core
5036     * @systemapi
5037     * @since arkts {'1.1':'12', '1.2':'20'}
5038     * @arkts 1.1&1.2
5039     */
5040    showWithAnimation(): Promise<void>;
5041
5042    /**
5043     * Destroy the window.
5044     *
5045     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5046     * @syscap SystemCapability.WindowManager.WindowManager.Core
5047     * @since 7
5048     * @deprecated since 9
5049     * @useinstead ohos.window.Window#destroyWindow
5050     */
5051    destroy(callback: AsyncCallback<void>): void;
5052
5053    /**
5054     * Destroy the window.
5055     *
5056     * @returns { Promise<void> } Promise that returns no value.
5057     * @syscap SystemCapability.WindowManager.WindowManager.Core
5058     * @since 7
5059     * @deprecated since 9
5060     * @useinstead ohos.window.Window#destroyWindow
5061     */
5062    destroy(): Promise<void>;
5063
5064    /**
5065     * Destroy the window.
5066     *
5067     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5068     * @throws { BusinessError } 1300002 - This window state is abnormal.
5069     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5070     * @syscap SystemCapability.WindowManager.WindowManager.Core
5071     * @since 9
5072     */
5073    /**
5074     * Destroy the window.
5075     *
5076     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5077     * @throws { BusinessError } 1300002 - This window state is abnormal.
5078     * @syscap SystemCapability.WindowManager.WindowManager.Core
5079     * @crossplatform
5080     * @since 10
5081     */
5082    /**
5083     * Destroys this window. This API uses an asynchronous callback to return the result.
5084     * This API takes effect only for a system window or an application child window.
5085     *
5086     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5087     * @throws { BusinessError } 1300002 - This window state is abnormal.
5088     * @syscap SystemCapability.WindowManager.WindowManager.Core
5089     * @crossplatform
5090     * @atomicservice
5091     * @since arkts {'1.1':'11', '1.2':'20'}
5092     * @arkts 1.1&1.2
5093     */
5094    destroyWindow(callback: AsyncCallback<void>): void;
5095
5096    /**
5097     * Destroy the window.
5098     *
5099     * @returns { Promise<void> } Promise that returns no value.
5100     * @throws { BusinessError } 1300002 - This window state is abnormal.
5101     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5102     * @syscap SystemCapability.WindowManager.WindowManager.Core
5103     * @since 9
5104     */
5105    /**
5106     * Destroy the window.
5107     *
5108     * @returns { Promise<void> } Promise that returns no value.
5109     * @throws { BusinessError } 1300002 - This window state is abnormal.
5110     * @syscap SystemCapability.WindowManager.WindowManager.Core
5111     * @crossplatform
5112     * @since 10
5113     */
5114    /**
5115     * Destroys this window. This API uses an asynchronous callback to return the result.
5116     * This API takes effect only for a system window or an application child window.
5117     *
5118     * @returns { Promise<void> } Promise that returns no value.
5119     * @throws { BusinessError } 1300002 - This window state is abnormal.
5120     * @syscap SystemCapability.WindowManager.WindowManager.Core
5121     * @crossplatform
5122     * @atomicservice
5123     * @since arkts {'1.1':'11', '1.2':'20'}
5124     * @arkts 1.1&1.2
5125     */
5126    destroyWindow(): Promise<void>;
5127
5128    /**
5129     * Set the position of a window.
5130     *
5131     * @param { number } x - Indicate the X-coordinate of the window.
5132     * @param { number } y - Indicate the Y-coordinate of the window.
5133     * @returns { Promise<void> } Promise that returns no value.
5134     * @syscap SystemCapability.WindowManager.WindowManager.Core
5135     * @since 7
5136     * @deprecated since 9
5137     * @useinstead ohos.window.Window#moveWindowTo
5138     */
5139    moveTo(x: number, y: number): Promise<void>;
5140
5141    /**
5142     * Set the position of a window.
5143     *
5144     * @param { number } x - Indicate the X-coordinate of the window.
5145     * @param { number } y - Indicate the Y-coordinate of the window.
5146     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5147     * @syscap SystemCapability.WindowManager.WindowManager.Core
5148     * @since 7
5149     * @deprecated since 9
5150     * @useinstead ohos.window.Window#moveWindowTo
5151     */
5152    moveTo(x: number, y: number, callback: AsyncCallback<void>): void;
5153
5154    /**
5155     * Set the position of a window.
5156     *
5157     * @param { number } x - Indicate the X-coordinate of the window.
5158     * @param { number } y - Indicate the Y-coordinate of the window.
5159     * @returns { Promise<void> } Promise that returns no value.
5160     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5161     *                                                                  2. Incorrect parameter types.
5162     * @throws { BusinessError } 1300002 - This window state is abnormal.
5163     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5164     * @syscap SystemCapability.WindowManager.WindowManager.Core
5165     * @since 9
5166     */
5167    /**
5168     * Set the position of a window.
5169     *
5170     * @param { number } x - Indicate the X-coordinate of the window.
5171     * @param { number } y - Indicate the Y-coordinate of the window.
5172     * @returns { Promise<void> } Promise that returns no value.
5173     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5174     *                                                                  2. Incorrect parameter types.
5175     * @throws { BusinessError } 1300002 - This window state is abnormal.
5176     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5177     * @syscap SystemCapability.WindowManager.WindowManager.Core
5178     * @crossplatform
5179     * @since 10
5180     */
5181    /**
5182     * Set the position of a window.
5183     *
5184     * @param { number } x - Indicate the X-coordinate of the window.
5185     * @param { number } y - Indicate the Y-coordinate of the window.
5186     * @returns { Promise<void> } Promise that returns no value.
5187     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5188     *                                                                  2. Incorrect parameter types.
5189     * @throws { BusinessError } 1300002 - This window state is abnormal.
5190     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5191     * @syscap SystemCapability.WindowManager.WindowManager.Core
5192     * @crossplatform
5193     * @atomicservice
5194     * @since arkts {'1.1':'11', '1.2':'20'}
5195     * @arkts 1.1&1.2
5196     */
5197    moveWindowTo(x: number, y: number): Promise<void>;
5198
5199    /**
5200     * Set the position of a window.
5201     *
5202     * @param { number } x - Indicate the X-coordinate of the window.
5203     * @param { number } y - Indicate the Y-coordinate of the window.
5204     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5205     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5206     *                                                                  2. Incorrect parameter types.
5207     * @throws { BusinessError } 1300002 - This window state is abnormal.
5208     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5209     * @syscap SystemCapability.WindowManager.WindowManager.Core
5210     * @since 9
5211     */
5212    /**
5213     * Set the position of a window.
5214     *
5215     * @param { number } x - Indicate the X-coordinate of the window.
5216     * @param { number } y - Indicate the Y-coordinate of the window.
5217     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5218     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5219     *                                                                  2. Incorrect parameter types.
5220     * @throws { BusinessError } 1300002 - This window state is abnormal.
5221     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5222     * @syscap SystemCapability.WindowManager.WindowManager.Core
5223     * @crossplatform
5224     * @since 10
5225     */
5226    /**
5227     * Set the position of a window.
5228     *
5229     * @param { number } x - Indicate the X-coordinate of the window.
5230     * @param { number } y - Indicate the Y-coordinate of the window.
5231     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5232     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5233     *                                                                  2. Incorrect parameter types.
5234     * @throws { BusinessError } 1300002 - This window state is abnormal.
5235     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5236     * @syscap SystemCapability.WindowManager.WindowManager.Core
5237     * @crossplatform
5238     * @atomicservice
5239     * @since arkts {'1.1':'11', '1.2':'20'}
5240     * @arkts 1.1&1.2
5241     */
5242    moveWindowTo(x: number, y: number, callback: AsyncCallback<void>): void;
5243
5244    /**
5245     * Move window to the position.
5246     *
5247     * @param { number } x - Indicate the X-coordinate of the window.
5248     * @param { number } y - Indicate the Y-coordinate of the window.
5249     * @returns { Promise<void> } Promise that returns no value.
5250     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5251     *                                                                  2. Incorrect parameter types;
5252     *                                                                  3. Parameter verification failed.
5253     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5254     * @throws { BusinessError } 1300002 - This window state is abnormal.
5255     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5256     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
5257     * @syscap SystemCapability.Window.SessionManager
5258     * @atomicservice
5259     * @since 12
5260     */
5261    moveWindowToAsync(x: number, y: number): Promise<void>;
5262
5263    /**
5264     * Move window to the position.
5265     *
5266     * @param { number } x - Indicate the X-coordinate of the window.
5267     * @param { number } y - Indicate the Y-coordinate of the window.
5268     * @param { ?MoveConfiguration } moveConfiguration - Indicate the window move configuration.
5269     * @returns { Promise<void> } Promise that returns no value.
5270     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5271     *                                                                  2. Incorrect parameter types;
5272     *                                                                  3. Parameter verification failed.
5273     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5274     * @throws { BusinessError } 1300002 - This window state is abnormal.
5275     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5276     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
5277     * @syscap SystemCapability.Window.SessionManager
5278     * @atomicservice
5279     * @since 15
5280     */
5281    moveWindowToAsync(x: number, y: number, moveConfiguration?: MoveConfiguration): Promise<void>;
5282
5283    /**
5284     * Move window to the position relative to current screen.
5285     *
5286     * @param { number } x - Indicate the X-coordinate of the window relative to current screen.
5287     * @param { number } y - Indicate the Y-coordinate of the window relative to current screen.
5288     * @returns { Promise<void> } Promise that returns no value.
5289     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5290     *                                                                  2. Incorrect parameter types;
5291     *                                                                  3. Parameter verification failed.
5292     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5293     * @throws { BusinessError } 1300002 - This window state is abnormal.
5294     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5295     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
5296     * @syscap SystemCapability.Window.SessionManager
5297     * @atomicservice
5298     * @since 13
5299     */
5300    moveWindowToGlobal(x: number, y: number): Promise<void>;
5301
5302    /**
5303     * Move window to the position relative to current screen.
5304     *
5305     * @param { number } x - Indicate the X-coordinate of the window relative to current screen.
5306     * @param { number } y - Indicate the Y-coordinate of the window relative to current screen.
5307     * @param { ?MoveConfiguration } moveConfiguration - Indicate the window move configuration.
5308     * @returns { Promise<void> } Promise that returns no value.
5309     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5310     *                                                                  2. Incorrect parameter types;
5311     *                                                                  3. Parameter verification failed.
5312     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5313     * @throws { BusinessError } 1300002 - This window state is abnormal.
5314     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5315     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
5316     * @syscap SystemCapability.Window.SessionManager
5317     * @atomicservice
5318     * @since 15
5319     */
5320    moveWindowToGlobal(x: number, y: number, moveConfiguration?: MoveConfiguration): Promise<void>;
5321
5322    /**
5323     * Move window to the position relative to the main screen.
5324     *
5325     * @param { number } x - Indicate the X-coordinate of the window relative to the main screen.
5326     * @param { number } y - Indicate the Y-coordinate of the window relative to the main screen.
5327     * @returns { Promise<void> } Promise that returns no value.
5328     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5329     * @throws { BusinessError } 1300002 - This window state is abnormal.
5330     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5331     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
5332     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1.Invalid parameter range.
5333     * @syscap SystemCapability.Window.SessionManager
5334     * @since 20
5335     */
5336    moveWindowToGlobalDisplay(x: number, y: number): Promise<void>;
5337
5338    /**
5339     * Set the size of a window .
5340     *
5341     * @param { number } width - Indicates the width of the window.
5342     * @param { number } height - Indicates the height of the window.
5343     * @returns { Promise<void> } Promise that returns no value.
5344     * @syscap SystemCapability.WindowManager.WindowManager.Core
5345     * @since 7
5346     * @deprecated since 9
5347     * @useinstead ohos.window.Window#resize
5348     */
5349    resetSize(width: number, height: number): Promise<void>;
5350
5351    /**
5352     * Set the size of a window .
5353     *
5354     * @param { number } width - Indicates the width of the window.
5355     * @param { number } height - Indicates the height of the window.
5356     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5357     * @syscap SystemCapability.WindowManager.WindowManager.Core
5358     * @since 7
5359     * @deprecated since 9
5360     * @useinstead ohos.window.Window#resize
5361     */
5362    resetSize(width: number, height: number, callback: AsyncCallback<void>): void;
5363
5364    /**
5365     * Set the size of a window .
5366     *
5367     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5368     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5369     * @returns { Promise<void> } Promise that returns no value.
5370     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5371     *                                                                  2. Incorrect parameter types;
5372     *                                                                  3. Parameter verification failed.
5373     * @throws { BusinessError } 1300002 - This window state is abnormal.
5374     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5375     * @syscap SystemCapability.WindowManager.WindowManager.Core
5376     * @since 9
5377     */
5378    /**
5379     * Set the size of a window .
5380     *
5381     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5382     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5383     * @returns { Promise<void> } Promise that returns no value.
5384     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5385     *                                                                  2. Incorrect parameter types;
5386     *                                                                  3. Parameter verification failed.
5387     * @throws { BusinessError } 1300002 - This window state is abnormal.
5388     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5389     * @syscap SystemCapability.WindowManager.WindowManager.Core
5390     * @crossplatform
5391     * @since 10
5392     */
5393    /**
5394     * Set the size of a window .
5395     *
5396     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5397     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5398     * @returns { Promise<void> } Promise that returns no value.
5399     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5400     *                                                                  2. Incorrect parameter types;
5401     *                                                                  3. Parameter verification failed.
5402     * @throws { BusinessError } 1300002 - This window state is abnormal.
5403     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5404     * @syscap SystemCapability.WindowManager.WindowManager.Core
5405     * @crossplatform
5406     * @atomicservice
5407     * @since arkts {'1.1':'11', '1.2':'20'}
5408     * @arkts 1.1&1.2
5409     */
5410    resize(width: number, height: number): Promise<void>;
5411
5412    /**
5413     * Set the size of a window .
5414     *
5415     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5416     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5417     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5418     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5419     *                                                                  2. Incorrect parameter types;
5420     *                                                                  3. Parameter verification failed.
5421     * @throws { BusinessError } 1300002 - This window state is abnormal.
5422     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5423     * @syscap SystemCapability.WindowManager.WindowManager.Core
5424     * @since 9
5425     */
5426    /**
5427     * Set the size of a window .
5428     *
5429     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5430     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5431     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5432     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5433     *                                                                  2. Incorrect parameter types;
5434     *                                                                  3. Parameter verification failed.
5435     * @throws { BusinessError } 1300002 - This window state is abnormal.
5436     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5437     * @syscap SystemCapability.WindowManager.WindowManager.Core
5438     * @crossplatform
5439     * @since 10
5440     */
5441    /**
5442     * Set the size of a window .
5443     *
5444     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5445     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5446     * @param { AsyncCallback<void> } callback - Callback used to return the result.
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     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5452     * @syscap SystemCapability.WindowManager.WindowManager.Core
5453     * @crossplatform
5454     * @atomicservice
5455     * @since arkts {'1.1':'11', '1.2':'20'}
5456     * @arkts 1.1&1.2
5457     */
5458    resize(width: number, height: number, callback: AsyncCallback<void>): void;
5459
5460    /**
5461     * Set the size of a window.
5462     *
5463     * @param { number } width - Indicates the width of the window. The width should be greater than 0.
5464     * @param { number } height - Indicates the height of the window. The height should be greater than 0.
5465     * @returns { Promise<void> } Promise that returns no value.
5466     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5467     *                                                                  2. Incorrect parameter types;
5468     *                                                                  3. Parameter verification failed.
5469     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5470     * @throws { BusinessError } 1300002 - This window state is abnormal.
5471     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5472     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
5473     * @syscap SystemCapability.Window.SessionManager
5474     * @atomicservice
5475     * @since 12
5476     */
5477    resizeAsync(width: number, height: number): Promise<void>;
5478
5479    /**
5480     * Set whether to follow parent window layout. Only sub windows and dialogs are available.
5481     *
5482     * @param { boolean } enabled - If true, this window updates the layout follow the parent window.
5483     *                              If false, this window does not update the layout follow the parent window.
5484     * @returns { Promise<void> } Promise that returns no value.
5485     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5486     *                                                                  2. Incorrect parameter types.
5487     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5488     * @throws { BusinessError } 1300002 - This window state is abnormal.
5489     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5490     * @throws { BusinessError } 1300004 - Unauthorized operation.
5491     * @syscap SystemCapability.Window.SessionManager
5492     * @stagemodelonly
5493     * @atomicservice
5494     * @since 17
5495     */
5496    setFollowParentWindowLayoutEnabled(enabled: boolean): Promise<void>;
5497
5498    /**
5499     * Set whether the first level sub window supports maintaining the same relative position with the main window.
5500     *
5501     * @param { boolean } enabled - The value true means the first level sub window supports maintaining
5502     *     the same relative position with the main window, and false means the opposite.
5503     * @param { WindowAnchor } [anchor] - Window anchor point that setting
5504     *     when the relative position between the primary sub window and the main window remains unchanged.
5505     * @param { number } [offsetX] - The x-axis offset
5506     *     between the anchor point of the first level sub window and the anchor point of the main window.
5507     * @param { number } [offsetY] - The y-axis offset
5508     *     between the anchor point of the first level sub window and the anchor point of the main window.
5509     * @returns { Promise<void> } Promise that returns no value.
5510     * @throws { BusinessError } 801 - Capability not supported.
5511     *     Function setRelativePositionToParentWindowEnabled can not work correctly due to limited device capabilities.
5512     * @throws { BusinessError } 1300002 - This window state is abnormal.
5513     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5514     * @throws { BusinessError } 1300004 - Unauthorized operation.
5515     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
5516     * @syscap SystemCapability.Window.SessionManager
5517     * @since 20
5518     */
5519    setRelativePositionToParentWindowEnabled(enabled: boolean, anchor?: WindowAnchor,
5520        offsetX?: number, offsetY?: number): Promise<void>;
5521
5522    /**
5523     * Set the type of a window.
5524     *
5525     * @param { WindowType } type - Indicate the type of a window.
5526     * @returns { Promise<void> } Promise that returns no value.
5527     * @syscap SystemCapability.WindowManager.WindowManager.Core
5528     * @systemapi Hide this for inner system use.
5529     * @since 7
5530     * @deprecated since 9
5531     */
5532    setWindowType(type: WindowType): Promise<void>;
5533
5534    /**
5535     * Set the type of a window.
5536     *
5537     * @param { WindowType } type - Indicate the type of a window.
5538     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5539     * @syscap SystemCapability.WindowManager.WindowManager.Core
5540     * @systemapi Hide this for inner system use.
5541     * @since 7
5542     * @deprecated since 9
5543     */
5544    setWindowType(type: WindowType, callback: AsyncCallback<void>): void;
5545
5546    /**
5547     * Set the mode of a window.
5548     *
5549     * @param { WindowMode } mode - Indicate the mode of a window.
5550     * @returns { Promise<void> } Promise that returns no value.
5551     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5552     *                                                                  2. Incorrect parameter types;
5553     *                                                                  3. Parameter verification failed.
5554     * @throws { BusinessError } 1300002 - This window state is abnormal.
5555     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5556     * @syscap SystemCapability.WindowManager.WindowManager.Core
5557     * @systemapi Hide this for inner system use.
5558     * @since 9
5559     */
5560    /**
5561     * Set the mode of a window.
5562     *
5563     * @param { WindowMode } mode - Indicate the mode of a window.
5564     * @returns { Promise<void> } Promise that returns no value.
5565     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
5566     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5567     *                                                                  2. Incorrect parameter types;
5568     *                                                                  3. Parameter verification failed.
5569     * @throws { BusinessError } 1300002 - This window state is abnormal.
5570     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5571     * @syscap SystemCapability.WindowManager.WindowManager.Core
5572     * @systemapi Hide this for inner system use.
5573     * @since 12
5574     */
5575    setWindowMode(mode: WindowMode): Promise<void>;
5576
5577    /**
5578     * Set the mode of a window.
5579     *
5580     * @param { WindowMode } mode - Indicate the mode of a window.
5581     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5582     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5583     *                                                                  2. Incorrect parameter types;
5584     *                                                                  3. Parameter verification failed.
5585     * @throws { BusinessError } 1300002 - This window state is abnormal.
5586     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5587     * @syscap SystemCapability.WindowManager.WindowManager.Core
5588     * @systemapi Hide this for inner system use.
5589     * @since 9
5590     */
5591    /**
5592     * Set the mode of a window.
5593     *
5594     * @param { WindowMode } mode - Indicate the mode of a window.
5595     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5596     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
5597     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5598     *                                                                  2. Incorrect parameter types;
5599     *                                                                  3. Parameter verification failed.
5600     * @throws { BusinessError } 1300002 - This window state is abnormal.
5601     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5602     * @syscap SystemCapability.WindowManager.WindowManager.Core
5603     * @systemapi Hide this for inner system use.
5604     * @since 12
5605     */
5606    setWindowMode(mode: WindowMode, callback: AsyncCallback<void>): void;
5607
5608    /**
5609     * Get the properties of current window
5610     *
5611     * @param { AsyncCallback<WindowProperties> } callback - Callback used to return the window properties.
5612     * @syscap SystemCapability.WindowManager.WindowManager.Core
5613     * @since 6
5614     * @deprecated since 9
5615     * @useinstead ohos.window.Window#getWindowProperties
5616     */
5617    getProperties(callback: AsyncCallback<WindowProperties>): void;
5618
5619    /**
5620     * Get the window rectangular area quadruple {left,top,weight,height}, left and top represent relative to screen coordinates
5621     * and are affected by parent window scaling, weight and height are the scaling width and height.
5622     *
5623     * @returns { Rect } The quadruple {left,top,weight,height} represents respectively the X-coordinate
5624     * and Y-coordinate of the window relative to current screen, the scaled window width and scaled window height.
5625     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5626     * @throws { BusinessError } 1300002 - This window state is abnormal.
5627     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5628     * @syscap SystemCapability.Window.SessionManager
5629     * @atomicservice
5630     * @since arkts {'1.1':'13', '1.2':'20'}
5631     * @arkts 1.1&1.2
5632     */
5633    getGlobalRect(): Rect;
5634
5635    /**
5636     * Get the properties of current window
5637     *
5638     * @returns { Promise<WindowProperties> } Promise used to return the window properties.
5639     * @syscap SystemCapability.WindowManager.WindowManager.Core
5640     * @since 6
5641     * @deprecated since 9
5642     * @useinstead ohos.window.Window#getWindowProperties
5643     */
5644    getProperties(): Promise<WindowProperties>;
5645
5646    /**
5647     * Get the properties of current window
5648     *
5649     * @returns { WindowProperties } Return the window properties.
5650     * @throws { BusinessError } 1300002 - This window state is abnormal.
5651     * @syscap SystemCapability.WindowManager.WindowManager.Core
5652     * @since 9
5653     */
5654    /**
5655     * Get the properties of current window
5656     *
5657     * @returns { WindowProperties } Return the window properties.
5658     * @throws { BusinessError } 1300002 - This window state is abnormal.
5659     * @syscap SystemCapability.WindowManager.WindowManager.Core
5660     * @crossplatform
5661     * @since 10
5662     */
5663    /**
5664     * Get the properties of current window
5665     *
5666     * @returns { WindowProperties } Return the window properties.
5667     * @throws { BusinessError } 1300002 - This window state is abnormal.
5668     * @syscap SystemCapability.WindowManager.WindowManager.Core
5669     * @crossplatform
5670     * @atomicservice
5671     * @since arkts {'1.1':'11', '1.2':'20'}
5672     * @arkts 1.1&1.2
5673     */
5674    getWindowProperties(): WindowProperties;
5675
5676    /**
5677     * Get the window density of current window.
5678     *
5679     * @returns { WindowDensityInfo } Return system density, default density and custom density of window.
5680     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5681     * @throws { BusinessError } 1300002 - This window state is abnormal.
5682     * @syscap SystemCapability.Window.SessionManager
5683     * @atomicservice
5684     * @since 15
5685     */
5686    getWindowDensityInfo(): WindowDensityInfo;
5687
5688    /**
5689     * Set whether the current window follows the default density of its screen.
5690     *
5691     * @param { boolean } enabled - Use default density if true, or follow system density change if false.
5692     * @throws { BusinessError } 202 - Permission verification
5693     *     failed. A non-system application calls a system API.
5694     * @throws { BusinessError } 801 - Capability not supported.
5695     *     Failed to call the API due to limited device capabilities.
5696     * @throws { BusinessError } 1300002 - This window state is abnormal.
5697     * @syscap SystemCapability.Window.SessionManager
5698     * @systemapi Hide this for inner system use.
5699     * @since 20
5700     */
5701    setDefaultDensityEnabled(enabled: boolean): void;
5702
5703    /**
5704     * Set window container background color in the active and inactive states.
5705     *
5706     * @param { string } activeColor - window container color in active.
5707     * @param { string } inactiveColor - window container color in inactive.
5708     * @throws { BusinessError } 202 - Permission verification
5709     * failed. A non-system application calls a system API.
5710     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5711     * @throws { BusinessError } 1300002 - This window state is abnormal.
5712     * @throws { BusinessError } 1300004 - Unauthorized operation.
5713     * @syscap SystemCapability.Window.SessionManager
5714     * @systemapi Hide this for inner system use.
5715     * @since 20
5716     */
5717    setWindowContainerModalColor(activeColor: string, inactiveColor: string): void;
5718
5719    /**
5720     * Determine whether the window spans multiple screens and displays in full screen mode.
5721     *
5722     * @returns { Promise<boolean> } Whether the window spans multiple screens and displays in full screen mode.
5723     * The value true means that the window spans multiple screens and displays in full screen mode,and false means the opposite.
5724     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
5725     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5726     * @throws { BusinessError } 1300002 - This window state is abnormal.
5727     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5728     * @throws { BusinessError } 1300004 - Unauthorized operation.
5729     * @syscap SystemCapability.Window.SessionManager
5730     * @systemapi Hide this for inner system use.
5731     * @since 20
5732     */
5733    isMainWindowFullScreenAcrossDisplays(): Promise<boolean>;
5734
5735    /**
5736     * Get the avoid area
5737     *
5738     * @param { AvoidAreaType } type - Type of the area
5739     * @param { AsyncCallback<AvoidArea> } callback - Callback used to return the area.
5740     * @syscap SystemCapability.WindowManager.WindowManager.Core
5741     * @since 7
5742     * @deprecated since 9
5743     * @useinstead ohos.window.Window#getWindowAvoidArea
5744     */
5745    getAvoidArea(type: AvoidAreaType, callback: AsyncCallback<AvoidArea>): void;
5746
5747    /**
5748     * Get the avoid area
5749     *
5750     * @param { AvoidAreaType } type - Type of the area
5751     * @returns { Promise<AvoidArea> } Area where the window cannot be displayed.
5752     * @syscap SystemCapability.WindowManager.WindowManager.Core
5753     * @since 7
5754     * @deprecated since 9
5755     * @useinstead ohos.window.Window#getWindowAvoidArea
5756     */
5757    getAvoidArea(type: AvoidAreaType): Promise<AvoidArea>;
5758
5759    /**
5760     * Get the avoid area
5761     *
5762     * @param { AvoidAreaType } type - Type of the area
5763     * @returns { AvoidArea } Area where the window cannot be displayed.
5764     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5765     *                                                                  2. Incorrect parameter types;
5766     *                                                                  3. Parameter verification failed.
5767     * @throws { BusinessError } 1300002 - This window state is abnormal.
5768     * @syscap SystemCapability.WindowManager.WindowManager.Core
5769     * @since 9
5770     */
5771    /**
5772     * Get the avoid area
5773     *
5774     * @param { AvoidAreaType } type - Type of the area
5775     * @returns { AvoidArea } Area where the window cannot be displayed.
5776     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5777     *                                                                  2. Incorrect parameter types;
5778     *                                                                  3. Parameter verification failed.
5779     * @throws { BusinessError } 1300002 - This window state is abnormal.
5780     * @syscap SystemCapability.WindowManager.WindowManager.Core
5781     * @atomicservice
5782     * @since 11
5783     */
5784    /**
5785     * Get the avoid area
5786     *
5787     * @param { AvoidAreaType } type - Type of the area
5788     * @returns { AvoidArea } Area where the window cannot be displayed.
5789     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5790     *                                                                  2. Incorrect parameter types;
5791     *                                                                  3. Parameter verification failed.
5792     * @throws { BusinessError } 1300002 - This window state is abnormal.
5793     * @syscap SystemCapability.WindowManager.WindowManager.Core
5794     * @crossplatform
5795     * @atomicservice
5796     * @since arkts {'1.1':'12', '1.2':'20'}
5797     * @arkts 1.1&1.2
5798     */
5799    getWindowAvoidArea(type: AvoidAreaType): AvoidArea;
5800
5801    /**
5802     * Set whether system window type could obtain avoid area.
5803     *
5804     * @param { boolean } enabled - If true, the system window type can obtain avoid area. If false, the avoid area obtained by the system window type will always be empty.
5805     * @returns { Promise<void> } Promise that returns no value.
5806     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5807     * @throws { BusinessError } 1300002 - This window state is abnormal.
5808     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5809     * @throws { BusinessError } 1300004 - Unauthorized operation.
5810     * @syscap SystemCapability.Window.SessionManager
5811     * @atomicservice
5812     * @since 18
5813     */
5814    setSystemAvoidAreaEnabled(enabled: boolean): Promise<void>;
5815
5816    /**
5817     * Get whether system window type could obtain avoid area.
5818     *
5819     * @returns { boolean } enable - If true, the system window type can obtain avoid area. If false, the avoid area obtained by the system window type will always be empty.
5820     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
5821     * @throws { BusinessError } 1300002 - This window state is abnormal.
5822     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5823     * @throws { BusinessError } 1300004 - Unauthorized operation.
5824     * @syscap SystemCapability.Window.SessionManager
5825     * @atomicservice
5826     * @since 18
5827     */
5828    isSystemAvoidAreaEnabled(): boolean;
5829
5830    /**
5831     * Set the flag of the window is shown full screen
5832     *
5833     * @param { boolean } isFullScreen - The flag of the window is shown full screen
5834     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5835     * @syscap SystemCapability.WindowManager.WindowManager.Core
5836     * @since 6
5837     * @deprecated since 9
5838     * @useinstead ohos.window.Window#setWindowSystemBarEnable
5839     */
5840    setFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void;
5841
5842    /**
5843     * Set the flag of the window is shown full screen
5844     *
5845     * @param { boolean } isFullScreen - The flag of the window is shown full screen
5846     * @returns { Promise<void> } Promise that returns no value.
5847     * @syscap SystemCapability.WindowManager.WindowManager.Core
5848     * @since 6
5849     * @deprecated since 9
5850     * @useinstead ohos.window.Window#setWindowSystemBarEnable
5851     */
5852    setFullScreen(isFullScreen: boolean): Promise<void>;
5853
5854    /**
5855     * Set the property of the window can layout in full screen
5856     *
5857     * @param { boolean } isLayoutFullScreen - The window can layout in full screen
5858     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5859     * @syscap SystemCapability.WindowManager.WindowManager.Core
5860     * @since 7
5861     * @deprecated since 9
5862     * @useinstead ohos.window.Window#setWindowLayoutFullScreen
5863     */
5864    setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void;
5865
5866    /**
5867     * Set the property of the window can layout in full screen
5868     *
5869     * @param { boolean } isLayoutFullScreen - The window can layout in full screen
5870     * @returns { Promise<void> } Promise that returns no value.
5871     * @syscap SystemCapability.WindowManager.WindowManager.Core
5872     * @since 7
5873     * @deprecated since 9
5874     * @useinstead ohos.window.Window#setWindowLayoutFullScreen
5875     */
5876    setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>;
5877
5878    /**
5879     * Set the property of the window can layout in full screen
5880     *
5881     * @param { boolean } isLayoutFullScreen - The window can layout in full screen
5882     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5883     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5884     *                                                                  2. Incorrect parameter types.
5885     * @throws { BusinessError } 1300002 - This window state is abnormal.
5886     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5887     * @syscap SystemCapability.WindowManager.WindowManager.Core
5888     * @since 9
5889     */
5890    /**
5891     * Set the property of the window can layout in full screen
5892     *
5893     * @param { boolean } isLayoutFullScreen - The window can layout in full screen
5894     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5895     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5896     *                                                                  2. Incorrect parameter types.
5897     * @throws { BusinessError } 1300002 - This window state is abnormal.
5898     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5899     * @syscap SystemCapability.WindowManager.WindowManager.Core
5900     * @crossplatform
5901     * @atomicservice
5902     * @since 12
5903     * @deprecated since 12
5904     * @useinstead ohos.window.Window#setWindowLayoutFullScreen
5905     */
5906    setWindowLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void;
5907
5908    /**
5909     * Sets whether the main window layout or the child window layout is immersive.
5910     *
5911     * @param { boolean } isLayoutFullScreen - Whether the window layout is immersive
5912     * @returns { Promise<void> } Promise that returns no value.
5913     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5914     *                                                                  2. Incorrect parameter types.
5915     * @throws { BusinessError } 1300002 - This window state is abnormal.
5916     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5917     * @syscap SystemCapability.WindowManager.WindowManager.Core
5918     * @since 9
5919     */
5920    /**
5921     * Sets whether the main window layout or the child window layout is immersive.
5922     *
5923     * @param { boolean } isLayoutFullScreen - Whether the window layout is immersive
5924     * @returns { Promise<void> } Promise that returns no value.
5925     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5926     *                                                                  2. Incorrect parameter types.
5927     * @throws { BusinessError } 1300002 - This window state is abnormal.
5928     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5929     * @syscap SystemCapability.WindowManager.WindowManager.Core
5930     * @crossplatform
5931     * @atomicservice
5932     * @since arkts {'1.1':'12', '1.2':'20'}
5933     * @arkts 1.1&1.2
5934     */
5935    setWindowLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>;
5936
5937    /**
5938     * Set the system bar to have visible.
5939     *
5940     * @param { Array<'status' | 'navigation'> } names - The set of system bar
5941     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5942     * @syscap SystemCapability.WindowManager.WindowManager.Core
5943     * @since 7
5944     * @deprecated since 9
5945     * @useinstead ohos.window.Window#setWindowSystemBarEnable
5946     */
5947    setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback<void>): void;
5948
5949    /**
5950     * Set the system bar to have visible.
5951     *
5952     * @param { Array<'status' | 'navigation'> } names - The set of system bar
5953     * @returns { Promise<void> } Promise that returns no value.
5954     * @syscap SystemCapability.WindowManager.WindowManager.Core
5955     * @since 7
5956     * @deprecated since 9
5957     * @useinstead ohos.window.Window#setWindowSystemBarEnable
5958     */
5959    setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void>;
5960
5961    /**
5962     * Set the system bar to have visible.
5963     *
5964     * @param { Array<'status' | 'navigation'> } names - The set of system bar
5965     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5966     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5967     *                                                                  2. Incorrect parameter types.
5968     * @throws { BusinessError } 1300002 - This window state is abnormal.
5969     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5970     * @syscap SystemCapability.WindowManager.WindowManager.Core
5971     * @since 9
5972     */
5973    /**
5974     * Set the system bar to have visible.
5975     *
5976     * @param { Array<'status' | 'navigation'> } names - The set of system bar
5977     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5978     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
5979     *                                                                  2. Incorrect parameter types.
5980     * @throws { BusinessError } 1300002 - This window state is abnormal.
5981     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5982     * @syscap SystemCapability.WindowManager.WindowManager.Core
5983     * @crossplatform
5984     * @since 10
5985     */
5986    /**
5987     * Set the system bar to have visible.
5988     *
5989     * @param { Array<'status' | 'navigation'> } names - The set of system bar
5990     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5991     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Mandatory parameters are left unspecified;
5992     *                                                                  2.Incorrect parameter types.
5993     * @throws { BusinessError } 1300002 - This window state is abnormal.
5994     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
5995     * @syscap SystemCapability.WindowManager.WindowManager.Core
5996     * @crossplatform
5997     * @atomicservice
5998     * @since 12
5999     * @deprecated since 12
6000     * @useinstead ohos.window.Window#setWindowSystemBarEnable
6001     */
6002    setWindowSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback<void>): void;
6003
6004    /**
6005     * Sets whether to show the system bar of the main window.
6006     *
6007     * @param { Array<'status' | 'navigation'> } names - The set of system bar types
6008     * @returns { Promise<void> } Promise that returns no value.
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     * @since 9
6015     */
6016    /**
6017     * Sets whether to show the system bar of the main window.
6018     *
6019     * @param { Array<'status' | 'navigation'> } names - The set of system bar types
6020     * @returns { Promise<void> } Promise that returns no value.
6021     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6022     *                                                                  2. Incorrect parameter types.
6023     * @throws { BusinessError } 1300002 - This window state is abnormal.
6024     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6025     * @syscap SystemCapability.WindowManager.WindowManager.Core
6026     * @crossplatform
6027     * @since 10
6028     */
6029    /**
6030     * Sets whether to show the system bar of the main window.
6031     *
6032     * @param { Array<'status' | 'navigation'> } names - The set of system bar types
6033     * @returns { Promise<void> } Promise that returns no value.
6034     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Mandatory parameters are left unspecified;
6035     *                                                                  2.Incorrect parameter types.
6036     * @throws { BusinessError } 1300002 - This window state is abnormal.
6037     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6038     * @syscap SystemCapability.WindowManager.WindowManager.Core
6039     * @crossplatform
6040     * @atomicservice
6041     * @since arkts {'1.1':'12', '1.2':'20'}
6042     * @arkts 1.1&1.2
6043     */
6044    setWindowSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void>;
6045
6046    /**
6047     * Sets whether to show the specific system bar of the main window.
6048     *
6049     * @param {SpecificSystemBar} name - Type of the system bar to be shown or hidden
6050     * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false.
6051     * @returns { Promise<void> } Promise that returns no value.
6052     * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6053     *                                                                2. Incorrect parameter types.
6054     * @throws {BusinessError} 1300002 - This window state is abnormal.
6055     * @throws {BusinessError} 1300003 - This window manager service works abnormally.
6056     * @syscap SystemCapability.Window.SessionManager
6057     * @atomicservice
6058     * @since 11
6059     */
6060    /**
6061     * Sets whether to show the specific system bar of the main window.
6062     *
6063     * @param {SpecificSystemBar} name - Type of the system bar to be shown or hidden
6064     * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false.
6065     * @param {boolean} enableAnimation - Whether using animation during this setting, using animation if true or not using animation if false.
6066     * @returns { Promise<void> } Promise that returns no value.
6067     * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6068     *                                                                2. Incorrect parameter types.
6069     * @throws {BusinessError} 1300002 - This window state is abnormal.
6070     * @throws {BusinessError} 1300003 - This window manager service works abnormally.
6071     * @syscap SystemCapability.Window.SessionManager
6072     * @crossplatform
6073     * @atomicservice
6074     * @since arkts {'1.1':'12', '1.2':'20'}
6075     * @arkts 1.1&1.2
6076     */
6077    setSpecificSystemBarEnabled(name: SpecificSystemBar, enable: boolean, enableAnimation?: boolean): Promise<void>;
6078
6079    /**
6080     * Set the properties of system bar
6081     *
6082     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6083     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6084     * @syscap SystemCapability.WindowManager.WindowManager.Core
6085     * @since 6
6086     * @deprecated since 9
6087     * @useinstead ohos.window.Window#setWindowSystemBarProperties
6088     */
6089    setSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void;
6090
6091    /**
6092     * Set the properties of system bar
6093     *
6094     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6095     * @returns { Promise<void> } Promise that returns no value.
6096     * @syscap SystemCapability.WindowManager.WindowManager.Core
6097     * @since 6
6098     * @deprecated since 9
6099     * @useinstead ohos.window.Window#setWindowSystemBarProperties
6100     */
6101    setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>;
6102
6103    /**
6104     * Set the properties of system bar
6105     *
6106     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6107     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6108     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6109     *                                                                  2. Incorrect parameter types.
6110     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6111     * @throws { BusinessError } 1300002 - This window state is abnormal.
6112     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6113     * @syscap SystemCapability.WindowManager.WindowManager.Core
6114     * @since 9
6115     */
6116    /**
6117     * Set the properties of system bar
6118     *
6119     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6120     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6121     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6122     *                                                                  2. Incorrect parameter types.
6123     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6124     * @throws { BusinessError } 1300002 - This window state is abnormal.
6125     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6126     * @syscap SystemCapability.WindowManager.WindowManager.Core
6127     * @atomicservice
6128     * @since 12
6129     * @deprecated since 12
6130     * @useinstead ohos.window.Window#setWindowSystemBarProperties
6131     */
6132    setWindowSystemBarProperties(systemBarProperties: SystemBarProperties, callback: AsyncCallback<void>): void;
6133
6134    /**
6135     * Set the properties of system bar
6136     *
6137     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6138     * @returns { Promise<void> } Promise that returns no value.
6139     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6140     *                                                                  2. Incorrect parameter types.
6141     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6142     * @throws { BusinessError } 1300002 - This window state is abnormal.
6143     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6144     * @syscap SystemCapability.WindowManager.WindowManager.Core
6145     * @since 9
6146     */
6147    /**
6148     * Set the properties of system bar
6149     *
6150     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6151     * @returns { Promise<void> } Promise that returns no value.
6152     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6153     *                                                                  2. Incorrect parameter types.
6154     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6155     * @throws { BusinessError } 1300002 - This window state is abnormal.
6156     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6157     * @syscap SystemCapability.WindowManager.WindowManager.Core
6158     * @atomicservice
6159     * @since 12
6160     */
6161    /**
6162     * Set the properties of system bar
6163     *
6164     * @param { SystemBarProperties } systemBarProperties - The properties of system bar
6165     * @returns { Promise<void> } Promise that returns no value.
6166     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6167     *                                                                  2. Incorrect parameter types.
6168     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6169     * @throws { BusinessError } 1300002 - This window state is abnormal.
6170     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6171     * @syscap SystemCapability.WindowManager.WindowManager.Core
6172     * @crossplatform
6173     * @atomicservice
6174     * @since arkts {'1.1':'20', '1.2':'20'}
6175     * @arkts 1.1&1.2
6176     */
6177    setWindowSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<void>;
6178
6179    /**
6180     * Get the properties of system bar
6181     *
6182     * @returns { SystemBarProperties } Return system bar properties.
6183     * @throws { BusinessError } 1300002 - This window state is abnormal.
6184     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6185     * @throws { BusinessError } 1300004 - Unauthorized operation.
6186     * @syscap SystemCapability.WindowManager.WindowManager.Core
6187     * @atomicservice
6188     * @since 12
6189     */
6190    getWindowSystemBarProperties(): SystemBarProperties;
6191
6192    /**
6193     * Set the content color of the status bar.
6194     *
6195     * @param { ColorMetrics } color - Content color of the status bar
6196     * @returns { Promise<void> } Promise that returns no value.
6197     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6198     *                                                                  2. Incorrect parameter types.
6199     *                                                                  3. Parameter verification failed.
6200     * @throws { BusinessError } 801 - Capability not supported on this device.
6201     * @throws { BusinessError } 1300002 - This window state is abnormal.
6202     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6203     * @syscap SystemCapability.Window.SessionManager
6204     * @atomicservice
6205     * @since 18
6206     */
6207    setStatusBarColor(color: ColorMetrics): Promise<void>;
6208
6209    /**
6210     * Get the properties of the status bar.
6211     *
6212     * @returns { StatusBarProperty } Return status bar properties.
6213     * @throws { BusinessError } 801 - Capability not supported on this device.
6214     * @throws { BusinessError } 1300002 - This window state is abnormal.
6215     * @syscap SystemCapability.Window.SessionManager
6216     * @atomicservice
6217     * @since 18
6218     */
6219    getStatusBarProperty(): StatusBarProperty;
6220
6221    /**
6222     * Set whether to disable the gesture back function.
6223     *
6224     * @param { boolean } enabled - If true then enable the gesture back function, false then disable the gesture back function.
6225     * @returns { Promise<void> } Promise that returns no value.
6226     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6227     *                                                                  2. Incorrect parameter types.
6228     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6229     * @throws { BusinessError } 1300002 - This window state is abnormal.
6230     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6231     * @throws { BusinessError } 1300004 - Unauthorized operation.
6232     * @syscap SystemCapability.Window.SessionManager
6233     * @atomicservice
6234     * @since 13
6235     */
6236    setGestureBackEnabled(enabled: boolean): Promise<void>;
6237
6238    /**
6239     * Get whether the gesture back function is currently disabled.
6240     *
6241     * @returns { boolean } enabled - If true then the gesture back function is currently enabled, false then the gesture back function is currently disabled.
6242     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
6243     * @throws { BusinessError } 1300002 - This window state is abnormal.
6244     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6245     * @throws { BusinessError } 1300004 - Unauthorized operation.
6246     * @syscap SystemCapability.Window.SessionManager
6247     * @atomicservice
6248     * @since 13
6249     */
6250    isGestureBackEnabled(): boolean;
6251
6252    /**
6253     * Set the preferred orientation config of the window
6254     *
6255     * @param { Orientation } orientation - The orientation config of the window
6256     * @returns { Promise<void> } Promise that returns no value.
6257     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6258     *                                                                  2. Incorrect parameter types;
6259     *                                                                  3. Parameter verification failed.
6260     * @throws { BusinessError } 1300002 - This window state is abnormal.
6261     * @syscap SystemCapability.WindowManager.WindowManager.Core
6262     * @since 9
6263     */
6264    /**
6265     * Set the preferred orientation config of the window
6266     *
6267     * @param { Orientation } orientation - The orientation config of the window
6268     * @returns { Promise<void> } Promise that returns no value.
6269     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6270     *                                                                  2. Incorrect parameter types;
6271     *                                                                  3. Parameter verification failed.
6272     * @throws { BusinessError } 1300002 - This window state is abnormal.
6273     * @syscap SystemCapability.WindowManager.WindowManager.Core
6274     * @crossplatform
6275     * @since 10
6276     */
6277    /**
6278     * Sets the preferred orientation for the main window.
6279     * This API uses a promise to return the result.
6280     * It does not take effect on devices that do not support rotation with the sensor, on 2-in-1 devices or for the child window.
6281     *
6282     * @param { Orientation } orientation - The orientation config of the window
6283     * @returns { Promise<void> } Promise that returns no value.
6284     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6285     *                                                                  2. Incorrect parameter types;
6286     *                                                                  3. Parameter verification failed.
6287     * @throws { BusinessError } 1300002 - This window state is abnormal.
6288     * @syscap SystemCapability.WindowManager.WindowManager.Core
6289     * @crossplatform
6290     * @atomicservice
6291     * @since arkts {'1.1':'11', '1.2':'20'}
6292     * @arkts 1.1&1.2
6293     */
6294    setPreferredOrientation(orientation: Orientation): Promise<void>;
6295
6296    /**
6297     * Set the preferred orientation config of the window
6298     *
6299     * @param { Orientation } orientation - The orientation config of the window
6300     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6301     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6302     *                                                                  2. Incorrect parameter types;
6303     *                                                                  3. Parameter verification failed.
6304     * @throws { BusinessError } 1300002 - This window state is abnormal.
6305     * @syscap SystemCapability.WindowManager.WindowManager.Core
6306     * @since 9
6307     */
6308    /**
6309     * Set the preferred orientation config of the window
6310     *
6311     * @param { Orientation } orientation - The orientation config of the window
6312     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6313     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6314     *                                                                  2. Incorrect parameter types;
6315     *                                                                  3. Parameter verification failed.
6316     * @throws { BusinessError } 1300002 - This window state is abnormal.
6317     * @syscap SystemCapability.WindowManager.WindowManager.Core
6318     * @crossplatform
6319     * @since 10
6320     */
6321    /**
6322     * Sets the preferred orientation for the main window.
6323     * This API uses an asynchronous callback to return the result.
6324     * It does not take effect on devices that do not support rotation with the sensor, on 2-in-1 devices or for the child window.
6325     *
6326     * @param { Orientation } orientation - The orientation config of the window
6327     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6328     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6329     *                                                                  2. Incorrect parameter types;
6330     *                                                                  3. Parameter verification failed.
6331     * @throws { BusinessError } 1300002 - This window state is abnormal.
6332     * @syscap SystemCapability.WindowManager.WindowManager.Core
6333     * @crossplatform
6334     * @atomicservice
6335     * @since arkts {'1.1':'11', '1.2':'20'}
6336     * @arkts 1.1&1.2
6337     */
6338    setPreferredOrientation(orientation: Orientation, callback: AsyncCallback<void>): void;
6339
6340    /**
6341     * Obtains the orientation of the main window.
6342     * This API can be called only by the main window.
6343     *
6344     * @returns { Orientation } orientation - The orientation config of the window
6345     * @throws { BusinessError } 1300002 - This window state is abnormal.
6346     * @syscap SystemCapability.WindowManager.WindowManager.Core
6347     * @atomicservice
6348     * @since 12
6349     */
6350    getPreferredOrientation(): Orientation;
6351
6352    /**
6353     * Loads the content of a page, with its path in the current project specified, to this window,
6354     *     and transfers the state attribute to the page through a local storage.
6355     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6356     * If called multiple times, this API will destroy the existing page content (UIContent)
6357     *     before loading the new content. Exercise caution when using it.
6358     *
6359     * @param { string } path - Path of the page to which the content will be loaded
6360     * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window
6361     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6362     * @throws { BusinessError } 401 - Parameter error. Possible cause:
6363     *     1. Mandatory parameters are left unspecified;
6364     *     2. Incorrect parameter types;
6365     *     3. Invalid path parameter.
6366     * @throws { BusinessError } 1300002 - This window state is abnormal.
6367     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6368     * @syscap SystemCapability.WindowManager.WindowManager.Core
6369     * @stagemodelonly
6370     * @since 9
6371     */
6372    /**
6373     * Loads the content of a page, with its path in the current project specified, to this window,
6374     *     and transfers the state attribute to the page through a local storage.
6375     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6376     * If called multiple times, this API will destroy the existing page content (UIContent)
6377     *     before loading the new content. Exercise caution when using it.
6378     *
6379     * @param { string } path - Path of the page to which the content will be loaded
6380     * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window
6381     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6382     * @throws { BusinessError } 401 - Parameter error. Possible cause:
6383     *     1. Mandatory parameters are left unspecified;
6384     *     2. Incorrect parameter types;
6385     *     3. Invalid path parameter.
6386     * @throws { BusinessError } 1300002 - This window state is abnormal.
6387     * @syscap SystemCapability.WindowManager.WindowManager.Core
6388     * @stagemodelonly
6389     * @crossplatform
6390     * @since 10
6391     */
6392    /**
6393     * Loads the content of a page, with its path in the current project specified,
6394     *     to this window, and transfers the state attribute to the page through a local storage.
6395     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6396     * If called multiple times, this API will destroy the existing page content (UIContent)
6397     *     before loading the new content. Exercise caution when using it.
6398     *
6399     * @param { string } path - Path of the page from which the content will be loaded.
6400     *     The path is configured in the main_pages.json file of the project.
6401     * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page.
6402     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6403     * @throws { BusinessError } 401 - Parameter error. Possible cause:
6404     *     1. Mandatory parameters are left unspecified;
6405     *     2. Incorrect parameter types;
6406     *     3. Invalid path parameter.
6407     * @throws { BusinessError } 1300002 - This window state is abnormal.
6408     * @syscap SystemCapability.WindowManager.WindowManager.Core
6409     * @stagemodelonly
6410     * @crossplatform
6411     * @atomicservice
6412     * @since arkts {'1.1':'11', '1.2':'20'}
6413     * @arkts 1.1&1.2
6414     */
6415    loadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void;
6416
6417    /**
6418     * Loads the content of a page, with its path in the current project specified, to this window,
6419     *     and transfers the state attribute to the page through a local storage.
6420     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6421     * If called multiple times, this API will destroy the existing page content (UIContent)
6422     *     before loading the new content. Exercise caution when using it.
6423     *
6424     * @param { string } path - Path of the page to which the content will be loaded
6425     * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window
6426     * @returns { Promise<void> } Promise that returns no value.
6427     * @throws { BusinessError } 401 - Parameter error. Possible cause:
6428     *     1. Mandatory parameters are left unspecified;
6429     *     2. Incorrect parameter types;
6430     *     3. Invalid path parameter.
6431     * @throws { BusinessError } 1300002 - This window state is abnormal.
6432     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6433     * @syscap SystemCapability.WindowManager.WindowManager.Core
6434     * @stagemodelonly
6435     * @since 9
6436     */
6437    /**
6438     * Loads the content of a page, with its path in the current project specified, to this window,
6439     *     and transfers the state attribute to the page through a local storage.
6440     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6441     * If called multiple times, this API will destroy the existing page content (UIContent)
6442     *     before loading the new content. Exercise caution when using it.
6443     *
6444     * @param { string } path - Path of the page to which the content will be loaded
6445     * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window
6446     * @returns { Promise<void> } Promise that returns no value.
6447     * @throws { BusinessError } 401 - Parameter error. Possible cause:
6448     *     1. Mandatory parameters are left unspecified;
6449     *     2. Incorrect parameter types;
6450     *     3. Invalid path parameter.
6451     * @throws { BusinessError } 1300002 - This window state is abnormal.
6452     * @syscap SystemCapability.WindowManager.WindowManager.Core
6453     * @stagemodelonly
6454     * @crossplatform
6455     * @since 10
6456     */
6457    /**
6458     * Loads the content of a page, with its path in the current project specified, to this window,
6459     *     and transfers the state attribute to the page through a local storage.
6460     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6461     * If called multiple times, this API will destroy the existing page content (UIContent)
6462     *     before loading the new content. Exercise caution when using it.
6463     *
6464     * @param { string } path - 	Path of the page from which the content will be loaded.
6465     *     The path is configured in the main_pages.json file of the project.
6466     * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page.
6467     * @returns { Promise<void> } Promise that returns no value.
6468     * @throws { BusinessError } 401 - Parameter error. Possible cause:
6469     *     1. Mandatory parameters are left unspecified;
6470     *     2. Incorrect parameter types;
6471     *     3. Invalid path parameter.
6472     * @throws { BusinessError } 1300002 - This window state is abnormal.
6473     * @syscap SystemCapability.WindowManager.WindowManager.Core
6474     * @stagemodelonly
6475     * @crossplatform
6476     * @atomicservice
6477     * @since arkts {'1.1':'11', '1.2':'20'}
6478     * @arkts 1.1&1.2
6479     */
6480    loadContent(path: string, storage: LocalStorage): Promise<void>;
6481
6482    /**
6483     * Loads content from a page to this window. This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
6484     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it.
6485     *
6486     * @param { string } path - Path of the page to which the content will be loaded
6487     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6488     * @syscap SystemCapability.WindowManager.WindowManager.Core
6489     * @since 7
6490     * @deprecated since 9
6491     * @useinstead ohos.window.Window#setUIContent
6492     */
6493    loadContent(path: string, callback: AsyncCallback<void>): void;
6494
6495    /**
6496     * Loads content from a page to this window. This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
6497     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it.
6498     *
6499     * @param { string } path - Path of the page to which the content will be loaded
6500     * @returns { Promise<void> } Promise that returns no value.
6501     * @syscap SystemCapability.WindowManager.WindowManager.Core
6502     * @since 7
6503     * @deprecated since 9
6504     * @useinstead ohos.window.Window#setUIContent
6505     */
6506    loadContent(path: string): Promise<void>;
6507
6508    /**
6509     * Get the UIContext associate with the window content.
6510     *
6511     * @returns { UIContext } the object of UIContext.
6512     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
6513     *                                                                   2. Incorrect parameter types;
6514     *                                                                   3. Parameter verification failed.
6515     * @throws { BusinessError } 1300002 - This window state is abnormal.
6516     * @syscap SystemCapability.WindowManager.WindowManager.Core
6517     * @stagemodelonly
6518     * @crossplatform
6519     * @since 10
6520     */
6521    /**
6522     * Obtain a UIContext instance.
6523     *
6524     * @returns { UIContext } UIContext instance obtained.
6525     * @throws { BusinessError } 1300002 - This window state is abnormal.
6526     * @syscap SystemCapability.WindowManager.WindowManager.Core
6527     * @stagemodelonly
6528     * @crossplatform
6529     * @atomicservice
6530     * @since arkts {'1.1':'11', '1.2':'20'}
6531     * @arkts 1.1&1.2
6532     */
6533    getUIContext() : UIContext;
6534
6535    /**
6536     * Loads content
6537     *
6538     * @param { string } path - Path of the page to which the content will be loaded
6539     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6540     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6541     *                                                                  2. Incorrect parameter types.
6542     * @throws { BusinessError } 1300002 - This window state is abnormal.
6543     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6544     * @syscap SystemCapability.WindowManager.WindowManager.Core
6545     * @since 9
6546     */
6547    /**
6548     * Loads content
6549     *
6550     * @param { string } path - Path of the page to which the content will be loaded
6551     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6552     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6553     *                                                                  2. Incorrect parameter types.
6554     * @throws { BusinessError } 1300002 - This window state is abnormal.
6555     * @syscap SystemCapability.WindowManager.WindowManager.Core
6556     * @crossplatform
6557     * @since 10
6558     */
6559    /**
6560     * Loads the content of a page, with its path in the current project specified, to this window.
6561     * This API uses an asynchronous callback to return the result.
6562     *
6563     * @param { string } path - Path of the page from which the content will be loaded.
6564     *                          In the stage model, the path is configured in the main_pages.json file of the project.
6565     *                          In the FA model, the path is configured in the config.json file of the project.
6566     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6567     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6568     *                                                                  2. Incorrect parameter types.
6569     * @throws { BusinessError } 1300002 - This window state is abnormal.
6570     * @syscap SystemCapability.WindowManager.WindowManager.Core
6571     * @crossplatform
6572     * @atomicservice
6573     * @since arkts {'1.1':'11', '1.2':'20'}
6574     * @arkts 1.1&1.2
6575     */
6576    setUIContent(path: string, callback: AsyncCallback<void>): void;
6577
6578    /**
6579     * Loads content
6580     *
6581     * @param { string } path - Path of the page to which the content will be loaded
6582     * @returns { Promise<void> } Promise that returns no value.
6583     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6584     *                                                                  2. Incorrect parameter types.
6585     * @throws { BusinessError } 1300002 - This window state is abnormal.
6586     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6587     * @syscap SystemCapability.WindowManager.WindowManager.Core
6588     * @since 9
6589     */
6590    /**
6591     * Loads content
6592     *
6593     * @param { string } path - Path of the page to which the content will be loaded
6594     * @returns { Promise<void> } Promise that returns no value.
6595     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6596     *                                                                  2. Incorrect parameter types.
6597     * @throws { BusinessError } 1300002 - This window state is abnormal.
6598     * @syscap SystemCapability.WindowManager.WindowManager.Core
6599     * @crossplatform
6600     * @since 10
6601     */
6602    /**
6603     * Loads the content of a page, with its path in the current project specified, to this window.
6604     * This API uses a promise to return the result.
6605     *
6606     * @param { string } path - Path of the page from which the content will be loaded.
6607     *                          In the stage model, the path is configured in the main_pages.json file of the project.
6608     *                          In the FA model, the path is configured in the config.json file of the project.
6609     * @returns { Promise<void> } Promise that returns no value.
6610     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6611     *                                                                  2. Incorrect parameter types.
6612     * @throws { BusinessError } 1300002 - This window state is abnormal.
6613     * @syscap SystemCapability.WindowManager.WindowManager.Core
6614     * @crossplatform
6615     * @atomicservice
6616     * @since arkts {'1.1':'11', '1.2':'20'}
6617     * @arkts 1.1&1.2
6618     */
6619    setUIContent(path: string): Promise<void>;
6620
6621    /**
6622     * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage.
6623     * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
6624     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content.
6625     * Exercise caution when using it.
6626     *
6627     * @param { string } name - Name of the named route page.
6628     * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page.
6629     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6630     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6631     *                                                                  2. Incorrect parameter types.
6632     * @throws { BusinessError } 1300002 - This window state is abnormal.
6633     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6634     * @syscap SystemCapability.WindowManager.WindowManager.Core
6635     * @stagemodelonly
6636     * @crossplatform
6637     * @atomicservice
6638     * @since 11
6639     */
6640    loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback<void>): void;
6641
6642    /**
6643     * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage.
6644     * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
6645     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content.
6646     * Exercise caution when using it.
6647     *
6648     * @param { string } name - Name of the named route page.
6649     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6650     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6651     *                                                                  2. Incorrect parameter types.
6652     * @throws { BusinessError } 1300002 - This window state is abnormal.
6653     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6654     * @syscap SystemCapability.WindowManager.WindowManager.Core
6655     * @stagemodelonly
6656     * @crossplatform
6657     * @atomicservice
6658     * @since 11
6659     */
6660    loadContentByName(name: string, callback: AsyncCallback<void>): void;
6661
6662    /**
6663     * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage.
6664     * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
6665     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content.
6666     * Exercise caution when using it.
6667     *
6668     * @param { string } name - Name of the named route page.
6669     * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page.
6670     * @returns { Promise<void> } Promise that returns no value.
6671     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6672     *                                                                  2. Incorrect parameter types.
6673     * @throws { BusinessError } 1300002 - This window state is abnormal.
6674     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
6675     * @syscap SystemCapability.WindowManager.WindowManager.Core
6676     * @stagemodelonly
6677     * @crossplatform
6678     * @atomicservice
6679     * @since 11
6680     */
6681    loadContentByName(name: string, storage?: LocalStorage): Promise<void>;
6682
6683    /**
6684     * Checks whether the window is displayed
6685     *
6686     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
6687     * @syscap SystemCapability.WindowManager.WindowManager.Core
6688     * @since 7
6689     * @deprecated since 9
6690     * @useinstead ohos.window.Window#isWindowShowing
6691     */
6692    isShowing(callback: AsyncCallback<boolean>): void;
6693
6694    /**
6695     * Checks whether the window is displayed
6696     *
6697     * @returns { Promise<boolean> } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite.
6698     * @syscap SystemCapability.WindowManager.WindowManager.Core
6699     * @since 7
6700     * @deprecated since 9
6701     * @useinstead ohos.window.Window#isWindowShowing
6702     */
6703    isShowing(): Promise<boolean>;
6704
6705    /**
6706     * Checks whether the window is displayed
6707     *
6708     * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite.
6709     * @throws { BusinessError } 1300002 - This window state is abnormal.
6710     * @syscap SystemCapability.WindowManager.WindowManager.Core
6711     * @since 9
6712     */
6713    /**
6714     * Checks whether the window is displayed
6715     *
6716     * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite.
6717     * @throws { BusinessError } 1300002 - This window state is abnormal.
6718     * @syscap SystemCapability.WindowManager.WindowManager.Core
6719     * @crossplatform
6720     * @since 10
6721     */
6722    /**
6723     * Checks whether the window is displayed
6724     *
6725     * @returns { boolean } Whether the window is displayed. The value true means that the window is displayed, and false means the opposite.
6726     * @throws { BusinessError } 1300002 - This window state is abnormal.
6727     * @syscap SystemCapability.WindowManager.WindowManager.Core
6728     * @crossplatform
6729     * @atomicservice
6730     * @since arkts {'1.1':'11', '1.2':'20'}
6731     * @arkts 1.1&1.2
6732     */
6733    isWindowShowing(): boolean;
6734
6735    /**
6736     * Register the callback of windowSizeChange
6737     *
6738     * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
6739     * @param { Callback<Size> } callback - Callback used to return the window size.
6740     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6741     *                                                                  2. Incorrect parameter types;
6742     *                                                                  3. Parameter verification failed.
6743     * @syscap SystemCapability.WindowManager.WindowManager.Core
6744     * @since 7
6745     */
6746    /**
6747     * Register the callback of windowSizeChange
6748     *
6749     * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
6750     * @param { Callback<Size> } callback - Callback used to return the window size.
6751     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6752     *                                                                  2. Incorrect parameter types;
6753     *                                                                  3. Parameter verification failed.
6754     * @syscap SystemCapability.WindowManager.WindowManager.Core
6755     * @atomicservice
6756     * @since 11
6757     */
6758    /**
6759     * Register the callback of windowSizeChange
6760     *
6761     * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
6762     * @param { Callback<Size> } callback - Callback used to return the window size.
6763     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6764     *                                                                  2. Incorrect parameter types;
6765     *                                                                  3. Parameter verification failed.
6766     * @syscap SystemCapability.WindowManager.WindowManager.Core
6767     * @crossplatform
6768     * @atomicservice
6769     * @since arkts {'1.1':'12', '1.2':'20'}
6770     * @arkts 1.1&1.2
6771     */
6772    on(type: 'windowSizeChange', callback: Callback<Size>): void;
6773
6774    /**
6775     * Unregister the callback of windowSizeChange
6776     *
6777     * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
6778     * @param { Callback<Size> } callback - Callback used to return the window size.
6779     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
6780     *                                                                  2. Parameter verification failed.
6781     * @syscap SystemCapability.WindowManager.WindowManager.Core
6782     * @since 7
6783     */
6784    /**
6785     * Unregister the callback of windowSizeChange
6786     *
6787     * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
6788     * @param { Callback<Size> } callback - Callback used to return the window size.
6789     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
6790     *                                                                  2. Parameter verification failed.
6791     * @syscap SystemCapability.WindowManager.WindowManager.Core
6792     * @atomicservice
6793     * @since 11
6794     */
6795    /**
6796     * Unregister the callback of windowSizeChange
6797     *
6798     * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event.
6799     * @param { Callback<Size> } callback - Callback used to return the window size.
6800     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
6801     *                                                                  2. Parameter verification failed.
6802     * @syscap SystemCapability.WindowManager.WindowManager.Core
6803     * @crossplatform
6804     * @atomicservice
6805     * @since arkts {'1.1':'12', '1.2':'20'}
6806     * @arkts 1.1&1.2
6807     */
6808    off(type: 'windowSizeChange', callback?: Callback<Size>): void;
6809
6810    /**
6811     * Register the callback of systemAvoidAreaChange
6812     *
6813     * @param { 'systemAvoidAreaChange' } type - The value is fixed at 'systemAvoidAreaChange', indicating the event of changes to the avoid area.
6814     * @param { Callback<AvoidArea> } callback - Callback used to return the area.
6815     * @syscap SystemCapability.WindowManager.WindowManager.Core
6816     * @since 7
6817     * @deprecated since 9
6818     * @useinstead ohos.window.Window#on_avoidAreaChange
6819     */
6820    on(type: 'systemAvoidAreaChange', callback: Callback<AvoidArea>): void;
6821
6822    /**
6823     * Unregister the callback of systemAvoidAreaChange
6824     *
6825     * @param { 'systemAvoidAreaChange' } type - The value is fixed at 'systemAvoidAreaChange', indicating the event of changes to the avoid area.
6826     * @param { Callback<AvoidArea> } callback - Callback used to return the area.
6827     * @syscap SystemCapability.WindowManager.WindowManager.Core
6828     * @since 7
6829     * @deprecated since 9
6830     * @useinstead ohos.window.Window#off_avoidAreaChange
6831     */
6832    off(type: 'systemAvoidAreaChange', callback?: Callback<AvoidArea>): void;
6833
6834    /**
6835     * Register the callback of avoidAreaChange
6836     *
6837     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6838     * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area.
6839     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
6840     *                                                                   2. Incorrect parameter types;
6841     *                                                                   3. Parameter verification failed.
6842     * @syscap SystemCapability.WindowManager.WindowManager.Core
6843     * @since arkts {'1.1':'9', '1.2':'20'}
6844     * @arkts 1.1&1.2
6845     */
6846    /**
6847     * Register the callback of avoidAreaChange
6848     *
6849     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6850     * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area.
6851     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
6852     *                                                                   2. Incorrect parameter types;
6853     *                                                                   3. Parameter verification failed.
6854     * @syscap SystemCapability.WindowManager.WindowManager.Core
6855     * @atomicservice
6856     * @since arkts {'1.1':'11', '1.2':'20'}
6857     * @arkts 1.1&1.2
6858     */
6859    /**
6860     * Register the callback of avoidAreaChange
6861     *
6862     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6863     * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area.
6864     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
6865     *                                                                   2. Incorrect parameter types;
6866     *                                                                   3. Parameter verification failed.
6867     * @syscap SystemCapability.WindowManager.WindowManager.Core
6868     * @atomicservice
6869     * @since 12
6870     */
6871    /**
6872     * Register the callback of avoidAreaChange
6873     *
6874     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6875     * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area.
6876     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
6877     *                                                                   2. Incorrect parameter types;
6878     *                                                                   3. Parameter verification failed.
6879     * @syscap SystemCapability.WindowManager.WindowManager.Core
6880     * @crossplatform
6881     * @atomicservice
6882     * @since arkts {'1.1':'20', '1.2':'20'}
6883     * @arkts 1.1&1.2
6884     */
6885    on(type: 'avoidAreaChange', callback: Callback<AvoidAreaOptions>): void;
6886
6887    /**
6888     * Unregister the callback of avoidAreaChange
6889     *
6890     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6891     * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area.
6892     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
6893     *                                                                   2. Parameter verification failed.
6894     * @syscap SystemCapability.WindowManager.WindowManager.Core
6895     * @since arkts {'1.1':'9', '1.2':'20'}
6896     * @arkts 1.1&1.2
6897     */
6898    /**
6899     * Unregister the callback of avoidAreaChange
6900     *
6901     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6902     * @param { Callback<{ type: AvoidAreaType, area: AvoidArea }> } callback - Callback used to return the area.
6903     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
6904     *                                                                   2. Parameter verification failed.
6905     * @syscap SystemCapability.WindowManager.WindowManager.Core
6906     * @atomicservice
6907     * @since arkts {'1.1':'11', '1.2':'20'}
6908     * @arkts 1.1&1.2
6909     */
6910    /**
6911     * Unregister the callback of avoidAreaChange
6912     *
6913     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6914     * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area.
6915     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
6916     *                                                                   2. Parameter verification failed.
6917     * @syscap SystemCapability.WindowManager.WindowManager.Core
6918     * @atomicservice
6919     * @since 12
6920     */
6921    /**
6922     * Unregister the callback of avoidAreaChange
6923     *
6924     * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area.
6925     * @param { Callback<AvoidAreaOptions> } callback - Callback used to return the area.
6926     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
6927     *                                                                   2. Parameter verification failed.
6928     * @syscap SystemCapability.WindowManager.WindowManager.Core
6929     * @crossplatform
6930     * @atomicservice
6931     * @since arkts {'1.1':'20', '1.2':'20'}
6932     * @arkts 1.1&1.2
6933     */
6934    off(type: 'avoidAreaChange', callback?: Callback<AvoidAreaOptions>): void;
6935
6936    /**
6937     * Register the callback of keyboardHeightChange
6938     *
6939     * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event.
6940     * @param { Callback<number> } callback - Callback used to return the current keyboard height, which is an integer, in px.
6941     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6942     *                                                                  2. Incorrect parameter types;
6943     *                                                                  3. Parameter verification failed.
6944     * @syscap SystemCapability.WindowManager.WindowManager.Core
6945     * @since 7
6946     */
6947    /**
6948     * Register the callback of keyboardHeightChange
6949     *
6950     * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event.
6951     * @param { Callback<number> } callback - Callback used to return the current keyboard height, which is an integer, in px.
6952     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
6953     *                                                                  2. Incorrect parameter types;
6954     *                                                                  3. Parameter verification failed.
6955     * @syscap SystemCapability.WindowManager.WindowManager.Core
6956     * @atomicservice
6957     * @since arkts {'1.1':'12', '1.2':'20'}
6958     * @arkts 1.1&1.2
6959     */
6960    on(type: 'keyboardHeightChange', callback: Callback<number>): void;
6961
6962    /**
6963     * Unregister the callback of keyboardHeightChange
6964     *
6965     * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event.
6966     * @param { Callback<number> } callback - Callback used to return the current keyboard height, which is an integer, in px.
6967     * If a value is passed in, the corresponding subscription is canceled.
6968     * If no value is passed in, all subscriptions to the specified event are canceled.
6969     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
6970     *                                                                  2. Parameter verification failed.
6971     * @syscap SystemCapability.WindowManager.WindowManager.Core
6972     * @since 7
6973     */
6974    /**
6975     * Unregister the callback of keyboardHeightChange
6976     *
6977     * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event.
6978     * @param { Callback<number> } callback - Callback used to return the current keyboard height, which is an integer, in px.
6979     * If a value is passed in, the corresponding subscription is canceled.
6980     * If no value is passed in, all subscriptions to the specified event are canceled.
6981     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
6982     *                                                                  2. Parameter verification failed.
6983     * @syscap SystemCapability.WindowManager.WindowManager.Core
6984     * @atomicservice
6985     * @since arkts {'1.1':'12', '1.2':'20'}
6986     * @arkts 1.1&1.2
6987     */
6988    off(type: 'keyboardHeightChange', callback?: Callback<number>): void;
6989
6990    /**
6991     * Register the callback of keyboardWillShow
6992     *
6993     * @param { 'keyboardWillShow' } type - The value is fixed at 'keyboardWillShow', indicating the start of the keyboard show animation event.
6994     * @param { Callback<KeyboardInfo> } callback - Callback invoked before the keyboard show animation start.
6995     * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillShow can not work correctly due to limited device capabilities.
6996     * @throws { BusinessError } 1300002 - This window state is abnormal.
6997     * @syscap SystemCapability.Window.SessionManager
6998     * @atomicservice
6999     * @since 20
7000     */
7001    on(type: 'keyboardWillShow', callback: Callback<KeyboardInfo>): void;
7002
7003    /**
7004     * Unregister the callback of keyboardWillShow
7005     *
7006     * @param { 'keyboardWillShow' } type - The value is fixed at 'keyboardWillShow', indicating the start of the keyboard show animation event.
7007     * @param { Callback<KeyboardInfo> } callback - Callback invoked before the keyboard show animation start.
7008     * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillShow can not work correctly due to limited device capabilities.
7009     * @throws { BusinessError } 1300002 - This window state is abnormal.
7010     * @syscap SystemCapability.Window.SessionManager
7011     * @atomicservice
7012     * @since 20
7013     */
7014    off(type: 'keyboardWillShow', callback?: Callback<KeyboardInfo>): void;
7015
7016    /**
7017     * Register the callback of keyboardWillHide
7018     *
7019     * @param { 'keyboardWillHide' } type - The value is fixed at 'keyboardWillHide', indicating the start of the keyboard hide animation event.
7020     * @param { Callback<KeyboardInfo> } callback - Callback invoked before the keyboard hide animation start.
7021     * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillHide can not work correctly due to limited device capabilities.
7022     * @throws { BusinessError } 1300002 - This window state is abnormal.
7023     * @syscap SystemCapability.Window.SessionManager
7024     * @atomicservice
7025     * @since 20
7026     */
7027    on(type: 'keyboardWillHide', callback: Callback<KeyboardInfo>): void;
7028
7029    /**
7030     * Unregister the callback of keyboardWillHide
7031     *
7032     * @param { 'keyboardWillHide' } type - The value is fixed at 'keyboardWillHide', indicating the start of the keyboard hide animation event.
7033     * @param { Callback<KeyboardInfo> } callback - Callback invoked before the keyboard hide animation start.
7034     * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillHide can not work correctly due to limited device capabilities.
7035     * @throws { BusinessError } 1300002 - This window state is abnormal.
7036     * @syscap SystemCapability.Window.SessionManager
7037     * @atomicservice
7038     * @since 20
7039     */
7040    off(type: 'keyboardWillHide', callback?: Callback<KeyboardInfo>): void;
7041
7042    /**
7043     * Register the callback of keyboardDidShow
7044     *
7045     * @param { 'keyboardDidShow' } type - The value is fixed at 'keyboardDidShow', indicating the completion of the keyboard show animation event.
7046     * @param { Callback<KeyboardInfo> } callback - Callback invoked when the keyboard show animation is completed.
7047     * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidShow can not work correctly due to limited device capabilities.
7048     * @throws { BusinessError } 1300002 - This window state is abnormal.
7049     * @syscap SystemCapability.Window.SessionManager
7050     * @atomicservice
7051     * @since arkts {'1.1':'18', '1.2':'20'}
7052     * @arkts 1.1&1.2
7053     */
7054    on(type: 'keyboardDidShow', callback: Callback<KeyboardInfo>): void;
7055
7056    /**
7057     * Unregister the callback of keyboardDidShow
7058     *
7059     * @param { 'keyboardDidShow' } type - The value is fixed at 'keyboardDidShow', indicating the completion of the keyboard show animation event.
7060     * @param { Callback<KeyboardInfo> } callback - Callback invoked when the keyboard show animation is completed.
7061     * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidShow can not work correctly due to limited device capabilities.
7062     * @throws { BusinessError } 1300002 - This window state is abnormal.
7063     * @syscap SystemCapability.Window.SessionManager
7064     * @atomicservice
7065     * @since arkts {'1.1':'18', '1.2':'20'}
7066     * @arkts 1.1&1.2
7067     */
7068    off(type: 'keyboardDidShow', callback?: Callback<KeyboardInfo>): void;
7069
7070    /**
7071     * Register the callback of keyboardDidHide
7072     *
7073     * @param { 'keyboardDidHide' } type - The value is fixed at 'keyboardDidHide', indicating the completion of the keyboard hide animation event.
7074     * @param { Callback<KeyboardInfo> } callback - Callback invoked when the keyboard hide animation is completed.
7075     * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidHide can not work correctly due to limited device capabilities.
7076     * @throws { BusinessError } 1300002 - This window state is abnormal.
7077     * @syscap SystemCapability.Window.SessionManager
7078     * @atomicservice
7079     * @since arkts {'1.1':'18', '1.2':'20'}
7080     * @arkts 1.1&1.2
7081     */
7082    on(type: 'keyboardDidHide', callback: Callback<KeyboardInfo>): void;
7083
7084    /**
7085     * Unregister the callback of keyboardDidHide
7086     *
7087     * @param { 'keyboardDidHide' } type - The value is fixed at 'keyboardDidHide', indicating the completion of the keyboard hide animation event.
7088     * @param { Callback<KeyboardInfo> } callback - Callback invoked when the keyboard hide animation is completed.
7089     * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidHide can not work correctly due to limited device capabilities.
7090     * @throws { BusinessError } 1300002 - This window state is abnormal.
7091     * @syscap SystemCapability.Window.SessionManager
7092     * @atomicservice
7093     * @since arkts {'1.1':'18', '1.2':'20'}
7094     * @arkts 1.1&1.2
7095     */
7096    off(type: 'keyboardDidHide', callback?: Callback<KeyboardInfo>): void;
7097
7098    /**
7099     * Subscribes to the touch event outside this window.
7100     *
7101     * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window.
7102     * @param { Callback<void> } callback - Callback used to return the click event outside this window.
7103     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7104     *                                                                  2. Incorrect parameter types;
7105     *                                                                  3. Parameter verification failed.
7106     * @syscap SystemCapability.WindowManager.WindowManager.Core
7107     * @atomicservice
7108     * @since arkts {'1.1':'11', '1.2':'20'}
7109     * @arkts 1.1&1.2
7110     */
7111    on(type: 'touchOutside', callback: Callback<void>): void;
7112
7113    /**
7114     * Unsubscribes from the touch event outside this window.
7115     *
7116     * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window.
7117     * @param { Callback<void> } callback - Callback used to return the click event outside this window.
7118     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7119     *                                                                  2. Parameter verification failed.
7120     * @syscap SystemCapability.WindowManager.WindowManager.Core
7121     * @atomicservice
7122     * @since arkts {'1.1':'11', '1.2':'20'}
7123     * @arkts 1.1&1.2
7124     */
7125    off(type: 'touchOutside', callback?: Callback<void>): void;
7126
7127    /**
7128     * Window displayId change callback on.
7129     *
7130     * @param { 'displayIdChange' } type - The value is fixed at 'displayIdChange', indicating the Display this window is current showing has changed.
7131     * @param { Callback<number> } callback - Callback used to notify the Display this window is current showing has changed.
7132     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7133     *                                                                  2. Incorrect parameter types;
7134     *                                                                  3. Parameter verification failed.
7135     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7136     * @throws { BusinessError } 1300002 - This window state is abnormal.
7137     * @syscap SystemCapability.Window.SessionManager
7138     * @atomicservice
7139     * @since 14
7140     */
7141    on(type: 'displayIdChange', callback: Callback<number>): void;
7142
7143    /**
7144     * Window displayId change callback off.
7145     *
7146     * @param { 'displayIdChange' } type - The value is fixed at 'displayIdChange', indicating the Display this window is current showing has changed.
7147     * @param { Callback<number> } callback - Callback used to notify the Display this window is current showing has changed.
7148     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7149     *                                                                  2. Parameter verification failed.
7150     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7151     * @throws { BusinessError } 1300002 - This window state is abnormal.
7152     * @syscap SystemCapability.Window.SessionManager
7153     * @atomicservice
7154     * @since 14
7155     */
7156    off(type: 'displayIdChange', callback?: Callback<number>): void;
7157
7158    /**
7159     * Window visibility change callback on.
7160     *
7161     * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change.
7162     * @param { Callback<boolean> } callback - Callback used to notify the window visibility change.
7163     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7164     *                                                                  2. Incorrect parameter types;
7165     *                                                                  3. Parameter verification failed.
7166     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7167     * @throws { BusinessError } 1300002 - This window state is abnormal.
7168     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7169     * @syscap SystemCapability.Window.SessionManager
7170     * @since 11
7171     */
7172    /**
7173     * Subscribes to the visibility status change event of this window.
7174     *
7175     * @param { 'windowVisibilityChange' } type - Event type. The value is fixed at 'windowVisibilityChange', indicating the visibility status change event.
7176     * @param { Callback<boolean> } callback - Callback used to return the visibility status of the window, which is a Boolean value.
7177     *                                         The value true means that the window is visible, and false means the opposite.
7178     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7179     *                                                                  2. Incorrect parameter types;
7180     *                                                                  3. Parameter verification failed.
7181     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7182     * @throws { BusinessError } 1300002 - This window state is abnormal.
7183     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7184     * @syscap SystemCapability.Window.SessionManager
7185     * @atomicservice
7186     * @since arkts {'1.1':'12', '1.2':'20'}
7187     * @arkts 1.1&1.2
7188     */
7189    on(type: 'windowVisibilityChange', callback: Callback<boolean>): void;
7190
7191    /**
7192     * Window visibility change callback off.
7193     *
7194     * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change.
7195     * @param { Callback<boolean> } callback - Callback used to notify the window visibility change.
7196     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7197     *                                                                  2. Parameter verification failed.
7198     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7199     * @throws { BusinessError } 1300002 - This window state is abnormal.
7200     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7201     * @syscap SystemCapability.Window.SessionManager
7202     * @since 11
7203     */
7204    /**
7205     * Unsubscribes from the visibility status change event of this window.
7206     *
7207     * @param { 'windowVisibilityChange' } type - Event type. The value is fixed at 'windowVisibilityChange', indicating the visibility status change event.
7208     * @param { Callback<boolean> } callback - Callback used to return the visibility status of the window.
7209     *                                         If a value is passed in, the corresponding subscription is canceled.
7210     *                                         If no value is passed in, all subscriptions to the specified event are canceled.
7211     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7212     *                                                                  2. Parameter verification failed.
7213     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7214     * @throws { BusinessError } 1300002 - This window state is abnormal.
7215     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7216     * @syscap SystemCapability.Window.SessionManager
7217     * @atomicservice
7218     * @since arkts {'1.1':'12', '1.2':'20'}
7219     * @arkts 1.1&1.2
7220     */
7221    off(type: 'windowVisibilityChange', callback?: Callback<boolean>): void;
7222
7223    /**
7224     * System density change callback on.
7225     *
7226     * @param { 'systemDensityChange' } type - The value is fixed at 'systemDensityChange', indicating the system density is current has changed.
7227     * @param { Callback<number> } callback - Callback used to notify the system density is current has changed.
7228     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7229     *                                                                  2. Incorrect parameter types;
7230     *                                                                  3. Parameter verification failed.
7231     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7232     * @throws { BusinessError } 1300002 - This window state is abnormal.
7233     * @syscap SystemCapability.Window.SessionManager
7234     * @atomicservice
7235     * @since 15
7236     */
7237    on(type: 'systemDensityChange', callback: Callback<number>): void;
7238
7239    /**
7240     * System density change callback off.
7241     *
7242     * @param { 'systemDensityChange' } type - The value is fixed at 'systemDensityChange', indicating the system density is current showing has changed.
7243     * @param { Callback<number> } callback - Callback used to notify the system density is current has changed.
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 device capabilities.
7247     * @throws { BusinessError } 1300002 - This window state is abnormal.
7248     * @syscap SystemCapability.Window.SessionManager
7249     * @atomicservice
7250     * @since 15
7251     */
7252    off(type: 'systemDensityChange', callback?: Callback<number>): void;
7253
7254    /**
7255     *  Register Callback for window spans multiple screens and displays in full screen mode changed.
7256     *
7257     *
7258     * @param { 'mainWindowFullScreenAcrossDisplaysChanged' } type - The value is fixed at 'mainWindowFullScreenAcrossDisplaysChanged',
7259     * indicating the window spans multiple screens and displays in full screen mode changed.
7260     * @param { Callback<boolean> } callback - Callback used to notify the window spans multiple screens and displays in full screen mode changed.
7261     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7262     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7263     * @throws { BusinessError } 1300002 - This window state is abnormal.
7264     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7265     * @throws { BusinessError } 1300004 - Unauthorized operation.
7266     * @syscap SystemCapability.Window.SessionManager
7267     * @systemapi Hide this for inner system use.
7268     * @since 20
7269     */
7270    on(type: 'mainWindowFullScreenAcrossDisplaysChanged', callback: Callback<boolean>): void;
7271
7272    /**
7273     * Unregister Callback for window spans multiple screens and displays in full screen mode changed.
7274     *
7275     * @param { 'mainWindowFullScreenAcrossDisplaysChanged' } type - The value is fixed at 'mainWindowFullScreenAcrossDisplaysChanged',
7276     * indicating the window spans multiple screens and displays in full screen mode changed.
7277     * @param { Callback<boolean> } [callback] - Callback used to notify the window spans multiple screens and displays in full screen mode changed.
7278     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7279     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7280     * @throws { BusinessError } 1300002 - This window state is abnormal.
7281     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7282     * @throws { BusinessError } 1300004 - Unauthorized operation.
7283     * @syscap SystemCapability.Window.SessionManager
7284     * @systemapi Hide this for inner system use.
7285     * @since 20
7286     */
7287    off(type: 'mainWindowFullScreenAcrossDisplaysChanged', callback?: Callback<boolean>): void;
7288
7289    /**
7290     * Subscribes to non-interaction events in a window within the specified period.
7291     * Interaction events include physical keyboard input events and screen touch/click events, but not soft keyboard input events.
7292     *
7293     * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time.
7294     * @param { number } timeout - The timeout(in seconds) of no interaction detection.
7295     * @param { Callback<void> } callback - Callback used to notify the window has no interaction for a long time.
7296     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7297     *                                                                  2. Incorrect parameter types;
7298     *                                                                  3. Parameter verification failed.
7299     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7300     * @throws { BusinessError } 1300002 - This window state is abnormal.
7301     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7302     * @syscap SystemCapability.Window.SessionManager
7303     * @atomicservice
7304     * @since arkts {'1.1':'12', '1.2':'20'}
7305     * @arkts 1.1&1.2
7306     */
7307    on(type: 'noInteractionDetected', timeout: number, callback: Callback<void>): void;
7308
7309    /**
7310     * Unsubscribes from non-interaction events in a window within the specified period.
7311     * Interaction events include physical keyboard input events and screen touch/click events, but not soft keyboard input events.
7312     *
7313     * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time.
7314     * @param { Callback<void> } callback - Callback used to notify the window has no interaction for a long time.
7315     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7316     *                                                                  2. Parameter verification failed.
7317     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7318     * @throws { BusinessError } 1300002 - This window state is abnormal.
7319     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7320     * @syscap SystemCapability.Window.SessionManager
7321     * @atomicservice
7322     * @since arkts {'1.1':'12', '1.2':'20'}
7323     * @arkts 1.1&1.2
7324     */
7325    off(type: 'noInteractionDetected', callback?: Callback<void>): void;
7326
7327    /**
7328     * Register the callback of screenshot, only the focused window called back
7329     *
7330     * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event.
7331     * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs.
7332     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7333     *                                                                  2. Incorrect parameter types;
7334     *                                                                  3. Parameter verification failed.
7335     * @syscap SystemCapability.WindowManager.WindowManager.Core
7336     * @since arkts {'1.1':'9', '1.2':'20'}
7337     * @arkts 1.1&1.2
7338     */
7339    /**
7340     * Register the callback of screenshot, only the focused window called back
7341     *
7342     * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event.
7343     * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs.
7344     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7345     *                                                                  2. Incorrect parameter types;
7346     *                                                                  3. Parameter verification failed.
7347     * @syscap SystemCapability.WindowManager.WindowManager.Core
7348     * @atomicservice
7349     * @since arkts {'1.1':'12', '1.2':'20'}
7350     * @arkts 1.1&1.2
7351     */
7352    on(type: 'screenshot', callback: Callback<void>): void;
7353
7354    /**
7355     * Unregister the callback of screenshot
7356     *
7357     * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event.
7358     * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs.
7359     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7360     *                                                                  2. Parameter verification failed.
7361     * @syscap SystemCapability.WindowManager.WindowManager.Core
7362     * @since arkts {'1.1':'9', '1.2':'20'}
7363     * @arkts 1.1&1.2
7364     */
7365    /**
7366     * Unregister the callback of screenshot
7367     *
7368     * @param { 'screenshot' } type - The value is fixed at 'screenshot', indicating the screenshot event.
7369     * @param { Callback<void> } callback - Callback invoked when a screenshot event occurs.
7370     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7371     *                                                                  2. Parameter verification failed.
7372     * @syscap SystemCapability.WindowManager.WindowManager.Core
7373     * @atomicservice
7374     * @since arkts {'1.1':'12', '1.2':'20'}
7375     * @arkts 1.1&1.2
7376     */
7377    off(type: 'screenshot', callback?: Callback<void>): void;
7378
7379    /**
7380     * Register the callback of screenshot app event
7381     *
7382     * @param { 'screenshotAppEvent' } type - The value is fixed at 'screenshotAppEvent', indicating the screenshot app event.
7383     * @param { Callback<ScreenshotEventType> } callback - Callback invoked when a screenshot app event occurs.
7384     * @throws { BusinessError } 1300002 - This window state is abnormal.
7385     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7386     * @syscap SystemCapability.WindowManager.WindowManager.Core
7387     * @since 20
7388     */
7389    on(type: 'screenshotAppEvent', callback: Callback<ScreenshotEventType>): void;
7390
7391    /**
7392     * Unregister the callback of screenshot app event
7393     *
7394     * @param { 'screenshotAppEvent' } type - The value is fixed at 'screenshotAppEvent', indicating the screenshot app event.
7395     * @param { Callback<ScreenshotEventType> } callback - Callback invoked when a screenshot app event occurs.
7396     * @throws { BusinessError } 1300002 - This window state is abnormal.
7397     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7398     * @syscap SystemCapability.WindowManager.WindowManager.Core
7399     * @since 20
7400     */
7401    off(type: 'screenshotAppEvent', callback?: Callback<ScreenshotEventType>): void;
7402
7403    /**
7404     * Register the callback of dialogTargetTouch
7405     *
7406     * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode.
7407     * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode.
7408     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7409     *                                                                  2. Incorrect parameter types;
7410     *                                                                  3. Parameter verification failed.
7411     * @syscap SystemCapability.WindowManager.WindowManager.Core
7412     * @since 10
7413     */
7414    /**
7415     * Subscribes to click or touch events in a window covered by a modal window. This API takes effect only when it is called by a modal window.
7416     *
7417     * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode.
7418     * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode.
7419     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7420     *                                                                  2. Incorrect parameter types;
7421     *                                                                  3. Parameter verification failed.
7422     * @syscap SystemCapability.WindowManager.WindowManager.Core
7423     * @atomicservice
7424     * @since arkts {'1.1':'12', '1.2':'20'}
7425     * @arkts 1.1&1.2
7426     */
7427    on(type: 'dialogTargetTouch', callback: Callback<void>): void;
7428
7429    /**
7430     * Unregister the callback of dialogTargetTouch
7431     *
7432     * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch',
7433     *  indicating the click event of the target window in the modal window mode.
7434     * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode.
7435     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7436     *                                                                  2. Parameter verification failed.
7437     * @syscap SystemCapability.WindowManager.WindowManager.Core
7438     * @since 10
7439     */
7440    /**
7441     * Unsubscribes from the touch event of the target window in the modal window mode.
7442     *
7443     * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch',
7444     *  indicating the click event of the target window in the modal window mode.
7445     * @param { Callback<void> } callback - Callback invoked when the click event occurs in the target window of the modal window mode.
7446     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7447     *                                                                  2. Parameter verification failed.
7448     * @syscap SystemCapability.WindowManager.WindowManager.Core
7449     * @atomicservice
7450     * @since arkts {'1.1':'12', '1.2':'20'}
7451     * @arkts 1.1&1.2
7452     */
7453    off(type: 'dialogTargetTouch', callback?: Callback<void>): void;
7454
7455    /**
7456     * Register the callback of windowEvent
7457     *
7458     * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event.
7459     * @param { Callback<WindowEventType> } callback - the callback of window event
7460     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7461     *                                                                  2. Incorrect parameter types;
7462     *                                                                  3. Parameter verification failed.
7463     * @syscap SystemCapability.WindowManager.WindowManager.Core
7464     * @since 10
7465     */
7466    /**
7467     * Subscribes to the window lifecycle change event.
7468     *
7469     * @param { 'windowEvent' } type - Event type. The value is fixed at 'windowEvent', indicating the window lifecycle change event.
7470     * @param { Callback<WindowEventType> } callback - Callback used to return the window lifecycle state.
7471     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7472     *                                                                  2. Incorrect parameter types;
7473     *                                                                  3. Parameter verification failed.
7474     * @syscap SystemCapability.WindowManager.WindowManager.Core
7475     * @crossplatform
7476     * @atomicservice
7477     * @since arkts {'1.1':'11', '1.2':'20'}
7478     * @arkts 1.1&1.2
7479     */
7480    on(type: 'windowEvent', callback: Callback<WindowEventType>): void;
7481
7482    /**
7483     * Unregister the callback of windowEvent
7484     *
7485     * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event.
7486     * @param { Callback<WindowEventType> } callback - the callback of window event
7487     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7488     *                                                                  2. Parameter verification failed.
7489     * @syscap SystemCapability.WindowManager.WindowManager.Core
7490     * @since 10
7491     */
7492    /**
7493     * Unsubscribes from the window lifecycle change event.
7494     *
7495     * @param { 'windowEvent' } type - Event type. The value is fixed at 'windowEvent', indicating the window lifecycle change event.
7496     * @param { Callback<WindowEventType> } callback - Callback used to return the window lifecycle state.
7497     *                                                 If a value is passed in, the corresponding subscription is canceled.
7498     *                                                 If no value is passed in, all subscriptions to the specified event are canceled.
7499     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7500     *                                                                  2. Parameter verification failed.
7501     * @syscap SystemCapability.WindowManager.WindowManager.Core
7502     * @crossplatform
7503     * @atomicservice
7504     * @since arkts {'1.1':'11', '1.2':'20'}
7505     * @arkts 1.1&1.2
7506     */
7507    off(type: 'windowEvent', callback?: Callback<WindowEventType>): void;
7508
7509    /**
7510     * Register the callback of windowStatusChange
7511     *
7512     * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event.
7513     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7514     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7515     *                                                                  2. Incorrect parameter types;
7516     *                                                                  3. Parameter verification failed.
7517     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7518     * @syscap SystemCapability.Window.SessionManager
7519     * @since 11
7520     */
7521    /**
7522     * Register the callback of windowStatusChange
7523     *
7524     * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event.
7525     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7526     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7527     *                                                                  2. Incorrect parameter types;
7528     *                                                                  3. Parameter verification failed.
7529     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7530     * @syscap SystemCapability.Window.SessionManager
7531     * @atomicservice
7532     * @since 12
7533     */
7534    /**
7535     * Register the callback of windowStatusChange
7536     *
7537     * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event.
7538     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7539     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7540     *                                                                  2. Incorrect parameter types;
7541     *                                                                  3. Parameter verification failed.
7542     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7543     * @syscap SystemCapability.Window.SessionManager
7544     * @crossplatform
7545     * @atomicservice
7546     * @since arkts {'1.1':'20', '1.2':'20'}
7547     * @arkts 1.1&1.2
7548     */
7549    on(type: 'windowStatusChange', callback: Callback<WindowStatusType>): void;
7550
7551    /**
7552     * Unregister the callback of windowStatusChange
7553     *
7554     * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event.
7555     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7556     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7557     *                                                                  2. Parameter verification failed.
7558     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7559     * @syscap SystemCapability.Window.SessionManager
7560     * @since 11
7561     */
7562    /**
7563     * Unregister the callback of windowStatusChange
7564     *
7565     * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event.
7566     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7567     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7568     *                                                                  2. Parameter verification failed.
7569     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7570     * @syscap SystemCapability.Window.SessionManager
7571     * @atomicservice
7572     * @since 12
7573     */
7574    /**
7575     * Unregister the callback of windowStatusChange
7576     *
7577     * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event.
7578     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7579     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7580     *                                                                  2. Parameter verification failed.
7581     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7582     * @syscap SystemCapability.Window.SessionManager
7583     * @crossplatform
7584     * @atomicservice
7585     * @since arkts {'1.1':'20', '1.2':'20'}
7586     * @arkts 1.1&1.2
7587     */
7588    off(type: 'windowStatusChange', callback?: Callback<WindowStatusType>): void;
7589
7590    /**
7591     * Register the callback of windowStatusDidChange
7592     *
7593     * @param { 'windowStatusDidChange' } type - The value is fixed at 'windowStatusDidChange', indicating the window status change event.
7594     * @param { Callback<WindowStatusType> } callback - Callback used to return the window status.
7595     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7596     * @throws { BusinessError } 1300002 - This window state is abnormal.
7597     * @syscap SystemCapability.Window.SessionManager
7598     * @since 20
7599     */
7600    on(type: 'windowStatusDidChange', callback: Callback<WindowStatusType>): void;
7601
7602    /**
7603     * Unregister the callback of windowStatusDidChange
7604     *
7605     * @param { 'windowStatusDidChange' } type - The value is fixed at 'windowStatusDidChange', indicating the window status change event.
7606     * @param { Callback<WindowStatusType> } [callback] - Callback used to return the window status.
7607     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7608     * @throws { BusinessError } 1300002 - This window state is abnormal.
7609     * @syscap SystemCapability.Window.SessionManager
7610     * @since 20
7611     */
7612    off(type: 'windowStatusDidChange', callback?: Callback<WindowStatusType>): void;
7613
7614    /**
7615     * Subscribes to the event indicating that the child window is closed.
7616     * This event is triggered only when the user clicks the system-provided close button in the upper right corner to close the child window.
7617     * It is not triggered when the child window is closed in other ways.
7618     *
7619     * @param { 'subWindowClose' } type - Event type. The value is fixed at 'subWindowClose', indicating the child window close event.
7620     * @param { Callback<void> } callback - Callback invoked when the close button in the upper right corner of the child window is clicked.
7621     *                                      The internal logic of the callback function requires a return value of the Boolean type.
7622     *                                      The return value determines whether to continue to close the child window.
7623     *                                      The value true means not to close the child window, and false means to continue to close the child window.
7624     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7625     *                                                                  2. Parameter verification failed.
7626     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7627     * @throws { BusinessError } 1300002 - This window state is abnormal.
7628     * @throws { BusinessError } 1300004 - Unauthorized operation.
7629     * @syscap SystemCapability.Window.SessionManager
7630     * @atomicservice
7631     * @since 12
7632     */
7633    on(type: 'subWindowClose', callback: Callback<void>): void;
7634
7635    /**
7636     * Unsubscribes from the event indicating that the child window is closed.
7637     *
7638     * @param { 'subWindowClose' } type - Event type. The value is fixed at 'subWindowClose', indicating the child window close event.
7639     * @param { Callback<void> } callback - Callback invoked when the close button in the upper right corner of the child window is clicked.
7640     *                                      The internal logic of the callback function requires a return value of the Boolean type.
7641     *                                      The return value determines whether to continue to close the child window.
7642     *                                      The value true means not to close the child window, and false means to continue to close the child window.
7643     *                                      If a value is passed in, the corresponding subscription is canceled.
7644     *                                      If no value is passed in, all subscriptions to the specified event are canceled.
7645     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7646     *                                                                  2. Parameter verification failed.
7647     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7648     * @throws { BusinessError } 1300002 - This window state is abnormal.
7649     * @throws { BusinessError } 1300004 - Unauthorized operation.
7650     * @syscap SystemCapability.Window.SessionManager
7651     * @atomicservice
7652     * @since 12
7653     */
7654    off(type: 'subWindowClose', callback?: Callback<void>): void;
7655
7656    /**
7657     * Subscribes to the event indicating that the main window or child window will be closed.
7658     * This event is triggered only when the user clicks the close button in the system-provided title bar to close the window.
7659     * It is not triggered when the window is closed in other ways.
7660     *
7661     * @param { 'windowWillClose' } type - Event type. The value is fixed at 'windowWillClose', indicating the window close event.
7662     * @param { Callback<void, Promise<boolean>> } callback - Callback used to when the close button in the upper right corner of the window is clicked.
7663     *                                                        The internal logic of the callback function requires a return value of the Promise type.
7664     *                                                        In the returned Promise function, resolve(true) means not to close the window,
7665     *                                                        and resolve(false) or reject means to continue to close the window.
7666     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7667     *                                                                  2. Parameter verification failed.
7668     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7669     * @throws { BusinessError } 1300002 - This window state is abnormal.
7670     * @throws { BusinessError } 1300004 - Unauthorized operation.
7671     * @syscap SystemCapability.Window.SessionManager
7672     * @atomicservice
7673     * @since 15
7674     */
7675    on(type: 'windowWillClose', callback: Callback<void, Promise<boolean>>): void;
7676
7677    /**
7678     * Unsubscribes from the event indicating that the main window or child window will be closed.
7679     *
7680     * @param { 'windowWillClose' } type - Event type. The value is fixed at 'windowWillClose', indicating the window close event.
7681     * @param { Callback<void, Promise<boolean>> } callback - Callback used to when the close button in the upper right corner of the window is clicked.
7682     *                                                        The internal logic of the callback function requires a return value of the Promise type.
7683     *                                                        It does not return any parameter. In the returned Promise function,
7684     *                                                        resolve(true) means not to close the window,
7685     *                                                        and resolve(false) or reject means to continue to close the window.
7686     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
7687     *                                                                  2. Parameter verification failed.
7688     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7689     * @throws { BusinessError } 1300002 - This window state is abnormal.
7690     * @throws { BusinessError } 1300004 - Unauthorized operation.
7691     * @syscap SystemCapability.Window.SessionManager
7692     * @atomicservice
7693     * @since 15
7694     */
7695    off(type: 'windowWillClose', callback?: Callback<void, Promise<boolean>>): void;
7696
7697    /**
7698     * Register the callback of window highlight state change
7699     *
7700     * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight state change event.
7701     * @param { Callback<boolean> } callback - Callback used to return the highlight status of the window.
7702     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7703     *                                                                  2. Incorrect parameter types;
7704     *                                                                  3. Parameter verification failed.
7705     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7706     * @throws { BusinessError } 1300002 - This window state is abnormal.
7707     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7708     * @syscap SystemCapability.Window.SessionManager
7709     * @atomicservice
7710     * @since arkts {'1.1':'15', '1.2':'20'}
7711     * @arkts 1.1&1.2
7712     */
7713    on(type: 'windowHighlightChange', callback: Callback<boolean>): void;
7714
7715    /**
7716     * Unregister the callback of window highlight state change
7717     *
7718     * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight change event.
7719     * @param { Callback<boolean> } callback - Callback used to return the highlight status of the window.
7720     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7721     *                                                                  2. Incorrect parameter types;
7722     *                                                                  3. Parameter verification failed.
7723     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7724     * @throws { BusinessError } 1300002 - This window state is abnormal.
7725     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7726     * @syscap SystemCapability.Window.SessionManager
7727     * @atomicservice
7728     * @since arkts {'1.1':'15', '1.2':'20'}
7729     * @arkts 1.1&1.2
7730     */
7731    off(type: 'windowHighlightChange', callback?: Callback<boolean>): void;
7732
7733    /**
7734     * Bind dialog to the target window.
7735     *
7736     * @param { rpc.RemoteObject } token - token of the target window.
7737     * @param { Callback<void> } deathCallback - the callback of dialogDeath.
7738     * @returns { Promise<void> } Promise that returns no value.
7739     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7740     * @throws { BusinessError } 1300002 - This window state is abnormal.
7741     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7742     * @syscap SystemCapability.WindowManager.WindowManager.Core
7743     * @systemapi Hide this for inner system use.
7744     * @since 9
7745     */
7746    /**
7747     * Bind dialog to the target window.
7748     *
7749     * @param { rpc.RemoteObject } token - token of the target window.
7750     * @param { Callback<void> } deathCallback - the callback of dialogDeath.
7751     * @returns { Promise<void> } Promise that returns no value.
7752     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7753     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7754     * @throws { BusinessError } 1300002 - This window state is abnormal.
7755     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7756     * @syscap SystemCapability.WindowManager.WindowManager.Core
7757     * @systemapi Hide this for inner system use.
7758     * @since 12
7759     */
7760    bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>): Promise<void>;
7761
7762    /**
7763     * Bind dialog to the target window.
7764     *
7765     * @param { rpc.RemoteObject } token token of the target window.
7766     * @param { Callback<void> } deathCallback the callback of dialogDeath.
7767     * @param { AsyncCallback<void> } callback Callback used to return the result.
7768     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7769     * @throws { BusinessError } 1300002 - This window state is abnormal.
7770     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7771     * @syscap SystemCapability.WindowManager.WindowManager.Core
7772     * @systemapi Hide this for inner system use.
7773     * @since 9
7774     */
7775    /**
7776     * Bind dialog to the target window.
7777     *
7778     * @param { rpc.RemoteObject } token token of the target window.
7779     * @param { Callback<void> } deathCallback the callback of dialogDeath.
7780     * @param { AsyncCallback<void> } callback Callback used to return the result.
7781     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7782     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7783     * @throws { BusinessError } 1300002 - This window state is abnormal.
7784     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7785     * @syscap SystemCapability.WindowManager.WindowManager.Core
7786     * @systemapi Hide this for inner system use.
7787     * @since 12
7788     */
7789    bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>, callback: AsyncCallback<void>): void;
7790
7791    /**
7792     * Bind dialog to the target window.
7793     *
7794     * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window.
7795     * @param { Callback<void> } deathCallback the callback of dialogDeath.
7796     * @returns { Promise<void> } Promise that returns no value.
7797     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7798     * @throws { BusinessError } 1300002 - This window state is abnormal.
7799     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7800     * @syscap SystemCapability.WindowManager.WindowManager.Core
7801     * @systemapi Hide this for inner system use.
7802     * @since 9
7803     */
7804    /**
7805     * Bind dialog to the target window.
7806     *
7807     * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window.
7808     * @param { Callback<void> } deathCallback the callback of dialogDeath.
7809     * @returns { Promise<void> } Promise that returns no value.
7810     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7811     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7812     * @throws { BusinessError } 1300002 - This window state is abnormal.
7813     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7814     * @syscap SystemCapability.WindowManager.WindowManager.Core
7815     * @systemapi Hide this for inner system use.
7816     * @since 12
7817     */
7818    bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback<void>): Promise<void>;
7819
7820    /**
7821     * Bind dialog to the target window.
7822     *
7823     * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window.
7824     * @param { Callback<void> } deathCallback the callback of dialogDeath.
7825     * @param { AsyncCallback<void> } callback Callback used to return the result.
7826     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7827     * @throws { BusinessError } 1300002 - This window state is abnormal.
7828     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7829     * @syscap SystemCapability.WindowManager.WindowManager.Core
7830     * @systemapi Hide this for inner system use.
7831     * @since 9
7832     */
7833    /**
7834     * Bind dialog to the target window.
7835     *
7836     * @param { dialogRequest.RequestInfo } requestInfo requestInfo of the target window.
7837     * @param { Callback<void> } deathCallback the callback of dialogDeath.
7838     * @param { AsyncCallback<void> } callback Callback used to return the result.
7839     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7840     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
7841     * @throws { BusinessError } 1300002 - This window state is abnormal.
7842     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7843     * @syscap SystemCapability.WindowManager.WindowManager.Core
7844     * @systemapi Hide this for inner system use.
7845     * @since 12
7846     */
7847    bindDialogTarget(
7848      requestInfo: dialogRequest.RequestInfo,
7849      deathCallback: Callback<void>,
7850      callback: AsyncCallback<void>
7851    ): void;
7852
7853    /**
7854     * Sets whether the modal window responds to the back gesture event. An error code is returned if this API is called for a non-modal window.
7855     *
7856     * @param { boolean } enabled - Whether to respond to the back gesture event.
7857     *                              The value true means to respond to the back gesture event and trigger the onBackPress callback, and false means the opposite.
7858     * @returns { Promise<void> } Promise that returns no value.
7859     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7860     *                                                                  2. Incorrect parameter types.
7861     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
7862     * @throws { BusinessError } 1300002 - This window state is abnormal.
7863     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
7864     * @throws { BusinessError } 1300004 - Unauthorized operation.
7865     * @syscap SystemCapability.Window.SessionManager
7866     * @atomicservice
7867     * @since 12
7868     */
7869    setDialogBackGestureEnabled(enabled: boolean): Promise<void>;
7870
7871    /**
7872     * Whether the window supports thr wide gamut setting.
7873     *
7874     * @returns { Promise<boolean> } Promise used to return the result. The value true means that the wide-gamut color space is supported, and false means the opposite.
7875     * @syscap SystemCapability.WindowManager.WindowManager.Core
7876     * @since 8
7877     * @deprecated since 9
7878     * @useinstead ohos.window.Window#isWindowSupportWideGamut
7879     */
7880    isSupportWideGamut(): Promise<boolean>;
7881
7882    /**
7883     * Whether the window supports thr wide gamut setting.
7884     *
7885     * @param { AsyncCallback<boolean> } callback Callback used to return the result.
7886     * @syscap SystemCapability.WindowManager.WindowManager.Core
7887     * @since 8
7888     * @deprecated since 9
7889     * @useinstead ohos.window.Window#isWindowSupportWideGamut
7890     */
7891    isSupportWideGamut(callback: AsyncCallback<boolean>): void;
7892
7893    /**
7894     * Whether the window supports thr wide gamut setting.
7895     *
7896     * @returns { Promise<boolean> } Promise used to return the result.
7897     *  The value true means that the wide-gamut color space is supported, and false means the opposite.
7898     * @throws { BusinessError } 1300002 - This window state is abnormal.
7899     * @syscap SystemCapability.WindowManager.WindowManager.Core
7900     * @since 9
7901     */
7902    /**
7903     * Whether the window supports thr wide gamut setting.
7904     *
7905     * @returns { Promise<boolean> } Promise used to return the result.
7906     *  The value true means that the wide-gamut color space is supported, and false means the opposite.
7907     * @throws { BusinessError } 1300002 - This window state is abnormal.
7908     * @syscap SystemCapability.WindowManager.WindowManager.Core
7909     * @atomicservice
7910     * @since arkts {'1.1':'12', '1.2':'20'}
7911     * @arkts 1.1&1.2
7912     */
7913    isWindowSupportWideGamut(): Promise<boolean>;
7914
7915    /**
7916     * Whether the window supports thr wide gamut setting.
7917     *
7918     * @param { AsyncCallback<boolean> } callback Callback used to return the result.
7919     * @throws { BusinessError } 1300002 - This window state is abnormal.
7920     * @syscap SystemCapability.WindowManager.WindowManager.Core
7921     * @since 9
7922     */
7923    /**
7924     * Whether the window supports thr wide gamut setting.
7925     *
7926     * @param { AsyncCallback<boolean> } callback Callback used to return the result.
7927     * @throws { BusinessError } 1300002 - This window state is abnormal.
7928     * @syscap SystemCapability.WindowManager.WindowManager.Core
7929     * @atomicservice
7930     * @since arkts {'1.1':'12', '1.2':'20'}
7931     * @arkts 1.1&1.2
7932     */
7933    isWindowSupportWideGamut(callback: AsyncCallback<boolean>): void;
7934
7935    /**
7936     * Sets the specified color space.
7937     *
7938     * @param { ColorSpace } colorSpace the specified color space.
7939     * @returns { Promise<void> } Promise that returns no value.
7940     * @syscap SystemCapability.WindowManager.WindowManager.Core
7941     * @since 8
7942     * @deprecated since 9
7943     * @useinstead ohos.window.Window#setWindowColorSpace
7944     */
7945    setColorSpace(colorSpace: ColorSpace): Promise<void>;
7946
7947    /**
7948     * Sets the specified color space.
7949     *
7950     * @param { ColorSpace } colorSpace the specified color space.
7951     * @param { AsyncCallback<void> } callback Callback used to return the result.
7952     * @syscap SystemCapability.WindowManager.WindowManager.Core
7953     * @since 8
7954     * @deprecated since 9
7955     * @useinstead ohos.window.Window#setWindowColorSpace
7956     */
7957    setColorSpace(colorSpace: ColorSpace, callback: AsyncCallback<void>): void;
7958
7959    /**
7960     * Sets the specified color space.
7961     *
7962     * @param { ColorSpace } colorSpace the specified color space.
7963     * @returns { Promise<void> } Promise that returns no value.
7964     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7965     *                                                                  2. Incorrect parameter types;
7966     *                                                                  3. Parameter verification failed.
7967     * @throws { BusinessError } 1300002 - This window state is abnormal.
7968     * @syscap SystemCapability.WindowManager.WindowManager.Core
7969     * @since 9
7970     */
7971    /**
7972     * Sets the specified color space.
7973     *
7974     * @param { ColorSpace } colorSpace the specified color space.
7975     * @returns { Promise<void> } Promise that returns no value.
7976     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7977     *                                                                  2. Incorrect parameter types;
7978     *                                                                  3. Parameter verification failed.
7979     * @throws { BusinessError } 1300002 - This window state is abnormal.
7980     * @syscap SystemCapability.WindowManager.WindowManager.Core
7981     * @crossplatform
7982     * @since 11
7983     */
7984    /**
7985     * Sets the specified color space.
7986     *
7987     * @param { ColorSpace } colorSpace the specified color space.
7988     * @returns { Promise<void> } Promise that returns no value.
7989     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
7990     *                                                                  2. Incorrect parameter types;
7991     *                                                                  3. Parameter verification failed.
7992     * @throws { BusinessError } 1300002 - This window state is abnormal.
7993     * @syscap SystemCapability.WindowManager.WindowManager.Core
7994     * @crossplatform
7995     * @atomicservice
7996     * @since arkts {'1.1':'12', '1.2':'20'}
7997     * @arkts 1.1&1.2
7998     */
7999    setWindowColorSpace(colorSpace: ColorSpace): Promise<void>;
8000
8001    /**
8002     * Sets the specified color space.
8003     *
8004     * @param { ColorSpace } colorSpace the specified color space.
8005     * @param { AsyncCallback<void> } callback Callback used to return the result.
8006     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8007     *                                                                  2. Incorrect parameter types;
8008     *                                                                  3. Parameter verification failed.
8009     * @throws { BusinessError } 1300002 - This window state is abnormal.
8010     * @syscap SystemCapability.WindowManager.WindowManager.Core
8011     * @since 9
8012     */
8013    /**
8014     * Sets the specified color space.
8015     *
8016     * @param { ColorSpace } colorSpace the specified color space.
8017     * @param { AsyncCallback<void> } callback Callback used to return the result.
8018     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8019     *                                                                  2. Incorrect parameter types;
8020     *                                                                  3. Parameter verification failed.
8021     * @throws { BusinessError } 1300002 - This window state is abnormal.
8022     * @syscap SystemCapability.WindowManager.WindowManager.Core
8023     * @crossplatform
8024     * @since 11
8025     */
8026    /**
8027     * Sets the specified color space.
8028     *
8029     * @param { ColorSpace } colorSpace the specified color space.
8030     * @param { AsyncCallback<void> } callback Callback used to return the result.
8031     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8032     *                                                                  2. Incorrect parameter types;
8033     *                                                                  3. Parameter verification failed.
8034     * @throws { BusinessError } 1300002 - This window state is abnormal.
8035     * @syscap SystemCapability.WindowManager.WindowManager.Core
8036     * @crossplatform
8037     * @atomicservice
8038     * @since arkts {'1.1':'12', '1.2':'20'}
8039     * @arkts 1.1&1.2
8040     */
8041    setWindowColorSpace(colorSpace: ColorSpace, callback: AsyncCallback<void>): void;
8042
8043    /**
8044     * Obtains the set color space.
8045     *
8046     * @returns { Promise<ColorSpace> } Promise used to return the current color space.
8047     * @syscap SystemCapability.WindowManager.WindowManager.Core
8048     * @since 8
8049     * @deprecated since 9
8050     * @useinstead ohos.window.Window#getWindowColorSpace
8051     */
8052    getColorSpace(): Promise<ColorSpace>;
8053
8054    /**
8055     * Obtains the set color space.
8056     *
8057     * @param { AsyncCallback<ColorSpace> } callback Callback used to return the result.
8058     * @syscap SystemCapability.WindowManager.WindowManager.Core
8059     * @since 8
8060     * @deprecated since 9
8061     * @useinstead ohos.window.Window#getWindowColorSpace
8062     */
8063    getColorSpace(callback: AsyncCallback<ColorSpace>): void;
8064
8065    /**
8066     * Obtains the set color space.
8067     *
8068     * @returns { ColorSpace } Color space obtained.
8069     * @throws { BusinessError } 1300002 - This window state is abnormal.
8070     * @syscap SystemCapability.WindowManager.WindowManager.Core
8071     * @since 9
8072     */
8073    /**
8074     * Obtains the set color space.
8075     *
8076     * @returns { ColorSpace } Color space obtained.
8077     * @throws { BusinessError } 1300002 - This window state is abnormal.
8078     * @syscap SystemCapability.WindowManager.WindowManager.Core
8079     * @crossplatform
8080     * @since 11
8081     */
8082    /**
8083     * Obtains the set color space.
8084     *
8085     * @returns { ColorSpace } Color space obtained.
8086     * @throws { BusinessError } 1300002 - This window state is abnormal.
8087     * @syscap SystemCapability.WindowManager.WindowManager.Core
8088     * @crossplatform
8089     * @atomicservice
8090     * @since 12
8091     */
8092    getWindowColorSpace(): ColorSpace;
8093
8094    /**
8095     * Sets the background color of window.
8096     *
8097     * @param { string } color the specified color.
8098     * @returns { Promise<void> } Promise that returns no value.
8099     * @syscap SystemCapability.WindowManager.WindowManager.Core
8100     * @since 6
8101     * @deprecated since 9
8102     * @useinstead ohos.window.Window#setWindowBackgroundColor
8103     */
8104    setBackgroundColor(color: string): Promise<void>;
8105
8106    /**
8107     * Sets the background color of window.
8108     *
8109     * @param { string } color the specified color.
8110     * @param { AsyncCallback<void> } callback Callback used to return the result.
8111     * @syscap SystemCapability.WindowManager.WindowManager.Core
8112     * @since 6
8113     * @deprecated since 9
8114     * @useinstead ohos.window.Window#setWindowBackgroundColor
8115     */
8116    setBackgroundColor(color: string, callback: AsyncCallback<void>): void;
8117
8118    /**
8119     * Sets the background color of window.
8120     *
8121     * @param { string } color the specified color.
8122     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8123     *                                                                  2. Incorrect parameter types.
8124     * @throws { BusinessError } 1300002 - This window state is abnormal.
8125     * @syscap SystemCapability.WindowManager.WindowManager.Core
8126     * @since 9
8127     */
8128    /**
8129     * Sets the background color of window.
8130     *
8131     * @param { string } color the specified color.
8132     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8133     *                                                                  2. Incorrect parameter types.
8134     * @throws { BusinessError } 1300002 - This window state is abnormal.
8135     * @syscap SystemCapability.WindowManager.WindowManager.Core
8136     * @crossplatform
8137     * @since 10
8138     */
8139    /**
8140     * Sets the background color of window.
8141     *
8142     * @param { string } color the specified color.
8143     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8144     *                                                                  2. Incorrect parameter types.
8145     * @throws { BusinessError } 1300002 - This window state is abnormal.
8146     * @syscap SystemCapability.WindowManager.WindowManager.Core
8147     * @crossplatform
8148     * @atomicservice
8149     * @since 11
8150     */
8151    /**
8152     * Sets the background color of window.
8153     *
8154     * @param { string | ColorMetrics } color - the specified color.
8155     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8156     *                                                                  2. Incorrect parameter types.
8157     * @throws { BusinessError } 1300002 - This window state is abnormal.
8158     * @syscap SystemCapability.WindowManager.WindowManager.Core
8159     * @crossplatform
8160     * @atomicservice
8161     * @since arkts {'1.1':'18', '1.2':'20'}
8162     * @arkts 1.1&1.2
8163     */
8164    setWindowBackgroundColor(color: string | ColorMetrics): void;
8165
8166    /**
8167     * Sets the shadow enable of window.
8168     *
8169     * @permission ohos.permission.SET_WINDOW_TRANSPARENT
8170     * @param { boolean } enable - Enable or disable window shadow.
8171     * @returns { Promise<void> } Promise that returns no value.
8172     * @throws { BusinessError } 201 - Permission verification failed.
8173     * The application does not have the permission required to call the API.
8174     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8175     * @throws { BusinessError } 1300002 - This window state is abnormal.
8176     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8177     * @throws { BusinessError } 1300004 - Unauthorized operation.
8178     * @syscap SystemCapability.Window.SessionManager
8179     * @since 20
8180     */
8181    setWindowShadowEnabled(enable: boolean): Promise<void>;
8182
8183    /**
8184     * Sets the brightness of window.
8185     *
8186     * @param { number } brightness the specified brightness value.
8187     * @returns { Promise<void> } Promise that returns no value.
8188     * @syscap SystemCapability.WindowManager.WindowManager.Core
8189     * @since 6
8190     * @deprecated since 9
8191     * @useinstead ohos.window.Window#setWindowBrightness
8192     */
8193    setBrightness(brightness: number): Promise<void>;
8194
8195    /**
8196     * Sets the brightness of window.
8197     *
8198     * @param { number } brightness the specified brightness value.
8199     * @param { AsyncCallback<void> } callback Callback used to return the result.
8200     * @syscap SystemCapability.WindowManager.WindowManager.Core
8201     * @since 6
8202     * @deprecated since 9
8203     * @useinstead ohos.window.Window#setWindowBrightness
8204     */
8205    setBrightness(brightness: number, callback: AsyncCallback<void>): void;
8206
8207    /**
8208     * Set whether the main window is topmost.
8209     *
8210     * @param { boolean } isTopmost - Main window is topmost if true.
8211     * @returns { Promise<void> } Promise that returns no value.
8212     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8213     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8214     *                                                                  2. Incorrect parameter types.
8215     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8216     * @throws { BusinessError } 1300002 - This window state is abnormal.
8217     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8218     * @throws { BusinessError } 1300004 - Unauthorized operation.
8219     * @syscap SystemCapability.Window.SessionManager
8220     * @systemapi
8221     * @since 12
8222     */
8223    setTopmost(isTopmost: boolean): Promise<void>;
8224
8225    /**
8226     * Places the main window above all the other windows of the application.
8227     *
8228     * @permission ohos.permission.WINDOW_TOPMOST
8229     * @param { boolean } isWindowTopmost - Whether to pin the main window on top.
8230     *                                      The value true means to pin the main window on top, and false means the opposite.
8231     * @returns { Promise<void> } Promise that returns no value.
8232     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8233     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8234     *                                                                  2. Incorrect parameter types.
8235     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8236     * @throws { BusinessError } 1300002 - This window state is abnormal.
8237     * @throws { BusinessError } 1300004 - Unauthorized operation.
8238     * @syscap SystemCapability.Window.SessionManager
8239     * @atomicservice
8240     * @since 14
8241     */
8242    setWindowTopmost(isWindowTopmost: boolean): Promise<void>;
8243
8244    /**
8245     * Sets the brightness of window.
8246     *
8247     * @param { number } brightness the specified brightness value.
8248     * @returns { Promise<void> } Promise that returns no value.
8249     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8250     *                                                                  2. Incorrect parameter types.
8251     * @throws { BusinessError } 1300002 - This window state is abnormal.
8252     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8253     * @syscap SystemCapability.WindowManager.WindowManager.Core
8254     * @since 9
8255     */
8256    /**
8257     * Sets the brightness of window.
8258     *
8259     * @param { number } brightness the specified brightness value.
8260     * @returns { Promise<void> } Promise that returns no value.
8261     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8262     *                                                                  2. Incorrect parameter types.
8263     * @throws { BusinessError } 1300002 - This window state is abnormal.
8264     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8265     * @syscap SystemCapability.WindowManager.WindowManager.Core
8266     * @crossplatform
8267     * @since 10
8268     */
8269    /**
8270     * Sets the brightness of window.
8271     *
8272     * @param { number } brightness the specified brightness value.
8273     * @returns { Promise<void> } Promise that returns no value.
8274     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8275     *                                                                  2. Incorrect parameter types.
8276     * @throws { BusinessError } 1300002 - This window state is abnormal.
8277     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8278     * @syscap SystemCapability.WindowManager.WindowManager.Core
8279     * @crossplatform
8280     * @atomicservice
8281     * @since 11
8282     */
8283    setWindowBrightness(brightness: number): Promise<void>;
8284
8285    /**
8286     * Sets the brightness of window.
8287     *
8288     * @param { number } brightness the specified brightness value.
8289     * @param { AsyncCallback<void> } callback Callback used to return the result.
8290     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8291     *                                                                  2. Incorrect parameter types.
8292     * @throws { BusinessError } 1300002 - This window state is abnormal.
8293     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8294     * @syscap SystemCapability.WindowManager.WindowManager.Core
8295     * @since 9
8296     */
8297    /**
8298     * Sets the brightness of window.
8299     *
8300     * @param { number } brightness the specified brightness value.
8301     * @param { AsyncCallback<void> } callback Callback used to return the result.
8302     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8303     *                                                                  2. Incorrect parameter types.
8304     * @throws { BusinessError } 1300002 - This window state is abnormal.
8305     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8306     * @syscap SystemCapability.WindowManager.WindowManager.Core
8307     * @crossplatform
8308     * @since 10
8309     */
8310    /**
8311     * Sets the brightness of window.
8312     *
8313     * @param { number } brightness the specified brightness value.
8314     * @param { AsyncCallback<void> } callback Callback used to return the result.
8315     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8316     *                                                                  2. Incorrect parameter types.
8317     * @throws { BusinessError } 1300002 - This window state is abnormal.
8318     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8319     * @syscap SystemCapability.WindowManager.WindowManager.Core
8320     * @crossplatform
8321     * @atomicservice
8322     * @since 11
8323     */
8324    setWindowBrightness(brightness: number, callback: AsyncCallback<void>): void;
8325
8326    /**
8327     * Sets the dimBehind of window.
8328     *
8329     * @param { number } dimBehindValue - The specified dimBehind.
8330     * @param { AsyncCallback<void> } callback Callback used to return the result.
8331     * @syscap SystemCapability.WindowManager.WindowManager.Core
8332     * @since 7
8333     * @deprecated since 9
8334     */
8335    setDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void;
8336
8337    /**
8338     * Sets the dimBehind of window.
8339     *
8340     * @param { number } dimBehindValue - The specified dimBehind.
8341     * @returns { Promise<void> } Promise that returns no value.
8342     * @syscap SystemCapability.WindowManager.WindowManager.Core
8343     * @since 7
8344     * @deprecated since 9
8345     */
8346    setDimBehind(dimBehindValue: number): Promise<void>;
8347
8348    /**
8349     * Sets whether focusable or not.
8350     *
8351     * @param { boolean } isFocusable can be focus if true, or can not be focus if false.
8352     * @returns { Promise<void> } Promise that returns no value.
8353     * @syscap SystemCapability.WindowManager.WindowManager.Core
8354     * @since 7
8355     * @deprecated since 9
8356     * @useinstead ohos.window.Window#setWindowFocusable
8357     */
8358    setFocusable(isFocusable: boolean): Promise<void>;
8359
8360    /**
8361     * Sets whether focusable or not.
8362     *
8363     * @param { boolean } isFocusable can be focus if true, or can not be focus if false.
8364     * @param { AsyncCallback<void> } callback Callback used to return the result.
8365     * @syscap SystemCapability.WindowManager.WindowManager.Core
8366     * @since 7
8367     * @deprecated since 9
8368     * @useinstead ohos.window.Window#setWindowFocusable
8369     */
8370    setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void;
8371
8372    /**
8373     * Sets whether focusable or not.
8374     *
8375     * @param { boolean } isFocusable can be focus if true, or can not be focus if false.
8376     * @returns { Promise<void> } Promise that returns no value.
8377     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8378     *                                                                  2. Incorrect parameter types.
8379     * @throws { BusinessError } 1300002 - This window state is abnormal.
8380     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8381     * @syscap SystemCapability.WindowManager.WindowManager.Core
8382     * @since 9
8383     */
8384    /**
8385     * Sets whether focusable or not.
8386     *
8387     * @param { boolean } isFocusable can be focus if true, or can not be focus if false.
8388     * @returns { Promise<void> } Promise that returns no value.
8389     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8390     *                                                                  2. Incorrect parameter types.
8391     * @throws { BusinessError } 1300002 - This window state is abnormal.
8392     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8393     * @syscap SystemCapability.WindowManager.WindowManager.Core
8394     * @atomicservice
8395     * @since arkts {'1.1':'12', '1.2':'20'}
8396     * @arkts 1.1&1.2
8397     */
8398    setWindowFocusable(isFocusable: boolean): Promise<void>;
8399
8400    /**
8401     * Sets whether focusable or not.
8402     *
8403     * @param { boolean } isFocusable can be focus if true, or can not be focus if false.
8404     * @param { AsyncCallback<void> } callback Callback used to return the result.
8405     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8406     *                                                                  2. Incorrect parameter types.
8407     * @throws { BusinessError } 1300002 - This window state is abnormal.
8408     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8409     * @syscap SystemCapability.WindowManager.WindowManager.Core
8410     * @since 9
8411     */
8412    /**
8413     * Sets whether focusable or not.
8414     *
8415     * @param { boolean } isFocusable can be focus if true, or can not be focus if false.
8416     * @param { AsyncCallback<void> } callback Callback used to return the result.
8417     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8418     *                                                                  2. Incorrect parameter types.
8419     * @throws { BusinessError } 1300002 - This window state is abnormal.
8420     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8421     * @syscap SystemCapability.WindowManager.WindowManager.Core
8422     * @atomicservice
8423     * @since arkts {'1.1':'12', '1.2':'20'}
8424     * @arkts 1.1&1.2
8425     */
8426    setWindowFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void;
8427
8428    /**
8429     * Window requests to get focus or lose focus.
8430     *
8431     * @param { boolean } isFocused - Window requests to get focus if true, requests to lose focus if false.
8432     * @returns { Promise<void> } - Promise that returns no value.
8433     * @throws { BusinessError } 202 - Permission verification failed, non-system application uses system API.
8434     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8435     *                                                                  2. Incorrect parameter types.
8436     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8437     * @throws { BusinessError } 1300002 - This window state is abnormal.
8438     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8439     * @syscap SystemCapability.Window.SessionManager
8440     * @systemapi
8441     * @since 13
8442     */
8443    requestFocus(isFocused: boolean): Promise<void>;
8444
8445    /**
8446     * Sets whether exclusively highlighted or not.
8447     *
8448     * @param { boolean } exclusivelyHighlighted Whether the window can become highlight exclusively when it gain focus. The value
8449     *                                           true means that the window can cause the window outside the current window link to
8450     *                                           lose its highlight state, and false means the opposite.
8451     * @returns { Promise<void> } - Promise that returns no value.
8452     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8453     *                                                                  2. Incorrect parameter types;
8454     *                                                                  3. Parameter verification failed.
8455     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8456     * @throws { BusinessError } 1300002 - This window state is abnormal.
8457     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8458     * @throws { BusinessError } 1300004 - Unauthorized operation.
8459     * @syscap SystemCapability.Window.SessionManager
8460     * @atomicservice
8461     * @since 15
8462     */
8463    setExclusivelyHighlighted(exclusivelyHighlighted: boolean): Promise<void>;
8464
8465    /**
8466     * Checks whether the window is highlighted.
8467     *
8468     * @returns { boolean } - Whether the window is highlighted. The value true means that the window is highlighted, and false means the opposite.
8469     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8470     * @throws { BusinessError } 1300002 - This window state is abnormal.
8471     * @syscap SystemCapability.Window.SessionManager
8472     * @atomicservice
8473     * @since 18
8474     */
8475    isWindowHighlighted(): boolean;
8476
8477    /**
8478     * Sets whether keep screen on or not.
8479     *
8480     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8481     * @returns { Promise<void> } that returns no value.
8482     * @syscap SystemCapability.WindowManager.WindowManager.Core
8483     * @since 6
8484     * @deprecated since 9
8485     * @useinstead ohos.window.Window#setWindowKeepScreenOn
8486     */
8487    setKeepScreenOn(isKeepScreenOn: boolean): Promise<void>;
8488
8489    /**
8490     * Sets whether keep screen on or not.
8491     *
8492     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8493     * @param { AsyncCallback<void> } callback Callback used to return the result.
8494     * @syscap SystemCapability.WindowManager.WindowManager.Core
8495     * @since 6
8496     * @deprecated since 9
8497     * @useinstead ohos.window.Window#setWindowKeepScreenOn
8498     */
8499    setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void;
8500
8501    /**
8502     * Sets whether keep screen on or not.
8503     *
8504     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8505     * @returns { Promise<void> } Promise that returns no value.
8506     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8507     *                                                                  2. Incorrect parameter types.
8508     * @throws { BusinessError } 1300002 - This window state is abnormal.
8509     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8510     * @syscap SystemCapability.WindowManager.WindowManager.Core
8511     * @since 9
8512     */
8513    /**
8514     * Sets whether keep screen on or not.
8515     *
8516     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8517     * @returns { Promise<void> } Promise that returns no value.
8518     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8519     *                                                                  2. Incorrect parameter types.
8520     * @throws { BusinessError } 1300002 - This window state is abnormal.
8521     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8522     * @syscap SystemCapability.WindowManager.WindowManager.Core
8523     * @crossplatform
8524     * @since 10
8525     */
8526    /**
8527     * Sets whether keep screen on or not.
8528     *
8529     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8530     * @returns { Promise<void> } Promise that returns no value.
8531     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8532     *                                                                  2. Incorrect parameter types.
8533     * @throws { BusinessError } 1300002 - This window state is abnormal.
8534     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8535     * @syscap SystemCapability.WindowManager.WindowManager.Core
8536     * @crossplatform
8537     * @atomicservice
8538     * @since arkts {'1.1':'11', '1.2':'20'}
8539     * @arkts 1.1&1.2
8540     */
8541    setWindowKeepScreenOn(isKeepScreenOn: boolean): Promise<void>;
8542
8543    /**
8544     * Sets whether keep screen on or not.
8545     *
8546     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8547     * @param { AsyncCallback<void> } callback Callback used to return the result.
8548     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8549     *                                                                  2. Incorrect parameter types.
8550     * @throws { BusinessError } 1300002 - This window state is abnormal.
8551     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8552     * @syscap SystemCapability.WindowManager.WindowManager.Core
8553     * @since 9
8554     */
8555    /**
8556     * Sets whether keep screen on or not.
8557     *
8558     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8559     * @param { AsyncCallback<void> } callback Callback used to return the result.
8560     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8561     *                                                                  2. Incorrect parameter types.
8562     * @throws { BusinessError } 1300002 - This window state is abnormal.
8563     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8564     * @syscap SystemCapability.WindowManager.WindowManager.Core
8565     * @crossplatform
8566     * @since 10
8567     */
8568    /**
8569     * Sets whether keep screen on or not.
8570     *
8571     * @param { boolean } isKeepScreenOn keep screen on if true, or not if false.
8572     * @param { AsyncCallback<void> } callback Callback used to return the result.
8573     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8574     *                                                                  2. Incorrect parameter types.
8575     * @throws { BusinessError } 1300002 - This window state is abnormal.
8576     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8577     * @syscap SystemCapability.WindowManager.WindowManager.Core
8578     * @crossplatform
8579     * @atomicservice
8580     * @since arkts {'1.1':'11', '1.2':'20'}
8581     * @arkts 1.1&1.2
8582     */
8583    setWindowKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): void;
8584
8585    /**
8586     * Sets whether to wake up the screen when this ability is restored.
8587     *
8588     * @param { boolean } wakeUp Specifies whether to wake up the screen. True means to wake it up, false means not.
8589     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8590     *                                                                  2. Incorrect parameter types.
8591     * @throws { BusinessError } 1300002 - This window state is abnormal.
8592     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8593     * @syscap SystemCapability.WindowManager.WindowManager.Core
8594     * @systemapi Hide this for inner system use.
8595     * @since 9
8596     */
8597    /**
8598     * Sets whether to wake up the screen when this ability is restored.
8599     *
8600     * @param { boolean } wakeUp Specifies whether to wake up the screen. True means to wake it up, false means not.
8601     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8602     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8603     *                                                                  2. Incorrect parameter types.
8604     * @throws { BusinessError } 1300002 - This window state is abnormal.
8605     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8606     * @syscap SystemCapability.WindowManager.WindowManager.Core
8607     * @systemapi Hide this for inner system use.
8608     * @since 12
8609     */
8610    setWakeUpScreen(wakeUp: boolean): void;
8611
8612    /**
8613     * Sets whether outside can be touch or not.
8614     *
8615     * @param { boolean } touchable outside can be touch if true, or not if false.
8616     * @returns { Promise<void> } Promise that returns no value.
8617     * @syscap SystemCapability.WindowManager.WindowManager.Core
8618     * @since 7
8619     * @deprecated since 9
8620     */
8621    setOutsideTouchable(touchable: boolean): Promise<void>;
8622
8623    /**
8624     * Sets whether outside can be touch or not.
8625     *
8626     * @param { boolean } touchable outside can be touch if true, or not if false.
8627     * @param { AsyncCallback<void> } callback Callback used to return the result.
8628     * @syscap SystemCapability.WindowManager.WindowManager.Core
8629     * @since 7
8630     * @deprecated since 9
8631     */
8632    setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void;
8633
8634    /**
8635     * Sets whether is private mode or not.
8636     *
8637     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8638     * @returns { Promise<void> } Promise that returns no value.
8639     * @syscap SystemCapability.WindowManager.WindowManager.Core
8640     * @since 7
8641     * @deprecated since 9
8642     * @useinstead ohos.window.Window#setWindowPrivacyMode
8643     */
8644    setPrivacyMode(isPrivacyMode: boolean): Promise<void>;
8645
8646    /**
8647     * Sets whether is private mode or not.
8648     *
8649     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8650     * @param { AsyncCallback<void> } callback Callback used to return the result.
8651     * @syscap SystemCapability.WindowManager.WindowManager.Core
8652     * @since 7
8653     * @deprecated since 9
8654     * @useinstead ohos.window.Window#setWindowPrivacyMode
8655     */
8656    setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void;
8657
8658    /**
8659     * Sets whether is private mode or not.
8660     *
8661     * @permission ohos.permission.PRIVACY_WINDOW
8662     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8663     * @returns { Promise<void> } Promise that returns no value.
8664     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8665     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8666     *                                                                  2. Incorrect parameter types.
8667     * @throws { BusinessError } 1300002 - This window state is abnormal.
8668     * @syscap SystemCapability.WindowManager.WindowManager.Core
8669     * @since 9
8670     */
8671    /**
8672     * Sets whether is private mode or not.
8673     *
8674     * @permission ohos.permission.PRIVACY_WINDOW
8675     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8676     * @returns { Promise<void> } Promise that returns no value.
8677     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8678     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8679     *                                                                  2. Incorrect parameter types.
8680     * @throws { BusinessError } 1300002 - This window state is abnormal.
8681     * @syscap SystemCapability.WindowManager.WindowManager.Core
8682     * @atomicservice
8683     * @since 12
8684     */
8685    /**
8686     * Sets whether is private mode or not.
8687     *
8688     * @permission ohos.permission.PRIVACY_WINDOW
8689     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8690     * @returns { Promise<void> } Promise that returns no value.
8691     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8692     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8693     *                                                                  2. Incorrect parameter types.
8694     * @throws { BusinessError } 1300002 - This window state is abnormal.
8695     * @syscap SystemCapability.WindowManager.WindowManager.Core
8696     * @crossplatform
8697     * @atomicservice
8698     * @since arkts {'1.1':'20', '1.2':'20'}
8699     * @arkts 1.1&1.2
8700     */
8701    setWindowPrivacyMode(isPrivacyMode: boolean): Promise<void>;
8702
8703    /**
8704     * Sets whether is private mode or not.
8705     *
8706     * @permission ohos.permission.PRIVACY_WINDOW
8707     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8708     * @param { AsyncCallback<void> } callback Callback used to return the result.
8709     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8710     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8711     *                                                                  2. Incorrect parameter types.
8712     * @throws { BusinessError } 1300002 - This window state is abnormal.
8713     * @syscap SystemCapability.WindowManager.WindowManager.Core
8714     * @since 9
8715     */
8716    /**
8717     * Sets whether is private mode or not.
8718     *
8719     * @permission ohos.permission.PRIVACY_WINDOW
8720     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8721     * @param { AsyncCallback<void> } callback Callback used to return the result.
8722     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8723     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8724     *                                                                  2. Incorrect parameter types.
8725     * @throws { BusinessError } 1300002 - This window state is abnormal.
8726     * @syscap SystemCapability.WindowManager.WindowManager.Core
8727     * @atomicservice
8728     * @since 12
8729     */
8730    /**
8731     * Sets whether is private mode or not.
8732     *
8733     * @permission ohos.permission.PRIVACY_WINDOW
8734     * @param { boolean } isPrivacyMode in private mode if true, or not if false.
8735     * @param { AsyncCallback<void> } callback Callback used to return the result.
8736     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
8737     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8738     *                                                                  2. Incorrect parameter types.
8739     * @throws { BusinessError } 1300002 - This window state is abnormal.
8740     * @syscap SystemCapability.WindowManager.WindowManager.Core
8741     * @crossplatform
8742     * @atomicservice
8743     * @since arkts {'1.1':'20', '1.2':'20'}
8744     * @arkts 1.1&1.2
8745     */
8746    setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void;
8747
8748    /**
8749     * Ignore this window during screenshot.
8750     *
8751     * @param { boolean } isSkip skip if true, or not if false.
8752     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8753     *                                                                  2. Incorrect parameter types.
8754     * @throws { BusinessError } 1300002 - This window state is abnormal.
8755     * @syscap SystemCapability.WindowManager.WindowManager.Core
8756     * @systemapi Hide this for inner system use.
8757     * @since 9
8758     */
8759    /**
8760     * Ignore this window during screenshot.
8761     *
8762     * @param { boolean } isSkip skip if true, or not if false.
8763     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8764     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8765     *                                                                  2. Incorrect parameter types.
8766     * @throws { BusinessError } 1300002 - This window state is abnormal.
8767     * @syscap SystemCapability.WindowManager.WindowManager.Core
8768     * @systemapi Hide this for inner system use.
8769     * @since 12
8770     */
8771    setSnapshotSkip(isSkip: boolean): void;
8772
8773    /**
8774     * Sets whether is touchable or not.
8775     *
8776     * @param { boolean } isTouchable is touchable if true, or not if false.
8777     * @returns { Promise<void> } Promise that returns no value.
8778     * @syscap SystemCapability.WindowManager.WindowManager.Core
8779     * @since 7
8780     * @deprecated since 9
8781     * @useinstead ohos.window.Window#setWindowTouchable
8782     */
8783    setTouchable(isTouchable: boolean): Promise<void>;
8784
8785    /**
8786     * Sets whether is touchable or not.
8787     *
8788     * @param { boolean } isTouchable is touchable if true, or not if false.
8789     * @param { AsyncCallback<void> } callback Callback used to return the result.
8790     * @syscap SystemCapability.WindowManager.WindowManager.Core
8791     * @since 7
8792     * @deprecated since 9
8793     * @useinstead ohos.window.Window#setWindowTouchable
8794     */
8795    setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void;
8796
8797    /**
8798     * Sets whether is touchable or not.
8799     *
8800     * @param { boolean } isTouchable is touchable if true, or not if false.
8801     * @returns { Promise<void> } Promise that returns no value.
8802     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8803     *                                                                  2. Incorrect parameter types.
8804     * @throws { BusinessError } 1300002 - This window state is abnormal.
8805     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8806     * @syscap SystemCapability.WindowManager.WindowManager.Core
8807     * @since 9
8808     */
8809    /**
8810     * Sets whether is touchable or not.
8811     *
8812     * @param { boolean } isTouchable is touchable if true, or not if false.
8813     * @returns { Promise<void> } Promise that returns no value.
8814     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8815     *                                                                  2. Incorrect parameter types.
8816     * @throws { BusinessError } 1300002 - This window state is abnormal.
8817     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8818     * @syscap SystemCapability.WindowManager.WindowManager.Core
8819     * @atomicservice
8820     * @since arkts {'1.1':'12', '1.2':'20'}
8821     * @arkts 1.1&1.2
8822     */
8823    setWindowTouchable(isTouchable: boolean): Promise<void>;
8824
8825    /**
8826     * Sets whether is touchable or not.
8827     *
8828     * @param { boolean } isTouchable is touchable if true, or not if false.
8829     * @param { AsyncCallback<void> } callback Callback used to return the result.
8830     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8831     *                                                                  2. Incorrect parameter types.
8832     * @throws { BusinessError } 1300002 - This window state is abnormal.
8833     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8834     * @syscap SystemCapability.WindowManager.WindowManager.Core
8835     * @since 9
8836     */
8837    /**
8838     * Sets whether is touchable or not.
8839     *
8840     * @param { boolean } isTouchable is touchable if true, or not if false.
8841     * @param { AsyncCallback<void> } callback Callback used to return the result.
8842     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8843     *                                                                  2. Incorrect parameter types.
8844     * @throws { BusinessError } 1300002 - This window state is abnormal.
8845     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8846     * @syscap SystemCapability.WindowManager.WindowManager.Core
8847     * @atomicservice
8848     * @since arkts {'1.1':'12', '1.2':'20'}
8849     * @arkts 1.1&1.2
8850     */
8851    setWindowTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void;
8852
8853    /**
8854     * Set handwrite flag on the window. This flag means only response handwrite event.
8855     *
8856     * @param { boolean } enable - Add handwrite flag to window if true, or remove flag if false.
8857     * @returns { Promise<void> } - The promise returned by the function.
8858     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8859     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8860     *                                                                  2. Incorrect parameter types.
8861     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8862     * @throws { BusinessError } 1300002 - This window state is abnormal.
8863     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8864     * @syscap SystemCapability.Window.SessionManager
8865     * @systemapi Hide this for inner system use.
8866     * @since 12
8867     */
8868    setHandwritingFlag(enable: boolean): Promise<void>;
8869
8870    /**
8871     * Sets the flag of the window is forbidden to move in split screen mode
8872     *
8873     * @param { boolean } isForbidSplitMove the flag of the window is forbidden to move in split screen mode
8874     * @param { AsyncCallback<void> } callback Callback used to return the result.
8875     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8876     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8877     *                                                                  2. Incorrect parameter types.
8878     * @throws { BusinessError } 1300002 - This window state is abnormal.
8879     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8880     * @syscap SystemCapability.WindowManager.WindowManager.Core
8881     * @systemapi
8882     * @since 9
8883     */
8884    setForbidSplitMove(isForbidSplitMove: boolean, callback: AsyncCallback<void>): void;
8885
8886    /**
8887     * Sets the flag of the window is forbidden to move in split screen mode
8888     *
8889     * @param { boolean } isForbidSplitMove the flag of the window is forbidden to move in split screen mode
8890     * @returns { Promise<void> } Promise that returns no value.
8891     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8892     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8893     *                                                                  2. Incorrect parameter types.
8894     * @throws { BusinessError } 1300002 - This window state is abnormal.
8895     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
8896     * @syscap SystemCapability.WindowManager.WindowManager.Core
8897     * @systemapi
8898     * @since 9
8899     */
8900    setForbidSplitMove(isForbidSplitMove: boolean): Promise<void>;
8901
8902    /**
8903     * Obtains snapshot of window
8904     *
8905     * @param { AsyncCallback<image.PixelMap> } callback Callback used to return the result.
8906     * @throws { BusinessError } 1300002 - This window state is abnormal.
8907     * @syscap SystemCapability.WindowManager.WindowManager.Core
8908     * @since 9
8909     */
8910    /**
8911     * Obtains snapshot of window
8912     *
8913     * @param { AsyncCallback<image.PixelMap> } callback Callback used to return the result.
8914     * @throws { BusinessError } 1300002 - This window state is abnormal.
8915     * @syscap SystemCapability.WindowManager.WindowManager.Core
8916     * @atomicservice
8917     * @since arkts {'1.1':'12','1.2':'20'}
8918     * @arkts 1.1&1.2
8919     */
8920    snapshot(callback: AsyncCallback<image.PixelMap>): void;
8921
8922    /**
8923     * Obtains snapshot of window
8924     *
8925     * @returns { Promise<image.PixelMap> } Promise that returns no value.
8926     * @throws { BusinessError } 1300002 - This window state is abnormal.
8927     * @syscap SystemCapability.WindowManager.WindowManager.Core
8928     * @since 9
8929     */
8930    /**
8931     * Obtains snapshot of window
8932     *
8933     * @returns { Promise<image.PixelMap> } Promise that returns no value.
8934     * @throws { BusinessError } 1300002 - This window state is abnormal.
8935     * @syscap SystemCapability.WindowManager.WindowManager.Core
8936     * @atomicservice
8937     * @since arkts {'1.1':'12','1.2':'20'}
8938     * @arkts 1.1&1.2
8939     */
8940    snapshot(): Promise<image.PixelMap>;
8941
8942    /**
8943     * Obtains snapshot of window
8944     *
8945     * @returns { image.PixelMap } Return pixel map of snapshot.
8946     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
8947     * @throws { BusinessError } 1300002 - This window state is abnormal.
8948     * @throws { BusinessError } 1300018 - Timeout.
8949     * @syscap SystemCapability.Window.SessionManager
8950     * @since 20
8951     */
8952    snapshotSync(): image.PixelMap;
8953
8954    /**
8955     * Obtains snapshot of window even set the privacy mode.
8956     *
8957     * @returns { Promise<image.PixelMap> } Promise that returns no value.
8958     * @throws { BusinessError } 801 - Capability not supported. Function snapshotIgnorePrivacy can not work correctly due to limited device capabilities.
8959     * @throws { BusinessError } 1300002 - This window state is abnormal.
8960     * @syscap SystemCapability.Window.SessionManager
8961     * @atomicservice
8962     * @since 18
8963     */
8964    snapshotIgnorePrivacy(): Promise<image.PixelMap>;
8965
8966    /**
8967     * Sets opacity  of window
8968     *
8969     * @param { number } opacity Interval is 0.f-1.f.
8970     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8971     *                                                                  2. Incorrect parameter types;
8972     *                                                                  3. Parameter verification failed.
8973     * @throws { BusinessError } 1300002 - This window state is abnormal.
8974     * @throws { BusinessError } 1300004 - Unauthorized operation.
8975     * @syscap SystemCapability.WindowManager.WindowManager.Core
8976     * @systemapi
8977     * @since 9
8978     */
8979    /**
8980     * Sets the opacity for this window.
8981     * This API can be used only when you customize an animation to be played during the display or hiding of a system window.
8982     *
8983     * @param { number } opacity Interval is 0.f-1.f.
8984     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
8985     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
8986     *                                                                  2. Incorrect parameter types;
8987     *                                                                  3. Parameter verification failed.
8988     * @throws { BusinessError } 1300002 - This window state is abnormal.
8989     * @throws { BusinessError } 1300004 - Unauthorized operation.
8990     * @syscap SystemCapability.WindowManager.WindowManager.Core
8991     * @systemapi
8992     * @since arkts {'1.1':'12', '1.2':'20'}
8993     * @arkts 1.1&1.2
8994     */
8995    opacity(opacity: number): void;
8996
8997    /**
8998     * Sets scale options of window.
8999     *
9000     * @param { ScaleOptions } scaleOptions scale param of window.
9001     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9002     *                                                                  2. Incorrect parameter types;
9003     *                                                                  3. Parameter verification failed.
9004     * @throws { BusinessError } 1300002 - This window state is abnormal.
9005     * @throws { BusinessError } 1300004 - Unauthorized operation.
9006     * @syscap SystemCapability.WindowManager.WindowManager.Core
9007     * @systemapi
9008     * @since 9
9009     */
9010    /**
9011     * Sets the scale parameters for this window.
9012     * This API can be used only when you customize an animation to be played during the display or hiding of a system window.
9013     *
9014     * @param { ScaleOptions } scaleOptions scale param of window.
9015     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9016     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9017     *                                                                  2. Incorrect parameter types;
9018     *                                                                  3. Parameter verification failed.
9019     * @throws { BusinessError } 1300002 - This window state is abnormal.
9020     * @throws { BusinessError } 1300004 - Unauthorized operation.
9021     * @syscap SystemCapability.WindowManager.WindowManager.Core
9022     * @systemapi
9023     * @since arkts {'1.1':'12', '1.2':'20'}
9024     * @arkts 1.1&1.2
9025     */
9026    scale(scaleOptions: ScaleOptions): void;
9027
9028    /**
9029     * Sets rotate options of window.
9030     *
9031     * @param { RotateOptions } rotateOptions rotate param of window.
9032     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9033     *                                                                  2. Incorrect parameter types;
9034     *                                                                  3. Parameter verification failed.
9035     * @throws { BusinessError } 1300002 - This window state is abnormal.
9036     * @throws { BusinessError } 1300004 - Unauthorized operation.
9037     * @syscap SystemCapability.WindowManager.WindowManager.Core
9038     * @systemapi
9039     * @since 9
9040     */
9041    /**
9042     * Sets the rotation parameters for this window.
9043     * This API can be used only when you customize an animation to be played during the display or hiding of a system window.
9044     *
9045     * @param { RotateOptions } rotateOptions rotate param of window.
9046     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9047     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9048     *                                                                  2. Incorrect parameter types;
9049     *                                                                  3. Parameter verification failed.
9050     * @throws { BusinessError } 1300002 - This window state is abnormal.
9051     * @throws { BusinessError } 1300004 - Unauthorized operation.
9052     * @syscap SystemCapability.WindowManager.WindowManager.Core
9053     * @systemapi
9054     * @since arkts {'1.1':'12', '1.2':'20'}
9055     * @arkts 1.1&1.2
9056     */
9057    rotate(rotateOptions: RotateOptions): void;
9058
9059    /**
9060     * Sets translate options of window.
9061     *
9062     * @param { TranslateOptions } translateOptions translate param of window.
9063     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9064     *                                                                  2. Incorrect parameter types;
9065     *                                                                  3. Parameter verification failed.
9066     * @throws { BusinessError } 1300002 - This window state is abnormal.
9067     * @throws { BusinessError } 1300004 - Unauthorized operation.
9068     * @syscap SystemCapability.WindowManager.WindowManager.Core
9069     * @systemapi
9070     * @since 9
9071     */
9072    /**
9073     * Sets the translation parameters for this window.
9074     * This API can be used only when you customize an animation to be played during the display or hiding of a system window.
9075     *
9076     * @param { TranslateOptions } translateOptions translate param of window.
9077     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9078     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9079     *                                                                  2. Incorrect parameter types;
9080     *                                                                  3. Parameter verification failed.
9081     * @throws { BusinessError } 1300002 - This window state is abnormal.
9082     * @throws { BusinessError } 1300004 - Unauthorized operation.
9083     * @syscap SystemCapability.WindowManager.WindowManager.Core
9084     * @systemapi
9085     * @since arkts {'1.1':'12', '1.2':'20'}
9086     * @arkts 1.1&1.2
9087     */
9088    translate(translateOptions: TranslateOptions): void;
9089
9090    /**
9091     * Get Transition Controller.
9092     *
9093     * @returns { TransitionController }
9094     * @throws { BusinessError } 1300002 - This window state is abnormal.
9095     * @throws { BusinessError } 1300004 - Unauthorized operation.
9096     * @syscap SystemCapability.WindowManager.WindowManager.Core
9097     * @systemapi
9098     * @since 9
9099     */
9100    /**
9101     * Get Transition Controller.
9102     *
9103     * @returns { TransitionController }
9104     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9105     * @throws { BusinessError } 1300002 - This window state is abnormal.
9106     * @throws { BusinessError } 1300004 - Unauthorized operation.
9107     * @syscap SystemCapability.WindowManager.WindowManager.Core
9108     * @systemapi
9109     * @since 12
9110     */
9111    getTransitionController(): TransitionController;
9112
9113    /**
9114     * Sets the window blur radius.
9115     *
9116     * @param { number } radius the blur radius.
9117     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9118     *                                                                  2. Incorrect parameter types;
9119     *                                                                  3. Parameter verification failed.
9120     * @throws { BusinessError } 1300002 - This window state is abnormal.
9121     * @throws { BusinessError } 1300004 - Unauthorized operation.
9122     * @syscap SystemCapability.WindowManager.WindowManager.Core
9123     * @systemapi Hide this for inner system use.
9124     * @since 9
9125     */
9126    /**
9127     * Sets the window blur radius.
9128     *
9129     * @param { number } radius the blur radius.
9130     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9131     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9132     *                                                                  2. Incorrect parameter types;
9133     *                                                                  3. Parameter verification failed.
9134     * @throws { BusinessError } 1300002 - This window state is abnormal.
9135     * @throws { BusinessError } 1300004 - Unauthorized operation.
9136     * @syscap SystemCapability.WindowManager.WindowManager.Core
9137     * @systemapi Hide this for inner system use.
9138     * @since 12
9139     */
9140    setBlur(radius: number): void;
9141
9142    /**
9143     * Sets the window backdrop blur radius.
9144     *
9145     * @param { number } radius the blur radius.
9146     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9147     *                                                                  2. Incorrect parameter types;
9148     *                                                                  3. Parameter verification failed.
9149     * @throws { BusinessError } 1300002 - This window state is abnormal.
9150     * @throws { BusinessError } 1300004 - Unauthorized operation.
9151     * @syscap SystemCapability.WindowManager.WindowManager.Core
9152     * @systemapi Hide this for inner system use.
9153     * @since 9
9154     */
9155    /**
9156     * Blurs the background of this window.
9157     * The window background refers to the lower-layer area covered by the window, which is the same as the window size.
9158     * To make the blur effect visible, you must set the window background transparent by calling setWindowBackgroundColor.
9159     *
9160     * @param { number } radius the blur radius.
9161     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9162     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9163     *                                                                  2. Incorrect parameter types;
9164     *                                                                  3. Parameter verification failed.
9165     * @throws { BusinessError } 1300002 - This window state is abnormal.
9166     * @throws { BusinessError } 1300004 - Unauthorized operation.
9167     * @syscap SystemCapability.WindowManager.WindowManager.Core
9168     * @systemapi Hide this for inner system use.
9169     * @since 12
9170     */
9171    setBackdropBlur(radius: number): void;
9172
9173    /**
9174     * Sets the window backdrop blur style.
9175     *
9176     * @param { BlurStyle } blurStyle the specified blur style.
9177     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9178     *                                                                  2. Incorrect parameter types;
9179     *                                                                  3. Parameter verification failed.
9180     * @throws { BusinessError } 1300002 - This window state is abnormal.
9181     * @throws { BusinessError } 1300004 - Unauthorized operation.
9182     * @syscap SystemCapability.WindowManager.WindowManager.Core
9183     * @systemapi Hide this for inner system use.
9184     * @since 9
9185     */
9186    /**
9187     * Sets the blur style for the background of this window.
9188     *
9189     * @param { BlurStyle } blurStyle the specified blur style.
9190     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9191     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9192     *                                                                  2. Incorrect parameter types;
9193     *                                                                  3. Parameter verification failed.
9194     * @throws { BusinessError } 1300002 - This window state is abnormal.
9195     * @throws { BusinessError } 1300004 - Unauthorized operation.
9196     * @syscap SystemCapability.WindowManager.WindowManager.Core
9197     * @systemapi Hide this for inner system use.
9198     * @since 12
9199     */
9200    setBackdropBlurStyle(blurStyle: BlurStyle): void;
9201
9202    /**
9203     * Sets shadow.
9204     *
9205     * @param { number } radius the radius of the shadow.
9206     * @param { string } color the color of the shadow.
9207     * @param { number } offsetX the offset of the shadow on the x-axis.
9208     * @param { number } offsetY the offset of the shadow on the y-axis.
9209     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9210     *                                                                  2. Incorrect parameter types;
9211     *                                                                  3. Parameter verification failed.
9212     * @throws { BusinessError } 1300002 - This window state is abnormal.
9213     * @throws { BusinessError } 1300004 - Unauthorized operation.
9214     * @syscap SystemCapability.WindowManager.WindowManager.Core
9215     * @systemapi Hide this for inner system use.
9216     * @since 9
9217     */
9218    /**
9219     * Sets the shadow for the window borders.
9220     *
9221     * @param { number } radius the radius of the shadow.
9222     * @param { string } color the color of the shadow.
9223     * @param { number } offsetX the offset of the shadow on the x-axis.
9224     * @param { number } offsetY the offset of the shadow on the y-axis.
9225     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9226     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9227     *                                                                  2. Incorrect parameter types;
9228     *                                                                  3. Parameter verification failed.
9229     * @throws { BusinessError } 1300002 - This window state is abnormal.
9230     * @throws { BusinessError } 1300004 - Unauthorized operation.
9231     * @syscap SystemCapability.WindowManager.WindowManager.Core
9232     * @systemapi Hide this for inner system use.
9233     * @since arkts {'1.1':'12', '1.2':'20'}
9234     * @arkts 1.1&1.2
9235     */
9236    setShadow(radius: number, color?: string, offsetX?: number, offsetY?: number): void;
9237
9238    /**
9239     * Sets the blur radius of the shadow on the edges of a child window or floating window.
9240     *
9241     * @param { number } radius - Radius of the shadow, measured in px.
9242     *                            The value is a floating point number greater than or equal to 0.0,
9243     *                            and the value 0.0 means that the shadow is disabled for the window borders.
9244     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9245     *                                                                  2. Incorrect parameter types;
9246     *                                                                  3. Parameter verification failed.
9247     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9248     * @throws { BusinessError } 1300002 - This window state is abnormal.
9249     * @throws { BusinessError } 1300004 - Unauthorized operation.
9250     * @syscap SystemCapability.Window.SessionManager
9251     * @atomicservice
9252     * @since 17
9253     */
9254    setWindowShadowRadius(radius: number): void;
9255
9256    /**
9257     * Sets corner radius.
9258     *
9259     * @param { number } cornerRadius the corner radius.
9260     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9261     *                                                                  2. Incorrect parameter types;
9262     *                                                                  3. Parameter verification failed.
9263     * @throws { BusinessError } 1300002 - This window state is abnormal.
9264     * @throws { BusinessError } 1300004 - Unauthorized operation.
9265     * @syscap SystemCapability.WindowManager.WindowManager.Core
9266     * @systemapi Hide this for inner system use.
9267     * @since 9
9268     */
9269    /**
9270     * Sets the radius of the rounded corners for this window.
9271     *
9272     * @param { number } cornerRadius the corner radius.
9273     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9274     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9275     *                                                                  2. Incorrect parameter types;
9276     *                                                                  3. Parameter verification failed.
9277     * @throws { BusinessError } 1300002 - This window state is abnormal.
9278     * @throws { BusinessError } 1300004 - Unauthorized operation.
9279     * @syscap SystemCapability.WindowManager.WindowManager.Core
9280     * @systemapi Hide this for inner system use.
9281     * @since 12
9282     */
9283    setCornerRadius(cornerRadius: number): void;
9284
9285    /**
9286     * Sets the radius of the rounded corners for a child window or floating window.
9287     *
9288     * @param { number } cornerRadius - Radius of the rounded corners, measured in vp.
9289     *                                  The value is a floating point number greater than or equal to 0.0.
9290     *                                  The value 0.0 means that the window does not use rounded corners.
9291     * @returns { Promise<void> } Promise that returns no value.
9292     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9293     *                                                                  2. Incorrect parameter types;
9294     *                                                                  3. Parameter verification failed.
9295     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9296     * @throws { BusinessError } 1300002 - This window state is abnormal.
9297     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9298     * @throws { BusinessError } 1300004 - Unauthorized operation.
9299     * @syscap SystemCapability.Window.SessionManager
9300     * @atomicservice
9301     * @since 17
9302     */
9303    setWindowCornerRadius(cornerRadius: number): Promise<void>;
9304
9305    /**
9306     * Obtains the radius of rounded corners of a child window or floating window.
9307     *
9308     * @returns { number } - Radius of the rounded corner of the child window or floating window, measured in vp.
9309     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9310     * @throws { BusinessError } 1300002 - This window state is abnormal.
9311     * @throws { BusinessError } 1300004 - Unauthorized operation.
9312     * @syscap SystemCapability.Window.SessionManager
9313     * @atomicservice
9314     * @since 17
9315     */
9316    getWindowCornerRadius(): number;
9317
9318    /**
9319     * Raise app sub window to app top
9320     *
9321     * @param { AsyncCallback<void> } callback - The callback of raiseToAppTop
9322     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9323     * @throws { BusinessError } 1300002 - This window state is abnormal.
9324     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9325     * @throws { BusinessError } 1300004 - Unauthorized operation.
9326     * @throws { BusinessError } 1300009 - The parent window is invalid.
9327     * @syscap SystemCapability.WindowManager.WindowManager.Core
9328     * @systemapi Hide this for inner system use.
9329     * @since 10
9330     */
9331    raiseToAppTop(callback: AsyncCallback<void>): void;
9332
9333    /**
9334     * Raise app sub window to app top
9335     *
9336     * @returns { Promise<void> } - The promise returned by the function
9337     * @throws { BusinessError } 1300002 - This window state is abnormal.
9338     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9339     * @throws { BusinessError } 1300004 - Unauthorized operation.
9340     * @throws { BusinessError } 1300009 - The parent window is invalid.
9341     * @syscap SystemCapability.WindowManager.WindowManager.Core
9342     * @since 14
9343     */
9344    raiseToAppTop(): Promise<void>;
9345
9346    /**
9347     * Sets the aspect ratio of window
9348     *
9349     * @param { number } ratio - The aspect ratio of window except decoration
9350     * @param { AsyncCallback<void> } callback - The callback of setAspectRatio.
9351     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9352     *                                                                  2. Incorrect parameter types;
9353     *                                                                  3. Parameter verification failed.
9354     * @throws { BusinessError } 1300002 - This window state is abnormal.
9355     * @throws { BusinessError } 1300004 - Unauthorized operation.
9356     * @syscap SystemCapability.WindowManager.WindowManager.Core
9357     * @since 10
9358     */
9359    /**
9360     * Sets the aspect ratio of window
9361     *
9362     * @param { number } ratio - The aspect ratio of window except decoration
9363     * @param { AsyncCallback<void> } callback - The callback of setAspectRatio.
9364     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9365     *                                                                  2. Incorrect parameter types;
9366     *                                                                  3. Parameter verification failed.
9367     * @throws { BusinessError } 1300002 - This window state is abnormal.
9368     * @throws { BusinessError } 1300004 - Unauthorized operation.
9369     * @syscap SystemCapability.WindowManager.WindowManager.Core
9370     * @atomicservice
9371     * @since 12
9372     */
9373    setAspectRatio(ratio: number, callback: AsyncCallback<void>): void;
9374
9375    /**
9376     * Sets the aspect ratio of window
9377     *
9378     * @param { number } ratio - The aspect ratio of window except decoration
9379     * @returns { Promise<void> } - The promise returned by the function.
9380     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9381     *                                                                  2. Incorrect parameter types;
9382     *                                                                  3. Parameter verification failed.
9383     * @throws { BusinessError } 1300002 - This window state is abnormal.
9384     * @throws { BusinessError } 1300004 - Unauthorized operation.
9385     * @syscap SystemCapability.WindowManager.WindowManager.Core
9386     * @since 10
9387     */
9388    /**
9389     * Sets the aspect ratio of window
9390     *
9391     * @param { number } ratio - The aspect ratio of window except decoration
9392     * @returns { Promise<void> } - The promise returned by the function.
9393     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9394     *                                                                  2. Incorrect parameter types;
9395     *                                                                  3. Parameter verification failed.
9396     * @throws { BusinessError } 1300002 - This window state is abnormal.
9397     * @throws { BusinessError } 1300004 - Unauthorized operation.
9398     * @syscap SystemCapability.WindowManager.WindowManager.Core
9399     * @atomicservice
9400     * @since 12
9401     */
9402    setAspectRatio(ratio: number): Promise<void>;
9403
9404    /**
9405     * Resets the aspect ratio of window
9406     *
9407     * @param { AsyncCallback<void> } callback - The callback of setAspectRatio.
9408     * @throws { BusinessError } 1300002 - This window state is abnormal.
9409     * @throws { BusinessError } 1300004 - Unauthorized operation.
9410     * @syscap SystemCapability.WindowManager.WindowManager.Core
9411     * @since 10
9412     */
9413    /**
9414     * Resets the aspect ratio of window
9415     *
9416     * @param { AsyncCallback<void> } callback - The callback of setAspectRatio.
9417     * @throws { BusinessError } 1300002 - This window state is abnormal.
9418     * @throws { BusinessError } 1300004 - Unauthorized operation.
9419     * @syscap SystemCapability.WindowManager.WindowManager.Core
9420     * @atomicservice
9421     * @since 12
9422     */
9423    resetAspectRatio(callback: AsyncCallback<void>): void;
9424
9425    /**
9426     * Resets the aspect ratio of window
9427     *
9428     * @returns { Promise<void> } - The promise returned by the function.
9429     * @throws { BusinessError } 1300002 - This window state is abnormal.
9430     * @throws { BusinessError } 1300004 - Unauthorized operation.
9431     * @syscap SystemCapability.WindowManager.WindowManager.Core
9432     * @since 10
9433     */
9434    /**
9435     * Resets the aspect ratio of window
9436     *
9437     * @returns { Promise<void> } - The promise returned by the function.
9438     * @throws { BusinessError } 1300002 - This window state is abnormal.
9439     * @throws { BusinessError } 1300004 - Unauthorized operation.
9440     * @syscap SystemCapability.WindowManager.WindowManager.Core
9441     * @atomicservice
9442     * @since 12
9443     */
9444    resetAspectRatio(): Promise<void>;
9445
9446    /**
9447     * Set the watermark flag on the window.
9448     *
9449     * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false.
9450     * @param { AsyncCallback<void> } callback - The callback of setWaterMarkFlag.
9451     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
9452     * <br>2. Incorrect parameter types.
9453     * @throws { BusinessError } 1300002 - This window state is abnormal.
9454     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9455     * @throws { BusinessError } 1300008 - The display device is abnormal.
9456     * @syscap SystemCapability.WindowManager.WindowManager.Core
9457     * @systemapi Hide this for inner system use.
9458     * @since 10
9459     */
9460    /**
9461     * Set the watermark flag on the window.
9462     *
9463     * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false.
9464     * @param { AsyncCallback<void> } callback - The callback of setWaterMarkFlag.
9465     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9466     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
9467     * <br>2. Incorrect parameter types.
9468     * @throws { BusinessError } 1300002 - This window state is abnormal.
9469     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9470     * @throws { BusinessError } 1300008 - The display device is abnormal.
9471     * @syscap SystemCapability.WindowManager.WindowManager.Core
9472     * @systemapi Hide this for inner system use.
9473     * @since arkts {'1.1':'12', '1.2':'20'}
9474     * @arkts 1.1&1.2
9475     */
9476    setWaterMarkFlag(enable: boolean, callback: AsyncCallback<void>): void;
9477
9478    /**
9479     * Set the watermark flag on the window
9480     *
9481     * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false
9482     * @returns { Promise<void> } - The promise returned by the function
9483     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
9484     * <br>2. Incorrect parameter types.
9485     * @throws { BusinessError } 1300002 - This window state is abnormal.
9486     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9487     * @throws { BusinessError } 1300008 - The display device is abnormal.
9488     * @syscap SystemCapability.WindowManager.WindowManager.Core
9489     * @systemapi Hide this for inner system use.
9490     * @since 10
9491     */
9492    /**
9493     * Set the watermark flag on the window
9494     *
9495     * @param { boolean } enable - Add water mark flag to window if true, or remove flag if false
9496     * @returns { Promise<void> } - The promise returned by the function
9497     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9498     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
9499     * <br>2. Incorrect parameter types.
9500     * @throws { BusinessError } 1300002 - This window state is abnormal.
9501     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9502     * @throws { BusinessError } 1300008 - The display device is abnormal.
9503     * @syscap SystemCapability.WindowManager.WindowManager.Core
9504     * @systemapi Hide this for inner system use.
9505     * @since arkts {'1.1':'12', '1.2':'20'}
9506     * @arkts 1.1&1.2
9507     */
9508    setWaterMarkFlag(enable: boolean): Promise<void>;
9509
9510    /**
9511     * Raise one app sub window above another.
9512     *
9513     * @param { number } windowId - Indicates target window id.
9514     * @param { AsyncCallback<void> } callback - The callback of raiseAboveTarget.
9515     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9516     * @throws { BusinessError } 401 - Parameter error. Possible cause: Mandatory parameters are left unspecified.
9517     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9518     * @throws { BusinessError } 1300002 - This window state is abnormal.
9519     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9520     * @throws { BusinessError } 1300004 - Unauthorized operation.
9521     * @throws { BusinessError } 1300009 - The parent window is invalid.
9522     * @syscap SystemCapability.Window.SessionManager
9523     * @systemapi Hide this for inner system use.
9524     * @since 10
9525     */
9526    raiseAboveTarget(windowId: number, callback: AsyncCallback<void>): void;
9527
9528    /**
9529     * Raise one app sub window above another.
9530     *
9531     * @param { number } windowId - Indicates target window id.
9532     * @returns { Promise<void> } - The promise returned by the function.
9533     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9534     * @throws { BusinessError } 401 - Parameter error. Possible cause: Mandatory parameters are left unspecified.
9535     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9536     * @throws { BusinessError } 1300002 - This window state is abnormal.
9537     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9538     * @throws { BusinessError } 1300004 - Unauthorized operation.
9539     * @throws { BusinessError } 1300009 - The parent window is invalid.
9540     * @syscap SystemCapability.Window.SessionManager
9541     * @systemapi Hide this for inner system use.
9542     * @since 10
9543     */
9544    raiseAboveTarget(windowId: number): Promise<void>;
9545
9546    /**
9547     * Raise main window above another.
9548     *
9549     * @param { number } windowId - Indicates target window id.
9550     * @returns { Promise<void> } - The promise returned by the function.
9551     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9552     * @throws { BusinessError } 801 - Capability not supported.
9553     *     Failed to call the API due to limited device capabilities.
9554     * @throws { BusinessError } 1300002 - This window state is abnormal.
9555     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9556     * @throws { BusinessError } 1300004 - Unauthorized operation.
9557     * @throws { BusinessError } 1300016 - Parameter error. Possible cause:
9558     *     1. Invalid Parameter range. 2. Invalid parameter length.
9559     * @syscap SystemCapability.Window.SessionManager
9560     * @systemapi Hide this for inner system use.
9561     * @since 20
9562     */
9563    raiseMainWindowAboveTarget(windowId: number): Promise<void>;
9564
9565    /**
9566     * Set whether to enable an app sub window to raise itself by click.
9567     *
9568     * @param { boolean } enable - Disable app sub window to raise itself by by click if false.
9569     * @param { AsyncCallback<void> } callback - The callback of setRaiseByClickEnabled.
9570     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9571     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9572     *                                                                  2. Incorrect parameter types.
9573     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9574     * @throws { BusinessError } 1300002 - This window state is abnormal.
9575     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9576     * @throws { BusinessError } 1300004 - Unauthorized operation.
9577     * @throws { BusinessError } 1300009 - The parent window is invalid.
9578     * @syscap SystemCapability.Window.SessionManager
9579     * @systemapi Hide this for inner system use.
9580     * @since 10
9581     */
9582    setRaiseByClickEnabled(enable: boolean, callback: AsyncCallback<void>): void;
9583
9584    /**
9585     * Set whether to enable an app sub window to raise itself by click.
9586     *
9587     * @param { boolean } enable - Disable app sub window to raise itself by by click if false.
9588     * @returns { Promise<void> } - The promise returned by the function.
9589     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9590     *                                                                  2. Incorrect parameter types.
9591     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9592     * @throws { BusinessError } 1300002 - This window state is abnormal.
9593     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9594     * @throws { BusinessError } 1300004 - Unauthorized operation.
9595     * @throws { BusinessError } 1300009 - The parent window is invalid.
9596     * @syscap SystemCapability.Window.SessionManager
9597     * @since 14
9598     */
9599    setRaiseByClickEnabled(enable: boolean): Promise<void>;
9600
9601    /**
9602     * Minimize app main window and hide app subWindow.
9603     *
9604     * @param { AsyncCallback<void> } callback - The callback of Minimize.
9605     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9606     * @throws { BusinessError } 1300002 - This window state is abnormal.
9607     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9608     * @syscap SystemCapability.Window.SessionManager
9609     * @since 11
9610     */
9611    /**
9612     * Minimizes the main window if the caller is the main window. The main window can be restored in the dock bar. For 2-in-1 devices, it can be restored by calling restore().
9613     * Hides the child window if the caller is a child window. The child window cannot be restored in the dock bar. It can be made visible again by calling showWindow().
9614     *
9615     *
9616     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9617     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9618     * @throws { BusinessError } 1300002 - This window state is abnormal.
9619     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9620     * @syscap SystemCapability.Window.SessionManager
9621     * @atomicservice
9622     * @since 12
9623     */
9624    minimize(callback: AsyncCallback<void>): void;
9625
9626    /**
9627     * Minimize app main window and hide app subWindow.
9628     *
9629     * @returns { Promise<void> } - The promise returned by the function.
9630     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9631     * @throws { BusinessError } 1300002 - This window state is abnormal.
9632     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9633     * @syscap SystemCapability.Window.SessionManager
9634     * @since 11
9635     */
9636    /**
9637     * Minimizes the main window if the caller is the main window. The main window can be restored in the dock bar. For 2-in-1 devices, it can be restored by calling restore().
9638     * Hides the child window if the caller is a child window. The child window cannot be restored in the dock bar. It can be made visible again by calling showWindow().
9639     *
9640     * @returns { Promise<void> } - Promise that returns no value.
9641     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9642     * @throws { BusinessError } 1300002 - This window state is abnormal.
9643     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9644     * @syscap SystemCapability.Window.SessionManager
9645     * @atomicservice
9646     * @since 12
9647     */
9648    minimize(): Promise<void>;
9649
9650    /**
9651     * Maximize app main window.
9652     * @param { MaximizePresentation } presentation - set window presentation when maximize.
9653     * @returns { Promise<void> } - The promise returned by the function.
9654     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9655     * @throws { BusinessError } 1300002 - This window state is abnormal.
9656     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9657     * @throws { BusinessError } 1300004 - Unauthorized operation.
9658     * @throws { BusinessError } 1300005 - This window stage is abnormal.
9659     * @syscap SystemCapability.Window.SessionManager
9660     * @atomicservice
9661     * @since 12
9662     */
9663    /**
9664     * Maximizes the main window.
9665     *
9666     * @param { ?MaximizePresentation } presentation - Layout when the window is maximized.
9667     *                                                 The default value is window.MaximizePresentation.ENTER_IMMERSIVE,
9668     *                                                 indicating that the window enters the immersive layout when maximized.
9669     * @returns { Promise<void> } - Promise that returns no value.
9670     * @throws { BusinessError } 801 - Capability not supported. Function maximize can not work correctly due to limited device capabilities.
9671     * @throws { BusinessError } 1300002 - This window state is abnormal.
9672     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9673     * @throws { BusinessError } 1300004 - Unauthorized operation.
9674     * @syscap SystemCapability.Window.SessionManager
9675     * @atomicservice
9676     * @since arkts {'1.1':'20', '1.2':'20'}
9677     * @arkts 1.1&1.2
9678     */
9679    maximize(presentation?: MaximizePresentation): Promise<void>;
9680
9681    /**
9682     * Set whether to enable a window to resize by drag.
9683     *
9684     * @param { boolean } enable - Disable window to resize by drag if false.
9685     * @param { AsyncCallback<void> } callback - The callback of setResizeByDragEnabled.
9686     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9687     *                                                                  2. Incorrect parameter types.
9688     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9689     * @throws { BusinessError } 1300002 - This window state is abnormal.
9690     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9691     * @syscap SystemCapability.Window.SessionManager
9692     * @atomicservice
9693     * @since 14
9694     */
9695    setResizeByDragEnabled(enable: boolean, callback: AsyncCallback<void>): void;
9696
9697    /**
9698     * Set whether to enable a window to resize by drag.
9699     *
9700     * @param { boolean } enable - Disable window to resize by drag if false.
9701     * @returns { Promise<void> } - The promise returned by the function.
9702     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9703     *                                                                  2. Incorrect parameter types.
9704     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9705     * @throws { BusinessError } 1300002 - This window state is abnormal.
9706     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9707     * @syscap SystemCapability.Window.SessionManager
9708     * @atomicservice
9709     * @since 14
9710     */
9711    setResizeByDragEnabled(enable: boolean): Promise<void>;
9712
9713    /**
9714     * Hide the non-system floating windows.
9715     *
9716     * @param { boolean } shouldHide - Hide the non-system floating windows if true, otherwise means the opposite.
9717     * @param { AsyncCallback<void> } callback - The callback of hideNonSystemFloatingWindows.
9718     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9719     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9720     *                                                                  2. Incorrect parameter types.
9721     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9722     * @throws { BusinessError } 1300002 - This window state is abnormal.
9723     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9724     * @throws { BusinessError } 1300004 - Unauthorized operation.
9725     * @syscap SystemCapability.Window.SessionManager
9726     * @systemapi Hide this for inner system use.
9727     * @since arkts {'1.1':'11', '1.2':'20'}
9728     * @arkts 1.1&1.2
9729     */
9730    hideNonSystemFloatingWindows(shouldHide: boolean, callback: AsyncCallback<void>): void;
9731
9732    /**
9733     * Hide the non-system floating windows.
9734     *
9735     * @param { boolean } shouldHide - Hide the non-system floating windows if true, otherwise means the opposite.
9736     * @returns { Promise<void> } - The promise returned by the function.
9737     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9738     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9739     *                                                                  2. Incorrect parameter types.
9740     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9741     * @throws { BusinessError } 1300002 - This window state is abnormal.
9742     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9743     * @throws { BusinessError } 1300004 - Unauthorized operation.
9744     * @syscap SystemCapability.Window.SessionManager
9745     * @systemapi Hide this for inner system use.
9746     * @since arkts {'1.1':'11', '1.2':'20'}
9747     * @arkts 1.1&1.2
9748     */
9749    hideNonSystemFloatingWindows(shouldHide: boolean): Promise<void>;
9750
9751    /**
9752     * Get the window limits of current window.
9753     *
9754     * @returns { WindowLimits } - The limits of window.
9755     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9756     * @throws { BusinessError } 1300002 - This window state is abnormal.
9757     * @syscap SystemCapability.Window.SessionManager
9758     * @since 11
9759     */
9760    /**
9761     * Get the window limits of current window.
9762     *
9763     * @returns { WindowLimits } - The limits of window.
9764     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9765     * @throws { BusinessError } 1300002 - This window state is abnormal.
9766     * @syscap SystemCapability.Window.SessionManager
9767     * @atomicservice
9768     * @since 12
9769     */
9770    getWindowLimits(): WindowLimits;
9771
9772    /**
9773     * Set the window limits of a window.
9774     *
9775     * @param { WindowLimits } windowLimits - window limits of the window.
9776     * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window.
9777     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9778     *                                                                  2. Incorrect parameter types;
9779     *                                                                  3. Parameter verification failed.
9780     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9781     * @throws { BusinessError } 1300002 - This window state is abnormal.
9782     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9783     * @throws { BusinessError } 1300004 - Unauthorized operation.
9784     * @syscap SystemCapability.Window.SessionManager
9785     * @since 11
9786     */
9787    /**
9788     * Set the window limits of a window.
9789     *
9790     * @param { WindowLimits } windowLimits - window limits of the window.
9791     * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window.
9792     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9793     *                                                                  2. Incorrect parameter types;
9794     *                                                                  3. Parameter verification failed.
9795     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9796     * @throws { BusinessError } 1300002 - This window state is abnormal.
9797     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9798     * @throws { BusinessError } 1300004 - Unauthorized operation.
9799     * @syscap SystemCapability.Window.SessionManager
9800     * @atomicservice
9801     * @since 12
9802     */
9803    setWindowLimits(windowLimits: WindowLimits): Promise<WindowLimits>;
9804
9805    /**
9806     * Set the window limits of a window.
9807     *
9808     * @param { WindowLimits } windowLimits - Window limits of the window.
9809     * @param { boolean } isForcible - Ignore system limits.
9810     * @returns { Promise<WindowLimits> } - Promise is used to return the limits of window.
9811     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9812     *                                                                  2. Incorrect parameter types;
9813     *                                                                  3. Parameter verification failed.
9814     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9815     * @throws { BusinessError } 1300002 - This window state is abnormal.
9816     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9817     * @throws { BusinessError } 1300004 - Unauthorized operation.
9818     * @syscap SystemCapability.Window.SessionManager
9819     * @atomicservice
9820     * @since 15
9821     */
9822    setWindowLimits(windowLimits: WindowLimits, isForcible: boolean): Promise<WindowLimits>;
9823
9824    /**
9825     * Set whether to enable the single frame composer.
9826     *
9827     * @param { boolean } enable - Enable the single frame composer if true, otherwise means the opposite.
9828     * @returns { Promise<void> } - The promise returned by the function.
9829     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
9830     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9831     *                                                                  2. Incorrect parameter types.
9832     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9833     * @throws { BusinessError } 1300002 - This window state is abnormal.
9834     * @syscap SystemCapability.Window.SessionManager
9835     * @systemapi Hide this for inner system use.
9836     * @since 11
9837     */
9838    setSingleFrameComposerEnabled(enable: boolean): Promise<void>;
9839
9840    /**
9841     * When get focused, keep the keyboard created by other windows, support system window and app subwindow.
9842     *
9843     * @param { boolean } keepKeyboardFlag - keep the keyboard if true, otherwise means the opposite.
9844     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9845     *                                                                  2. Incorrect parameter types.
9846     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9847     * @throws { BusinessError } 1300002 - This window state is abnormal.
9848     * @throws { BusinessError } 1300004 - Unauthorized operation.
9849     * @syscap SystemCapability.Window.SessionManager
9850     * @since 11
9851     */
9852    /**
9853     * When get focused, keep the keyboard created by other windows, support system window and app subwindow.
9854     *
9855     * @param { boolean } keepKeyboardFlag - Whether to keep the soft keyboard created by others.
9856     * The value true means to keep the soft keyboard, and false means the opposite.
9857     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9858     *                                                                  2. Incorrect parameter types.
9859     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9860     * @throws { BusinessError } 1300002 - This window state is abnormal.
9861     * @throws { BusinessError } 1300004 - Unauthorized operation.
9862     * @syscap SystemCapability.Window.SessionManager
9863     * @atomicservice
9864     * @since arkts {'1.1':'12', '1.2':'20'}
9865     * @arkts 1.1&1.2
9866     */
9867    keepKeyboardOnFocus(keepKeyboardFlag: boolean): void;
9868
9869    /**
9870     * Recover app main window.
9871     *
9872     * @returns { Promise<void> } - The promise returned by the function.
9873     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9874     * @throws { BusinessError } 1300001 - Repeated operation.
9875     * @throws { BusinessError } 1300002 - This window state is abnormal.
9876     * @syscap SystemCapability.Window.SessionManager
9877     * @since 11
9878     */
9879    /**
9880     * Restores the main window from the full-screen, maximized, or split-screen mode to a floating window,
9881     * and restores the window size and position to those before the full-screen, maximized, or split-screen mode is entered.
9882     *
9883     * @returns { Promise<void> } - Promise that returns no value.
9884     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9885     * @throws { BusinessError } 1300001 - Repeated operation.
9886     * @throws { BusinessError } 1300002 - This window state is abnormal.
9887     * @syscap SystemCapability.Window.SessionManager
9888     * @atomicservice
9889     * @since arkts {'1.1':'12', '1.2':'20'}
9890     * @arkts 1.1&1.2
9891     */
9892    recover(): Promise<void>;
9893
9894    /**
9895     * Restores the main window from minimization to the foreground, returning it to its size and position before it is minimized.
9896     *
9897     * @returns { Promise<void> } - Promise that returns no value.
9898     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9899     * @throws { BusinessError } 1300002 - This window state is abnormal.
9900     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
9901     * @throws { BusinessError } 1300004 - Unauthorized operation.
9902     * @syscap SystemCapability.Window.SessionManager
9903     * @atomicservice
9904     * @since 14
9905     */
9906    restore(): Promise<void>;
9907
9908    /**
9909     * Set the visibility of the window decor.
9910     *
9911     * @param { boolean } - Enable the decor visible if true, otherwise means the opposite.
9912     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9913     *                                                                  2. Incorrect parameter types.
9914     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9915     * @throws { BusinessError } 1300002 - This window state is abnormal.
9916     * @throws { BusinessError } 1300004 - Unauthorized operation.
9917     * @syscap SystemCapability.Window.SessionManager
9918     * @since 11
9919     */
9920    /**
9921     * Set the visibility of the window decor.
9922     *
9923     * @param { boolean } isVisible - Enable the decor visible if true, otherwise means the opposite.
9924     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9925     *                                                                  2. Incorrect parameter types.
9926     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9927     * @throws { BusinessError } 1300002 - This window state is abnormal.
9928     * @throws { BusinessError } 1300004 - Unauthorized operation.
9929     * @syscap SystemCapability.Window.SessionManager
9930     * @atomicservice
9931     * @since 12
9932     */
9933    /**
9934     * Sets whether the title bar is visible in the window.
9935     *
9936     * @param { boolean } isVisible - Whether the title bar is visible. The value true means that the title bar is visible and false means the opposite.
9937     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9938     *                                                                  2. Incorrect parameter types.
9939     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9940     * @throws { BusinessError } 1300002 - This window state is abnormal.
9941     * @syscap SystemCapability.Window.SessionManager
9942     * @atomicservice
9943     * @since arkts {'1.1':'20', '1.2':'20'}
9944     * @arkts 1.1&1.2
9945     */
9946    setWindowDecorVisible(isVisible: boolean): void;
9947
9948    /**
9949     * Checks whether the title bar of this window is visible.
9950     *
9951     * @returns { boolean } - Check result. The value true means that the title bar is visible, and false means the opposite.
9952     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9953     * @throws { BusinessError } 1300002 - This window state is abnormal.
9954     * @syscap SystemCapability.Window.SessionManager
9955     * @atomicservice
9956     * @since 18
9957     */
9958    getWindowDecorVisible(): boolean;
9959
9960    /**
9961     * Enables or disables the capability to move the window (either main window or child window) by dragging its title bar and to maximize the window with a double-click.
9962     *
9963     * @param { boolean } enabled - Whether to enable the capability to move the window by dragging the title bar and to maximize the window with a double-click.
9964     *                              The value true means to enable the capability, and false means the opposite.
9965     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9966     *                                                                  2. Incorrect parameter types.
9967     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9968     * @throws { BusinessError } 1300002 - This window state is abnormal.
9969     * @throws { BusinessError } 1300004 - Unauthorized operation.
9970     * @syscap SystemCapability.Window.SessionManager
9971     * @atomicservice
9972     * @since 14
9973     */
9974    setWindowTitleMoveEnabled(enabled: boolean): void;
9975
9976    /**
9977     * Set the title bar name of the window
9978     *
9979     * @param { string } titleName - The name of the title bar that needs to be set
9980     * @returns { Promise<void> } Promise that returns no value.
9981     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9982     *                                                                  2. Incorrect parameter types.
9983     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9984     * @throws { BusinessError } 1300002 - This window state is abnormal.
9985     * @syscap SystemCapability.Window.SessionManager
9986     * @atomicservice
9987     * @since 15
9988     */
9989    setWindowTitle(titleName: string): Promise<void>;
9990
9991    /**
9992     * Set the modality of the window.
9993     *
9994     * @param { boolean } isModal - Enable the window modal if true, otherwise means the opposite.
9995     * @returns { Promise<void> } Promise that returns no value.
9996     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
9997     *                                                                  2. Incorrect parameter types.
9998     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
9999     * @throws { BusinessError } 1300002 - This window state is abnormal.
10000     * @throws { BusinessError } 1300004 - Unauthorized operation.
10001     * @syscap SystemCapability.Window.SessionManager
10002     * @atomicservice
10003     * @since 12
10004     */
10005    /**
10006     * Enables the modal property of the child window. After the modal property is enabled,
10007     * the parent window does not respond to user interactions until the child window is closed or the child window's modal property is disabled.
10008     *
10009     * @param { boolean } isModal - Whether to enable the modal property of the child window.
10010     *                              The value true means to enable the modal property, and false means the opposite.
10011     * @returns { Promise<void> } Promise that returns no value.
10012     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10013     *                                                                  2. Incorrect parameter types.
10014     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10015     * @throws { BusinessError } 1300002 - This window state is abnormal.
10016     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10017     * @throws { BusinessError } 1300004 - Unauthorized operation.
10018     * @syscap SystemCapability.Window.SessionManager
10019     * @atomicservice
10020     * @since 20
10021     */
10022    setSubWindowModal(isModal: boolean): Promise<void>;
10023
10024    /**
10025     * Set the modality of the window.
10026     *
10027     * @param { boolean } isModal - Enable the window modal if true, otherwise means the opposite.
10028     * @param { ModalityType } modalityType - Set modality type when the window modal is true.
10029     * @returns { Promise<void> } Promise that returns no value.
10030     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10031     *                                                                  2. Incorrect parameter types.
10032     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10033     * @throws { BusinessError } 1300002 - This window state is abnormal.
10034     * @throws { BusinessError } 1300004 - Unauthorized operation.
10035     * @syscap SystemCapability.Window.SessionManager
10036     * @atomicservice
10037     * @since 14
10038     */
10039    /**
10040     * Enables the modal property of the child window. After the modal property is enabled,
10041     * the parent window does not respond to user interactions until the child window is closed or the child window's modal property is disabled.
10042     *
10043     * @param { boolean } isModal - Whether to enable the modal property of the child window. The value true means to enable the modal property,
10044     *                              and false means the opposite. Currently, this parameter can only be set to true.
10045     * @param { ModalityType } modalityType - Modality type of the child window.
10046     * @returns { Promise<void> } Promise that returns no value.
10047     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10048     *                                                                  2. Incorrect parameter types.
10049     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10050     * @throws { BusinessError } 1300002 - This window state is abnormal.
10051     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10052     * @throws { BusinessError } 1300004 - Unauthorized operation.
10053     * @syscap SystemCapability.Window.SessionManager
10054     * @atomicservice
10055     * @since 20
10056     */
10057    setSubWindowModal(isModal: boolean, modalityType: ModalityType): Promise<void>;
10058
10059    /**
10060     * Set the height of the window decor.
10061     *
10062     * @param { number } - The height of window decor.
10063     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10064     *                                                                  2. Incorrect parameter types;
10065     *                                                                  3. Parameter verification failed.
10066     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10067     * @throws { BusinessError } 1300002 - This window state is abnormal.
10068     * @syscap SystemCapability.Window.SessionManager
10069     * @since 11
10070     */
10071    /**
10072     * Sets the height of the title bar of this window.
10073     * This API takes effect for the window that has a title bar or a three-button area on 2-in-1 devices.
10074     *
10075     * @param { number } height - Height of the title bar. It takes effect only for the window with the title bar.
10076     *                            The value is an integer in the range [37,112]. The unit is vp. If a floating point number is passed in,
10077     *                            the value is rounded down. A value outside the range is invalid.
10078     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10079     *                                                                  2. Incorrect parameter types;
10080     *                                                                  3. Parameter verification failed.
10081     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10082     * @throws { BusinessError } 1300002 - This window state is abnormal.
10083     * @syscap SystemCapability.Window.SessionManager
10084     * @atomicservice
10085     * @since arkts {'1.1':'12', '1.2':'20'}
10086     * @arkts 1.1&1.2
10087     */
10088    setWindowDecorHeight(height: number): void;
10089
10090    /**
10091     * Get the height of the window decor.
10092     *
10093     * @returns { number } - The height of window decor.
10094     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10095     * @throws { BusinessError } 1300002 - This window state is abnormal.
10096     * @syscap SystemCapability.Window.SessionManager
10097     * @since 11
10098     */
10099    /**
10100     * Obtains the height of the title bar of this window.
10101     * This API takes effect for the window that has a title bar or a three-button area on 2-in-1 devices.
10102     *
10103     * @returns { number } - Height of the title bar. The value is an integer in the range [37,112]. The unit is vp.
10104     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10105     * @throws { BusinessError } 1300002 - This window state is abnormal.
10106     * @syscap SystemCapability.Window.SessionManager
10107     * @atomicservice
10108     * @since arkts {'1.1':'12', '1.2':'20'}
10109     * @arkts 1.1&1.2
10110     */
10111    getWindowDecorHeight(): number;
10112
10113    /**
10114     * Sets the button style of the decoration bar. The setting takes effect only for the main window and the child window with the window title enabled.
10115     *
10116     * @param { DecorButtonStyle } dectorStyle - Button style of the decoration bar.
10117     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10118     *                                                                  2. Incorrect parameter types;
10119     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10120     * @throws { BusinessError } 1300002 - This window state is abnormal.
10121     * @throws { BusinessError } 1300004 - Unauthorized operation.
10122     * @syscap SystemCapability.Window.SessionManager
10123     * @atomicservice
10124     * @since 14
10125     */
10126    setDecorButtonStyle(dectorStyle: DecorButtonStyle): void;
10127
10128    /**
10129     * Obtains the button style of the decoration bar. The setting takes effect only for the main window and the child window with the window title enabled.
10130     *
10131     * @returns { DecorButtonStyle } - Button style on the decoration bar of the current window.
10132     *                                 The decoration button area is located in the upper right corner of the window.
10133     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10134     * @throws { BusinessError } 1300002 - This window state is abnormal.
10135     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10136     * @throws { BusinessError } 1300004 - Unauthorized operation.
10137     * @syscap SystemCapability.Window.SessionManager
10138     * @atomicservice
10139     * @since 14
10140     */
10141    getDecorButtonStyle(): DecorButtonStyle;
10142
10143    /**
10144     * Set touchable areas. By default, the entire window area is touchable.
10145     * If touchable areas are set in the window, touch events outside the areas will be transparent transmitted.
10146     * If the window area changes, you need to reset it.
10147     *
10148     * @param { Array<Rect> } rects - Touchable areas. The maximum size cannot exceed 10, touchable area cannot exceed the window's area.
10149     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
10150     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10151     *                                                                  2. Incorrect parameter types.
10152     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10153     * @throws { BusinessError } 1300002 - This window state is abnormal.
10154     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10155     * @syscap SystemCapability.Window.SessionManager
10156     * @systemapi
10157     * @since 12
10158     */
10159    setTouchableAreas(rects: Array<Rect>): void;
10160
10161    /**
10162     * Get the area of window title buttons.
10163     *
10164     * @returns { TitleButtonRect } - The area of window title buttons.
10165     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10166     * @throws { BusinessError } 1300002 - This window state is abnormal.
10167     * @syscap SystemCapability.Window.SessionManager
10168     * @since 11
10169     */
10170    /**
10171     * Obtains the rectangle that holds the minimize, maximize, and close buttons on the title bar of the main window or the decorated child window.
10172     *
10173     * @returns { TitleButtonRect } - Rectangle obtained, which is located in the upper right corner of the window.
10174     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10175     * @throws { BusinessError } 1300002 - This window state is abnormal.
10176     * @syscap SystemCapability.Window.SessionManager
10177     * @atomicservice
10178     * @since 12
10179     */
10180    getTitleButtonRect(): TitleButtonRect;
10181
10182    /**
10183     * Shows or hides the maximize, minimize, and split-screen buttons on the title bar of the main window.
10184     *
10185     * @param { boolean } isMaximizeVisible - Whether to show the maximize button. The value true means to show the button, and false means to hide it.
10186     * @param { boolean } isMinimizeVisible - Whether to show the minimize button. The value true means to show the button, and false means to hide it.
10187     * @param { boolean } isSplitVisible - Whether to show the split-screen button. The value true means to show the button, and false means to hide it.
10188     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
10189     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10190     *                                                                  2. Incorrect parameter types.
10191     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10192     * @throws { BusinessError } 1300002 - This window state is abnormal.
10193     * @throws { BusinessError } 1300004 - Unauthorized operation.
10194     * @syscap SystemCapability.Window.SessionManager
10195     * @systemapi Hide this for inner system use.
10196     * @since 12
10197     */
10198    setTitleButtonVisible(isMaximizeVisible: boolean, isMinimizeVisible: boolean, isSplitVisible: boolean): void;
10199
10200    /**
10201     * Shows or hides the maximize, minimize, and close buttons on the title bar of the main window.
10202     *
10203     * @param { boolean } isMaximizeButtonVisible - Whether to show the maximize button. The value true means to show the button, and false means the opposite.
10204     *                                              If the maximize button is hidden, the corresponding restore button is also hidden in the maximize scenario.
10205     * @param { boolean } isMinimizeButtonVisible - Whether to show the minimize button. The value true means to show the button, and false means the opposite.
10206     * @param { boolean } isCloseButtonVisible - Whether to show the close button. The value true means to show the button, and false means the opposite.
10207     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10208     *                                                                  2. Incorrect parameter types.
10209     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10210     * @throws { BusinessError } 1300002 - This window state is abnormal.
10211     * @throws { BusinessError } 1300004 - Unauthorized operation.
10212     * @syscap SystemCapability.Window.SessionManager
10213     * @atomicservice
10214     * @since 14
10215     */
10216    setWindowTitleButtonVisible(isMaximizeButtonVisible: boolean, isMinimizeButtonVisible: boolean, isCloseButtonVisible?: boolean): void;
10217
10218    /**
10219     * Enable landscape multiWindow
10220     *
10221     * @returns { Promise<void> } Promise that returns no value.
10222     * @throws {BusinessError} 1300002 - This window state is abnormal.
10223     * @throws {BusinessError} 1300003 - This window manager service works abnormally.
10224     * @syscap SystemCapability.Window.SessionManager
10225     * @atomicservice
10226     * @since 12
10227     */
10228    enableLandscapeMultiWindow(): Promise<void>;
10229
10230    /**
10231     * Starts moving this window. This API uses a promise to return the result.
10232     * The window moves along with the cursor only when this API is called in the callback function of onTouch, where the event type is TouchType.Down.
10233     *
10234     * @returns { Promise<void> } Promise that returns no value.
10235     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10236     * @throws { BusinessError } 1300001 - Repeated operation.
10237     * @throws { BusinessError } 1300002 - This window state is abnormal.
10238     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10239     * @throws { BusinessError } 1300004 - Unauthorized operation.
10240     * @syscap SystemCapability.Window.SessionManager
10241     * @atomicservice
10242     * @since 14
10243     */
10244    startMoving(): Promise<void>;
10245
10246    /**
10247     * Specifies the cursor position within the window and moves the window. It first adjusts the window to the cursor position before starting to move the window.
10248     * The window moves along with the cursor only when this API is called in the callback function of onTouch, where the event type is TouchType.Down.
10249     *
10250     * @param { number } offsetX - X-axis offset of the cursor position relative to the upper left corner of the window during movement, measured in px.
10251     *                             This parameter only accepts integer values; any floating-point input will be rounded down.
10252     *                             Negative values or values exceeding the window width are invalid. The window width can be obtained from WindowProperties.
10253     * @param { number } offsetY - Y-axis offset of the cursor position relative to the upper left corner of the window during movement, measured in px.
10254     *                             This parameter only accepts integer values; any floating-point input will be rounded down.
10255     *                             Negative values or values exceeding the window height are invalid. The window height can be obtained from WindowProperties.
10256     * @returns { Promise<void> } Promise that returns no value.
10257     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10258     *                                                                  2. Incorrect parameter types;
10259     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10260     * @throws { BusinessError } 1300001 - Repeated operation.
10261     * @throws { BusinessError } 1300002 - This window state is abnormal.
10262     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10263     * @throws { BusinessError } 1300004 - Unauthorized operation.
10264     * @syscap SystemCapability.Window.SessionManager
10265     * @atomicservice
10266     * @since 15
10267     */
10268    startMoving(offsetX: number, offsetY: number): Promise<void>;
10269
10270    /**
10271     * Stops window movement when a window is being dragged. This API uses a promise to return the result.
10272     *
10273     * @returns { Promise<void> } Promise that returns no value.
10274     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10275     * @throws { BusinessError } 1300002 - This window state is abnormal.
10276     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10277     * @throws { BusinessError } 1300004 - Unauthorized operation.
10278     * @syscap SystemCapability.Window.SessionManager
10279     * @atomicservice
10280     * @since 15
10281     */
10282    stopMoving(): Promise<void>;
10283
10284    /**
10285     * Enable drag window.
10286     *
10287     * @param { boolean } enable - The value true means to enable window dragging, and false means the opposite.
10288     * @returns { Promise<void> } Promise that returns no value.
10289     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
10290     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10291     *                                                                  2. Incorrect parameter types.
10292     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10293     * @throws { BusinessError } 1300002 - This window state is abnormal.
10294     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10295     * @throws { BusinessError } 1300004 - Unauthorized operation.
10296     * @syscap SystemCapability.Window.SessionManager
10297     * @systemapi Hide this for inner system use.
10298     * @since 14
10299     */
10300    /**
10301     * Enable drag window.
10302     *
10303     * @param { boolean } enable - The value true means to enable window dragging, and false means the opposite.
10304     * @returns { Promise<void> } Promise that returns no value.
10305     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10306     * @throws { BusinessError } 1300002 - This window state is abnormal.
10307     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10308     * @throws { BusinessError } 1300004 - Unauthorized operation.
10309     * @syscap SystemCapability.Window.SessionManager
10310     * @since 20
10311     */
10312    enableDrag(enable: boolean): Promise<void>;
10313
10314    /**
10315     * Disable landscape multiWindow
10316     *
10317     * @returns { Promise<void> } Promise that returns no value.
10318     * @throws {BusinessError} 1300002 - This window state is abnormal.
10319     * @throws {BusinessError} 1300003 - This window manager service works abnormally.
10320     * @syscap SystemCapability.Window.SessionManager
10321     * @atomicservice
10322     * @since 12
10323     */
10324    disableLandscapeMultiWindow(): Promise<void>;
10325
10326    /**
10327     * Set window transition animation
10328     *
10329     * @param { WindowTransitionType } transitionType - Transition animation type.
10330     * @param { TransitionAnimation } animation - Transition animation config.
10331     * @returns { Promise<void> } Promise that returns no value.
10332     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10333     * @throws { BusinessError } 1300002 - This window state is abnormal.
10334     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10335     * @throws { BusinessError } 1300004 - Unauthorized operation.
10336     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length.
10337     * @syscap SystemCapability.Window.SessionManager
10338     * @stagemodelonly
10339     * @atomicservice
10340     * @since 20
10341     */
10342    setWindowTransitionAnimation(transitionType: WindowTransitionType, animation: TransitionAnimation): Promise<void>;
10343
10344
10345    /**
10346     * Get window transition animation configuration
10347     *
10348     * @param { WindowTransitionType } transitionType - Transition animation type.
10349     * @returns { TransitionAnimation | undefined } Transition animation with transition type, or undefined if it has not been set.
10350     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10351     * @throws { BusinessError } 1300002 - This window state is abnormal.
10352     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10353     * @throws { BusinessError } 1300004 - Unauthorized operation.
10354     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range.
10355     * @syscap SystemCapability.Window.SessionManager
10356     * @stagemodelonly
10357     * @atomicservice
10358     * @since 20
10359     */
10360    getWindowTransitionAnimation(transitionType: WindowTransitionType): TransitionAnimation | undefined;
10361
10362    /**
10363     * Register the callback of title buttons area change.
10364     *
10365     * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event.
10366     * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area.
10367     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10368     *                                                                  2. Incorrect parameter types;
10369     *                                                                  3. Parameter verification failed.
10370     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10371     * @throws { BusinessError } 1300002 - This window state is abnormal.
10372     * @syscap SystemCapability.Window.SessionManager
10373     * @since 11
10374     */
10375    /**
10376     * Subscribes to the change event of the rectangle that holds the minimize, maximize, and close buttons on the title bar of the window.
10377     *
10378     * @param { 'windowTitleButtonRectChange' } type - Event type. The value is fixed at 'windowTitleButtonRectChange',
10379     *                                                 indicating that the change event of the rectangle that holds the minimize, maximize, and close buttons.
10380     * @param { Callback<TitleButtonRect> } callback - Callback used to return the new rectangle.
10381     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10382     *                                                                  2. Incorrect parameter types;
10383     *                                                                  3. Parameter verification failed.
10384     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10385     * @throws { BusinessError } 1300002 - This window state is abnormal.
10386     * @syscap SystemCapability.Window.SessionManager
10387     * @atomicservice
10388     * @since 12
10389     */
10390    on(type: 'windowTitleButtonRectChange', callback: Callback<TitleButtonRect>): void;
10391
10392    /**
10393     * Unregister the callback of title buttons area change.
10394     *
10395     * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event.
10396     * @param { Callback<TitleButtonRect> } callback - Callback used to return the current title buttons area.
10397     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
10398     *                                                                  2. Parameter verification failed.
10399     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10400     * @throws { BusinessError } 1300002 - This window state is abnormal.
10401     * @syscap SystemCapability.Window.SessionManager
10402     * @since 11
10403     */
10404    /**
10405     * Unsubscribes from the change event of the rectangle that holds the minimize, maximize, and close buttons on the title bar of the window.
10406     *
10407     * @param { 'windowTitleButtonRectChange' } type - Event type. The value is fixed at 'windowTitleButtonRectChange',
10408     *                                                 indicating that the change event of the rectangle that holds the minimize, maximize, and close buttons.
10409     * @param { Callback<TitleButtonRect> } callback - Callback used to return the new rectangle. If a value is passed in, the corresponding subscription is canceled.
10410     *                                                 If no value is passed in, all subscriptions to the specified event are canceled.
10411     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
10412     *                                                                  2. Parameter verification failed.
10413     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10414     * @throws { BusinessError } 1300002 - This window state is abnormal.
10415     * @syscap SystemCapability.Window.SessionManager
10416     * @atomicservice
10417     * @since 12
10418     */
10419    off(type: 'windowTitleButtonRectChange', callback?: Callback<TitleButtonRect>): void;
10420
10421    /**
10422     *  Set the window mask of window
10423     *
10424     * @param { Array<Array<number>> } windowMask - The mask of window. The value of the array is 0 and 1, the other number is illegal value.
10425     * @returns { Promise<void> } Promise that returns no value.
10426     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10427     *                                                                  2. Incorrect parameter types.
10428     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10429     * @throws { BusinessError } 1300002 - This window state is abnormal.
10430     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10431     * @throws { BusinessError } 1300004 - Unauthorized operation.
10432     * @syscap SystemCapability.Window.SessionManager
10433     * @atomicservice
10434     * @since 12
10435     */
10436     setWindowMask(windowMask: Array<Array<number>>): Promise<void>;
10437
10438    /**
10439     * Register the callback of windowRectChange
10440     *
10441     * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event.
10442     * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions.
10443     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10444     *                                                                  2. Incorrect parameter types;
10445     *                                                                  3. Parameter verification failed.
10446     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10447     * @throws { BusinessError } 1300002 - This window state is abnormal.
10448     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10449     * @syscap SystemCapability.Window.SessionManager
10450     * @atomicservice
10451     * @since arkts {'1.1':'12', '1.2':'20'}
10452     * @arkts 1.1&1.2
10453     */
10454    on(type: 'windowRectChange', callback: Callback<RectChangeOptions>): void;
10455
10456    /**
10457     * Unregister the callback of windowRectChange
10458     *
10459     * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event.
10460     * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions.
10461     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
10462     *                                                                  2. Parameter verification failed.
10463     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10464     * @throws { BusinessError } 1300002 - This window state is abnormal.
10465     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10466     * @syscap SystemCapability.Window.SessionManager
10467     * @atomicservice
10468     * @since arkts {'1.1':'12', '1.2':'20'}
10469     * @arkts 1.1&1.2
10470     */
10471    off(type: 'windowRectChange', callback?: Callback<RectChangeOptions>): void;
10472
10473    /**
10474     * Register the callback of rectChangeInGlobalDisplay
10475     *
10476     * @param { 'rectChangeInGlobalDisplay' } type - The value is fixed at 'rectChangeInGlobalDisplay', indicating the window gloabl rect change event.
10477     * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions.
10478     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10479     * @throws { BusinessError } 1300002 - This window state is abnormal.
10480     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10481     * @syscap SystemCapability.Window.SessionManager
10482     * @since 20
10483     */
10484    on(type: 'rectChangeInGlobalDisplay', callback: Callback<RectChangeOptions>): void;
10485
10486    /**
10487     * Unregister the callback of rectChangeInGlobalDisplay
10488     *
10489     * @param { 'rectChangeInGlobalDisplay' } type - The value is fixed at 'rectChangeInGlobalDisplay', indicating the window global rect change event.
10490     * @param { Callback<RectChangeOptions> } [callback] - Callback used to return the RectChangeOptions.
10491     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10492     * @throws { BusinessError } 1300002 - This window state is abnormal.
10493     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10494     * @syscap SystemCapability.Window.SessionManager
10495     * @since 20
10496     */
10497    off(type: 'rectChangeInGlobalDisplay', callback?: Callback<RectChangeOptions>): void;
10498
10499    /**
10500     * Convert the window coordinates to the global coordinates.
10501     *
10502     * @param { number } winX - Indicate the X-coordinate of the component relative to the current window.
10503     * @param { number } winY - Indicate the Y-coordinate of the component relative to the current window.
10504     * @returns { Position } The pair {x, y} represents respectively the X-coordinate
10505     *     and Y-coordinate of the window relative to the main screen.
10506     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10507     * @throws { BusinessError } 1300002 - This window state is abnormal.
10508     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
10509     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1.Invalid parameter range.
10510     * @syscap SystemCapability.Window.SessionManager
10511     * @since 20
10512     */
10513    clientToGlobalDisplay(winX: number, winY: number): Position;
10514
10515    /**
10516     * Convert the global coordinates to the window coordinates.
10517     *
10518     * @param { number } globalDisplayX - Indicate the X-coordinate of the component relative to the main screen.
10519     * @param { number } globalDisplayY - Indicate the Y-coordinate of the component relative to the main screen.
10520     * @returns { Position } The pair {x, y} represents respectively the X-coordinate
10521     *     and Y-coordinate of the window relative to the current screen.
10522     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10523     * @throws { BusinessError } 1300002 - This window state is abnormal.
10524     * @throws { BusinessError } 1300010 - The operation in the current window status is invalid.
10525     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1.Invalid parameter range.
10526     * @syscap SystemCapability.Window.SessionManager
10527     * @since 20
10528     */
10529    globalDisplayToClient(globalDisplayX: number, globalDisplayY: number): Position;
10530
10531    /**
10532     * Register the callback of rotation change
10533     *
10534     * @param { 'rotationChange' } type - The value is fixed at 'rotationChange', indicating the window rotation change event.
10535     * @param { RotationChangeCallback<RotationChangeInfo, RotationChangeResult | void> } callback - Callback used to return the rotation change result.
10536     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10537     * @throws { BusinessError } 1300002 - This window state is abnormal.
10538     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10539     * @syscap SystemCapability.Window.SessionManager
10540     * @atomicservice
10541     * @since 19
10542     */
10543    on(type: 'rotationChange', callback: RotationChangeCallback<RotationChangeInfo, RotationChangeResult | void>): void;
10544
10545    /**
10546     * Unregister the callback of rotationChange
10547     *
10548     * @param { 'rotationChange' } type - The value is fixed at 'rotationChange', indicating the window rotation change event.
10549     * @param { RotationChangeCallback<RotationChangeInfo, RotationChangeResult | void> } callback - Callback used to return the RectChangeOptions.
10550     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10551     * @throws { BusinessError } 1300002 - This window state is abnormal.
10552     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10553     * @syscap SystemCapability.Window.SessionManager
10554     * @atomicservice
10555     * @since 19
10556     */
10557    off(type: 'rotationChange', callback?: RotationChangeCallback<RotationChangeInfo, RotationChangeResult | void>): void;
10558
10559    /**
10560     * UIExtension in window secure limit change callback on.
10561     *
10562     * @param { 'uiExtensionSecureLimitChange' } eventType The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change.
10563     * @param { Callback<boolean> } callback Callback used to return the result whether the APP has uiextension secure limit.
10564     * @throws { BusinessError } 801 - Capability not supported.Function on('uiExtensionSecureLimitChange') can not work correctly due to limited device capabilities.
10565     * @throws { BusinessError } 1300002 - This window state is abnormal.
10566     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10567     * @syscap SystemCapability.Window.SessionManager
10568     * @atomicservice
10569     * @since 20
10570     */
10571    on(eventType: 'uiExtensionSecureLimitChange', callback: Callback<boolean>): void;
10572
10573    /**
10574     * UIExtension in window secure limit change callback off.
10575     *
10576     * @param { 'uiExtensionSecureLimitChange' } eventType The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change.
10577     * @param { Callback<boolean> } callback Callback used to return the result whether the APP has uiextension secure limit.
10578     * @throws { BusinessError } 801 - Capability not supported.Function off('uiExtensionSecureLimitChange') can not work correctly due to limited device capabilities.
10579     * @throws { BusinessError } 1300002 - This window state is abnormal.
10580     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10581     * @syscap SystemCapability.Window.SessionManager
10582     * @atomicservice
10583     * @since 20
10584     */
10585    off(eventType: 'uiExtensionSecureLimitChange', callback?: Callback<boolean>): void;
10586
10587
10588    /**
10589     * Set gray scale of window.
10590     *
10591     * @param { number } grayScale - The value of gray scale.
10592     * @returns { Promise<void> } - The promise returned by the function.
10593     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10594     *                                                                  2. Incorrect parameter types;
10595     *                                                                  3. Parameter verification failed.
10596     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10597     * @throws { BusinessError } 1300002 - This window state is abnormal.
10598     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10599     * @syscap SystemCapability.Window.SessionManager
10600     * @atomicservice
10601     * @since 12
10602     */
10603    setWindowGrayScale(grayScale: number): Promise<void>;
10604
10605    /**
10606     * Set whether to enable immersive mode.
10607     *
10608     * @param { boolean } enabled - The value true means to enable immersive mode, and false means the opposite.
10609     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10610     *                                                                  2. Incorrect parameter types.
10611     * @throws { BusinessError } 1300002 - This window state is abnormal.
10612     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10613     * @throws { BusinessError } 1300004 - Unauthorized operation.
10614     * @syscap SystemCapability.WindowManager.WindowManager.Core
10615     * @atomicservice
10616     * @since arkts {'1.1':'12', '1.2':'20'}
10617     * @arkts 1.1&1.2
10618     */
10619    setImmersiveModeEnabledState(enabled: boolean): void;
10620
10621    /**
10622     * Get whether the immersive mode is enabled or not.
10623     *
10624     * @returns { boolean } - The value true means the immersive mode is enabled, and false means the opposite.
10625     * @throws { BusinessError } 1300002 - This window state is abnormal.
10626     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10627     * @throws { BusinessError } 1300004 - Unauthorized operation.
10628     * @syscap SystemCapability.WindowManager.WindowManager.Core
10629     * @atomicservice
10630     * @since 12
10631     */
10632    getImmersiveModeEnabledState(): boolean;
10633
10634
10635    /**
10636     * Checks whether the layout is immersive.
10637     *
10638     * @returns { boolean } The value true means that the layout is immersive, and false means the opposite.
10639     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10640     * @throws { BusinessError } 1300002 - This window state is abnormal.
10641     * @syscap SystemCapability.Window.SessionManager
10642     * @since 20
10643     */
10644    isImmersiveLayout(): boolean;
10645
10646    /**
10647     * Get the window status of current window.
10648     *
10649     * @returns { WindowStatusType } - The status of window.
10650     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10651     * @throws { BusinessError } 1300002 - This window state is abnormal.
10652     * @syscap SystemCapability.Window.SessionManager
10653     * @atomicservice
10654     * @since 12
10655     */
10656    getWindowStatus(): WindowStatusType;
10657
10658    /**
10659     * Checks whether the window is focused.
10660     *
10661     * @returns { boolean } - Whether the window is focused. The value true means that the window is focused, and false means the opposite.
10662     * @throws { BusinessError } 1300002 - This window state is abnormal.
10663     * @syscap SystemCapability.WindowManager.WindowManager.Core
10664     * @atomicservice
10665     * @since 12
10666     */
10667    isFocused(): boolean;
10668
10669    /**
10670     * Creates a child window under the main window, another child window, or floating window.
10671     *
10672     * @param { string } name - Name of the child window.
10673     * @param { SubWindowOptions } options - Parameters used for creating the child window.
10674     * @returns { Promise<Window> } Promise used to used to return the child window created.
10675     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
10676     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10677     * @throws { BusinessError } 1300002 - This window state is abnormal.
10678     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10679     * @throws { BusinessError } 1300004 - Unauthorized operation.
10680     * @syscap SystemCapability.Window.SessionManager
10681     * @StageModelOnly
10682     * @atomicservice
10683     * @since 12
10684     */
10685    createSubWindowWithOptions(name: string, options: SubWindowOptions): Promise<Window>;
10686
10687    /**
10688     * Set the parent window of the child window.
10689     *
10690     * @param { number } windowId - Indicates parent window id.
10691     * @returns { Promise<void> } Promise that returns no value.
10692     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10693     * @throws { BusinessError } 1300002 - This window state is abnormal.
10694     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10695     * @throws { BusinessError } 1300004 - Unauthorized operation.
10696     * @throws { BusinessError } 1300009 - The parent window is invaild.
10697     * @syscap SystemCapability.Window.SessionManager
10698     * @atomicservice
10699     * @since 19
10700     */
10701    setParentWindow(windowId: number): Promise<void>;
10702
10703    /**
10704     * Get the parent window.
10705     *
10706     * @returns { Window } Parent Window.
10707     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10708     * @throws { BusinessError } 1300002 - This window state is abnormal.
10709     * @throws { BusinessError } 1300004 - Unauthorized operation.
10710     * @throws { BusinessError } 1300009 - The parent window is invaild.
10711     * @syscap SystemCapability.Window.SessionManager
10712     * @atomicservice
10713     * @since 19
10714     */
10715    getParentWindow(): Window;
10716
10717    /**
10718     * Set whether the sub window supports simultaneous display on multiple screens when the parent window is dragged to move or dragged to zoom.
10719     *
10720     * @param { boolean } enabled - The value true means sub window supports simultaneous display on multiple screens when the parent window
10721     *                              is dragged to move or dragged to zoom, and false means the opposite.
10722     * @returns { Promise<void> } Promise that returns no value.
10723     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10724     *                                                                  2. Incorrect parameter types.
10725     * @throws { BusinessError } 801 - Capability not supported.Function setFollowParentMultiScreenPolicy can not work correctly due to limited device capabilities.
10726     * @throws { BusinessError } 1300002 - This window state is abnormal.
10727     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10728     * @throws { BusinessError } 1300004 - Unauthorized operation.
10729     * @syscap SystemCapability.Window.SessionManager
10730     * @atomicservice
10731     * @since 17
10732     */
10733    setFollowParentMultiScreenPolicy(enabled: boolean): Promise<void>;
10734
10735    /**
10736     * Set whether the title bar and dock bar will show, when the mouse hovers over hot area.
10737     *
10738     * @param { boolean } isTitleHoverShown - The value true means to display the title bar, and false means the opposite.
10739     * @param { boolean } isDockHoverShown - The value true means to display the dock bar, and false means the opposite.
10740     * @returns { Promise<void> } Promise that returns no value.
10741     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10742     *                                                                  2. Incorrect parameter types.
10743     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10744     * @throws { BusinessError } 1300002 - This window state is abnormal.
10745     * @throws { BusinessError } 1300004 - Unauthorized operation.
10746     * @syscap SystemCapability.Window.SessionManager
10747     * @atomicservice
10748     * @since 14
10749     */
10750    /**
10751     * Sets whether to show the window title bar and dock bar when the cursor hovers over the hot zone while the main window is in full-screen mode.
10752     *
10753     * @param { boolean } isTitleHoverShown - Whether to show the window title bar. The value true means to show the window title bar,
10754     *                                        and false means the opposite. The default value is true.
10755     * @param { boolean } isDockHoverShown - Whether to show the dock bar. The value true means to show the dock bar,
10756     *                                       and false means the opposite. The default value is true.
10757     * @returns { Promise<void> } Promise that returns no value.
10758     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10759     * @throws { BusinessError } 1300002 - This window state is abnormal.
10760     * @throws { BusinessError } 1300004 - Unauthorized operation.
10761     * @syscap SystemCapability.Window.SessionManager
10762     * @atomicservice
10763     * @since 20
10764     */
10765    setTitleAndDockHoverShown(isTitleHoverShown?: boolean, isDockHoverShown?: boolean): Promise<void>;
10766
10767    /**
10768     * Set window container active and inactive color.
10769     *
10770     * @permission ohos.permission.SET_WINDOW_TRANSPARENT
10771     * @param { string } activeColor - window container color in active.
10772     * @param { string } inactiveColor - window container color in inactive.
10773     * @throws { BusinessError } 201 - Permission verification failed.
10774     *     The application does not have the permission required to call the API.
10775     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10776     * @throws { BusinessError } 1300002 - This window state is abnormal.
10777     * @throws { BusinessError } 1300004 - Unauthorized operation.
10778     * @syscap SystemCapability.Window.SessionManager
10779     * @since 20
10780     */
10781    setWindowContainerColor(activeColor: string, inactiveColor: string): void;
10782
10783    /**
10784     * Set whether window delay raise is enabled.
10785     *
10786     * @param { boolean } isEnabled - The value true means to enable window delay raise, and false means disable window delay raise.
10787     * @throws { BusinessError } 801 - Capability not supported.function setWindowDelayRaiseOnDrag can not work correctly due to limited device capabilities.
10788     * @throws { BusinessError } 1300002 - This window state is abnormal.
10789     * @syscap SystemCapability.Window.SessionManager
10790     * @atomicservice
10791     * @since 19
10792     */
10793    setWindowDelayRaiseOnDrag(isEnabled: boolean): void;
10794
10795    /**
10796     * Set the zlevel of current sub window.
10797     *
10798     * @param { number } zLevel - the zlevel of current sub window.
10799     * @returns { Promise<void> } - The promise returned by the function.
10800     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
10801     *                                                                  2. Incorrect parameter types;
10802     *                                                                  3. Parameter verification failed.
10803     * @throws { BusinessError } 801 - Capability not supported. Function setSubWindowZLevel can not work correctly due to limited device capabilities.
10804     * @throws { BusinessError } 1300002 - This window state is abnormal.
10805     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10806     * @throws { BusinessError } 1300004 - Unauthorized operation.
10807     * @throws { BusinessError } 1300009 - The parent window is invalid.
10808     * @syscap SystemCapability.Window.SessionManager
10809     * @atomicservice
10810     * @since 18
10811     */
10812    setSubWindowZLevel(zLevel: number): Promise<void>;
10813
10814    /**
10815     * Get the zlevel of current sub window.
10816     *
10817     * @returns { number } - the zlevel of current sub window.
10818     * @throws { BusinessError } 801 - Capability not supported. Function getSubWindowZLevel can not work correctly due to limited device capabilities.
10819     * @throws { BusinessError } 1300002 - This window state is abnormal.
10820     * @throws { BusinessError } 1300004 - Unauthorized operation.
10821     * @syscap SystemCapability.Window.SessionManager
10822     * @atomicservice
10823     * @since 18
10824     */
10825    getSubWindowZLevel(): number;
10826
10827    /**
10828     * Set the policy of key frame when resize by dragging.
10829     *
10830     * @param { KeyFramePolicy } keyFramePolicy - The policy of key frame to set.
10831     * @returns { Promise<KeyFramePolicy> } - Promise is used to return the effective policy of key frame.
10832     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
10833     * @throws { BusinessError } 1300002 - This window state is abnormal.
10834     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
10835     * @throws { BusinessError } 1300004 - Unauthorized operation.
10836     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range; 2. The parameter format is incorrect.
10837     * @syscap SystemCapability.Window.SessionManager
10838     * @since 20
10839     */
10840    setDragKeyFramePolicy(keyFramePolicy: KeyFramePolicy): Promise<KeyFramePolicy>;
10841  }
10842
10843  /**
10844   * Window stage callback event type
10845   *
10846   * @enum { number }
10847   * @syscap SystemCapability.WindowManager.WindowManager.Core
10848   * @StageModelOnly
10849   * @since 9
10850   */
10851  /**
10852   * Window stage callback event type
10853   *
10854   * @enum { number }
10855   * @syscap SystemCapability.WindowManager.WindowManager.Core
10856   * @StageModelOnly
10857   * @crossplatform
10858   * @since 10
10859   */
10860  /**
10861   * Window stage callback event type
10862   *
10863   * @enum { number }
10864   * @syscap SystemCapability.WindowManager.WindowManager.Core
10865   * @StageModelOnly
10866   * @crossplatform
10867   * @atomicservice
10868   * @since arkts {'1.1':'11', '1.2':'20'}
10869   * @arkts 1.1&1.2
10870   */
10871  enum WindowStageEventType {
10872    /**
10873     * The window stage is running in the foreground.
10874     *
10875     * @syscap SystemCapability.WindowManager.WindowManager.Core
10876     * @StageModelOnly
10877     * @since 9
10878     */
10879    /**
10880     * The window stage is running in the foreground.
10881     *
10882     * @syscap SystemCapability.WindowManager.WindowManager.Core
10883     * @StageModelOnly
10884     * @crossplatform
10885     * @since 10
10886     */
10887    /**
10888     * The window stage is running in the foreground.
10889     *
10890     * @syscap SystemCapability.WindowManager.WindowManager.Core
10891     * @StageModelOnly
10892     * @crossplatform
10893     * @atomicservice
10894     * @since arkts {'1.1':'11', '1.2':'20'}
10895     * @arkts 1.1&1.2
10896     */
10897    SHOWN = 1,
10898    /**
10899     * The window stage gains focus.
10900     *
10901     * @syscap SystemCapability.WindowManager.WindowManager.Core
10902     * @StageModelOnly
10903     * @since 9
10904     */
10905    /**
10906     * The window stage gains focus.
10907     *
10908     * @syscap SystemCapability.WindowManager.WindowManager.Core
10909     * @StageModelOnly
10910     * @crossplatform
10911     * @since 10
10912     */
10913    /**
10914     * The window stage gains focus.
10915     *
10916     * @syscap SystemCapability.WindowManager.WindowManager.Core
10917     * @StageModelOnly
10918     * @crossplatform
10919     * @atomicservice
10920     * @since arkts {'1.1':'11', '1.2':'20'}
10921     * @arkts 1.1&1.2
10922     */
10923    ACTIVE = 2,
10924    /**
10925     * The window stage loses focus.
10926     *
10927     * @syscap SystemCapability.WindowManager.WindowManager.Core
10928     * @StageModelOnly
10929     * @since 9
10930     */
10931    /**
10932     * The window stage loses focus.
10933     *
10934     * @syscap SystemCapability.WindowManager.WindowManager.Core
10935     * @StageModelOnly
10936     * @crossplatform
10937     * @since 10
10938     */
10939    /**
10940     * The window stage loses focus.
10941     *
10942     * @syscap SystemCapability.WindowManager.WindowManager.Core
10943     * @StageModelOnly
10944     * @crossplatform
10945     * @atomicservice
10946     * @since arkts {'1.1':'11', '1.2':'20'}
10947     * @arkts 1.1&1.2
10948     */
10949    INACTIVE = 3,
10950    /**
10951     * The window stage is running in the background.
10952     *
10953     * @syscap SystemCapability.WindowManager.WindowManager.Core
10954     * @StageModelOnly
10955     * @since 9
10956     */
10957    /**
10958     * The window stage is running in the background.
10959     *
10960     * @syscap SystemCapability.WindowManager.WindowManager.Core
10961     * @StageModelOnly
10962     * @crossplatform
10963     * @since 10
10964     */
10965    /**
10966     * The window stage is running in the background.
10967     *
10968     * @syscap SystemCapability.WindowManager.WindowManager.Core
10969     * @StageModelOnly
10970     * @crossplatform
10971     * @atomicservice
10972     * @since arkts {'1.1':'11', '1.2':'20'}
10973     * @arkts 1.1&1.2
10974     */
10975    HIDDEN = 4,
10976    /**
10977     * The window stage is interactive in the foreground.
10978     *
10979     * @syscap SystemCapability.WindowManager.WindowManager.Core
10980     * @StageModelOnly
10981     * @crossplatform
10982     * @atomicservice
10983     * @since arkts {'1.1':'11', '1.2':'20'}
10984     * @arkts 1.1&1.2
10985     */
10986    RESUMED = 5,
10987    /**
10988     * The window stage is not interactive in the foreground.
10989     *
10990     * @syscap SystemCapability.WindowManager.WindowManager.Core
10991     * @StageModelOnly
10992     * @crossplatform
10993     * @atomicservice
10994     * @since arkts {'1.1':'11', '1.2':'20'}
10995     * @arkts 1.1&1.2
10996     */
10997    PAUSED = 6
10998  }
10999
11000  /**
11001   * Window stage lifecycle callback event type
11002   *
11003   * @enum { number }
11004   * @syscap SystemCapability.Window.SessionManager
11005   * @stagemodelonly
11006   * @since 20
11007   */
11008  enum WindowStageLifecycleEventType {
11009    /**
11010     * The window stage is running in the foreground.
11011     *
11012     * @syscap SystemCapability.Window.SessionManager
11013     * @stagemodelonly
11014     * @since 20
11015     */
11016    SHOWN = 1,
11017    /**
11018     * The window stage is interactive in the foreground.
11019     *
11020     * @syscap SystemCapability.Window.SessionManager
11021     * @stagemodelonly
11022     * @since 20
11023     */
11024    RESUMED = 2,
11025    /**
11026     * The window stage is not interactive in the foreground.
11027     *
11028     * @syscap SystemCapability.Window.SessionManager
11029     * @stagemodelonly
11030     * @since 20
11031     */
11032    PAUSED = 3,
11033    /**
11034     * The window stage is running in the background.
11035     *
11036     * @syscap SystemCapability.Window.SessionManager
11037     * @stagemodelonly
11038     * @since 20
11039     */
11040    HIDDEN = 4
11041  }
11042
11043  /**
11044   * Enum for window modality Type
11045   *
11046   * @enum { number }
11047   * @syscap SystemCapability.Window.SessionManager
11048   * @atomicservice
11049   * @since arkts {'1.1':'14', '1.2':'20'}
11050   * @arkts 1.1&1.2
11051   */
11052  enum ModalityType {
11053    /**
11054     * The value means window modality.
11055     *
11056     * @syscap SystemCapability.Window.SessionManager
11057     * @atomicservice
11058     * @since arkts {'1.1':'14', '1.2':'20'}
11059     * @arkts 1.1&1.2
11060     */
11061    WINDOW_MODALITY = 0,
11062    /**
11063     * The value means application modality.
11064     *
11065     * @syscap SystemCapability.Window.SessionManager
11066     * @atomicservice
11067     * @since arkts {'1.1':'14', '1.2':'20'}
11068     * @arkts 1.1&1.2
11069     */
11070    APPLICATION_MODALITY = 1,
11071  }
11072
11073
11074  /**
11075   * Options for window shown
11076   *
11077   * @interface ShowWindowOptions
11078   * @syscap SystemCapability.Window.SessionManager
11079   * @atomicservice
11080   * @since 20
11081   */
11082  interface ShowWindowOptions {
11083    /**
11084     * Indicates whether the window get focus when it is shown
11085     *
11086     * @type { ?boolean }
11087     * @syscap SystemCapability.Window.SessionManager
11088     * @atomicservice
11089     * @since 20
11090     */
11091    focusOnShow?: boolean;
11092  }
11093
11094
11095  /**
11096   * Options for subwindow creation
11097   *
11098   * @interface SubWindowOptions
11099   * @syscap SystemCapability.Window.SessionManager
11100   * @since 11
11101   */
11102  /**
11103   * Options for subwindow creation
11104   *
11105   * @interface SubWindowOptions
11106   * @syscap SystemCapability.Window.SessionManager
11107   * @atomicservice
11108   * @since arkts {'1.1':'12', '1.2':'20'}
11109   * @arkts 1.1&1.2
11110   */
11111  interface SubWindowOptions {
11112    /**
11113     * Indicates subwindow title
11114     *
11115     * @type { string }
11116     * @syscap SystemCapability.Window.SessionManager
11117     * @since 11
11118     */
11119    /**
11120     * Indicates subwindow title
11121     *
11122     * @type { string }
11123     * @syscap SystemCapability.Window.SessionManager
11124     * @atomicservice
11125     * @since 12
11126     */
11127    title: string;
11128    /**
11129     * Indicates decor of subwindow
11130     *
11131     * @type { boolean }
11132     * @syscap SystemCapability.Window.SessionManager
11133     * @since 11
11134     */
11135    /**
11136     * Indicates decor of subwindow
11137     *
11138     * @type { boolean }
11139     * @syscap SystemCapability.Window.SessionManager
11140     * @atomicservice
11141     * @since 12
11142     */
11143    decorEnabled: boolean;
11144    /**
11145     * Indicates modality of subwindow
11146     *
11147     * @type { ?boolean }
11148     * @syscap SystemCapability.Window.SessionManager
11149     * @atomicservice
11150     * @since 12
11151     */
11152    isModal?: boolean;
11153    /**
11154     * Indicates whether subwindow is topmost
11155     *
11156     * @type { ?boolean }
11157     * @syscap SystemCapability.Window.SessionManager
11158     * @systemapi Hide this for inner system use.
11159     * @since 12
11160     */
11161    isTopmost?: boolean;
11162    /**
11163     * Indicates modality type of subwindow
11164     *
11165     * @type { ?ModalityType }
11166     * @syscap SystemCapability.Window.SessionManager
11167     * @atomicservice
11168     * @since 14
11169     */
11170    modalityType?: ModalityType;
11171    /**
11172     * Indicates position and size of subwindow
11173     *
11174     * @type { ?Rect }
11175     * @syscap SystemCapability.Window.SessionManager
11176     * @atomicservice
11177     * @since 18
11178     */
11179    windowRect?: Rect;
11180    /**
11181     * Indicates whether subwindow support fullscreen
11182     *
11183     * @type { ?boolean }
11184     * @syscap SystemCapability.Window.SessionManager
11185     * @atomicservice
11186     * @since 19
11187     */
11188    maximizeSupported?: boolean;
11189    /**
11190     * Indicates zlevel of subwindow
11191     *
11192     * @type { ?number }
11193     * @syscap SystemCapability.Window.SessionManager
11194     * @atomicservice
11195     * @since 18
11196     */
11197    zLevel?: number;
11198    /**
11199     * Indicates whether subwindow show outline
11200     *
11201     * @type { ?boolean }
11202     * @syscap SystemCapability.Window.SessionManager
11203     * @atomicservice
11204     * @since 20
11205     */
11206    outlineEnabled?: boolean;
11207
11208  }
11209  /**
11210   * WindowStage
11211   *
11212   * @interface WindowStage
11213   * @syscap SystemCapability.WindowManager.WindowManager.Core
11214   * @since 9
11215   */
11216  /**
11217   * WindowStage
11218   *
11219   * @interface WindowStage
11220   * @syscap SystemCapability.WindowManager.WindowManager.Core
11221   * @crossplatform
11222   * @since 10
11223   */
11224  /**
11225   * WindowStage
11226   *
11227   * @interface WindowStage
11228   * @syscap SystemCapability.WindowManager.WindowManager.Core
11229   * @crossplatform
11230   * @atomicservice
11231   * @since arkts {'1.1':'11', '1.2':'20'}
11232   * @arkts 1.1&1.2
11233   */
11234  interface WindowStage {
11235    /**
11236     * Get main window of the stage.
11237     *
11238     * @returns { Promise<Window> } Callback used to return the subwindow.
11239     * @throws { BusinessError } 1300002 - This window state is abnormal.
11240     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11241     * @syscap SystemCapability.WindowManager.WindowManager.Core
11242     * @StageModelOnly
11243     * @since 9
11244     */
11245    /**
11246     * Get main window of the stage.
11247     *
11248     * @returns { Promise<Window> } Callback used to return the subwindow.
11249     * @throws { BusinessError } 1300002 - This window state is abnormal.
11250     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11251     * @syscap SystemCapability.WindowManager.WindowManager.Core
11252     * @StageModelOnly
11253     * @crossplatform
11254     * @since 10
11255     */
11256    /**
11257     * Obtains the main window of this window stage. This API uses a promise to return the result.
11258     *
11259     * @returns { Promise<Window> } Promise used to return the main window.
11260     * @throws { BusinessError } 1300002 - This window state is abnormal.
11261     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11262     * @syscap SystemCapability.WindowManager.WindowManager.Core
11263     * @StageModelOnly
11264     * @crossplatform
11265     * @atomicservice
11266     * @since arkts {'1.1':'11', '1.2':'20'}
11267     * @arkts 1.1&1.2
11268     */
11269    getMainWindow(): Promise<Window>;
11270    /**
11271     * Get main window of the stage.
11272     *
11273     * @param { AsyncCallback<Window> } callback Callback used to return the main window.
11274     * @throws { BusinessError } 1300002 - This window state is abnormal.
11275     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11276     * @syscap SystemCapability.WindowManager.WindowManager.Core
11277     * @StageModelOnly
11278     * @since 9
11279     */
11280    /**
11281     * Get main window of the stage.
11282     *
11283     * @param { AsyncCallback<Window> } callback Callback used to return the main window.
11284     * @throws { BusinessError } 1300002 - This window state is abnormal.
11285     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11286     * @syscap SystemCapability.WindowManager.WindowManager.Core
11287     * @StageModelOnly
11288     * @crossplatform
11289     * @since 10
11290     */
11291    /**
11292     * Obtains the main window of this window stage. This API uses an asynchronous callback to return the result.
11293     *
11294     * @param { AsyncCallback<Window> } callback Callback used to return the main window.
11295     * @throws { BusinessError } 1300002 - This window state is abnormal.
11296     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11297     * @syscap SystemCapability.WindowManager.WindowManager.Core
11298     * @StageModelOnly
11299     * @crossplatform
11300     * @atomicservice
11301     * @since arkts {'1.1':'11', '1.2':'20'}
11302     * @arkts 1.1&1.2
11303     */
11304    getMainWindow(callback: AsyncCallback<Window>): void;
11305    /**
11306     * Get main window of the stage.
11307     *
11308     * @returns { Window }
11309     * @throws { BusinessError } 1300002 - This window state is abnormal.
11310     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11311     * @syscap SystemCapability.WindowManager.WindowManager.Core
11312     * @StageModelOnly
11313     * @since 9
11314     */
11315    /**
11316     * Get main window of the stage.
11317     *
11318     * @returns { Window }
11319     * @throws { BusinessError } 1300002 - This window state is abnormal.
11320     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11321     * @syscap SystemCapability.WindowManager.WindowManager.Core
11322     * @StageModelOnly
11323     * @crossplatform
11324     * @since 10
11325     */
11326    /**
11327     * Obtains the main window of this window stage.
11328     *
11329     * @returns { Window } Main window.
11330     * @throws { BusinessError } 1300002 - This window state is abnormal.
11331     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11332     * @syscap SystemCapability.WindowManager.WindowManager.Core
11333     * @StageModelOnly
11334     * @crossplatform
11335     * @atomicservice
11336     * @since arkts {'1.1':'11', '1.2':'20'}
11337     * @arkts 1.1&1.2
11338     */
11339    getMainWindowSync(): Window;
11340    /**
11341     * Create sub window of the stage.
11342     *
11343     * @param { string } name window name of sub window
11344     * @returns { Promise<Window> } Promise used to return the subwindow.
11345     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11346     * @throws { BusinessError } 1300002 - This window state is abnormal.
11347     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11348     * @syscap SystemCapability.WindowManager.WindowManager.Core
11349     * @StageModelOnly
11350     * @since 9
11351     */
11352    /**
11353     * Create sub window of the stage.
11354     *
11355     * @param { string } name window name of sub window
11356     * @returns { Promise<Window> } Promise used to return the subwindow.
11357     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11358     * @throws { BusinessError } 1300002 - This window state is abnormal.
11359     * @syscap SystemCapability.WindowManager.WindowManager.Core
11360     * @StageModelOnly
11361     * @crossplatform
11362     * @since 10
11363     */
11364    /**
11365     * Creates a child window for this window stage. This API uses a promise to return the result.
11366     *
11367     * @param { string } name Name of the child window.
11368     * @returns { Promise<Window> } Promise used to return the child window.
11369     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11370     * @throws { BusinessError } 1300002 - This window state is abnormal.
11371     * @syscap SystemCapability.WindowManager.WindowManager.Core
11372     * @StageModelOnly
11373     * @crossplatform
11374     * @atomicservice
11375     * @since 11
11376     */
11377    createSubWindow(name: string): Promise<Window>;
11378    /**
11379     * Create sub window of the stage.
11380     *
11381     * @param { string } name window name of sub window
11382     * @param { AsyncCallback<Window> } callback Callback used to return the subwindow.
11383     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11384     * @throws { BusinessError } 1300002 - This window state is abnormal.
11385     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11386     * @syscap SystemCapability.WindowManager.WindowManager.Core
11387     * @StageModelOnly
11388     * @since 9
11389     */
11390    /**
11391     * Create sub window of the stage.
11392     *
11393     * @param { string } name window name of sub window
11394     * @param { AsyncCallback<Window> } callback Callback used to return the subwindow.
11395     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11396     * @throws { BusinessError } 1300002 - This window state is abnormal.
11397     * @syscap SystemCapability.WindowManager.WindowManager.Core
11398     * @StageModelOnly
11399     * @crossplatform
11400     * @since 10
11401     */
11402    /**
11403     * Creates a child window for this window stage. This API uses an asynchronous callback to return the result.
11404     *
11405     * @param { string } name Name of the child window.
11406     * @param { AsyncCallback<Window> } callback Callback used to return the child window.
11407     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11408     * @throws { BusinessError } 1300002 - This window state is abnormal.
11409     * @syscap SystemCapability.WindowManager.WindowManager.Core
11410     * @StageModelOnly
11411     * @crossplatform
11412     * @atomicservice
11413     * @since 11
11414     */
11415    createSubWindow(name: string, callback: AsyncCallback<Window>): void;
11416    /**
11417     * Create sub window of the stage.
11418     *
11419     * @param { string } name - window name of sub window
11420     * @param { SubWindowOptions } options - options of sub window creation
11421     * @returns { Promise<Window> } Promise used to return the subwindow.
11422     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11423     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
11424     * @throws { BusinessError } 1300002 - This window state is abnormal.
11425     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11426     * @syscap SystemCapability.Window.SessionManager
11427     * @StageModelOnly
11428     * @since 11
11429     */
11430    /**
11431     * Create sub window of the stage.
11432     *
11433     * @param { string } name - window name of sub window
11434     * @param { SubWindowOptions } options - options of sub window creation
11435     * @returns { Promise<Window> } Promise used to return the subwindow.
11436     * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types.
11437     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
11438     * @throws { BusinessError } 1300002 - This window state is abnormal.
11439     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11440     * @syscap SystemCapability.Window.SessionManager
11441     * @StageModelOnly
11442     * @atomicservice
11443     * @since 12
11444     */
11445    createSubWindowWithOptions(name: string, options: SubWindowOptions): Promise<Window>;
11446    /**
11447     * Get sub window of the stage.
11448     *
11449     * @returns { Promise<Array<Window>> }
11450     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11451     * @syscap SystemCapability.WindowManager.WindowManager.Core
11452     * @StageModelOnly
11453     * @since 9
11454     */
11455    /**
11456     * Get sub window of the stage.
11457     *
11458     * @returns { Promise<Array<Window>> }
11459     * @throws { BusinessError } 1300002 - This window state is abnormal.
11460     * @syscap SystemCapability.WindowManager.WindowManager.Core
11461     * @StageModelOnly
11462     * @crossplatform
11463     * @since 10
11464     */
11465    /**
11466     * Obtains all the child windows of this window stage. This API uses a promise to return the result.
11467     *
11468     * @returns { Promise<Array<Window>> } Promise used to return all the child windows.
11469     * @throws { BusinessError } 1300002 - This window state is abnormal.
11470     * @syscap SystemCapability.WindowManager.WindowManager.Core
11471     * @StageModelOnly
11472     * @crossplatform
11473     * @atomicservice
11474     * @since 11
11475     */
11476    getSubWindow(): Promise<Array<Window>>;
11477    /**
11478     * Get sub window of the stage.
11479     *
11480     * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows.
11481     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11482     * @syscap SystemCapability.WindowManager.WindowManager.Core
11483     * @StageModelOnly
11484     * @since 9
11485     */
11486    /**
11487     * Get sub window of the stage.
11488     *
11489     * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the subwindows.
11490     * @throws { BusinessError } 1300002 - This window state is abnormal.
11491     * @syscap SystemCapability.WindowManager.WindowManager.Core
11492     * @StageModelOnly
11493     * @crossplatform
11494     * @since 10
11495     */
11496    /**
11497     * Obtains all the child windows of this window stage. This API uses a promise to return the result.
11498     *
11499     * @param { AsyncCallback<Array<Window>> } callback Callback used to return all the child windows.
11500     * @throws { BusinessError } 1300002 - This window state is abnormal.
11501     * @syscap SystemCapability.WindowManager.WindowManager.Core
11502     * @StageModelOnly
11503     * @crossplatform
11504     * @atomicservice
11505     * @since 11
11506     */
11507    getSubWindow(callback: AsyncCallback<Array<Window>>): void;
11508
11509    /**
11510     * Loads the content of a page, with its path in the current project specified, to the main window
11511     *     of this window stage, and transfers the state attribute to the page through a local storage.
11512     * This API uses an asynchronous callback to return the result.
11513     *     You are advised to call this API during UIAbility startup.
11514     * If called multiple times, this API will destroy the existing page content (UIContent)
11515     *     before loading the new content. Exercise caution when using it.
11516     *
11517     * @param { string } path Path of the page to which the content will be loaded
11518     * @param { LocalStorage } storage The data object shared within the content instance loaded by the window
11519     * @param { AsyncCallback<void> } callback Callback used to return the result.
11520     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11521     *     1. Mandatory parameters are left unspecified;
11522     *     2. Incorrect parameter types;
11523     *     3. Invalid path parameter.
11524     * @throws { BusinessError } 1300002 - This window state is abnormal.
11525     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11526     * @syscap SystemCapability.WindowManager.WindowManager.Core
11527     * @stagemodelonly
11528     * @since 9
11529     */
11530    /**
11531     * Loads the content of a page, with its path in the current project specified, to the main window
11532     *     of this window stage, and transfers the state attribute to the page through a local storage.
11533     * This API uses an asynchronous callback to return the result.
11534     *     You are advised to call this API during UIAbility startup.
11535     * If called multiple times, this API will destroy the existing page content (UIContent)
11536     *     before loading the new content. Exercise caution when using it.
11537     *
11538     * @param { string } path Path of the page to which the content will be loaded
11539     * @param { LocalStorage } storage The data object shared within the content instance loaded by the window
11540     * @param { AsyncCallback<void> } callback Callback used to return the result.
11541     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11542     *     1. Mandatory parameters are left unspecified;
11543     *     2. Incorrect parameter types;
11544     *     3. Invalid path parameter.
11545     * @throws { BusinessError } 1300002 - This window state is abnormal.
11546     * @syscap SystemCapability.WindowManager.WindowManager.Core
11547     * @stagemodelonly
11548     * @crossplatform
11549     * @since 10
11550     */
11551    /**
11552     * Loads the content of a page, with its path in the current project specified, to the main window
11553     *     of this window stage, and transfers the state attribute to the page through a local storage.
11554     * This API uses an asynchronous callback to return the result.
11555     *     You are advised to call this API during UIAbility startup.
11556     * If called multiple times, this API will destroy the existing page content (UIContent)
11557     *     before loading the new content. Exercise caution when using it.
11558     *
11559     * @param { string } path Path of the page to which the content will be loaded
11560     * @param { LocalStorage } storage The data object shared within the content instance loaded by the window
11561     * @param { AsyncCallback<void> } callback Callback used to return the result.
11562     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11563     *     1. Mandatory parameters are left unspecified;
11564     *     2. Incorrect parameter types;
11565     *     3. Invalid path parameter.
11566     * @throws { BusinessError } 1300002 - This window state is abnormal.
11567     * @syscap SystemCapability.WindowManager.WindowManager.Core
11568     * @stagemodelonly
11569     * @crossplatform
11570     * @atomicservice
11571     * @since arkts {'1.1':'11', '1.2':'20'}
11572     * @arkts 1.1&1.2
11573     */
11574    loadContent(path: string, storage: LocalStorage, callback: AsyncCallback<void>): void;
11575
11576    /**
11577     * Loads the content of a page, with its path in the current project specified, to the main window
11578     *     of this window stage, and transfers the state attribute to the page through a local storage.
11579     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
11580     * If called multiple times, this API will destroy the existing page content (UIContent)
11581     *     before loading the new content. Exercise caution when using it.
11582     *
11583     * @param { string } path of the page to which the content will be loaded
11584     * @param { LocalStorage } storage The data object shared within the content instance loaded by the window
11585     * @returns { Promise<void> }
11586     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11587     *     1. Mandatory parameters are left unspecified;
11588     *     2. Incorrect parameter types;
11589     *     3. Invalid path parameter.
11590     * @throws { BusinessError } 1300002 - This window state is abnormal.
11591     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11592     * @syscap SystemCapability.WindowManager.WindowManager.Core
11593     * @stagemodelonly
11594     * @since 9
11595     */
11596    /**
11597     * Loads the content of a page, with its path in the current project specified, to the main window
11598     *     of this window stage, and transfers the state attribute to the page through a local storage.
11599     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
11600     * If called multiple times, this API will destroy the existing page content (UIContent)
11601     *     before loading the new content. Exercise caution when using it.
11602     *
11603     * @param { string } path of the page to which the content will be loaded
11604     * @param { LocalStorage } storage The data object shared within the content instance loaded by the window
11605     * @returns { Promise<void> }
11606     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11607     *     1. Mandatory parameters are left unspecified;
11608     *     2. Incorrect parameter types;
11609     *     3. Invalid path parameter.
11610     * @throws { BusinessError } 1300002 - This window state is abnormal.
11611     * @syscap SystemCapability.WindowManager.WindowManager.Core
11612     * @stagemodelonly
11613     * @crossplatform
11614     * @since 10
11615     */
11616    /**
11617     * Loads the content of a page, with its path in the current project specified, to the main window
11618     *     of this window stage, and transfers the state attribute to the page through a local storage.
11619     * This API uses a promise to return the result. You are advised to call this API during UIAbility startup.
11620     * If called multiple times, this API will destroy the existing page content (UIContent)
11621     *     before loading the new content. Exercise caution when using it.
11622     *
11623     * @param { string } path of the page to which the content will be loaded
11624     * @param { LocalStorage } storage The data object shared within the content instance loaded by the window
11625     * @returns { Promise<void> }
11626     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11627     *     1. Mandatory parameters are left unspecified;
11628     *     2. Incorrect parameter types;
11629     *     3. Invalid path parameter.
11630     * @throws { BusinessError } 1300002 - This window state is abnormal.
11631     * @syscap SystemCapability.WindowManager.WindowManager.Core
11632     * @stagemodelonly
11633     * @crossplatform
11634     * @atomicservice
11635     * @since arkts {'1.1':'11', '1.2':'20'}
11636     * @arkts 1.1&1.2
11637     */
11638    loadContent(path: string, storage?: LocalStorage): Promise<void>;
11639
11640    /**
11641     * Loads content from a page to this window stage. This API uses an asynchronous callback to
11642     *     return the result. You are advised to call this API during UIAbility startup.
11643     * If called multiple times, this API will destroy the existing page content (UIContent)
11644     *     before loading the new content. Exercise caution when using it.
11645     *
11646     * @param { string } path of the page to which the content will be loaded
11647     * @param { AsyncCallback<void> } callback Callback used to return the result.
11648     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11649     *     1. Mandatory parameters are left unspecified;
11650     *     2. Incorrect parameter types;
11651     *     3. Invalid path parameter.
11652     * @throws { BusinessError } 1300002 - This window state is abnormal.
11653     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11654     * @syscap SystemCapability.WindowManager.WindowManager.Core
11655     * @stagemodelonly
11656     * @since 9
11657     */
11658    /**
11659     * Loads content from a page to this window stage. This API uses an asynchronous callback to
11660     *     return the result. You are advised to call this API during UIAbility startup.
11661     * If called multiple times, this API will destroy the existing page content (UIContent)
11662     *     before loading the new content. Exercise caution when using it.
11663     *
11664     * @param { string } path of the page to which the content will be loaded
11665     * @param { AsyncCallback<void> } callback Callback used to return the result.
11666     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11667     *     1. Mandatory parameters are left unspecified;
11668     *     2. Incorrect parameter types;
11669     *     3. Invalid path parameter.
11670     * @throws { BusinessError } 1300002 - This window state is abnormal.
11671     * @syscap SystemCapability.WindowManager.WindowManager.Core
11672     * @stagemodelonly
11673     * @crossplatform
11674     * @since 10
11675     */
11676    /**
11677     * Loads content from a page to this window stage. This API uses an asynchronous callback to
11678     *     return the result. You are advised to call this API during UIAbility startup.
11679     * If called multiple times, this API will destroy the existing page content (UIContent)
11680     *     before loading the new content. Exercise caution when using it.
11681     *
11682     * @param { string } path of the page to which the content will be loaded
11683     * @param { AsyncCallback<void> } callback Callback used to return the result.
11684     * @throws { BusinessError } 401 - Parameter error. Possible cause:
11685     *     1. Mandatory parameters are left unspecified;
11686     *     2. Incorrect parameter types;
11687     *     3. Invalid path parameter.
11688     * @throws { BusinessError } 1300002 - This window state is abnormal.
11689     * @syscap SystemCapability.WindowManager.WindowManager.Core
11690     * @stagemodelonly
11691     * @crossplatform
11692     * @atomicservice
11693     * @since arkts {'1.1':'11', '1.2':'20'}
11694     * @arkts 1.1&1.2
11695     */
11696    loadContent(path: string, callback: AsyncCallback<void>): void;
11697
11698    /**
11699     * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage.
11700     * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
11701     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content.
11702     * Exercise caution when using it.
11703     *
11704     * @param { string } name - Name of the named route page.
11705     * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page.
11706     * @param { AsyncCallback<void> } callback - Callback used to return the result.
11707     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11708     *                                                                  2. Incorrect parameter types.
11709     * @throws { BusinessError } 1300002 - This window state is abnormal.
11710     * @syscap SystemCapability.WindowManager.WindowManager.Core
11711     * @stagemodelonly
11712     * @crossplatform
11713     * @atomicservice
11714     * @since arkts {'1.1':'11', '1.2':'20'}
11715     * @arkts 1.1&1.2
11716     */
11717    loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback<void>): void;
11718
11719    /**
11720     * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage.
11721     * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
11722     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content.
11723     * Exercise caution when using it.
11724     *
11725     * @param { string } name - Name of the named route page.
11726     * @param { AsyncCallback<void> } callback - Callback used to return the result.
11727     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11728     *                                                                  2. Incorrect parameter types.
11729     * @throws { BusinessError } 1300002 - This window state is abnormal.
11730     * @syscap SystemCapability.WindowManager.WindowManager.Core
11731     * @stagemodelonly
11732     * @crossplatform
11733     * @atomicservice
11734     * @since arkts {'1.1':'11', '1.2':'20'}
11735     * @arkts 1.1&1.2
11736     */
11737    loadContentByName(name: string, callback: AsyncCallback<void>): void;
11738
11739    /**
11740     * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage.
11741     * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup.
11742     * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content.
11743     * Exercise caution when using it.
11744     *
11745     * @param { string } name - Name of the named route page.
11746     * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page.
11747     * @returns { Promise<void> } Promise that returns no value.
11748     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11749     *                                                                  2. Incorrect parameter types.
11750     * @throws { BusinessError } 1300002 - This window state is abnormal.
11751     * @syscap SystemCapability.WindowManager.WindowManager.Core
11752     * @stagemodelonly
11753     * @crossplatform
11754     * @atomicservice
11755     * @since arkts {'1.1':'11', '1.2':'20'}
11756     * @arkts 1.1&1.2
11757     */
11758    loadContentByName(name: string, storage?: LocalStorage): Promise<void>;
11759
11760    /**
11761     * Window stage event callback on.
11762     *
11763     * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event.
11764     * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state.
11765     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11766     *                                                                  2. Incorrect parameter types;
11767     *                                                                  3. Parameter verification failed.
11768     * @throws { BusinessError } 1300002 - This window state is abnormal.
11769     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11770     * @syscap SystemCapability.WindowManager.WindowManager.Core
11771     * @StageModelOnly
11772     * @since 9
11773     */
11774    /**
11775     * Window stage event callback on.
11776     *
11777     * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event.
11778     * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state.
11779     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11780     *                                                                  2. Incorrect parameter types;
11781     *                                                                  3. Parameter verification failed.
11782     * @throws { BusinessError } 1300002 - This window state is abnormal.
11783     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11784     * @syscap SystemCapability.WindowManager.WindowManager.Core
11785     * @StageModelOnly
11786     * @crossplatform
11787     * @since 10
11788     */
11789    /**
11790     * Subscribes to the window stage lifecycle change event.
11791     *
11792     * @param { 'windowStageEvent' } eventType Event type. The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event.
11793     * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state.
11794     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11795     *                                                                  2. Incorrect parameter types;
11796     *                                                                  3. Parameter verification failed.
11797     * @throws { BusinessError } 1300002 - This window state is abnormal.
11798     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11799     * @syscap SystemCapability.WindowManager.WindowManager.Core
11800     * @StageModelOnly
11801     * @crossplatform
11802     * @atomicservice
11803     * @since arkts {'1.1':'11', '1.2':'20'}
11804     * @arkts 1.1&1.2
11805     */
11806    on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void;
11807    /**
11808     * Window stage event callback off.
11809     *
11810     * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event.
11811     * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state.
11812     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
11813     *                                                                  2. Parameter verification failed.
11814     * @throws { BusinessError } 1300002 - This window state is abnormal.
11815     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11816     * @syscap SystemCapability.WindowManager.WindowManager.Core
11817     * @StageModelOnly
11818     * @since 9
11819     */
11820    /**
11821     * Window stage event callback off.
11822     *
11823     * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event.
11824     * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state.
11825     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
11826     *                                                                  2. Parameter verification failed.
11827     * @throws { BusinessError } 1300002 - This window state is abnormal.
11828     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11829     * @syscap SystemCapability.WindowManager.WindowManager.Core
11830     * @StageModelOnly
11831     * @crossplatform
11832     * @since 10
11833     */
11834    /**
11835     * Unsubscribes from the window stage lifecycle change event.
11836     *
11837     * @param { 'windowStageEvent' } eventType Event type. The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event.
11838     * @param { Callback<WindowStageEventType> } callback Callback used to return the window stage lifecycle state.
11839     *                                                    If a value is passed in, the corresponding subscription is canceled.
11840     *                                                    If no value is passed in, all subscriptions to the specified event are canceled.
11841     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types;
11842     *                                                                  2. Parameter verification failed.
11843     * @throws { BusinessError } 1300002 - This window state is abnormal.
11844     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11845     * @syscap SystemCapability.WindowManager.WindowManager.Core
11846     * @StageModelOnly
11847     * @crossplatform
11848     * @atomicservice
11849     * @since arkts {'1.1':'11', '1.2':'20'}
11850     * @arkts 1.1&1.2
11851     */
11852    off(eventType: 'windowStageEvent', callback?: Callback<WindowStageEventType>): void;
11853
11854    /**
11855     * Subscribes to the window stage lifecycle change event.
11856     *
11857     * @param { 'windowStageLifecycleEvent' } eventType Event type.
11858     *     The value is fixed at 'windowStageLifecycleEvent', indicating the window stage lifecycle change event.
11859     * @param { Callback<WindowStageLifecycleEventType> } callback Callback used to
11860     *     return the window stage lifecycle state.
11861     * @throws { BusinessError } 801 - Capability not supported.
11862     *     Failed to call the API due to limited device capabilities.
11863     * @throws { BusinessError } 1300002 - This window state is abnormal.
11864     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11865     * @syscap SystemCapability.Window.SessionManager
11866     * @stagemodelonly
11867     * @since 20
11868     */
11869    on(eventType: 'windowStageLifecycleEvent', callback: Callback<WindowStageLifecycleEventType>): void;
11870
11871    /**
11872     * Unsubscribes from the window stage lifecycle change event.
11873     *
11874     * @param { 'windowStageLifecycleEvent' } eventType Event type.
11875     *     The value is fixed at 'windowStageLifecycleEvent', indicating the window stage lifecycle change event.
11876     * @param { Callback<WindowStageLifecycleEventType> } [callback] Callback used to
11877     *     return the window stage lifecycle state.
11878     *     If a value is passed in, the corresponding subscription is canceled.
11879     *     If no value is passed in, all subscriptions to the specified event are canceled.
11880     * @throws { BusinessError } 801 - Capability not supported.
11881     *     Failed to call the API due to limited device capabilities.
11882     * @throws { BusinessError } 1300002 - This window state is abnormal.
11883     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11884     * @syscap SystemCapability.Window.SessionManager
11885     * @stagemodelonly
11886     * @since 20
11887     */
11888    off(eventType: 'windowStageLifecycleEvent', callback?: Callback<WindowStageLifecycleEventType>): void;
11889
11890    /**
11891     * Subscribes to the click event on the close button in the three-button navigation bar of the main window.
11892     * This event is triggered when the close button in the three-button navigation bar of the main window is clicked.
11893     *
11894     * @param { 'windowStageClose' } eventType - Event type. The value is fixed at 'windowStageClose',
11895     *                                           indicating that the close button in the three-button navigation bar of the main window is clicked.
11896     * @param { Callback<void> } callback - Callback invoked when the close button in the upper right corner of the main window is clicked.
11897     *                                      The return value determines whether to continue to close the main window.
11898     *                                      The value true means not to close the main window, and false means to continue to close the main window.
11899     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11900     *                                                                  2. Incorrect parameter types;
11901     *                                                                  3. Parameter verification failed.
11902     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
11903     * @throws { BusinessError } 1300002 - This window state is abnormal.
11904     * @syscap SystemCapability.Window.SessionManager
11905     * @stagemodelonly
11906     * @atomicservice
11907     * @since 14
11908     */
11909    on(eventType: 'windowStageClose', callback: Callback<void>): void;
11910
11911    /**
11912     * Unsubscribes from the event indicating that the main window is closed.
11913     *
11914     * @param { 'windowStageClose' } eventType - Event type. The value is fixed at 'windowStageClose',
11915     *                                           indicating that the close button in the three-button navigation bar of the main window is clicked.
11916     * @param { Callback<void> } callback - Callback invoked when the close button in the upper right corner of the main window is clicked.
11917     *                                      If a value is passed in, the corresponding subscription is canceled.
11918     *                                      If no value is passed in, all subscriptions to the specified event are canceled.
11919     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11920     *                                                                  2. Incorrect parameter types;
11921     *                                                                  3. Parameter verification failed.
11922     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
11923     * @throws { BusinessError } 1300002 - This window state is abnormal.
11924     * @syscap SystemCapability.Window.SessionManager
11925     * @stagemodelonly
11926     * @atomicservice
11927     * @since 14
11928     */
11929    off(eventType: 'windowStageClose', callback?: Callback<void>): void;
11930
11931    /**
11932     * Disable window decoration. It must be called before loadContent.
11933     *
11934     * @throws { BusinessError } 1300002 - This window state is abnormal.
11935     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11936     * @syscap SystemCapability.WindowManager.WindowManager.Core
11937     * @systemapi
11938     * @StageModelOnly
11939     * @since 9
11940     */
11941    /**
11942     * Disable window decoration. It must be called before loadContent.
11943     *
11944     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
11945     * @throws { BusinessError } 1300002 - This window state is abnormal.
11946     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11947     * @syscap SystemCapability.WindowManager.WindowManager.Core
11948     * @systemapi
11949     * @StageModelOnly
11950     * @since arkts {'1.1':'12', '1.2':'20'}
11951     * @arkts 1.1&1.2
11952     */
11953    disableWindowDecor(): void;
11954
11955    /**
11956     * Sets whether can show on lock screen or not
11957     *
11958     * @param { boolean } showOnLockScreen can show on lock screen if true, or not if false
11959     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11960     *                                                                  2. Incorrect parameter types.
11961     * @throws { BusinessError } 1300002 - This window state is abnormal.
11962     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11963     * @syscap SystemCapability.WindowManager.WindowManager.Core
11964     * @systemapi Hide this for inner system use.
11965     * @StageModelOnly
11966     * @since 9
11967     */
11968    /**
11969     * Sets whether can show on lock screen or not
11970     *
11971     * @param { boolean } showOnLockScreen can show on lock screen if true, or not if false
11972     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
11973     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11974     *                                                                  2. Incorrect parameter types.
11975     * @throws { BusinessError } 1300002 - This window state is abnormal.
11976     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11977     * @syscap SystemCapability.WindowManager.WindowManager.Core
11978     * @systemapi Hide this for inner system use.
11979     * @StageModelOnly
11980     * @since arkts {'1.1':'12', '1.2':'20'}
11981     * @arkts 1.1&1.2
11982     */
11983    setShowOnLockScreen(showOnLockScreen: boolean): void;
11984
11985    /**
11986     * Set whether to use default density.
11987     *
11988     * @param { boolean } enabled - Use default density if true, or follow system density change if false
11989     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
11990     *                                                                  2. Incorrect parameter types.
11991     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
11992     * @throws { BusinessError } 1300002 - This window state is abnormal.
11993     * @throws { BusinessError } 1300005 - This window stage is abnormal.
11994     * @syscap SystemCapability.Window.SessionManager
11995     * @StageModelOnly
11996     * @atomicservice
11997     * @since 12
11998     */
11999    setDefaultDensityEnabled(enabled: boolean): void;
12000
12001    /**
12002     * Sets the custom density of ability.
12003     *
12004     * @param { number } density - the specified custom density value.
12005     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
12006     *                                                                  2. Incorrect parameter types.
12007     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12008     * @throws { BusinessError } 1300002 - This window state is abnormal.
12009     * @throws { BusinessError } 1300005 - This window stage is abnormal.
12010     * @syscap SystemCapability.Window.SessionManager
12011     * @StageModelOnly
12012     * @atomicservice
12013     * @since 15
12014     */
12015    setCustomDensity(density: number): void;
12016
12017    /**
12018     * Sets the custom density of ability.
12019     *
12020     * @param { number } density - the specified custom density value.
12021     * @param { boolean } [applyToSubWindow] - whether to apply the custom density to already created subwindows.
12022     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12023     * @throws { BusinessError } 1300002 - This window state is abnormal.
12024     * @throws { BusinessError } 1300005 - This window stage is abnormal.
12025     * @syscap SystemCapability.Window.SessionManager
12026     * @stagemodelonly
12027     * @since 20
12028     */
12029    setCustomDensity(density: number, applyToSubWindow?: boolean): void;
12030
12031    /**
12032     * Allows the application to control the time when the launch page disappears.
12033     * This API takes effect only for the application main window when enable.remove.starting.window under metadata in abilities in the module.json5 file is set to true.
12034     *
12035     * @returns { Promise<void> } - Promise that returns no value.
12036     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12037     * @throws { BusinessError } 1300002 - This window state is abnormal.
12038     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12039     * @syscap SystemCapability.Window.SessionManager
12040     * @StageModelOnly
12041     * @atomicservice
12042     * @since 14
12043     */
12044    removeStartingWindow(): Promise<void>;
12045
12046    /**
12047     * Set the application modality of the windowStage.
12048     *
12049     * @param { boolean } isModal - Enable the window modal if true, otherwise means the opposite.
12050     * @returns { Promise<void> } Promise that returns no value.
12051     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
12052     *                                                                  2. Incorrect parameter types.
12053     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12054     * @throws { BusinessError } 1300002 - This window state is abnormal.
12055     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12056     * @syscap SystemCapability.Window.SessionManager
12057     * @StageModelOnly
12058     * @atomicservice
12059     * @since 14
12060     */
12061    /**
12062     * Enables the modal property of the main window.
12063     *
12064     * @param { boolean } isModal - Whether to enable the modal property of the main window.
12065     *                              The value true means to enable the modal property, and false means the opposite.
12066     * @returns { Promise<void> } Promise that returns no value.
12067     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
12068     *                                                                  2. Incorrect parameter types.
12069     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12070     * @throws { BusinessError } 1300002 - This window state is abnormal.
12071     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12072     * @throws { BusinessError } 1300005 - This window stage is abnormal.
12073     * @syscap SystemCapability.Window.SessionManager
12074     * @StageModelOnly
12075     * @atomicservice
12076     * @since 20
12077     */
12078    setWindowModal(isModal: boolean): Promise<void>;
12079
12080    /**
12081     * Sets whether to enable the auto-save feature for the size of the main window.
12082     *
12083     * @param { boolean } enabled - Whether to enable the auto-save feature for the main window's size.
12084     *                              The value true means to enable the auto-save feature, and false means the opposite.
12085     * @returns { Promise<void> } Promise that returns no value.
12086     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
12087     *                                                                  2. Incorrect parameter types.
12088     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12089     * @throws { BusinessError } 1300002 - This window state is abnormal.
12090     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12091     * @syscap SystemCapability.Window.SessionManager
12092     * @StageModelOnly
12093     * @atomicservice
12094     * @since 14
12095     */
12096    setWindowRectAutoSave(enabled: boolean): Promise<void>;
12097
12098    /**
12099     * Set to automatically save the window rect and whether to enable specifiedFlag.
12100     * Through the specifiedFlag flag, the window is marked and its rect is saved.
12101     *
12102     * @param { boolean } enabled - Enable the window rect auto-save if true, otherwise means the opposite.
12103     * @param { boolean } isSaveBySpecifiedFlag - Enable the specifiedFlag if true, otherwise means the opposite.
12104     * @returns { Promise<void> } Promise that returns no value.
12105     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
12106     *                                                                   2. Incorrect parameter types.
12107     * @throws { BusinessError } 801 - Capability not supported. Function setWindowRectAutoSave can not work correctly due to limited device capabilities.
12108     * @throws { BusinessError } 1300002 - This window state is abnormal.
12109     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12110     * @syscap SystemCapability.Window.SessionManager
12111     * @stagemodelonly
12112     * @atomicservice
12113     * @since 17
12114     */
12115    setWindowRectAutoSave(enabled: boolean, isSaveBySpecifiedFlag: boolean): Promise<void>;
12116
12117    /**
12118     * Whether the window supports the window rect auto-save.
12119     *
12120     * @returns { Promise<boolean> } Promise used to return the result.
12121     *  The value true means that the window rect auto-save is supported, and false means the opposite.
12122     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12123     * @throws { BusinessError } 1300002 - This window state is abnormal.
12124     * @syscap SystemCapability.Window.SessionManager
12125     * @StageModelOnly
12126     * @atomicservice
12127     * @since 14
12128     */
12129    /**
12130     * Checks whether the auto-save feature is enabled for the main window's size.
12131     *
12132     * @returns { Promise<boolean> } Promise used to return the result. The value true means that the auto-save feature is enabled, and false means the opposite.
12133     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12134     * @throws { BusinessError } 1300002 - This window state is abnormal.
12135     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12136     * @syscap SystemCapability.Window.SessionManager
12137     * @StageModelOnly
12138     * @atomicservice
12139     * @since 20
12140     */
12141    isWindowRectAutoSave(): Promise<boolean>;
12142
12143    /**
12144     * Sets the supported window modes of the main window.
12145     *
12146     * @param { Array<bundleManager.SupportWindowMode> } supportedWindowModes - The supported modes of window.
12147     * @returns { Promise<void> } Promise that returns no value.
12148     * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified;
12149     *                                                                  2. Incorrect parameter types.
12150     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12151     * @throws { BusinessError } 1300002 - This window state is abnormal.
12152     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12153     * @syscap SystemCapability.Window.SessionManager
12154     * @StageModelOnly
12155     * @atomicservice
12156     * @since 15
12157     */
12158    setSupportedWindowModes(supportedWindowModes: Array<bundleManager.SupportWindowMode>): Promise<void>;
12159
12160    /**
12161     * Sets the supported window modes of the main window.
12162     *
12163     * @param { Array<bundleManager.SupportWindowMode> } supportedWindowModes - The supported modes of window.
12164     * @param { boolean } grayOutMaximizeButton - Whether to gray out the window maximize button. The value true means to gray out the button, and false means the opposite.
12165     * @returns { Promise<void> } Promise that returns no value.
12166     * @throws { BusinessError } 801 - Capability not supported. Function setSupportedWindowModes can not work correctly due to limited device capabilities.
12167     * @throws { BusinessError } 1300002 - This window state is abnormal.
12168     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12169     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length. 3. Incorrect parameter format.
12170     * @syscap SystemCapability.Window.SessionManager
12171     * @stagemodelonly
12172     * @since 20
12173     */
12174    setSupportedWindowModes(supportedWindowModes: Array<bundleManager.SupportWindowMode>, grayOutMaximizeButton: boolean): Promise<void>;
12175
12176    /**
12177     * Sets Image for recent.
12178     *
12179     * @param { number } imgResourceId - This value is resource ID for the recent image.
12180     * @param { ImageFit } value - Sets the zoom type of an image.
12181     * @returns { Promise<void> } Promise that returns no value.
12182     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
12183     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
12184     * @throws { BusinessError } 1300002 - This window state is abnormal.
12185     * @throws { BusinessError } 1300003 - This window manager service works abnormally.
12186     * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length. 3. Incorrect parameter format.
12187     * @syscap SystemCapability.Window.SessionManager
12188     * @systemapi Hide this for inner system use.
12189     * @stagemodelonly
12190     * @since 19
12191     */
12192    setImageForRecent(imgResourceId: number, value: ImageFit): Promise<void>;
12193  }
12194
12195  /**
12196   * Attribute of the window for UI service extension ability.
12197   *
12198   * @enum { number }
12199   * @syscap SystemCapability.Window.SessionManager
12200   * @systemapi Hide this for inner system use.
12201   * @stagemodelonly
12202   * @since arkts {'1.1':'14', '1.2':'20'}
12203   * @arkts 1.1&1.2
12204   */
12205  enum ExtensionWindowAttribute {
12206    /**
12207     * System window.
12208     *
12209     * @syscap SystemCapability.Window.SessionManager
12210     * @systemapi Hide this for inner system use.
12211     * @stagemodelonly
12212     * @since arkts {'1.1':'14', '1.2':'20'}
12213     * @arkts 1.1&1.2
12214     */
12215    SYSTEM_WINDOW = 0,
12216
12217    /**
12218     * Sub window.
12219     *
12220     * @syscap SystemCapability.Window.SessionManager
12221     * @systemapi Hide this for inner system use.
12222     * @stagemodelonly
12223     * @since arkts {'1.1':'14', '1.2':'20'}
12224     * @arkts 1.1&1.2
12225     */
12226    SUB_WINDOW = 1
12227  }
12228
12229  /**
12230   * Options for system window creation.
12231   *
12232   * @interface SystemWindowOptions
12233   * @syscap SystemCapability.Window.SessionManager
12234   * @systemapi Hide this for inner system use.
12235   * @stagemodelonly
12236   * @since arkts {'1.1':'14', '1.2':'20'}
12237   * @arkts 1.1&1.2
12238   */
12239  interface SystemWindowOptions {
12240    /**
12241     * Indicates window type.
12242     *
12243     * @type { WindowType }
12244     * @syscap SystemCapability.Window.SessionManager
12245     * @systemapi Hide this for inner system use.
12246     * @stagemodelonly
12247     * @since arkts {'1.1':'14', '1.2':'20'}
12248     * @arkts 1.1&1.2
12249     */
12250    windowType: WindowType;
12251  }
12252
12253  /**
12254   * Configuration of the window for UI service extension ability.
12255   *
12256   * @interface ExtensionWindowConfig
12257   * @syscap SystemCapability.Window.SessionManager
12258   * @systemapi Hide this for inner system use.
12259   * @stagemodelonly
12260   * @since arkts {'1.1':'14', '1.2':'20'}
12261   * @arkts 1.1&1.2
12262   */
12263  interface ExtensionWindowConfig {
12264    /**
12265     * Window name.
12266     *
12267     * @type { string }
12268     * @syscap SystemCapability.Window.SessionManager
12269     * @systemapi Hide this for inner system use.
12270     * @stagemodelonly
12271     * @since arkts {'1.1':'14', '1.2':'20'}
12272     * @arkts 1.1&1.2
12273     */
12274    windowName: string;
12275
12276    /**
12277     * Defines whether the window is a subwindow or a system window.
12278     *
12279     * @type { ExtensionWindowAttribute }
12280     * @syscap SystemCapability.Window.SessionManager
12281     * @systemapi Hide this for inner system use.
12282     * @stagemodelonly
12283     * @since 14
12284     */
12285    windowAttribute: ExtensionWindowAttribute;
12286
12287    /**
12288     * The position and size of window.
12289     *
12290     * @type { Rect }
12291     * @syscap SystemCapability.Window.SessionManager
12292     * @systemapi Hide this for inner system use.
12293     * @stagemodelonly
12294     * @since 14
12295     */
12296    windowRect: Rect;
12297
12298    /**
12299     * The options of sub window creation.
12300     *
12301     * @type { ?SubWindowOptions }
12302     * @syscap SystemCapability.Window.SessionManager
12303     * @systemapi Hide this for inner system use.
12304     * @stagemodelonly
12305     * @since 14
12306     */
12307    subWindowOptions?: SubWindowOptions;
12308
12309    /**
12310     * The options of system window creation.
12311     *
12312     * @type { ?SystemWindowOptions }
12313     * @syscap SystemCapability.Window.SessionManager
12314     * @systemapi Hide this for inner system use.
12315     * @stagemodelonly
12316     * @since 14
12317     */
12318    systemWindowOptions?: SystemWindowOptions;
12319  }
12320
12321  /**
12322   * The layout info of Window.
12323   *
12324   * @interface WindowLayoutInfo
12325   * @syscap SystemCapability.Window.SessionManager
12326   * @atomicservice
12327   * @since 15
12328   */
12329  interface WindowLayoutInfo {
12330    /**
12331     * The position and size of window.
12332     *
12333     * @type { Rect }
12334     * @syscap SystemCapability.Window.SessionManager
12335     * @atomicservice
12336     * @since 15
12337     */
12338    windowRect: Rect;
12339  }
12340
12341  /**
12342   * Enum for window mode
12343   *
12344   * @enum { number }
12345   * @syscap SystemCapability.Window.SessionManager
12346   * @atomicservice
12347   * @since 20
12348   */
12349  enum GlobalWindowMode {
12350    /**
12351     * Fullscreen
12352     *
12353     * @syscap SystemCapability.Window.SessionManager
12354     * @atomicservice
12355     * @since 20
12356     */
12357    FULLSCREEN = 1,
12358
12359    /**
12360     * Split
12361     *
12362     * @syscap SystemCapability.Window.SessionManager
12363     * @atomicservice
12364     * @since 20
12365     */
12366    SPLIT = 1 << 1,
12367
12368    /**
12369     * Float
12370     *
12371     * @syscap SystemCapability.Window.SessionManager
12372     * @atomicservice
12373     * @since 20
12374     */
12375    FLOAT = 1 << 2,
12376
12377    /**
12378     * Picture in picture
12379     *
12380     * @syscap SystemCapability.Window.SessionManager
12381     * @atomicservice
12382     * @since 20
12383     */
12384    PIP = 1 << 3
12385  }
12386
12387  /**
12388   * Rotation change type
12389   *
12390   * @enum { number }
12391   * @syscap SystemCapability.Window.SessionManager
12392   * @atomicservice
12393   * @since 19
12394   */
12395  enum RotationChangeType {
12396    /**
12397     * Rotation will begin
12398     *
12399     * @syscap SystemCapability.Window.SessionManager
12400     * @atomicservice
12401     * @since 19
12402     */
12403    WINDOW_WILL_ROTATE = 0,
12404
12405    /**
12406     * Rotation end
12407     *
12408     * @syscap SystemCapability.Window.SessionManager
12409     * @atomicservice
12410     * @since 19
12411     */
12412    WINDOW_DID_ROTATE = 1
12413  }
12414
12415  /**
12416   * Rect type
12417   *
12418   * @enum { number }
12419   * @syscap SystemCapability.Window.SessionManager
12420   * @atomicservice
12421   * @since 19
12422   */
12423  enum RectType {
12424    /**
12425     * Rect relative to screen
12426     *
12427     * @syscap SystemCapability.Window.SessionManager
12428     * @atomicservice
12429     * @since 19
12430     */
12431    RELATIVE_TO_SCREEN = 0,
12432    /**
12433     * Rect relative to parent window
12434     *
12435     * @syscap SystemCapability.Window.SessionManager
12436     * @atomicservice
12437     * @since 19
12438     */
12439    RELATIVE_TO_PARENT_WINDOW = 1
12440  }
12441
12442  /**
12443   * Screenshot event type
12444   *
12445   * @enum { number }
12446   * @syscap SystemCapability.WindowManager.WindowManager.Core
12447   * @since 20
12448   */
12449  enum ScreenshotEventType {
12450    /**
12451     * System screenshot
12452     *
12453     * @syscap SystemCapability.WindowManager.WindowManager.Core
12454     * @since 20
12455     */
12456    SYSTEM_SCREENSHOT = 0,
12457    /**
12458     * System screenshot abort
12459     *
12460     * @syscap SystemCapability.WindowManager.WindowManager.Core
12461     * @since 20
12462     */
12463    SYSTEM_SCREENSHOT_ABORT = 1,
12464    /**
12465     * Scroll shot start
12466     *
12467     * @syscap SystemCapability.WindowManager.WindowManager.Core
12468     * @since 20
12469     */
12470    SCROLL_SHOT_START = 2,
12471    /**
12472     * Scroll shot end
12473     *
12474     * @syscap SystemCapability.WindowManager.WindowManager.Core
12475     * @since 20
12476     */
12477    SCROLL_SHOT_END = 3,
12478    /**
12479     * Scroll shot abort
12480     *
12481     * @syscap SystemCapability.WindowManager.WindowManager.Core
12482     * @since 20
12483     */
12484    SCROLL_SHOT_ABORT = 4,
12485  }
12486
12487  /**
12488   * Rotation change info
12489   *
12490   * @interface RotationChangeInfo
12491   * @syscap SystemCapability.Window.SessionManager
12492   * @atomicservice
12493   * @since 19
12494   */
12495  interface RotationChangeInfo {
12496    /**
12497     * Rotation change type
12498     *
12499     * @type { RotationChangeType }
12500     * @syscap SystemCapability.Window.SessionManager
12501     * @atomicservice
12502     * @since 19
12503     */
12504    type: RotationChangeType;
12505    /**
12506     * window orientation
12507     *
12508     * @type { number }
12509     * @syscap SystemCapability.Window.SessionManager
12510     * @atomicservice
12511     * @since 19
12512     */
12513    orientation: number;
12514    /**
12515     * Display id
12516     *
12517     * @type { number }
12518     * @syscap SystemCapability.Window.SessionManager
12519     * @atomicservice
12520     * @since 19
12521     */
12522    displayId: number;
12523    /**
12524     * Display rect
12525     *
12526     * @type { Rect }
12527     * @syscap SystemCapability.Window.SessionManager
12528     * @atomicservice
12529     * @since 19
12530     */
12531    displayRect: Rect;
12532  }
12533
12534  /**
12535   * Rotation change result
12536   *
12537   * @interface RotationChangeResult
12538   * @syscap SystemCapability.Window.SessionManager
12539   * @atomicservice
12540   * @since 19
12541   */
12542  interface RotationChangeResult {
12543    /**
12544     * Rect type
12545     *
12546     * @type { RectType }
12547     * @syscap SystemCapability.Window.SessionManager
12548     * @atomicservice
12549     * @since 19
12550     */
12551    rectType: RectType;
12552    /**
12553     * Window rect
12554     *
12555     * @type { Rect }
12556     * @syscap SystemCapability.Window.SessionManager
12557     * @atomicservice
12558     * @since 19
12559     */
12560    windowRect: Rect;
12561  }
12562
12563  /**
12564   * Rotation Change callback
12565   *
12566   * @typedef RotationChangeCallback<T, U>
12567   * @syscap SystemCapability.Window.SessionManager
12568   * @atomicservice
12569   * @since 19
12570   */
12571  interface RotationChangeCallback<T, U> {
12572    /**
12573     * Defines the rotation change callback
12574     *
12575     * @param { T } info
12576     * @returns { U } result
12577     * @syscap SystemCapability.Window.SessionManager
12578     * @atomicservice
12579     * @since 19
12580     */
12581    (info: T): U;
12582  }
12583}
12584
12585export default window;
12586