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