• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-2024 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
21
22import font from './@ohos.font';
23import mediaQuery from './@ohos.mediaquery';
24import type inspector from './@ohos.arkui.inspector';
25import type observer from './@ohos.arkui.observer';
26import promptAction from './@ohos.promptAction';
27import router from './@ohos.router';
28import type componentUtils from './@ohos.arkui.componentUtils';
29import { ComponentContent, FrameNode } from './@ohos.arkui.node';
30import type { AnimatorOptions, AnimatorResult } from './@ohos.animator';
31import type { Callback, AsyncCallback } from './@ohos.base';
32import { MeasureOptions } from './@ohos.measure';
33import type componentSnapshot from './@ohos.arkui.componentSnapshot';
34import type dragController from './@ohos.arkui.dragController';
35import image from './@ohos.multimedia.image';
36import type common from './@ohos.app.ability.common';
37import type pointer from './@ohos.multimodalInput.pointer';
38
39/**
40 * class Font
41 *
42 * @syscap SystemCapability.ArkUI.ArkUI.Full
43 * @crossplatform
44 * @since 10
45 */
46/**
47 * class Font
48 *
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @crossplatform
51 * @atomicservice
52 * @since 11
53 */
54export class Font {
55  /**
56   * Register a customized font in the FontManager.
57   *
58   * @param { font.FontOptions } options - FontOptions
59   * @syscap SystemCapability.ArkUI.ArkUI.Full
60   * @crossplatform
61   * @since 10
62   */
63  /**
64   * Register a customized font in the FontManager.
65   *
66   * @param { font.FontOptions } options - FontOptions
67   * @syscap SystemCapability.ArkUI.ArkUI.Full
68   * @crossplatform
69   * @atomicservice
70   * @since 11
71   */
72  registerFont(options: font.FontOptions): void;
73
74  /**
75   * Gets a list of fonts supported by system.
76   * @returns { Array<string> } A list of font names
77   * @syscap SystemCapability.ArkUI.ArkUI.Full
78   * @since 10
79   */
80  /**
81   * Gets a list of fonts supported by system.
82   * @returns { Array<string> } A list of font names
83   * @syscap SystemCapability.ArkUI.ArkUI.Full
84   * @atomicservice
85   * @since 11
86   */
87  getSystemFontList(): Array<string>;
88
89  /**
90   * Get font details according to the font name.
91   * @param { string } fontName - font name
92   * @returns { font.FontInfo } Returns the font info
93   * @syscap SystemCapability.ArkUI.ArkUI.Full
94   * @since 10
95   */
96  /**
97   * Get font details according to the font name.
98   * @param { string } fontName - font name
99   * @returns { font.FontInfo } Returns the font info
100   * @syscap SystemCapability.ArkUI.ArkUI.Full
101   * @atomicservice
102   * @since 11
103   */
104  getFontByName(fontName: string): font.FontInfo;
105}
106
107/**
108 * class MediaQuery
109 *
110 * @syscap SystemCapability.ArkUI.ArkUI.Full
111 * @crossplatform
112 * @since 10
113 */
114/**
115 * class MediaQuery
116 *
117 * @syscap SystemCapability.ArkUI.ArkUI.Full
118 * @crossplatform
119 * @atomicservice
120 * @since 11
121 */
122export class MediaQuery {
123  /**
124   * Sets the media query criteria and returns the corresponding listening handle
125   *
126   * @param { string } condition - media conditions
127   * @returns { mediaQuery.MediaQueryListener } the corresponding listening handle
128   * @syscap SystemCapability.ArkUI.ArkUI.Full
129   * @crossplatform
130   * @since 10
131   */
132  /**
133   * Sets the media query criteria and returns the corresponding listening handle
134   *
135   * @param { string } condition - media conditions
136   * @returns { mediaQuery.MediaQueryListener } the corresponding listening handle
137   * @syscap SystemCapability.ArkUI.ArkUI.Full
138   * @crossplatform
139   * @atomicservice
140   * @since 11
141   */
142  matchMediaSync(condition: string): mediaQuery.MediaQueryListener;
143}
144
145/**
146 * class UIInspector
147 * @syscap SystemCapability.ArkUI.ArkUI.Full
148 * @crossplatform
149 * @since 10
150 */
151/**
152 * class UIInspector
153 * @syscap SystemCapability.ArkUI.ArkUI.Full
154 * @crossplatform
155 * @atomicservice
156 * @since 11
157 */
158export class UIInspector {
159  /**
160   * Sets the component after layout or draw criteria and returns the corresponding listening handle
161   * @param { string } id - component id.
162   * @returns { inspector.ComponentObserver } create listener for observer component event.
163   * @syscap SystemCapability.ArkUI.ArkUI.Full
164   * @crossplatform
165   * @since 10
166   */
167  /**
168   * Sets the component after layout or draw criteria and returns the corresponding listening handle
169   * @param { string } id - component id.
170   * @returns { inspector.ComponentObserver } create listener for observer component event.
171   * @syscap SystemCapability.ArkUI.ArkUI.Full
172   * @crossplatform
173   * @atomicservice
174   * @since 11
175   */
176  createComponentObserver(id: string): inspector.ComponentObserver;
177}
178
179/**
180 * class Router
181 *
182 * @syscap SystemCapability.ArkUI.ArkUI.Full
183 * @crossplatform
184 * @since 10
185 */
186/**
187 * class Router
188 *
189 * @syscap SystemCapability.ArkUI.ArkUI.Full
190 * @crossplatform
191 * @atomicservice
192 * @since 11
193 */
194/**
195 * class Router
196 *
197 * @syscap SystemCapability.ArkUI.ArkUI.Full
198 * @crossplatform
199 * @atomicservice
200 * @since 12
201 */
202export class Router {
203  /**
204   * Navigates to a specified page in the application based on the page URL and parameters.
205   *
206   * @param { router.RouterOptions } options - Options.
207   * @param { AsyncCallback<void> } callback - the callback of pushUrl.
208   * @throws { BusinessError } 401 - Parameter error. Possible causes:
209   * <br> 1. Mandatory parameters are left unspecified.
210   * <br> 2. Incorrect parameters types.
211   * <br> 3. Parameter verification failed.
212   * @throws { BusinessError } 100001 - Internal error.
213   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
214   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
215   * @syscap SystemCapability.ArkUI.ArkUI.Full
216   * @crossplatform
217   * @since 10
218   */
219  /**
220   * Navigates to a specified page in the application based on the page URL and parameters.
221   *
222   * @param { router.RouterOptions } options - Options.
223   * @param { AsyncCallback<void> } callback - the callback of pushUrl.
224   * @throws { BusinessError } 401 - Parameter error. Possible causes:
225   * <br> 1. Mandatory parameters are left unspecified.
226   * <br> 2. Incorrect parameters types.
227   * <br> 3. Parameter verification failed.
228   * @throws { BusinessError } 100001 - Internal error.
229   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
230   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
231   * @syscap SystemCapability.ArkUI.ArkUI.Full
232   * @crossplatform
233   * @atomicservice
234   * @since 11
235   */
236  pushUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void;
237
238  /**
239   * Navigates to a specified page in the application based on the page URL and parameters.
240   *
241   * @param { router.RouterOptions } options - Options.
242   * @returns { Promise<void> } the promise returned by the function.
243   * @throws { BusinessError } 401 - Parameter error. Possible causes:
244   * <br> 1. Mandatory parameters are left unspecified.
245   * <br> 2. Incorrect parameters types.
246   * <br> 3. Parameter verification failed.
247   * @throws { BusinessError } 100001 - Internal error.
248   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
249   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
250   * @syscap SystemCapability.ArkUI.ArkUI.Full
251   * @crossplatform
252   * @since 10
253   */
254  /**
255   * Navigates to a specified page in the application based on the page URL and parameters.
256   *
257   * @param { router.RouterOptions } options - Options.
258   * @returns { Promise<void> } the promise returned by the function.
259   * @throws { BusinessError } 401 - Parameter error. Possible causes:
260   * <br> 1. Mandatory parameters are left unspecified.
261   * <br> 2. Incorrect parameters types.
262   * <br> 3. Parameter verification failed.
263   * @throws { BusinessError } 100001 - Internal error.
264   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
265   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
266   * @syscap SystemCapability.ArkUI.ArkUI.Full
267   * @crossplatform
268   * @atomicservice
269   * @since 11
270   */
271  pushUrl(options: router.RouterOptions): Promise<void>;
272
273  /**
274   * Navigates to a specified page in the application based on the page URL and parameters.
275   *
276   * @param { router.RouterOptions } options - Options.
277   * @param { router.RouterMode } mode - RouterMode.
278   * @param { AsyncCallback<void> } callback - the callback of pushUrl.
279   * @throws { BusinessError } 401 - Parameter error. Possible causes:
280   * <br> 1. Mandatory parameters are left unspecified.
281   * <br> 2. Incorrect parameters types.
282   * <br> 3. Parameter verification failed.
283   * @throws { BusinessError } 100001 - Internal error.
284   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
285   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
286   * @syscap SystemCapability.ArkUI.ArkUI.Full
287   * @crossplatform
288   * @since 10
289   */
290  /**
291   * Navigates to a specified page in the application based on the page URL and parameters.
292   *
293   * @param { router.RouterOptions } options - Options.
294   * @param { router.RouterMode } mode - RouterMode.
295   * @param { AsyncCallback<void> } callback - the callback of pushUrl.
296   * @throws { BusinessError } 401 - Parameter error. Possible causes:
297   * <br> 1. Mandatory parameters are left unspecified.
298   * <br> 2. Incorrect parameters types.
299   * <br> 3. Parameter verification failed.
300   * @throws { BusinessError } 100001 - Internal error.
301   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
302   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
303   * @syscap SystemCapability.ArkUI.ArkUI.Full
304   * @crossplatform
305   * @atomicservice
306   * @since 11
307   */
308  pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
309
310  /**
311   * Navigates to a specified page in the application based on the page URL and parameters.
312   *
313   * @param { router.RouterOptions } options - Options.
314   * @param { router.RouterMode } mode - RouterMode.
315   * @returns { Promise<void> } the promise returned by the function.
316   * @throws { BusinessError } 401 - Parameter error. Possible causes:
317   * <br> 1. Mandatory parameters are left unspecified.
318   * <br> 2. Incorrect parameters types.
319   * <br> 3. Parameter verification failed.
320   * @throws { BusinessError } 100001 - Internal error.
321   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
322   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
323   * @syscap SystemCapability.ArkUI.ArkUI.Full
324   * @crossplatform
325   * @since 10
326   */
327  /**
328   * Navigates to a specified page in the application based on the page URL and parameters.
329   *
330   * @param { router.RouterOptions } options - Options.
331   * @param { router.RouterMode } mode - RouterMode.
332   * @returns { Promise<void> } the promise returned by the function.
333   * @throws { BusinessError } 401 - Parameter error. Possible causes:
334   * <br> 1. Mandatory parameters are left unspecified.
335   * <br> 2. Incorrect parameters types.
336   * <br> 3. Parameter verification failed.
337   * @throws { BusinessError } 100001 - Internal error.
338   * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
339   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
340   * @syscap SystemCapability.ArkUI.ArkUI.Full
341   * @crossplatform
342   * @atomicservice
343   * @since 11
344   */
345  pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void>;
346
347  /**
348   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
349   *
350   * @param { router.RouterOptions } options - Options.
351   * @param { AsyncCallback<void> } callback - the callback of replaceUrl.
352   * @throws { BusinessError } 401 - Parameter error. Possible causes:
353   * <br> 1. Mandatory parameters are left unspecified.
354   * <br> 2. Incorrect parameters types.
355   * <br> 3. Parameter verification failed.
356   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
357   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
358   * @syscap SystemCapability.ArkUI.ArkUI.Full
359   * @crossplatform
360   * @since 10
361   */
362  /**
363   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
364   *
365   * @param { router.RouterOptions } options - Options.
366   * @param { AsyncCallback<void> } callback - the callback of replaceUrl.
367   * @throws { BusinessError } 401 - Parameter error. Possible causes:
368   * <br> 1. Mandatory parameters are left unspecified.
369   * <br> 2. Incorrect parameters types.
370   * <br> 3. Parameter verification failed.
371   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
372   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
373   * @syscap SystemCapability.ArkUI.ArkUI.Full
374   * @crossplatform
375   * @atomicservice
376   * @since 11
377   */
378  replaceUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void;
379
380  /**
381   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
382   *
383   * @param { router.RouterOptions } options - Options.
384   * @returns { Promise<void> } the promise returned by the function.
385   * @throws { BusinessError } 401 - Parameter error. Possible causes:
386   * <br> 1. Mandatory parameters are left unspecified.
387   * <br> 2. Incorrect parameters types.
388   * <br> 3. Parameter verification failed.
389   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
390   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
391   * @syscap SystemCapability.ArkUI.ArkUI.Full
392   * @crossplatform
393   * @since 10
394   */
395  /**
396   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
397   *
398   * @param { router.RouterOptions } options - Options.
399   * @returns { Promise<void> } the promise returned by the function.
400   * @throws { BusinessError } 401 - Parameter error. Possible causes:
401   * <br> 1. Mandatory parameters are left unspecified.
402   * <br> 2. Incorrect parameters types.
403   * <br> 3. Parameter verification failed.
404   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
405   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
406   * @syscap SystemCapability.ArkUI.ArkUI.Full
407   * @crossplatform
408   * @atomicservice
409   * @since 11
410   */
411  replaceUrl(options: router.RouterOptions): Promise<void>;
412
413  /**
414   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
415   *
416   * @param { router.RouterOptions } options - Options.
417   * @param { router.RouterMode } mode - RouterMode.
418   * @param { AsyncCallback<void> } callback - the callback of replaceUrl.
419   * @throws { BusinessError } 401 - Parameter error. Possible causes:
420   * <br> 1. Mandatory parameters are left unspecified.
421   * <br> 2. Incorrect parameters types.
422   * <br> 3. Parameter verification failed.
423   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
424   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
425   * @syscap SystemCapability.ArkUI.ArkUI.Full
426   * @crossplatform
427   * @since 10
428   */
429  /**
430   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
431   *
432   * @param { router.RouterOptions } options - Options.
433   * @param { router.RouterMode } mode - RouterMode.
434   * @param { AsyncCallback<void> } callback - the callback of replaceUrl.
435   * @throws { BusinessError } 401 - Parameter error. Possible causes:
436   * <br> 1. Mandatory parameters are left unspecified.
437   * <br> 2. Incorrect parameters types.
438   * <br> 3. Parameter verification failed.
439   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
440   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
441   * @syscap SystemCapability.ArkUI.ArkUI.Full
442   * @crossplatform
443   * @atomicservice
444   * @since 11
445   */
446  replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
447
448  /**
449   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
450   *
451   * @param { router.RouterOptions } options - Options.
452   * @param { router.RouterMode } mode - RouterMode.
453   * @returns { Promise<void> } the promise returned by the function.
454   * @throws { BusinessError } 401 - Parameter error. Possible causes:
455   * <br> 1. Mandatory parameters are left unspecified.
456   * <br> 2. Incorrect parameters types.
457   * <br> 3. Parameter verification failed.
458   * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system.
459   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
460   * @syscap SystemCapability.ArkUI.ArkUI.Full
461   * @crossplatform
462   * @since 10
463   */
464  /**
465   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
466   *
467   * @param { router.RouterOptions } options - Options.
468   * @param { router.RouterMode } mode - RouterMode.
469   * @returns { Promise<void> } the promise returned by the function.
470   * @throws { BusinessError } 401 - Parameter error. Possible causes:
471   * <br> 1. Mandatory parameters are left unspecified.
472   * <br> 2. Incorrect parameters types.
473   * <br> 3. Parameter verification failed.
474   * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system.
475   * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist.
476   * @syscap SystemCapability.ArkUI.ArkUI.Full
477   * @crossplatform
478   * @atomicservice
479   * @since 11
480   */
481  replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void>;
482
483  /**
484   * Returns to the previous page or a specified page.
485   *
486   * @param { router.RouterOptions } options - Options.
487   * @syscap SystemCapability.ArkUI.ArkUI.Full
488   * @crossplatform
489   * @since 10
490   */
491  /**
492   * Returns to the previous page or a specified page.
493   *
494   * @param { router.RouterOptions } options - Options.
495   * @syscap SystemCapability.ArkUI.ArkUI.Full
496   * @crossplatform
497   * @atomicservice
498   * @since 11
499   */
500  back(options?: router.RouterOptions): void;
501
502  /**
503   * Returns to the specified page.
504   *
505   * @param { number } index - index of page.
506   * @param { Object } [params] - params of page.
507   * @syscap SystemCapability.ArkUI.ArkUI.Full
508   * @crossplatform
509   * @atomicservice
510   * @since 12
511   */
512  back(index: number, params?: Object): void;
513
514  /**
515   * Clears all historical pages and retains only the current page at the top of the stack.
516   *
517   * @syscap SystemCapability.ArkUI.ArkUI.Full
518   * @crossplatform
519   * @since 10
520   */
521  /**
522   * Clears all historical pages and retains only the current page at the top of the stack.
523   *
524   * @syscap SystemCapability.ArkUI.ArkUI.Full
525   * @crossplatform
526   * @atomicservice
527   * @since 11
528   */
529  clear(): void;
530
531  /**
532   * Obtains the number of pages in the current stack.
533   *
534   * @returns { string } Number of pages in the stack. The maximum value is 32.
535   * @syscap SystemCapability.ArkUI.ArkUI.Full
536   * @crossplatform
537   * @since 10
538   */
539  /**
540   * Obtains the number of pages in the current stack.
541   *
542   * @returns { string } Number of pages in the stack. The maximum value is 32.
543   * @syscap SystemCapability.ArkUI.ArkUI.Full
544   * @crossplatform
545   * @atomicservice
546   * @since 11
547   */
548  getLength(): string;
549
550  /**
551   * Obtains information about the current page state.
552   *
553   * @returns { router.RouterState } Page state.
554   * @syscap SystemCapability.ArkUI.ArkUI.Full
555   * @crossplatform
556   * @since 10
557   */
558  /**
559   * Obtains information about the current page state.
560   *
561   * @returns { router.RouterState } Page state.
562   * @syscap SystemCapability.ArkUI.ArkUI.Full
563   * @crossplatform
564   * @atomicservice
565   * @since 11
566   */
567  getState(): router.RouterState;
568
569 /**
570  * Obtains page information by index.
571  *
572  * @param { number } index - Index of page.
573  * @returns { router.RouterState | undefined } Page state.
574  * @syscap SystemCapability.ArkUI.ArkUI.Full
575  * @crossplatform
576  * @atomicservice
577  * @since 12
578  */
579  getStateByIndex(index: number): router.RouterState | undefined;
580
581 /**
582  * Obtains page information by url.
583  *
584  * @param { string } url - URL of page.
585  * @returns { Array<router.RouterState> } Page state.
586  * @syscap SystemCapability.ArkUI.ArkUI.Full
587  * @crossplatform
588  * @atomicservice
589  * @since 12
590  */
591  getStateByUrl(url: string): Array<router.RouterState>;
592
593  /**
594   * Pop up alert dialog to ask whether to back.
595   *
596   * @param { router.EnableAlertOptions } options - Options.
597   * @throws { BusinessError } 401 - Parameter error. Possible causes:
598   * <br> 1. Mandatory parameters are left unspecified.
599   * <br> 2. Incorrect parameters types.
600   * <br> 3. Parameter verification failed.
601   * @throws { BusinessError } 100001 - Internal error.
602   * @syscap SystemCapability.ArkUI.ArkUI.Full
603   * @crossplatform
604   * @since 10
605   */
606  /**
607   * Pop up alert dialog to ask whether to back.
608   *
609   * @param { router.EnableAlertOptions } options - Options.
610   * @throws { BusinessError } 401 - Parameter error. Possible causes:
611   * <br> 1. Mandatory parameters are left unspecified.
612   * <br> 2. Incorrect parameters types.
613   * <br> 3. Parameter verification failed.
614   * @throws { BusinessError } 100001 - Internal error.
615   * @syscap SystemCapability.ArkUI.ArkUI.Full
616   * @crossplatform
617   * @atomicservice
618   * @since 11
619   */
620  showAlertBeforeBackPage(options: router.EnableAlertOptions): void;
621
622  /**
623   * Hide alert before back page.
624   *
625   * @syscap SystemCapability.ArkUI.ArkUI.Full
626   * @crossplatform
627   * @since 10
628   */
629  /**
630   * Hide alert before back page.
631   *
632   * @syscap SystemCapability.ArkUI.ArkUI.Full
633   * @crossplatform
634   * @atomicservice
635   * @since 11
636   */
637  hideAlertBeforeBackPage(): void;
638
639  /**
640   * Obtains information about the current page params.
641   *
642   * @returns { Object } Page params.
643   * @syscap SystemCapability.ArkUI.ArkUI.Full
644   * @crossplatform
645   * @since 10
646   */
647  /**
648   * Obtains information about the current page params.
649   *
650   * @returns { Object } Page params.
651   * @syscap SystemCapability.ArkUI.ArkUI.Full
652   * @crossplatform
653   * @atomicservice
654   * @since 11
655   */
656  getParams(): Object;
657
658  /**
659   * Navigates to a specified page in the application based on the page URL and parameters.
660   * @param { router.NamedRouterOptions } options - Options.
661   * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute.
662   * @throws { BusinessError } 401 - Parameter error. Possible causes:
663   * <br> 1. Mandatory parameters are left unspecified.
664   * <br> 2. Incorrect parameters types.
665   * <br> 3. Parameter verification failed.
666   * @throws { BusinessError } 100001 - Internal error.
667   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
668   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
669   * @syscap SystemCapability.ArkUI.ArkUI.Full
670   * @crossplatform
671   * @since 10
672   */
673  /**
674   * Navigates to a specified page in the application based on the page URL and parameters.
675   * @param { router.NamedRouterOptions } options - Options.
676   * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute.
677   * @throws { BusinessError } 401 - Parameter error. Possible causes:
678   * <br> 1. Mandatory parameters are left unspecified.
679   * <br> 2. Incorrect parameters types.
680   * <br> 3. Parameter verification failed.
681   * @throws { BusinessError } 100001 - Internal error.
682   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
683   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
684   * @syscap SystemCapability.ArkUI.ArkUI.Full
685   * @crossplatform
686   * @atomicservice
687   * @since 11
688   */
689  pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void;
690
691  /**
692   * Navigates to a specified page in the application based on the page URL and parameters.
693   * @param { router.NamedRouterOptions } options - Options.
694   * @returns { Promise<void> } the promise returned by the function.
695   * @throws { BusinessError } 401 - Parameter error. Possible causes:
696   * <br> 1. Mandatory parameters are left unspecified.
697   * <br> 2. Incorrect parameters types.
698   * <br> 3. Parameter verification failed.
699   * @throws { BusinessError } 100001 - Internal error.
700   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
701   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
702   * @syscap SystemCapability.ArkUI.ArkUI.Full
703   * @crossplatform
704   * @since 10
705   */
706  /**
707   * Navigates to a specified page in the application based on the page URL and parameters.
708   * @param { router.NamedRouterOptions } options - Options.
709   * @returns { Promise<void> } the promise returned by the function.
710   * @throws { BusinessError } 401 - Parameter error. Possible causes:
711   * <br> 1. Mandatory parameters are left unspecified.
712   * <br> 2. Incorrect parameters types.
713   * <br> 3. Parameter verification failed.
714   * @throws { BusinessError } 100001 - Internal error.
715   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
716   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
717   * @syscap SystemCapability.ArkUI.ArkUI.Full
718   * @crossplatform
719   * @atomicservice
720   * @since 11
721   */
722  pushNamedRoute(options: router.NamedRouterOptions): Promise<void>;
723
724  /**
725   * Navigates to a specified page in the application based on the page URL and parameters.
726   * @param { router.NamedRouterOptions } options - Options.
727   * @param { router.RouterMode } mode - RouterMode.
728   * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute.
729   * @throws { BusinessError } 401 - Parameter error. Possible causes:
730   * <br> 1. Mandatory parameters are left unspecified.
731   * <br> 2. Incorrect parameters types.
732   * <br> 3. Parameter verification failed.
733   * @throws { BusinessError } 100001 - Internal error.
734   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
735   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
736   * @syscap SystemCapability.ArkUI.ArkUI.Full
737   * @crossplatform
738   * @since 10
739  */
740  /**
741   * Navigates to a specified page in the application based on the page URL and parameters.
742   * @param { router.NamedRouterOptions } options - Options.
743   * @param { router.RouterMode } mode - RouterMode.
744   * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute.
745   * @throws { BusinessError } 401 - Parameter error. Possible causes:
746   * <br> 1. Mandatory parameters are left unspecified.
747   * <br> 2. Incorrect parameters types.
748   * <br> 3. Parameter verification failed.
749   * @throws { BusinessError } 100001 - Internal error.
750   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
751   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
752   * @syscap SystemCapability.ArkUI.ArkUI.Full
753   * @crossplatform
754   * @atomicservice
755   * @since 11
756  */
757  pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
758
759  /**
760   * Navigates to a specified page in the application based on the page URL and parameters.
761   * @param { router.NamedRouterOptions } options - Options.
762   * @param { router.RouterMode } mode - RouterMode.
763   * @returns { Promise<void> } the promise returned by the function.
764   * @throws { BusinessError } 401 - Parameter error. Possible causes:
765   * <br> 1. Mandatory parameters are left unspecified.
766   * <br> 2. Incorrect parameters types.
767   * <br> 3. Parameter verification failed.
768   * @throws { BusinessError } 100001 - Internal error.
769   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
770   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
771   * @syscap SystemCapability.ArkUI.ArkUI.Full
772   * @crossplatform
773   * @since 10
774  */
775  /**
776   * Navigates to a specified page in the application based on the page URL and parameters.
777   * @param { router.NamedRouterOptions } options - Options.
778   * @param { router.RouterMode } mode - RouterMode.
779   * @returns { Promise<void> } the promise returned by the function.
780   * @throws { BusinessError } 401 - Parameter error. Possible causes:
781   * <br> 1. Mandatory parameters are left unspecified.
782   * <br> 2. Incorrect parameters types.
783   * <br> 3. Parameter verification failed.
784   * @throws { BusinessError } 100001 - Internal error.
785   * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
786   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
787   * @syscap SystemCapability.ArkUI.ArkUI.Full
788   * @crossplatform
789   * @atomicservice
790   * @since 11
791  */
792  pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void>;
793
794  /**
795   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
796   * @param { router.NamedRouterOptions } options - Options.
797   * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute.
798   * @throws { BusinessError } 401 - Parameter error. Possible causes:
799   * <br> 1. Mandatory parameters are left unspecified.
800   * <br> 2. Incorrect parameters types.
801   * <br> 3. Parameter verification failed.
802   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
803   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
804   * @syscap SystemCapability.ArkUI.ArkUI.Full
805   * @crossplatform
806   * @since 10
807   */
808  /**
809   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
810   * @param { router.NamedRouterOptions } options - Options.
811   * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute.
812   * @throws { BusinessError } 401 - Parameter error. Possible causes:
813   * <br> 1. Mandatory parameters are left unspecified.
814   * <br> 2. Incorrect parameters types.
815   * <br> 3. Parameter verification failed.
816   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
817   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
818   * @syscap SystemCapability.ArkUI.ArkUI.Full
819   * @crossplatform
820   * @atomicservice
821   * @since 11
822   */
823  replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void;
824
825  /**
826   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
827   * @param { router.NamedRouterOptions } options - Options.
828   * @returns { Promise<void> } the promise returned by the function.
829   * @throws { BusinessError } 401 - Parameter error. Possible causes:
830   * <br> 1. Mandatory parameters are left unspecified.
831   * <br> 2. Incorrect parameters types.
832   * <br> 3. Parameter verification failed.
833   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
834   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
835   * @syscap SystemCapability.ArkUI.ArkUI.Full
836   * @crossplatform
837   * @since 10
838   */
839  /**
840   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
841   * @param { router.NamedRouterOptions } options - Options.
842   * @returns { Promise<void> } the promise returned by the function.
843   * @throws { BusinessError } 401 - if the number of parameters is less than 1 or the type of the url parameter is not string.
844   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
845   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
846   * @syscap SystemCapability.ArkUI.ArkUI.Full
847   * @crossplatform
848   * @atomicservice
849   * @since 11
850   */
851  replaceNamedRoute(options: router.NamedRouterOptions): Promise<void>;
852
853  /**
854   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
855   * @param { router.NamedRouterOptions } options - Options.
856   * @param { router.RouterMode } mode - RouterMode.
857   * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute.
858   * @throws { BusinessError } 401 - Parameter error. Possible causes:
859   * <br> 1. Mandatory parameters are left unspecified.
860   * <br> 2. Incorrect parameters types.
861   * <br> 3. Parameter verification failed.
862   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
863   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
864   * @syscap SystemCapability.ArkUI.ArkUI.Full
865   * @crossplatform
866   * @since 10
867   */
868  /**
869   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
870   * @param { router.NamedRouterOptions } options - Options.
871   * @param { router.RouterMode } mode - RouterMode.
872   * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute.
873   * @throws { BusinessError } 401 - if the number of parameters is less than 1 or the type of the url parameter is not string.
874   * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system.
875   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
876   * @syscap SystemCapability.ArkUI.ArkUI.Full
877   * @crossplatform
878   * @atomicservice
879   * @since 11
880   */
881  replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
882
883  /**
884   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
885   * @param { router.NamedRouterOptions } options - Options.
886   * @param { router.RouterMode } mode - RouterMode.
887   * @returns { Promise<void> } the promise returned by the function.
888   * @throws { BusinessError } 401 - Parameter error. Possible causes:
889   * <br> 1. Mandatory parameters are left unspecified.
890   * <br> 2. Incorrect parameters types.
891   * <br> 3. Parameter verification failed.
892   * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system.
893   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
894   * @syscap SystemCapability.ArkUI.ArkUI.Full
895   * @crossplatform
896   * @since 10
897   */
898  /**
899   * Replaces the current page with another one in the application. The current page is destroyed after replacement.
900   * @param { router.NamedRouterOptions } options - Options.
901   * @param { router.RouterMode } mode - RouterMode.
902   * @returns { Promise<void> } the promise returned by the function.
903   * @throws { BusinessError } 401 - Parameter error. Possible causes:
904   * <br> 1. Mandatory parameters are left unspecified.
905   * <br> 2. Incorrect parameters types.
906   * <br> 3. Parameter verification failed.
907   * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system.
908   * @throws { BusinessError } 100004 - Named route error. The named route does not exist.
909   * @syscap SystemCapability.ArkUI.ArkUI.Full
910   * @crossplatform
911   * @atomicservice
912   * @since 11
913   */
914  replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void>;
915}
916
917/**
918 * class PromptAction
919 *
920 * @syscap SystemCapability.ArkUI.ArkUI.Full
921 * @crossplatform
922 * @since 10
923 */
924/**
925 * class PromptAction
926 *
927 * @syscap SystemCapability.ArkUI.ArkUI.Full
928 * @crossplatform
929 * @atomicservice
930 * @since 11
931 */
932export class PromptAction {
933  /**
934   * Displays the notification text.
935   *
936   * @param { promptAction.ShowToastOptions } options - Options.
937   * @throws { BusinessError } 401 - Parameter error. Possible causes:
938   * <br> 1. Mandatory parameters are left unspecified.
939   * <br> 2. Incorrect parameters types.
940   * <br> 3. Parameter verification failed.
941   * @throws { BusinessError } 100001 - Internal error.
942   * @syscap SystemCapability.ArkUI.ArkUI.Full
943   * @crossplatform
944   * @since 10
945   */
946  /**
947   * Displays the notification text.
948   *
949   * @param { promptAction.ShowToastOptions } options - Options.
950   * @throws { BusinessError } 401 - Parameter error. Possible causes:
951   * <br> 1. Mandatory parameters are left unspecified.
952   * <br> 2. Incorrect parameters types.
953   * <br> 3. Parameter verification failed.
954   * @throws { BusinessError } 100001 - Internal error.
955   * @syscap SystemCapability.ArkUI.ArkUI.Full
956   * @crossplatform
957   * @atomicservice
958   * @since 11
959   */
960  showToast(options: promptAction.ShowToastOptions): void;
961
962  /**
963   * Displays the dialog box.
964   *
965   * @param { promptAction.ShowDialogOptions } options - Options.
966   * @param { AsyncCallback<promptAction.ShowDialogSuccessResponse> } callback - the callback of showDialog.
967   * @throws { BusinessError } 401 - Parameter error. Possible causes:
968   * <br> 1. Mandatory parameters are left unspecified.
969   * <br> 2. Incorrect parameters types.
970   * <br> 3. Parameter verification failed.
971   * @throws { BusinessError } 100001 - Internal error.
972   * @syscap SystemCapability.ArkUI.ArkUI.Full
973   * @crossplatform
974   * @since 10
975   */
976  /**
977   * Displays the dialog box.
978   *
979   * @param { promptAction.ShowDialogOptions } options - Options.
980   * @param { AsyncCallback<promptAction.ShowDialogSuccessResponse> } callback - the callback of showDialog.
981   * @throws { BusinessError } 401 - Parameter error. Possible causes:
982   * <br> 1. Mandatory parameters are left unspecified.
983   * <br> 2. Incorrect parameters types.
984   * <br> 3. Parameter verification failed.
985   * @throws { BusinessError } 100001 - Internal error.
986   * @syscap SystemCapability.ArkUI.ArkUI.Full
987   * @crossplatform
988   * @atomicservice
989   * @since 11
990   */
991  /**
992   * Displays the dialog box.
993   *
994   * @param { promptAction.ShowDialogOptions } options - Options.
995   * @param { AsyncCallback<promptAction.ShowDialogSuccessResponse> } callback - the callback of showDialog.
996   * @throws { BusinessError } 401 - Parameter error. Possible causes:
997   * <br> 1. Mandatory parameters are left unspecified.
998   * <br> 2. Incorrect parameters types.
999   * <br> 3. Parameter verification failed.
1000   * @throws { BusinessError } 100001 - Internal error.
1001   * @syscap SystemCapability.ArkUI.ArkUI.Full
1002   * @crossplatform
1003   * @atomicservice
1004   * @since 12
1005   */
1006  showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback<promptAction.ShowDialogSuccessResponse>): void;
1007
1008  /**
1009   * Displays the dialog box.
1010   *
1011   * @param { promptAction.ShowDialogOptions } options - Options.
1012   * @returns { Promise<promptAction.ShowDialogSuccessResponse> } the promise returned by the function.
1013   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1014   * <br> 1. Mandatory parameters are left unspecified.
1015   * <br> 2. Incorrect parameters types.
1016   * <br> 3. Parameter verification failed.
1017   * @throws { BusinessError } 100001 - Internal error.
1018   * @syscap SystemCapability.ArkUI.ArkUI.Full
1019   * @crossplatform
1020   * @since 10
1021   */
1022  /**
1023   * Displays the dialog box.
1024   *
1025   * @param { promptAction.ShowDialogOptions } options - Options.
1026   * @returns { Promise<promptAction.ShowDialogSuccessResponse> } the promise returned by the function.
1027   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1028   * <br> 1. Mandatory parameters are left unspecified.
1029   * <br> 2. Incorrect parameters types.
1030   * <br> 3. Parameter verification failed.
1031   * @throws { BusinessError } 100001 - Internal error.
1032   * @syscap SystemCapability.ArkUI.ArkUI.Full
1033   * @crossplatform
1034   * @atomicservice
1035   * @since 11
1036   */
1037  showDialog(options: promptAction.ShowDialogOptions): Promise<promptAction.ShowDialogSuccessResponse>;
1038
1039  /**
1040   * Displays the menu.
1041   *
1042   * @param { promptAction.ActionMenuOptions } options - Options.
1043   * @param { promptAction.ActionMenuSuccessResponse } callback - the callback of showActionMenu.
1044   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1045   * <br> 1. Mandatory parameters are left unspecified.
1046   * <br> 2. Incorrect parameters types.
1047   * <br> 3. Parameter verification failed.
1048   * @throws { BusinessError } 100001 - Internal error.
1049   * @syscap SystemCapability.ArkUI.ArkUI.Full
1050   * @crossplatform
1051   * @since 10
1052   * @deprecated since 11
1053   * @useinstead showActionMenu
1054   */
1055  showActionMenu(options: promptAction.ActionMenuOptions, callback: promptAction.ActionMenuSuccessResponse): void;
1056
1057  /**
1058   * Displays the menu.
1059   *
1060   * @param { promptAction.ActionMenuOptions } options - Options.
1061   * @param { AsyncCallback<promptAction.ActionMenuSuccessResponse> } callback - the callback of showActionMenu.
1062   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1063   * <br> 1. Mandatory parameters are left unspecified.
1064   * <br> 2. Incorrect parameters types.
1065   * <br> 3. Parameter verification failed.
1066   * @throws { BusinessError } 100001 - Internal error.
1067   * @syscap SystemCapability.ArkUI.ArkUI.Full
1068   * @crossplatform
1069   * @atomicservice
1070   * @since 11
1071   */
1072  showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback<promptAction.ActionMenuSuccessResponse>): void;
1073
1074  /**
1075   * Displays the menu.
1076   *
1077   * @param { promptAction.ActionMenuOptions } options - Options.
1078   * @returns { Promise<promptAction.ActionMenuSuccessResponse> } callback - the callback of showActionMenu.
1079   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1080   * <br> 1. Mandatory parameters are left unspecified.
1081   * <br> 2. Incorrect parameters types.
1082   * <br> 3. Parameter verification failed.
1083   * @throws { BusinessError } 100001 - Internal error.
1084   * @syscap SystemCapability.ArkUI.ArkUI.Full
1085   * @crossplatform
1086   * @since 10
1087   */
1088  /**
1089   * Displays the menu.
1090   *
1091   * @param { promptAction.ActionMenuOptions } options - Options.
1092   * @returns { Promise<promptAction.ActionMenuSuccessResponse> } callback - the callback of showActionMenu.
1093   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1094   * <br> 1. Mandatory parameters are left unspecified.
1095   * <br> 2. Incorrect parameters types.
1096   * <br> 3. Parameter verification failed.
1097   * @throws { BusinessError } 100001 - Internal error.
1098   * @syscap SystemCapability.ArkUI.ArkUI.Full
1099   * @crossplatform
1100   * @atomicservice
1101   * @since 11
1102   */
1103  showActionMenu(options: promptAction.ActionMenuOptions): Promise<promptAction.ActionMenuSuccessResponse>;
1104
1105  /**
1106   * Open the custom dialog with frameNode.
1107   *
1108   * @param { ComponentContent<T> } dialogContent - the content of custom dialog.
1109   * @param { promptAction.BaseDialogOptions } options - Options.
1110   * @returns { Promise<void> } the promise returned by the function.
1111   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1112   * <br> 1. Mandatory parameters are left unspecified.
1113   * <br> 2. Incorrect parameters types.
1114   * <br> 3. Parameter verification failed.
1115   * @throws { BusinessError } 103301 - the ComponentContent is incorrect.
1116   * @throws { BusinessError } 103302 - Dialog content already exists.
1117   * @syscap SystemCapability.ArkUI.ArkUI.Full
1118   * @crossplatform
1119   * @atomicservice
1120   * @since 12
1121   */
1122  openCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options?: promptAction.BaseDialogOptions): Promise<void>;
1123
1124  /**
1125   * Update the custom dialog with frameNode.
1126   *
1127   * @param { ComponentContent<T> } dialogContent - the content of custom dialog.
1128   * @param { promptAction.BaseDialogOptions } options - Options.
1129   * @returns { Promise<void> } the promise returned by the function.
1130   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1131   * <br> 1. Mandatory parameters are left unspecified.
1132   * <br> 2. Incorrect parameters types.
1133   * <br> 3. Parameter verification failed.
1134   * @throws { BusinessError } 103301 - the ComponentContent is incorrect.
1135   * @throws { BusinessError } 103303 - the ComponentContent cannot be found.
1136   * @syscap SystemCapability.ArkUI.ArkUI.Full
1137   * @crossplatform
1138   * @atomicservice
1139   * @since 12
1140   */
1141  updateCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options: promptAction.BaseDialogOptions): Promise<void>;
1142
1143  /**
1144   * Close the custom dialog with frameNode.
1145   *
1146   * @param { ComponentContent<T> } dialogContent - the content of custom dialog.
1147   * @returns { Promise<void> } the promise returned by the function.
1148   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1149   * <br> 1. Mandatory parameters are left unspecified.
1150   * <br> 2. Incorrect parameters types.
1151   * <br> 3. Parameter verification failed.
1152   * @throws { BusinessError } 103301 - the ComponentContent is incorrect.
1153   * @throws { BusinessError } 103303 - the ComponentContent cannot be found.
1154   * @syscap SystemCapability.ArkUI.ArkUI.Full
1155   * @crossplatform
1156   * @atomicservice
1157   * @since 12
1158   */
1159  closeCustomDialog<T extends Object>(dialogContent: ComponentContent<T>): Promise<void>;
1160
1161  /**
1162   * Open the custom dialog.
1163   *
1164   * @param { promptAction.CustomDialogOptions } options - Options.
1165   * @returns { Promise<number> } return the dialog id that will be used by closeCustomDialog.
1166   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1167   * <br> 1. Mandatory parameters are left unspecified.
1168   * <br> 2. Incorrect parameters types.
1169   * <br> 3. Parameter verification failed.
1170   * @throws { BusinessError } 100001 - Internal error.
1171   * @syscap SystemCapability.ArkUI.ArkUI.Full
1172   * @crossplatform
1173   * @atomicservice
1174   * @since 12
1175   */
1176  openCustomDialog(options: promptAction.CustomDialogOptions): Promise<number>;
1177
1178  /**
1179   * Close the custom dialog.
1180   *
1181   * @param { number } dialogId - the dialog id that returned by openCustomDialog.
1182   * @throws { BusinessError } 401 - Parameter error. Possible causes:
1183   * <br> 1. Mandatory parameters are left unspecified.
1184   * <br> 2. Incorrect parameters types.
1185   * <br> 3. Parameter verification failed.
1186   * @throws { BusinessError } 100001 - Internal error.
1187   * @syscap SystemCapability.ArkUI.ArkUI.Full
1188   * @crossplatform
1189   * @atomicservice
1190   * @since 12
1191   */
1192  closeCustomDialog(dialogId: number): void;
1193}
1194
1195/**
1196 * Defines the callback type used in UIObserver watch click event.
1197 * The value of event indicates the information of ClickEvent.
1198 * The value of node indicates the frameNode which will receive the event.
1199 *
1200 * @typedef { function } ClickEventListenerCallback
1201 * @param { ClickEvent } event - the information of ClickEvent
1202 * @param { FrameNode } [node] - the information of frameNode
1203 * @syscap SystemCapability.ArkUI.ArkUI.Full
1204 * @crossplatform
1205 * @atomicservice
1206 * @since 12
1207 */
1208declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void;
1209
1210/**
1211 * Defines the callback type used in UIObserver watch gesture.
1212 * The value of event indicates the information of gesture.
1213 * The value of node indicates the frameNode which will receive the event.
1214 *
1215 * @typedef { function } GestureEventListenerCallback
1216 * @param { GestureEvent } event - the information of GestureEvent
1217 * @param { FrameNode } [node] - the information of frameNode
1218 * @syscap SystemCapability.ArkUI.ArkUI.Full
1219 * @crossplatform
1220 * @atomicservice
1221 * @since 12
1222 */
1223declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void;
1224
1225/**
1226 * Defines the PageInfo type.
1227 * The value of routerPageInfo indicates the information of the router page, or undefined if the
1228 * frameNode does not have router page information. And the value of navDestinationInfo indicates
1229 * the information of the navDestination, or undefined if the frameNode does not have navDestination
1230 * information.
1231 *
1232 * @interface PageInfo
1233 * @syscap SystemCapability.ArkUI.ArkUI.Full
1234 * @crossplatform
1235 * @atomicservice
1236 * @since 12
1237 */
1238export interface PageInfo {
1239  /**
1240   * the property of router page information.
1241   *
1242   * @type { ?observer.RouterPageInfo }
1243   * @syscap SystemCapability.ArkUI.ArkUI.Full
1244   * @atomicservice
1245   * @since 12
1246   */
1247  routerPageInfo?: observer.RouterPageInfo;
1248
1249  /**
1250   * the property of navDestination information.
1251   *
1252   * @type { ?observer.NavDestinationInfo }
1253   * @syscap SystemCapability.ArkUI.ArkUI.Full
1254   * @atomicservice
1255   * @since 12
1256   */
1257  navDestinationInfo?: observer.NavDestinationInfo;
1258}
1259
1260/**
1261 * Register callbacks to observe ArkUI behavior.
1262 *
1263 * @syscap SystemCapability.ArkUI.ArkUI.Full
1264 * @crossplatform
1265 * @since 11
1266 */
1267/**
1268 * Register callbacks to observe ArkUI behavior.
1269 *
1270 * @syscap SystemCapability.ArkUI.ArkUI.Full
1271 * @crossplatform
1272 * @atomicservice
1273 * @since 12
1274 */
1275export class UIObserver {
1276  /**
1277   * Registers a callback function to be called when the navigation destination is updated.
1278   *
1279   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1280   * @param { object } options - Specify the id of observed navigation.
1281   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1282   * @syscap SystemCapability.ArkUI.ArkUI.Full
1283   * @crossplatform
1284   * @since 11
1285   */
1286  /**
1287   * Registers a callback function to be called when the navigation destination is updated.
1288   *
1289   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1290   * @param { object } options - The options object.
1291   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1292   * @syscap SystemCapability.ArkUI.ArkUI.Full
1293   * @crossplatform
1294   * @atomicservice
1295   * @since 12
1296   */
1297  on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback<observer.NavDestinationInfo>): void;
1298
1299  /**
1300   * Removes a callback function that was previously registered with `on()`.
1301   *
1302   * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1303   * @param { object } options - Specify the id of observed navigation.
1304   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
1305   *                                                             navigation ID will be removed.
1306   * @syscap SystemCapability.ArkUI.ArkUI.Full
1307   * @crossplatform
1308   * @since 11
1309   */
1310  /**
1311   * Removes a callback function that was previously registered with `on()`.
1312   *
1313   * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1314   * @param { object } options - The options object.
1315   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
1316   *                                                             navigation ID will be removed.
1317   * @syscap SystemCapability.ArkUI.ArkUI.Full
1318   * @crossplatform
1319   * @atomicservice
1320   * @since 12
1321   */
1322  off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback<observer.NavDestinationInfo>): void;
1323
1324  /**
1325   * Registers a callback function to be called when the navigation destination is updated.
1326   *
1327   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1328   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1329   * @syscap SystemCapability.ArkUI.ArkUI.Full
1330   * @crossplatform
1331   * @since 11
1332   */
1333  /**
1334   * Registers a callback function to be called when the navigation destination is updated.
1335   *
1336   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1337   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1338   * @syscap SystemCapability.ArkUI.ArkUI.Full
1339   * @crossplatform
1340   * @atomicservice
1341   * @since 12
1342   */
1343  on(type: 'navDestinationUpdate', callback: Callback<observer.NavDestinationInfo>): void;
1344
1345  /**
1346   * Removes a callback function that was previously registered with `on()`.
1347   *
1348   * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1349   * @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1350   *                                                               will be removed.
1351   * @syscap SystemCapability.ArkUI.ArkUI.Full
1352   * @crossplatform
1353   * @since 11
1354   */
1355  /**
1356   * Removes a callback function that was previously registered with `on()`.
1357   *
1358   * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1359   * @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1360   *                                                               will be removed.
1361   * @syscap SystemCapability.ArkUI.ArkUI.Full
1362   * @crossplatform
1363   * @atomicservice
1364   * @since 12
1365   */
1366  off(type: 'navDestinationUpdate', callback?: Callback<observer.NavDestinationInfo>): void;
1367
1368  /**
1369   * Registers a callback function to be called when the scroll event start or stop.
1370   *
1371   * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'.
1372   * @param { observer.ObserverOptions } options - The options object.
1373   * @param { Callback<observer.ScrollEventInfo> } callback - The callback function to be called when the scroll event start or stop.
1374   * @syscap SystemCapability.ArkUI.ArkUI.Full
1375   * @crossplatform
1376   * @atomicservice
1377   * @since 12
1378   */
1379  on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback<observer.ScrollEventInfo>): void;
1380
1381  /**
1382   * Removes a callback function that was previously registered with `on()`.
1383   *
1384   * @param { 'scrollEvent' } type - The type of event to remove the listener for. Must be 'scrollEvent'.
1385   * @param { observer.ObserverOptions } options - The options object.
1386   * @param { Callback<observer.ScrollEventInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
1387   *                                                    scroll ID will be removed.
1388   * @syscap SystemCapability.ArkUI.ArkUI.Full
1389   * @crossplatform
1390   * @atomicservice
1391   * @since 12
1392   */
1393  off(type: 'scrollEvent', options: observer.ObserverOptions, callback?: Callback<observer.ScrollEventInfo>): void;
1394
1395  /**
1396   * Registers a callback function to be called when the scroll event start or stop.
1397   *
1398   * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'.
1399   * @param { Callback<observer.ScrollEventInfo> } callback - The callback function to be called when the scroll event start or stop.
1400   * @syscap SystemCapability.ArkUI.ArkUI.Full
1401   * @crossplatform
1402   * @atomicservice
1403   * @since 12
1404   */
1405  on(type: 'scrollEvent', callback: Callback<observer.ScrollEventInfo>): void;
1406
1407  /**
1408   * Removes a callback function that was previously registered with `on()`.
1409   *
1410   * @param { 'scrollEvent'} type - The type of event to remove the listener for. Must be 'scrollEvent'.
1411   * @param { Callback<observer.ScrollEventInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1412   *                                                      will be removed.
1413   * @syscap SystemCapability.ArkUI.ArkUI.Full
1414   * @crossplatform
1415   * @atomicservice
1416   * @since 12
1417   */
1418  off(type: 'scrollEvent', callback?: Callback<observer.ScrollEventInfo>): void;
1419
1420  /**
1421   * Registers a callback function to be called when the router page in a ui context is updated.
1422   *
1423   * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'.
1424   * @param { Callback<observer.RouterPageInfo> } callback - The callback function to be called when the router page is updated.
1425   * @syscap SystemCapability.ArkUI.ArkUI.Full
1426   * @crossplatform
1427   * @since 11
1428   */
1429  /**
1430   * Registers a callback function to be called when the router page in a ui context is updated.
1431   *
1432   * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'.
1433   * @param { Callback<observer.RouterPageInfo> } callback - The callback function to be called when the router page is updated.
1434   * @syscap SystemCapability.ArkUI.ArkUI.Full
1435   * @crossplatform
1436   * @atomicservice
1437   * @since 12
1438   */
1439  on(type: 'routerPageUpdate', callback: Callback<observer.RouterPageInfo>): void;
1440
1441  /**
1442   * Removes a callback function that was previously registered with `on()`.
1443   *
1444   * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'.
1445   * @param { Callback<observer.RouterPageInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1446   *                                                               will be removed.
1447   * @syscap SystemCapability.ArkUI.ArkUI.Full
1448   * @crossplatform
1449   * @since 11
1450   */
1451  /**
1452   * Removes a callback function that was previously registered with `on()`.
1453   *
1454   * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'.
1455   * @param { Callback<observer.RouterPageInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1456   *                                                               will be removed.
1457   * @syscap SystemCapability.ArkUI.ArkUI.Full
1458   * @crossplatform
1459   * @atomicservice
1460   * @since 12
1461   */
1462  off(type: 'routerPageUpdate', callback?: Callback<observer.RouterPageInfo>): void;
1463
1464  /**
1465   * Registers a callback function to be called when the screen density in a ui context is updated.
1466   *
1467   * @param { 'densityUpdate' } type - The type of event to listen for. Must be 'densityUpdate'.
1468   * @param { Callback<observer.DensityInfo> } callback - The callback function to be called when the screen density is updated.
1469   * @syscap SystemCapability.ArkUI.ArkUI.Full
1470   * @crossplatform
1471   * @atomicservice
1472   * @since 12
1473   */
1474  on(type: 'densityUpdate', callback: Callback<observer.DensityInfo>): void;
1475
1476  /**
1477   * Removes a callback function that was previously registered with `on()`.
1478   *
1479   * @param { 'densityUpdate' } type - The type of event to remove the listener for. Must be 'densityUpdate'.
1480   * @param { Callback<observer.DensityInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1481   *                                                        will be removed.
1482   * @syscap SystemCapability.ArkUI.ArkUI.Full
1483   * @crossplatform
1484   * @atomicservice
1485   * @since 12
1486   */
1487  off(type: 'densityUpdate', callback?: Callback<observer.DensityInfo>): void;
1488
1489    /**
1490   * Registers a callback function to be called when the draw command will be drawn.
1491   *
1492   * @param { 'willDraw' } type - The type of event to listen for. Must be 'willDraw'.
1493   * @param { Callback<void> } callback - The callback function to be called when the draw command will be drawn.
1494   * @syscap SystemCapability.ArkUI.ArkUI.Full
1495   * @crossplatform
1496   * @atomicservice
1497   * @since 12
1498   */
1499    on(type: 'willDraw', callback: Callback<void>): void;
1500
1501    /**
1502     * Removes a callback function that was previously registered with `on()`.
1503     *
1504     * @param { 'willDraw' } type - The type of event to remove the listener for. Must be 'willDraw'.
1505     * @param { Callback<void> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1506     *                                                        will be removed.
1507     * @syscap SystemCapability.ArkUI.ArkUI.Full
1508     * @crossplatform
1509     * @atomicservice
1510     * @since 12
1511     */
1512    off(type: 'willDraw', callback?: Callback<void>): void;
1513
1514      /**
1515   * Registers a callback function to be called when the layout is done.
1516   *
1517   * @param { 'didLayout' } type - The type of event to listen for. Must be 'didLayout'.
1518   * @param { Callback<void> } callback - The callback function to be called when the layout is done.
1519   * @syscap SystemCapability.ArkUI.ArkUI.Full
1520   * @crossplatform
1521   * @atomicservice
1522   * @since 12
1523   */
1524  on(type: 'didLayout', callback: Callback<void>): void;
1525
1526  /**
1527   * Removes a callback function that was previously registered with `on()`.
1528   *
1529   * @param { 'didLayout' } type - The type of event to remove the listener for. Must be 'didLayout'.
1530   * @param { Callback<void> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1531   *                                                        will be removed.
1532   * @syscap SystemCapability.ArkUI.ArkUI.Full
1533   * @crossplatform
1534   * @atomicservice
1535   * @since 12
1536   */
1537  off(type: 'didLayout', callback?: Callback<void>): void;
1538
1539  /**
1540   * Registers a callback function to be called when the navigation switched to a new navDestination.
1541   *
1542   * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'.
1543   * @param { Callback<observer.NavDestinationSwitchInfo> } callback - The callback function to be called when
1544   *                                                                   the navigation switched to a new navDestination.
1545   * @syscap SystemCapability.ArkUI.ArkUI.Full
1546   * @crossplatform
1547   * @atomicservice
1548   * @since 12
1549   */
1550  on(
1551    type: 'navDestinationSwitch',
1552    callback: Callback<observer.NavDestinationSwitchInfo>
1553  ): void;
1554
1555  /**
1556   * Removes a callback function that was previously registered with `on()`.
1557   *
1558   * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'.
1559   * @param { Callback<observer.NavDestinationSwitchInfo> } [callback] - The callback function to remove. If not provided,
1560   *                                                                     all callbacks for the given event type will be removed.
1561   * @syscap SystemCapability.ArkUI.ArkUI.Full
1562   * @crossplatform
1563   * @atomicservice
1564   * @since 12
1565   */
1566  off(
1567    type: 'navDestinationSwitch',
1568    callback?: Callback<observer.NavDestinationSwitchInfo>
1569  ): void;
1570
1571  /**
1572   * Registers a callback function to be called when the navigation switched to a new navDestination.
1573   *
1574   * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'.
1575   * @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options.
1576   * @param { Callback<observer.NavDestinationSwitchInfo> } callback - The callback function to be called when the
1577   *                                                                   navigation switched to a new navDestination.
1578   * @syscap SystemCapability.ArkUI.ArkUI.Full
1579   * @crossplatform
1580   * @atomicservice
1581   * @since 12
1582   */
1583  on(
1584    type: 'navDestinationSwitch',
1585    observerOptions: observer.NavDestinationSwitchObserverOptions,
1586    callback: Callback<observer.NavDestinationSwitchInfo>
1587  ): void;
1588
1589  /**
1590   * Removes a callback function that was previously registered with `on()`.
1591   *
1592   * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'.
1593   * @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options.
1594   * @param { Callback<observer.NavDestinationSwitchInfo> } [callback] - The callback function to remove. If not provided,
1595   *                                                                     all callbacks for the given event type will be removed.
1596   * @syscap SystemCapability.ArkUI.ArkUI.Full
1597   * @crossplatform
1598   * @atomicservice
1599   * @since 12
1600   */
1601  off(
1602    type: 'navDestinationSwitch',
1603    observerOptions: observer.NavDestinationSwitchObserverOptions,
1604    callback?: Callback<observer.NavDestinationSwitchInfo>
1605  ): void;
1606
1607  /**
1608   * Registers a callback function to be called before clickEvent is called.
1609   *
1610   * @param { 'willClick' } type - The type of event to listen for.
1611   * @param { ClickEventListenerCallback } callback - The callback function to be called
1612   *                                                  when the clickEvent will be trigger or after.
1613   * @syscap SystemCapability.ArkUI.ArkUI.Full
1614   * @crossplatform
1615   * @atomicservice
1616   * @since 12
1617   */
1618  on(type: 'willClick', callback: ClickEventListenerCallback): void;
1619
1620  /**
1621   * Removes a callback function to be called before clickEvent is called.
1622   *
1623   * @param { 'willClick' } type - The type of event to remove the listener for.
1624   * @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided,
1625   *                                                    all callbacks for the given event type will be removed.
1626   * @syscap SystemCapability.ArkUI.ArkUI.Full
1627   * @crossplatform
1628   * @atomicservice
1629   * @since 12
1630   */
1631  off(type: 'willClick', callback?: ClickEventListenerCallback): void;
1632
1633  /**
1634   * Registers a callback function to be called after clickEvent is called.
1635   *
1636   * @param { 'didClick' } type - The type of event to listen for.
1637   * @param { ClickEventListenerCallback } callback - The callback function to be called
1638   *                                                  when the clickEvent will be trigger or after.
1639   * @syscap SystemCapability.ArkUI.ArkUI.Full
1640   * @crossplatform
1641   * @atomicservice
1642   * @since 12
1643   */
1644  on(type: 'didClick', callback: ClickEventListenerCallback): void;
1645
1646  /**
1647   * Removes a callback function to be called after clickEvent is called.
1648   *
1649   * @param { 'didClick' } type - The type of event to remove the listener for.
1650   * @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided,
1651   *                                                    all callbacks for the given event type will be removed.
1652   * @syscap SystemCapability.ArkUI.ArkUI.Full
1653   * @crossplatform
1654   * @atomicservice
1655   * @since 12
1656   */
1657  off(type: 'didClick', callback?: ClickEventListenerCallback): void;
1658
1659  /**
1660   * Registers a callback function to be called before tapGesture is called.
1661   *
1662   * @param { 'willClick' } type - The type of event to listen for.
1663   * @param { GestureEventListenerCallback } callback - The callback function to be called
1664   *                                                    when the clickEvent will be trigger or after.
1665   * @syscap SystemCapability.ArkUI.ArkUI.Full
1666   * @crossplatform
1667   * @atomicservice
1668   * @since 12
1669   */
1670  on(type: 'willClick', callback: GestureEventListenerCallback): void;
1671
1672  /**
1673   * Removes a callback function to be called before tapGesture is called.
1674   *
1675   * @param { 'willClick' } type - The type of event to remove the listener for.
1676   * @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided,
1677   *                                                      all callbacks for the given event type will be removed.
1678   * @syscap SystemCapability.ArkUI.ArkUI.Full
1679   * @crossplatform
1680   * @atomicservice
1681   * @since 12
1682   */
1683  off(type: 'willClick', callback?: GestureEventListenerCallback): void;
1684
1685  /**
1686   * Registers a callback function to be called after tapGesture is called.
1687   *
1688   * @param { 'didClick' } type - The type of event to listen for.
1689   * @param { GestureEventListenerCallback } callback - The callback function to be called
1690   *                                                    when the clickEvent will be trigger or after.
1691   * @syscap SystemCapability.ArkUI.ArkUI.Full
1692   * @crossplatform
1693   * @atomicservice
1694   * @since 12
1695   */
1696  on(type: 'didClick', callback: GestureEventListenerCallback): void;
1697
1698  /**
1699   * Removes a callback function to be called after tapGesture is called.
1700   *
1701   * @param { 'didClick' } type - The type of event to remove the listener for.
1702   * @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided,
1703   *                                                      all callbacks for the given event type will be removed.
1704   * @syscap SystemCapability.ArkUI.ArkUI.Full
1705   * @crossplatform
1706   * @atomicservice
1707   * @since 12
1708   */
1709  off(type: 'didClick', callback?: GestureEventListenerCallback): void;
1710
1711  /**
1712   * Registers a callback function to be called when the tabContent is showed or hidden.
1713   *
1714   * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'.
1715   * @param { observer.ObserverOptions } options - The options object.
1716   * @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
1717   *                                                         when the tabContent show or hide.
1718   * @syscap SystemCapability.ArkUI.ArkUI.Full
1719   * @crossplatform
1720   * @atomicservice
1721   * @since 12
1722   */
1723  on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback<observer.TabContentInfo>): void;
1724
1725  /**
1726   * Removes a callback function that was previously registered with `on()`.
1727   *
1728   * @param { 'tabContentUpdate' } type - The type of event to remove the listener for. Must be 'tabContentUpdate'.
1729   * @param { observer.ObserverOptions } options - The options object.
1730   * @param { Callback<observer.TabContentInfo> } callback - The callback function to remove. If not provided,
1731   *                                              all callbacks for the given event type and Tabs ID will be removed.
1732   * @syscap SystemCapability.ArkUI.ArkUI.Full
1733   * @crossplatform
1734   * @atomicservice
1735   * @since 12
1736   */
1737  off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback<observer.TabContentInfo>): void;
1738
1739  /**
1740   * Registers a callback function to be called when the tabContent is showed or hidden.
1741   *
1742   * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'.
1743   * @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
1744   *                                                         when the tabContent is showed or hidden.
1745   * @syscap SystemCapability.ArkUI.ArkUI.Full
1746   * @crossplatform
1747   * @atomicservice
1748   * @since 12
1749   */
1750  on(type: 'tabContentUpdate', callback: Callback<observer.TabContentInfo>): void;
1751
1752  /**
1753   * Removes a callback function that was previously registered with `on()`.
1754   *
1755   * @param { 'tabContentUpdate'} type - The type of event to remove the listener for. Must be 'tabContentUpdate'.
1756   * @param { Callback<observer.TabContentInfo> } callback - The callback function to remove. If not provided,
1757   *                                              all callbacks for the given event type and Tabs ID will be removed.
1758   * @syscap SystemCapability.ArkUI.ArkUI.Full
1759   * @crossplatform
1760   * @atomicservice
1761   * @since 12
1762   */
1763  off(type: 'tabContentUpdate', callback?: Callback<observer.TabContentInfo>): void;
1764}
1765
1766/**
1767 * class ComponentUtils
1768 * @syscap SystemCapability.ArkUI.ArkUI.Full
1769 * @crossplatform
1770 * @since 10
1771 */
1772/**
1773 * class ComponentUtils
1774 * @syscap SystemCapability.ArkUI.ArkUI.Full
1775 * @crossplatform
1776 * @atomicservice
1777 * @since 11
1778 */
1779export class ComponentUtils {
1780  /**
1781   * Provide the ability to obtain the coordinates and size of component drawing areas.
1782   *
1783   * @param { string } id - ID of the component whose attributes are to be obtained.
1784   * @returns { componentUtils.ComponentInfo } the object of ComponentInfo.
1785   * @throws { BusinessError } 100001 - UI execution context not found.
1786   * @syscap SystemCapability.ArkUI.ArkUI.Full
1787   * @since 10
1788   */
1789  /**
1790   * Provide the ability to obtain the coordinates and size of component drawing areas.
1791   *
1792   * @param { string } id - ID of the component whose attributes are to be obtained.
1793   * @returns { componentUtils.ComponentInfo } the object of ComponentInfo.
1794   * @throws { BusinessError } 100001 - UI execution context not found.
1795   * @syscap SystemCapability.ArkUI.ArkUI.Full
1796   * @atomicservice
1797   * @since 11
1798   */
1799  getRectangleById(id: string): componentUtils.ComponentInfo;
1800}
1801
1802/**
1803 * class OverlayManager
1804 * @syscap SystemCapability.ArkUI.ArkUI.Full
1805 * @crossplatform
1806 * @atomicservice
1807 * @since 12
1808 */
1809export class OverlayManager {
1810  /**
1811   * Add the ComponentContent to the OverlayManager.
1812   *
1813   * @param { ComponentContent } content - The content will be added to the OverlayManager.
1814   * @param { number } [ index ] - The index at which to add the ComponentContent.
1815   * @syscap SystemCapability.ArkUI.ArkUI.Full
1816   * @crossplatform
1817   * @atomicservice
1818   * @since 12
1819   */
1820  addComponentContent(content: ComponentContent, index?: number): void;
1821
1822  /**
1823   * Remove the ComponentContent from the OverlayManager.
1824   *
1825   * @param { ComponentContent } content - The content will be removed from the OverlayManager.
1826   * @syscap SystemCapability.ArkUI.ArkUI.Full
1827   * @crossplatform
1828   * @atomicservice
1829   * @since 12
1830   */
1831  removeComponentContent(content: ComponentContent): void;
1832
1833  /**
1834   * Show the ComponentContent.
1835   *
1836   * @param { ComponentContent } content - The content will be shown.
1837   * @syscap SystemCapability.ArkUI.ArkUI.Full
1838   * @crossplatform
1839   * @atomicservice
1840   * @since 12
1841   */
1842  showComponentContent(content: ComponentContent): void;
1843
1844  /**
1845   * Hide the ComponentContent.
1846   *
1847   * @param { ComponentContent } content - The content will be hidden.
1848   * @syscap SystemCapability.ArkUI.ArkUI.Full
1849   * @crossplatform
1850   * @atomicservice
1851   * @since 12
1852   */
1853  hideComponentContent(content: ComponentContent): void;
1854
1855  /**
1856   * Show all ComponentContents on the OverlayManager.
1857   *
1858   * @syscap SystemCapability.ArkUI.ArkUI.Full
1859   * @crossplatform
1860   * @atomicservice
1861   * @since 12
1862   */
1863  showAllComponentContents(): void;
1864
1865  /**
1866   * Hide all ComponentContents on the OverlayManager.
1867   *
1868   * @syscap SystemCapability.ArkUI.ArkUI.Full
1869   * @crossplatform
1870   * @atomicservice
1871   * @since 12
1872   */
1873  hideAllComponentContents(): void;
1874}
1875
1876/**
1877 * interface AtomicServiceBar
1878 * @interface AtomicServiceBar
1879 * @syscap SystemCapability.ArkUI.ArkUI.Full
1880 * @crossplatform
1881 * @since 11
1882 */
1883/**
1884 * interface AtomicServiceBar
1885 * @interface AtomicServiceBar
1886 * @syscap SystemCapability.ArkUI.ArkUI.Full
1887 * @crossplatform
1888 * @atomicservice
1889 * @since 12
1890 */
1891export interface AtomicServiceBar {
1892  /**
1893   * Set the visibility of the bar, except the icon.
1894   *
1895   * @param { boolean } visible - whether this bar is visible.
1896   * @syscap SystemCapability.ArkUI.ArkUI.Full
1897   * @atomicservice
1898   * @since 11
1899   */
1900  setVisible(visible: boolean): void;
1901
1902  /**
1903   * Set the background color of the bar.
1904   *
1905   * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default.
1906   * @syscap SystemCapability.ArkUI.ArkUI.Full
1907   * @since 11
1908   */
1909  /**
1910   * Set the background color of the bar.
1911   *
1912   * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default.
1913   * @syscap SystemCapability.ArkUI.ArkUI.Full
1914   * @atomicservice
1915   * @since 12
1916   */
1917  setBackgroundColor(color: Nullable< Color | number | string>): void;
1918
1919  /**
1920   * Set the title of the bar.
1921   *
1922   * @param { string } content - the content of the bar.
1923   * @syscap SystemCapability.ArkUI.ArkUI.Full
1924   * @since 11
1925   */
1926  /**
1927   * Set the title of the bar.
1928   *
1929   * @param { string } content - the content of the bar.
1930   * @syscap SystemCapability.ArkUI.ArkUI.Full
1931   * @atomicservice
1932   * @since 12
1933   */
1934  setTitleContent(content: string): void;
1935
1936  /**
1937   * Set the font style of the bar's title.
1938   *
1939   * @param { FontStyle } font - the font style of the bar's title.
1940   * @syscap SystemCapability.ArkUI.ArkUI.Full
1941   * @since 11
1942   */
1943  /**
1944   * Set the font style of the bar's title.
1945   *
1946   * @param { FontStyle } font - the font style of the bar's title.
1947   * @syscap SystemCapability.ArkUI.ArkUI.Full
1948   * @atomicservice
1949   * @since 12
1950   */
1951  setTitleFontStyle(font: FontStyle): void;
1952
1953  /**
1954   * Set the color of the icon on the bar.
1955   *
1956   * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default.
1957   * @syscap SystemCapability.ArkUI.ArkUI.Full
1958   * @since 11
1959   */
1960  /**
1961   * Set the color of the icon on the bar.
1962   *
1963   * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default.
1964   * @syscap SystemCapability.ArkUI.ArkUI.Full
1965   * @atomicservice
1966   * @since 12
1967   */
1968  setIconColor(color: Nullable< Color | number | string>): void;
1969}
1970
1971/**
1972 * Represents a dynamic synchronization scene.
1973 *
1974 * @syscap SystemCapability.ArkUI.ArkUI.Full
1975 * @atomicservice
1976 * @since 12
1977 */
1978export class DynamicSyncScene {
1979  /**
1980   * Sets the FrameRateRange of the DynamicSyncScene.
1981   *
1982   * @param { ExpectedFrameRateRange } range - The range of frameRate.
1983   * @syscap SystemCapability.ArkUI.ArkUI.Full
1984   * @atomicservice
1985   * @since 12
1986   */
1987  setFrameRateRange(range: ExpectedFrameRateRange): void;
1988
1989  /**
1990   * Gets the FrameRateRange of the DynamicSyncScene.
1991   *
1992   * @returns { ExpectedFrameRateRange } The range of frameRate.
1993   * @syscap SystemCapability.ArkUI.ArkUI.Full
1994   * @atomicservice
1995   * @since 12
1996   */
1997  getFrameRateRange(): ExpectedFrameRateRange;
1998}
1999
2000/**
2001 * Represents a dynamic synchronization scene of Swiper.
2002 *
2003 * @extends DynamicSyncScene
2004 * @syscap SystemCapability.ArkUI.ArkUI.Full
2005 * @atomicservice
2006 * @since 12
2007 */
2008export class SwiperDynamicSyncScene extends DynamicSyncScene {
2009  /**
2010  * Type of the SwiperDynamicSyncSceneType.
2011  * @type { SwiperDynamicSyncSceneType }
2012  * @readonly
2013  * @syscap SystemCapability.ArkUI.ArkUI.Full
2014  * @atomicservice
2015  * @since 12
2016  */
2017  readonly type: SwiperDynamicSyncSceneType;
2018}
2019
2020/**
2021 * Represents a dynamic synchronization scene of Marquee.
2022 *
2023 * @extends DynamicSyncScene
2024 * @syscap SystemCapability.ArkUI.ArkUI.Full
2025 * @atomicservice
2026 * @since 14
2027 */
2028export class MarqueeDynamicSyncScene extends DynamicSyncScene {
2029  /**
2030  * Type of the MarqueeDynamicSyncSceneType.
2031  * @type { MarqueeDynamicSyncSceneType }
2032  * @readonly
2033  * @syscap SystemCapability.ArkUI.ArkUI.Full
2034  * @atomicservice
2035  * @since 14
2036  */
2037  readonly type: MarqueeDynamicSyncSceneType;
2038}
2039
2040/**
2041 * class DragController
2042 * @syscap SystemCapability.ArkUI.ArkUI.Full
2043 * @since 11
2044 */
2045/**
2046 * class DragController
2047 * @syscap SystemCapability.ArkUI.ArkUI.Full
2048 * @atomicservice
2049 * @since 12
2050 */
2051export class DragController {
2052  /**
2053   * Execute a drag event.
2054   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2055   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2056   * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains
2057   * the drag event information.
2058   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2059   * <br> 1. Mandatory parameters are left unspecified.
2060   * <br> 2. Incorrect parameters types.
2061   * <br> 3. Parameter verification failed.
2062   * @throws { BusinessError } 100001 - Internal handling failed.
2063   * @syscap SystemCapability.ArkUI.ArkUI.Full
2064   * @since 11
2065   */
2066  /**
2067   * Execute a drag event.
2068   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2069   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2070   * @param { AsyncCallback<dragController.DragEventParam> } callback - Callback that contains
2071   * the drag event information.
2072   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2073   * <br> 1. Mandatory parameters are left unspecified.
2074   * <br> 2. Incorrect parameters types.
2075   * <br> 3. Parameter verification failed.
2076   * @throws { BusinessError } 100001 - Internal handling failed.
2077   * @syscap SystemCapability.ArkUI.ArkUI.Full
2078   * @atomicservice
2079   * @since 12
2080   */
2081  executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo,
2082    callback: AsyncCallback<dragController.DragEventParam>): void;
2083
2084  /**
2085   * Execute a drag event.
2086   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2087   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2088   * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information.
2089   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2090   * <br> 1. Mandatory parameters are left unspecified.
2091   * <br> 2. Incorrect parameters types.
2092   * <br> 3. Parameter verification failed.
2093   * @throws { BusinessError } 100001 - Internal handling failed.
2094   * @syscap SystemCapability.ArkUI.ArkUI.Full
2095   * @since 11
2096   */
2097  /**
2098   * Execute a drag event.
2099   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2100   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2101   * @returns { Promise<dragController.DragEventParam> } A Promise with the drag event information.
2102   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2103   * <br> 1. Mandatory parameters are left unspecified.
2104   * <br> 2. Incorrect parameters types.
2105   * <br> 3. Parameter verification failed.
2106   * @throws { BusinessError } 100001 - Internal handling failed.
2107   * @syscap SystemCapability.ArkUI.ArkUI.Full
2108   * @atomicservice
2109   * @since 12
2110   */
2111  executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo)
2112    : Promise<dragController.DragEventParam>;
2113
2114  /**
2115   * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started.
2116   * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts displayed when the objects are dragged.
2117   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2118   * @returns { dragController.DragAction } one drag action object
2119   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2120   * <br> 1. Mandatory parameters are left unspecified.
2121   * <br> 2. Incorrect parameters types.
2122   * <br> 3. Parameter verification failed.
2123   * @throws { BusinessError } 100001 - Internal handling failed.
2124   * @syscap SystemCapability.ArkUI.ArkUI.Full
2125   * @since 11
2126   */
2127  /**
2128   * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started.
2129   * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts displayed when the objects are dragged.
2130   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2131   * @returns { dragController.DragAction } one drag action object
2132   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2133   * <br> 1. Mandatory parameters are left unspecified.
2134   * <br> 2. Incorrect parameters types.
2135   * <br> 3. Parameter verification failed.
2136   * @throws { BusinessError } 100001 - Internal handling failed.
2137   * @syscap SystemCapability.ArkUI.ArkUI.Full
2138   * @atomicservice
2139   * @since 12
2140   */
2141  createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: dragController.DragInfo): dragController.DragAction;
2142
2143  /**
2144   * Get a drag preview object, which provides the functions of setting color or updating animation and has no effect in OnDrop and OnDragEnd callback.
2145   * @returns { dragController.DragPreview } A drag preview object.
2146   * @syscap SystemCapability.ArkUI.ArkUI.Full
2147   * @since 11
2148   */
2149  /**
2150   * Get a drag preview object.
2151   * @returns { dragController.DragPreview } A drag preview object.
2152   * @syscap SystemCapability.ArkUI.ArkUI.Full
2153   * @atomicservice
2154   * @since 12
2155   */
2156  getDragPreview(): dragController.DragPreview;
2157
2158  /**
2159   * Enable drag event strict reporting for drag enter and leave notification in nested situation.
2160   * For example, the parent and child both register the onDragEnter/onDragLeave events, if this
2161   * flag is enabled, the parent will be notified with leave event, and the child will notified with
2162   * enter event at the same time, when user drag action is passing through the parent and enter the
2163   * scope of the child.
2164   * Please be noted, the default value of the flag is false, it means, for the same situation, the
2165   * parent will not receive the leave notification, just the child can get the enter event, which is
2166   * not fully strict.
2167   * @param { boolean } enable - Indicating enable drag event strict reporting or not.
2168   * @syscap SystemCapability.ArkUI.ArkUI.Full
2169   * @atomicservice
2170   * @since 12
2171   */
2172  setDragEventStrictReportingEnabled(enable: boolean): void;
2173}
2174
2175/**
2176 * class MeasureUtils
2177 * @syscap SystemCapability.ArkUI.ArkUI.Full
2178 * @crossplatform
2179 * @atomicservice
2180 * @since 12
2181 */
2182export class MeasureUtils {
2183  /**
2184   * Obtains the width of the specified text in a single line layout.
2185   *
2186   * @param { MeasureOptions } options - Options.
2187   * @returns { number }
2188   * @syscap SystemCapability.ArkUI.ArkUI.Full
2189   * @crossplatform
2190   * @atomicservice
2191   * @since 12
2192   */
2193  measureText(options: MeasureOptions): number;
2194
2195  /**
2196   * Obtains the width and height of the specified text in a single line layout.
2197   *
2198   * @param { MeasureOptions } options - Options of measure area occupied by text.
2199   * @returns { SizeOptions } width and height for text to display
2200   * @syscap SystemCapability.ArkUI.ArkUI.Full
2201   * @crossplatform
2202   * @atomicservice
2203   * @since 12
2204   */
2205  measureTextSize(options: MeasureOptions): SizeOptions;
2206}
2207
2208/**
2209 * class FocusController
2210 * @syscap SystemCapability.ArkUI.ArkUI.Full
2211 * @atomicservice
2212 * @since 12
2213 */
2214 export class FocusController {
2215  /**
2216   * clear focus to the root container.
2217   * @syscap SystemCapability.ArkUI.ArkUI.Full
2218   * @atomicservice
2219   * @since 12
2220   */
2221  clearFocus(): void;
2222
2223  /**
2224   * request focus to the specific component.
2225   * @param { string } key - the inspector key of the component.
2226   * @throws { BusinessError } 150001 - the component cannot be focused.
2227   * @throws { BusinessError } 150002 - This component has an unfocusable ancestor.
2228   * @throws { BusinessError } 150003 - the component is not on tree or does not exist.
2229   * @syscap SystemCapability.ArkUI.ArkUI.Full
2230   * @atomicservice
2231   * @since 12
2232   */
2233  requestFocus(key: string): void;
2234
2235  /**
2236   * Activate focus style.
2237   * @param { boolean } isActive - activate/deactivate the focus style.
2238   * @param { boolean } [autoInactive] - deactivate the focus style when touch event or mouse event triggers, the default value is true.
2239   * @syscap SystemCapability.ArkUI.ArkUI.Full
2240   * @crossplatform
2241   * @atomicservice
2242   * @since 14
2243   */
2244  activate(isActive: boolean, autoInactive?: boolean): void;
2245
2246  /**
2247  * Set whether to enable autofocus transfer.
2248  * @param { boolean } isAutoFocusTransfer - A Boolean value that indicates whether autofocus transfer is enabled.
2249  * @syscap SystemCapability.ArkUI.ArkUI.Full
2250  * @crossplatform
2251  * @atomicservice
2252  * @since 14
2253  */
2254  setAutoFocusTransfer(isAutoFocusTransfer: boolean): void;
2255}
2256
2257/**
2258 * Pointer style.
2259 *
2260 * @typedef {pointer.PointerStyle} PointerStyle
2261 * @syscap SystemCapability.MultimodalInput.Input.Pointer
2262 * @atomicservice
2263 * @since 12
2264 */
2265export type PointerStyle = pointer.PointerStyle;
2266
2267/**
2268 * class CursorController
2269 *
2270 * @syscap SystemCapability.ArkUI.ArkUI.Full
2271 * @crossplatform
2272 * @atomicservice
2273 * @since 12
2274 */
2275export class CursorController {
2276  /**
2277   * Restore default cursor.
2278   *
2279   * @syscap SystemCapability.ArkUI.ArkUI.Full
2280   * @crossplatform
2281   * @atomicservice
2282   * @since 12
2283   */
2284  restoreDefault(): void;
2285  /**
2286   * Set cursor style.
2287   *
2288   * @param { PointerStyle } value - cursor style enum.
2289   * @syscap SystemCapability.ArkUI.ArkUI.Full
2290   * @crossplatform
2291   * @atomicservice
2292   * @since 12
2293   */
2294  setCursor(value: PointerStyle): void;
2295}
2296
2297/**
2298 * class ContextMenuController
2299 *
2300 * @syscap SystemCapability.ArkUI.ArkUI.Full
2301 * @crossplatform
2302 * @atomicservice
2303 * @since 12
2304 */
2305export class ContextMenuController {
2306  /**
2307   * Close context menu.
2308   *
2309   * @syscap SystemCapability.ArkUI.ArkUI.Full
2310   * @crossplatform
2311   * @atomicservice
2312   * @since 12
2313   */
2314  close(): void;
2315}
2316
2317/**
2318 * Class FrameCallback
2319 *
2320 * @syscap SystemCapability.ArkUI.ArkUI.Full
2321 * @crossplatform
2322 * @atomicservice
2323 * @since 12
2324 */
2325export abstract class FrameCallback {
2326  /**
2327   * Call when a new display frame is being rendered.
2328   *
2329   * @param { number } frameTimeInNano - The frame time in nanoseconds.
2330   * @syscap SystemCapability.ArkUI.ArkUI.Full
2331   * @crossplatform
2332   * @atomicservice
2333   * @since 12
2334   */
2335  onFrame(frameTimeInNano: number): void;
2336
2337  /**
2338   * Called at the end of the next idle frame. If there is no next frame, will request one automatically.
2339   *
2340   * @param { number } timeLeftInNano - The remaining time from the deadline for this frame.
2341   * @syscap SystemCapability.ArkUI.ArkUI.Full
2342   * @crossplatform
2343   * @atomicservice
2344   * @since 12
2345   */
2346  onIdle(timeLeftInNano: number): void;
2347}
2348
2349/**
2350 * The base context of an ability or an application. It allows access to
2351 * application-specific resources.
2352 *
2353 * @typedef { common.Context } Context
2354 * @syscap SystemCapability.Ability.AbilityRuntime.Core
2355 * @StageModelOnly
2356 * @crossplatform
2357 * @atomicservice
2358 * @since 12
2359 */
2360export type Context = common.Context;
2361
2362/**
2363 * class ComponentSnapshot
2364 * @syscap SystemCapability.ArkUI.ArkUI.Full
2365 * @atomicservice
2366 * @since 12
2367 */
2368export class ComponentSnapshot {
2369  /**
2370     * Get a component snapshot by component id.
2371     *
2372     * @param { string } id - Target component ID, set by developer through .id attribute.
2373     * @param { AsyncCallback<image.PixelMap> } callback - Callback that contains the snapshot in PixelMap format.
2374     * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2375     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2376     * <br> 1. Mandatory parameters are left unspecified.
2377     * <br> 2. Incorrect parameters types.
2378     * <br> 3. Parameter verification failed.
2379     * @throws { BusinessError } 100001 - Invalid ID.
2380     * @syscap SystemCapability.ArkUI.ArkUI.Full
2381     * @crossplatform
2382     * @atomicservice
2383     * @since 12
2384     */
2385  get(id: string, callback: AsyncCallback<image.PixelMap>, options?: componentSnapshot.SnapshotOptions): void;
2386
2387  /**
2388   * Get a component snapshot by component id.
2389   *
2390   * @param { string } id - Target component ID, set by developer through .id attribute.
2391   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2392   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2393   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2394   * <br> 1. Mandatory parameters are left unspecified.
2395   * <br> 2. Incorrect parameters types.
2396   * <br> 3. Parameter verification failed.
2397   * @throws { BusinessError } 100001 - Invalid ID.
2398   * @syscap SystemCapability.ArkUI.ArkUI.Full
2399   * @crossplatform
2400   * @atomicservice
2401   * @since 12
2402   */
2403  get(id: string, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2404
2405  /**
2406   * Generate a snapshot from a custom component builder.
2407   *
2408   * @param { CustomBuilder } builder - Builder function of a custom component.
2409   * @param { AsyncCallback<image.PixelMap> } callback - Callback that contains the snapshot in PixelMap format.
2410   * @param { number } [delay] - Defines the delay time to render the snapshot.
2411   * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot.
2412   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2413   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2414   * <br> 1. Mandatory parameters are left unspecified.
2415   * <br> 2. Incorrect parameters types.
2416   * <br> 3. Parameter verification failed.
2417   * @throws { BusinessError } 100001 - The builder is not a valid build function.
2418   * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
2419   * the ready state is required when the checkImageStatus option is enabled.
2420   * @syscap SystemCapability.ArkUI.ArkUI.Full
2421   * @crossplatform
2422   * @atomicservice
2423   * @since 12
2424   */
2425  createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap>,
2426    delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void;
2427
2428  /**
2429   * Generate a snapshot from a custom component builder.
2430   *
2431   * @param { CustomBuilder } builder - Builder function of a custom component.
2432   * @param { number } [delay] - Defines the delay time to render the snapshot.
2433   * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot.
2434   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2435   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2436   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2437   * <br> 1. Mandatory parameters are left unspecified.
2438   * <br> 2. Incorrect parameters types.
2439   * <br> 3. Parameter verification failed.
2440   * @throws { BusinessError } 100001 - The builder is not a valid build function.
2441   * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
2442   * the ready state is required when the checkImageStatus option is enabled.
2443   * @syscap SystemCapability.ArkUI.ArkUI.Full
2444   * @crossplatform
2445   * @atomicservice
2446   * @since 12
2447   */
2448  createFromBuilder(builder: CustomBuilder, delay?: number,
2449    checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2450
2451  /**
2452   * Take a screenshot of the specified component in synchronous mode,
2453   * this mode will block the main thread, please use it with caution, the maximum
2454   * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown.
2455   *
2456   * @param { string } id - Target component ID, set by developer through .id attribute.
2457   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2458   * @returns { image.PixelMap } The snapshot result in PixelMap format.
2459   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2460   * <br> 1. Mandatory parameters are left unspecified.
2461   * <br> 2. Incorrect parameters types.
2462   * <br> 3. Parameter verification failed.
2463   * @throws { BusinessError } 100001 - Invalid ID.
2464   * @throws { BusinessError } 160002 - Timeout.
2465   * @syscap SystemCapability.ArkUI.ArkUI.Full
2466   * @crossplatform
2467   * @atomicservice
2468   * @since 12
2469   */
2470  getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap;
2471}
2472
2473/**
2474 * class UIContext
2475 *
2476 * @syscap SystemCapability.ArkUI.ArkUI.Full
2477 * @crossplatform
2478 * @since 10
2479 */
2480/**
2481 * class UIContext
2482 *
2483 * @syscap SystemCapability.ArkUI.ArkUI.Full
2484 * @crossplatform
2485 * @atomicservice
2486 * @since 11
2487 */
2488export class UIContext {
2489  /**
2490   * get object font.
2491   *
2492   * @returns { Font } object Font.
2493   * @syscap SystemCapability.ArkUI.ArkUI.Full
2494   * @crossplatform
2495   * @since 10
2496   */
2497  /**
2498   * get object font.
2499   *
2500   * @returns { Font } object Font.
2501   * @syscap SystemCapability.ArkUI.ArkUI.Full
2502   * @crossplatform
2503   * @atomicservice
2504   * @since 11
2505   */
2506  getFont(): Font;
2507
2508  /**
2509   * get object mediaQuery.
2510   *
2511   * @returns { MediaQuery } object MediaQuery.
2512   * @syscap SystemCapability.ArkUI.ArkUI.Full
2513   * @crossplatform
2514   * @since 10
2515   */
2516  /**
2517   * get object mediaQuery.
2518   *
2519   * @returns { MediaQuery } object MediaQuery.
2520   * @syscap SystemCapability.ArkUI.ArkUI.Full
2521   * @crossplatform
2522   * @atomicservice
2523   * @since 11
2524   */
2525  getMediaQuery(): MediaQuery;
2526
2527  /**
2528   * get object UIInspector.
2529   * @returns { UIInspector } object UIInspector.
2530   * @syscap SystemCapability.ArkUI.ArkUI.Full
2531   * @crossplatform
2532   * @since 10
2533   */
2534  /**
2535   * get object UIInspector.
2536   * @returns { UIInspector } object UIInspector.
2537   * @syscap SystemCapability.ArkUI.ArkUI.Full
2538   * @crossplatform
2539   * @atomicservice
2540   * @since 11
2541   */
2542  getUIInspector(): UIInspector;
2543
2544  /**
2545   * get the filtered attributes of the component tree.
2546   * @param { Array<string> } [filters] - the list of filters used to filter out component tree to be obtained.
2547   * @returns { string } the specified attributes of the component tree in json string.
2548   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2549   * <br> 1. Mandatory parameters are left unspecified.
2550   * <br> 2. Incorrect parameters types.
2551   * <br> 3. Parameter verification failed.
2552   * @syscap SystemCapability.ArkUI.ArkUI.Full
2553   * @crossplatform
2554   * @atomicservice
2555   * @since 12
2556   */
2557  getFilteredInspectorTree(filters?: Array<string>): string;
2558
2559  /**
2560   * get the filtered attributes of the component tree with the specified id and depth
2561   * @param { string } id - ID of the specified component tree to be obtained.
2562   * @param { number } depth - depth of the component tree to be obtained.
2563   * @param { Array<string> } [filters] - the list of filters used to filter out component tree to be obtained.
2564   * @returns { string } the specified attributes of the component tree in json string.
2565   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2566   * <br> 1. Mandatory parameters are left unspecified.
2567   * <br> 2. Incorrect parameters types.
2568   * <br> 3. Parameter verification failed.
2569   * @syscap SystemCapability.ArkUI.ArkUI.Full
2570   * @crossplatform
2571   * @atomicservice
2572   * @since 12
2573   */
2574  getFilteredInspectorTreeById(id: string, depth: number, filters?: Array<string>): string;
2575
2576  /**
2577   * get object router.
2578   *
2579   * @returns { Router } object Router.
2580   * @syscap SystemCapability.ArkUI.ArkUI.Full
2581   * @crossplatform
2582   * @since 10
2583   */
2584  /**
2585   * get object router.
2586   *
2587   * @returns { Router } object Router.
2588   * @syscap SystemCapability.ArkUI.ArkUI.Full
2589   * @crossplatform
2590   * @atomicservice
2591   * @since 11
2592   */
2593  getRouter(): Router;
2594
2595  /**
2596   * get object PromptAction.
2597   *
2598   * @returns { PromptAction } object PromptAction.
2599   * @syscap SystemCapability.ArkUI.ArkUI.Full
2600   * @crossplatform
2601   * @since 10
2602   */
2603  /**
2604   * get object PromptAction.
2605   *
2606   * @returns { PromptAction } object PromptAction.
2607   * @syscap SystemCapability.ArkUI.ArkUI.Full
2608   * @crossplatform
2609   * @atomicservice
2610   * @since 11
2611   */
2612  getPromptAction(): PromptAction;
2613
2614  /**
2615   * get object ComponentUtils.
2616   * @returns { ComponentUtils } object ComponentUtils.
2617   * @syscap SystemCapability.ArkUI.ArkUI.Full
2618   * @crossplatform
2619   * @since 10
2620   */
2621  /**
2622   * get object ComponentUtils.
2623   * @returns { ComponentUtils } object ComponentUtils.
2624   * @syscap SystemCapability.ArkUI.ArkUI.Full
2625   * @crossplatform
2626   * @atomicservice
2627   * @since 11
2628   */
2629  getComponentUtils(): ComponentUtils;
2630
2631  /**
2632   * Get the UI observer.
2633   *
2634   * @returns { UIObserver } The UI observer.
2635   * @syscap SystemCapability.ArkUI.ArkUI.Full
2636   * @crossplatform
2637   * @since 11
2638   */
2639  /**
2640   * Get the UI observer.
2641   *
2642   * @returns { UIObserver } The UI observer.
2643   * @syscap SystemCapability.ArkUI.ArkUI.Full
2644   * @crossplatform
2645   * @atomicservice
2646   * @since 12
2647   */
2648  getUIObserver(): UIObserver;
2649
2650  /**
2651   * Get object OverlayManager.
2652   *
2653   * @returns { OverlayManager } object OverlayManager.
2654   * @syscap SystemCapability.ArkUI.ArkUI.Full
2655   * @crossplatform
2656   * @atomicservice
2657   * @since 12
2658   */
2659  getOverlayManager(): OverlayManager;
2660
2661  /**
2662   * Create an animator object for custom animation.
2663   *
2664   * @param { AnimatorOptions } options - Options.
2665   * @returns { AnimatorResult }
2666   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2667   * <br> 1. Mandatory parameters are left unspecified.
2668   * <br> 2. Incorrect parameters types.
2669   * <br> 3. Parameter verification failed.
2670   * @syscap SystemCapability.ArkUI.ArkUI.Full
2671   * @crossplatform
2672   * @since 10
2673   */
2674  /**
2675   * Create an animator object for custom animation.
2676   *
2677   * @param { AnimatorOptions } options - Options.
2678   * @returns { AnimatorResult }
2679   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2680   * <br> 1. Mandatory parameters are left unspecified.
2681   * <br> 2. Incorrect parameters types.
2682   * <br> 3. Parameter verification failed.
2683   * @syscap SystemCapability.ArkUI.ArkUI.Full
2684   * @crossplatform
2685   * @atomicservice
2686   * @since 11
2687   */
2688  createAnimator(options: AnimatorOptions): AnimatorResult;
2689
2690  /**
2691   * Defining animation function
2692   *
2693   * @param { AnimateParam } value - parameters for animation.
2694   * @param { function } event - the closure base on which, the system will create animation automatically
2695   * @syscap SystemCapability.ArkUI.ArkUI.Full
2696   * @crossplatform
2697   * @since 10
2698   */
2699  /**
2700   * Defining animation function
2701   *
2702   * @param { AnimateParam } value - parameters for animation.
2703   * @param { function } event - the closure base on which, the system will create animation automatically
2704   * @syscap SystemCapability.ArkUI.ArkUI.Full
2705   * @crossplatform
2706   * @atomicservice
2707   * @since 11
2708   */
2709  animateTo(value: AnimateParam, event: () => void): void;
2710
2711  /**
2712   * alertDialog display.
2713   *
2714   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options.
2715   * @syscap SystemCapability.ArkUI.ArkUI.Full
2716   * @crossplatform
2717   * @since 10
2718   */
2719  /**
2720   * alertDialog display.
2721   *
2722   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options.
2723   * @syscap SystemCapability.ArkUI.ArkUI.Full
2724   * @crossplatform
2725   * @atomicservice
2726   * @since 11
2727   */
2728  showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void;
2729
2730  /**
2731   * actionSheet display.
2732   *
2733   * @param { ActionSheetOptions } value - Options.
2734   * @syscap SystemCapability.ArkUI.ArkUI.Full
2735   * @crossplatform
2736   * @since 10
2737   */
2738  /**
2739   * actionSheet display.
2740   *
2741   * @param { ActionSheetOptions } value - Options.
2742   * @syscap SystemCapability.ArkUI.ArkUI.Full
2743   * @crossplatform
2744   * @atomicservice
2745   * @since 11
2746   */
2747  showActionSheet(value: ActionSheetOptions): void;
2748
2749  /**
2750   * datePickerDialog display.
2751   *
2752   * @param { DatePickerDialogOptions } options - Options.
2753   * @syscap SystemCapability.ArkUI.ArkUI.Full
2754   * @crossplatform
2755   * @since 10
2756   */
2757  /**
2758   * datePickerDialog display.
2759   *
2760   * @param { DatePickerDialogOptions } options - Options.
2761   * @syscap SystemCapability.ArkUI.ArkUI.Full
2762   * @crossplatform
2763   * @atomicservice
2764   * @since 11
2765   */
2766  showDatePickerDialog(options: DatePickerDialogOptions): void;
2767
2768  /**
2769   * timePickerDialog display.
2770   *
2771   * @param { TimePickerDialogOptions } options - Options.
2772   * @syscap SystemCapability.ArkUI.ArkUI.Full
2773   * @crossplatform
2774   * @since 10
2775   */
2776  /**
2777   * timePickerDialog display.
2778   *
2779   * @param { TimePickerDialogOptions } options - Options.
2780   * @syscap SystemCapability.ArkUI.ArkUI.Full
2781   * @crossplatform
2782   * @atomicservice
2783   * @since 11
2784   */
2785  showTimePickerDialog(options: TimePickerDialogOptions): void;
2786
2787  /**
2788   * textPickerDialog display.
2789   *
2790   * @param { TextPickerDialogOptions } options - Options.
2791   * @syscap SystemCapability.ArkUI.ArkUI.Full
2792   * @crossplatform
2793   * @since 10
2794   */
2795  /**
2796   * textPickerDialog display.
2797   *
2798   * @param { TextPickerDialogOptions } options - Options.
2799   * @syscap SystemCapability.ArkUI.ArkUI.Full
2800   * @crossplatform
2801   * @atomicservice
2802   * @since 11
2803   */
2804  showTextPickerDialog(options: TextPickerDialogOptions): void;
2805
2806  /**
2807   * Run custom functions inside the UIContext scope.
2808   *
2809   * @param { function } callback - The function called through UIContext.
2810   * @syscap SystemCapability.ArkUI.ArkUI.Full
2811   * @crossplatform
2812   * @since 10
2813   */
2814  /**
2815   * Run custom functions inside the UIContext scope.
2816   *
2817   * @param { function } callback - The function called through UIContext.
2818   * @syscap SystemCapability.ArkUI.ArkUI.Full
2819   * @crossplatform
2820   * @atomicservice
2821   * @since 11
2822   */
2823  runScopedTask(callback: () => void): void;
2824
2825  /**
2826   * Set KeyboardAvoidMode. The default mode is KeyboardAvoidMode.OFFSET
2827   *
2828   * @param { KeyboardAvoidMode } value - The mode of keyboard avoid.
2829   * @syscap SystemCapability.ArkUI.ArkUI.Full
2830   * @crossplatform
2831   * @atomicservice
2832   * @since 11
2833   */
2834  setKeyboardAvoidMode(value: KeyboardAvoidMode): void;
2835
2836  /**
2837   * Get KeyboardAvoidMode.
2838   * @returns { KeyboardAvoidMode } The mode of keyboard avoid.
2839   * @syscap SystemCapability.ArkUI.ArkUI.Full
2840   * @crossplatform
2841   * @atomicservice
2842   * @since 11
2843   */
2844  getKeyboardAvoidMode(): KeyboardAvoidMode;
2845
2846  /**
2847   * Get AtomicServiceBar.
2848   * @returns { Nullable<AtomicServiceBar> } The atomic service bar.
2849   * @syscap SystemCapability.ArkUI.ArkUI.Full
2850   * @crossplatform
2851   * @atomicservice
2852   * @since 11
2853   */
2854  getAtomicServiceBar(): Nullable<AtomicServiceBar>;
2855
2856  /**
2857   * Get DragController.
2858   * @returns { DragController } the DragController
2859   * @syscap SystemCapability.ArkUI.ArkUI.Full
2860   * @since 11
2861   */
2862  /**
2863   * Get DragController.
2864   * @returns { DragController } the DragController
2865   * @syscap SystemCapability.ArkUI.ArkUI.Full
2866   * @atomicservice
2867   * @since 12
2868   */
2869  getDragController(): DragController;
2870
2871  /**
2872    * Get MeasureUtils.
2873    * @returns { MeasureUtils } the MeasureUtils
2874    * @syscap SystemCapability.ArkUI.ArkUI.Full
2875    * @crossplatform
2876    * @atomicservice
2877    * @since 12
2878    */
2879  getMeasureUtils(): MeasureUtils;
2880
2881  /**
2882   * Defining keyframe animation function.
2883   *
2884   * @param { KeyframeAnimateParam } param - overall animation parameters
2885   * @param { Array<KeyframeState> } keyframes - all keyframe states
2886   * @syscap SystemCapability.ArkUI.ArkUI.Full
2887   * @crossplatform
2888   * @since 11
2889   */
2890  /**
2891   * Defining keyframe animation function.
2892   *
2893   * @param { KeyframeAnimateParam } param - overall animation parameters
2894   * @param { Array<KeyframeState> } keyframes - all keyframe states
2895   * @syscap SystemCapability.ArkUI.ArkUI.Full
2896   * @crossplatform
2897   * @atomicservice
2898   * @since 12
2899   */
2900  keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array<KeyframeState>): void;
2901
2902  /**
2903   * Get FocusController.
2904   * @returns { FocusController } the FocusController
2905   * @syscap SystemCapability.ArkUI.ArkUI.Full
2906   * @atomicservice
2907   * @since 12
2908   */
2909  getFocusController(): FocusController;
2910
2911  /**
2912   * Define animation functions for immediate distribution.
2913   *
2914   * @param { AnimateParam } param - Set animation effect parameters.
2915   * @param { Callback<void> } event - Specify the closure function that displays dynamic effects,
2916   * and the system will automatically insert transition animations for state changes caused by the closure function.
2917   * @syscap SystemCapability.ArkUI.ArkUI.Full
2918   * @systemapi
2919   * @since 12
2920   */
2921  animateToImmediately(param: AnimateParam, event: Callback<void>): void;
2922
2923  /**
2924   * Get FrameNode by id.
2925   *
2926   * @param { string } id - The id of FrameNode.
2927   * @returns { FrameNode | null } The instance of FrameNode.
2928   * @syscap SystemCapability.ArkUI.ArkUI.Full
2929   * @crossplatform
2930   * @atomicservice
2931   * @since 12
2932   */
2933   getFrameNodeById(id: string): FrameNode | null;
2934
2935  /**
2936   * Get the FrameNode attached to current window by id.
2937   *
2938   * @param { string } id - The id of FrameNode.
2939   * @returns { FrameNode | null } The instance of FrameNode.
2940   * @syscap SystemCapability.ArkUI.ArkUI.Full
2941   * @crossplatform
2942   * @atomicservice
2943   * @since 12
2944   */
2945  getAttachedFrameNodeById(id: string): FrameNode | null;
2946
2947  /**
2948   * Get FrameNode by uniqueId.
2949   *
2950   * @param { number } id - The uniqueId of the FrameNode.
2951   * @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed.
2952   * @syscap SystemCapability.ArkUI.ArkUI.Full
2953   * @crossplatform
2954   * @atomicservice
2955   * @since 12
2956   */
2957  getFrameNodeByUniqueId(id: number): FrameNode | null;
2958
2959  /**
2960   * Get page information of the frameNode with uniqueId.
2961   *
2962   * @param { number } id - The uniqueId of the target FrameNode.
2963   * @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes
2964   * navDestination and router page information. If the frame node does not have navDestination and
2965   * router page information, it will return an empty object.
2966   * @syscap SystemCapability.ArkUI.ArkUI.Full
2967   * @crossplatform
2968   * @atomicservice
2969   * @since 12
2970   */
2971  getPageInfoByUniqueId(id: number): PageInfo;
2972
2973  /**
2974   * Get navigation information of the frameNode with uniqueId.
2975   *
2976   * @param { number } id - The uniqueId of the target FrameNode.
2977   * @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the
2978   * target uniqueId, or undefined if the frameNode is not existed or does not have navigation information.
2979   * @syscap SystemCapability.ArkUI.ArkUI.Full
2980   * @crossplatform
2981   * @atomicservice
2982   * @since 12
2983   */
2984  getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined;
2985
2986  /**
2987   * Dynamic dimming.
2988   *
2989   * @param { string } id - The id of FrameNode.
2990   * @param { number } value - Compared to the original level of dimming.value range [0,1],
2991   * set values less than 0 to 0 and values greater than 1 to 1.
2992   * @syscap SystemCapability.ArkUI.ArkUI.Full
2993   * @systemapi
2994   * @since 12
2995   */
2996  setDynamicDimming(id: string, value: number): void;
2997
2998  /**
2999   * Get object cursor controller.
3000   *
3001   * @returns { CursorController } object cursor controller.
3002   * @syscap SystemCapability.ArkUI.ArkUI.Full
3003   * @crossplatform
3004   * @atomicservice
3005   * @since 12
3006   */
3007  getCursorController(): CursorController;
3008
3009  /**
3010   * Get object context menu controller.
3011   *
3012   * @returns { ContextMenuController } object context menu controller.
3013   * @syscap SystemCapability.ArkUI.ArkUI.Full
3014   * @crossplatform
3015   * @atomicservice
3016   * @since 12
3017   */
3018  getContextMenuController(): ContextMenuController;
3019
3020  /**
3021   * Get ComponentSnapshot.
3022   * @returns { ComponentSnapshot } the ComponentSnapshot
3023   * @syscap SystemCapability.ArkUI.ArkUI.Full
3024   * @atomicservice
3025   * @since 12
3026   */
3027  getComponentSnapshot(): ComponentSnapshot;
3028
3029  /**
3030   * Converts a value in vp units to a value in px.
3031   * @param { number } value
3032   * @returns { number }
3033   * @syscap SystemCapability.ArkUI.ArkUI.Full
3034   * @atomicservice
3035   * @since 12
3036   */
3037  vp2px(value: number): number;
3038
3039  /**
3040   * Converts a value in px units to a value in vp.
3041   * @param { number } value
3042   * @returns { number }
3043   * @syscap SystemCapability.ArkUI.ArkUI.Full
3044   * @atomicservice
3045   * @since 12
3046   */
3047  px2vp(value: number): number;
3048
3049  /**
3050   * Converts a value in fp units to a value in px.
3051   * @param { number } value
3052   * @returns { number }
3053   * @syscap SystemCapability.ArkUI.ArkUI.Full
3054   * @atomicservice
3055   * @since 12
3056   */
3057  fp2px(value: number): number;
3058
3059  /**
3060   * Converts a value in px units to a value in fp.
3061   * @param { number } value
3062   * @returns { number }
3063   * @syscap SystemCapability.ArkUI.ArkUI.Full
3064   * @atomicservice
3065   * @since 12
3066   */
3067  px2fp(value: number): number;
3068
3069  /**
3070   * Converts a value in lpx units to a value in px.
3071   * @param { number } value
3072   * @returns { number }
3073   * @syscap SystemCapability.ArkUI.ArkUI.Full
3074   * @atomicservice
3075   * @since 12
3076   */
3077  lpx2px(value: number): number;
3078
3079  /**
3080   * Converts a value in px units to a value in lpx.
3081   * @param { number } value
3082   * @returns { number }
3083   * @syscap SystemCapability.ArkUI.ArkUI.Full
3084   * @atomicservice
3085   * @since 12
3086   */
3087  px2lpx(value: number): number;
3088
3089  /**
3090   * Get current LocalStorage shared from stage.
3091   *
3092   * @returns { LocalStorage | undefined }
3093   * @syscap SystemCapability.ArkUI.ArkUI.Full
3094   * @stagemodelonly
3095   * @crossplatform
3096   * @atomicservice
3097   * @since 12
3098   */
3099  getSharedLocalStorage(): LocalStorage | undefined;
3100
3101  /**
3102   * Obtains context of the ability.
3103   *
3104   * @returns { Context | undefined }
3105   * @syscap SystemCapability.ArkUI.ArkUI.Full
3106   * @stagemodelonly
3107   * @crossplatform
3108   * @atomicservice
3109   * @since 12
3110   */
3111  getHostContext(): Context | undefined;
3112
3113  /**
3114   * Get the name of current window.
3115   *
3116   * @returns { string | undefined } The name of current window, or undefined if the window doesn't exist.
3117   * @syscap SystemCapability.ArkUI.ArkUI.Full
3118   * @crossplatform
3119   * @atomicservice
3120   * @since 12
3121   */
3122  getWindowName(): string | undefined;
3123
3124  /**
3125   * Get the width breakpoint of current window.
3126   *
3127   * @returns { WidthBreakpoint } The width breakpoint of current window.
3128   * @syscap SystemCapability.ArkUI.ArkUI.Full
3129   * @atomicservice
3130   * @since 13
3131   */
3132  getWindowWidthBreakpoint(): WidthBreakpoint;
3133
3134  /**
3135   * Get the height breakpoint of current window.
3136   *
3137   * @returns { HeightBreakpoint } The height breakpoint of current window.
3138   * @syscap SystemCapability.ArkUI.ArkUI.Full
3139   * @atomicservice
3140   * @since 13
3141   */
3142  getWindowHeightBreakpoint(): HeightBreakpoint;
3143
3144  /**
3145   * Open the BindSheet.
3146   *
3147   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3148   * @param { SheetOptions } sheetOptions - The options of sheet.
3149   * @param { number } targetId - The uniqueId of the FrameNode to which BindSheet is attached.
3150   * @returns { Promise<void> } The promise returned by the function.
3151   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3152   * <br> 1. Mandatory parameters are left unspecified.
3153   * <br> 2. Incorrect parameters types.
3154   * <br> 3. Parameter verification failed.
3155   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3156   * @throws { BusinessError } 120002 - The bindSheetContent already exists.
3157   * @throws { BusinessError } 120004 - The targetId does not exist.
3158   * @throws { BusinessError } 120005 - The node of targetId is not in the component tree.
3159   * @throws { BusinessError } 120006 - The node of targetId is not a child of the page node or NavDestination node.
3160   * @syscap SystemCapability.ArkUI.ArkUI.Full
3161   * @crossplatform
3162   * @atomicservice
3163   * @since 12
3164   */
3165  openBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions?: SheetOptions, targetId?: number): Promise<void>;
3166
3167  /**
3168   * Update the BindSheet with sheetOptions.
3169   *
3170   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3171   * @param { SheetOptions } sheetOptions - The update options of sheet.
3172   * @param { boolean } partialUpdate - If true, only the specified properties in the sheetOptions are updated,
3173   *                                    otherwise the rest of the properties are overwritten with the default values.
3174   *                                    Default value is false.
3175   * @returns { Promise<void> } The promise returned by the function.
3176   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3177   * <br> 1. Mandatory parameters are left unspecified.
3178   * <br> 2. Incorrect parameters types.
3179   * <br> 3. Parameter verification failed.
3180   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3181   * @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
3182   * @syscap SystemCapability.ArkUI.ArkUI.Full
3183   * @crossplatform
3184   * @atomicservice
3185   * @since 12
3186   */
3187  updateBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise<void>;
3188
3189  /**
3190   * Close the BindSheet.
3191   *
3192   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3193   * @returns { Promise<void> } The promise returned by the function.
3194   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3195   * <br> 1. Mandatory parameters are left unspecified.
3196   * <br> 2. Incorrect parameters types.
3197   * <br> 3. Parameter verification failed.
3198   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3199   * @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
3200   * @syscap SystemCapability.ArkUI.ArkUI.Full
3201   * @crossplatform
3202   * @atomicservice
3203   * @since 12
3204   */
3205  closeBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>): Promise<void>;
3206
3207  /**
3208   * Post a frame callback to run on the next frame.
3209   *
3210   * @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
3211   * @syscap SystemCapability.ArkUI.ArkUI.Full
3212   * @atomicservice
3213   * @since 12
3214   */
3215  postFrameCallback(frameCallback: FrameCallback): void;
3216
3217  /**
3218   * Post a frame callback to run on the next frame after the specified delay.
3219   *
3220   * @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
3221   * @param { number } delayTime - The delay time in milliseconds,
3222   * @syscap SystemCapability.ArkUI.ArkUI.Full
3223   * @atomicservice
3224   * @since 12
3225   */
3226  postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void;
3227
3228  /**
3229   * Require DynamicSyncScene by id.
3230   *
3231   * @param { string } id - The id of DynamicSyncScene.
3232   * @returns { Array<DynamicSyncScene>} The instance of SwiperDynamicSyncScene.
3233   * @syscap SystemCapability.ArkUI.ArkUI.Full
3234   * @atomicservice
3235   * @since 12
3236   */
3237  requireDynamicSyncScene(id: string): Array<DynamicSyncScene>;
3238
3239  /**
3240   * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process
3241   * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload.
3242   *
3243   * @throws { BusinessError } 202 - The caller is not a system application.
3244   * @syscap SystemCapability.ArkUI.ArkUI.Full
3245   * @systemapi
3246   * @atomicservice
3247   * @since 12
3248   */
3249  /**
3250   * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process
3251   * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload.
3252   *
3253   * @throws { BusinessError } 202 - The caller is not a system application.
3254   * @syscap SystemCapability.ArkUI.ArkUI.Full
3255   * @systemapi
3256   * @since 13
3257   */
3258  clearResourceCache(): void;
3259
3260  /**
3261   * Checks whether current font scale follows the system.
3262   *
3263   * @returns { boolean } Returns true if current font scale follows the system; returns false otherwise.
3264   * @syscap SystemCapability.ArkUI.ArkUI.Full
3265   * @crossplatform
3266   * @atomicservice
3267   * @since 13
3268   */
3269  isFollowingSystemFontScale(): boolean;
3270
3271  /**
3272   * Get the max font scale.
3273   *
3274   * @returns { number } The max font scale.
3275   * @syscap SystemCapability.ArkUI.ArkUI.Full
3276   * @crossplatform
3277   * @atomicservice
3278   * @since 13
3279   */
3280  getMaxFontScale(): number;
3281
3282  /**
3283   * Bind tabs to scrollable container component to automatically hide tab bar.
3284   *
3285   * @param { TabsController } tabsController - The controller of the tabs.
3286   * @param { Scroller } scroller - The controller of the scrollable container component.
3287   * @syscap SystemCapability.ArkUI.ArkUI.Full
3288   * @crossplatform
3289   * @atomicservice
3290   * @since 13
3291   */
3292  bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void;
3293
3294  /**
3295   * Unbind tabs from scrollable container component.
3296   *
3297   * @param { TabsController } tabsController - The controller of the tabs.
3298   * @param { Scroller } scroller - The controller of the scrollable container component.
3299   * @syscap SystemCapability.ArkUI.ArkUI.Full
3300   * @crossplatform
3301   * @atomicservice
3302   * @since 13
3303   */
3304  unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void;
3305
3306  /**
3307   * Bind tabs to nested scrollable container components to automatically hide tab bar.
3308   *
3309   * @param { TabsController } tabsController - The controller of the tabs.
3310   * @param { Scroller } parentScroller - The controller of the parent scrollable container component.
3311   * @param { Scroller } childScroller - The controller of the child scrollable container component.
3312   * @syscap SystemCapability.ArkUI.ArkUI.Full
3313   * @crossplatform
3314   * @atomicservice
3315   * @since 13
3316   */
3317  bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
3318
3319  /**
3320   * Unbind tabs from nested scrollable container components.
3321   *
3322   * @param { TabsController } tabsController - The controller of the tabs.
3323   * @param { Scroller } parentScroller - The controller of the parent scrollable container component.
3324   * @param { Scroller } childScroller - The controller of the child scrollable container component.
3325   * @syscap SystemCapability.ArkUI.ArkUI.Full
3326   * @crossplatform
3327   * @atomicservice
3328   * @since 13
3329   */
3330  unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
3331}
3332
3333/**
3334 * Enum of KeyBoardAvoidMethodType
3335 *
3336 * @enum { number } KeyBoardAvoidMethodType
3337 * @syscap SystemCapability.ArkUI.ArkUI.Full
3338 * @crossplatform
3339 * @atomicservice
3340 * @since 11
3341 */
3342
3343export const enum KeyboardAvoidMode {
3344  /**
3345  * Default Type, offset the whole page when keyBoard height changed.
3346  * @syscap SystemCapability.ArkUI.ArkUI.Full
3347  * @crossplatform
3348  * @atomicservice
3349  * @since 11
3350  */
3351  OFFSET = 0,
3352
3353  /**
3354   * Resize Type, resize the page when keyBoard height changed.
3355   * @syscap SystemCapability.ArkUI.ArkUI.Full
3356   * @crossplatform
3357   * @atomicservice
3358   * @since 11
3359   */
3360  RESIZE = 1,
3361
3362  /**
3363  * Offset Type, offset the whole page when caret position or keyboard height changed.
3364  * @syscap SystemCapability.ArkUI.ArkUI.Full
3365  * @crossplatform
3366  * @atomicservice
3367  * @since 14
3368  */
3369  OFFSET_WITH_CARET = 2,
3370
3371  /**
3372  * Resize Type, resize the whole page when when caret position or keyboard height changed.
3373  * @syscap SystemCapability.ArkUI.ArkUI.Full
3374  * @crossplatform
3375  * @atomicservice
3376  * @since 14
3377  */
3378  RESIZE_WITH_CARET = 3,
3379
3380  /**
3381  * None Type, nothing to do when keyboard height changed.
3382  * @syscap SystemCapability.ArkUI.ArkUI.Full
3383  * @crossplatform
3384  * @atomicservice
3385  * @since 14
3386  */
3387  NONE = 4,
3388}
3389
3390/**
3391 * Enum of SwiperDynamicSyncSceneType
3392 *
3393 * @enum { number } SwiperDynamicSyncSceneType
3394 * @syscap SystemCapability.ArkUI.ArkUI.Full
3395 * @atomicservice
3396 * @since 12
3397 */
3398export const enum SwiperDynamicSyncSceneType {
3399  /**
3400   * Scene type is GESTURE.
3401   *
3402   * @syscap SystemCapability.ArkUI.ArkUI.Full
3403   * @atomicservice
3404   * @since 12
3405   */
3406  GESTURE = 0,
3407
3408  /**
3409   * Scene type is ANIMATION.
3410   *
3411   * @syscap SystemCapability.ArkUI.ArkUI.Full
3412   * @atomicservice
3413   * @since 12
3414   */
3415  ANIMATION = 1
3416}
3417
3418/**
3419 * Enum of scene type for Marquee
3420 *
3421 * @enum { number } MarqueeDynamicSyncSceneType
3422 * @syscap SystemCapability.ArkUI.ArkUI.Full
3423 * @atomicservice
3424 * @since 14
3425 */
3426export const enum MarqueeDynamicSyncSceneType {
3427  /**
3428   * Scene type is ANIMATION.
3429   *
3430   * @syscap SystemCapability.ArkUI.ArkUI.Full
3431   * @atomicservice
3432   * @since 14
3433   */
3434  ANIMATION = 1
3435}
3436