• 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 type { AsyncCallback, Callback } from './@ohos.base';
22import type colorSpaceManager from './@ohos.graphics.colorSpaceManager';
23import type hdrCapability from './@ohos.graphics.hdrCapability';
24
25/**
26 * Interface of display manager.
27 *
28 * @namespace display
29 * @syscap SystemCapability.WindowManager.WindowManager.Core
30 * @since 7
31 */
32/**
33 * Interface of display manager.
34 *
35 * @namespace display
36 * @syscap SystemCapability.WindowManager.WindowManager.Core
37 * @crossplatform
38 * @since 10
39 */
40/**
41 * Interface of display manager.
42 *
43 * @namespace display
44 * @syscap SystemCapability.WindowManager.WindowManager.Core
45 * @crossplatform
46 * @atomicservice
47 * @since 11
48 */
49declare namespace display {
50  /**
51   * Obtain the default display.
52   *
53   * @param { AsyncCallback<Display> } callback the result of display
54   * @syscap SystemCapability.WindowManager.WindowManager.Core
55   * @since 7
56   * @deprecated since 9
57   * @useinstead ohos.display#getDefaultDisplaySync
58   */
59  function getDefaultDisplay(callback: AsyncCallback<Display>): void;
60
61  /**
62   * Obtain the default display.
63   *
64   * @returns { Promise<Display> } the result of display
65   * @syscap SystemCapability.WindowManager.WindowManager.Core
66   * @since 7
67   * @deprecated since 9
68   * @useinstead ohos.display#getDefaultDisplaySync
69   */
70  function getDefaultDisplay(): Promise<Display>;
71
72  /**
73   * Obtain the default display.
74   *
75   * @returns { Display } the result of display
76   * @throws { BusinessError } 1400001 - Invalid display or screen.
77   * @syscap SystemCapability.WindowManager.WindowManager.Core
78   * @since 9
79   */
80  /**
81   * Obtain the default display.
82   *
83   * @returns { Display } the result of display
84   * @throws { BusinessError } 1400001 - Invalid display or screen.
85   * @syscap SystemCapability.WindowManager.WindowManager.Core
86   * @crossplatform
87   * @since 10
88   */
89  /**
90   * Obtain the default display.
91   *
92   * @returns { Display } the result of display
93   * @throws { BusinessError } 1400001 - Invalid display or screen.
94   * @syscap SystemCapability.WindowManager.WindowManager.Core
95   * @crossplatform
96   * @atomicservice
97   * @since 11
98   */
99  function getDefaultDisplaySync(): Display;
100
101  /**
102   * Obtain the target display.
103   *
104   * @param { number } displayId Display id to query. This parameter should be greater than or equal to 0.
105   * @returns { Display } the result of display
106   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
107   *                                                                   2. Incorrect parameter types.
108   *                                                                   3. Parameter verification failed.
109   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
110   * @syscap SystemCapability.WindowManager.WindowManager.Core
111   * @atomicservice
112   * @since 12
113   */
114  function getDisplayByIdSync(displayId: number): Display;
115
116  /**
117   * Obtain all displays.
118   *
119   * @param { AsyncCallback<Array<Display>> } callback the result of all displays
120   * @syscap SystemCapability.WindowManager.WindowManager.Core
121   * @since 7
122   * @deprecated since 9
123   * @useinstead ohos.display#getAllDisplays
124   */
125  function getAllDisplay(callback: AsyncCallback<Array<Display>>): void;
126
127  /**
128   * Obtain all displays.
129   *
130   * @returns { Promise<Array<Display>> } the result of all displays
131   * @syscap SystemCapability.WindowManager.WindowManager.Core
132   * @since 7
133   * @deprecated since 9
134   * @useinstead ohos.display#getAllDisplays
135   */
136  function getAllDisplay(): Promise<Array<Display>>;
137
138  /**
139   * Obtain all displays.
140   *
141   * @param { AsyncCallback<Array<Display>> } callback the result of all displays
142   * @throws { BusinessError } 1400001 - Invalid display or screen.
143   * @syscap SystemCapability.WindowManager.WindowManager.Core
144   * @since 9
145   */
146  /**
147   * Obtain all displays.
148   *
149   * @param { AsyncCallback<Array<Display>> } callback the result of all displays
150   * @throws { BusinessError } 1400001 - Invalid display or screen.
151   * @syscap SystemCapability.WindowManager.WindowManager.Core
152   * @atomicservice
153   * @since 12
154   */
155  function getAllDisplays(callback: AsyncCallback<Array<Display>>): void;
156
157  /**
158   * Obtain all displays.
159   *
160   * @returns { Promise<Array<Display>> } the result of all displays
161   * @throws { BusinessError } 1400001 - Invalid display or screen.
162   * @syscap SystemCapability.WindowManager.WindowManager.Core
163   * @since 9
164   */
165  /**
166   * Obtain all displays.
167   *
168   * @returns { Promise<Array<Display>> } the result of all displays
169   * @throws { BusinessError } 1400001 - Invalid display or screen.
170   * @syscap SystemCapability.WindowManager.WindowManager.Core
171   * @atomicservice
172   * @since 12
173   */
174  function getAllDisplays(): Promise<Array<Display>>;
175
176  /**
177   * Obtain all display physical resolution
178   *
179   * @returns { Promise<Array<DisplayPhysicalResolution>> } the result of all display physical resolution
180   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
181   * @syscap SystemCapability.WindowManager.WindowManager.Core
182   * @atomicservice
183   * @since 12
184   */
185  function getAllDisplayPhysicalResolution(): Promise<Array<DisplayPhysicalResolution>>;
186
187  /**
188   * Check whether there is a privacy window on the current display.
189   *
190   * @param { number } displayId Display id to query. This parameter should be greater than or equal to 0.
191   * @returns { boolean } true means there is a privacy window on the current display
192   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
193   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
194   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
195   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
196   * @syscap SystemCapability.WindowManager.WindowManager.Core
197   * @systemapi Hide this for inner system use.
198   * @since 9
199   */
200  function hasPrivateWindow(displayId: number): boolean;
201
202  /**
203   * Register the callback for display changes.
204   *
205   * @param { 'add' | 'remove' | 'change' } type the event of display change
206   * @param { Callback<number> } callback the display id of changed
207   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
208   * <br>2. Incorrect parameter types.
209   * @syscap SystemCapability.WindowManager.WindowManager.Core
210   * @since 7
211   */
212  /**
213   * Register the callback for display changes.
214   *
215   * @param { 'add' | 'remove' | 'change' } type the event of display change
216   * @param { Callback<number> } callback the display id of changed
217   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
218   * <br>2. Incorrect parameter types.
219   * @syscap SystemCapability.WindowManager.WindowManager.Core
220   * @atomicservice
221   * @since 12
222   */
223  function on(type: 'add' | 'remove' | 'change', callback: Callback<number>): void;
224
225  /**
226   * Unregister the callback for display changes.
227   *
228   * @param { 'add' | 'remove' | 'change' } type the event of display change event
229   * @param { Callback<number> } callback the display id of changed
230   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
231   * <br>2. Incorrect parameter types.
232   * @syscap SystemCapability.WindowManager.WindowManager.Core
233   * @since 7
234   */
235  /**
236   * Unregister the callback for display changes.
237   *
238   * @param { 'add' | 'remove' | 'change' } type the event of display change event
239   * @param { Callback<number> } callback the display id of changed
240   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
241   * <br>2. Incorrect parameter types.
242   * @syscap SystemCapability.WindowManager.WindowManager.Core
243   * @atomicservice
244   * @since 12
245   */
246  function off(type: 'add' | 'remove' | 'change', callback?: Callback<number>): void;
247
248  /**
249   * Register the callback for private mode changes.
250   *
251   * @param { 'privateModeChange' } type the event of private mode changes
252   * @param { Callback<boolean> } callback Callback used to return the result whether display is on private mode or not
253   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
254   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
255   * <br>2. Incorrect parameter types.
256   * @syscap SystemCapability.WindowManager.WindowManager.Core
257   * @systemapi Hide this for inner system use.
258   * @since 10
259   */
260  function on(type: 'privateModeChange', callback: Callback<boolean>): void;
261
262  /**
263   * Unregister the callback for private mode changes.
264   *
265   * @param { 'privateModeChange' } type the event of private mode changes
266   * @param { Callback<boolean> } callback Callback used to return the result whether display is on private mode or not
267   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
268   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
269   * <br>2. Incorrect parameter types.
270   * @syscap SystemCapability.WindowManager.WindowManager.Core
271   * @systemapi Hide this for inner system use.
272   * @since 10
273   */
274  function off(type: 'privateModeChange', callback?: Callback<boolean>): void;
275
276  /**
277   * Check whether the device is foldable.
278   *
279   * @returns { boolean } true means the device is foldable.
280   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
281   * @syscap SystemCapability.Window.SessionManager
282   * @since 10
283   */
284  /**
285   * Check whether the device is foldable.
286   *
287   * @returns { boolean } true means the device is foldable.
288   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
289   * @syscap SystemCapability.Window.SessionManager
290   * @atomicservice
291   * @since 12
292   */
293  function isFoldable(): boolean;
294
295  /**
296   * Get the current fold status of the foldable device.
297   *
298   * @returns { FoldStatus } fold status of device.
299   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
300   * @syscap SystemCapability.Window.SessionManager
301   * @since 10
302   */
303  /**
304   * Get the current fold status of the foldable device.
305   *
306   * @returns { FoldStatus } fold status of device.
307   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
308   * @syscap SystemCapability.Window.SessionManager
309   * @atomicservice
310   * @since 12
311   */
312  function getFoldStatus(): FoldStatus;
313
314  /**
315   * Register the callback for fold status changes.
316   *
317   * @param { 'foldStatusChange' } type the event of fold status changes
318   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
319   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
320   * <br>2. Incorrect parameter types.
321   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
322   * @syscap SystemCapability.Window.SessionManager
323   * @since 10
324   */
325  /**
326   * Register the callback for fold status changes.
327   *
328   * @param { 'foldStatusChange' } type the event of fold status changes
329   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
330   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
331   * <br>2. Incorrect parameter types.
332   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
333   * @syscap SystemCapability.Window.SessionManager
334   * @atomicservice
335   * @since 12
336   */
337  function on(type: 'foldStatusChange', callback: Callback<FoldStatus>): void;
338
339  /**
340   * Unregister the callback for fold status changes.
341   *
342   * @param { 'foldStatusChange' } type the event of fold status changes
343   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
344   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
345   * <br>2. Incorrect parameter types.
346   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
347   * @syscap SystemCapability.Window.SessionManager
348   * @since 10
349   */
350  /**
351   * Unregister the callback for fold status changes.
352   *
353   * @param { 'foldStatusChange' } type the event of fold status changes
354   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
355   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
356   * <br>2. Incorrect parameter types.
357   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
358   * @syscap SystemCapability.Window.SessionManager
359   * @atomicservice
360   * @since 12
361   */
362  function off(type: 'foldStatusChange', callback?: Callback<FoldStatus>): void;
363
364  /**
365   * Register the callback for fold angle changes.
366   *
367   * @param { 'foldAngleChange' } type the event of fold angle changes.
368   * @param { Callback<Array<number>> } callback Callback used to return the current fold angle of device.
369   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
370   * <br>2. Incorrect parameter types.
371   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
372   * @syscap SystemCapability.Window.SessionManager
373   * @atomicservice
374   * @since 12
375   */
376  function on(type: 'foldAngleChange', callback: Callback<Array<number>>): void;
377
378  /**
379   * Unregister the callback for fold angle changes.
380   *
381   * @param { 'foldAngleChange' } type the event of fold angle changes.
382   * @param { Callback<Array<number>> } callback Callback used to return the current fold angle of device.
383   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
384   * <br>2. Incorrect parameter types.
385   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
386   * @syscap SystemCapability.Window.SessionManager
387   * @atomicservice
388   * @since 12
389   */
390  function off(type: 'foldAngleChange', callback?: Callback<Array<number>>): void;
391
392  /**
393   * Register the callback for device capture status changes.
394   *
395   * @param { 'captureStatusChange' } type the event of capture status changes.
396   * @param { Callback<boolean> } callback Callback used to return the device capture status.
397   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
398   * <br>2. Incorrect parameter types.
399   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
400   * @syscap SystemCapability.Window.SessionManager
401   * @atomicservice
402   * @since 12
403   */
404  function on(type: 'captureStatusChange', callback: Callback<boolean>): void;
405
406  /**
407   * Unregister the callback for device capture status changes.
408   *
409   * @param { 'captureStatusChange' } type the event of capture status changes.
410   * @param { Callback<boolean> } callback Callback used to return the device capture status.
411   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
412   * <br>2. Incorrect parameter types.
413   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
414   * @syscap SystemCapability.Window.SessionManager
415   * @atomicservice
416   * @since 12
417   */
418  function off(type: 'captureStatusChange', callback?: Callback<boolean>): void;
419
420
421  /**
422   * Check whether the device is captured.
423   *
424   * @returns { boolean } true means the device is captured.
425   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
426   * @syscap SystemCapability.Window.SessionManager
427   * @atomicservice
428   * @since 12
429   */
430  function isCaptured(): boolean;
431
432  /**
433   * Get the display mode of the foldable device.
434   *
435   * @returns { FoldDisplayMode } display mode of the foldable device.
436   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
437   * @syscap SystemCapability.Window.SessionManager
438   * @since 10
439   */
440  /**
441   * Get the display mode of the foldable device.
442   *
443   * @returns { FoldDisplayMode } display mode of the foldable device.
444   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
445   * @syscap SystemCapability.Window.SessionManager
446   * @atomicservice
447   * @since 12
448   */
449  function getFoldDisplayMode(): FoldDisplayMode;
450
451  /**
452   * Change the display mode of the foldable device.
453   *
454   * @param { FoldDisplayMode } mode target display mode to change.
455   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
456   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
457   * <br>2. Incorrect parameter types.
458   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
459   * @syscap SystemCapability.Window.SessionManager
460   * @systemapi Hide this for inner system use.
461   * @since 10
462   */
463  function setFoldDisplayMode(mode: FoldDisplayMode): void;
464
465  /**
466   * Register the callback for fold display mode changes.
467   *
468   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
469   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
470   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
471   * <br>2. Incorrect parameter types.
472   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
473   * @syscap SystemCapability.Window.SessionManager
474   * @since 10
475   */
476  /**
477   * Register the callback for fold display mode changes.
478   *
479   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
480   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
481   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
482   * <br>2. Incorrect parameter types.
483   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
484   * @syscap SystemCapability.Window.SessionManager
485   * @atomicservice
486   * @since 12
487   */
488  function on(type: 'foldDisplayModeChange', callback: Callback<FoldDisplayMode>): void;
489
490  /**
491   * Unregister the callback for fold display mode changes.
492   *
493   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
494   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
495   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
496   * <br>2. Incorrect parameter types.
497   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
498   * @syscap SystemCapability.Window.SessionManager
499   * @since 10
500   */
501  /**
502   * Unregister the callback for fold display mode changes.
503   *
504   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
505   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
506   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
507   * <br>2. Incorrect parameter types.
508   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
509   * @syscap SystemCapability.Window.SessionManager
510   * @atomicservice
511   * @since 12
512   */
513  function off(type: 'foldDisplayModeChange', callback?: Callback<FoldDisplayMode>): void;
514
515  /**
516   * Get the fold crease region in the current display mode.
517   *
518   * @returns { FoldCreaseRegion } fold crease region in the current display mode.
519   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
520   * @syscap SystemCapability.Window.SessionManager
521   * @since 10
522   */
523  /**
524   * Get the fold crease region in the current display mode.
525   *
526   * @returns { FoldCreaseRegion } fold crease region in the current display mode.
527   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
528   * @syscap SystemCapability.Window.SessionManager
529   * @atomicservice
530   * @since 12
531   */
532  function getCurrentFoldCreaseRegion(): FoldCreaseRegion;
533
534  /**
535   * set fold status locked or not.
536   *
537   * @param { boolean } locked - fold status is locked or not.
538   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
539   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
540   * <br>2. Incorrect parameter types.
541   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
542   * @syscap SystemCapability.Window.SessionManager
543   * @systemapi Hide this for inner system use.
544   * @since 11
545   */
546  function setFoldStatusLocked(locked: boolean): void;
547
548  /**
549   * Enumerates the fold status.
550   *
551   * @enum { number }
552   * @syscap SystemCapability.Window.SessionManager
553   * @since 10
554   */
555  /**
556   * Enumerates the fold status.
557   *
558   * @enum { number }
559   * @syscap SystemCapability.Window.SessionManager
560   * @atomicservice
561   * @since 12
562   */
563  enum FoldStatus {
564    /**
565     * Fold Status Unknown.
566     *
567     * @syscap SystemCapability.Window.SessionManager
568     * @since 10
569     */
570    /**
571     * Fold Status Unknown.
572     *
573     * @syscap SystemCapability.Window.SessionManager
574     * @atomicservice
575     * @since 12
576     */
577    FOLD_STATUS_UNKNOWN = 0,
578    /**
579     * Fold Status Expanded.
580     *
581     * @syscap SystemCapability.Window.SessionManager
582     * @since 10
583     */
584    /**
585     * Fold Status Expanded.
586     *
587     * @syscap SystemCapability.Window.SessionManager
588     * @atomicservice
589     * @since 12
590     */
591    FOLD_STATUS_EXPANDED,
592    /**
593     * Fold Status Folded.
594     *
595     * @syscap SystemCapability.Window.SessionManager
596     * @since 10
597     */
598    /**
599     * Fold Status Folded.
600     *
601     * @syscap SystemCapability.Window.SessionManager
602     * @atomicservice
603     * @since 12
604     */
605    FOLD_STATUS_FOLDED,
606    /**
607     * Fold Status Half Folded.
608     *
609     * @syscap SystemCapability.Window.SessionManager
610     * @since 10
611     */
612    /**
613     * Fold Status Half Folded.
614     *
615     * @syscap SystemCapability.Window.SessionManager
616     * @atomicservice
617     * @since 12
618     */
619    FOLD_STATUS_HALF_FOLDED
620  }
621
622  /**
623   * Enumerates the fold display mode.
624   *
625   * @enum { number }
626   * @syscap SystemCapability.Window.SessionManager
627   * @since 10
628   */
629  /**
630   * Enumerates the fold display mode.
631   *
632   * @enum { number }
633   * @syscap SystemCapability.Window.SessionManager
634   * @atomicservice
635   * @since 12
636   */
637  enum FoldDisplayMode {
638    /**
639     * Unknown Display.
640     *
641     * @syscap SystemCapability.Window.SessionManager
642     * @since 10
643     */
644    /**
645     * Unknown Display.
646     *
647     * @syscap SystemCapability.Window.SessionManager
648     * @atomicservice
649     * @since 12
650     */
651    FOLD_DISPLAY_MODE_UNKNOWN = 0,
652    /**
653     * Full Display.
654     *
655     * @syscap SystemCapability.Window.SessionManager
656     * @since 10
657     */
658    /**
659     * Full Display.
660     *
661     * @syscap SystemCapability.Window.SessionManager
662     * @atomicservice
663     * @since 12
664     */
665    FOLD_DISPLAY_MODE_FULL,
666    /**
667     * Main Display.
668     *
669     * @syscap SystemCapability.Window.SessionManager
670     * @since 10
671     */
672    /**
673     * Main Display.
674     *
675     * @syscap SystemCapability.Window.SessionManager
676     * @atomicservice
677     * @since 12
678     */
679    FOLD_DISPLAY_MODE_MAIN,
680    /**
681     * Sub Display.
682     *
683     * @syscap SystemCapability.Window.SessionManager
684     * @since 10
685     */
686    /**
687     * Sub Display.
688     *
689     * @syscap SystemCapability.Window.SessionManager
690     * @atomicservice
691     * @since 12
692     */
693    FOLD_DISPLAY_MODE_SUB,
694    /**
695     * Coordination Display.
696     *
697     * @syscap SystemCapability.Window.SessionManager
698     * @since 10
699     */
700    /**
701     * Coordination Display.
702     *
703     * @syscap SystemCapability.Window.SessionManager
704     * @atomicservice
705     * @since 12
706     */
707    FOLD_DISPLAY_MODE_COORDINATION
708  }
709
710  /**
711   * Enumerates the display states.
712   *
713   * @enum { number }
714   * @syscap SystemCapability.WindowManager.WindowManager.Core
715   * @since 7
716   */
717  /**
718   * Enumerates the display states.
719   *
720   * @enum { number }
721   * @syscap SystemCapability.WindowManager.WindowManager.Core
722   * @atomicservice
723   * @since 12
724   */
725  enum DisplayState {
726    /**
727     * Unknown.
728     *
729     * @syscap SystemCapability.WindowManager.WindowManager.Core
730     * @since 7
731     */
732    /**
733     * Unknown.
734     *
735     * @syscap SystemCapability.WindowManager.WindowManager.Core
736     * @atomicservice
737     * @since 12
738     */
739    STATE_UNKNOWN = 0,
740    /**
741     * Screen off.
742     *
743     * @syscap SystemCapability.WindowManager.WindowManager.Core
744     * @since 7
745     */
746    /**
747     * Screen off.
748     *
749     * @syscap SystemCapability.WindowManager.WindowManager.Core
750     * @atomicservice
751     * @since 12
752     */
753    STATE_OFF,
754    /**
755     * Screen on.
756     *
757     * @syscap SystemCapability.WindowManager.WindowManager.Core
758     * @since 7
759     */
760    /**
761     * Screen on.
762     *
763     * @syscap SystemCapability.WindowManager.WindowManager.Core
764     * @atomicservice
765     * @since 12
766     */
767    STATE_ON,
768    /**
769     * Doze, but it will update for some important system messages.
770     *
771     * @syscap SystemCapability.WindowManager.WindowManager.Core
772     * @since 7
773     */
774    /**
775     * Doze, but it will update for some important system messages.
776     *
777     * @syscap SystemCapability.WindowManager.WindowManager.Core
778     * @atomicservice
779     * @since 12
780     */
781    STATE_DOZE,
782    /**
783     * Doze and not update.
784     *
785     * @syscap SystemCapability.WindowManager.WindowManager.Core
786     * @since 7
787     */
788    /**
789     * Doze and not update.
790     *
791     * @syscap SystemCapability.WindowManager.WindowManager.Core
792     * @atomicservice
793     * @since 12
794     */
795    STATE_DOZE_SUSPEND,
796    /**
797     * VR node.
798     *
799     * @syscap SystemCapability.WindowManager.WindowManager.Core
800     * @since 7
801     */
802    /**
803     * VR node.
804     *
805     * @syscap SystemCapability.WindowManager.WindowManager.Core
806     * @atomicservice
807     * @since 12
808     */
809    STATE_VR,
810    /**
811     * Screen on and not update.
812     *
813     * @syscap SystemCapability.WindowManager.WindowManager.Core
814     * @since 7
815     */
816    /**
817     * Screen on and not update.
818     *
819     * @syscap SystemCapability.WindowManager.WindowManager.Core
820     * @atomicservice
821     * @since 12
822     */
823    STATE_ON_SUSPEND
824  }
825
826  /**
827   * Enumerates the display orientation.
828   *
829   * @enum { number }
830   * @syscap SystemCapability.WindowManager.WindowManager.Core
831   * @crossplatform
832   * @since 10
833   */
834  /**
835   * Enumerates the display orientation.
836   *
837   * @enum { number }
838   * @syscap SystemCapability.WindowManager.WindowManager.Core
839   * @crossplatform
840   * @atomicservice
841   * @since 12
842   */
843  enum Orientation {
844    /**
845     * Indicate that the display content is in portrait mode.
846     *
847     * @syscap SystemCapability.WindowManager.WindowManager.Core
848     * @crossplatform
849     * @since 10
850     */
851    /**
852     * Indicate that the display content is in portrait mode.
853     *
854     * @syscap SystemCapability.WindowManager.WindowManager.Core
855     * @crossplatform
856     * @atomicservice
857     * @since 12
858     */
859    PORTRAIT = 0,
860
861    /**
862     * Indicate that the display content is in landscape mode.
863     *
864     * @syscap SystemCapability.WindowManager.WindowManager.Core
865     * @crossplatform
866     * @since 10
867     */
868    /**
869     * Indicate that the display content is in landscape mode.
870     *
871     * @syscap SystemCapability.WindowManager.WindowManager.Core
872     * @crossplatform
873     * @atomicservice
874     * @since 12
875     */
876    LANDSCAPE = 1,
877
878    /**
879     * Indicate that the display content is in the opposite direction of the portrait mode.
880     *
881     * @syscap SystemCapability.WindowManager.WindowManager.Core
882     * @crossplatform
883     * @since 10
884     */
885    /**
886     * Indicate that the display content is in the opposite direction of the portrait mode.
887     *
888     * @syscap SystemCapability.WindowManager.WindowManager.Core
889     * @crossplatform
890     * @atomicservice
891     * @since 12
892     */
893    PORTRAIT_INVERTED = 2,
894
895    /**
896     * Indicate that the display content is in the opposite direction of the landscape mode.
897     *
898     * @syscap SystemCapability.WindowManager.WindowManager.Core
899     * @crossplatform
900     * @since 10
901     */
902    /**
903     * Indicate that the display content is in the opposite direction of the landscape mode.
904     *
905     * @syscap SystemCapability.WindowManager.WindowManager.Core
906     * @crossplatform
907     * @atomicservice
908     * @since 12
909     */
910    LANDSCAPE_INVERTED = 3
911  }
912
913  /**
914   * Fold Crease Region
915   *
916   * @interface FoldCreaseRegion
917   * @syscap SystemCapability.Window.SessionManager
918   * @since 10
919   */
920  /**
921   * Fold Crease Region
922   *
923   * @interface FoldCreaseRegion
924   * @syscap SystemCapability.Window.SessionManager
925   * @atomicservice
926   * @since 12
927   */
928  interface FoldCreaseRegion {
929    /**
930     * The display ID is used to identify the screen where the crease is located.
931     *
932     * @type { number }
933     * @readonly
934     * @syscap SystemCapability.Window.SessionManager
935     * @since 10
936     */
937    /**
938     * The display ID is used to identify the screen where the crease is located.
939     *
940     * @type { number }
941     * @readonly
942     * @syscap SystemCapability.Window.SessionManager
943     * @atomicservice
944     * @since 12
945     */
946    readonly displayId: number;
947
948    /**
949     * Crease Region.
950     *
951     * @type { Array<Rect> }
952     * @readonly
953     * @syscap SystemCapability.Window.SessionManager
954     * @since 10
955     */
956    /**
957     * Crease Region.
958     *
959     * @type { Array<Rect> }
960     * @readonly
961     * @syscap SystemCapability.Window.SessionManager
962     * @atomicservice
963     * @since 12
964     */
965    readonly creaseRects: Array<Rect>;
966  }
967
968  /**
969   * Rectangle
970   *
971   * @interface Rect
972   * @syscap SystemCapability.WindowManager.WindowManager.Core
973   * @since 9
974   */
975  /**
976   * Rectangle
977   *
978   * @interface Rect
979   * @syscap SystemCapability.WindowManager.WindowManager.Core
980   * @atomicservice
981   * @since 12
982   */
983  interface Rect {
984    /**
985     * The X-axis coordinate of the upper left vertex of the rectangle, in pixels.
986     *
987     * @type { number }
988     * @syscap SystemCapability.WindowManager.WindowManager.Core
989     * @since 9
990     */
991    /**
992     * The X-axis coordinate of the upper left vertex of the rectangle, in pixels.
993     *
994     * @type { number }
995     * @syscap SystemCapability.WindowManager.WindowManager.Core
996     * @atomicservice
997     * @since 12
998     */
999    left: number;
1000
1001    /**
1002     * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels.
1003     *
1004     * @type { number }
1005     * @syscap SystemCapability.WindowManager.WindowManager.Core
1006     * @since 9
1007     */
1008    /**
1009     * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels.
1010     *
1011     * @type { number }
1012     * @syscap SystemCapability.WindowManager.WindowManager.Core
1013     * @atomicservice
1014     * @since 12
1015     */
1016    top: number;
1017
1018    /**
1019     * Width of the rectangle, in pixels.
1020     *
1021     * @type { number }
1022     * @syscap SystemCapability.WindowManager.WindowManager.Core
1023     * @since 9
1024     */
1025    /**
1026     * Width of the rectangle, in pixels.
1027     *
1028     * @type { number }
1029     * @syscap SystemCapability.WindowManager.WindowManager.Core
1030     * @atomicservice
1031     * @since 12
1032     */
1033    width: number;
1034
1035    /**
1036     * Height of the rectangle, in pixels.
1037     *
1038     * @type { number }
1039     * @syscap SystemCapability.WindowManager.WindowManager.Core
1040     * @since 9
1041     */
1042    /**
1043     * Height of the rectangle, in pixels.
1044     *
1045     * @type { number }
1046     * @syscap SystemCapability.WindowManager.WindowManager.Core
1047     * @atomicservice
1048     * @since 12
1049     */
1050    height: number;
1051  }
1052
1053  /**
1054   * Curved area rects of the waterfall display.
1055   *
1056   * @interface WaterfallDisplayAreaRects
1057   * @syscap SystemCapability.WindowManager.WindowManager.Core
1058   * @since 9
1059   */
1060  /**
1061   * Curved area rects of the waterfall display.
1062   *
1063   * @interface WaterfallDisplayAreaRects
1064   * @syscap SystemCapability.WindowManager.WindowManager.Core
1065   * @atomicservice
1066   * @since 12
1067   */
1068  interface WaterfallDisplayAreaRects {
1069    /**
1070     * Indicates the size of left side curved area of the waterfall screen.
1071     *
1072     * @type { Rect }
1073     * @syscap SystemCapability.WindowManager.WindowManager.Core
1074     * @since 9
1075     */
1076    /**
1077     * Indicates the size of left side curved area of the waterfall screen.
1078     *
1079     * @type { Rect }
1080     * @syscap SystemCapability.WindowManager.WindowManager.Core
1081     * @atomicservice
1082     * @since 12
1083     */
1084    readonly left: Rect;
1085
1086    /**
1087     * Indicates the size of right side curved area of the waterfall screen.
1088     *
1089     * @type { Rect }
1090     * @syscap SystemCapability.WindowManager.WindowManager.Core
1091     * @since 9
1092     */
1093    /**
1094     * Indicates the size of right side curved area of the waterfall screen.
1095     *
1096     * @type { Rect }
1097     * @syscap SystemCapability.WindowManager.WindowManager.Core
1098     * @atomicservice
1099     * @since 12
1100     */
1101    readonly right: Rect;
1102
1103    /**
1104     * Indicates the size of top side curved area of the waterfall screen.
1105     *
1106     * @type { Rect }
1107     * @syscap SystemCapability.WindowManager.WindowManager.Core
1108     * @since 9
1109     */
1110    /**
1111     * Indicates the size of top side curved area of the waterfall screen.
1112     *
1113     * @type { Rect }
1114     * @syscap SystemCapability.WindowManager.WindowManager.Core
1115     * @atomicservice
1116     * @since 12
1117     */
1118    readonly top: Rect;
1119
1120    /**
1121     * Indicates the size of bottom side curved area of the waterfall screen.
1122     *
1123     * @type { Rect }
1124     * @syscap SystemCapability.WindowManager.WindowManager.Core
1125     * @since 9
1126     */
1127    /**
1128     * Indicates the size of bottom side curved area of the waterfall screen.
1129     *
1130     * @type { Rect }
1131     * @syscap SystemCapability.WindowManager.WindowManager.Core
1132     * @atomicservice
1133     * @since 12
1134     */
1135    readonly bottom: Rect;
1136  }
1137
1138  /**
1139   * Cutout information of the display.
1140   *
1141   * @interface CutoutInfo
1142   * @syscap SystemCapability.WindowManager.WindowManager.Core
1143   * @since 9
1144   */
1145  /**
1146   * Cutout information of the display.
1147   *
1148   * @interface CutoutInfo
1149   * @syscap SystemCapability.WindowManager.WindowManager.Core
1150   * @atomicservice
1151   * @since 12
1152   */
1153  interface CutoutInfo {
1154    /**
1155     * Bounding rectangles of the cutout areas of the display.
1156     *
1157     * @type { Array<Rect> }
1158     * @syscap SystemCapability.WindowManager.WindowManager.Core
1159     * @since 9
1160     */
1161    /**
1162     * Bounding rectangles of the cutout areas of the display.
1163     *
1164     * @type { Array<Rect> }
1165     * @syscap SystemCapability.WindowManager.WindowManager.Core
1166     * @atomicservice
1167     * @since 12
1168     */
1169    readonly boundingRects: Array<Rect>;
1170
1171    /**
1172     * Rectangles of curved parts on each side of a waterfall display.
1173     *
1174     * @type { WaterfallDisplayAreaRects }
1175     * @syscap SystemCapability.WindowManager.WindowManager.Core
1176     * @since 9
1177     */
1178    /**
1179     * Rectangles of curved parts on each side of a waterfall display.
1180     *
1181     * @type { WaterfallDisplayAreaRects }
1182     * @syscap SystemCapability.WindowManager.WindowManager.Core
1183     * @atomicservice
1184     * @since 12
1185     */
1186    readonly waterfallDisplayAreaRects: WaterfallDisplayAreaRects;
1187  }
1188
1189  /**
1190   * Define display physical resolution.
1191   *
1192   * @interface DisplayPhysicalResolution
1193   * @syscap SystemCapability.WindowManager.WindowManager.Core
1194   * @crossplatform
1195   * @atomicservice
1196   * @since 12
1197   */
1198  interface DisplayPhysicalResolution {
1199    /**
1200     * fold display mode.
1201     *
1202     * @type { FoldDisplayMode }
1203     * @syscap SystemCapability.WindowManager.WindowManager.Core
1204     * @atomicservice
1205     * @since 12
1206     */
1207    foldDisplayMode: FoldDisplayMode;
1208
1209    /**
1210     * Display physical width, in pixels.
1211     *
1212     * @type { number }
1213     * @syscap SystemCapability.WindowManager.WindowManager.Core
1214     * @crossplatform
1215     * @atomicservice
1216     * @since 12
1217     */
1218    physicalWidth: number;
1219
1220    /**
1221     * Display physical height, in pixels.
1222     *
1223     * @type { number }
1224     * @syscap SystemCapability.WindowManager.WindowManager.Core
1225     * @crossplatform
1226     * @atomicservice
1227     * @since 12
1228     */
1229    physicalHeight: number;
1230  }
1231
1232  /**
1233   * Define properties of the display. They cannot be updated automatically.
1234   *
1235   * @interface Display
1236   * @syscap SystemCapability.WindowManager.WindowManager.Core
1237   * @since 7
1238   */
1239  /**
1240   * Define properties of the display. They cannot be updated automatically.
1241   *
1242   * @interface Display
1243   * @syscap SystemCapability.WindowManager.WindowManager.Core
1244   * @crossplatform
1245   * @since 10
1246   */
1247  /**
1248   * Define properties of the display. They cannot be updated automatically.
1249   *
1250   * @interface Display
1251   * @syscap SystemCapability.WindowManager.WindowManager.Core
1252   * @crossplatform
1253   * @atomicservice
1254   * @since 11
1255   */
1256  interface Display {
1257    /**
1258     * Display ID.
1259     *
1260     * @type { number }
1261     * @syscap SystemCapability.WindowManager.WindowManager.Core
1262     * @since 7
1263     */
1264    /**
1265     * Display ID.
1266     *
1267     * @type { number }
1268     * @syscap SystemCapability.WindowManager.WindowManager.Core
1269     * @crossplatform
1270     * @since 10
1271     */
1272    /**
1273     * Display ID.
1274     *
1275     * @type { number }
1276     * @syscap SystemCapability.WindowManager.WindowManager.Core
1277     * @crossplatform
1278     * @atomicservice
1279     * @since 12
1280     */
1281    id: number;
1282
1283    /**
1284     * Display name.
1285     *
1286     * @type { string }
1287     * @syscap SystemCapability.WindowManager.WindowManager.Core
1288     * @since 7
1289     */
1290    /**
1291     * Display name.
1292     *
1293     * @type { string }
1294     * @syscap SystemCapability.WindowManager.WindowManager.Core
1295     * @atomicservice
1296     * @since 12
1297     */
1298    name: string;
1299
1300    /**
1301     * The display is alive.
1302     *
1303     * @type { boolean }
1304     * @syscap SystemCapability.WindowManager.WindowManager.Core
1305     * @since 7
1306     */
1307    /**
1308     * The display is alive.
1309     *
1310     * @type { boolean }
1311     * @syscap SystemCapability.WindowManager.WindowManager.Core
1312     * @atomicservice
1313     * @since 12
1314     */
1315    alive: boolean;
1316
1317    /**
1318     * The state of display.
1319     *
1320     * @type { DisplayState }
1321     * @syscap SystemCapability.WindowManager.WindowManager.Core
1322     * @since 7
1323     */
1324    /**
1325     * The state of display.
1326     *
1327     * @type { DisplayState }
1328     * @syscap SystemCapability.WindowManager.WindowManager.Core
1329     * @atomicservice
1330     * @since 12
1331     */
1332    state: DisplayState;
1333
1334    /**
1335     * Refresh rate, in Hz.
1336     *
1337     * @type { number }
1338     * @syscap SystemCapability.WindowManager.WindowManager.Core
1339     * @since 7
1340     */
1341    /**
1342     * Refresh rate, in Hz.
1343     *
1344     * @type { number }
1345     * @syscap SystemCapability.WindowManager.WindowManager.Core
1346     * @atomicservice
1347     * @since 12
1348     */
1349    refreshRate: number;
1350
1351    /**
1352     * Rotation degrees of the display.
1353     *
1354     * @type { number }
1355     * @syscap SystemCapability.WindowManager.WindowManager.Core
1356     * @since 7
1357     */
1358    /**
1359     * An enumeration value for rotation degrees of the display.
1360     * The value 0 indicates that the screen of the display rotates clockwise by 0°.
1361     * The value 1 indicates that the screen of the display rotates clockwise by 90°.
1362     * The value 2 indicates that the screen of the display rotates clockwise by 180°.
1363     * The value 3 indicates that the screen of the display rotates clockwise by 270°.
1364     *
1365     * @type { number }
1366     * @syscap SystemCapability.WindowManager.WindowManager.Core
1367     * @atomicservice
1368     * @since 11
1369     */
1370    rotation: number;
1371
1372    /**
1373     * Display width, in pixels.
1374     *
1375     * @type { number }
1376     * @syscap SystemCapability.WindowManager.WindowManager.Core
1377     * @since 7
1378     */
1379    /**
1380     * Display width, in pixels.
1381     *
1382     * @type { number }
1383     * @syscap SystemCapability.WindowManager.WindowManager.Core
1384     * @crossplatform
1385     * @since 10
1386     */
1387    /**
1388     * Display width, in pixels.
1389     *
1390     * @type { number }
1391     * @syscap SystemCapability.WindowManager.WindowManager.Core
1392     * @crossplatform
1393     * @atomicservice
1394     * @since 11
1395     */
1396    width: number;
1397
1398    /**
1399     * Display height, in pixels.
1400     *
1401     * @type { number }
1402     * @syscap SystemCapability.WindowManager.WindowManager.Core
1403     * @since 7
1404     */
1405    /**
1406     * Display height, in pixels.
1407     *
1408     * @type { number }
1409     * @syscap SystemCapability.WindowManager.WindowManager.Core
1410     * @crossplatform
1411     * @since 10
1412     */
1413    /**
1414     * Display height, in pixels.
1415     *
1416     * @type { number }
1417     * @syscap SystemCapability.WindowManager.WindowManager.Core
1418     * @crossplatform
1419     * @atomicservice
1420     * @since 11
1421     */
1422    height: number;
1423
1424    /**
1425     * Display available width, in pixels.
1426     *
1427     * @type { number }
1428     * @syscap SystemCapability.WindowManager.WindowManager.Core
1429     * @crossplatform
1430     * @atomicservice
1431     * @since 12
1432     */
1433    availableWidth: number;
1434
1435    /**
1436     * Display available height, in pixels.
1437     *
1438     * @type { number }
1439     * @syscap SystemCapability.WindowManager.WindowManager.Core
1440     * @crossplatform
1441     * @atomicservice
1442     * @since 12
1443     */
1444    availableHeight: number;
1445
1446    /**
1447     * Display resolution.
1448     *
1449     * @type { number }
1450     * @syscap SystemCapability.WindowManager.WindowManager.Core
1451     * @since 7
1452     */
1453    /**
1454     * Display resolution.
1455     *
1456     * @type { number }
1457     * @syscap SystemCapability.WindowManager.WindowManager.Core
1458     * @crossplatform
1459     * @since 11
1460     */
1461    /**
1462     * Display resolution.
1463     *
1464     * @type { number }
1465     * @syscap SystemCapability.WindowManager.WindowManager.Core
1466     * @crossplatform
1467     * @atomicservice
1468     * @since 12
1469     */
1470    densityDPI: number;
1471
1472    /**
1473     * Display orientation.
1474     *
1475     * @type { Orientation }
1476     * @syscap SystemCapability.WindowManager.WindowManager.Core
1477     * @crossplatform
1478     * @since 10
1479     */
1480    /**
1481     * Display orientation.
1482     *
1483     * @type { Orientation }
1484     * @syscap SystemCapability.WindowManager.WindowManager.Core
1485     * @crossplatform
1486     * @atomicservice
1487     * @since 12
1488     */
1489    orientation: Orientation;
1490
1491    /**
1492     * Display density, in pixels. The value for a low-resolution display is 1.0.
1493     *
1494     * @type { number }
1495     * @syscap SystemCapability.WindowManager.WindowManager.Core
1496     * @since 7
1497     */
1498    /**
1499     * Display density, in pixels. The value for a low-resolution display is 1.0.
1500     *
1501     * @type { number }
1502     * @syscap SystemCapability.WindowManager.WindowManager.Core
1503     * @crossplatform
1504     * @atomicservice
1505     * @since 11
1506     */
1507    densityPixels: number;
1508
1509    /**
1510     * Text scale density of the display.
1511     *
1512     * @type { number }
1513     * @syscap SystemCapability.WindowManager.WindowManager.Core
1514     * @since 7
1515     */
1516    /**
1517     * Text scale density of the display.
1518     *
1519     * @type { number }
1520     * @syscap SystemCapability.WindowManager.WindowManager.Core
1521     * @crossplatform
1522     * @since 11
1523     */
1524    /**
1525     * Text scale density of the display.
1526     *
1527     * @type { number }
1528     * @syscap SystemCapability.WindowManager.WindowManager.Core
1529     * @crossplatform
1530     * @atomicservice
1531     * @since 12
1532     */
1533    scaledDensity: number;
1534
1535    /**
1536     * DPI on the x-axis.
1537     *
1538     * @type { number }
1539     * @syscap SystemCapability.WindowManager.WindowManager.Core
1540     * @since 7
1541     */
1542    /**
1543     * DPI on the x-axis.
1544     *
1545     * @type { number }
1546     * @syscap SystemCapability.WindowManager.WindowManager.Core
1547     * @atomicservice
1548     * @since 12
1549     */
1550    xDPI: number;
1551
1552    /**
1553     * DPI on the y-axis.
1554     *
1555     * @type { number }
1556     * @syscap SystemCapability.WindowManager.WindowManager.Core
1557     * @since 7
1558     */
1559    /**
1560     * DPI on the y-axis.
1561     *
1562     * @type { number }
1563     * @syscap SystemCapability.WindowManager.WindowManager.Core
1564     * @atomicservice
1565     * @since 12
1566     */
1567    yDPI: number;
1568
1569    /**
1570     * All supported color spaces.
1571     *
1572     * @type { Array<colorSpaceManager.ColorSpace> }
1573     * @syscap SystemCapability.WindowManager.WindowManager.Core
1574     * @since 11
1575     */
1576    /**
1577     * All supported color spaces.
1578     *
1579     * @type { Array<colorSpaceManager.ColorSpace> }
1580     * @syscap SystemCapability.WindowManager.WindowManager.Core
1581     * @atomicservice
1582     * @since 12
1583     */
1584    colorSpaces: Array<colorSpaceManager.ColorSpace>;
1585
1586    /**
1587     * All supported HDR formats.
1588     *
1589     * @type { Array<hdrCapability.HDRFormat> }
1590     * @syscap SystemCapability.WindowManager.WindowManager.Core
1591     * @since 11
1592     */
1593    /**
1594     * All supported HDR formats.
1595     *
1596     * @type { Array<hdrCapability.HDRFormat> }
1597     * @syscap SystemCapability.WindowManager.WindowManager.Core
1598     * @atomicservice
1599     * @since 12
1600     */
1601    hdrFormats: Array<hdrCapability.HDRFormat>;
1602
1603    /**
1604     * Obtain the cutout info of the display.
1605     *
1606     * @param { AsyncCallback<CutoutInfo> } callback
1607     * @throws { BusinessError } 1400001 - Invalid display or screen.
1608     * @syscap SystemCapability.WindowManager.WindowManager.Core
1609     * @since 9
1610     */
1611    /**
1612     * Obtain the cutout info of the display.
1613     *
1614     * @param { AsyncCallback<CutoutInfo> } callback
1615     * @throws { BusinessError } 1400001 - Invalid display or screen.
1616     * @syscap SystemCapability.WindowManager.WindowManager.Core
1617     * @atomicservice
1618     * @since 12
1619     */
1620    getCutoutInfo(callback: AsyncCallback<CutoutInfo>): void;
1621
1622    /**
1623     * Obtain the cutout info of the display.
1624     *
1625     * @returns { Promise<CutoutInfo> }
1626     * @throws { BusinessError } 1400001 - Invalid display or screen.
1627     * @syscap SystemCapability.WindowManager.WindowManager.Core
1628     * @since 9
1629     */
1630    /**
1631     * Obtain the cutout info of the display.
1632     *
1633     * @returns { Promise<CutoutInfo> }
1634     * @throws { BusinessError } 1400001 - Invalid display or screen.
1635     * @syscap SystemCapability.WindowManager.WindowManager.Core
1636     * @atomicservice
1637     * @since 12
1638     */
1639    getCutoutInfo(): Promise<CutoutInfo>;
1640
1641    /**
1642     * Check if current display has immersive window.
1643     *
1644     * @param { AsyncCallback<boolean> } callback
1645     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1646     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1647     * @throws { BusinessError } 1400001 - Invalid display or screen.
1648     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1649     * @syscap SystemCapability.Window.SessionManager
1650     * @systemapi Hide this for inner system use.
1651     * @since 11
1652     */
1653    hasImmersiveWindow(callback: AsyncCallback<boolean>): void;
1654
1655    /**
1656     * Check if current display has immersive window.
1657     *
1658     * @returns { Promise<boolean> }
1659     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1660     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1661     * @throws { BusinessError } 1400001 - Invalid display or screen.
1662     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1663     * @syscap SystemCapability.Window.SessionManager
1664     * @systemapi Hide this for inner system use.
1665     * @since 11
1666     */
1667    hasImmersiveWindow(): Promise<boolean>;
1668
1669    /**
1670     * Obtain the available area of the display.
1671     *
1672     * @returns { Promise<Rect> }
1673     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1674     * @throws { BusinessError } 1400001 - Invalid display or screen.
1675     * @syscap SystemCapability.Window.SessionManager
1676     * @atomicservice
1677     * @since 12
1678     */
1679    getAvailableArea(): Promise<Rect>;
1680
1681    /**
1682    * Register the callback for available area changes.
1683    *
1684    * @param { 'availableAreaChange' } type - the event of available area changes
1685    * @param { Callback<Rect> } callback - Callback used to return the available area
1686    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1687    * <br>2. Incorrect parameter types.
1688    * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1689    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1690    * @syscap SystemCapability.Window.SessionManager
1691    * @atomicservice
1692    * @since 12
1693    */
1694    on(type: 'availableAreaChange', callback: Callback<Rect>): void;
1695
1696    /**
1697    * Unregister the callback for available area changes.
1698    *
1699    * @param { 'availableAreaChange' } type - the event of available area changes
1700    * @param { Callback<Rect> } [callback] - Callback used to return the available area
1701    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1702    * <br>2. Incorrect parameter types.
1703    * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1704    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1705    * @syscap SystemCapability.Window.SessionManager
1706    * @atomicservice
1707    * @since 12
1708    */
1709    off(type: 'availableAreaChange', callback?: Callback<Rect>): void;
1710  }
1711}
1712
1713export default display;
1714