• 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 * class DragController
2022 * @syscap SystemCapability.ArkUI.ArkUI.Full
2023 * @since 11
2024 */
2025/**
2026 * class DragController
2027 * @syscap SystemCapability.ArkUI.ArkUI.Full
2028 * @atomicservice
2029 * @since 12
2030 */
2031export class DragController {
2032  /**
2033   * Execute a drag event.
2034   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2035   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2036   * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains
2037   * the drag event information.
2038   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2039   * <br> 1. Mandatory parameters are left unspecified.
2040   * <br> 2. Incorrect parameters types.
2041   * <br> 3. Parameter verification failed.
2042   * @throws { BusinessError } 100001 - Internal handling failed.
2043   * @syscap SystemCapability.ArkUI.ArkUI.Full
2044   * @since 11
2045   */
2046  /**
2047   * Execute a drag event.
2048   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2049   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2050   * @param { AsyncCallback<dragController.DragEventParam> } callback - Callback that contains
2051   * the drag event information.
2052   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2053   * <br> 1. Mandatory parameters are left unspecified.
2054   * <br> 2. Incorrect parameters types.
2055   * <br> 3. Parameter verification failed.
2056   * @throws { BusinessError } 100001 - Internal handling failed.
2057   * @syscap SystemCapability.ArkUI.ArkUI.Full
2058   * @atomicservice
2059   * @since 12
2060   */
2061  executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo,
2062    callback: AsyncCallback<dragController.DragEventParam>): void;
2063
2064  /**
2065   * Execute a drag event.
2066   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2067   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2068   * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information.
2069   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2070   * <br> 1. Mandatory parameters are left unspecified.
2071   * <br> 2. Incorrect parameters types.
2072   * <br> 3. Parameter verification failed.
2073   * @throws { BusinessError } 100001 - Internal handling failed.
2074   * @syscap SystemCapability.ArkUI.ArkUI.Full
2075   * @since 11
2076   */
2077  /**
2078   * Execute a drag event.
2079   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2080   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2081   * @returns { Promise<dragController.DragEventParam> } A Promise with the drag event information.
2082   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2083   * <br> 1. Mandatory parameters are left unspecified.
2084   * <br> 2. Incorrect parameters types.
2085   * <br> 3. Parameter verification failed.
2086   * @throws { BusinessError } 100001 - Internal handling failed.
2087   * @syscap SystemCapability.ArkUI.ArkUI.Full
2088   * @atomicservice
2089   * @since 12
2090   */
2091  executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo)
2092    : Promise<dragController.DragEventParam>;
2093
2094  /**
2095   * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started.
2096   * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts displayed when the objects are dragged.
2097   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2098   * @returns { dragController.DragAction } one drag action object
2099   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2100   * <br> 1. Mandatory parameters are left unspecified.
2101   * <br> 2. Incorrect parameters types.
2102   * <br> 3. Parameter verification failed.
2103   * @throws { BusinessError } 100001 - Internal handling failed.
2104   * @syscap SystemCapability.ArkUI.ArkUI.Full
2105   * @since 11
2106   */
2107  /**
2108   * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started.
2109   * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts displayed when the objects are dragged.
2110   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2111   * @returns { dragController.DragAction } one drag action object
2112   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2113   * <br> 1. Mandatory parameters are left unspecified.
2114   * <br> 2. Incorrect parameters types.
2115   * <br> 3. Parameter verification failed.
2116   * @throws { BusinessError } 100001 - Internal handling failed.
2117   * @syscap SystemCapability.ArkUI.ArkUI.Full
2118   * @atomicservice
2119   * @since 12
2120   */
2121  createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: dragController.DragInfo): dragController.DragAction;
2122
2123  /**
2124   * Get a drag preview object, which provides the functions of setting color or updating animation and has no effect in OnDrop and OnDragEnd callback.
2125   * @returns { dragController.DragPreview } A drag preview object.
2126   * @syscap SystemCapability.ArkUI.ArkUI.Full
2127   * @since 11
2128   */
2129  /**
2130   * Get a drag preview object.
2131   * @returns { dragController.DragPreview } A drag preview object.
2132   * @syscap SystemCapability.ArkUI.ArkUI.Full
2133   * @atomicservice
2134   * @since 12
2135   */
2136  getDragPreview(): dragController.DragPreview;
2137
2138  /**
2139   * Enable drag event strict reporting for drag enter and leave notification in nested situation.
2140   * For example, the parent and child both register the onDragEnter/onDragLeave events, if this
2141   * flag is enabled, the parent will be notified with leave event, and the child will notified with
2142   * enter event at the same time, when user drag action is passing through the parent and enter the
2143   * scope of the child.
2144   * Please be noted, the default value of the flag is false, it means, for the same situation, the
2145   * parent will not receive the leave notification, just the child can get the enter event, which is
2146   * not fully strict.
2147   * @param { boolean } enable - Indicating enable drag event strict reporting or not.
2148   * @syscap SystemCapability.ArkUI.ArkUI.Full
2149   * @atomicservice
2150   * @since 12
2151   */
2152  setDragEventStrictReportingEnabled(enable: boolean): void;
2153}
2154
2155/**
2156 * class MeasureUtils
2157 * @syscap SystemCapability.ArkUI.ArkUI.Full
2158 * @crossplatform
2159 * @atomicservice
2160 * @since 12
2161 */
2162export class MeasureUtils {
2163  /**
2164   * Obtains the width of the specified text in a single line layout.
2165   *
2166   * @param { MeasureOptions } options - Options.
2167   * @returns { number }
2168   * @syscap SystemCapability.ArkUI.ArkUI.Full
2169   * @crossplatform
2170   * @atomicservice
2171   * @since 12
2172   */
2173  measureText(options: MeasureOptions): number;
2174
2175  /**
2176   * Obtains the width and height of the specified text in a single line layout.
2177   *
2178   * @param { MeasureOptions } options - Options of measure area occupied by text.
2179   * @returns { SizeOptions } width and height for text to display
2180   * @syscap SystemCapability.ArkUI.ArkUI.Full
2181   * @crossplatform
2182   * @atomicservice
2183   * @since 12
2184   */
2185  measureTextSize(options: MeasureOptions): SizeOptions;
2186}
2187
2188/**
2189 * class FocusController
2190 * @syscap SystemCapability.ArkUI.ArkUI.Full
2191 * @atomicservice
2192 * @since 12
2193 */
2194 export class FocusController {
2195  /**
2196   * clear focus to the root container.
2197   * @syscap SystemCapability.ArkUI.ArkUI.Full
2198   * @atomicservice
2199   * @since 12
2200   */
2201  clearFocus(): void;
2202
2203  /**
2204   * request focus to the specific component.
2205   * @param { string } key - the inspector key of the component.
2206   * @throws { BusinessError } 150001 - the component cannot be focused.
2207   * @throws { BusinessError } 150002 - This component has an unfocusable ancestor.
2208   * @throws { BusinessError } 150003 - the component is not on tree or does not exist.
2209   * @syscap SystemCapability.ArkUI.ArkUI.Full
2210   * @atomicservice
2211   * @since 12
2212   */
2213  requestFocus(key: string): void;
2214}
2215
2216/**
2217 * Pointer style.
2218 *
2219 * @typedef {pointer.PointerStyle} PointerStyle
2220 * @syscap SystemCapability.MultimodalInput.Input.Pointer
2221 * @atomicservice
2222 * @since 12
2223 */
2224export type PointerStyle = pointer.PointerStyle;
2225
2226/**
2227 * class CursorController
2228 *
2229 * @syscap SystemCapability.ArkUI.ArkUI.Full
2230 * @crossplatform
2231 * @atomicservice
2232 * @since 12
2233 */
2234export class CursorController {
2235  /**
2236   * Restore default cursor.
2237   *
2238   * @syscap SystemCapability.ArkUI.ArkUI.Full
2239   * @crossplatform
2240   * @atomicservice
2241   * @since 12
2242   */
2243  restoreDefault(): void;
2244  /**
2245   * Set cursor style.
2246   *
2247   * @param { PointerStyle } value - cursor style enum.
2248   * @syscap SystemCapability.ArkUI.ArkUI.Full
2249   * @crossplatform
2250   * @atomicservice
2251   * @since 12
2252   */
2253  setCursor(value: PointerStyle): void;
2254}
2255
2256/**
2257 * class ContextMenuController
2258 *
2259 * @syscap SystemCapability.ArkUI.ArkUI.Full
2260 * @crossplatform
2261 * @atomicservice
2262 * @since 12
2263 */
2264export class ContextMenuController {
2265  /**
2266   * Close context menu.
2267   *
2268   * @syscap SystemCapability.ArkUI.ArkUI.Full
2269   * @crossplatform
2270   * @atomicservice
2271   * @since 12
2272   */
2273  close(): void;
2274}
2275
2276/**
2277 * Class FrameCallback
2278 *
2279 * @syscap SystemCapability.ArkUI.ArkUI.Full
2280 * @crossplatform
2281 * @atomicservice
2282 * @since 12
2283 */
2284export abstract class FrameCallback {
2285  /**
2286   * Call when a new display frame is being rendered.
2287   *
2288   * @param { number } frameTimeInNano - The frame time in nanoseconds.
2289   * @syscap SystemCapability.ArkUI.ArkUI.Full
2290   * @crossplatform
2291   * @atomicservice
2292   * @since 12
2293   */
2294  onFrame(frameTimeInNano: number): void;
2295
2296  /**
2297   * Called at the end of the next idle frame. If there is no next frame, will request one automatically.
2298   *
2299   * @param { number } timeLeftInNano - The remaining time from the deadline for this frame.
2300   * @syscap SystemCapability.ArkUI.ArkUI.Full
2301   * @crossplatform
2302   * @atomicservice
2303   * @since 12
2304   */
2305  onIdle(timeLeftInNano: number): void;
2306}
2307
2308/**
2309 * The base context of an ability or an application. It allows access to
2310 * application-specific resources.
2311 *
2312 * @typedef { common.Context } Context
2313 * @syscap SystemCapability.Ability.AbilityRuntime.Core
2314 * @StageModelOnly
2315 * @crossplatform
2316 * @atomicservice
2317 * @since 12
2318 */
2319export type Context = common.Context;
2320
2321/**
2322 * class ComponentSnapshot
2323 * @syscap SystemCapability.ArkUI.ArkUI.Full
2324 * @atomicservice
2325 * @since 12
2326 */
2327export class ComponentSnapshot {
2328  /**
2329     * Get a component snapshot by component id.
2330     *
2331     * @param { string } id - Target component ID, set by developer through .id attribute.
2332     * @param { AsyncCallback<image.PixelMap> } callback - Callback that contains the snapshot in PixelMap format.
2333     * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2334     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2335     * <br> 1. Mandatory parameters are left unspecified.
2336     * <br> 2. Incorrect parameters types.
2337     * <br> 3. Parameter verification failed.
2338     * @throws { BusinessError } 100001 - Invalid ID.
2339     * @syscap SystemCapability.ArkUI.ArkUI.Full
2340     * @crossplatform
2341     * @atomicservice
2342     * @since 12
2343     */
2344  get(id: string, callback: AsyncCallback<image.PixelMap>, options?: componentSnapshot.SnapshotOptions): void;
2345
2346  /**
2347   * Get a component snapshot by component id.
2348   *
2349   * @param { string } id - Target component ID, set by developer through .id attribute.
2350   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2351   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2352   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2353   * <br> 1. Mandatory parameters are left unspecified.
2354   * <br> 2. Incorrect parameters types.
2355   * <br> 3. Parameter verification failed.
2356   * @throws { BusinessError } 100001 - Invalid ID.
2357   * @syscap SystemCapability.ArkUI.ArkUI.Full
2358   * @crossplatform
2359   * @atomicservice
2360   * @since 12
2361   */
2362  get(id: string, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2363
2364  /**
2365   * Generate a snapshot from a custom component builder.
2366   *
2367   * @param { CustomBuilder } builder - Builder function of a custom component.
2368   * @param { AsyncCallback<image.PixelMap> } callback - Callback that contains the snapshot in PixelMap format.
2369   * @param { number } [delay] - Defines the delay time to render the snapshot.
2370   * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot.
2371   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2372   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2373   * <br> 1. Mandatory parameters are left unspecified.
2374   * <br> 2. Incorrect parameters types.
2375   * <br> 3. Parameter verification failed.
2376   * @throws { BusinessError } 100001 - The builder is not a valid build function.
2377   * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
2378   * the ready state is required when the checkImageStatus option is enabled.
2379   * @syscap SystemCapability.ArkUI.ArkUI.Full
2380   * @crossplatform
2381   * @atomicservice
2382   * @since 12
2383   */
2384  createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap>,
2385    delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void;
2386
2387  /**
2388   * Generate a snapshot from a custom component builder.
2389   *
2390   * @param { CustomBuilder } builder - Builder function of a custom component.
2391   * @param { number } [delay] - Defines the delay time to render the snapshot.
2392   * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot.
2393   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2394   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2395   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2396   * <br> 1. Mandatory parameters are left unspecified.
2397   * <br> 2. Incorrect parameters types.
2398   * <br> 3. Parameter verification failed.
2399   * @throws { BusinessError } 100001 - The builder is not a valid build function.
2400   * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
2401   * the ready state is required when the checkImageStatus option is enabled.
2402   * @syscap SystemCapability.ArkUI.ArkUI.Full
2403   * @crossplatform
2404   * @atomicservice
2405   * @since 12
2406   */
2407  createFromBuilder(builder: CustomBuilder, delay?: number,
2408    checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2409
2410  /**
2411   * Take a screenshot of the specified component in synchronous mode,
2412   * this mode will block the main thread, please use it with caution, the maximum
2413   * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown.
2414   *
2415   * @param { string } id - Target component ID, set by developer through .id attribute.
2416   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2417   * @returns { image.PixelMap } The snapshot result in PixelMap format.
2418   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2419   * <br> 1. Mandatory parameters are left unspecified.
2420   * <br> 2. Incorrect parameters types.
2421   * <br> 3. Parameter verification failed.
2422   * @throws { BusinessError } 100001 - Invalid ID.
2423   * @throws { BusinessError } 160002 - Timeout.
2424   * @syscap SystemCapability.ArkUI.ArkUI.Full
2425   * @crossplatform
2426   * @atomicservice
2427   * @since 12
2428   */
2429  getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap;
2430}
2431
2432/**
2433 * class UIContext
2434 *
2435 * @syscap SystemCapability.ArkUI.ArkUI.Full
2436 * @crossplatform
2437 * @since 10
2438 */
2439/**
2440 * class UIContext
2441 *
2442 * @syscap SystemCapability.ArkUI.ArkUI.Full
2443 * @crossplatform
2444 * @atomicservice
2445 * @since 11
2446 */
2447export class UIContext {
2448  /**
2449   * get object font.
2450   *
2451   * @returns { Font } object Font.
2452   * @syscap SystemCapability.ArkUI.ArkUI.Full
2453   * @crossplatform
2454   * @since 10
2455   */
2456  /**
2457   * get object font.
2458   *
2459   * @returns { Font } object Font.
2460   * @syscap SystemCapability.ArkUI.ArkUI.Full
2461   * @crossplatform
2462   * @atomicservice
2463   * @since 11
2464   */
2465  getFont(): Font;
2466
2467  /**
2468   * get object mediaQuery.
2469   *
2470   * @returns { MediaQuery } object MediaQuery.
2471   * @syscap SystemCapability.ArkUI.ArkUI.Full
2472   * @crossplatform
2473   * @since 10
2474   */
2475  /**
2476   * get object mediaQuery.
2477   *
2478   * @returns { MediaQuery } object MediaQuery.
2479   * @syscap SystemCapability.ArkUI.ArkUI.Full
2480   * @crossplatform
2481   * @atomicservice
2482   * @since 11
2483   */
2484  getMediaQuery(): MediaQuery;
2485
2486  /**
2487   * get object UIInspector.
2488   * @returns { UIInspector } object UIInspector.
2489   * @syscap SystemCapability.ArkUI.ArkUI.Full
2490   * @crossplatform
2491   * @since 10
2492   */
2493  /**
2494   * get object UIInspector.
2495   * @returns { UIInspector } object UIInspector.
2496   * @syscap SystemCapability.ArkUI.ArkUI.Full
2497   * @crossplatform
2498   * @atomicservice
2499   * @since 11
2500   */
2501  getUIInspector(): UIInspector;
2502
2503  /**
2504   * get the filtered attributes of the component tree.
2505   * @param { Array<string> } [filters] - the list of filters used to filter out component tree to be obtained.
2506   * @returns { string } the specified attributes of the component tree in json string.
2507   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2508   * <br> 1. Mandatory parameters are left unspecified.
2509   * <br> 2. Incorrect parameters types.
2510   * <br> 3. Parameter verification failed.
2511   * @syscap SystemCapability.ArkUI.ArkUI.Full
2512   * @crossplatform
2513   * @atomicservice
2514   * @since 12
2515   */
2516  getFilteredInspectorTree(filters?: Array<string>): string;
2517
2518  /**
2519   * get the filtered attributes of the component tree with the specified id and depth
2520   * @param { string } id - ID of the specified component tree to be obtained.
2521   * @param { number } depth - depth of the component tree to be obtained.
2522   * @param { Array<string> } [filters] - the list of filters used to filter out component tree to be obtained.
2523   * @returns { string } the specified attributes of the component tree in json string.
2524   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2525   * <br> 1. Mandatory parameters are left unspecified.
2526   * <br> 2. Incorrect parameters types.
2527   * <br> 3. Parameter verification failed.
2528   * @syscap SystemCapability.ArkUI.ArkUI.Full
2529   * @crossplatform
2530   * @atomicservice
2531   * @since 12
2532   */
2533  getFilteredInspectorTreeById(id: string, depth: number, filters?: Array<string>): string;
2534
2535  /**
2536   * get object router.
2537   *
2538   * @returns { Router } object Router.
2539   * @syscap SystemCapability.ArkUI.ArkUI.Full
2540   * @crossplatform
2541   * @since 10
2542   */
2543  /**
2544   * get object router.
2545   *
2546   * @returns { Router } object Router.
2547   * @syscap SystemCapability.ArkUI.ArkUI.Full
2548   * @crossplatform
2549   * @atomicservice
2550   * @since 11
2551   */
2552  getRouter(): Router;
2553
2554  /**
2555   * get object PromptAction.
2556   *
2557   * @returns { PromptAction } object PromptAction.
2558   * @syscap SystemCapability.ArkUI.ArkUI.Full
2559   * @crossplatform
2560   * @since 10
2561   */
2562  /**
2563   * get object PromptAction.
2564   *
2565   * @returns { PromptAction } object PromptAction.
2566   * @syscap SystemCapability.ArkUI.ArkUI.Full
2567   * @crossplatform
2568   * @atomicservice
2569   * @since 11
2570   */
2571  getPromptAction(): PromptAction;
2572
2573  /**
2574   * get object ComponentUtils.
2575   * @returns { ComponentUtils } object ComponentUtils.
2576   * @syscap SystemCapability.ArkUI.ArkUI.Full
2577   * @crossplatform
2578   * @since 10
2579   */
2580  /**
2581   * get object ComponentUtils.
2582   * @returns { ComponentUtils } object ComponentUtils.
2583   * @syscap SystemCapability.ArkUI.ArkUI.Full
2584   * @crossplatform
2585   * @atomicservice
2586   * @since 11
2587   */
2588  getComponentUtils(): ComponentUtils;
2589
2590  /**
2591   * Get the UI observer.
2592   *
2593   * @returns { UIObserver } The UI observer.
2594   * @syscap SystemCapability.ArkUI.ArkUI.Full
2595   * @crossplatform
2596   * @since 11
2597   */
2598  /**
2599   * Get the UI observer.
2600   *
2601   * @returns { UIObserver } The UI observer.
2602   * @syscap SystemCapability.ArkUI.ArkUI.Full
2603   * @crossplatform
2604   * @atomicservice
2605   * @since 12
2606   */
2607  getUIObserver(): UIObserver;
2608
2609  /**
2610   * Get object OverlayManager.
2611   *
2612   * @returns { OverlayManager } object OverlayManager.
2613   * @syscap SystemCapability.ArkUI.ArkUI.Full
2614   * @crossplatform
2615   * @atomicservice
2616   * @since 12
2617   */
2618  getOverlayManager(): OverlayManager;
2619
2620  /**
2621   * Create an animator object for custom animation.
2622   *
2623   * @param { AnimatorOptions } options - Options.
2624   * @returns { AnimatorResult }
2625   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2626   * <br> 1. Mandatory parameters are left unspecified.
2627   * <br> 2. Incorrect parameters types.
2628   * <br> 3. Parameter verification failed.
2629   * @syscap SystemCapability.ArkUI.ArkUI.Full
2630   * @crossplatform
2631   * @since 10
2632   */
2633  /**
2634   * Create an animator object for custom animation.
2635   *
2636   * @param { AnimatorOptions } options - Options.
2637   * @returns { AnimatorResult }
2638   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2639   * <br> 1. Mandatory parameters are left unspecified.
2640   * <br> 2. Incorrect parameters types.
2641   * <br> 3. Parameter verification failed.
2642   * @syscap SystemCapability.ArkUI.ArkUI.Full
2643   * @crossplatform
2644   * @atomicservice
2645   * @since 11
2646   */
2647  createAnimator(options: AnimatorOptions): AnimatorResult;
2648
2649  /**
2650   * Defining animation function
2651   *
2652   * @param { AnimateParam } value - parameters for animation.
2653   * @param { function } event - the closure base on which, the system will create animation automatically
2654   * @syscap SystemCapability.ArkUI.ArkUI.Full
2655   * @crossplatform
2656   * @since 10
2657   */
2658  /**
2659   * Defining animation function
2660   *
2661   * @param { AnimateParam } value - parameters for animation.
2662   * @param { function } event - the closure base on which, the system will create animation automatically
2663   * @syscap SystemCapability.ArkUI.ArkUI.Full
2664   * @crossplatform
2665   * @atomicservice
2666   * @since 11
2667   */
2668  animateTo(value: AnimateParam, event: () => void): void;
2669
2670  /**
2671   * alertDialog display.
2672   *
2673   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options.
2674   * @syscap SystemCapability.ArkUI.ArkUI.Full
2675   * @crossplatform
2676   * @since 10
2677   */
2678  /**
2679   * alertDialog display.
2680   *
2681   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options.
2682   * @syscap SystemCapability.ArkUI.ArkUI.Full
2683   * @crossplatform
2684   * @atomicservice
2685   * @since 11
2686   */
2687  showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void;
2688
2689  /**
2690   * actionSheet display.
2691   *
2692   * @param { ActionSheetOptions } value - Options.
2693   * @syscap SystemCapability.ArkUI.ArkUI.Full
2694   * @crossplatform
2695   * @since 10
2696   */
2697  /**
2698   * actionSheet display.
2699   *
2700   * @param { ActionSheetOptions } value - Options.
2701   * @syscap SystemCapability.ArkUI.ArkUI.Full
2702   * @crossplatform
2703   * @atomicservice
2704   * @since 11
2705   */
2706  showActionSheet(value: ActionSheetOptions): void;
2707
2708  /**
2709   * datePickerDialog display.
2710   *
2711   * @param { DatePickerDialogOptions } options - Options.
2712   * @syscap SystemCapability.ArkUI.ArkUI.Full
2713   * @crossplatform
2714   * @since 10
2715   */
2716  /**
2717   * datePickerDialog display.
2718   *
2719   * @param { DatePickerDialogOptions } options - Options.
2720   * @syscap SystemCapability.ArkUI.ArkUI.Full
2721   * @crossplatform
2722   * @atomicservice
2723   * @since 11
2724   */
2725  showDatePickerDialog(options: DatePickerDialogOptions): void;
2726
2727  /**
2728   * timePickerDialog display.
2729   *
2730   * @param { TimePickerDialogOptions } options - Options.
2731   * @syscap SystemCapability.ArkUI.ArkUI.Full
2732   * @crossplatform
2733   * @since 10
2734   */
2735  /**
2736   * timePickerDialog display.
2737   *
2738   * @param { TimePickerDialogOptions } options - Options.
2739   * @syscap SystemCapability.ArkUI.ArkUI.Full
2740   * @crossplatform
2741   * @atomicservice
2742   * @since 11
2743   */
2744  showTimePickerDialog(options: TimePickerDialogOptions): void;
2745
2746  /**
2747   * textPickerDialog display.
2748   *
2749   * @param { TextPickerDialogOptions } options - Options.
2750   * @syscap SystemCapability.ArkUI.ArkUI.Full
2751   * @crossplatform
2752   * @since 10
2753   */
2754  /**
2755   * textPickerDialog display.
2756   *
2757   * @param { TextPickerDialogOptions } options - Options.
2758   * @syscap SystemCapability.ArkUI.ArkUI.Full
2759   * @crossplatform
2760   * @atomicservice
2761   * @since 11
2762   */
2763  showTextPickerDialog(options: TextPickerDialogOptions): void;
2764
2765  /**
2766   * Run custom functions inside the UIContext scope.
2767   *
2768   * @param { function } callback - The function called through UIContext.
2769   * @syscap SystemCapability.ArkUI.ArkUI.Full
2770   * @crossplatform
2771   * @since 10
2772   */
2773  /**
2774   * Run custom functions inside the UIContext scope.
2775   *
2776   * @param { function } callback - The function called through UIContext.
2777   * @syscap SystemCapability.ArkUI.ArkUI.Full
2778   * @crossplatform
2779   * @atomicservice
2780   * @since 11
2781   */
2782  runScopedTask(callback: () => void): void;
2783
2784  /**
2785   * Set KeyboardAvoidMode. The default mode is KeyboardAvoidMode.OFFSET
2786   *
2787   * @param { KeyboardAvoidMode } value - The mode of keyboard avoid.
2788   * @syscap SystemCapability.ArkUI.ArkUI.Full
2789   * @crossplatform
2790   * @atomicservice
2791   * @since 11
2792   */
2793  setKeyboardAvoidMode(value: KeyboardAvoidMode): void;
2794
2795  /**
2796   * Get KeyboardAvoidMode.
2797   * @returns { KeyboardAvoidMode } The mode of keyboard avoid.
2798   * @syscap SystemCapability.ArkUI.ArkUI.Full
2799   * @crossplatform
2800   * @atomicservice
2801   * @since 11
2802   */
2803  getKeyboardAvoidMode(): KeyboardAvoidMode;
2804
2805  /**
2806   * Get AtomicServiceBar.
2807   * @returns { Nullable<AtomicServiceBar> } The atomic service bar.
2808   * @syscap SystemCapability.ArkUI.ArkUI.Full
2809   * @crossplatform
2810   * @atomicservice
2811   * @since 11
2812   */
2813  getAtomicServiceBar(): Nullable<AtomicServiceBar>;
2814
2815  /**
2816   * Get DragController.
2817   * @returns { DragController } the DragController
2818   * @syscap SystemCapability.ArkUI.ArkUI.Full
2819   * @since 11
2820   */
2821  /**
2822   * Get DragController.
2823   * @returns { DragController } the DragController
2824   * @syscap SystemCapability.ArkUI.ArkUI.Full
2825   * @atomicservice
2826   * @since 12
2827   */
2828  getDragController(): DragController;
2829
2830  /**
2831    * Get MeasureUtils.
2832    * @returns { MeasureUtils } the MeasureUtils
2833    * @syscap SystemCapability.ArkUI.ArkUI.Full
2834    * @crossplatform
2835    * @atomicservice
2836    * @since 12
2837    */
2838  getMeasureUtils(): MeasureUtils;
2839
2840  /**
2841   * Defining keyframe animation function.
2842   *
2843   * @param { KeyframeAnimateParam } param - overall animation parameters
2844   * @param { Array<KeyframeState> } keyframes - all keyframe states
2845   * @syscap SystemCapability.ArkUI.ArkUI.Full
2846   * @crossplatform
2847   * @since 11
2848   */
2849  /**
2850   * Defining keyframe animation function.
2851   *
2852   * @param { KeyframeAnimateParam } param - overall animation parameters
2853   * @param { Array<KeyframeState> } keyframes - all keyframe states
2854   * @syscap SystemCapability.ArkUI.ArkUI.Full
2855   * @crossplatform
2856   * @atomicservice
2857   * @since 12
2858   */
2859  keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array<KeyframeState>): void;
2860
2861  /**
2862   * Get FocusController.
2863   * @returns { FocusController } the FocusController
2864   * @syscap SystemCapability.ArkUI.ArkUI.Full
2865   * @atomicservice
2866   * @since 12
2867   */
2868  getFocusController(): FocusController;
2869
2870  /**
2871   * Define animation functions for immediate distribution.
2872   *
2873   * @param { AnimateParam } param - Set animation effect parameters.
2874   * @param { Callback<void> } event - Specify the closure function that displays dynamic effects,
2875   * and the system will automatically insert transition animations for state changes caused by the closure function.
2876   * @syscap SystemCapability.ArkUI.ArkUI.Full
2877   * @systemapi
2878   * @since 12
2879   */
2880  animateToImmediately(param: AnimateParam, event: Callback<void>): void;
2881
2882  /**
2883   * Get FrameNode by id.
2884   *
2885   * @param { string } id - The id of FrameNode.
2886   * @returns { FrameNode | null } The instance of FrameNode.
2887   * @syscap SystemCapability.ArkUI.ArkUI.Full
2888   * @crossplatform
2889   * @atomicservice
2890   * @since 12
2891   */
2892   getFrameNodeById(id: string): FrameNode | null;
2893
2894  /**
2895   * Get the FrameNode attached to current window by id.
2896   *
2897   * @param { string } id - The id of FrameNode.
2898   * @returns { FrameNode | null } The instance of FrameNode.
2899   * @syscap SystemCapability.ArkUI.ArkUI.Full
2900   * @crossplatform
2901   * @atomicservice
2902   * @since 12
2903   */
2904  getAttachedFrameNodeById(id: string): FrameNode | null;
2905
2906  /**
2907   * Get FrameNode by uniqueId.
2908   *
2909   * @param { number } id - The uniqueId of the FrameNode.
2910   * @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed.
2911   * @syscap SystemCapability.ArkUI.ArkUI.Full
2912   * @crossplatform
2913   * @atomicservice
2914   * @since 12
2915   */
2916  getFrameNodeByUniqueId(id: number): FrameNode | null;
2917
2918  /**
2919   * Get page information of the frameNode with uniqueId.
2920   *
2921   * @param { number } id - The uniqueId of the target FrameNode.
2922   * @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes
2923   * navDestination and router page information. If the frame node does not have navDestination and
2924   * router page information, it will return an empty object.
2925   * @syscap SystemCapability.ArkUI.ArkUI.Full
2926   * @crossplatform
2927   * @atomicservice
2928   * @since 12
2929   */
2930  getPageInfoByUniqueId(id: number): PageInfo;
2931
2932  /**
2933   * Get navigation information of the frameNode with uniqueId.
2934   *
2935   * @param { number } id - The uniqueId of the target FrameNode.
2936   * @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the
2937   * target uniqueId, or undefined if the frameNode is not existed or does not have navigation information.
2938   * @syscap SystemCapability.ArkUI.ArkUI.Full
2939   * @crossplatform
2940   * @atomicservice
2941   * @since 12
2942   */
2943  getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined;
2944
2945  /**
2946   * Dynamic dimming.
2947   *
2948   * @param { string } id - The id of FrameNode.
2949   * @param { number } value - Compared to the original level of dimming.value range [0,1],
2950   * set values less than 0 to 0 and values greater than 1 to 1.
2951   * @syscap SystemCapability.ArkUI.ArkUI.Full
2952   * @systemapi
2953   * @since 12
2954   */
2955  setDynamicDimming(id: string, value: number): void;
2956
2957  /**
2958   * Get object cursor controller.
2959   *
2960   * @returns { CursorController } object cursor controller.
2961   * @syscap SystemCapability.ArkUI.ArkUI.Full
2962   * @crossplatform
2963   * @atomicservice
2964   * @since 12
2965   */
2966  getCursorController(): CursorController;
2967
2968  /**
2969   * Get object context menu controller.
2970   *
2971   * @returns { ContextMenuController } object context menu controller.
2972   * @syscap SystemCapability.ArkUI.ArkUI.Full
2973   * @crossplatform
2974   * @atomicservice
2975   * @since 12
2976   */
2977  getContextMenuController(): ContextMenuController;
2978
2979  /**
2980   * Get ComponentSnapshot.
2981   * @returns { ComponentSnapshot } the ComponentSnapshot
2982   * @syscap SystemCapability.ArkUI.ArkUI.Full
2983   * @atomicservice
2984   * @since 12
2985   */
2986  getComponentSnapshot(): ComponentSnapshot;
2987
2988  /**
2989   * Converts a value in vp units to a value in px.
2990   * @param { number } value
2991   * @returns { number }
2992   * @syscap SystemCapability.ArkUI.ArkUI.Full
2993   * @atomicservice
2994   * @since 12
2995   */
2996  vp2px(value: number): number;
2997
2998  /**
2999   * Converts a value in px units to a value in vp.
3000   * @param { number } value
3001   * @returns { number }
3002   * @syscap SystemCapability.ArkUI.ArkUI.Full
3003   * @atomicservice
3004   * @since 12
3005   */
3006  px2vp(value: number): number;
3007
3008  /**
3009   * Converts a value in fp units to a value in px.
3010   * @param { number } value
3011   * @returns { number }
3012   * @syscap SystemCapability.ArkUI.ArkUI.Full
3013   * @atomicservice
3014   * @since 12
3015   */
3016  fp2px(value: number): number;
3017
3018  /**
3019   * Converts a value in px units to a value in fp.
3020   * @param { number } value
3021   * @returns { number }
3022   * @syscap SystemCapability.ArkUI.ArkUI.Full
3023   * @atomicservice
3024   * @since 12
3025   */
3026  px2fp(value: number): number;
3027
3028  /**
3029   * Converts a value in lpx units to a value in px.
3030   * @param { number } value
3031   * @returns { number }
3032   * @syscap SystemCapability.ArkUI.ArkUI.Full
3033   * @atomicservice
3034   * @since 12
3035   */
3036  lpx2px(value: number): number;
3037
3038  /**
3039   * Converts a value in px units to a value in lpx.
3040   * @param { number } value
3041   * @returns { number }
3042   * @syscap SystemCapability.ArkUI.ArkUI.Full
3043   * @atomicservice
3044   * @since 12
3045   */
3046  px2lpx(value: number): number;
3047
3048  /**
3049   * Get current LocalStorage shared from stage.
3050   *
3051   * @returns { LocalStorage | undefined }
3052   * @syscap SystemCapability.ArkUI.ArkUI.Full
3053   * @stagemodelonly
3054   * @crossplatform
3055   * @atomicservice
3056   * @since 12
3057   */
3058  getSharedLocalStorage(): LocalStorage | undefined;
3059
3060  /**
3061   * Obtains context of the ability.
3062   *
3063   * @returns { Context | undefined }
3064   * @syscap SystemCapability.ArkUI.ArkUI.Full
3065   * @stagemodelonly
3066   * @crossplatform
3067   * @atomicservice
3068   * @since 12
3069   */
3070  getHostContext(): Context | undefined;
3071
3072  /**
3073   * Get the name of current window.
3074   *
3075   * @returns { string | undefined } The name of current window, or undefined if the window doesn't exist.
3076   * @syscap SystemCapability.ArkUI.ArkUI.Full
3077   * @crossplatform
3078   * @atomicservice
3079   * @since 12
3080   */
3081  getWindowName(): string | undefined;
3082
3083  /**
3084   * Get the width breakpoint of current window.
3085   *
3086   * @returns { WidthBreakpoint } The width breakpoint of current window.
3087   * @syscap SystemCapability.ArkUI.ArkUI.Full
3088   * @atomicservice
3089   * @since 13
3090   */
3091  getWindowWidthBreakpoint(): WidthBreakpoint;
3092
3093  /**
3094   * Get the height breakpoint of current window.
3095   *
3096   * @returns { HeightBreakpoint } The height breakpoint of current window.
3097   * @syscap SystemCapability.ArkUI.ArkUI.Full
3098   * @atomicservice
3099   * @since 13
3100   */
3101  getWindowHeightBreakpoint(): HeightBreakpoint;
3102
3103  /**
3104   * Open the BindSheet.
3105   *
3106   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3107   * @param { SheetOptions } sheetOptions - The options of sheet.
3108   * @param { number } targetId - The uniqueId of the FrameNode to which BindSheet is attached.
3109   * @returns { Promise<void> } The promise returned by the function.
3110   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3111   * <br> 1. Mandatory parameters are left unspecified.
3112   * <br> 2. Incorrect parameters types.
3113   * <br> 3. Parameter verification failed.
3114   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3115   * @throws { BusinessError } 120002 - The bindSheetContent already exists.
3116   * @throws { BusinessError } 120004 - The targetId does not exist.
3117   * @throws { BusinessError } 120005 - The node of targetId is not in the component tree.
3118   * @throws { BusinessError } 120006 - The node of targetId is not a child of the page node or NavDestination node.
3119   * @syscap SystemCapability.ArkUI.ArkUI.Full
3120   * @crossplatform
3121   * @atomicservice
3122   * @since 12
3123   */
3124  openBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions?: SheetOptions, targetId?: number): Promise<void>;
3125
3126  /**
3127   * Update the BindSheet with sheetOptions.
3128   *
3129   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3130   * @param { SheetOptions } sheetOptions - The update options of sheet.
3131   * @param { boolean } partialUpdate - If true, only the specified properties in the sheetOptions are updated,
3132   *                                    otherwise the rest of the properties are overwritten with the default values.
3133   *                                    Default value is false.
3134   * @returns { Promise<void> } The promise returned by the function.
3135   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3136   * <br> 1. Mandatory parameters are left unspecified.
3137   * <br> 2. Incorrect parameters types.
3138   * <br> 3. Parameter verification failed.
3139   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3140   * @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
3141   * @syscap SystemCapability.ArkUI.ArkUI.Full
3142   * @crossplatform
3143   * @atomicservice
3144   * @since 12
3145   */
3146  updateBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise<void>;
3147
3148  /**
3149   * Close the BindSheet.
3150   *
3151   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3152   * @returns { Promise<void> } The promise returned by the function.
3153   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3154   * <br> 1. Mandatory parameters are left unspecified.
3155   * <br> 2. Incorrect parameters types.
3156   * <br> 3. Parameter verification failed.
3157   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3158   * @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
3159   * @syscap SystemCapability.ArkUI.ArkUI.Full
3160   * @crossplatform
3161   * @atomicservice
3162   * @since 12
3163   */
3164  closeBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>): Promise<void>;
3165
3166  /**
3167   * Post a frame callback to run on the next frame.
3168   *
3169   * @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
3170   * @syscap SystemCapability.ArkUI.ArkUI.Full
3171   * @atomicservice
3172   * @since 12
3173   */
3174  postFrameCallback(frameCallback: FrameCallback): void;
3175
3176  /**
3177   * Post a frame callback to run on the next frame after the specified delay.
3178   *
3179   * @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
3180   * @param { number } delayTime - The delay time in milliseconds,
3181   * @syscap SystemCapability.ArkUI.ArkUI.Full
3182   * @atomicservice
3183   * @since 12
3184   */
3185  postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void;
3186
3187  /**
3188   * Require DynamicSyncScene by id.
3189   *
3190   * @param { string } id - The id of DynamicSyncScene.
3191   * @returns { Array<DynamicSyncScene>} The instance of SwiperDynamicSyncScene.
3192   * @syscap SystemCapability.ArkUI.ArkUI.Full
3193   * @atomicservice
3194   * @since 12
3195   */
3196  requireDynamicSyncScene(id: string): Array<DynamicSyncScene>;
3197
3198  /**
3199   * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process
3200   * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload.
3201   *
3202   * @throws { BusinessError } 202 - The caller is not a system application.
3203   * @syscap SystemCapability.ArkUI.ArkUI.Full
3204   * @systemapi
3205   * @atomicservice
3206   * @since 12
3207   */
3208  /**
3209   * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process
3210   * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload.
3211   *
3212   * @throws { BusinessError } 202 - The caller is not a system application.
3213   * @syscap SystemCapability.ArkUI.ArkUI.Full
3214   * @systemapi
3215   * @since 13
3216   */
3217  clearResourceCache(): void;
3218
3219  /**
3220   * Checks whether current font scale follows the system.
3221   *
3222   * @returns { boolean } Returns true if current font scale follows the system; returns false otherwise.
3223   * @syscap SystemCapability.ArkUI.ArkUI.Full
3224   * @crossplatform
3225   * @atomicservice
3226   * @since 13
3227   */
3228  isFollowingSystemFontScale(): boolean;
3229
3230  /**
3231   * Get the max font scale.
3232   *
3233   * @returns { number } The max font scale.
3234   * @syscap SystemCapability.ArkUI.ArkUI.Full
3235   * @crossplatform
3236   * @atomicservice
3237   * @since 13
3238   */
3239  getMaxFontScale(): number;
3240
3241  /**
3242   * Bind tabs to scrollable container component to automatically hide tab bar.
3243   *
3244   * @param { TabsController } tabsController - The controller of the tabs.
3245   * @param { Scroller } scroller - The controller of the scrollable container component.
3246   * @syscap SystemCapability.ArkUI.ArkUI.Full
3247   * @crossplatform
3248   * @atomicservice
3249   * @since 13
3250   */
3251  bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void;
3252
3253  /**
3254   * Unbind tabs from scrollable container component.
3255   *
3256   * @param { TabsController } tabsController - The controller of the tabs.
3257   * @param { Scroller } scroller - The controller of the scrollable container component.
3258   * @syscap SystemCapability.ArkUI.ArkUI.Full
3259   * @crossplatform
3260   * @atomicservice
3261   * @since 13
3262   */
3263  unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void;
3264
3265  /**
3266   * Bind tabs to nested scrollable container components to automatically hide tab bar.
3267   *
3268   * @param { TabsController } tabsController - The controller of the tabs.
3269   * @param { Scroller } parentScroller - The controller of the parent scrollable container component.
3270   * @param { Scroller } childScroller - The controller of the child scrollable container component.
3271   * @syscap SystemCapability.ArkUI.ArkUI.Full
3272   * @crossplatform
3273   * @atomicservice
3274   * @since 13
3275   */
3276  bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
3277
3278  /**
3279   * Unbind tabs from nested scrollable container components.
3280   *
3281   * @param { TabsController } tabsController - The controller of the tabs.
3282   * @param { Scroller } parentScroller - The controller of the parent scrollable container component.
3283   * @param { Scroller } childScroller - The controller of the child scrollable container component.
3284   * @syscap SystemCapability.ArkUI.ArkUI.Full
3285   * @crossplatform
3286   * @atomicservice
3287   * @since 13
3288   */
3289  unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
3290}
3291
3292/**
3293 * Enum of KeyBoardAvoidMethodType
3294 *
3295 * @enum { number } KeyBoardAvoidMethodType
3296 * @syscap SystemCapability.ArkUI.ArkUI.Full
3297 * @crossplatform
3298 * @atomicservice
3299 * @since 11
3300 */
3301
3302export const enum KeyboardAvoidMode {
3303  /**
3304  * Default Type, offset the whole page when keyBoard height changed.
3305  * @syscap SystemCapability.ArkUI.ArkUI.Full
3306  * @crossplatform
3307  * @atomicservice
3308  * @since 11
3309  */
3310  OFFSET = 0,
3311
3312  /**
3313   * Resize Type, resize the page when keyBoard height changed.
3314   * @syscap SystemCapability.ArkUI.ArkUI.Full
3315   * @crossplatform
3316   * @atomicservice
3317   * @since 11
3318   */
3319  RESIZE = 1
3320}
3321
3322/**
3323 * Enum of SwiperDynamicSyncSceneType
3324 *
3325 * @enum { number } SwiperDynamicSyncSceneType
3326 * @syscap SystemCapability.ArkUI.ArkUI.Full
3327 * @atomicservice
3328 * @since 12
3329 */
3330export const enum SwiperDynamicSyncSceneType {
3331  /**
3332   * Scene type is GESTURE.
3333   *
3334   * @syscap SystemCapability.ArkUI.ArkUI.Full
3335   * @atomicservice
3336   * @since 12
3337   */
3338  GESTURE = 0,
3339
3340  /**
3341   * Scene type is ANIMATION.
3342   *
3343   * @syscap SystemCapability.ArkUI.ArkUI.Full
3344   * @atomicservice
3345   * @since 12
3346   */
3347  ANIMATION = 1
3348}
3349