• 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   * Create virtual screen.
562   *
563   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
564   * @param { VirtualScreenConfig } config Indicates the options of the virtual screen.
565   * @returns { Promise<number> } Promise used to return the created virtual screen id
566   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
567   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
568   * <br>2. Incorrect parameter types.
569   * @throws { BusinessError } 801 - Capability not supported.function createVirtualScreen can not work correctly due to limited device capabilities.
570   * @throws { BusinessError } 1400001 - Invalid display or screen.
571   * @syscap  SystemCapability.Window.SessionManager
572   * @since 16
573   */
574  function createVirtualScreen(config: VirtualScreenConfig): Promise<number>;
575
576  /**
577   * Destroy virtual screen.
578   *
579   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
580   * @param { number } screenId Indicates the screen id of the virtual screen.
581   * @returns { Promise<void> } Promise that returns no value.
582   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
583   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
584   * <br>2. Incorrect parameter types.
585   * @throws { BusinessError } 801 - Capability not supported.function destroyVirtualScreen can not work correctly due to limited device capabilities.
586   * @throws { BusinessError } 1400001 - Invalid display or screen.
587   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
588   * @syscap  SystemCapability.Window.SessionManager
589   * @since 16
590   */
591  function destroyVirtualScreen(screenId: number): Promise<void>;
592
593  /**
594   * Set surface for the virtual screen.
595   *
596   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
597   * @param { number } screenId Indicates the screen id of the virtual screen.
598   * @param { string } surfaceId Indicates the surface id.
599   * @returns { Promise<void> } Promise that returns no value
600   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
601   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
602   * <br>2. Incorrect parameter types.
603   * @throws { BusinessError } 801 - Capability not supported.function setVirtualScreenSurface can not work correctly due to limited device capabilities.
604   * @throws { BusinessError } 1400001 - Invalid display or screen.
605   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
606   * @syscap  SystemCapability.Window.SessionManager
607   * @since 16
608   */
609  function setVirtualScreenSurface(screenId: number, surfaceId: string): Promise<void>;
610
611  /**
612   * Make screen as unique-screen
613   *
614   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
615   * @param { number } screenId Indicates the unique screen id. It's type should be int.
616   * @returns { Promise<void> } Promise that returns no value
617   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
618   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
619   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
620   * @throws { BusinessError } 801 - Capability not supported.function makeUnique can not work correctly due to limited device capabilities.
621   * @throws { BusinessError } 1400001 - Invalid display or screen.
622   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
623   * @syscap SystemCapability.Window.SessionManager
624   * @since 16
625   */
626  function makeUnique(screenId: number): Promise<void>;
627
628  /**
629   * The parameter for creating virtual screen.
630   *
631   * @interface VirtualScreenConfig
632   * @syscap SystemCapability.Window.SessionManager
633   * @since 16
634   */
635  interface VirtualScreenConfig {
636    /**
637     * Indicates the name of the virtual screen.
638     *
639     * @type { string }
640     * @syscap  SystemCapability.Window.SessionManager
641     * @since 16
642     */
643    name: string;
644
645    /**
646     * Indicates the width of the virtual screen.
647     *
648     * @type { number }
649     * @syscap SystemCapability.Window.SessionManager
650     * @since 16
651     */
652    width: number;
653
654    /**
655     * Indicates the height of the virtual screen.
656     *
657     * @type { number }
658     * @syscap SystemCapability.Window.SessionManager
659     * @since 16
660     */
661    height: number;
662
663    /**
664     * Indicates the density of the virtual screen.
665     *
666     * @type { number }
667     * @syscap SystemCapability.Window.SessionManager
668     * @since 16
669     */
670    density: number;
671
672    /**
673     * Indicates the surface id of the virtual screen.
674     *
675     * @type { string }
676     * @syscap SystemCapability.Window.SessionManager
677     * @since 16
678     */
679    surfaceId: string;
680  }
681
682  /**
683   * Add the list of window ids to the block list which won't display on the virtual screen
684   *
685   * @param { Array<number> } windowIds - The list of window ids that do not want to display on the virtual screen
686   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
687   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
688   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
689   * @throws { BusinessError } 801 - Capability not supported.Function addVirtualScreenBlocklist can not work correctly due to limited device capabilities.
690   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
691   * @syscap SystemCapability.Window.SessionManager
692   * @systemapi Hide this for inner system use.
693   * @since 18
694   */
695  function addVirtualScreenBlocklist(windowIds: Array<number>): Promise<void>;
696
697  /**
698   * Remove the list of window ids from the block list which won't display on the virtual screen
699   *
700   * @param { Array<number> } windowIds - The list of window ids that want to display on the virtual screen
701   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
702   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
703   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
704   * @throws { BusinessError } 801 - Capability not supported.Function removeVirtualScreenBlocklist can not work correctly due to limited device capabilities.
705   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
706   * @syscap SystemCapability.Window.SessionManager
707   * @systemapi Hide this for inner system use.
708   * @since 18
709   */
710  function removeVirtualScreenBlocklist(windowIds: Array<number>): Promise<void>;
711
712  /**
713   * Enumerates the fold status.
714   *
715   * @enum { number }
716   * @syscap SystemCapability.Window.SessionManager
717   * @since 10
718   */
719  /**
720   * Enumerates the fold status.
721   *
722   * @enum { number }
723   * @syscap SystemCapability.Window.SessionManager
724   * @atomicservice
725   * @since 12
726   */
727  enum FoldStatus {
728    /**
729     * Fold Status Unknown.
730     *
731     * @syscap SystemCapability.Window.SessionManager
732     * @since 10
733     */
734    /**
735     * Fold Status Unknown.
736     *
737     * @syscap SystemCapability.Window.SessionManager
738     * @atomicservice
739     * @since 12
740     */
741    FOLD_STATUS_UNKNOWN = 0,
742    /**
743     * Fold Status Expanded.
744     *
745     * @syscap SystemCapability.Window.SessionManager
746     * @since 10
747     */
748    /**
749     * Fold Status Expanded.
750     *
751     * @syscap SystemCapability.Window.SessionManager
752     * @atomicservice
753     * @since 12
754     */
755    FOLD_STATUS_EXPANDED,
756    /**
757     * Fold Status Folded.
758     *
759     * @syscap SystemCapability.Window.SessionManager
760     * @since 10
761     */
762    /**
763     * Fold Status Folded.
764     *
765     * @syscap SystemCapability.Window.SessionManager
766     * @atomicservice
767     * @since 12
768     */
769    FOLD_STATUS_FOLDED,
770    /**
771     * Fold Status Half Folded.
772     *
773     * @syscap SystemCapability.Window.SessionManager
774     * @since 10
775     */
776    /**
777     * Fold Status Half Folded.
778     *
779     * @syscap SystemCapability.Window.SessionManager
780     * @atomicservice
781     * @since 12
782     */
783    FOLD_STATUS_HALF_FOLDED,
784    /**
785     * Fold Status Expanded With Second Expanded.
786     *
787     * @syscap SystemCapability.Window.SessionManager
788     * @atomicservice
789     * @since 15
790     */
791    FOLD_STATUS_EXPANDED_WITH_SECOND_EXPANDED = 11,
792    /**
793     * Fold Status Expanded With Second Half Folded.
794     *
795     * @syscap SystemCapability.Window.SessionManager
796     * @atomicservice
797     * @since 15
798     */
799    FOLD_STATUS_EXPANDED_WITH_SECOND_HALF_FOLDED = 21,
800    /**
801     * Fold Status Folded With Second Expanded.
802     *
803     * @syscap SystemCapability.Window.SessionManager
804     * @atomicservice
805     * @since 15
806     */
807    FOLD_STATUS_FOLDED_WITH_SECOND_EXPANDED = 12,
808    /**
809     * Fold Status Folded With Second Half Folded.
810     *
811     * @syscap SystemCapability.Window.SessionManager
812     * @atomicservice
813     * @since 15
814     */
815    FOLD_STATUS_FOLDED_WITH_SECOND_HALF_FOLDED = 22,
816    /**
817     * Fold Status Half Folded With Second Expanded.
818     *
819     * @syscap SystemCapability.Window.SessionManager
820     * @atomicservice
821     * @since 15
822     */
823    FOLD_STATUS_HALF_FOLDED_WITH_SECOND_EXPANDED = 13,
824    /**
825     * Fold Status Half Folded With Second Half Folded.
826     *
827     * @syscap SystemCapability.Window.SessionManager
828     * @atomicservice
829     * @since 15
830     */
831    FOLD_STATUS_HALF_FOLDED_WITH_SECOND_HALF_FOLDED = 23
832  }
833
834  /**
835   * Enumerates the fold display mode.
836   *
837   * @enum { number }
838   * @syscap SystemCapability.Window.SessionManager
839   * @since 10
840   */
841  /**
842   * Enumerates the fold display mode.
843   *
844   * @enum { number }
845   * @syscap SystemCapability.Window.SessionManager
846   * @atomicservice
847   * @since 12
848   */
849  enum FoldDisplayMode {
850    /**
851     * Unknown Display.
852     *
853     * @syscap SystemCapability.Window.SessionManager
854     * @since 10
855     */
856    /**
857     * Unknown Display.
858     *
859     * @syscap SystemCapability.Window.SessionManager
860     * @atomicservice
861     * @since 12
862     */
863    FOLD_DISPLAY_MODE_UNKNOWN = 0,
864    /**
865     * Full Display.
866     *
867     * @syscap SystemCapability.Window.SessionManager
868     * @since 10
869     */
870    /**
871     * Full Display.
872     *
873     * @syscap SystemCapability.Window.SessionManager
874     * @atomicservice
875     * @since 12
876     */
877    FOLD_DISPLAY_MODE_FULL,
878    /**
879     * Main Display.
880     *
881     * @syscap SystemCapability.Window.SessionManager
882     * @since 10
883     */
884    /**
885     * Main Display.
886     *
887     * @syscap SystemCapability.Window.SessionManager
888     * @atomicservice
889     * @since 12
890     */
891    FOLD_DISPLAY_MODE_MAIN,
892    /**
893     * Sub Display.
894     *
895     * @syscap SystemCapability.Window.SessionManager
896     * @since 10
897     */
898    /**
899     * Sub Display.
900     *
901     * @syscap SystemCapability.Window.SessionManager
902     * @atomicservice
903     * @since 12
904     */
905    FOLD_DISPLAY_MODE_SUB,
906    /**
907     * Coordination Display.
908     *
909     * @syscap SystemCapability.Window.SessionManager
910     * @since 10
911     */
912    /**
913     * Coordination Display.
914     *
915     * @syscap SystemCapability.Window.SessionManager
916     * @atomicservice
917     * @since 12
918     */
919    FOLD_DISPLAY_MODE_COORDINATION
920  }
921
922  /**
923   * Enumerates the display states.
924   *
925   * @enum { number }
926   * @syscap SystemCapability.WindowManager.WindowManager.Core
927   * @since 7
928   */
929  /**
930   * Enumerates the display states.
931   *
932   * @enum { number }
933   * @syscap SystemCapability.WindowManager.WindowManager.Core
934   * @atomicservice
935   * @since 12
936   */
937  enum DisplayState {
938    /**
939     * Unknown.
940     *
941     * @syscap SystemCapability.WindowManager.WindowManager.Core
942     * @since 7
943     */
944    /**
945     * Unknown.
946     *
947     * @syscap SystemCapability.WindowManager.WindowManager.Core
948     * @atomicservice
949     * @since 12
950     */
951    STATE_UNKNOWN = 0,
952    /**
953     * Screen off.
954     *
955     * @syscap SystemCapability.WindowManager.WindowManager.Core
956     * @since 7
957     */
958    /**
959     * Screen off.
960     *
961     * @syscap SystemCapability.WindowManager.WindowManager.Core
962     * @atomicservice
963     * @since 12
964     */
965    STATE_OFF,
966    /**
967     * Screen on.
968     *
969     * @syscap SystemCapability.WindowManager.WindowManager.Core
970     * @since 7
971     */
972    /**
973     * Screen on.
974     *
975     * @syscap SystemCapability.WindowManager.WindowManager.Core
976     * @atomicservice
977     * @since 12
978     */
979    STATE_ON,
980    /**
981     * Doze, but it will update for some important system messages.
982     *
983     * @syscap SystemCapability.WindowManager.WindowManager.Core
984     * @since 7
985     */
986    /**
987     * Doze, but it will update for some important system messages.
988     *
989     * @syscap SystemCapability.WindowManager.WindowManager.Core
990     * @atomicservice
991     * @since 12
992     */
993    STATE_DOZE,
994    /**
995     * Doze and not update.
996     *
997     * @syscap SystemCapability.WindowManager.WindowManager.Core
998     * @since 7
999     */
1000    /**
1001     * Doze and not update.
1002     *
1003     * @syscap SystemCapability.WindowManager.WindowManager.Core
1004     * @atomicservice
1005     * @since 12
1006     */
1007    STATE_DOZE_SUSPEND,
1008    /**
1009     * VR node.
1010     *
1011     * @syscap SystemCapability.WindowManager.WindowManager.Core
1012     * @since 7
1013     */
1014    /**
1015     * VR node.
1016     *
1017     * @syscap SystemCapability.WindowManager.WindowManager.Core
1018     * @atomicservice
1019     * @since 12
1020     */
1021    STATE_VR,
1022    /**
1023     * Screen on and not update.
1024     *
1025     * @syscap SystemCapability.WindowManager.WindowManager.Core
1026     * @since 7
1027     */
1028    /**
1029     * Screen on and not update.
1030     *
1031     * @syscap SystemCapability.WindowManager.WindowManager.Core
1032     * @atomicservice
1033     * @since 12
1034     */
1035    STATE_ON_SUSPEND
1036  }
1037
1038  /**
1039   * Enumerates the display orientation.
1040   *
1041   * @enum { number }
1042   * @syscap SystemCapability.WindowManager.WindowManager.Core
1043   * @crossplatform
1044   * @since 10
1045   */
1046  /**
1047   * Enumerates the display orientation.
1048   *
1049   * @enum { number }
1050   * @syscap SystemCapability.WindowManager.WindowManager.Core
1051   * @crossplatform
1052   * @atomicservice
1053   * @since 12
1054   */
1055  enum Orientation {
1056    /**
1057     * Indicate that the display content is in portrait mode.
1058     *
1059     * @syscap SystemCapability.WindowManager.WindowManager.Core
1060     * @crossplatform
1061     * @since 10
1062     */
1063    /**
1064     * Indicate that the display content is in portrait mode.
1065     *
1066     * @syscap SystemCapability.WindowManager.WindowManager.Core
1067     * @crossplatform
1068     * @atomicservice
1069     * @since 12
1070     */
1071    PORTRAIT = 0,
1072
1073    /**
1074     * Indicate that the display content is in landscape mode.
1075     *
1076     * @syscap SystemCapability.WindowManager.WindowManager.Core
1077     * @crossplatform
1078     * @since 10
1079     */
1080    /**
1081     * Indicate that the display content is in landscape mode.
1082     *
1083     * @syscap SystemCapability.WindowManager.WindowManager.Core
1084     * @crossplatform
1085     * @atomicservice
1086     * @since 12
1087     */
1088    LANDSCAPE = 1,
1089
1090    /**
1091     * Indicate that the display content is in the opposite direction of the portrait mode.
1092     *
1093     * @syscap SystemCapability.WindowManager.WindowManager.Core
1094     * @crossplatform
1095     * @since 10
1096     */
1097    /**
1098     * Indicate that the display content is in the opposite direction of the portrait mode.
1099     *
1100     * @syscap SystemCapability.WindowManager.WindowManager.Core
1101     * @crossplatform
1102     * @atomicservice
1103     * @since 12
1104     */
1105    PORTRAIT_INVERTED = 2,
1106
1107    /**
1108     * Indicate that the display content is in the opposite direction of the landscape mode.
1109     *
1110     * @syscap SystemCapability.WindowManager.WindowManager.Core
1111     * @crossplatform
1112     * @since 10
1113     */
1114    /**
1115     * Indicate that the display content is in the opposite direction of the landscape mode.
1116     *
1117     * @syscap SystemCapability.WindowManager.WindowManager.Core
1118     * @crossplatform
1119     * @atomicservice
1120     * @since 12
1121     */
1122    LANDSCAPE_INVERTED = 3
1123  }
1124
1125  /**
1126   * Enumerates the screen shape.
1127   *
1128   * @enum { number }
1129   * @syscap SystemCapability.WindowManager.WindowManager.Core
1130   * @crossplatform
1131   * @since 18
1132   */
1133  enum ScreenShape {
1134    /**
1135     *The screen shape is rectangle.
1136     *
1137     * @syscap SystemCapability.WindowManager.WindowManager.Core
1138     * @crossplatform
1139     * @since 18
1140     */
1141    RECTANGLE = 0,
1142    /**
1143     *The screen shape is round.
1144     *
1145     * @syscap SystemCapability.WindowManager.WindowManager.Core
1146     * @crossplatform
1147     * @since 18
1148     */
1149    ROUND = 1
1150  }
1151
1152  /**
1153   * Fold Crease Region
1154   *
1155   * @interface FoldCreaseRegion
1156   * @syscap SystemCapability.Window.SessionManager
1157   * @since 10
1158   */
1159  /**
1160   * Fold Crease Region
1161   *
1162   * @interface FoldCreaseRegion
1163   * @syscap SystemCapability.Window.SessionManager
1164   * @atomicservice
1165   * @since 12
1166   */
1167  interface FoldCreaseRegion {
1168    /**
1169     * The display ID is used to identify the screen where the crease is located.
1170     *
1171     * @type { number }
1172     * @readonly
1173     * @syscap SystemCapability.Window.SessionManager
1174     * @since 10
1175     */
1176    /**
1177     * The display ID is used to identify the screen where the crease is located.
1178     *
1179     * @type { number }
1180     * @readonly
1181     * @syscap SystemCapability.Window.SessionManager
1182     * @atomicservice
1183     * @since 12
1184     */
1185    readonly displayId: number;
1186
1187    /**
1188     * Crease Region.
1189     *
1190     * @type { Array<Rect> }
1191     * @readonly
1192     * @syscap SystemCapability.Window.SessionManager
1193     * @since 10
1194     */
1195    /**
1196     * Crease Region.
1197     *
1198     * @type { Array<Rect> }
1199     * @readonly
1200     * @syscap SystemCapability.Window.SessionManager
1201     * @atomicservice
1202     * @since 12
1203     */
1204    readonly creaseRects: Array<Rect>;
1205  }
1206
1207  /**
1208   * Rectangle
1209   *
1210   * @interface Rect
1211   * @syscap SystemCapability.WindowManager.WindowManager.Core
1212   * @since 9
1213   */
1214  /**
1215   * Rectangle
1216   *
1217   * @interface Rect
1218   * @syscap SystemCapability.WindowManager.WindowManager.Core
1219   * @atomicservice
1220   * @since 12
1221   */
1222  interface Rect {
1223    /**
1224     * The X-axis coordinate of the upper left vertex of the rectangle, in pixels.
1225     *
1226     * @type { number }
1227     * @syscap SystemCapability.WindowManager.WindowManager.Core
1228     * @since 9
1229     */
1230    /**
1231     * The X-axis coordinate of the upper left vertex of the rectangle, in pixels.
1232     *
1233     * @type { number }
1234     * @syscap SystemCapability.WindowManager.WindowManager.Core
1235     * @atomicservice
1236     * @since 12
1237     */
1238    left: number;
1239
1240    /**
1241     * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels.
1242     *
1243     * @type { number }
1244     * @syscap SystemCapability.WindowManager.WindowManager.Core
1245     * @since 9
1246     */
1247    /**
1248     * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels.
1249     *
1250     * @type { number }
1251     * @syscap SystemCapability.WindowManager.WindowManager.Core
1252     * @atomicservice
1253     * @since 12
1254     */
1255    top: number;
1256
1257    /**
1258     * Width of the rectangle, in pixels.
1259     *
1260     * @type { number }
1261     * @syscap SystemCapability.WindowManager.WindowManager.Core
1262     * @since 9
1263     */
1264    /**
1265     * Width of the rectangle, in pixels.
1266     *
1267     * @type { number }
1268     * @syscap SystemCapability.WindowManager.WindowManager.Core
1269     * @atomicservice
1270     * @since 12
1271     */
1272    width: number;
1273
1274    /**
1275     * Height of the rectangle, in pixels.
1276     *
1277     * @type { number }
1278     * @syscap SystemCapability.WindowManager.WindowManager.Core
1279     * @since 9
1280     */
1281    /**
1282     * Height of the rectangle, in pixels.
1283     *
1284     * @type { number }
1285     * @syscap SystemCapability.WindowManager.WindowManager.Core
1286     * @atomicservice
1287     * @since 12
1288     */
1289    height: number;
1290  }
1291
1292  /**
1293   * Curved area rects of the waterfall display.
1294   *
1295   * @interface WaterfallDisplayAreaRects
1296   * @syscap SystemCapability.WindowManager.WindowManager.Core
1297   * @since 9
1298   */
1299  /**
1300   * Curved area rects of the waterfall display.
1301   *
1302   * @interface WaterfallDisplayAreaRects
1303   * @syscap SystemCapability.WindowManager.WindowManager.Core
1304   * @atomicservice
1305   * @since 12
1306   */
1307  interface WaterfallDisplayAreaRects {
1308    /**
1309     * Indicates the size of left side curved area of the waterfall screen.
1310     *
1311     * @type { Rect }
1312     * @readonly
1313     * @syscap SystemCapability.WindowManager.WindowManager.Core
1314     * @since 9
1315     */
1316    /**
1317     * Indicates the size of left side curved area of the waterfall screen.
1318     *
1319     * @type { Rect }
1320     * @readonly
1321     * @syscap SystemCapability.WindowManager.WindowManager.Core
1322     * @atomicservice
1323     * @since 12
1324     */
1325    readonly left: Rect;
1326
1327    /**
1328     * Indicates the size of right side curved area of the waterfall screen.
1329     *
1330     * @type { Rect }
1331     * @readonly
1332     * @syscap SystemCapability.WindowManager.WindowManager.Core
1333     * @since 9
1334     */
1335    /**
1336     * Indicates the size of right side curved area of the waterfall screen.
1337     *
1338     * @type { Rect }
1339     * @readonly
1340     * @syscap SystemCapability.WindowManager.WindowManager.Core
1341     * @atomicservice
1342     * @since 12
1343     */
1344    readonly right: Rect;
1345
1346    /**
1347     * Indicates the size of top side curved area of the waterfall screen.
1348     *
1349     * @type { Rect }
1350     * @readonly
1351     * @syscap SystemCapability.WindowManager.WindowManager.Core
1352     * @since 9
1353     */
1354    /**
1355     * Indicates the size of top side curved area of the waterfall screen.
1356     *
1357     * @type { Rect }
1358     * @readonly
1359     * @syscap SystemCapability.WindowManager.WindowManager.Core
1360     * @atomicservice
1361     * @since 12
1362     */
1363    readonly top: Rect;
1364
1365    /**
1366     * Indicates the size of bottom side curved area of the waterfall screen.
1367     *
1368     * @type { Rect }
1369     * @readonly
1370     * @syscap SystemCapability.WindowManager.WindowManager.Core
1371     * @since 9
1372     */
1373    /**
1374     * Indicates the size of bottom side curved area of the waterfall screen.
1375     *
1376     * @type { Rect }
1377     * @readonly
1378     * @syscap SystemCapability.WindowManager.WindowManager.Core
1379     * @atomicservice
1380     * @since 12
1381     */
1382    readonly bottom: Rect;
1383  }
1384
1385  /**
1386   * Cutout information of the display.
1387   *
1388   * @interface CutoutInfo
1389   * @syscap SystemCapability.WindowManager.WindowManager.Core
1390   * @since 9
1391   */
1392  /**
1393   * Cutout information of the display.
1394   *
1395   * @interface CutoutInfo
1396   * @syscap SystemCapability.WindowManager.WindowManager.Core
1397   * @atomicservice
1398   * @since 12
1399   */
1400  interface CutoutInfo {
1401    /**
1402     * Bounding rectangles of the cutout areas of the display.
1403     *
1404     * @type { Array<Rect> }
1405     * @readonly
1406     * @syscap SystemCapability.WindowManager.WindowManager.Core
1407     * @since 9
1408     */
1409    /**
1410     * Bounding rectangles of the cutout areas of the display.
1411     *
1412     * @type { Array<Rect> }
1413     * @readonly
1414     * @syscap SystemCapability.WindowManager.WindowManager.Core
1415     * @atomicservice
1416     * @since 12
1417     */
1418    readonly boundingRects: Array<Rect>;
1419
1420    /**
1421     * Rectangles of curved parts on each side of a waterfall display.
1422     *
1423     * @type { WaterfallDisplayAreaRects }
1424     * @readonly
1425     * @syscap SystemCapability.WindowManager.WindowManager.Core
1426     * @since 9
1427     */
1428    /**
1429     * Rectangles of curved parts on each side of a waterfall display.
1430     *
1431     * @type { WaterfallDisplayAreaRects }
1432     * @readonly
1433     * @syscap SystemCapability.WindowManager.WindowManager.Core
1434     * @atomicservice
1435     * @since 12
1436     */
1437    readonly waterfallDisplayAreaRects: WaterfallDisplayAreaRects;
1438  }
1439
1440  /**
1441   * Define display physical resolution.
1442   *
1443   * @interface DisplayPhysicalResolution
1444   * @syscap SystemCapability.WindowManager.WindowManager.Core
1445   * @crossplatform
1446   * @atomicservice
1447   * @since 12
1448   */
1449  interface DisplayPhysicalResolution {
1450    /**
1451     * fold display mode.
1452     *
1453     * @type { FoldDisplayMode }
1454     * @syscap SystemCapability.WindowManager.WindowManager.Core
1455     * @atomicservice
1456     * @since 12
1457     */
1458    foldDisplayMode: FoldDisplayMode;
1459
1460    /**
1461     * Display physical width, in pixels.
1462     *
1463     * @type { number }
1464     * @syscap SystemCapability.WindowManager.WindowManager.Core
1465     * @crossplatform
1466     * @atomicservice
1467     * @since 12
1468     */
1469    physicalWidth: number;
1470
1471    /**
1472     * Display physical height, in pixels.
1473     *
1474     * @type { number }
1475     * @syscap SystemCapability.WindowManager.WindowManager.Core
1476     * @crossplatform
1477     * @atomicservice
1478     * @since 12
1479     */
1480    physicalHeight: number;
1481  }
1482
1483  /**
1484   * Define properties of the display. They cannot be updated automatically.
1485   *
1486   * @interface Display
1487   * @syscap SystemCapability.WindowManager.WindowManager.Core
1488   * @since 7
1489   */
1490  /**
1491   * Define properties of the display. They cannot be updated automatically.
1492   *
1493   * @interface Display
1494   * @syscap SystemCapability.WindowManager.WindowManager.Core
1495   * @crossplatform
1496   * @since 10
1497   */
1498  /**
1499   * Define properties of the display. They cannot be updated automatically.
1500   *
1501   * @interface Display
1502   * @syscap SystemCapability.WindowManager.WindowManager.Core
1503   * @crossplatform
1504   * @atomicservice
1505   * @since 11
1506   */
1507  interface Display {
1508    /**
1509     * Display ID.
1510     *
1511     * @type { number }
1512     * @syscap SystemCapability.WindowManager.WindowManager.Core
1513     * @since 7
1514     */
1515    /**
1516     * Display ID.
1517     *
1518     * @type { number }
1519     * @syscap SystemCapability.WindowManager.WindowManager.Core
1520     * @crossplatform
1521     * @since 10
1522     */
1523    /**
1524     * Display ID.
1525     *
1526     * @type { number }
1527     * @syscap SystemCapability.WindowManager.WindowManager.Core
1528     * @crossplatform
1529     * @atomicservice
1530     * @since 12
1531     */
1532    id: number;
1533
1534    /**
1535     * Display name.
1536     *
1537     * @type { string }
1538     * @syscap SystemCapability.WindowManager.WindowManager.Core
1539     * @since 7
1540     */
1541    /**
1542     * Display name.
1543     *
1544     * @type { string }
1545     * @syscap SystemCapability.WindowManager.WindowManager.Core
1546     * @atomicservice
1547     * @since 12
1548     */
1549    name: string;
1550
1551    /**
1552     * The display is alive.
1553     *
1554     * @type { boolean }
1555     * @syscap SystemCapability.WindowManager.WindowManager.Core
1556     * @since 7
1557     */
1558    /**
1559     * The display is alive.
1560     *
1561     * @type { boolean }
1562     * @syscap SystemCapability.WindowManager.WindowManager.Core
1563     * @atomicservice
1564     * @since 12
1565     */
1566    alive: boolean;
1567
1568    /**
1569     * The state of display.
1570     *
1571     * @type { DisplayState }
1572     * @syscap SystemCapability.WindowManager.WindowManager.Core
1573     * @since 7
1574     */
1575    /**
1576     * The state of display.
1577     *
1578     * @type { DisplayState }
1579     * @syscap SystemCapability.WindowManager.WindowManager.Core
1580     * @atomicservice
1581     * @since 12
1582     */
1583    state: DisplayState;
1584
1585    /**
1586     * Refresh rate, in Hz.
1587     *
1588     * @type { number }
1589     * @syscap SystemCapability.WindowManager.WindowManager.Core
1590     * @since 7
1591     */
1592    /**
1593     * Refresh rate, in Hz.
1594     *
1595     * @type { number }
1596     * @syscap SystemCapability.WindowManager.WindowManager.Core
1597     * @atomicservice
1598     * @since 12
1599     */
1600    refreshRate: number;
1601
1602    /**
1603     * Rotation degrees of the display.
1604     *
1605     * @type { number }
1606     * @syscap SystemCapability.WindowManager.WindowManager.Core
1607     * @since 7
1608     */
1609    /**
1610     * An enumeration value for rotation degrees of the display.
1611     * The value 0 indicates that the screen of the display rotates clockwise by 0°.
1612     * The value 1 indicates that the screen of the display rotates clockwise by 90°.
1613     * The value 2 indicates that the screen of the display rotates clockwise by 180°.
1614     * The value 3 indicates that the screen of the display rotates clockwise by 270°.
1615     *
1616     * @type { number }
1617     * @syscap SystemCapability.WindowManager.WindowManager.Core
1618     * @atomicservice
1619     * @since 11
1620     */
1621    rotation: number;
1622
1623    /**
1624     * Display width, in pixels.
1625     *
1626     * @type { number }
1627     * @syscap SystemCapability.WindowManager.WindowManager.Core
1628     * @since 7
1629     */
1630    /**
1631     * Display width, in pixels.
1632     *
1633     * @type { number }
1634     * @syscap SystemCapability.WindowManager.WindowManager.Core
1635     * @crossplatform
1636     * @since 10
1637     */
1638    /**
1639     * Display width, in pixels.
1640     *
1641     * @type { number }
1642     * @syscap SystemCapability.WindowManager.WindowManager.Core
1643     * @crossplatform
1644     * @atomicservice
1645     * @since 11
1646     */
1647    width: number;
1648
1649    /**
1650     * Display height, in pixels.
1651     *
1652     * @type { number }
1653     * @syscap SystemCapability.WindowManager.WindowManager.Core
1654     * @since 7
1655     */
1656    /**
1657     * Display height, in pixels.
1658     *
1659     * @type { number }
1660     * @syscap SystemCapability.WindowManager.WindowManager.Core
1661     * @crossplatform
1662     * @since 10
1663     */
1664    /**
1665     * Display height, in pixels.
1666     *
1667     * @type { number }
1668     * @syscap SystemCapability.WindowManager.WindowManager.Core
1669     * @crossplatform
1670     * @atomicservice
1671     * @since 11
1672     */
1673    height: number;
1674
1675    /**
1676     * Display available width, in pixels.
1677     *
1678     * @type { number }
1679     * @syscap SystemCapability.WindowManager.WindowManager.Core
1680     * @crossplatform
1681     * @atomicservice
1682     * @since 12
1683     */
1684    availableWidth: number;
1685
1686    /**
1687     * Display available height, in pixels.
1688     *
1689     * @type { number }
1690     * @syscap SystemCapability.WindowManager.WindowManager.Core
1691     * @crossplatform
1692     * @atomicservice
1693     * @since 12
1694     */
1695    availableHeight: number;
1696
1697    /**
1698     * Display resolution.
1699     *
1700     * @type { number }
1701     * @syscap SystemCapability.WindowManager.WindowManager.Core
1702     * @since 7
1703     */
1704    /**
1705     * Display resolution.
1706     *
1707     * @type { number }
1708     * @syscap SystemCapability.WindowManager.WindowManager.Core
1709     * @crossplatform
1710     * @since 11
1711     */
1712    /**
1713     * Display resolution.
1714     *
1715     * @type { number }
1716     * @syscap SystemCapability.WindowManager.WindowManager.Core
1717     * @crossplatform
1718     * @atomicservice
1719     * @since 12
1720     */
1721    densityDPI: number;
1722
1723    /**
1724     * Display orientation.
1725     *
1726     * @type { Orientation }
1727     * @syscap SystemCapability.WindowManager.WindowManager.Core
1728     * @crossplatform
1729     * @since 10
1730     */
1731    /**
1732     * Display orientation.
1733     *
1734     * @type { Orientation }
1735     * @syscap SystemCapability.WindowManager.WindowManager.Core
1736     * @crossplatform
1737     * @atomicservice
1738     * @since 12
1739     */
1740    orientation: Orientation;
1741
1742    /**
1743     * Display density, in pixels. The value for a low-resolution display is 1.0.
1744     *
1745     * @type { number }
1746     * @syscap SystemCapability.WindowManager.WindowManager.Core
1747     * @since 7
1748     */
1749    /**
1750     * Display density, in pixels. The value for a low-resolution display is 1.0.
1751     *
1752     * @type { number }
1753     * @syscap SystemCapability.WindowManager.WindowManager.Core
1754     * @crossplatform
1755     * @atomicservice
1756     * @since 11
1757     */
1758    densityPixels: number;
1759
1760    /**
1761     * Text scale density of the display.
1762     *
1763     * @type { number }
1764     * @syscap SystemCapability.WindowManager.WindowManager.Core
1765     * @since 7
1766     */
1767    /**
1768     * Text scale density of the display.
1769     *
1770     * @type { number }
1771     * @syscap SystemCapability.WindowManager.WindowManager.Core
1772     * @crossplatform
1773     * @since 11
1774     */
1775    /**
1776     * Text scale density of the display.
1777     *
1778     * @type { number }
1779     * @syscap SystemCapability.WindowManager.WindowManager.Core
1780     * @crossplatform
1781     * @atomicservice
1782     * @since 12
1783     */
1784    scaledDensity: number;
1785
1786    /**
1787     * DPI on the x-axis.
1788     *
1789     * @type { number }
1790     * @syscap SystemCapability.WindowManager.WindowManager.Core
1791     * @since 7
1792     */
1793    /**
1794     * DPI on the x-axis.
1795     *
1796     * @type { number }
1797     * @syscap SystemCapability.WindowManager.WindowManager.Core
1798     * @atomicservice
1799     * @since 12
1800     */
1801    xDPI: number;
1802
1803    /**
1804     * DPI on the y-axis.
1805     *
1806     * @type { number }
1807     * @syscap SystemCapability.WindowManager.WindowManager.Core
1808     * @since 7
1809     */
1810    /**
1811     * DPI on the y-axis.
1812     *
1813     * @type { number }
1814     * @syscap SystemCapability.WindowManager.WindowManager.Core
1815     * @atomicservice
1816     * @since 12
1817     */
1818    yDPI: number;
1819
1820    /**
1821     * The shape of screen
1822     *
1823     * @type { ?ScreenShape }
1824     * @syscap SystemCapability.WindowManager.WindowManager.Core
1825     * @atomicservice
1826     * @since 18
1827     */
1828    screenShape?: ScreenShape;
1829
1830    /**
1831     * All supported color spaces.
1832     *
1833     * @type { Array<colorSpaceManager.ColorSpace> }
1834     * @syscap SystemCapability.WindowManager.WindowManager.Core
1835     * @since 11
1836     */
1837    /**
1838     * All supported color spaces.
1839     *
1840     * @type { Array<colorSpaceManager.ColorSpace> }
1841     * @syscap SystemCapability.WindowManager.WindowManager.Core
1842     * @atomicservice
1843     * @since 12
1844     */
1845    colorSpaces: Array<colorSpaceManager.ColorSpace>;
1846
1847    /**
1848     * All supported HDR formats.
1849     *
1850     * @type { Array<hdrCapability.HDRFormat> }
1851     * @syscap SystemCapability.WindowManager.WindowManager.Core
1852     * @since 11
1853     */
1854    /**
1855     * All supported HDR formats.
1856     *
1857     * @type { Array<hdrCapability.HDRFormat> }
1858     * @syscap SystemCapability.WindowManager.WindowManager.Core
1859     * @atomicservice
1860     * @since 12
1861     */
1862    hdrFormats: Array<hdrCapability.HDRFormat>;
1863
1864    /**
1865     * Obtain the cutout info of the display.
1866     *
1867     * @param { AsyncCallback<CutoutInfo> } callback
1868     * @throws { BusinessError } 1400001 - Invalid display or screen.
1869     * @syscap SystemCapability.WindowManager.WindowManager.Core
1870     * @since 9
1871     */
1872    /**
1873     * Obtain the cutout info of the display.
1874     *
1875     * @param { AsyncCallback<CutoutInfo> } callback
1876     * @throws { BusinessError } 1400001 - Invalid display or screen.
1877     * @syscap SystemCapability.WindowManager.WindowManager.Core
1878     * @atomicservice
1879     * @since 12
1880     */
1881    getCutoutInfo(callback: AsyncCallback<CutoutInfo>): void;
1882
1883    /**
1884     * Obtain the cutout info of the display.
1885     *
1886     * @returns { Promise<CutoutInfo> }
1887     * @throws { BusinessError } 1400001 - Invalid display or screen.
1888     * @syscap SystemCapability.WindowManager.WindowManager.Core
1889     * @since 9
1890     */
1891    /**
1892     * Obtain the cutout info of the display.
1893     *
1894     * @returns { Promise<CutoutInfo> }
1895     * @throws { BusinessError } 1400001 - Invalid display or screen.
1896     * @syscap SystemCapability.WindowManager.WindowManager.Core
1897     * @atomicservice
1898     * @since 12
1899     */
1900    getCutoutInfo(): Promise<CutoutInfo>;
1901
1902    /**
1903     * Check if current display has immersive window.
1904     *
1905     * @param { AsyncCallback<boolean> } callback
1906     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1907     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1908     * @throws { BusinessError } 1400001 - Invalid display or screen.
1909     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1910     * @syscap SystemCapability.Window.SessionManager
1911     * @systemapi Hide this for inner system use.
1912     * @since 11
1913     */
1914    hasImmersiveWindow(callback: AsyncCallback<boolean>): void;
1915
1916    /**
1917     * Check if current display has immersive window.
1918     *
1919     * @returns { Promise<boolean> }
1920     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1921     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1922     * @throws { BusinessError } 1400001 - Invalid display or screen.
1923     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1924     * @syscap SystemCapability.Window.SessionManager
1925     * @systemapi Hide this for inner system use.
1926     * @since 11
1927     */
1928    hasImmersiveWindow(): Promise<boolean>;
1929
1930    /**
1931     * Obtain the available area of the display.
1932     *
1933     * @returns { Promise<Rect> }
1934     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1935     * @throws { BusinessError } 1400001 - Invalid display or screen.
1936     * @syscap SystemCapability.Window.SessionManager
1937     * @atomicservice
1938     * @since 12
1939     */
1940    getAvailableArea(): Promise<Rect>;
1941
1942    /**
1943    * Register the callback for available area changes.
1944    *
1945    * @param { 'availableAreaChange' } type - the event of available area changes
1946    * @param { Callback<Rect> } callback - Callback used to return the available area
1947    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1948    * <br>2. Incorrect parameter types.
1949    * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1950    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1951    * @syscap SystemCapability.Window.SessionManager
1952    * @atomicservice
1953    * @since 12
1954    */
1955    on(type: 'availableAreaChange', callback: Callback<Rect>): void;
1956
1957    /**
1958    * Unregister the callback for available area changes.
1959    *
1960    * @param { 'availableAreaChange' } type - the event of available area changes
1961    * @param { Callback<Rect> } [callback] - Callback used to return the available area
1962    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1963    * <br>2. Incorrect parameter types.
1964    * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
1965    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1966    * @syscap SystemCapability.Window.SessionManager
1967    * @atomicservice
1968    * @since 12
1969    */
1970    off(type: 'availableAreaChange', callback?: Callback<Rect>): void;
1971
1972    /**
1973    * Get current display capability, including foldstatus, displaymode, rotation, and orientation information.
1974    *
1975    * @returns { string } Indicates the current foldstatus, displaymode, rotation, and orientation information.
1976    * @throws { BusinessError } 801 - Capability not supported.Function getDisplayCapability can not work correctly due to limited device capabilities.
1977    * @throws { BusinessError } 1400001 - Invalid display or screen.
1978    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
1979    * @syscap SystemCapability.Window.SessionManager
1980    * @atomicservice
1981    * @since 18
1982    * @test
1983    */
1984    getDisplayCapability(): string;
1985  }
1986}
1987
1988export default display;
1989