• 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, Frame } 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 * the property of OverlayManager.
1262 *
1263 * @interface OverlayManagerOptions
1264 * @syscap SystemCapability.ArkUI.ArkUI.Full
1265 * @crossplatform
1266 * @atomicservice
1267 * @since 15
1268 */
1269export interface OverlayManagerOptions {
1270  /**
1271   * the render property of overlay node.
1272   *
1273   * @type { ?boolean }
1274   * @default true
1275   * @syscap SystemCapability.ArkUI.ArkUI.Full
1276   * @crossplatform
1277   * @atomicservice
1278   * @since 15
1279   */
1280  renderRootOverlay?: boolean;
1281}
1282
1283/**
1284 * Register callbacks to observe ArkUI behavior.
1285 *
1286 * @syscap SystemCapability.ArkUI.ArkUI.Full
1287 * @crossplatform
1288 * @since 11
1289 */
1290/**
1291 * Register callbacks to observe ArkUI behavior.
1292 *
1293 * @syscap SystemCapability.ArkUI.ArkUI.Full
1294 * @crossplatform
1295 * @atomicservice
1296 * @since 12
1297 */
1298export class UIObserver {
1299  /**
1300   * Registers a callback function to be called when the navigation destination is updated.
1301   *
1302   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1303   * @param { object } options - Specify the id of observed navigation.
1304   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1305   * @syscap SystemCapability.ArkUI.ArkUI.Full
1306   * @crossplatform
1307   * @since 11
1308   */
1309  /**
1310   * Registers a callback function to be called when the navigation destination is updated.
1311   *
1312   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1313   * @param { object } options - The options object.
1314   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1315   * @syscap SystemCapability.ArkUI.ArkUI.Full
1316   * @crossplatform
1317   * @atomicservice
1318   * @since 12
1319   */
1320  on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback<observer.NavDestinationInfo>): void;
1321
1322  /**
1323   * Removes a callback function that was previously registered with `on()`.
1324   *
1325   * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1326   * @param { object } options - Specify the id of observed navigation.
1327   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
1328   *                                                             navigation ID will be removed.
1329   * @syscap SystemCapability.ArkUI.ArkUI.Full
1330   * @crossplatform
1331   * @since 11
1332   */
1333  /**
1334   * Removes a callback function that was previously registered with `on()`.
1335   *
1336   * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1337   * @param { object } options - The options object.
1338   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
1339   *                                                             navigation ID will be removed.
1340   * @syscap SystemCapability.ArkUI.ArkUI.Full
1341   * @crossplatform
1342   * @atomicservice
1343   * @since 12
1344   */
1345  off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback<observer.NavDestinationInfo>): void;
1346
1347  /**
1348   * Registers a callback function to be called when the navigation destination is updated.
1349   *
1350   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1351   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1352   * @syscap SystemCapability.ArkUI.ArkUI.Full
1353   * @crossplatform
1354   * @since 11
1355   */
1356  /**
1357   * Registers a callback function to be called when the navigation destination is updated.
1358   *
1359   * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'.
1360   * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
1361   * @syscap SystemCapability.ArkUI.ArkUI.Full
1362   * @crossplatform
1363   * @atomicservice
1364   * @since 12
1365   */
1366  on(type: 'navDestinationUpdate', callback: Callback<observer.NavDestinationInfo>): void;
1367
1368  /**
1369   * Removes a callback function that was previously registered with `on()`.
1370   *
1371   * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1372   * @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1373   *                                                               will be removed.
1374   * @syscap SystemCapability.ArkUI.ArkUI.Full
1375   * @crossplatform
1376   * @since 11
1377   */
1378  /**
1379   * Removes a callback function that was previously registered with `on()`.
1380   *
1381   * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
1382   * @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1383   *                                                               will be removed.
1384   * @syscap SystemCapability.ArkUI.ArkUI.Full
1385   * @crossplatform
1386   * @atomicservice
1387   * @since 12
1388   */
1389  off(type: 'navDestinationUpdate', callback?: Callback<observer.NavDestinationInfo>): void;
1390
1391  /**
1392   * Registers a callback function to be called when the scroll event start or stop.
1393   *
1394   * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'.
1395   * @param { observer.ObserverOptions } options - The options object.
1396   * @param { Callback<observer.ScrollEventInfo> } callback - The callback function to be called when the scroll event start or stop.
1397   * @syscap SystemCapability.ArkUI.ArkUI.Full
1398   * @crossplatform
1399   * @atomicservice
1400   * @since 12
1401   */
1402  on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback<observer.ScrollEventInfo>): void;
1403
1404  /**
1405   * Removes a callback function that was previously registered with `on()`.
1406   *
1407   * @param { 'scrollEvent' } type - The type of event to remove the listener for. Must be 'scrollEvent'.
1408   * @param { observer.ObserverOptions } options - The options object.
1409   * @param { Callback<observer.ScrollEventInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
1410   *                                                    scroll ID will be removed.
1411   * @syscap SystemCapability.ArkUI.ArkUI.Full
1412   * @crossplatform
1413   * @atomicservice
1414   * @since 12
1415   */
1416  off(type: 'scrollEvent', options: observer.ObserverOptions, callback?: Callback<observer.ScrollEventInfo>): void;
1417
1418  /**
1419   * Registers a callback function to be called when the scroll event start or stop.
1420   *
1421   * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'.
1422   * @param { Callback<observer.ScrollEventInfo> } callback - The callback function to be called when the scroll event start or stop.
1423   * @syscap SystemCapability.ArkUI.ArkUI.Full
1424   * @crossplatform
1425   * @atomicservice
1426   * @since 12
1427   */
1428  on(type: 'scrollEvent', callback: Callback<observer.ScrollEventInfo>): void;
1429
1430  /**
1431   * Removes a callback function that was previously registered with `on()`.
1432   *
1433   * @param { 'scrollEvent'} type - The type of event to remove the listener for. Must be 'scrollEvent'.
1434   * @param { Callback<observer.ScrollEventInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1435   *                                                      will be removed.
1436   * @syscap SystemCapability.ArkUI.ArkUI.Full
1437   * @crossplatform
1438   * @atomicservice
1439   * @since 12
1440   */
1441  off(type: 'scrollEvent', callback?: Callback<observer.ScrollEventInfo>): void;
1442
1443  /**
1444   * Registers a callback function to be called when the router page in a ui context is updated.
1445   *
1446   * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'.
1447   * @param { Callback<observer.RouterPageInfo> } callback - The callback function to be called when the router page is updated.
1448   * @syscap SystemCapability.ArkUI.ArkUI.Full
1449   * @crossplatform
1450   * @since 11
1451   */
1452  /**
1453   * Registers a callback function to be called when the router page in a ui context is updated.
1454   *
1455   * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'.
1456   * @param { Callback<observer.RouterPageInfo> } callback - The callback function to be called when the router page is updated.
1457   * @syscap SystemCapability.ArkUI.ArkUI.Full
1458   * @crossplatform
1459   * @atomicservice
1460   * @since 12
1461   */
1462  on(type: 'routerPageUpdate', callback: Callback<observer.RouterPageInfo>): void;
1463
1464  /**
1465   * Removes a callback function that was previously registered with `on()`.
1466   *
1467   * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'.
1468   * @param { Callback<observer.RouterPageInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1469   *                                                               will be removed.
1470   * @syscap SystemCapability.ArkUI.ArkUI.Full
1471   * @crossplatform
1472   * @since 11
1473   */
1474  /**
1475   * Removes a callback function that was previously registered with `on()`.
1476   *
1477   * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'.
1478   * @param { Callback<observer.RouterPageInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1479   *                                                               will be removed.
1480   * @syscap SystemCapability.ArkUI.ArkUI.Full
1481   * @crossplatform
1482   * @atomicservice
1483   * @since 12
1484   */
1485  off(type: 'routerPageUpdate', callback?: Callback<observer.RouterPageInfo>): void;
1486
1487  /**
1488   * Registers a callback function to be called when the screen density in a ui context is updated.
1489   *
1490   * @param { 'densityUpdate' } type - The type of event to listen for. Must be 'densityUpdate'.
1491   * @param { Callback<observer.DensityInfo> } callback - The callback function to be called when the screen density is updated.
1492   * @syscap SystemCapability.ArkUI.ArkUI.Full
1493   * @crossplatform
1494   * @atomicservice
1495   * @since 12
1496   */
1497  on(type: 'densityUpdate', callback: Callback<observer.DensityInfo>): void;
1498
1499  /**
1500   * Removes a callback function that was previously registered with `on()`.
1501   *
1502   * @param { 'densityUpdate' } type - The type of event to remove the listener for. Must be 'densityUpdate'.
1503   * @param { Callback<observer.DensityInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1504   *                                                        will be removed.
1505   * @syscap SystemCapability.ArkUI.ArkUI.Full
1506   * @crossplatform
1507   * @atomicservice
1508   * @since 12
1509   */
1510  off(type: 'densityUpdate', callback?: Callback<observer.DensityInfo>): void;
1511
1512    /**
1513   * Registers a callback function to be called when the draw command will be drawn.
1514   *
1515   * @param { 'willDraw' } type - The type of event to listen for. Must be 'willDraw'.
1516   * @param { Callback<void> } callback - The callback function to be called when the draw command will be drawn.
1517   * @syscap SystemCapability.ArkUI.ArkUI.Full
1518   * @crossplatform
1519   * @atomicservice
1520   * @since 12
1521   */
1522    on(type: 'willDraw', callback: Callback<void>): void;
1523
1524    /**
1525     * Removes a callback function that was previously registered with `on()`.
1526     *
1527     * @param { 'willDraw' } type - The type of event to remove the listener for. Must be 'willDraw'.
1528     * @param { Callback<void> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1529     *                                                        will be removed.
1530     * @syscap SystemCapability.ArkUI.ArkUI.Full
1531     * @crossplatform
1532     * @atomicservice
1533     * @since 12
1534     */
1535    off(type: 'willDraw', callback?: Callback<void>): void;
1536
1537      /**
1538   * Registers a callback function to be called when the layout is done.
1539   *
1540   * @param { 'didLayout' } type - The type of event to listen for. Must be 'didLayout'.
1541   * @param { Callback<void> } callback - The callback function to be called when the layout is done.
1542   * @syscap SystemCapability.ArkUI.ArkUI.Full
1543   * @crossplatform
1544   * @atomicservice
1545   * @since 12
1546   */
1547  on(type: 'didLayout', callback: Callback<void>): void;
1548
1549  /**
1550   * Removes a callback function that was previously registered with `on()`.
1551   *
1552   * @param { 'didLayout' } type - The type of event to remove the listener for. Must be 'didLayout'.
1553   * @param { Callback<void> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
1554   *                                                        will be removed.
1555   * @syscap SystemCapability.ArkUI.ArkUI.Full
1556   * @crossplatform
1557   * @atomicservice
1558   * @since 12
1559   */
1560  off(type: 'didLayout', callback?: Callback<void>): void;
1561
1562  /**
1563   * Registers a callback function to be called when the navigation switched to a new navDestination.
1564   *
1565   * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'.
1566   * @param { Callback<observer.NavDestinationSwitchInfo> } callback - The callback function to be called when
1567   *                                                                   the navigation switched to a new navDestination.
1568   * @syscap SystemCapability.ArkUI.ArkUI.Full
1569   * @crossplatform
1570   * @atomicservice
1571   * @since 12
1572   */
1573  on(
1574    type: 'navDestinationSwitch',
1575    callback: Callback<observer.NavDestinationSwitchInfo>
1576  ): void;
1577
1578  /**
1579   * Removes a callback function that was previously registered with `on()`.
1580   *
1581   * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'.
1582   * @param { Callback<observer.NavDestinationSwitchInfo> } [callback] - The callback function to remove. If not provided,
1583   *                                                                     all callbacks for the given event type will be removed.
1584   * @syscap SystemCapability.ArkUI.ArkUI.Full
1585   * @crossplatform
1586   * @atomicservice
1587   * @since 12
1588   */
1589  off(
1590    type: 'navDestinationSwitch',
1591    callback?: Callback<observer.NavDestinationSwitchInfo>
1592  ): void;
1593
1594  /**
1595   * Registers a callback function to be called when the navigation switched to a new navDestination.
1596   *
1597   * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'.
1598   * @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options.
1599   * @param { Callback<observer.NavDestinationSwitchInfo> } callback - The callback function to be called when the
1600   *                                                                   navigation switched to a new navDestination.
1601   * @syscap SystemCapability.ArkUI.ArkUI.Full
1602   * @crossplatform
1603   * @atomicservice
1604   * @since 12
1605   */
1606  on(
1607    type: 'navDestinationSwitch',
1608    observerOptions: observer.NavDestinationSwitchObserverOptions,
1609    callback: Callback<observer.NavDestinationSwitchInfo>
1610  ): void;
1611
1612  /**
1613   * Removes a callback function that was previously registered with `on()`.
1614   *
1615   * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'.
1616   * @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options.
1617   * @param { Callback<observer.NavDestinationSwitchInfo> } [callback] - The callback function to remove. If not provided,
1618   *                                                                     all callbacks for the given event type will be removed.
1619   * @syscap SystemCapability.ArkUI.ArkUI.Full
1620   * @crossplatform
1621   * @atomicservice
1622   * @since 12
1623   */
1624  off(
1625    type: 'navDestinationSwitch',
1626    observerOptions: observer.NavDestinationSwitchObserverOptions,
1627    callback?: Callback<observer.NavDestinationSwitchInfo>
1628  ): void;
1629
1630  /**
1631   * Registers a callback function to be called before clickEvent is called.
1632   *
1633   * @param { 'willClick' } type - The type of event to listen for.
1634   * @param { ClickEventListenerCallback } callback - The callback function to be called
1635   *                                                  when the clickEvent will be trigger or after.
1636   * @syscap SystemCapability.ArkUI.ArkUI.Full
1637   * @crossplatform
1638   * @atomicservice
1639   * @since 12
1640   */
1641  on(type: 'willClick', callback: ClickEventListenerCallback): void;
1642
1643  /**
1644   * Removes a callback function to be called before clickEvent is called.
1645   *
1646   * @param { 'willClick' } type - The type of event to remove the listener for.
1647   * @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided,
1648   *                                                    all callbacks for the given event type will be removed.
1649   * @syscap SystemCapability.ArkUI.ArkUI.Full
1650   * @crossplatform
1651   * @atomicservice
1652   * @since 12
1653   */
1654  off(type: 'willClick', callback?: ClickEventListenerCallback): void;
1655
1656  /**
1657   * Registers a callback function to be called after clickEvent is called.
1658   *
1659   * @param { 'didClick' } type - The type of event to listen for.
1660   * @param { ClickEventListenerCallback } callback - The callback function to be called
1661   *                                                  when the clickEvent will be trigger or after.
1662   * @syscap SystemCapability.ArkUI.ArkUI.Full
1663   * @crossplatform
1664   * @atomicservice
1665   * @since 12
1666   */
1667  on(type: 'didClick', callback: ClickEventListenerCallback): void;
1668
1669  /**
1670   * Removes a callback function to be called after clickEvent is called.
1671   *
1672   * @param { 'didClick' } type - The type of event to remove the listener for.
1673   * @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided,
1674   *                                                    all callbacks for the given event type will be removed.
1675   * @syscap SystemCapability.ArkUI.ArkUI.Full
1676   * @crossplatform
1677   * @atomicservice
1678   * @since 12
1679   */
1680  off(type: 'didClick', callback?: ClickEventListenerCallback): void;
1681
1682  /**
1683   * Registers a callback function to be called before tapGesture is called.
1684   *
1685   * @param { 'willClick' } type - The type of event to listen for.
1686   * @param { GestureEventListenerCallback } callback - The callback function to be called
1687   *                                                    when the clickEvent will be trigger or after.
1688   * @syscap SystemCapability.ArkUI.ArkUI.Full
1689   * @crossplatform
1690   * @atomicservice
1691   * @since 12
1692   */
1693  on(type: 'willClick', callback: GestureEventListenerCallback): void;
1694
1695  /**
1696   * Removes a callback function to be called before tapGesture is called.
1697   *
1698   * @param { 'willClick' } type - The type of event to remove the listener for.
1699   * @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided,
1700   *                                                      all callbacks for the given event type will be removed.
1701   * @syscap SystemCapability.ArkUI.ArkUI.Full
1702   * @crossplatform
1703   * @atomicservice
1704   * @since 12
1705   */
1706  off(type: 'willClick', callback?: GestureEventListenerCallback): void;
1707
1708  /**
1709   * Registers a callback function to be called after tapGesture is called.
1710   *
1711   * @param { 'didClick' } type - The type of event to listen for.
1712   * @param { GestureEventListenerCallback } callback - The callback function to be called
1713   *                                                    when the clickEvent will be trigger or after.
1714   * @syscap SystemCapability.ArkUI.ArkUI.Full
1715   * @crossplatform
1716   * @atomicservice
1717   * @since 12
1718   */
1719  on(type: 'didClick', callback: GestureEventListenerCallback): void;
1720
1721  /**
1722   * Removes a callback function to be called after tapGesture is called.
1723   *
1724   * @param { 'didClick' } type - The type of event to remove the listener for.
1725   * @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided,
1726   *                                                      all callbacks for the given event type will be removed.
1727   * @syscap SystemCapability.ArkUI.ArkUI.Full
1728   * @crossplatform
1729   * @atomicservice
1730   * @since 12
1731   */
1732  off(type: 'didClick', callback?: GestureEventListenerCallback): void;
1733
1734  /**
1735   * Registers a callback function to be called when the tabContent is showed or hidden.
1736   *
1737   * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'.
1738   * @param { observer.ObserverOptions } options - The options object.
1739   * @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
1740   *                                                         when the tabContent show or hide.
1741   * @syscap SystemCapability.ArkUI.ArkUI.Full
1742   * @crossplatform
1743   * @atomicservice
1744   * @since 12
1745   */
1746  on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback<observer.TabContentInfo>): void;
1747
1748  /**
1749   * Removes a callback function that was previously registered with `on()`.
1750   *
1751   * @param { 'tabContentUpdate' } type - The type of event to remove the listener for. Must be 'tabContentUpdate'.
1752   * @param { observer.ObserverOptions } options - The options object.
1753   * @param { Callback<observer.TabContentInfo> } callback - The callback function to remove. If not provided,
1754   *                                              all callbacks for the given event type and Tabs ID will be removed.
1755   * @syscap SystemCapability.ArkUI.ArkUI.Full
1756   * @crossplatform
1757   * @atomicservice
1758   * @since 12
1759   */
1760  off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback<observer.TabContentInfo>): void;
1761
1762  /**
1763   * Registers a callback function to be called when the tabContent is showed or hidden.
1764   *
1765   * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'.
1766   * @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
1767   *                                                         when the tabContent is showed or hidden.
1768   * @syscap SystemCapability.ArkUI.ArkUI.Full
1769   * @crossplatform
1770   * @atomicservice
1771   * @since 12
1772   */
1773  on(type: 'tabContentUpdate', callback: Callback<observer.TabContentInfo>): void;
1774
1775  /**
1776   * Removes a callback function that was previously registered with `on()`.
1777   *
1778   * @param { 'tabContentUpdate'} type - The type of event to remove the listener for. Must be 'tabContentUpdate'.
1779   * @param { Callback<observer.TabContentInfo> } callback - The callback function to remove. If not provided,
1780   *                                              all callbacks for the given event type and Tabs ID will be removed.
1781   * @syscap SystemCapability.ArkUI.ArkUI.Full
1782   * @crossplatform
1783   * @atomicservice
1784   * @since 12
1785   */
1786  off(type: 'tabContentUpdate', callback?: Callback<observer.TabContentInfo>): void;
1787}
1788
1789/**
1790 * class ComponentUtils
1791 * @syscap SystemCapability.ArkUI.ArkUI.Full
1792 * @crossplatform
1793 * @since 10
1794 */
1795/**
1796 * class ComponentUtils
1797 * @syscap SystemCapability.ArkUI.ArkUI.Full
1798 * @crossplatform
1799 * @atomicservice
1800 * @since 11
1801 */
1802export class ComponentUtils {
1803  /**
1804   * Provide the ability to obtain the coordinates and size of component drawing areas.
1805   *
1806   * @param { string } id - ID of the component whose attributes are to be obtained.
1807   * @returns { componentUtils.ComponentInfo } the object of ComponentInfo.
1808   * @throws { BusinessError } 100001 - UI execution context not found.
1809   * @syscap SystemCapability.ArkUI.ArkUI.Full
1810   * @since 10
1811   */
1812  /**
1813   * Provide the ability to obtain the coordinates and size of component drawing areas.
1814   *
1815   * @param { string } id - ID of the component whose attributes are to be obtained.
1816   * @returns { componentUtils.ComponentInfo } the object of ComponentInfo.
1817   * @throws { BusinessError } 100001 - UI execution context not found.
1818   * @syscap SystemCapability.ArkUI.ArkUI.Full
1819   * @atomicservice
1820   * @since 11
1821   */
1822  getRectangleById(id: string): componentUtils.ComponentInfo;
1823}
1824
1825/**
1826 * class OverlayManager
1827 * @syscap SystemCapability.ArkUI.ArkUI.Full
1828 * @crossplatform
1829 * @atomicservice
1830 * @since 12
1831 */
1832export class OverlayManager {
1833  /**
1834   * Add the ComponentContent to the OverlayManager.
1835   *
1836   * @param { ComponentContent } content - The content will be added to the OverlayManager.
1837   * @param { number } [ index ] - The index at which to add the ComponentContent.
1838   * @syscap SystemCapability.ArkUI.ArkUI.Full
1839   * @crossplatform
1840   * @atomicservice
1841   * @since 12
1842   */
1843  addComponentContent(content: ComponentContent, index?: number): void;
1844
1845  /**
1846   * Remove the ComponentContent from the OverlayManager.
1847   *
1848   * @param { ComponentContent } content - The content will be removed from the OverlayManager.
1849   * @syscap SystemCapability.ArkUI.ArkUI.Full
1850   * @crossplatform
1851   * @atomicservice
1852   * @since 12
1853   */
1854  removeComponentContent(content: ComponentContent): void;
1855
1856  /**
1857   * Show the ComponentContent.
1858   *
1859   * @param { ComponentContent } content - The content will be shown.
1860   * @syscap SystemCapability.ArkUI.ArkUI.Full
1861   * @crossplatform
1862   * @atomicservice
1863   * @since 12
1864   */
1865  showComponentContent(content: ComponentContent): void;
1866
1867  /**
1868   * Hide the ComponentContent.
1869   *
1870   * @param { ComponentContent } content - The content will be hidden.
1871   * @syscap SystemCapability.ArkUI.ArkUI.Full
1872   * @crossplatform
1873   * @atomicservice
1874   * @since 12
1875   */
1876  hideComponentContent(content: ComponentContent): void;
1877
1878  /**
1879   * Show all ComponentContents on the OverlayManager.
1880   *
1881   * @syscap SystemCapability.ArkUI.ArkUI.Full
1882   * @crossplatform
1883   * @atomicservice
1884   * @since 12
1885   */
1886  showAllComponentContents(): void;
1887
1888  /**
1889   * Hide all ComponentContents on the OverlayManager.
1890   *
1891   * @syscap SystemCapability.ArkUI.ArkUI.Full
1892   * @crossplatform
1893   * @atomicservice
1894   * @since 12
1895   */
1896  hideAllComponentContents(): void;
1897}
1898
1899/**
1900 * interface AtomicServiceBar
1901 * @interface AtomicServiceBar
1902 * @syscap SystemCapability.ArkUI.ArkUI.Full
1903 * @crossplatform
1904 * @since 11
1905 */
1906/**
1907 * interface AtomicServiceBar
1908 * @interface AtomicServiceBar
1909 * @syscap SystemCapability.ArkUI.ArkUI.Full
1910 * @crossplatform
1911 * @atomicservice
1912 * @since 12
1913 */
1914export interface AtomicServiceBar {
1915  /**
1916   * Set the visibility of the bar, except the icon.
1917   *
1918   * @param { boolean } visible - whether this bar is visible.
1919   * @syscap SystemCapability.ArkUI.ArkUI.Full
1920   * @atomicservice
1921   * @since 11
1922   */
1923  setVisible(visible: boolean): void;
1924
1925  /**
1926   * Set the background color of the bar.
1927   *
1928   * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default.
1929   * @syscap SystemCapability.ArkUI.ArkUI.Full
1930   * @since 11
1931   */
1932  /**
1933   * Set the background color of the bar.
1934   *
1935   * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default.
1936   * @syscap SystemCapability.ArkUI.ArkUI.Full
1937   * @atomicservice
1938   * @since 12
1939   */
1940  setBackgroundColor(color: Nullable< Color | number | string>): void;
1941
1942  /**
1943   * Set the title of the bar.
1944   *
1945   * @param { string } content - the content of the bar.
1946   * @syscap SystemCapability.ArkUI.ArkUI.Full
1947   * @since 11
1948   */
1949  /**
1950   * Set the title of the bar.
1951   *
1952   * @param { string } content - the content of the bar.
1953   * @syscap SystemCapability.ArkUI.ArkUI.Full
1954   * @atomicservice
1955   * @since 12
1956   */
1957  setTitleContent(content: string): void;
1958
1959  /**
1960   * Set the font style of the bar's title.
1961   *
1962   * @param { FontStyle } font - the font style of the bar's title.
1963   * @syscap SystemCapability.ArkUI.ArkUI.Full
1964   * @since 11
1965   */
1966  /**
1967   * Set the font style of the bar's title.
1968   *
1969   * @param { FontStyle } font - the font style of the bar's title.
1970   * @syscap SystemCapability.ArkUI.ArkUI.Full
1971   * @atomicservice
1972   * @since 12
1973   */
1974  setTitleFontStyle(font: FontStyle): void;
1975
1976  /**
1977   * Set the color of the icon on the bar.
1978   *
1979   * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default.
1980   * @syscap SystemCapability.ArkUI.ArkUI.Full
1981   * @since 11
1982   */
1983  /**
1984   * Set the color of the icon on the bar.
1985   *
1986   * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default.
1987   * @syscap SystemCapability.ArkUI.ArkUI.Full
1988   * @atomicservice
1989   * @since 12
1990   */
1991  setIconColor(color: Nullable< Color | number | string>): void;
1992
1993  /**
1994   * Get size and position of the bar.
1995   *
1996   * @returns { Frame } The size and position of bar in vp relative to window.
1997   * @syscap SystemCapability.ArkUI.ArkUI.Full
1998   * @crossplatform
1999   * @atomicservice
2000   * @since 15
2001   */
2002    getBarRect(): Frame;
2003}
2004
2005/**
2006 * Represents a dynamic synchronization scene.
2007 *
2008 * @syscap SystemCapability.ArkUI.ArkUI.Full
2009 * @atomicservice
2010 * @since 12
2011 */
2012export class DynamicSyncScene {
2013  /**
2014   * Sets the FrameRateRange of the DynamicSyncScene.
2015   *
2016   * @param { ExpectedFrameRateRange } range - The range of frameRate.
2017   * @syscap SystemCapability.ArkUI.ArkUI.Full
2018   * @atomicservice
2019   * @since 12
2020   */
2021  setFrameRateRange(range: ExpectedFrameRateRange): void;
2022
2023  /**
2024   * Gets the FrameRateRange of the DynamicSyncScene.
2025   *
2026   * @returns { ExpectedFrameRateRange } The range of frameRate.
2027   * @syscap SystemCapability.ArkUI.ArkUI.Full
2028   * @atomicservice
2029   * @since 12
2030   */
2031  getFrameRateRange(): ExpectedFrameRateRange;
2032}
2033
2034/**
2035 * Represents a dynamic synchronization scene of Swiper.
2036 *
2037 * @extends DynamicSyncScene
2038 * @syscap SystemCapability.ArkUI.ArkUI.Full
2039 * @atomicservice
2040 * @since 12
2041 */
2042export class SwiperDynamicSyncScene extends DynamicSyncScene {
2043  /**
2044  * Type of the SwiperDynamicSyncSceneType.
2045  * @type { SwiperDynamicSyncSceneType }
2046  * @readonly
2047  * @syscap SystemCapability.ArkUI.ArkUI.Full
2048  * @atomicservice
2049  * @since 12
2050  */
2051  readonly type: SwiperDynamicSyncSceneType;
2052}
2053
2054/**
2055 * Represents a dynamic synchronization scene of Marquee.
2056 *
2057 * @extends DynamicSyncScene
2058 * @syscap SystemCapability.ArkUI.ArkUI.Full
2059 * @atomicservice
2060 * @since 14
2061 */
2062export class MarqueeDynamicSyncScene extends DynamicSyncScene {
2063  /**
2064  * Type of the MarqueeDynamicSyncSceneType.
2065  * @type { MarqueeDynamicSyncSceneType }
2066  * @readonly
2067  * @syscap SystemCapability.ArkUI.ArkUI.Full
2068  * @atomicservice
2069  * @since 14
2070  */
2071  readonly type: MarqueeDynamicSyncSceneType;
2072}
2073
2074/**
2075 * class DragController
2076 * @syscap SystemCapability.ArkUI.ArkUI.Full
2077 * @since 11
2078 */
2079/**
2080 * class DragController
2081 * @syscap SystemCapability.ArkUI.ArkUI.Full
2082 * @atomicservice
2083 * @since 12
2084 */
2085export class DragController {
2086  /**
2087   * Execute a drag event.
2088   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2089   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2090   * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains
2091   * the drag event information.
2092   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2093   * <br> 1. Mandatory parameters are left unspecified.
2094   * <br> 2. Incorrect parameters types.
2095   * <br> 3. Parameter verification failed.
2096   * @throws { BusinessError } 100001 - Internal handling failed.
2097   * @syscap SystemCapability.ArkUI.ArkUI.Full
2098   * @since 11
2099   */
2100  /**
2101   * Execute a drag event.
2102   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2103   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2104   * @param { AsyncCallback<dragController.DragEventParam> } callback - Callback that contains
2105   * the drag event information.
2106   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2107   * <br> 1. Mandatory parameters are left unspecified.
2108   * <br> 2. Incorrect parameters types.
2109   * <br> 3. Parameter verification failed.
2110   * @throws { BusinessError } 100001 - Internal handling failed.
2111   * @syscap SystemCapability.ArkUI.ArkUI.Full
2112   * @atomicservice
2113   * @since 12
2114   */
2115  executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo,
2116    callback: AsyncCallback<dragController.DragEventParam>): void;
2117
2118  /**
2119   * Execute a drag event.
2120   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2121   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2122   * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information.
2123   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2124   * <br> 1. Mandatory parameters are left unspecified.
2125   * <br> 2. Incorrect parameters types.
2126   * <br> 3. Parameter verification failed.
2127   * @throws { BusinessError } 100001 - Internal handling failed.
2128   * @syscap SystemCapability.ArkUI.ArkUI.Full
2129   * @since 11
2130   */
2131  /**
2132   * Execute a drag event.
2133   * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged.
2134   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2135   * @returns { Promise<dragController.DragEventParam> } A Promise with the drag event information.
2136   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2137   * <br> 1. Mandatory parameters are left unspecified.
2138   * <br> 2. Incorrect parameters types.
2139   * <br> 3. Parameter verification failed.
2140   * @throws { BusinessError } 100001 - Internal handling failed.
2141   * @syscap SystemCapability.ArkUI.ArkUI.Full
2142   * @atomicservice
2143   * @since 12
2144   */
2145  executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo)
2146    : Promise<dragController.DragEventParam>;
2147
2148  /**
2149   * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started.
2150   * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts displayed when the objects are dragged.
2151   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2152   * @returns { dragController.DragAction } one drag action object
2153   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2154   * <br> 1. Mandatory parameters are left unspecified.
2155   * <br> 2. Incorrect parameters types.
2156   * <br> 3. Parameter verification failed.
2157   * @throws { BusinessError } 100001 - Internal handling failed.
2158   * @syscap SystemCapability.ArkUI.ArkUI.Full
2159   * @since 11
2160   */
2161  /**
2162   * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started.
2163   * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts displayed when the objects are dragged.
2164   * @param { dragController.DragInfo } dragInfo - Information about the drag event.
2165   * @returns { dragController.DragAction } one drag action object
2166   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2167   * <br> 1. Mandatory parameters are left unspecified.
2168   * <br> 2. Incorrect parameters types.
2169   * <br> 3. Parameter verification failed.
2170   * @throws { BusinessError } 100001 - Internal handling failed.
2171   * @syscap SystemCapability.ArkUI.ArkUI.Full
2172   * @atomicservice
2173   * @since 12
2174   */
2175  createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: dragController.DragInfo): dragController.DragAction;
2176
2177  /**
2178   * Get a drag preview object, which provides the functions of setting color or updating animation and has no effect in OnDrop and OnDragEnd callback.
2179   * @returns { dragController.DragPreview } A drag preview object.
2180   * @syscap SystemCapability.ArkUI.ArkUI.Full
2181   * @since 11
2182   */
2183  /**
2184   * Get a drag preview object.
2185   * @returns { dragController.DragPreview } A drag preview object.
2186   * @syscap SystemCapability.ArkUI.ArkUI.Full
2187   * @atomicservice
2188   * @since 12
2189   */
2190  getDragPreview(): dragController.DragPreview;
2191
2192  /**
2193   * Enable drag event strict reporting for drag enter and leave notification in nested situation.
2194   * For example, the parent and child both register the onDragEnter/onDragLeave events, if this
2195   * flag is enabled, the parent will be notified with leave event, and the child will notified with
2196   * enter event at the same time, when user drag action is passing through the parent and enter the
2197   * scope of the child.
2198   * Please be noted, the default value of the flag is false, it means, for the same situation, the
2199   * parent will not receive the leave notification, just the child can get the enter event, which is
2200   * not fully strict.
2201   * @param { boolean } enable - Indicating enable drag event strict reporting or not.
2202   * @syscap SystemCapability.ArkUI.ArkUI.Full
2203   * @atomicservice
2204   * @since 12
2205   */
2206  setDragEventStrictReportingEnabled(enable: boolean): void;
2207
2208  /**
2209   * Cancel the UDMF data sync process by passing in the data key as the identify, can only be used after the drop.
2210   *
2211   * @param { string } key - The data key returned by startDataLoading method.
2212   * @throws { BusinessError } 401 - Parameter error.
2213   * @throws { BusinessError } 190004 - Operation failed.
2214   * @syscap SystemCapability.ArkUI.ArkUI.Full
2215   * @atomicservice
2216   * @since 15
2217   */
2218  cancelDataLoading(key: string): void;
2219}
2220
2221/**
2222 * class MeasureUtils
2223 * @syscap SystemCapability.ArkUI.ArkUI.Full
2224 * @crossplatform
2225 * @atomicservice
2226 * @since 12
2227 */
2228export class MeasureUtils {
2229  /**
2230   * Obtains the width of the specified text in a single line layout.
2231   *
2232   * @param { MeasureOptions } options - Options.
2233   * @returns { number }
2234   * @syscap SystemCapability.ArkUI.ArkUI.Full
2235   * @crossplatform
2236   * @atomicservice
2237   * @since 12
2238   */
2239  measureText(options: MeasureOptions): number;
2240
2241  /**
2242   * Obtains the width and height of the specified text in a single line layout.
2243   *
2244   * @param { MeasureOptions } options - Options of measure area occupied by text.
2245   * @returns { SizeOptions } width and height for text to display
2246   * @syscap SystemCapability.ArkUI.ArkUI.Full
2247   * @crossplatform
2248   * @atomicservice
2249   * @since 12
2250   */
2251  measureTextSize(options: MeasureOptions): SizeOptions;
2252}
2253
2254/**
2255 * class FocusController
2256 * @syscap SystemCapability.ArkUI.ArkUI.Full
2257 * @atomicservice
2258 * @since 12
2259 */
2260 export class FocusController {
2261  /**
2262   * clear focus to the root container.
2263   * @syscap SystemCapability.ArkUI.ArkUI.Full
2264   * @atomicservice
2265   * @since 12
2266   */
2267  clearFocus(): void;
2268
2269  /**
2270   * request focus to the specific component.
2271   * @param { string } key - the inspector key of the component.
2272   * @throws { BusinessError } 150001 - the component cannot be focused.
2273   * @throws { BusinessError } 150002 - This component has an unfocusable ancestor.
2274   * @throws { BusinessError } 150003 - the component is not on tree or does not exist.
2275   * @syscap SystemCapability.ArkUI.ArkUI.Full
2276   * @atomicservice
2277   * @since 12
2278   */
2279  requestFocus(key: string): void;
2280
2281  /**
2282   * Activate focus style.
2283   * @param { boolean } isActive - activate/deactivate the focus style.
2284   * @param { boolean } [autoInactive] - deactivate the focus style when touch event or mouse event triggers, the default value is true.
2285   * @syscap SystemCapability.ArkUI.ArkUI.Full
2286   * @crossplatform
2287   * @atomicservice
2288   * @since 14
2289   */
2290  activate(isActive: boolean, autoInactive?: boolean): void;
2291
2292  /**
2293  * Set whether to enable autofocus transfer.
2294  * @param { boolean } isAutoFocusTransfer - A Boolean value that indicates whether autofocus transfer is enabled.
2295  * @syscap SystemCapability.ArkUI.ArkUI.Full
2296  * @crossplatform
2297  * @atomicservice
2298  * @since 14
2299  */
2300  setAutoFocusTransfer(isAutoFocusTransfer: boolean): void;
2301
2302  /**
2303  * Set the priority of key event processing when component cannot handle the key event..
2304  * @param { KeyProcessingMode } mode - Key processing mode.
2305  * @syscap SystemCapability.ArkUI.ArkUI.Full
2306  * @crossplatform
2307  * @atomicservice
2308  * @since 15
2309  */
2310  setKeyProcessingMode(mode: KeyProcessingMode): void;
2311}
2312
2313/**
2314 * Pointer style.
2315 *
2316 * @typedef {pointer.PointerStyle} PointerStyle
2317 * @syscap SystemCapability.MultimodalInput.Input.Pointer
2318 * @atomicservice
2319 * @since 12
2320 */
2321export type PointerStyle = pointer.PointerStyle;
2322
2323/**
2324 * class CursorController
2325 *
2326 * @syscap SystemCapability.ArkUI.ArkUI.Full
2327 * @crossplatform
2328 * @atomicservice
2329 * @since 12
2330 */
2331export class CursorController {
2332  /**
2333   * Restore default cursor.
2334   *
2335   * @syscap SystemCapability.ArkUI.ArkUI.Full
2336   * @crossplatform
2337   * @atomicservice
2338   * @since 12
2339   */
2340  restoreDefault(): void;
2341  /**
2342   * Set cursor style.
2343   *
2344   * @param { PointerStyle } value - cursor style enum.
2345   * @syscap SystemCapability.ArkUI.ArkUI.Full
2346   * @crossplatform
2347   * @atomicservice
2348   * @since 12
2349   */
2350  setCursor(value: PointerStyle): void;
2351}
2352
2353/**
2354 * class ContextMenuController
2355 *
2356 * @syscap SystemCapability.ArkUI.ArkUI.Full
2357 * @crossplatform
2358 * @atomicservice
2359 * @since 12
2360 */
2361export class ContextMenuController {
2362  /**
2363   * Close context menu.
2364   *
2365   * @syscap SystemCapability.ArkUI.ArkUI.Full
2366   * @crossplatform
2367   * @atomicservice
2368   * @since 12
2369   */
2370  close(): void;
2371}
2372
2373/**
2374 * Class FrameCallback
2375 *
2376 * @syscap SystemCapability.ArkUI.ArkUI.Full
2377 * @crossplatform
2378 * @atomicservice
2379 * @since 12
2380 */
2381export abstract class FrameCallback {
2382  /**
2383   * Call when a new display frame is being rendered.
2384   *
2385   * @param { number } frameTimeInNano - The frame time in nanoseconds.
2386   * @syscap SystemCapability.ArkUI.ArkUI.Full
2387   * @crossplatform
2388   * @atomicservice
2389   * @since 12
2390   */
2391  onFrame(frameTimeInNano: number): void;
2392
2393  /**
2394   * Called at the end of the next idle frame. If there is no next frame, will request one automatically.
2395   *
2396   * @param { number } timeLeftInNano - The remaining time from the deadline for this frame.
2397   * @syscap SystemCapability.ArkUI.ArkUI.Full
2398   * @crossplatform
2399   * @atomicservice
2400   * @since 12
2401   */
2402  onIdle(timeLeftInNano: number): void;
2403}
2404
2405/**
2406 * The base context of an ability or an application. It allows access to
2407 * application-specific resources.
2408 *
2409 * @typedef { common.Context } Context
2410 * @syscap SystemCapability.Ability.AbilityRuntime.Core
2411 * @StageModelOnly
2412 * @crossplatform
2413 * @atomicservice
2414 * @since 12
2415 */
2416export type Context = common.Context;
2417
2418/**
2419 * class ComponentSnapshot
2420 * @syscap SystemCapability.ArkUI.ArkUI.Full
2421 * @atomicservice
2422 * @since 12
2423 */
2424export class ComponentSnapshot {
2425  /**
2426     * Get a component snapshot by component id.
2427     *
2428     * @param { string } id - Target component ID, set by developer through .id attribute.
2429     * @param { AsyncCallback<image.PixelMap> } callback - Callback that contains the snapshot in PixelMap format.
2430     * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2431     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2432     * <br> 1. Mandatory parameters are left unspecified.
2433     * <br> 2. Incorrect parameters types.
2434     * <br> 3. Parameter verification failed.
2435     * @throws { BusinessError } 100001 - Invalid ID.
2436     * @syscap SystemCapability.ArkUI.ArkUI.Full
2437     * @crossplatform
2438     * @atomicservice
2439     * @since 12
2440     */
2441  get(id: string, callback: AsyncCallback<image.PixelMap>, options?: componentSnapshot.SnapshotOptions): void;
2442
2443  /**
2444   * Get a component snapshot by component id.
2445   *
2446   * @param { string } id - Target component ID, set by developer through .id attribute.
2447   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2448   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2449   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2450   * <br> 1. Mandatory parameters are left unspecified.
2451   * <br> 2. Incorrect parameters types.
2452   * <br> 3. Parameter verification failed.
2453   * @throws { BusinessError } 100001 - Invalid ID.
2454   * @syscap SystemCapability.ArkUI.ArkUI.Full
2455   * @crossplatform
2456   * @atomicservice
2457   * @since 12
2458   */
2459  get(id: string, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2460
2461  /**
2462   * Generate a snapshot from a custom component builder.
2463   *
2464   * @param { CustomBuilder } builder - Builder function of a custom component.
2465   * @param { AsyncCallback<image.PixelMap> } callback - Callback that contains the snapshot in PixelMap format.
2466   * @param { number } [delay] - Defines the delay time to render the snapshot.
2467   * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot.
2468   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2469   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2470   * <br> 1. Mandatory parameters are left unspecified.
2471   * <br> 2. Incorrect parameters types.
2472   * <br> 3. Parameter verification failed.
2473   * @throws { BusinessError } 100001 - The builder is not a valid build function.
2474   * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
2475   * the ready state is required when the checkImageStatus option is enabled.
2476   * @syscap SystemCapability.ArkUI.ArkUI.Full
2477   * @crossplatform
2478   * @atomicservice
2479   * @since 12
2480   */
2481  createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap>,
2482    delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void;
2483
2484  /**
2485   * Generate a snapshot from a custom component builder.
2486   *
2487   * @param { CustomBuilder } builder - Builder function of a custom component.
2488   * @param { number } [delay] - Defines the delay time to render the snapshot.
2489   * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot.
2490   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2491   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2492   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2493   * <br> 1. Mandatory parameters are left unspecified.
2494   * <br> 2. Incorrect parameters types.
2495   * <br> 3. Parameter verification failed.
2496   * @throws { BusinessError } 100001 - The builder is not a valid build function.
2497   * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
2498   * the ready state is required when the checkImageStatus option is enabled.
2499   * @syscap SystemCapability.ArkUI.ArkUI.Full
2500   * @crossplatform
2501   * @atomicservice
2502   * @since 12
2503   */
2504  createFromBuilder(builder: CustomBuilder, delay?: number,
2505    checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2506
2507  /**
2508   * Take a screenshot of the specified component in synchronous mode,
2509   * this mode will block the main thread, please use it with caution, the maximum
2510   * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown.
2511   *
2512   * @param { string } id - Target component ID, set by developer through .id attribute.
2513   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2514   * @returns { image.PixelMap } The snapshot result in PixelMap format.
2515   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2516   * <br> 1. Mandatory parameters are left unspecified.
2517   * <br> 2. Incorrect parameters types.
2518   * <br> 3. Parameter verification failed.
2519   * @throws { BusinessError } 100001 - Invalid ID.
2520   * @throws { BusinessError } 160002 - Timeout.
2521   * @syscap SystemCapability.ArkUI.ArkUI.Full
2522   * @crossplatform
2523   * @atomicservice
2524   * @since 12
2525   */
2526  getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap;
2527
2528  /**
2529   * Get a component snapshot by uniqueId.
2530   *
2531   * @param { number } uniqueId - The uniqueId of the node, can get through getUniqueId.
2532   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2533   * @returns { Promise<image.PixelMap> } A Promise with the snapshot in PixelMap format.
2534   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2535   * <br> 1. Mandatory parameters are left unspecified.
2536   * <br> 2. Incorrect parameters types.
2537   * <br> 3. Parameter verification failed.
2538   * @throws { BusinessError } 100001 - Invalid ID.
2539   * @syscap SystemCapability.ArkUI.ArkUI.Full
2540   * @crossplatform
2541   * @atomicservice
2542   * @since 15
2543   */
2544  getWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
2545
2546  /**
2547   * Take a screenshot of the specified component in synchronous mode,
2548   * this mode will block the main thread, please use it with caution, the maximum
2549   * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown.
2550   *
2551   * @param { number } uniqueId - The uniqueId of the node, can get through getUniqueId.
2552   * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options.
2553   * @returns { image.PixelMap } The snapshot result in PixelMap format.
2554   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2555   * <br> 1. Mandatory parameters are left unspecified.
2556   * <br> 2. Incorrect parameters types.
2557   * <br> 3. Parameter verification failed.
2558   * @throws { BusinessError } 100001 - Invalid ID.
2559   * @throws { BusinessError } 160002 - Timeout.
2560   * @syscap SystemCapability.ArkUI.ArkUI.Full
2561   * @crossplatform
2562   * @atomicservice
2563   * @since 15
2564   */
2565  getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap;
2566}
2567
2568/**
2569 * class UIContext
2570 *
2571 * @syscap SystemCapability.ArkUI.ArkUI.Full
2572 * @crossplatform
2573 * @since 10
2574 */
2575/**
2576 * class UIContext
2577 *
2578 * @syscap SystemCapability.ArkUI.ArkUI.Full
2579 * @crossplatform
2580 * @atomicservice
2581 * @since 11
2582 */
2583export class UIContext {
2584  /**
2585   * get object font.
2586   *
2587   * @returns { Font } object Font.
2588   * @syscap SystemCapability.ArkUI.ArkUI.Full
2589   * @crossplatform
2590   * @since 10
2591   */
2592  /**
2593   * get object font.
2594   *
2595   * @returns { Font } object Font.
2596   * @syscap SystemCapability.ArkUI.ArkUI.Full
2597   * @crossplatform
2598   * @atomicservice
2599   * @since 11
2600   */
2601  getFont(): Font;
2602
2603  /**
2604   * get object mediaQuery.
2605   *
2606   * @returns { MediaQuery } object MediaQuery.
2607   * @syscap SystemCapability.ArkUI.ArkUI.Full
2608   * @crossplatform
2609   * @since 10
2610   */
2611  /**
2612   * get object mediaQuery.
2613   *
2614   * @returns { MediaQuery } object MediaQuery.
2615   * @syscap SystemCapability.ArkUI.ArkUI.Full
2616   * @crossplatform
2617   * @atomicservice
2618   * @since 11
2619   */
2620  getMediaQuery(): MediaQuery;
2621
2622  /**
2623   * get object UIInspector.
2624   * @returns { UIInspector } object UIInspector.
2625   * @syscap SystemCapability.ArkUI.ArkUI.Full
2626   * @crossplatform
2627   * @since 10
2628   */
2629  /**
2630   * get object UIInspector.
2631   * @returns { UIInspector } object UIInspector.
2632   * @syscap SystemCapability.ArkUI.ArkUI.Full
2633   * @crossplatform
2634   * @atomicservice
2635   * @since 11
2636   */
2637  getUIInspector(): UIInspector;
2638
2639  /**
2640   * get the filtered attributes of the component tree.
2641   * @param { Array<string> } [filters] - the list of filters used to filter out component tree to be obtained.
2642   * @returns { string } the specified attributes of the component tree in json string.
2643   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2644   * <br> 1. Mandatory parameters are left unspecified.
2645   * <br> 2. Incorrect parameters types.
2646   * <br> 3. Parameter verification failed.
2647   * @syscap SystemCapability.ArkUI.ArkUI.Full
2648   * @crossplatform
2649   * @atomicservice
2650   * @since 12
2651   */
2652  getFilteredInspectorTree(filters?: Array<string>): string;
2653
2654  /**
2655   * get the filtered attributes of the component tree with the specified id and depth
2656   * @param { string } id - ID of the specified component tree to be obtained.
2657   * @param { number } depth - depth of the component tree to be obtained.
2658   * @param { Array<string> } [filters] - the list of filters used to filter out component tree to be obtained.
2659   * @returns { string } the specified attributes of the component tree in json string.
2660   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2661   * <br> 1. Mandatory parameters are left unspecified.
2662   * <br> 2. Incorrect parameters types.
2663   * <br> 3. Parameter verification failed.
2664   * @syscap SystemCapability.ArkUI.ArkUI.Full
2665   * @crossplatform
2666   * @atomicservice
2667   * @since 12
2668   */
2669  getFilteredInspectorTreeById(id: string, depth: number, filters?: Array<string>): string;
2670
2671  /**
2672   * get object router.
2673   *
2674   * @returns { Router } object Router.
2675   * @syscap SystemCapability.ArkUI.ArkUI.Full
2676   * @crossplatform
2677   * @since 10
2678   */
2679  /**
2680   * get object router.
2681   *
2682   * @returns { Router } object Router.
2683   * @syscap SystemCapability.ArkUI.ArkUI.Full
2684   * @crossplatform
2685   * @atomicservice
2686   * @since 11
2687   */
2688  getRouter(): Router;
2689
2690  /**
2691   * get object PromptAction.
2692   *
2693   * @returns { PromptAction } object PromptAction.
2694   * @syscap SystemCapability.ArkUI.ArkUI.Full
2695   * @crossplatform
2696   * @since 10
2697   */
2698  /**
2699   * get object PromptAction.
2700   *
2701   * @returns { PromptAction } object PromptAction.
2702   * @syscap SystemCapability.ArkUI.ArkUI.Full
2703   * @crossplatform
2704   * @atomicservice
2705   * @since 11
2706   */
2707  getPromptAction(): PromptAction;
2708
2709  /**
2710   * get object ComponentUtils.
2711   * @returns { ComponentUtils } object ComponentUtils.
2712   * @syscap SystemCapability.ArkUI.ArkUI.Full
2713   * @crossplatform
2714   * @since 10
2715   */
2716  /**
2717   * get object ComponentUtils.
2718   * @returns { ComponentUtils } object ComponentUtils.
2719   * @syscap SystemCapability.ArkUI.ArkUI.Full
2720   * @crossplatform
2721   * @atomicservice
2722   * @since 11
2723   */
2724  getComponentUtils(): ComponentUtils;
2725
2726  /**
2727   * Get the UI observer.
2728   *
2729   * @returns { UIObserver } The UI observer.
2730   * @syscap SystemCapability.ArkUI.ArkUI.Full
2731   * @crossplatform
2732   * @since 11
2733   */
2734  /**
2735   * Get the UI observer.
2736   *
2737   * @returns { UIObserver } The UI observer.
2738   * @syscap SystemCapability.ArkUI.ArkUI.Full
2739   * @crossplatform
2740   * @atomicservice
2741   * @since 12
2742   */
2743  getUIObserver(): UIObserver;
2744
2745  /**
2746   * Get object OverlayManager.
2747   *
2748   * @returns { OverlayManager } object OverlayManager.
2749   * @syscap SystemCapability.ArkUI.ArkUI.Full
2750   * @crossplatform
2751   * @atomicservice
2752   * @since 12
2753   */
2754  getOverlayManager(): OverlayManager;
2755
2756  /**
2757   * Init OverlayManager.
2758   *
2759   * @param { OverlayManagerOptions } options - Options.
2760   * @returns { boolean } Returns true if it is called first and before getting an OverlayManager instance; returns false otherwise.
2761   * @syscap SystemCapability.ArkUI.ArkUI.Full
2762   * @crossplatform
2763   * @atomicservice
2764   * @since 15
2765   */
2766  setOverlayManagerOptions(options: OverlayManagerOptions): boolean;
2767
2768  /**
2769   * Get object OverlayManagerOptions.
2770   *
2771   * @returns { OverlayManagerOptions } object OverlayManagerOptions.
2772   * @syscap SystemCapability.ArkUI.ArkUI.Full
2773   * @crossplatform
2774   * @atomicservice
2775   * @since 15
2776   */
2777  getOverlayManagerOptions(): OverlayManagerOptions;
2778
2779  /**
2780   * Create an animator object for custom animation.
2781   *
2782   * @param { AnimatorOptions } options - Options.
2783   * @returns { AnimatorResult }
2784   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2785   * <br> 1. Mandatory parameters are left unspecified.
2786   * <br> 2. Incorrect parameters types.
2787   * <br> 3. Parameter verification failed.
2788   * @syscap SystemCapability.ArkUI.ArkUI.Full
2789   * @crossplatform
2790   * @since 10
2791   */
2792  /**
2793   * Create an animator object for custom animation.
2794   *
2795   * @param { AnimatorOptions } options - Options.
2796   * @returns { AnimatorResult }
2797   * @throws { BusinessError } 401 - Parameter error. Possible causes:
2798   * <br> 1. Mandatory parameters are left unspecified.
2799   * <br> 2. Incorrect parameters types.
2800   * <br> 3. Parameter verification failed.
2801   * @syscap SystemCapability.ArkUI.ArkUI.Full
2802   * @crossplatform
2803   * @atomicservice
2804   * @since 11
2805   */
2806  createAnimator(options: AnimatorOptions): AnimatorResult;
2807
2808  /**
2809   * Defining animation function
2810   *
2811   * @param { AnimateParam } value - parameters for animation.
2812   * @param { function } event - the closure base on which, the system will create animation automatically
2813   * @syscap SystemCapability.ArkUI.ArkUI.Full
2814   * @crossplatform
2815   * @since 10
2816   */
2817  /**
2818   * Defining animation function
2819   *
2820   * @param { AnimateParam } value - parameters for animation.
2821   * @param { function } event - the closure base on which, the system will create animation automatically
2822   * @syscap SystemCapability.ArkUI.ArkUI.Full
2823   * @crossplatform
2824   * @atomicservice
2825   * @since 11
2826   */
2827  animateTo(value: AnimateParam, event: () => void): void;
2828
2829  /**
2830   * alertDialog display.
2831   *
2832   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options.
2833   * @syscap SystemCapability.ArkUI.ArkUI.Full
2834   * @crossplatform
2835   * @since 10
2836   */
2837  /**
2838   * alertDialog display.
2839   *
2840   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options.
2841   * @syscap SystemCapability.ArkUI.ArkUI.Full
2842   * @crossplatform
2843   * @atomicservice
2844   * @since 11
2845   */
2846  showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void;
2847
2848  /**
2849   * actionSheet display.
2850   *
2851   * @param { ActionSheetOptions } value - Options.
2852   * @syscap SystemCapability.ArkUI.ArkUI.Full
2853   * @crossplatform
2854   * @since 10
2855   */
2856  /**
2857   * actionSheet display.
2858   *
2859   * @param { ActionSheetOptions } value - Options.
2860   * @syscap SystemCapability.ArkUI.ArkUI.Full
2861   * @crossplatform
2862   * @atomicservice
2863   * @since 11
2864   */
2865  showActionSheet(value: ActionSheetOptions): void;
2866
2867  /**
2868   * datePickerDialog display.
2869   *
2870   * @param { DatePickerDialogOptions } options - Options.
2871   * @syscap SystemCapability.ArkUI.ArkUI.Full
2872   * @crossplatform
2873   * @since 10
2874   */
2875  /**
2876   * datePickerDialog display.
2877   *
2878   * @param { DatePickerDialogOptions } options - Options.
2879   * @syscap SystemCapability.ArkUI.ArkUI.Full
2880   * @crossplatform
2881   * @atomicservice
2882   * @since 11
2883   */
2884  showDatePickerDialog(options: DatePickerDialogOptions): void;
2885
2886  /**
2887   * timePickerDialog display.
2888   *
2889   * @param { TimePickerDialogOptions } options - Options.
2890   * @syscap SystemCapability.ArkUI.ArkUI.Full
2891   * @crossplatform
2892   * @since 10
2893   */
2894  /**
2895   * timePickerDialog display.
2896   *
2897   * @param { TimePickerDialogOptions } options - Options.
2898   * @syscap SystemCapability.ArkUI.ArkUI.Full
2899   * @crossplatform
2900   * @atomicservice
2901   * @since 11
2902   */
2903  showTimePickerDialog(options: TimePickerDialogOptions): void;
2904
2905  /**
2906   * textPickerDialog display.
2907   *
2908   * @param { TextPickerDialogOptions } options - Options.
2909   * @syscap SystemCapability.ArkUI.ArkUI.Full
2910   * @crossplatform
2911   * @since 10
2912   */
2913  /**
2914   * textPickerDialog display.
2915   *
2916   * @param { TextPickerDialogOptions } options - Options.
2917   * @syscap SystemCapability.ArkUI.ArkUI.Full
2918   * @crossplatform
2919   * @atomicservice
2920   * @since 11
2921   */
2922  showTextPickerDialog(options: TextPickerDialogOptions): void;
2923
2924  /**
2925   * Run custom functions inside the UIContext scope.
2926   *
2927   * @param { function } callback - The function called through UIContext.
2928   * @syscap SystemCapability.ArkUI.ArkUI.Full
2929   * @crossplatform
2930   * @since 10
2931   */
2932  /**
2933   * Run custom functions inside the UIContext scope.
2934   *
2935   * @param { function } callback - The function called through UIContext.
2936   * @syscap SystemCapability.ArkUI.ArkUI.Full
2937   * @crossplatform
2938   * @atomicservice
2939   * @since 11
2940   */
2941  runScopedTask(callback: () => void): void;
2942
2943  /**
2944   * Set KeyboardAvoidMode. The default mode is KeyboardAvoidMode.OFFSET
2945   *
2946   * @param { KeyboardAvoidMode } value - The mode of keyboard avoid.
2947   * @syscap SystemCapability.ArkUI.ArkUI.Full
2948   * @crossplatform
2949   * @atomicservice
2950   * @since 11
2951   */
2952  setKeyboardAvoidMode(value: KeyboardAvoidMode): void;
2953
2954  /**
2955   * Get KeyboardAvoidMode.
2956   * @returns { KeyboardAvoidMode } The mode of keyboard avoid.
2957   * @syscap SystemCapability.ArkUI.ArkUI.Full
2958   * @crossplatform
2959   * @atomicservice
2960   * @since 11
2961   */
2962  getKeyboardAvoidMode(): KeyboardAvoidMode;
2963
2964  /**
2965   * Dispach keyboard event to the frameNode with inspector key.
2966   *
2967   * @param { number | string } node - The uniqueId or inspector key of the target FrameNode.
2968   * @returns { boolean } Returns whether the key event is consumed.
2969   * @syscap SystemCapability.ArkUI.ArkUI.Full
2970   * @crossplatform
2971   * @atomicservice
2972   * @since 15
2973   */
2974  dispatchKeyEvent(node: number | string, event: KeyEvent): boolean;
2975
2976  /**
2977   * Get AtomicServiceBar.
2978   * @returns { Nullable<AtomicServiceBar> } The atomic service bar.
2979   * @syscap SystemCapability.ArkUI.ArkUI.Full
2980   * @crossplatform
2981   * @atomicservice
2982   * @since 11
2983   */
2984  getAtomicServiceBar(): Nullable<AtomicServiceBar>;
2985
2986  /**
2987   * Get DragController.
2988   * @returns { DragController } the DragController
2989   * @syscap SystemCapability.ArkUI.ArkUI.Full
2990   * @since 11
2991   */
2992  /**
2993   * Get DragController.
2994   * @returns { DragController } the DragController
2995   * @syscap SystemCapability.ArkUI.ArkUI.Full
2996   * @atomicservice
2997   * @since 12
2998   */
2999  getDragController(): DragController;
3000
3001  /**
3002    * Get MeasureUtils.
3003    * @returns { MeasureUtils } the MeasureUtils
3004    * @syscap SystemCapability.ArkUI.ArkUI.Full
3005    * @crossplatform
3006    * @atomicservice
3007    * @since 12
3008    */
3009  getMeasureUtils(): MeasureUtils;
3010
3011  /**
3012   * Defining keyframe animation function.
3013   *
3014   * @param { KeyframeAnimateParam } param - overall animation parameters
3015   * @param { Array<KeyframeState> } keyframes - all keyframe states
3016   * @syscap SystemCapability.ArkUI.ArkUI.Full
3017   * @crossplatform
3018   * @since 11
3019   */
3020  /**
3021   * Defining keyframe animation function.
3022   *
3023   * @param { KeyframeAnimateParam } param - overall animation parameters
3024   * @param { Array<KeyframeState> } keyframes - all keyframe states
3025   * @syscap SystemCapability.ArkUI.ArkUI.Full
3026   * @crossplatform
3027   * @atomicservice
3028   * @since 12
3029   */
3030  keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array<KeyframeState>): void;
3031
3032  /**
3033   * Get FocusController.
3034   * @returns { FocusController } the FocusController
3035   * @syscap SystemCapability.ArkUI.ArkUI.Full
3036   * @atomicservice
3037   * @since 12
3038   */
3039  getFocusController(): FocusController;
3040
3041  /**
3042   * Define animation functions for immediate distribution.
3043   *
3044   * @param { AnimateParam } param - Set animation effect parameters.
3045   * @param { Callback<void> } event - Specify the closure function that displays dynamic effects,
3046   * and the system will automatically insert transition animations for state changes caused by the closure function.
3047   * @syscap SystemCapability.ArkUI.ArkUI.Full
3048   * @systemapi
3049   * @since 12
3050   */
3051  animateToImmediately(param: AnimateParam, event: Callback<void>): void;
3052
3053  /**
3054   * Get FrameNode by id.
3055   *
3056   * @param { string } id - The id of FrameNode.
3057   * @returns { FrameNode | null } The instance of FrameNode.
3058   * @syscap SystemCapability.ArkUI.ArkUI.Full
3059   * @crossplatform
3060   * @atomicservice
3061   * @since 12
3062   */
3063   getFrameNodeById(id: string): FrameNode | null;
3064
3065  /**
3066   * Get the FrameNode attached to current window by id.
3067   *
3068   * @param { string } id - The id of FrameNode.
3069   * @returns { FrameNode | null } The instance of FrameNode.
3070   * @syscap SystemCapability.ArkUI.ArkUI.Full
3071   * @crossplatform
3072   * @atomicservice
3073   * @since 12
3074   */
3075  getAttachedFrameNodeById(id: string): FrameNode | null;
3076
3077  /**
3078   * Get FrameNode by uniqueId.
3079   *
3080   * @param { number } id - The uniqueId of the FrameNode.
3081   * @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed.
3082   * @syscap SystemCapability.ArkUI.ArkUI.Full
3083   * @crossplatform
3084   * @atomicservice
3085   * @since 12
3086   */
3087  getFrameNodeByUniqueId(id: number): FrameNode | null;
3088
3089  /**
3090   * Get page information of the frameNode with uniqueId.
3091   *
3092   * @param { number } id - The uniqueId of the target FrameNode.
3093   * @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes
3094   * navDestination and router page information. If the frame node does not have navDestination and
3095   * router page information, it will return an empty object.
3096   * @syscap SystemCapability.ArkUI.ArkUI.Full
3097   * @crossplatform
3098   * @atomicservice
3099   * @since 12
3100   */
3101  getPageInfoByUniqueId(id: number): PageInfo;
3102
3103  /**
3104   * Get navigation information of the frameNode with uniqueId.
3105   *
3106   * @param { number } id - The uniqueId of the target FrameNode.
3107   * @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the
3108   * target uniqueId, or undefined if the frameNode is not existed or does not have navigation information.
3109   * @syscap SystemCapability.ArkUI.ArkUI.Full
3110   * @crossplatform
3111   * @atomicservice
3112   * @since 12
3113   */
3114  getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined;
3115
3116  /**
3117   * Dynamic dimming.
3118   *
3119   * @param { string } id - The id of FrameNode.
3120   * @param { number } value - Compared to the original level of dimming.value range [0,1],
3121   * set values less than 0 to 0 and values greater than 1 to 1.
3122   * @syscap SystemCapability.ArkUI.ArkUI.Full
3123   * @systemapi
3124   * @since 12
3125   */
3126  setDynamicDimming(id: string, value: number): void;
3127
3128  /**
3129   * Get object cursor controller.
3130   *
3131   * @returns { CursorController } object cursor controller.
3132   * @syscap SystemCapability.ArkUI.ArkUI.Full
3133   * @crossplatform
3134   * @atomicservice
3135   * @since 12
3136   */
3137  getCursorController(): CursorController;
3138
3139  /**
3140   * Get object context menu controller.
3141   *
3142   * @returns { ContextMenuController } object context menu controller.
3143   * @syscap SystemCapability.ArkUI.ArkUI.Full
3144   * @crossplatform
3145   * @atomicservice
3146   * @since 12
3147   */
3148  getContextMenuController(): ContextMenuController;
3149
3150  /**
3151   * Get ComponentSnapshot.
3152   * @returns { ComponentSnapshot } the ComponentSnapshot
3153   * @syscap SystemCapability.ArkUI.ArkUI.Full
3154   * @atomicservice
3155   * @since 12
3156   */
3157  getComponentSnapshot(): ComponentSnapshot;
3158
3159  /**
3160   * Converts a value in vp units to a value in px.
3161   * @param { number } value
3162   * @returns { number }
3163   * @syscap SystemCapability.ArkUI.ArkUI.Full
3164   * @atomicservice
3165   * @since 12
3166   */
3167  vp2px(value: number): number;
3168
3169  /**
3170   * Converts a value in px units to a value in vp.
3171   * @param { number } value
3172   * @returns { number }
3173   * @syscap SystemCapability.ArkUI.ArkUI.Full
3174   * @atomicservice
3175   * @since 12
3176   */
3177  px2vp(value: number): number;
3178
3179  /**
3180   * Converts a value in fp units to a value in px.
3181   * @param { number } value
3182   * @returns { number }
3183   * @syscap SystemCapability.ArkUI.ArkUI.Full
3184   * @atomicservice
3185   * @since 12
3186   */
3187  fp2px(value: number): number;
3188
3189  /**
3190   * Converts a value in px units to a value in fp.
3191   * @param { number } value
3192   * @returns { number }
3193   * @syscap SystemCapability.ArkUI.ArkUI.Full
3194   * @atomicservice
3195   * @since 12
3196   */
3197  px2fp(value: number): number;
3198
3199  /**
3200   * Converts a value in lpx units to a value in px.
3201   * @param { number } value
3202   * @returns { number }
3203   * @syscap SystemCapability.ArkUI.ArkUI.Full
3204   * @atomicservice
3205   * @since 12
3206   */
3207  lpx2px(value: number): number;
3208
3209  /**
3210   * Converts a value in px units to a value in lpx.
3211   * @param { number } value
3212   * @returns { number }
3213   * @syscap SystemCapability.ArkUI.ArkUI.Full
3214   * @atomicservice
3215   * @since 12
3216   */
3217  px2lpx(value: number): number;
3218
3219  /**
3220   * Get current LocalStorage shared from stage.
3221   *
3222   * @returns { LocalStorage | undefined }
3223   * @syscap SystemCapability.ArkUI.ArkUI.Full
3224   * @stagemodelonly
3225   * @crossplatform
3226   * @atomicservice
3227   * @since 12
3228   */
3229  getSharedLocalStorage(): LocalStorage | undefined;
3230
3231  /**
3232   * Obtains context of the ability.
3233   *
3234   * @returns { Context | undefined }
3235   * @syscap SystemCapability.ArkUI.ArkUI.Full
3236   * @stagemodelonly
3237   * @crossplatform
3238   * @atomicservice
3239   * @since 12
3240   */
3241  getHostContext(): Context | undefined;
3242
3243  /**
3244   * Get the name of current window.
3245   *
3246   * @returns { string | undefined } The name of current window, or undefined if the window doesn't exist.
3247   * @syscap SystemCapability.ArkUI.ArkUI.Full
3248   * @crossplatform
3249   * @atomicservice
3250   * @since 12
3251   */
3252  getWindowName(): string | undefined;
3253
3254  /**
3255   * Get the width breakpoint of current window.
3256   *
3257   * @returns { WidthBreakpoint } The width breakpoint of current window.
3258   * @syscap SystemCapability.ArkUI.ArkUI.Full
3259   * @atomicservice
3260   * @since 13
3261   */
3262  getWindowWidthBreakpoint(): WidthBreakpoint;
3263
3264  /**
3265   * Get the height breakpoint of current window.
3266   *
3267   * @returns { HeightBreakpoint } The height breakpoint of current window.
3268   * @syscap SystemCapability.ArkUI.ArkUI.Full
3269   * @atomicservice
3270   * @since 13
3271   */
3272  getWindowHeightBreakpoint(): HeightBreakpoint;
3273
3274  /**
3275   * Open the BindSheet.
3276   *
3277   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3278   * @param { SheetOptions } sheetOptions - The options of sheet.
3279   * @param { number } targetId - The uniqueId of the FrameNode to which BindSheet is attached.
3280   * @returns { Promise<void> } The promise returned by the function.
3281   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3282   * <br> 1. Mandatory parameters are left unspecified.
3283   * <br> 2. Incorrect parameters types.
3284   * <br> 3. Parameter verification failed.
3285   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3286   * @throws { BusinessError } 120002 - The bindSheetContent already exists.
3287   * @throws { BusinessError } 120004 - The targetId does not exist.
3288   * @throws { BusinessError } 120005 - The node of targetId is not in the component tree.
3289   * @throws { BusinessError } 120006 - The node of targetId is not a child of the page node or NavDestination node.
3290   * @syscap SystemCapability.ArkUI.ArkUI.Full
3291   * @crossplatform
3292   * @atomicservice
3293   * @since 12
3294   */
3295  openBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions?: SheetOptions, targetId?: number): Promise<void>;
3296
3297  /**
3298   * Update the BindSheet with sheetOptions.
3299   *
3300   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3301   * @param { SheetOptions } sheetOptions - The update options of sheet.
3302   * @param { boolean } partialUpdate - If true, only the specified properties in the sheetOptions are updated,
3303   *                                    otherwise the rest of the properties are overwritten with the default values.
3304   *                                    Default value is false.
3305   * @returns { Promise<void> } The promise returned by the function.
3306   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3307   * <br> 1. Mandatory parameters are left unspecified.
3308   * <br> 2. Incorrect parameters types.
3309   * <br> 3. Parameter verification failed.
3310   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3311   * @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
3312   * @syscap SystemCapability.ArkUI.ArkUI.Full
3313   * @crossplatform
3314   * @atomicservice
3315   * @since 12
3316   */
3317  updateBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise<void>;
3318
3319  /**
3320   * Close the BindSheet.
3321   *
3322   * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet.
3323   * @returns { Promise<void> } The promise returned by the function.
3324   * @throws { BusinessError } 401 - Parameter error. Possible causes:
3325   * <br> 1. Mandatory parameters are left unspecified.
3326   * <br> 2. Incorrect parameters types.
3327   * <br> 3. Parameter verification failed.
3328   * @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
3329   * @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
3330   * @syscap SystemCapability.ArkUI.ArkUI.Full
3331   * @crossplatform
3332   * @atomicservice
3333   * @since 12
3334   */
3335  closeBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>): Promise<void>;
3336
3337  /**
3338   * Post a frame callback to run on the next frame.
3339   *
3340   * @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
3341   * @syscap SystemCapability.ArkUI.ArkUI.Full
3342   * @atomicservice
3343   * @since 12
3344   */
3345  postFrameCallback(frameCallback: FrameCallback): void;
3346
3347  /**
3348   * Post a frame callback to run on the next frame after the specified delay.
3349   *
3350   * @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
3351   * @param { number } delayTime - The delay time in milliseconds,
3352   * @syscap SystemCapability.ArkUI.ArkUI.Full
3353   * @atomicservice
3354   * @since 12
3355   */
3356  postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void;
3357
3358  /**
3359   * Require DynamicSyncScene by id.
3360   *
3361   * @param { string } id - The id of DynamicSyncScene.
3362   * @returns { Array<DynamicSyncScene>} The instance of SwiperDynamicSyncScene.
3363   * @syscap SystemCapability.ArkUI.ArkUI.Full
3364   * @atomicservice
3365   * @since 12
3366   */
3367  requireDynamicSyncScene(id: string): Array<DynamicSyncScene>;
3368
3369  /**
3370   * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process
3371   * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload.
3372   *
3373   * @throws { BusinessError } 202 - The caller is not a system application.
3374   * @syscap SystemCapability.ArkUI.ArkUI.Full
3375   * @systemapi
3376   * @atomicservice
3377   * @since 12
3378   */
3379  /**
3380   * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process
3381   * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload.
3382   *
3383   * @throws { BusinessError } 202 - The caller is not a system application.
3384   * @syscap SystemCapability.ArkUI.ArkUI.Full
3385   * @systemapi
3386   * @since 13
3387   */
3388  clearResourceCache(): void;
3389
3390  /**
3391   * Checks whether current font scale follows the system.
3392   *
3393   * @returns { boolean } Returns true if current font scale follows the system; returns false otherwise.
3394   * @syscap SystemCapability.ArkUI.ArkUI.Full
3395   * @crossplatform
3396   * @atomicservice
3397   * @since 13
3398   */
3399  isFollowingSystemFontScale(): boolean;
3400
3401  /**
3402   * Get the max font scale.
3403   *
3404   * @returns { number } The max font scale.
3405   * @syscap SystemCapability.ArkUI.ArkUI.Full
3406   * @crossplatform
3407   * @atomicservice
3408   * @since 13
3409   */
3410  getMaxFontScale(): number;
3411
3412  /**
3413   * Bind tabs to scrollable container component to automatically hide tab bar.
3414   *
3415   * @param { TabsController } tabsController - The controller of the tabs.
3416   * @param { Scroller } scroller - The controller of the scrollable container component.
3417   * @syscap SystemCapability.ArkUI.ArkUI.Full
3418   * @crossplatform
3419   * @atomicservice
3420   * @since 13
3421   */
3422  bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void;
3423
3424  /**
3425   * Unbind tabs from scrollable container component.
3426   *
3427   * @param { TabsController } tabsController - The controller of the tabs.
3428   * @param { Scroller } scroller - The controller of the scrollable container component.
3429   * @syscap SystemCapability.ArkUI.ArkUI.Full
3430   * @crossplatform
3431   * @atomicservice
3432   * @since 13
3433   */
3434  unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void;
3435
3436  /**
3437   * Bind tabs to nested scrollable container components to automatically hide tab bar.
3438   *
3439   * @param { TabsController } tabsController - The controller of the tabs.
3440   * @param { Scroller } parentScroller - The controller of the parent scrollable container component.
3441   * @param { Scroller } childScroller - The controller of the child scrollable container component.
3442   * @syscap SystemCapability.ArkUI.ArkUI.Full
3443   * @crossplatform
3444   * @atomicservice
3445   * @since 13
3446   */
3447  bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
3448
3449  /**
3450   * Unbind tabs from nested scrollable container components.
3451   *
3452   * @param { TabsController } tabsController - The controller of the tabs.
3453   * @param { Scroller } parentScroller - The controller of the parent scrollable container component.
3454   * @param { Scroller } childScroller - The controller of the child scrollable container component.
3455   * @syscap SystemCapability.ArkUI.ArkUI.Full
3456   * @crossplatform
3457   * @atomicservice
3458   * @since 13
3459   */
3460  unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
3461}
3462
3463/**
3464 * Enum of KeyBoardAvoidMethodType
3465 *
3466 * @enum { number } KeyBoardAvoidMethodType
3467 * @syscap SystemCapability.ArkUI.ArkUI.Full
3468 * @crossplatform
3469 * @atomicservice
3470 * @since 11
3471 */
3472
3473export const enum KeyboardAvoidMode {
3474  /**
3475  * Default Type, offset the whole page when keyBoard height changed.
3476  * @syscap SystemCapability.ArkUI.ArkUI.Full
3477  * @crossplatform
3478  * @atomicservice
3479  * @since 11
3480  */
3481  OFFSET = 0,
3482
3483  /**
3484   * Resize Type, resize the page when keyBoard height changed.
3485   * @syscap SystemCapability.ArkUI.ArkUI.Full
3486   * @crossplatform
3487   * @atomicservice
3488   * @since 11
3489   */
3490  RESIZE = 1,
3491
3492  /**
3493  * Offset Type, offset the whole page when caret position or keyboard height changed.
3494  * @syscap SystemCapability.ArkUI.ArkUI.Full
3495  * @crossplatform
3496  * @atomicservice
3497  * @since 14
3498  */
3499  OFFSET_WITH_CARET = 2,
3500
3501  /**
3502  * Resize Type, resize the whole page when when caret position or keyboard height changed.
3503  * @syscap SystemCapability.ArkUI.ArkUI.Full
3504  * @crossplatform
3505  * @atomicservice
3506  * @since 14
3507  */
3508  RESIZE_WITH_CARET = 3,
3509
3510  /**
3511  * None Type, nothing to do when keyboard height changed.
3512  * @syscap SystemCapability.ArkUI.ArkUI.Full
3513  * @crossplatform
3514  * @atomicservice
3515  * @since 14
3516  */
3517  NONE = 4,
3518}
3519
3520/**
3521 * Enum of SwiperDynamicSyncSceneType
3522 *
3523 * @enum { number } SwiperDynamicSyncSceneType
3524 * @syscap SystemCapability.ArkUI.ArkUI.Full
3525 * @atomicservice
3526 * @since 12
3527 */
3528export const enum SwiperDynamicSyncSceneType {
3529  /**
3530   * Scene type is GESTURE.
3531   *
3532   * @syscap SystemCapability.ArkUI.ArkUI.Full
3533   * @atomicservice
3534   * @since 12
3535   */
3536  GESTURE = 0,
3537
3538  /**
3539   * Scene type is ANIMATION.
3540   *
3541   * @syscap SystemCapability.ArkUI.ArkUI.Full
3542   * @atomicservice
3543   * @since 12
3544   */
3545  ANIMATION = 1
3546}
3547
3548/**
3549 * Enum of scene type for Marquee
3550 *
3551 * @enum { number } MarqueeDynamicSyncSceneType
3552 * @syscap SystemCapability.ArkUI.ArkUI.Full
3553 * @atomicservice
3554 * @since 14
3555 */
3556export const enum MarqueeDynamicSyncSceneType {
3557  /**
3558   * Scene type is ANIMATION.
3559   *
3560   * @syscap SystemCapability.ArkUI.ArkUI.Full
3561   * @atomicservice
3562   * @since 14
3563   */
3564  ANIMATION = 1
3565}
3566