• 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 arkts {'1.1':'11', '1.2':'20'}
48 * @arkts 1.1&1.2
49 */
50declare namespace display {
51  /**
52   * Obtain the default display.
53   *
54   * @param { AsyncCallback<Display> } callback the result of display
55   * @syscap SystemCapability.WindowManager.WindowManager.Core
56   * @since 7
57   * @deprecated since 9
58   * @useinstead ohos.display#getDefaultDisplaySync
59   */
60  function getDefaultDisplay(callback: AsyncCallback<Display>): void;
61
62  /**
63   * Obtain the default display.
64   *
65   * @returns { Promise<Display> } the result of display
66   * @syscap SystemCapability.WindowManager.WindowManager.Core
67   * @since 7
68   * @deprecated since 9
69   * @useinstead ohos.display#getDefaultDisplaySync
70   */
71  function getDefaultDisplay(): Promise<Display>;
72
73  /**
74   * Obtain the default display.
75   *
76   * @returns { Display } the result of display
77   * @throws { BusinessError } 1400001 - Invalid display or screen.
78   * @syscap SystemCapability.WindowManager.WindowManager.Core
79   * @since 9
80   */
81  /**
82   * Obtain the default display.
83   *
84   * @returns { Display } the result of display
85   * @throws { BusinessError } 1400001 - Invalid display or screen.
86   * @syscap SystemCapability.WindowManager.WindowManager.Core
87   * @crossplatform
88   * @since 10
89   */
90  /**
91   * Obtain the default display.
92   *
93   * @returns { Display } the result of display
94   * @throws { BusinessError } 1400001 - Invalid display or screen.
95   * @syscap SystemCapability.WindowManager.WindowManager.Core
96   * @crossplatform
97   * @atomicservice
98   * @since arkts {'1.1':'11', '1.2':'20'}
99   * @arkts 1.1&1.2
100   */
101  function getDefaultDisplaySync(): Display;
102
103  /**
104   * Obtain the primary display. For devices other than 2in1 devices, the Display object obtained is the built-in screen.
105   * For 2in1 devices with an external screen, the Display object obtained is the primary screen. For 2in1 devices without an external screen, the Display object obtained is the built-in screen.
106   *
107   * @returns { Display } the result of primary display
108   * @throws { BusinessError } 1400001 - Invalid display or screen.
109   * @syscap SystemCapability.WindowManager.WindowManager.Core
110   * @crossplatform
111   * @atomicservice
112   * @since 14
113   */
114  function getPrimaryDisplaySync(): Display;
115
116  /**
117   * Obtain the target display.
118   *
119   * @param { number } displayId Display id to query. This parameter should be greater than or equal to 0.
120   * @returns { Display } the result of display
121   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
122   *                                                                   2. Incorrect parameter types.
123   *                                                                   3. Parameter verification failed.
124   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
125   * @syscap SystemCapability.WindowManager.WindowManager.Core
126   * @atomicservice
127   * @since arkts {'1.1':'12', '1.2':'20'}
128   * @arkts 1.1&1.2
129   */
130  function getDisplayByIdSync(displayId: number): Display;
131
132  /**
133   * Obtain all displays.
134   *
135   * @param { AsyncCallback<Array<Display>> } callback the result of all displays
136   * @syscap SystemCapability.WindowManager.WindowManager.Core
137   * @since 7
138   * @deprecated since 9
139   * @useinstead ohos.display#getAllDisplays
140   */
141  function getAllDisplay(callback: AsyncCallback<Array<Display>>): void;
142
143  /**
144   * Obtain all displays.
145   *
146   * @returns { Promise<Array<Display>> } the result of all displays
147   * @syscap SystemCapability.WindowManager.WindowManager.Core
148   * @since 7
149   * @deprecated since 9
150   * @useinstead ohos.display#getAllDisplays
151   */
152  function getAllDisplay(): Promise<Array<Display>>;
153
154  /**
155   * Obtain all displays.
156   *
157   * @param { AsyncCallback<Array<Display>> } callback the result of all displays
158   * @throws { BusinessError } 1400001 - Invalid display or screen.
159   * @syscap SystemCapability.WindowManager.WindowManager.Core
160   * @since 9
161   */
162  /**
163   * Obtain all displays.
164   *
165   * @param { AsyncCallback<Array<Display>> } callback the result of all displays
166   * @throws { BusinessError } 1400001 - Invalid display or screen.
167   * @syscap SystemCapability.WindowManager.WindowManager.Core
168   * @atomicservice
169   * @since arkts {'1.1':'12', '1.2':'20'}
170   * @arkts 1.1&1.2
171   */
172  function getAllDisplays(callback: AsyncCallback<Array<Display>>): void;
173
174  /**
175   * Obtain all displays.
176   *
177   * @returns { Promise<Array<Display>> } the result of all displays
178   * @throws { BusinessError } 1400001 - Invalid display or screen.
179   * @syscap SystemCapability.WindowManager.WindowManager.Core
180   * @since 9
181   */
182  /**
183   * Obtain all displays.
184   *
185   * @returns { Promise<Array<Display>> } the result of all displays
186   * @throws { BusinessError } 1400001 - Invalid display or screen.
187   * @syscap SystemCapability.WindowManager.WindowManager.Core
188   * @atomicservice
189   * @since arkts {'1.1':'12', '1.2':'20'}
190   * @arkts 1.1&1.2
191   */
192  function getAllDisplays(): Promise<Array<Display>>;
193
194  /**
195   * Obtain all display physical resolution
196   *
197   * @returns { Promise<Array<DisplayPhysicalResolution>> } the result of all display physical resolution
198   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
199   * @syscap SystemCapability.WindowManager.WindowManager.Core
200   * @atomicservice
201   * @since arkts {'1.1':'12', '1.2':'20'}
202   * @arkts 1.1&1.2
203   */
204  function getAllDisplayPhysicalResolution(): Promise<Array<DisplayPhysicalResolution>>;
205
206  /**
207   * Check whether there is a privacy window on the current display.
208   *
209   * @param { number } displayId Display id to query. This parameter should be greater than or equal to 0.
210   * @returns { boolean } true means there is a privacy window on the current display
211   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
212   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
213   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
214   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
215   * @syscap SystemCapability.WindowManager.WindowManager.Core
216   * @systemapi Hide this for inner system use.
217   * @since arkts {'1.1':'9', '1.2':'20'}
218   * @arkts 1.1&1.2
219   */
220  function hasPrivateWindow(displayId: number): boolean;
221
222  /**
223   * Register the callback for display changes.
224   *
225   * @param { 'add' | 'remove' | 'change' } type the event of display change
226   * @param { Callback<number> } callback the display id of changed
227   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
228   * <br>2. Incorrect parameter types.
229   * @syscap SystemCapability.WindowManager.WindowManager.Core
230   * @since 7
231   */
232  /**
233   * Register the callback for display changes.
234   *
235   * @param { 'add' | 'remove' | 'change' } type the event of display change
236   * @param { Callback<number> } callback the display id of changed
237   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
238   * <br>2. Incorrect parameter types.
239   * @syscap SystemCapability.WindowManager.WindowManager.Core
240   * @atomicservice
241   * @since 12
242   */
243  /**
244   * Register the callback for display changes.
245   *
246   * @param { 'add' | 'remove' | 'change' } type the event of display change
247   * @param { Callback<number> } callback the display id of changed
248   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
249   * <br>2. Incorrect parameter types.
250   * @syscap SystemCapability.WindowManager.WindowManager.Core
251   * @crossplatform
252   * @atomicservice
253   * @since 20
254   * @arkts 1.1&1.2
255   */
256  function on(type: 'add' | 'remove' | 'change', callback: Callback<number>): void;
257
258  /**
259   * Unregister the callback for display changes.
260   *
261   * @param { 'add' | 'remove' | 'change' } type the event of display change event
262   * @param { Callback<number> } callback the display id of changed
263   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
264   * <br>2. Incorrect parameter types.
265   * @syscap SystemCapability.WindowManager.WindowManager.Core
266   * @since 7
267   */
268  /**
269   * Unregister the callback for display changes.
270   *
271   * @param { 'add' | 'remove' | 'change' } type the event of display change event
272   * @param { Callback<number> } callback the display id of changed
273   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
274   * <br>2. Incorrect parameter types.
275   * @syscap SystemCapability.WindowManager.WindowManager.Core
276   * @atomicservice
277   * @since 12
278   */
279  /**
280   * Unregister the callback for display changes.
281   *
282   * @param { 'add' | 'remove' | 'change' } type the event of display change event
283   * @param { Callback<number> } [callback] the display id of changed
284   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
285   * <br>2. Incorrect parameter types.
286   * @syscap SystemCapability.WindowManager.WindowManager.Core
287   * @crossplatform
288   * @atomicservice
289   * @since 20
290   * @arkts 1.1&1.2
291   */
292  function off(type: 'add' | 'remove' | 'change', callback?: Callback<number>): void;
293
294  /**
295   * Register the callback for private mode changes.
296   *
297   * @param { 'privateModeChange' } type the event of private mode changes
298   * @param { Callback<boolean> } callback Callback used to return the result whether display is on private mode or not
299   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
300   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
301   * <br>2. Incorrect parameter types.
302   * @syscap SystemCapability.WindowManager.WindowManager.Core
303   * @systemapi Hide this for inner system use.
304   * @since arkts {'1.1':'10', '1.2':'20'}
305   * @arkts 1.1&1.2
306   */
307  function on(type: 'privateModeChange', callback: Callback<boolean>): void;
308
309  /**
310   * Unregister the callback for private mode changes.
311   *
312   * @param { 'privateModeChange' } type the event of private mode changes
313   * @param { Callback<boolean> } callback Callback used to return the result whether display is on private mode or not
314   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
315   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
316   * <br>2. Incorrect parameter types.
317   * @syscap SystemCapability.WindowManager.WindowManager.Core
318   * @systemapi Hide this for inner system use.
319   * @since arkts {'1.1':'10', '1.2':'20'}
320   * @arkts 1.1&1.2
321   */
322  function off(type: 'privateModeChange', callback?: Callback<boolean>): void;
323
324  /**
325   * Check whether the device is foldable.
326   *
327   * @returns { boolean } true means the device is foldable.
328   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
329   * @syscap SystemCapability.Window.SessionManager
330   * @since 10
331   */
332  /**
333   * Check whether the device is foldable.
334   *
335   * @returns { boolean } true means the device is foldable.
336   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
337   * @syscap SystemCapability.Window.SessionManager
338   * @atomicservice
339   * @since 12
340   */
341  /**
342   * Check whether the device is foldable.
343   *
344   * @returns { boolean } true means the device is foldable.
345   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
346   * @syscap SystemCapability.Window.SessionManager
347   * @crossplatform
348   * @atomicservice
349   * @since 20
350   * @arkts 1.1&1.2
351   */
352  function isFoldable(): boolean;
353
354  /**
355   * Get the current fold status of the foldable device.
356   *
357   * @returns { FoldStatus } fold status of device.
358   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
359   * @syscap SystemCapability.Window.SessionManager
360   * @since 10
361   */
362  /**
363   * Get the current fold status of the foldable device.
364   *
365   * @returns { FoldStatus } fold status of device.
366   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
367   * @syscap SystemCapability.Window.SessionManager
368   * @atomicservice
369   * @since 12
370   */
371  /**
372   * Get the current fold status of the foldable device.
373   *
374   * @returns { FoldStatus } fold status of device.
375   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
376   * @syscap SystemCapability.Window.SessionManager
377   * @crossplatform
378   * @atomicservice
379   * @since 20
380   * @arkts 1.1&1.2
381   */
382  function getFoldStatus(): FoldStatus;
383
384  /**
385   * Register the callback for fold status changes.
386   *
387   * @param { 'foldStatusChange' } type the event of fold status changes
388   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
389   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
390   * <br>2. Incorrect parameter types.
391   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
392   * @syscap SystemCapability.Window.SessionManager
393   * @since 10
394   */
395  /**
396   * Register the callback for fold status changes.
397   *
398   * @param { 'foldStatusChange' } type the event of fold status changes
399   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
400   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
401   * <br>2. Incorrect parameter types.
402   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
403   * @syscap SystemCapability.Window.SessionManager
404   * @atomicservice
405   * @since 12
406   */
407  /**
408   * Register the callback for fold status changes.
409   *
410   * @param { 'foldStatusChange' } type the event of fold status changes
411   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
412   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
413   * <br>2. Incorrect parameter types.
414   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
415   * @syscap SystemCapability.Window.SessionManager
416   * @crossplatform
417   * @atomicservice
418   * @since 20
419   * @arkts 1.1&1.2
420   */
421  function on(type: 'foldStatusChange', callback: Callback<FoldStatus>): void;
422
423  /**
424   * Unregister the callback for fold status changes.
425   *
426   * @param { 'foldStatusChange' } type the event of fold status changes
427   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
428   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
429   * <br>2. Incorrect parameter types.
430   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
431   * @syscap SystemCapability.Window.SessionManager
432   * @since 10
433   */
434  /**
435   * Unregister the callback for fold status changes.
436   *
437   * @param { 'foldStatusChange' } type the event of fold status changes
438   * @param { Callback<FoldStatus> } callback Callback used to return the current fold status of device
439   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
440   * <br>2. Incorrect parameter types.
441   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
442   * @syscap SystemCapability.Window.SessionManager
443   * @atomicservice
444   * @since 12
445   */
446  /**
447   * Unregister the callback for fold status changes.
448   *
449   * @param { 'foldStatusChange' } type the event of fold status changes
450   * @param { Callback<FoldStatus> } [callback] Callback used to return the current fold status of device
451   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
452   * <br>2. Incorrect parameter types.
453   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
454   * @syscap SystemCapability.Window.SessionManager
455   * @crossplatform
456   * @atomicservice
457   * @since 20
458   * @arkts 1.1&1.2
459   */
460  function off(type: 'foldStatusChange', callback?: Callback<FoldStatus>): void;
461
462  /**
463   * Register the callback for fold angle changes.
464   *
465   * @param { 'foldAngleChange' } type the event of fold angle changes.
466   * @param { Callback<Array<number>> } callback Callback used to return the current fold angle of device.
467   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
468   *     2. Incorrect parameter types.
469   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
470   * @syscap SystemCapability.Window.SessionManager
471   * @atomicservice
472   * @since 12
473   */
474  /**
475   * Register the callback for fold angle changes.
476   *
477   * @param { 'foldAngleChange' } type the event of fold angle changes.
478   * @param { Callback<Array<number>> } callback Callback used to return the current fold angle of device.
479   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
480   *     2. Incorrect parameter types.
481   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
482   * @syscap SystemCapability.Window.SessionManager
483   * @crossplatform
484   * @atomicservice
485   * @since 20
486   * @arkts 1.1&1.2
487   */
488  function on(type: 'foldAngleChange', callback: Callback<Array<number>>): void;
489
490  /**
491   * Unregister the callback for fold angle changes.
492   *
493   * @param { 'foldAngleChange' } type the event of fold angle changes.
494   * @param { Callback<Array<number>> } callback Callback used to return the current fold angle of device.
495   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
496   *     2. Incorrect parameter types.
497   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
498   * @syscap SystemCapability.Window.SessionManager
499   * @atomicservice
500   * @since 12
501   */
502  /**
503   * Unregister the callback for fold angle changes.
504   *
505   * @param { 'foldAngleChange' } type the event of fold angle changes.
506   * @param { Callback<Array<number>> } [callback] Callback used to return the current fold angle of device.
507   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
508   *     2. Incorrect parameter types.
509   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
510   * @syscap SystemCapability.Window.SessionManager
511   * @crossplatform
512   * @atomicservice
513   * @since 20
514   * @arkts 1.1&1.2
515   */
516  function off(type: 'foldAngleChange', callback?: Callback<Array<number>>): void;
517
518  /**
519   * Register the callback for device capture, casting, or recording status changes.
520   *
521   * @param { 'captureStatusChange' } type the event of capture, casting, or recording status changes.
522   * @param { Callback<boolean> } callback Callback used to return the device capture, casting, or recording status.
523   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
524   * <br>2. Incorrect parameter types.
525   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
526   * @syscap SystemCapability.Window.SessionManager
527   * @atomicservice
528   * @since arkts {'1.1':'12', '1.2':'20'}
529   * @arkts 1.1&1.2
530   */
531  function on(type: 'captureStatusChange', callback: Callback<boolean>): void;
532
533  /**
534   * Unregister the callback for device capture, casting, or recording status changes.
535   *
536   * @param { 'captureStatusChange' } type the event of capture, casting, or recording status changes.
537   * @param { Callback<boolean> } callback Callback used to return the device capture, casting, or recording status .
538   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
539   * <br>2. Incorrect parameter types.
540   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
541   * @syscap SystemCapability.Window.SessionManager
542   * @atomicservice
543   * @since arkts {'1.1':'12', '1.2':'20'}
544   * @arkts 1.1&1.2
545   */
546  function off(type: 'captureStatusChange', callback?: Callback<boolean>): void;
547
548
549  /**
550   * Check whether the device is captured, projected, or recorded.
551   *
552   * @returns { boolean } true means the device is captured, projected, or recorded.
553   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
554   * @syscap SystemCapability.Window.SessionManager
555   * @atomicservice
556   * @since arkts {'1.1':'12', '1.2':'20'}
557   * @arkts 1.1&1.2
558   */
559  function isCaptured(): boolean;
560
561  /**
562   * Get the display mode of the foldable device.
563   *
564   * @returns { FoldDisplayMode } display mode of the foldable device.
565   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
566   * @syscap SystemCapability.Window.SessionManager
567   * @since 10
568   */
569  /**
570   * Get the display mode of the foldable device.
571   *
572   * @returns { FoldDisplayMode } display mode of the foldable device.
573   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
574   * @syscap SystemCapability.Window.SessionManager
575   * @atomicservice
576   * @since 12
577   */
578  /**
579   * Get the display mode of the foldable device.
580   *
581   * @returns { FoldDisplayMode } display mode of the foldable device.
582   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
583   * @syscap SystemCapability.Window.SessionManager
584   * @crossplatform
585   * @atomicservice
586   * @since 20
587   * @arkts 1.1&1.2
588   */
589  function getFoldDisplayMode(): FoldDisplayMode;
590
591  /**
592   * Change the display mode of the foldable device.
593   *
594   * @param { FoldDisplayMode } mode target display mode to change.
595   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
596   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
597   * <br>2. Incorrect parameter types.
598   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
599   * @syscap SystemCapability.Window.SessionManager
600   * @systemapi Hide this for inner system use.
601   * @since arkts {'1.1':'10', '1.2':'20'}
602   * @arkts 1.1&1.2
603   */
604  function setFoldDisplayMode(mode: FoldDisplayMode): void;
605
606  /**
607   * Change the display mode of the foldable device.
608   *
609   * @param { FoldDisplayMode } mode target display mode to change.
610   * @param { string } reason set display mode reason.
611   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
612   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
613   * @syscap SystemCapability.Window.SessionManager
614   * @systemapi Hide this for inner system use.
615   * @since arkts {'1.1':'19', '1.2':'20'}
616   * @arkts 1.1&1.2
617   */
618  function setFoldDisplayMode(mode: FoldDisplayMode, reason: string): void;
619
620  /**
621   * Register the callback for fold display mode changes.
622   *
623   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
624   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
625   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
626   *     2. Incorrect parameter types.
627   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
628   * @syscap SystemCapability.Window.SessionManager
629   * @since 10
630   */
631  /**
632   * Register the callback for fold display mode changes.
633   *
634   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
635   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
636   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
637   *     2. Incorrect parameter types.
638   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
639   * @syscap SystemCapability.Window.SessionManager
640   * @atomicservice
641   * @since 12
642   */
643  /**
644   * Register the callback for fold display mode changes.
645   *
646   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
647   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
648   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
649   *     2. Incorrect parameter types.
650   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
651   * @syscap SystemCapability.Window.SessionManager
652   * @crossplatform
653   * @atomicservice
654   * @since 20
655   * @arkts 1.1&1.2
656   */
657  function on(type: 'foldDisplayModeChange', callback: Callback<FoldDisplayMode>): void;
658
659  /**
660   * Unregister the callback for fold display mode changes.
661   *
662   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
663   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
664   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
665   *     2. Incorrect parameter types.
666   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
667   * @syscap SystemCapability.Window.SessionManager
668   * @since 10
669   */
670  /**
671   * Unregister the callback for fold display mode changes.
672   *
673   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
674   * @param { Callback<FoldDisplayMode> } callback Callback used to return the current fold display mode
675   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
676   *     2. Incorrect parameter types.
677   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
678   * @syscap SystemCapability.Window.SessionManager
679   * @atomicservice
680   * @since 12
681   */
682  /**
683   * Unregister the callback for fold display mode changes.
684   *
685   * @param { 'foldDisplayModeChange' } type the event of fold display mode changes
686   * @param { Callback<FoldDisplayMode> } [callback] Callback used to return the current fold display mode
687   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
688   *     2. Incorrect parameter types.
689   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
690   * @syscap SystemCapability.Window.SessionManager
691   * @crossplatform
692   * @atomicservice
693   * @since 20
694   * @arkts 1.1&1.2
695   */
696  function off(type: 'foldDisplayModeChange', callback?: Callback<FoldDisplayMode>): void;
697
698  /**
699   * Get the fold crease region in the current display mode.
700   *
701   * @returns { FoldCreaseRegion } fold crease region in the current display mode.
702   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
703   * @syscap SystemCapability.Window.SessionManager
704   * @since 10
705   */
706  /**
707   * Get the fold crease region in the current display mode.
708   *
709   * @returns { FoldCreaseRegion } fold crease region in the current display mode.
710   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
711   * @syscap SystemCapability.Window.SessionManager
712   * @atomicservice
713   * @since arkts {'1.1':'12', '1.2':'20'}
714   * @arkts 1.1&1.2
715   */
716  function getCurrentFoldCreaseRegion(): FoldCreaseRegion;
717
718  /**
719   * set fold status locked or not.
720   *
721   * @param { boolean } locked - fold status is locked or not.
722   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
723   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
724   * <br>2. Incorrect parameter types.
725   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
726   * @syscap SystemCapability.Window.SessionManager
727   * @systemapi Hide this for inner system use.
728   * @since arkts {'1.1':'11', '1.2':'20'}
729   * @arkts 1.1&1.2
730   */
731  function setFoldStatusLocked(locked: boolean): void;
732
733    /**
734   * Create virtual screen.
735   *
736   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
737   * @param { VirtualScreenConfig } config Indicates the options of the virtual screen.
738   * @returns { Promise<number> } Promise used to return the created virtual screen id
739   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
740   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
741   * <br>2. Incorrect parameter types.
742   * @throws { BusinessError } 801 - Capability not supported.function createVirtualScreen can not work correctly due to limited device capabilities.
743   * @throws { BusinessError } 1400001 - Invalid display or screen.
744   * @syscap  SystemCapability.Window.SessionManager
745   * @since 16
746   */
747  function createVirtualScreen(config: VirtualScreenConfig): Promise<number>;
748
749  /**
750   * Destroy virtual screen.
751   *
752   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
753   * @param { number } screenId Indicates the screen id of the virtual screen.
754   * @returns { Promise<void> } Promise that returns no value.
755   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
756   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
757   * <br>2. Incorrect parameter types.
758   * @throws { BusinessError } 801 - Capability not supported.function destroyVirtualScreen can not work correctly due to limited device capabilities.
759   * @throws { BusinessError } 1400001 - Invalid display or screen.
760   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
761   * @syscap  SystemCapability.Window.SessionManager
762   * @since 16
763   */
764  function destroyVirtualScreen(screenId: number): Promise<void>;
765
766  /**
767   * Set surface for the virtual screen.
768   *
769   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
770   * @param { number } screenId Indicates the screen id of the virtual screen.
771   * @param { string } surfaceId Indicates the surface id.
772   * @returns { Promise<void> } Promise that returns no value
773   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
774   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
775   * <br>2. Incorrect parameter types.
776   * @throws { BusinessError } 801 - Capability not supported.function setVirtualScreenSurface can not work correctly due to limited device capabilities.
777   * @throws { BusinessError } 1400001 - Invalid display or screen.
778   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
779   * @syscap  SystemCapability.Window.SessionManager
780   * @since 16
781   */
782  function setVirtualScreenSurface(screenId: number, surfaceId: string): Promise<void>;
783
784  /**
785   * Make screen as unique-screen
786   *
787   * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN
788   * @param { number } screenId Indicates the unique screen id. It's type should be int.
789   * @returns { Promise<void> } Promise that returns no value
790   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
791   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
792   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
793   * @throws { BusinessError } 801 - Capability not supported.function makeUnique can not work correctly due to limited device capabilities.
794   * @throws { BusinessError } 1400001 - Invalid display or screen.
795   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
796   * @syscap SystemCapability.Window.SessionManager
797   * @since 16
798   */
799  function makeUnique(screenId: number): Promise<void>;
800
801  /**
802   * Add the list of window ids to the block list which won't display on the virtual screen
803   *
804   * @param { Array<number> } windowIds - The list of window ids that do not want to display on the virtual screen
805   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
806   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
807   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
808   * @throws { BusinessError } 801 - Capability not supported.Function addVirtualScreenBlocklist can not work correctly due to limited device capabilities.
809   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
810   * @syscap SystemCapability.Window.SessionManager
811   * @systemapi Hide this for inner system use.
812   * @since 18
813   */
814  function addVirtualScreenBlocklist(windowIds: Array<number>): Promise<void>;
815
816  /**
817   * Remove the list of window ids from the block list which won't display on the virtual screen
818   *
819   * @param { Array<number> } windowIds - The list of window ids that want to display on the virtual screen
820   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
821   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
822   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
823   * @throws { BusinessError } 801 - Capability not supported.Function removeVirtualScreenBlocklist can not work correctly due to limited device capabilities.
824   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
825   * @syscap SystemCapability.Window.SessionManager
826   * @systemapi Hide this for inner system use.
827   * @since 18
828   */
829  function removeVirtualScreenBlocklist(windowIds: Array<number>): Promise<void>;
830
831  /**
832   * Convert global coordinates to relative coordinates.
833   *
834   * @param { Position } position - The global coordinates to be converted.
835   * @param { number } [displayId] - The optional display id indicate the display relative to.
836   * If not specified,use the display where the coodinates are located.
837   * @returns { RelativePosition } The relative coordinates.
838   * @throws { BusinessError } 801 - Capability not supported.
839   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
840   * @throws { BusinessError } 1400004 - Parameter error. Possible cause: 1. Invalid parameter range.
841   * @syscap SystemCapability.Window.SessionManager
842   * @atomicservice
843   * @since 20
844   */
845  function convertGlobalToRelativeCoordinate(position: Position, displayId?: number): RelativePosition;
846
847  /**
848   * Convert relative coordinates to global coordinates.
849   *
850   * @param { RelativePosition } relativePosition - The relative coordinates to be converted.
851   * @returns { Position } The global coordinates.
852   * @throws { BusinessError } 801 - Capability not supported.
853   * @throws { BusinessError } 1400003 - This display manager service works abnormally.
854   * @throws { BusinessError } 1400004 - Parameter error. Possible cause: 1. Invalid parameter range.
855   * @syscap SystemCapability.Window.SessionManager
856   * @atomicservice
857   * @since 20
858   */
859  function convertRelativeToGlobalCoordinate(relativePosition: RelativePosition): Position;
860
861  /**
862   * The parameter for creating virtual screen.
863   *
864   * @interface VirtualScreenConfig
865   * @syscap SystemCapability.Window.SessionManager
866   * @since 16
867   */
868  interface VirtualScreenConfig {
869    /**
870     * Indicates the name of the virtual screen.
871     *
872     * @type { string }
873     * @syscap  SystemCapability.Window.SessionManager
874     * @since 16
875     */
876    name: string;
877
878    /**
879     * Indicates the width of the virtual screen.
880     *
881     * @type { number }
882     * @syscap SystemCapability.Window.SessionManager
883     * @since arkts {'1.1':'16', '1.2':'20'}
884     * @arkts 1.1&1.2
885     */
886    width: number;
887
888    /**
889     * Indicates the height of the virtual screen.
890     *
891     * @type { number }
892     * @syscap SystemCapability.Window.SessionManager
893     * @since arkts {'1.1':'16', '1.2':'20'}
894     * @arkts 1.1&1.2
895     */
896    height: number;
897
898    /**
899     * Indicates the density of the virtual screen.
900     *
901     * @type { number }
902     * @syscap SystemCapability.Window.SessionManager
903     * @since 16
904     */
905    density: number;
906
907    /**
908     * Indicates the surface id of the virtual screen.
909     *
910     * @type { string }
911     * @syscap SystemCapability.Window.SessionManager
912     * @since 16
913     */
914    surfaceId: string;
915  }
916
917  /**
918   * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom,
919   * the hinges are identified from right to left as the first and second fold axes, respectively.
920   *
921   * @enum { number }
922   * @syscap SystemCapability.Window.SessionManager
923   * @since 10
924   */
925  /**
926   * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom,
927   * the hinges are identified from right to left as the first and second fold axes, respectively.
928   *
929   * @enum { number }
930   * @syscap SystemCapability.Window.SessionManager
931   * @atomicservice
932   * @since 12
933   */
934  /**
935   * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom,
936   * the hinges are identified from right to left as the first and second fold axes, respectively.
937   *
938   * @enum { number }
939   * @syscap SystemCapability.Window.SessionManager
940   * @crossplatform
941   * @atomicservice
942   * @since 20
943   * @arkts 1.1&1.2
944   */
945  enum FoldStatus {
946    /**
947     * Fold Status Unknown.
948     *
949     * @syscap SystemCapability.Window.SessionManager
950     * @since 10
951     */
952    /**
953     * Fold Status Unknown.
954     *
955     * @syscap SystemCapability.Window.SessionManager
956     * @atomicservice
957     * @since 12
958     */
959    /**
960     * Fold Status Unknown.
961     *
962     * @syscap SystemCapability.Window.SessionManager
963     * @crossplatform
964     * @atomicservice
965     * @since 20
966     * @arkts 1.1&1.2
967     */
968    FOLD_STATUS_UNKNOWN = 0,
969    /**
970     * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open,
971     * and the second fold axis is folded.
972     *
973     * @syscap SystemCapability.Window.SessionManager
974     * @since 10
975     */
976    /**
977     * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open,
978     * and the second fold axis is folded.
979     *
980     * @syscap SystemCapability.Window.SessionManager
981     * @atomicservice
982     * @since 12
983     */
984    /**
985     * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open,
986     * and the second fold axis is folded.
987     *
988     * @syscap SystemCapability.Window.SessionManager
989     * @crossplatform
990     * @atomicservice
991     * @since 20
992     * @arkts 1.1&1.2
993     */
994    FOLD_STATUS_EXPANDED = 1,
995    /**
996     * Fold Status Folded. For dual-fold axis devices, the first fold axis is folded, and the second fold axis is folded.
997     *
998     * @syscap SystemCapability.Window.SessionManager
999     * @since 10
1000     */
1001    /**
1002     * Fold Status Folded. For dual-fold axis devices, the first fold axis is folded, and the second fold axis is folded.
1003     *
1004     * @syscap SystemCapability.Window.SessionManager
1005     * @atomicservice
1006     * @since arkts {'1.1':'12', '1.2':'20'}
1007     * @arkts 1.1&1.2
1008     */
1009    FOLD_STATUS_FOLDED = 2,
1010    /**
1011     * Fold Status Half Folded. Somehow between fully open and completely closed.
1012     * For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded.
1013     *
1014     * @syscap SystemCapability.Window.SessionManager
1015     * @since 10
1016     */
1017    /**
1018     * Fold Status Half Folded. Somehow between fully open and completely closed.
1019     * For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded.
1020     *
1021     * @syscap SystemCapability.Window.SessionManager
1022     * @atomicservice
1023     * @since 12
1024     */
1025    /**
1026     * Fold Status Half Folded. Somehow between fully open and completely closed.
1027     * For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded.
1028     *
1029     * @syscap SystemCapability.Window.SessionManager
1030     * @crossplatform
1031     * @atomicservice
1032     * @since 20
1033     * @arkts 1.1&1.2
1034     */
1035    FOLD_STATUS_HALF_FOLDED = 3,
1036    /**
1037     * Fold Status Expanded With Second Expanded.
1038     *
1039     * @syscap SystemCapability.Window.SessionManager
1040     * @atomicservice
1041     * @since arkts {'1.1':'15', '1.2':'20'}
1042     * @arkts 1.1&1.2
1043     */
1044    FOLD_STATUS_EXPANDED_WITH_SECOND_EXPANDED = 11,
1045    /**
1046     * Fold Status Expanded With Second Half Folded.
1047     *
1048     * @syscap SystemCapability.Window.SessionManager
1049     * @atomicservice
1050     * @since arkts {'1.1':'15', '1.2':'20'}
1051     * @arkts 1.1&1.2
1052     */
1053    FOLD_STATUS_EXPANDED_WITH_SECOND_HALF_FOLDED = 21,
1054    /**
1055     * Fold Status Folded With Second Expanded.
1056     *
1057     * @syscap SystemCapability.Window.SessionManager
1058     * @atomicservice
1059     * @since arkts {'1.1':'15', '1.2':'20'}
1060     * @arkts 1.1&1.2
1061     */
1062    FOLD_STATUS_FOLDED_WITH_SECOND_EXPANDED = 12,
1063    /**
1064     * Fold Status Folded With Second Half Folded.
1065     *
1066     * @syscap SystemCapability.Window.SessionManager
1067     * @atomicservice
1068     * @since arkts {'1.1':'15', '1.2':'20'}
1069     * @arkts 1.1&1.2
1070     */
1071    FOLD_STATUS_FOLDED_WITH_SECOND_HALF_FOLDED = 22,
1072    /**
1073     * Fold Status Half Folded With Second Expanded.
1074     *
1075     * @syscap SystemCapability.Window.SessionManager
1076     * @atomicservice
1077     * @since arkts {'1.1':'15', '1.2':'20'}
1078     * @arkts 1.1&1.2
1079     */
1080    FOLD_STATUS_HALF_FOLDED_WITH_SECOND_EXPANDED = 13,
1081    /**
1082     * Fold Status Half Folded With Second Half Folded.
1083     *
1084     * @syscap SystemCapability.Window.SessionManager
1085     * @atomicservice
1086     * @since arkts {'1.1':'15', '1.2':'20'}
1087     * @arkts 1.1&1.2
1088     */
1089    FOLD_STATUS_HALF_FOLDED_WITH_SECOND_HALF_FOLDED = 23
1090  }
1091
1092  /**
1093   * Enumerates the fold display mode.
1094   *
1095   * @enum { number }
1096   * @syscap SystemCapability.Window.SessionManager
1097   * @since 10
1098   */
1099  /**
1100   * Enumerates the fold display mode.
1101   *
1102   * @enum { number }
1103   * @syscap SystemCapability.Window.SessionManager
1104   * @atomicservice
1105   * @since 12
1106   */
1107  /**
1108   * Enumerates the fold display mode.
1109   *
1110   * @enum { number }
1111   * @syscap SystemCapability.Window.SessionManager
1112   * @crossplatform
1113   * @atomicservice
1114   * @since 20
1115   * @arkts 1.1&1.2
1116   */
1117  enum FoldDisplayMode {
1118    /**
1119     * Unknown Display.
1120     *
1121     * @syscap SystemCapability.Window.SessionManager
1122     * @since 10
1123     */
1124    /**
1125     * Unknown Display.
1126     *
1127     * @syscap SystemCapability.Window.SessionManager
1128     * @atomicservice
1129     * @since arkts {'1.1':'12', '1.2':'20'}
1130     * @arkts 1.1&1.2
1131     */
1132    FOLD_DISPLAY_MODE_UNKNOWN = 0,
1133    /**
1134     * Full Display.
1135     *
1136     * @syscap SystemCapability.Window.SessionManager
1137     * @since 10
1138     */
1139    /**
1140     * Full Display.
1141     *
1142     * @syscap SystemCapability.Window.SessionManager
1143     * @atomicservice
1144     * @since arkts {'1.1':'12', '1.2':'20'}
1145     * @arkts 1.1&1.2
1146     */
1147    FOLD_DISPLAY_MODE_FULL = 1,
1148    /**
1149     * Main Display.
1150     *
1151     * @syscap SystemCapability.Window.SessionManager
1152     * @since 10
1153     */
1154    /**
1155     * Main Display.
1156     *
1157     * @syscap SystemCapability.Window.SessionManager
1158     * @atomicservice
1159     * @since arkts {'1.1':'12', '1.2':'20'}
1160     * @arkts 1.1&1.2
1161     */
1162    FOLD_DISPLAY_MODE_MAIN= 2,
1163    /**
1164     * Sub Display.
1165     *
1166     * @syscap SystemCapability.Window.SessionManager
1167     * @since 10
1168     */
1169    /**
1170     * Sub Display.
1171     *
1172     * @syscap SystemCapability.Window.SessionManager
1173     * @atomicservice
1174     * @since arkts {'1.1':'12', '1.2':'20'}
1175     * @arkts 1.1&1.2
1176     */
1177    FOLD_DISPLAY_MODE_SUB= 3,
1178    /**
1179     * Coordination Display.
1180     *
1181     * @syscap SystemCapability.Window.SessionManager
1182     * @since 10
1183     */
1184    /**
1185     * Coordination Display.
1186     *
1187     * @syscap SystemCapability.Window.SessionManager
1188     * @atomicservice
1189     * @since arkts {'1.1':'12', '1.2':'20'}
1190     * @arkts 1.1&1.2
1191     */
1192    FOLD_DISPLAY_MODE_COORDINATION
1193  }
1194
1195  /**
1196   * Enumerates the display states.
1197   *
1198   * @enum { number }
1199   * @syscap SystemCapability.WindowManager.WindowManager.Core
1200   * @since 7
1201   */
1202  /**
1203   * Enumerates the display states.
1204   *
1205   * @enum { number }
1206   * @syscap SystemCapability.WindowManager.WindowManager.Core
1207   * @atomicservice
1208   * @since arkts {'1.1':'12', '1.2':'20'}
1209   * @arkts 1.1&1.2
1210   */
1211  enum DisplayState {
1212    /**
1213     * Unknown.
1214     *
1215     * @syscap SystemCapability.WindowManager.WindowManager.Core
1216     * @since 7
1217     */
1218    /**
1219     * Unknown.
1220     *
1221     * @syscap SystemCapability.WindowManager.WindowManager.Core
1222     * @atomicservice
1223     * @since 12
1224     */
1225    STATE_UNKNOWN = 0,
1226    /**
1227     * Screen off.
1228     *
1229     * @syscap SystemCapability.WindowManager.WindowManager.Core
1230     * @since 7
1231     */
1232    /**
1233     * Screen off.
1234     *
1235     * @syscap SystemCapability.WindowManager.WindowManager.Core
1236     * @atomicservice
1237     * @since arkts {'1.1':'12', '1.2':'20'}
1238     * @arkts 1.1&1.2
1239     */
1240    STATE_OFF = 1,
1241    /**
1242     * Screen on.
1243     *
1244     * @syscap SystemCapability.WindowManager.WindowManager.Core
1245     * @since 7
1246     */
1247    /**
1248     * Screen on.
1249     *
1250     * @syscap SystemCapability.WindowManager.WindowManager.Core
1251     * @atomicservice
1252     * @since arkts {'1.1':'12', '1.2':'20'}
1253     * @arkts 1.1&1.2
1254     */
1255    STATE_ON = 2,
1256    /**
1257     * Doze, but it will update for some important system messages.
1258     *
1259     * @syscap SystemCapability.WindowManager.WindowManager.Core
1260     * @since 7
1261     */
1262    /**
1263     * Doze, but it will update for some important system messages.
1264     *
1265     * @syscap SystemCapability.WindowManager.WindowManager.Core
1266     * @atomicservice
1267     * @since arkts {'1.1':'12', '1.2':'20'}
1268     * @arkts 1.1&1.2
1269     */
1270    STATE_DOZE = 3,
1271    /**
1272     * Doze and not update.
1273     *
1274     * @syscap SystemCapability.WindowManager.WindowManager.Core
1275     * @since 7
1276     */
1277    /**
1278     * Doze and not update.
1279     *
1280     * @syscap SystemCapability.WindowManager.WindowManager.Core
1281     * @atomicservice
1282     * @since arkts {'1.1':'12', '1.2':'20'}
1283     * @arkts 1.1&1.2
1284     */
1285    STATE_DOZE_SUSPEND = 4,
1286    /**
1287     * VR node.
1288     *
1289     * @syscap SystemCapability.WindowManager.WindowManager.Core
1290     * @since 7
1291     */
1292    /**
1293     * VR node.
1294     *
1295     * @syscap SystemCapability.WindowManager.WindowManager.Core
1296     * @atomicservice
1297     * @since arkts {'1.1':'12', '1.2':'20'}
1298     * @arkts 1.1&1.2
1299     */
1300    STATE_VR = 5,
1301    /**
1302     * Screen on and not update.
1303     *
1304     * @syscap SystemCapability.WindowManager.WindowManager.Core
1305     * @since 7
1306     */
1307    /**
1308     * Screen on and not update.
1309     *
1310     * @syscap SystemCapability.WindowManager.WindowManager.Core
1311     * @atomicservice
1312     * @since arkts {'1.1':'12', '1.2':'20'}
1313     * @arkts 1.1&1.2
1314     */
1315    STATE_ON_SUSPEND = 6
1316  }
1317
1318  /**
1319   * Enumerates the display orientation.
1320   *
1321   * @enum { number }
1322   * @syscap SystemCapability.WindowManager.WindowManager.Core
1323   * @crossplatform
1324   * @since 10
1325   */
1326  /**
1327   * Enumerates the display orientation.
1328   *
1329   * @enum { number }
1330   * @syscap SystemCapability.WindowManager.WindowManager.Core
1331   * @crossplatform
1332   * @atomicservice
1333   * @since arkts {'1.1':'12', '1.2':'20'}
1334   * @arkts 1.1&1.2
1335   */
1336  enum Orientation {
1337    /**
1338     * Indicate that the display content is in portrait mode.
1339     *
1340     * @syscap SystemCapability.WindowManager.WindowManager.Core
1341     * @crossplatform
1342     * @since 10
1343     */
1344    /**
1345     * Indicate that the display content is in portrait mode.
1346     *
1347     * @syscap SystemCapability.WindowManager.WindowManager.Core
1348     * @crossplatform
1349     * @atomicservice
1350     * @since arkts {'1.1':'12', '1.2':'20'}
1351     * @arkts 1.1&1.2
1352     */
1353    PORTRAIT = 0,
1354
1355    /**
1356     * Indicate that the display content is in landscape mode.
1357     *
1358     * @syscap SystemCapability.WindowManager.WindowManager.Core
1359     * @crossplatform
1360     * @since 10
1361     */
1362    /**
1363     * Indicate that the display content is in landscape mode.
1364     *
1365     * @syscap SystemCapability.WindowManager.WindowManager.Core
1366     * @crossplatform
1367     * @atomicservice
1368     * @since arkts {'1.1':'12', '1.2':'20'}
1369     * @arkts 1.1&1.2
1370     */
1371    LANDSCAPE = 1,
1372
1373    /**
1374     * Indicate that the display content is in the opposite direction of the portrait mode.
1375     *
1376     * @syscap SystemCapability.WindowManager.WindowManager.Core
1377     * @crossplatform
1378     * @since 10
1379     */
1380    /**
1381     * Indicate that the display content is in the opposite direction of the portrait mode.
1382     *
1383     * @syscap SystemCapability.WindowManager.WindowManager.Core
1384     * @crossplatform
1385     * @atomicservice
1386     * @since arkts {'1.1':'12', '1.2':'20'}
1387     * @arkts 1.1&1.2
1388     */
1389    PORTRAIT_INVERTED = 2,
1390
1391    /**
1392     * Indicate that the display content is in the opposite direction of the landscape mode.
1393     *
1394     * @syscap SystemCapability.WindowManager.WindowManager.Core
1395     * @crossplatform
1396     * @since 10
1397     */
1398    /**
1399     * Indicate that the display content is in the opposite direction of the landscape mode.
1400     *
1401     * @syscap SystemCapability.WindowManager.WindowManager.Core
1402     * @crossplatform
1403     * @atomicservice
1404     * @since arkts {'1.1':'12', '1.2':'20'}
1405     * @arkts 1.1&1.2
1406     */
1407    LANDSCAPE_INVERTED = 3
1408  }
1409
1410    /**
1411     * Indicate the source mode of the display
1412     *
1413     * @enum { number }
1414     * @syscap SystemCapability.Window.SessionManager
1415     * @atomicservice
1416     * @since 19
1417     */
1418  enum DisplaySourceMode {
1419    /**
1420     * Indicate that the display is not in use.
1421     *
1422     * @syscap SystemCapability.Window.SessionManager
1423     * @atomicservice
1424     * @since 19
1425     */
1426    NONE = 0,
1427
1428    /**
1429     * Indicate that the display is the main display.
1430     *
1431     * @syscap SystemCapability.Window.SessionManager
1432     * @atomicservice
1433     * @since 19
1434     */
1435    MAIN = 1,
1436
1437    /**
1438     * Indicate that the display is in mirror mode.
1439     *
1440     * @syscap SystemCapability.Window.SessionManager
1441     * @atomicservice
1442     * @since 19
1443     */
1444    MIRROR = 2,
1445
1446    /**
1447     * Indicate that the display is in extend mode.
1448     *
1449     * @syscap SystemCapability.Window.SessionManager
1450     * @atomicservice
1451     * @since 19
1452     */
1453    EXTEND = 3,
1454
1455    /**
1456     * Indicate that the display stands alone.
1457     *
1458     * @syscap SystemCapability.Window.SessionManager
1459     * @atomicservice
1460     * @since 19
1461     */
1462    ALONE = 4
1463  }
1464
1465  /**
1466   * Enumerates the screen shape.
1467   *
1468   * @enum { number }
1469   * @syscap SystemCapability.WindowManager.WindowManager.Core
1470   * @crossplatform
1471   * @since 18
1472   */
1473  enum ScreenShape {
1474    /**
1475     *The screen shape is rectangle.
1476     *
1477     * @syscap SystemCapability.WindowManager.WindowManager.Core
1478     * @crossplatform
1479     * @since 18
1480     */
1481    RECTANGLE = 0,
1482    /**
1483     *The screen shape is round.
1484     *
1485     * @syscap SystemCapability.WindowManager.WindowManager.Core
1486     * @crossplatform
1487     * @since 18
1488     */
1489    ROUND = 1
1490  }
1491
1492  /**
1493   * Fold Crease Region
1494   *
1495   * @interface FoldCreaseRegion
1496   * @syscap SystemCapability.Window.SessionManager
1497   * @since 10
1498   */
1499  /**
1500   * Fold Crease Region
1501   *
1502   * @interface FoldCreaseRegion
1503   * @syscap SystemCapability.Window.SessionManager
1504   * @atomicservice
1505   * @since arkts {'1.1':'12', '1.2':'20'}
1506   * @arkts 1.1&1.2
1507   */
1508  interface FoldCreaseRegion {
1509    /**
1510     * The display ID is used to identify the screen where the crease is located.
1511     *
1512     * @type { number }
1513     * @readonly
1514     * @syscap SystemCapability.Window.SessionManager
1515     * @since 10
1516     */
1517    /**
1518     * The display ID is used to identify the screen where the crease is located.
1519     *
1520     * @type { number }
1521     * @readonly
1522     * @syscap SystemCapability.Window.SessionManager
1523     * @atomicservice
1524     * @since arkts {'1.1':'12', '1.2':'20'}
1525     * @arkts 1.1&1.2
1526     */
1527    readonly displayId: number;
1528
1529    /**
1530     * Crease Region.
1531     *
1532     * @type { Array<Rect> }
1533     * @readonly
1534     * @syscap SystemCapability.Window.SessionManager
1535     * @since 10
1536     */
1537    /**
1538     * Crease Region.
1539     *
1540     * @type { Array<Rect> }
1541     * @readonly
1542     * @syscap SystemCapability.Window.SessionManager
1543     * @atomicservice
1544     * @since arkts {'1.1':'12', '1.2':'20'}
1545     * @arkts 1.1&1.2
1546     */
1547    readonly creaseRects: Array<Rect>;
1548  }
1549
1550  /**
1551   * Rectangle
1552   *
1553   * @interface Rect
1554   * @syscap SystemCapability.WindowManager.WindowManager.Core
1555   * @since 9
1556   */
1557  /**
1558   * Rectangle
1559   *
1560   * @interface Rect
1561   * @syscap SystemCapability.WindowManager.WindowManager.Core
1562   * @atomicservice
1563   * @since arkts {'1.1':'12', '1.2':'20'}
1564   * @arkts 1.1&1.2
1565   */
1566  interface Rect {
1567    /**
1568     * The X-axis coordinate of the upper left vertex of the rectangle, in pixels.
1569     *
1570     * @type { number }
1571     * @syscap SystemCapability.WindowManager.WindowManager.Core
1572     * @since 9
1573     */
1574    /**
1575     * The X-axis coordinate of the upper left vertex of the rectangle, in pixels.
1576     *
1577     * @type { number }
1578     * @syscap SystemCapability.WindowManager.WindowManager.Core
1579     * @atomicservice
1580     * @since arkts {'1.1':'12', '1.2':'20'}
1581     * @arkts 1.1&1.2
1582     */
1583    left: number;
1584
1585    /**
1586     * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels.
1587     *
1588     * @type { number }
1589     * @syscap SystemCapability.WindowManager.WindowManager.Core
1590     * @since 9
1591     */
1592    /**
1593     * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels.
1594     *
1595     * @type { number }
1596     * @syscap SystemCapability.WindowManager.WindowManager.Core
1597     * @atomicservice
1598     * @since arkts {'1.1':'12', '1.2':'20'}
1599     * @arkts 1.1&1.2
1600     */
1601    top: number;
1602
1603    /**
1604     * Width of the rectangle, in pixels.
1605     *
1606     * @type { number }
1607     * @syscap SystemCapability.WindowManager.WindowManager.Core
1608     * @since 9
1609     */
1610    /**
1611     * Width of the rectangle, in pixels.
1612     *
1613     * @type { number }
1614     * @syscap SystemCapability.WindowManager.WindowManager.Core
1615     * @atomicservice
1616     * @since arkts {'1.1':'12', '1.2':'20'}
1617     * @arkts 1.1&1.2
1618     */
1619    width: number;
1620
1621    /**
1622     * Height of the rectangle, in pixels.
1623     *
1624     * @type { number }
1625     * @syscap SystemCapability.WindowManager.WindowManager.Core
1626     * @since 9
1627     */
1628    /**
1629     * Height of the rectangle, in pixels.
1630     *
1631     * @type { number }
1632     * @syscap SystemCapability.WindowManager.WindowManager.Core
1633     * @atomicservice
1634     * @since arkts {'1.1':'12', '1.2':'20'}
1635     * @arkts 1.1&1.2
1636     */
1637    height: number;
1638  }
1639
1640  /**
1641   * Curved area rects of the waterfall display.
1642   *
1643   * @interface WaterfallDisplayAreaRects
1644   * @syscap SystemCapability.WindowManager.WindowManager.Core
1645   * @since 9
1646   */
1647  /**
1648   * Curved area rects of the waterfall display.
1649   *
1650   * @interface WaterfallDisplayAreaRects
1651   * @syscap SystemCapability.WindowManager.WindowManager.Core
1652   * @atomicservice
1653   * @since arkts {'1.1':'12', '1.2':'20'}
1654   * @arkts 1.1&1.2
1655   */
1656  interface WaterfallDisplayAreaRects {
1657    /**
1658     * Indicates the size of left side curved area of the waterfall screen.
1659     *
1660     * @type { Rect }
1661     * @readonly
1662     * @syscap SystemCapability.WindowManager.WindowManager.Core
1663     * @since 9
1664     */
1665    /**
1666     * Indicates the size of left side curved area of the waterfall screen.
1667     *
1668     * @type { Rect }
1669     * @readonly
1670     * @syscap SystemCapability.WindowManager.WindowManager.Core
1671     * @atomicservice
1672     * @since arkts {'1.1':'12', '1.2':'20'}
1673     * @arkts 1.1&1.2
1674     */
1675    readonly left: Rect;
1676
1677    /**
1678     * Indicates the size of right side curved area of the waterfall screen.
1679     *
1680     * @type { Rect }
1681     * @readonly
1682     * @syscap SystemCapability.WindowManager.WindowManager.Core
1683     * @since 9
1684     */
1685    /**
1686     * Indicates the size of right side curved area of the waterfall screen.
1687     *
1688     * @type { Rect }
1689     * @readonly
1690     * @syscap SystemCapability.WindowManager.WindowManager.Core
1691     * @atomicservice
1692     * @since arkts {'1.1':'12', '1.2':'20'}
1693     * @arkts 1.1&1.2
1694     */
1695    readonly right: Rect;
1696
1697    /**
1698     * Indicates the size of top side curved area of the waterfall screen.
1699     *
1700     * @type { Rect }
1701     * @readonly
1702     * @syscap SystemCapability.WindowManager.WindowManager.Core
1703     * @since 9
1704     */
1705    /**
1706     * Indicates the size of top side curved area of the waterfall screen.
1707     *
1708     * @type { Rect }
1709     * @readonly
1710     * @syscap SystemCapability.WindowManager.WindowManager.Core
1711     * @atomicservice
1712     * @since arkts {'1.1':'12', '1.2':'20'}
1713     * @arkts 1.1&1.2
1714     */
1715    readonly top: Rect;
1716
1717    /**
1718     * Indicates the size of bottom side curved area of the waterfall screen.
1719     *
1720     * @type { Rect }
1721     * @readonly
1722     * @syscap SystemCapability.WindowManager.WindowManager.Core
1723     * @since 9
1724     */
1725    /**
1726     * Indicates the size of bottom side curved area of the waterfall screen.
1727     *
1728     * @type { Rect }
1729     * @readonly
1730     * @syscap SystemCapability.WindowManager.WindowManager.Core
1731     * @atomicservice
1732     * @since arkts {'1.1':'12', '1.2':'20'}
1733     * @arkts 1.1&1.2
1734     */
1735    readonly bottom: Rect;
1736  }
1737
1738  /**
1739   * Cutout information of the display.
1740   *
1741   * @interface CutoutInfo
1742   * @syscap SystemCapability.WindowManager.WindowManager.Core
1743   * @since 9
1744   */
1745  /**
1746   * Cutout information of the display.
1747   *
1748   * @interface CutoutInfo
1749   * @syscap SystemCapability.WindowManager.WindowManager.Core
1750   * @atomicservice
1751   * @since arkts {'1.1':'12', '1.2':'20'}
1752   * @arkts 1.1&1.2
1753   */
1754  interface CutoutInfo {
1755    /**
1756     * Bounding rectangles of the cutout areas of the display.
1757     *
1758     * @type { Array<Rect> }
1759     * @readonly
1760     * @syscap SystemCapability.WindowManager.WindowManager.Core
1761     * @since 9
1762     */
1763    /**
1764     * Bounding rectangles of the cutout areas of the display.
1765     *
1766     * @type { Array<Rect> }
1767     * @readonly
1768     * @syscap SystemCapability.WindowManager.WindowManager.Core
1769     * @atomicservice
1770     * @since arkts {'1.1':'12', '1.2':'20'}
1771     * @arkts 1.1&1.2
1772     */
1773    readonly boundingRects: Array<Rect>;
1774
1775    /**
1776     * Rectangles of curved parts on each side of a waterfall display.
1777     *
1778     * @type { WaterfallDisplayAreaRects }
1779     * @readonly
1780     * @syscap SystemCapability.WindowManager.WindowManager.Core
1781     * @since 9
1782     */
1783    /**
1784     * Rectangles of curved parts on each side of a waterfall display.
1785     *
1786     * @type { WaterfallDisplayAreaRects }
1787     * @readonly
1788     * @syscap SystemCapability.WindowManager.WindowManager.Core
1789     * @atomicservice
1790     * @since arkts {'1.1':'12', '1.2':'20'}
1791     * @arkts 1.1&1.2
1792     */
1793    readonly waterfallDisplayAreaRects: WaterfallDisplayAreaRects;
1794  }
1795
1796  /**
1797   * Define display physical resolution.
1798   *
1799   * @interface DisplayPhysicalResolution
1800   * @syscap SystemCapability.WindowManager.WindowManager.Core
1801   * @crossplatform
1802   * @atomicservice
1803   * @since arkts {'1.1':'12', '1.2':'20'}
1804   * @arkts 1.1&1.2
1805   */
1806  interface DisplayPhysicalResolution {
1807    /**
1808     * fold display mode.
1809     *
1810     * @type { FoldDisplayMode }
1811     * @syscap SystemCapability.WindowManager.WindowManager.Core
1812     * @atomicservice
1813     * @since arkts {'1.1':'12', '1.2':'20'}
1814     * @arkts 1.1&1.2
1815     */
1816    foldDisplayMode: FoldDisplayMode;
1817
1818    /**
1819     * Display physical width, in pixels.
1820     *
1821     * @type { number }
1822     * @syscap SystemCapability.WindowManager.WindowManager.Core
1823     * @crossplatform
1824     * @atomicservice
1825     * @since arkts {'1.1':'12', '1.2':'20'}
1826     * @arkts 1.1&1.2
1827     */
1828    physicalWidth: number;
1829
1830    /**
1831     * Display physical height, in pixels.
1832     *
1833     * @type { number }
1834     * @syscap SystemCapability.WindowManager.WindowManager.Core
1835     * @crossplatform
1836     * @atomicservice
1837     * @since arkts {'1.1':'12', '1.2':'20'}
1838     * @arkts 1.1&1.2
1839     */
1840    physicalHeight: number;
1841  }
1842
1843  /**
1844   * Define properties of the display. They cannot be updated automatically.
1845   *
1846   * @interface Display
1847   * @syscap SystemCapability.WindowManager.WindowManager.Core
1848   * @since 7
1849   */
1850  /**
1851   * Define properties of the display. They cannot be updated automatically.
1852   *
1853   * @interface Display
1854   * @syscap SystemCapability.WindowManager.WindowManager.Core
1855   * @crossplatform
1856   * @since 10
1857   */
1858  /**
1859   * Define properties of the display. They cannot be updated automatically.
1860   *
1861   * @interface Display
1862   * @syscap SystemCapability.WindowManager.WindowManager.Core
1863   * @crossplatform
1864   * @atomicservice
1865   * @since arkts {'1.1':'11', '1.2':'20'}
1866   * @arkts 1.1&1.2
1867   */
1868  interface Display {
1869    /**
1870     * Display ID.
1871     *
1872     * @type { number }
1873     * @syscap SystemCapability.WindowManager.WindowManager.Core
1874     * @since 7
1875     */
1876    /**
1877     * Display ID.
1878     *
1879     * @type { number }
1880     * @syscap SystemCapability.WindowManager.WindowManager.Core
1881     * @crossplatform
1882     * @since 10
1883     */
1884    /**
1885     * Display ID.
1886     *
1887     * @type { number }
1888     * @syscap SystemCapability.WindowManager.WindowManager.Core
1889     * @crossplatform
1890     * @atomicservice
1891     * @since arkts {'1.1':'12', '1.2':'20'}
1892     * @arkts 1.1&1.2
1893     */
1894    id: number;
1895
1896    /**
1897     * Display name.
1898     *
1899     * @type { string }
1900     * @syscap SystemCapability.WindowManager.WindowManager.Core
1901     * @since 7
1902     */
1903    /**
1904     * Display name.
1905     *
1906     * @type { string }
1907     * @syscap SystemCapability.WindowManager.WindowManager.Core
1908     * @atomicservice
1909     * @since arkts {'1.1':'12', '1.2':'20'}
1910     * @arkts 1.1&1.2
1911     */
1912    name: string;
1913
1914    /**
1915     * Whether the display is alive.
1916     *
1917     * @type { boolean }
1918     * @syscap SystemCapability.WindowManager.WindowManager.Core
1919     * @since 7
1920     */
1921    /**
1922     * Whether the display is alive.
1923     *
1924     * @type { boolean }
1925     * @syscap SystemCapability.WindowManager.WindowManager.Core
1926     * @atomicservice
1927     * @since arkts {'1.1':'12', '1.2':'20'}
1928     * @arkts 1.1&1.2
1929     */
1930    alive: boolean;
1931
1932    /**
1933     * The state of display.
1934     *
1935     * @type { DisplayState }
1936     * @syscap SystemCapability.WindowManager.WindowManager.Core
1937     * @since 7
1938     */
1939    /**
1940     * The state of display.
1941     *
1942     * @type { DisplayState }
1943     * @syscap SystemCapability.WindowManager.WindowManager.Core
1944     * @atomicservice
1945     * @since arkts {'1.1':'12', '1.2':'20'}
1946     * @arkts 1.1&1.2
1947     */
1948    state: DisplayState;
1949
1950    /**
1951     * Refresh rate, in Hz.
1952     *
1953     * @type { number }
1954     * @syscap SystemCapability.WindowManager.WindowManager.Core
1955     * @since 7
1956     */
1957    /**
1958     * Refresh rate, in Hz.
1959     *
1960     * @type { number }
1961     * @syscap SystemCapability.WindowManager.WindowManager.Core
1962     * @atomicservice
1963     * @since arkts {'1.1':'12', '1.2':'20'}
1964     * @arkts 1.1&1.2
1965     */
1966    refreshRate: number;
1967
1968    /**
1969     * Rotation degrees of the display.
1970     *
1971     * @type { number }
1972     * @syscap SystemCapability.WindowManager.WindowManager.Core
1973     * @since 7
1974     */
1975    /**
1976     * An enumeration value for rotation degrees of the display.
1977     * The value 0 indicates that the screen of the display rotates clockwise by 0°.
1978     * The value 1 indicates that the screen of the display rotates clockwise by 90°.
1979     * The value 2 indicates that the screen of the display rotates clockwise by 180°.
1980     * The value 3 indicates that the screen of the display rotates clockwise by 270°.
1981     *
1982     * @type { number }
1983     * @syscap SystemCapability.WindowManager.WindowManager.Core
1984     * @atomicservice
1985     * @since arkts {'1.1':'11', '1.2':'20'}
1986     * @arkts 1.1&1.2
1987     */
1988    rotation: number;
1989
1990    /**
1991     * Display width, in pixels.
1992     *
1993     * @type { number }
1994     * @syscap SystemCapability.WindowManager.WindowManager.Core
1995     * @since 7
1996     */
1997    /**
1998     * Display width, in pixels.
1999     *
2000     * @type { number }
2001     * @syscap SystemCapability.WindowManager.WindowManager.Core
2002     * @crossplatform
2003     * @since 10
2004     */
2005    /**
2006     * Display width, in pixels.
2007     *
2008     * @type { number }
2009     * @syscap SystemCapability.WindowManager.WindowManager.Core
2010     * @crossplatform
2011     * @atomicservice
2012     * @since arkts {'1.1':'11', '1.2':'20'}
2013     * @arkts 1.1&1.2
2014     */
2015    width: number;
2016
2017    /**
2018     * Display height, in pixels.
2019     *
2020     * @type { number }
2021     * @syscap SystemCapability.WindowManager.WindowManager.Core
2022     * @since 7
2023     */
2024    /**
2025     * Display height, in pixels.
2026     *
2027     * @type { number }
2028     * @syscap SystemCapability.WindowManager.WindowManager.Core
2029     * @crossplatform
2030     * @since 10
2031     */
2032    /**
2033     * Display height, in pixels.
2034     *
2035     * @type { number }
2036     * @syscap SystemCapability.WindowManager.WindowManager.Core
2037     * @crossplatform
2038     * @atomicservice
2039     * @since arkts {'1.1':'11', '1.2':'20'}
2040     * @arkts 1.1&1.2
2041     */
2042    height: number;
2043
2044    /**
2045     * Display available width, in pixels.
2046     *
2047     * @type { number }
2048     * @syscap SystemCapability.WindowManager.WindowManager.Core
2049     * @crossplatform
2050     * @atomicservice
2051     * @since arkts {'1.1':'12', '1.2':'20'}
2052     * @arkts 1.1&1.2
2053     */
2054    availableWidth: number;
2055
2056    /**
2057     * Display available height, in pixels.
2058     *
2059     * @type { number }
2060     * @syscap SystemCapability.WindowManager.WindowManager.Core
2061     * @crossplatform
2062     * @atomicservice
2063     * @since arkts {'1.1':'12', '1.2':'20'}
2064     * @arkts 1.1&1.2
2065     */
2066    availableHeight: number;
2067
2068    /**
2069     * Display resolution, that is, the number of pixels per inch.
2070     *
2071     * @type { number }
2072     * @syscap SystemCapability.WindowManager.WindowManager.Core
2073     * @since 7
2074     */
2075    /**
2076     * Display resolution, that is, the number of pixels per inch.
2077     *
2078     * @type { number }
2079     * @syscap SystemCapability.WindowManager.WindowManager.Core
2080     * @crossplatform
2081     * @since 11
2082     */
2083    /**
2084     * Display resolution, that is, the number of pixels per inch.
2085     *
2086     * @type { number }
2087     * @syscap SystemCapability.WindowManager.WindowManager.Core
2088     * @crossplatform
2089     * @atomicservice
2090     * @since arkts {'1.1':'12', '1.2':'20'}
2091     * @arkts 1.1&1.2
2092     */
2093    densityDPI: number;
2094
2095    /**
2096     * Display orientation.
2097     *
2098     * @type { Orientation }
2099     * @syscap SystemCapability.WindowManager.WindowManager.Core
2100     * @crossplatform
2101     * @since 10
2102     */
2103    /**
2104     * Display orientation.
2105     *
2106     * @type { Orientation }
2107     * @syscap SystemCapability.WindowManager.WindowManager.Core
2108     * @crossplatform
2109     * @atomicservice
2110     * @since arkts {'1.1':'12', '1.2':'20'}
2111     * @arkts 1.1&1.2
2112     */
2113    orientation: Orientation;
2114
2115    /**
2116     * Display density, in pixels. which is the scaling coefficient between physical pixels and logical pixels. The value for a low-resolution display is 1.0.
2117     *
2118     * @type { number }
2119     * @syscap SystemCapability.WindowManager.WindowManager.Core
2120     * @since 7
2121     */
2122    /**
2123     * Display density, in pixels. which is the scaling coefficient between physical pixels and logical pixels. The value for a low-resolution display is 1.0.
2124     *
2125     * @type { number }
2126     * @syscap SystemCapability.WindowManager.WindowManager.Core
2127     * @crossplatform
2128     * @atomicservice
2129     * @since arkts {'1.1':'11', '1.2':'20'}
2130     * @arkts 1.1&1.2
2131     */
2132    densityPixels: number;
2133
2134    /**
2135     * Text scale density of the display.
2136     *
2137     * @type { number }
2138     * @syscap SystemCapability.WindowManager.WindowManager.Core
2139     * @since 7
2140     */
2141    /**
2142     * Text scale density of the display.
2143     *
2144     * @type { number }
2145     * @syscap SystemCapability.WindowManager.WindowManager.Core
2146     * @crossplatform
2147     * @since 11
2148     */
2149    /**
2150     * Text scale density of the display.
2151     *
2152     * @type { number }
2153     * @syscap SystemCapability.WindowManager.WindowManager.Core
2154     * @crossplatform
2155     * @atomicservice
2156     * @since arkts {'1.1':'12', '1.2':'20'}
2157     * @arkts 1.1&1.2
2158     */
2159    scaledDensity: number;
2160
2161    /**
2162     * DPI on the x-axis.
2163     *
2164     * @type { number }
2165     * @syscap SystemCapability.WindowManager.WindowManager.Core
2166     * @since 7
2167     */
2168    /**
2169     * DPI on the x-axis.
2170     *
2171     * @type { number }
2172     * @syscap SystemCapability.WindowManager.WindowManager.Core
2173     * @atomicservice
2174     * @since 12
2175     */
2176    /**
2177     * DPI on the x-axis.
2178     *
2179     * @type { number }
2180     * @syscap SystemCapability.WindowManager.WindowManager.Core
2181     * @crossplatform
2182     * @atomicservice
2183     * @since 20
2184     * @arkts 1.1&1.2
2185     */
2186    xDPI: number;
2187
2188    /**
2189     * DPI on the y-axis.
2190     *
2191     * @type { number }
2192     * @syscap SystemCapability.WindowManager.WindowManager.Core
2193     * @since 7
2194     */
2195    /**
2196     * DPI on the y-axis.
2197     *
2198     * @type { number }
2199     * @syscap SystemCapability.WindowManager.WindowManager.Core
2200     * @atomicservice
2201     * @since 12
2202     */
2203    /**
2204     * DPI on the y-axis.
2205     *
2206     * @type { number }
2207     * @syscap SystemCapability.WindowManager.WindowManager.Core
2208     * @crossplatform
2209     * @atomicservice
2210     * @since 20
2211     * @arkts 1.1&1.2
2212     */
2213    yDPI: number;
2214
2215    /**
2216     * The shape of screen
2217     *
2218     * @type { ?ScreenShape }
2219     * @syscap SystemCapability.WindowManager.WindowManager.Core
2220     * @atomicservice
2221     * @since 18
2222     */
2223    screenShape?: ScreenShape;
2224
2225    /**
2226     * All supported color spaces.
2227     *
2228     * @type { Array<colorSpaceManager.ColorSpace> }
2229     * @syscap SystemCapability.WindowManager.WindowManager.Core
2230     * @since 11
2231     */
2232    /**
2233     * All supported color spaces.
2234     *
2235     * @type { Array<colorSpaceManager.ColorSpace> }
2236     * @syscap SystemCapability.WindowManager.WindowManager.Core
2237     * @atomicservice
2238     * @since arkts {'1.1':'12', '1.2':'20'}
2239     * @arkts 1.1&1.2
2240     */
2241    colorSpaces: Array<colorSpaceManager.ColorSpace>;
2242
2243    /**
2244     * All supported HDR formats.
2245     *
2246     * @type { Array<hdrCapability.HDRFormat> }
2247     * @syscap SystemCapability.WindowManager.WindowManager.Core
2248     * @since 11
2249     */
2250    /**
2251     * All supported HDR formats.
2252     *
2253     * @type { Array<hdrCapability.HDRFormat> }
2254     * @syscap SystemCapability.WindowManager.WindowManager.Core
2255     * @atomicservice
2256     * @since arkts {'1.1':'12', '1.2':'20'}
2257     * @arkts 1.1&1.2
2258     */
2259    hdrFormats: Array<hdrCapability.HDRFormat>;
2260
2261    /**
2262     * The source mode of display
2263     *
2264     * @type { ?DisplaySourceMode }
2265     * @syscap SystemCapability.Window.SessionManager
2266     * @atomicservice
2267     * @since 19
2268     */
2269    sourceMode?: DisplaySourceMode;
2270
2271    /**
2272     * Coordinates of the top-left corner of the display relative to the main display.
2273     *
2274     * @type { ?number }
2275     * @syscap SystemCapability.Window.SessionManager
2276     * @atomicservice
2277     * @since 19
2278     */
2279    x?: number;
2280
2281    /**
2282     * Coordinates of the top-left corner of the display relative to the main display.
2283     *
2284     * @type { ?number }
2285     * @syscap SystemCapability.Window.SessionManager
2286     * @atomicservice
2287     * @since 19
2288     */
2289    y?: number;
2290
2291    /**
2292     * All supported refresh rates.
2293     *
2294     * @type { ?Array<number> }
2295     * @syscap SystemCapability.Window.SessionManager
2296     * @atomicservice
2297     * @since 20
2298     */
2299    supportedRefreshRates?: Array<number>;
2300
2301    /**
2302     * Obtain the cutout info of the display.
2303     *
2304     * @param { AsyncCallback<CutoutInfo> } callback
2305     * @throws { BusinessError } 1400001 - Invalid display or screen.
2306     * @syscap SystemCapability.WindowManager.WindowManager.Core
2307     * @since 9
2308     */
2309    /**
2310     * Obtain the cutout info of the display.
2311     *
2312     * @param { AsyncCallback<CutoutInfo> } callback
2313     * @throws { BusinessError } 1400001 - Invalid display or screen.
2314     * @syscap SystemCapability.WindowManager.WindowManager.Core
2315     * @atomicservice
2316     * @since arkts {'1.1':'12', '1.2':'20'}
2317     * @arkts 1.1&1.2
2318     */
2319    getCutoutInfo(callback: AsyncCallback<CutoutInfo>): void;
2320
2321    /**
2322     * Obtain the cutout info of the display.
2323     *
2324     * @returns { Promise<CutoutInfo> }
2325     * @throws { BusinessError } 1400001 - Invalid display or screen.
2326     * @syscap SystemCapability.WindowManager.WindowManager.Core
2327     * @since 9
2328     */
2329    /**
2330     * Obtain the cutout info of the display.
2331     *
2332     * @returns { Promise<CutoutInfo> }
2333     * @throws { BusinessError } 1400001 - Invalid display or screen.
2334     * @syscap SystemCapability.WindowManager.WindowManager.Core
2335     * @atomicservice
2336     * @since arkts {'1.1':'12', '1.2':'20'}
2337     * @arkts 1.1&1.2
2338     */
2339    getCutoutInfo(): Promise<CutoutInfo>;
2340
2341    /**
2342     * Check if current display has immersive window.
2343     *
2344     * @param { AsyncCallback<boolean> } callback
2345     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
2346     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
2347     * @throws { BusinessError } 1400001 - Invalid display or screen.
2348     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
2349     * @syscap SystemCapability.Window.SessionManager
2350     * @systemapi Hide this for inner system use.
2351     * @since 11
2352     */
2353    hasImmersiveWindow(callback: AsyncCallback<boolean>): void;
2354
2355    /**
2356     * Check if current display has immersive window.
2357     *
2358     * @returns { Promise<boolean> }
2359     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
2360     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
2361     * @throws { BusinessError } 1400001 - Invalid display or screen.
2362     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
2363     * @syscap SystemCapability.Window.SessionManager
2364     * @systemapi Hide this for inner system use.
2365     * @since 11
2366     */
2367    hasImmersiveWindow(): Promise<boolean>;
2368
2369    /**
2370     * Obtain the available area of the display.
2371     *
2372     * @returns { Promise<Rect> }
2373     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
2374     * @throws { BusinessError } 1400001 - Invalid display or screen.
2375     * @syscap SystemCapability.Window.SessionManager
2376     * @atomicservice
2377     * @since 12
2378     */
2379    getAvailableArea(): Promise<Rect>;
2380
2381    /**
2382     * Get the live crease region in the current display mode.
2383     *
2384     * @returns { FoldCreaseRegion } Fold crease region in the current display mode.
2385     * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
2386     * @throws { BusinessError } 1400003 - This display manager service works abnormally.
2387     * @syscap SystemCapability.Window.SessionManager
2388     * @since 20
2389     */
2390    getLiveCreaseRegion(): FoldCreaseRegion;
2391
2392    /**
2393    * Register the callback for available area changes.
2394    *
2395    * @param { 'availableAreaChange' } type - the event of available area changes
2396    * @param { Callback<Rect> } callback - Callback used to return the available area
2397    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2398    * <br>2. Incorrect parameter types.
2399    * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
2400    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
2401    * @syscap SystemCapability.Window.SessionManager
2402    * @atomicservice
2403    * @since 12
2404    */
2405    on(type: 'availableAreaChange', callback: Callback<Rect>): void;
2406
2407    /**
2408    * Unregister the callback for available area changes.
2409    *
2410    * @param { 'availableAreaChange' } type - the event of available area changes
2411    * @param { Callback<Rect> } [callback] - Callback used to return the available area
2412    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2413    * <br>2. Incorrect parameter types.
2414    * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
2415    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
2416    * @syscap SystemCapability.Window.SessionManager
2417    * @atomicservice
2418    * @since 12
2419    */
2420    off(type: 'availableAreaChange', callback?: Callback<Rect>): void;
2421
2422    /**
2423    * Get current display capability, including foldstatus, displaymode, rotation, and orientation information.
2424    *
2425    * @returns { string } Indicates the current foldstatus, displaymode, rotation, and orientation information.
2426    * @throws { BusinessError } 801 - Capability not supported.Function getDisplayCapability can not work correctly due to limited device capabilities.
2427    * @throws { BusinessError } 1400001 - Invalid display or screen.
2428    * @throws { BusinessError } 1400003 - This display manager service works abnormally.
2429    * @syscap SystemCapability.Window.SessionManager
2430    * @atomicservice
2431    * @since 18
2432    * @test
2433    */
2434    getDisplayCapability(): string;
2435  }
2436
2437  /**
2438   * Coordinates of a point.
2439   *
2440   * @interface Position
2441   * @syscap SystemCapability.Window.SessionManager
2442   * @since 20
2443   */
2444  interface Position {
2445    /**
2446     * Indicates the x-axis coordinates
2447     *
2448     * @type { number }
2449     * @syscap SystemCapability.Window.SessionManager
2450     * @since 20
2451     */
2452    x: number;
2453
2454    /**
2455     * Indicates the y-axis coordinates
2456     *
2457     * @type { number }
2458     * @syscap SystemCapability.Window.SessionManager
2459     * @since 20
2460     */
2461    y: number;
2462  }
2463
2464  /**
2465   * Coordinates of a point relative to specified display.
2466   *
2467   * @interface RelativePosition
2468   * @syscap SystemCapability.Window.SessionManager
2469   * @since 20
2470   */
2471  interface RelativePosition {
2472    /**
2473     * Indicates the display.
2474     *
2475     * @type { number }
2476     * @syscap SystemCapability.Window.SessionManager
2477     * @since 20
2478     */
2479    displayId: number;
2480
2481    /**
2482     * Indicates the coordinates relative to the display.
2483     *
2484     * @type { Position }
2485     * @syscap SystemCapability.Window.SessionManager
2486     * @since 20
2487     */
2488    position: Position;
2489  }
2490}
2491
2492export default display;
2493