• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21import { UIContext } from '../@ohos.arkui.UIContext';
22import { RenderNode } from './RenderNode';
23import { Size, Position, Edges, LengthMetrics, SizeT } from './Graphics';
24import { DrawContext } from './Graphics';
25import { ComponentContent } from './ComponentContent';
26
27/**
28 * Layout constraint, include the max size, the min size and the reference size for children to calculate percent.
29 *
30 * @interface LayoutConstraint
31 * @syscap SystemCapability.ArkUI.ArkUI.Full
32 * @crossplatform
33 * @atomicservice
34 * @since 12
35 */
36declare interface LayoutConstraint {
37  /**
38   * MaxSize
39   *
40   * @type { Size }
41   * @syscap SystemCapability.ArkUI.ArkUI.Full
42   * @crossplatform
43   * @atomicservice
44   * @since 12
45   */
46  maxSize: Size;
47
48  /**
49   * MinSize
50   *
51   * @type { Size }
52   * @syscap SystemCapability.ArkUI.ArkUI.Full
53   * @crossplatform
54   * @atomicservice
55   * @since 12
56   */
57  minSize: Size;
58
59  /**
60   * PercentReference, if the size unit of the child nodes is percentage, then they use PercentReference to calculate
61   * the px size.
62   *
63   * @type { Size }
64   * @syscap SystemCapability.ArkUI.ArkUI.Full
65   * @crossplatform
66   * @atomicservice
67   * @since 12
68   */
69  percentReference: Size;
70}
71
72/**
73 * Defines FrameNode.
74 *
75 * @syscap SystemCapability.ArkUI.ArkUI.Full
76 * @crossplatform
77 * @since 11
78 */
79/**
80 * Defines FrameNode.
81 *
82 * @syscap SystemCapability.ArkUI.ArkUI.Full
83 * @crossplatform
84 * @atomicservice
85 * @since 12
86 */
87export class FrameNode {
88  /**
89   * Constructor.
90   *
91   * @param { UIContext } uiContext - uiContext used to create the FrameNode
92   * @syscap SystemCapability.ArkUI.ArkUI.Full
93   * @crossplatform
94   * @since 11
95   */
96  /**
97   * Constructor.
98   *
99   * @param { UIContext } uiContext - uiContext used to create the FrameNode
100   * @syscap SystemCapability.ArkUI.ArkUI.Full
101   * @crossplatform
102   * @atomicservice
103   * @since 12
104   */
105  constructor(uiContext: UIContext);
106
107  /**
108   * Get the RenderNode in FrameNode.
109   *
110   * @returns { RenderNode | null } - Returns a RenderNode inside the FrameNode, or null if not contained.
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @crossplatform
113   * @since 11
114   */
115  /**
116   * Get the RenderNode in FrameNode.
117   *
118   * @returns { RenderNode | null } - Returns a RenderNode inside the FrameNode, or null if not contained.
119   * @syscap SystemCapability.ArkUI.ArkUI.Full
120   * @crossplatform
121   * @atomicservice
122   * @since 12
123   */
124  getRenderNode(): RenderNode | null;
125
126  /**
127   * Return a flag to indicate whether the current FrameNode can be modified. Indicates whether the FrameNode supports appendChild, insertChildAfter, removeChild, clearChildren.
128   *
129   * @returns { boolean } - Returns true if the FrameNode can be modified, otherwise return false.
130   * @syscap SystemCapability.ArkUI.ArkUI.Full
131   * @crossplatform
132   * @atomicservice
133   * @since 12
134   */
135  isModifiable(): boolean;
136
137  /**
138   * Add child to the end of the FrameNode's children.
139   *
140   * @param { FrameNode } node - The node will be added.
141   * @throws { BusinessError } 100021 - The FrameNode is not modifiable.
142   * @syscap SystemCapability.ArkUI.ArkUI.Full
143   * @crossplatform
144   * @atomicservice
145   * @since 12
146   */
147  appendChild(node: FrameNode): void;
148
149  /**
150   * Add child to the current FrameNode.
151   *
152   * @param { FrameNode } child - The node will be added.
153   * @param { FrameNode | null } sibling - The new node is added after this node. When sibling is null, insert node as the first children of the node.
154   * @throws { BusinessError } 100021 - The FrameNode is not modifiable.
155   * @syscap SystemCapability.ArkUI.ArkUI.Full
156   * @crossplatform
157   * @atomicservice
158   * @since 12
159   */
160  insertChildAfter(child: FrameNode, sibling: FrameNode | null): void;
161
162  /**
163   * Remove child from the current FrameNode.
164   *
165   * @param { FrameNode } node - The node will be removed.
166   * @throws { BusinessError } 100021 - The FrameNode is not modifiable.
167   * @syscap SystemCapability.ArkUI.ArkUI.Full
168   * @crossplatform
169   * @atomicservice
170   * @since 12
171   */
172  removeChild(node: FrameNode): void;
173
174  /**
175   * Clear children of the current FrameNode.
176   *
177   * @throws { BusinessError } 100021 - The FrameNode is not modifiable.
178   * @syscap SystemCapability.ArkUI.ArkUI.Full
179   * @crossplatform
180   * @atomicservice
181   * @since 12
182   */
183  clearChildren(): void;
184
185  /**
186   * Get a child of the current FrameNode by index.
187   *
188   * @param { number } index - The index of the desired node in the children of FrameNode.
189   * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null.
190   * @syscap SystemCapability.ArkUI.ArkUI.Full
191   * @crossplatform
192   * @atomicservice
193   * @since 12
194   */
195  getChild(index: number): FrameNode | null;
196
197  /**
198   * Get the first child of the current FrameNode.
199   *
200   * @returns {  FrameNode | null } - Returns a FrameNode, which is first child of the current FrameNode. If current FrameNode does not have child node, returns null.
201   * If current FrameNode does not have child node, returns null.
202   * @syscap SystemCapability.ArkUI.ArkUI.Full
203   * @crossplatform
204   * @atomicservice
205   * @since 12
206   */
207  getFirstChild(): FrameNode | null;
208
209  /**
210   * Get the next sibling node of the current FrameNode.
211   *
212   * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have next sibling node, returns null.
213   * @syscap SystemCapability.ArkUI.ArkUI.Full
214   * @crossplatform
215   * @atomicservice
216   * @since 12
217   */
218  getNextSibling(): FrameNode | null;
219
220  /**
221   * Get the previous sibling node of the current FrameNode.
222   *
223   * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have previous sibling node, returns null.
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @atomicservice
227   * @since 12
228   */
229  getPreviousSibling(): FrameNode | null;
230
231  /**
232   * Get the parent node of the current FrameNode.
233   *
234   * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have parent node, returns null.
235   * @syscap SystemCapability.ArkUI.ArkUI.Full
236   * @crossplatform
237   * @atomicservice
238   * @since 12
239   */
240  getParent(): FrameNode | null;
241
242  /**
243   * Get the children count of the current FrameNode.
244   *
245   * @returns { number } - Returns the number of the children of the current FrameNode.
246   * @syscap SystemCapability.ArkUI.ArkUI.Full
247   * @crossplatform
248   * @atomicservice
249   * @since 12
250   */
251  getChildrenCount(): number;
252
253  /**
254   * Dispose the FrameNode immediately.
255   *
256   * @syscap SystemCapability.ArkUI.ArkUI.Full
257   * @crossplatform
258   * @atomicservice
259   * @since 12
260   */
261  dispose(): void;
262
263  /**
264   * Get the position of the node relative to window.
265   *
266   * @returns { Position } - Returns position of the node relative to window.
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @crossplatform
269   * @atomicservice
270   * @since 12
271   */
272  getPositionToWindow(): Position;
273
274  /**
275   * Get the position of the node relative to its parent.
276   *
277   * @returns { Position } - Returns position of the node relative to its parent.
278   * @syscap SystemCapability.ArkUI.ArkUI.Full
279   * @crossplatform
280   * @atomicservice
281   * @since 12
282   */
283  getPositionToParent(): Position;
284
285  /**
286   * Get the size of the FrameNode after measure, with unit PX.
287   *
288   * @returns { Size } - Returns the size of the FrameNode after measure, with unit PX.
289   * @syscap SystemCapability.ArkUI.ArkUI.Full
290   * @crossplatform
291   * @atomicservice
292   * @since 12
293   */
294  getMeasuredSize(): Size;
295
296  /**
297   * Get the offset to the parent of the FrameNode after layout, with unit PX.
298   *
299   * @returns { Position } - Returns the offset to the parent of the FrameNode after layout, with unit PX.
300   * @syscap SystemCapability.ArkUI.ArkUI.Full
301   * @crossplatform
302   * @atomicservice
303   * @since 12
304   */
305  getLayoutPosition(): Position;
306
307  /**
308   * Get the user config border width of the FrameNode.
309   *
310   * @returns { Edges<LengthMetrics> } - Returns the user config border width of the FrameNode.
311   * @syscap SystemCapability.ArkUI.ArkUI.Full
312   * @crossplatform
313   * @atomicservice
314   * @since 12
315   */
316  getUserConfigBorderWidth(): Edges<LengthMetrics>;
317
318  /**
319   * Get the user config padding of the FrameNode.
320   *
321   * @returns { Edges<LengthMetrics> } - Returns the user config padding of the FrameNode.
322   * @syscap SystemCapability.ArkUI.ArkUI.Full
323   * @crossplatform
324   * @atomicservice
325   * @since 12
326   */
327  getUserConfigPadding(): Edges<LengthMetrics>;
328
329  /**
330   * Get the user config margin of the FrameNode.
331   *
332   * @returns { Edges<LengthMetrics> } - Returns the user config margin of the FrameNode.
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @crossplatform
335   * @atomicservice
336   * @since 12
337   */
338  getUserConfigMargin(): Edges<LengthMetrics>;
339
340  /**
341   * Get the user config size of the FrameNode.
342   *
343   * @returns { SizeT<LengthMetrics> } - Returns the user config size of the FrameNode.
344   * @syscap SystemCapability.ArkUI.ArkUI.Full
345   * @crossplatform
346   * @atomicservice
347   * @since 12
348   */
349  getUserConfigSize(): SizeT<LengthMetrics>;
350
351  /**
352   * Get the id of the FrameNode.
353   *
354   * @returns { string } - Returns the id of the FrameNode.
355   * @syscap SystemCapability.ArkUI.ArkUI.Full
356   * @crossplatform
357   * @atomicservice
358   * @since 12
359   */
360  getId(): string;
361
362  /**
363   * Get the unique id of the FrameNode.
364   *
365   * @returns { number } - Returns the unique id of the FrameNode.
366   * @syscap SystemCapability.ArkUI.ArkUI.Full
367   * @crossplatform
368   * @atomicservice
369   * @since 12
370   */
371  getUniqueId(): number;
372
373  /**
374   * Get the type of the FrameNode. The type is the name of component, for example, the nodeType of Button is "Button",
375   * and the nodeType of custom  component is "__Common__".
376   *
377   * @returns { string } - Returns the type of the FrameNode.
378   * @syscap SystemCapability.ArkUI.ArkUI.Full
379   * @crossplatform
380   * @atomicservice
381   * @since 12
382   */
383  getNodeType(): string;
384
385  /**
386   * Get the opacity of the FrameNode.
387   *
388   * @returns { number } - Returns the opacity of the FrameNode.
389   * @syscap SystemCapability.ArkUI.ArkUI.Full
390   * @crossplatform
391   * @atomicservice
392   * @since 12
393   */
394  getOpacity(): number;
395
396  /**
397   * Get if the FrameNode is visible.
398   *
399   * @returns { boolean } - Returns if the FrameNode is visible.
400   * @syscap SystemCapability.ArkUI.ArkUI.Full
401   * @crossplatform
402   * @atomicservice
403   * @since 12
404   */
405  isVisible(): boolean;
406
407  /**
408   * Get if the FrameNode is clip to frame.
409   *
410   * @returns { boolean } - Returns if the FrameNode is clip to frame.
411   * @syscap SystemCapability.ArkUI.ArkUI.Full
412   * @crossplatform
413   * @atomicservice
414   * @since 12
415   */
416  isClipToFrame(): boolean;
417
418  /**
419   * Get if the FrameNode is attached.
420   *
421   * @returns { boolean } - Returns if the FrameNode is attached.
422   * @syscap SystemCapability.ArkUI.ArkUI.Full
423   * @crossplatform
424   * @atomicservice
425   * @since 12
426   */
427  isAttached(): boolean;
428
429  /**
430   * Get the inspector information of the FrameNode.
431   *
432   * @returns { Object } - Returns the inspector information of the FrameNode.
433   * @syscap SystemCapability.ArkUI.ArkUI.Full
434   * @crossplatform
435   * @atomicservice
436   * @since 12
437   */
438  getInspectorInfo(): Object;
439
440  /**
441   * * Get the custom property of the component corresponding to this FrameNode.
442   *
443   * @param { string } name - the name of the custom property.
444   * @returns { Object | undefined } - Returns the value of the custom property.
445   * @syscap SystemCapability.ArkUI.ArkUI.Full
446   * @crossplatform
447   * @atomicservice
448   * @since 12
449   */
450  getCustomProperty(name: string): Object | undefined;
451
452  /**
453   * Set commonEvent response to the current FrameNode.
454   *
455   * @returns { UICommonEvent } - Returns a Object inside the FrameNode, which is used to set callbacks about different events.
456   * @syscap SystemCapability.ArkUI.ArkUI.Full
457   * @crossplatform
458   * @atomicservice
459   * @since 12
460   */
461  get commonEvent(): UICommonEvent;
462
463  /**
464   * Get gestureEvent of the current FrameNode.
465   *
466   * @returns { UIGestureEvent } - Returns a Object inside the FrameNode, which is used to set callbacks about different gesture events.
467   * @syscap SystemCapability.ArkUI.ArkUI.Full
468   * @crossplatform
469   * @atomicservice
470   * @since 14
471   */
472  get gestureEvent(): UIGestureEvent;
473
474  /**
475   * Get the CommonAttribute of the current FrameNode.
476   *
477   * @returns { CommonAttribute } - Returns the CommonAttribute which is used to modify the common attributes of the FrameNode.
478   * @syscap SystemCapability.ArkUI.ArkUI.Full
479   * @crossplatform
480   * @atomicservice
481   * @since 12
482   */
483  get commonAttribute(): CommonAttribute;
484
485  /**
486   * Draw Method. Executed when the current FrameNode is rendering its content.
487   *
488   * @param { DrawContext } context - The DrawContext will be used when executed draw method.
489   * @syscap SystemCapability.ArkUI.ArkUI.Full
490   * @crossplatform
491   * @atomicservice
492   * @since 12
493   */
494  onDraw?(context: DrawContext): void;
495
496  /**
497   * Method to measure the FrameNode and its content to determine the measured size. Use this method to override the
498   * default measure method when measuring the FrameNode.
499   *
500   * @param { LayoutConstraint } constraint - The layout constraint of the node, will be used when executed measure
501   * method.
502   * @syscap SystemCapability.ArkUI.ArkUI.Full
503   * @crossplatform
504   * @atomicservice
505   * @since 12
506   */
507  onMeasure(constraint: LayoutConstraint): void;
508
509  /**
510   * Method to assign a position to the FrameNode and each of its children. Use this method to override the
511   * default layout method.
512   *
513   * @param { Position } position - The position of the node, will be used when executed layout method.
514   * @syscap SystemCapability.ArkUI.ArkUI.Full
515   * @crossplatform
516   * @atomicservice
517   * @since 12
518   */
519  onLayout(position: Position): void;
520
521  /**
522   * Set the size of the FrameNode after measure, with unit PX.
523   *
524   * @param { Size } size - The size of the FrameNode after measure.
525   * @syscap SystemCapability.ArkUI.ArkUI.Full
526   * @crossplatform
527   * @atomicservice
528   * @since 12
529   */
530  setMeasuredSize(size: Size): void;
531
532  /**
533   * Set the position to the parent of the FrameNode after layout, with unit PX.
534   *
535   * @param { Position } position - The position to the parent of the FrameNode after layout.
536   * @syscap SystemCapability.ArkUI.ArkUI.Full
537   * @crossplatform
538   * @atomicservice
539   * @since 12
540   */
541  setLayoutPosition(position: Position): void;
542
543  /**
544   * This is called to find out how big the FrameNode should be. The parent node supplies constraint information. The
545   * actual measurement work of the FrameNode is performed in onMeasure or the default measure method.
546   *
547   * @param { LayoutConstraint } constraint - The layout constraint of the node, supplied by the parent node.
548   * @syscap SystemCapability.ArkUI.ArkUI.Full
549   * @crossplatform
550   * @atomicservice
551   * @since 12
552   */
553  measure(constraint: LayoutConstraint): void;
554
555  /**
556   * This is called to assign position to the FrameNode and all of its descendants. The position is used to init
557   * the position of the frameNode, and the actual layout work of FrameNode is performed in onLayout or the default
558   * layout method.
559   *
560   * @param { Position } position - The position of the node, will be used when executed the layout method.
561   * @syscap SystemCapability.ArkUI.ArkUI.Full
562   * @crossplatform
563   * @atomicservice
564   * @since 12
565   */
566  layout(position: Position): void;
567
568  /**
569   * Mark the frame node as need layout.
570   *
571   * @syscap SystemCapability.ArkUI.ArkUI.Full
572   * @crossplatform
573   * @atomicservice
574   * @since 12
575   */
576  setNeedsLayout(): void;
577
578  /**
579   * Invalidate the RenderNode in the FrameNode, which will cause a re-render of the RenderNode.
580   *
581   * @syscap SystemCapability.ArkUI.ArkUI.Full
582   * @crossplatform
583   * @atomicservice
584   * @since 12
585   */
586  invalidate(): void;
587
588  /**
589   * Get the position of the node relative to screen.
590   *
591   * @returns { Position } - Returns position of the node relative to screen.
592   * @syscap SystemCapability.ArkUI.ArkUI.Full
593   * @crossplatform
594   * @atomicservice
595   * @since 12
596   */
597  getPositionToScreen(): Position;
598
599  /**
600   * Get the position of the node relative to window with transform.
601   *
602   * @returns { Position } - Returns position of the node relative to window with transform.
603   * @syscap SystemCapability.ArkUI.ArkUI.Full
604   * @crossplatform
605   * @atomicservice
606   * @since 12
607   */
608  getPositionToWindowWithTransform(): Position;
609
610  /**
611   * Get the position of the node relative to its parent with transform.
612   *
613   * @returns { Position } - Returns position of the node relative to its parent with transform.
614   * @syscap SystemCapability.ArkUI.ArkUI.Full
615   * @crossplatform
616   * @atomicservice
617   * @since 12
618   */
619  getPositionToParentWithTransform(): Position;
620
621  /**
622   * Get the position of the node relative to screen with transform.
623   *
624   * @returns { Position } - Returns position of the node relative to screen with transform.
625   * @syscap SystemCapability.ArkUI.ArkUI.Full
626   * @crossplatform
627   * @atomicservice
628   * @since 12
629   */
630  getPositionToScreenWithTransform(): Position;
631
632  /**
633   * Detach from parent and dispose all child recursively.
634   *
635   * @syscap SystemCapability.ArkUI.ArkUI.Full
636   * @crossplatform
637   * @atomicservice
638   * @since 12
639   */
640  disposeTree(): void;
641
642  /**
643   * Mount ComponentContent to FrameNode.
644   *
645   * @param { ComponentContent<T> } content - Newly added ComponentContent.
646   * @throws { BusinessError } 100021 - The FrameNode is not modifiable.
647   * @syscap SystemCapability.ArkUI.ArkUI.Full
648   * @crossplatform
649   * @atomicservice
650   * @since 12
651   */
652  addComponentContent<T>(content: ComponentContent<T>): void;
653}
654
655/**
656 * Used to define the FrameNode type.
657 *
658 * @extends FrameNode
659 * @interface TypedFrameNode
660 * @syscap SystemCapability.ArkUI.ArkUI.Full
661 * @crossplatform
662 * @atomicservice
663 * @since 12
664 */
665export interface TypedFrameNode<C, T> extends FrameNode {
666  /**
667   * Initialize FrameNode.
668   *
669   * @type { C }
670   * @syscap SystemCapability.ArkUI.ArkUI.Full
671   * @crossplatform
672   * @atomicservice
673   * @since 12
674   */
675  initialize: C;
676  /**
677   * Get attribute instance of FrameNode to set attributes.
678   *
679   * @type { T }
680   * @readonly
681   * @syscap SystemCapability.ArkUI.ArkUI.Full
682   * @crossplatform
683   * @atomicservice
684   * @since 12
685   */
686  readonly attribute: T;
687}
688
689/**
690 * Provides methods to implement FrameNode.
691 *
692 * @namespace typeNode
693 * @syscap SystemCapability.ArkUI.ArkUI.Full
694 * @crossplatform
695 * @atomicservice
696 * @since 12
697 */
698export namespace typeNode {
699  /**
700   * Define the FrameNode type for Text.
701   *
702   * @typedef { TypedFrameNode<TextInterface, TextAttribute> } Text
703   * @syscap SystemCapability.ArkUI.ArkUI.Full
704   * @crossplatform
705   * @atomicservice
706   * @since 12
707   */
708  type Text = TypedFrameNode<TextInterface, TextAttribute>;
709
710  /**
711   * Create a FrameNode of Text type.
712   *
713   * @param { UIContext } context - uiContext used to create the FrameNode.
714   * @param { 'Text' } nodeType - node type.
715   * @returns { Text } - Return Text type FrameNode.
716   * @syscap SystemCapability.ArkUI.ArkUI.Full
717   * @atomicservice
718   * @since 12
719   */
720  function createNode(context: UIContext, nodeType: 'Text'): Text;
721
722  /**
723   * Define the FrameNode type for Column.
724   *
725   * @typedef { TypedFrameNode<ColumnInterface, ColumnAttribute> } Column
726   * @syscap SystemCapability.ArkUI.ArkUI.Full
727   * @crossplatform
728   * @atomicservice
729   * @since 12
730   */
731  type Column = TypedFrameNode<ColumnInterface, ColumnAttribute>;
732
733  /**
734   * Create a FrameNode of Column type.
735   *
736   * @param { UIContext } context - uiContext used to create the FrameNode.
737   * @param { 'Column' } nodeType - node type.
738   * @returns { Column } - Return Column type FrameNode.
739   * @syscap SystemCapability.ArkUI.ArkUI.Full
740   * @atomicservice
741   * @since 12
742   */
743  function createNode(context: UIContext, nodeType: 'Column'): Column;
744
745  /**
746   * Define the FrameNode type for Row.
747   *
748   * @typedef { TypedFrameNode<RowInterface, RowAttribute> } Row
749   * @syscap SystemCapability.ArkUI.ArkUI.Full
750   * @crossplatform
751   * @atomicservice
752   * @since 12
753   */
754  type Row = TypedFrameNode<RowInterface, RowAttribute>;
755
756  /**
757   * Create a FrameNode of Row type.
758   *
759   * @param { UIContext } context - uiContext used to create the FrameNode.
760   * @param { 'Row' } nodeType - node type.
761   * @returns { Row } - Return Row type FrameNode.
762   * @syscap SystemCapability.ArkUI.ArkUI.Full
763   * @atomicservice
764   * @since 12
765   */
766  function createNode(context: UIContext, nodeType: 'Row'): Row;
767
768  /**
769   * Define the FrameNode type for Stack.
770   *
771   * @typedef { TypedFrameNode<StackInterface, StackAttribute> } Stack
772   * @syscap SystemCapability.ArkUI.ArkUI.Full
773   * @crossplatform
774   * @atomicservice
775   * @since 12
776   */
777  type Stack = TypedFrameNode<StackInterface, StackAttribute>;
778
779  /**
780   * Create a FrameNode of Stack type.
781   *
782   * @param { UIContext } context - uiContext used to create the FrameNode.
783   * @param { 'Stack' } nodeType - node type.
784   * @returns { Stack } - Return Stack type FrameNode.
785   * @syscap SystemCapability.ArkUI.ArkUI.Full
786   * @atomicservice
787   * @since 12
788   */
789  function createNode(context: UIContext, nodeType: 'Stack'): Stack;
790
791  /**
792   * Define the FrameNode type for GridRow.
793   *
794   * @typedef { TypedFrameNode<GridRowInterface, GridRowAttribute> } GridRow
795   * @syscap SystemCapability.ArkUI.ArkUI.Full
796   * @crossplatform
797   * @atomicservice
798   * @since 12
799   */
800  type GridRow = TypedFrameNode<GridRowInterface, GridRowAttribute>;
801
802  /**
803   * Create a FrameNode of GridRow type.
804   *
805   * @param { UIContext } context - uiContext used to create the FrameNode.
806   * @param { 'GridRow' } nodeType - node type.
807   * @returns { GridRow } - Return GridRow type FrameNode.
808   * @syscap SystemCapability.ArkUI.ArkUI.Full
809   * @atomicservice
810   * @since 12
811   */
812  function createNode(context: UIContext, nodeType: 'GridRow'): GridRow;
813
814  /**
815   * Define the FrameNode type for GridCol.
816   *
817   * @typedef { TypedFrameNode<GridColInterface, GridColAttribute> } GridCol
818   * @syscap SystemCapability.ArkUI.ArkUI.Full
819   * @crossplatform
820   * @atomicservice
821   * @since 12
822   */
823  type GridCol = TypedFrameNode<GridColInterface, GridColAttribute>;
824
825  /**
826   * Create a FrameNode of GridCol type.
827   *
828   * @param { UIContext } context - uiContext used to create the FrameNode.
829   * @param { 'GridCol' } nodeType - node type.
830   * @returns { GridCol } - Return GridCol type FrameNode.
831   * @syscap SystemCapability.ArkUI.ArkUI.Full
832   * @atomicservice
833   * @since 12
834   */
835  function createNode(context: UIContext, nodeType: 'GridCol'): GridCol;
836
837  /**
838   * Define the FrameNode type for Flex.
839   *
840   * @typedef { TypedFrameNode<FlexInterface, FlexAttribute> } Flex
841   * @syscap SystemCapability.ArkUI.ArkUI.Full
842   * @crossplatform
843   * @atomicservice
844   * @since 12
845   */
846  type Flex = TypedFrameNode<FlexInterface, FlexAttribute>;
847
848  /**
849   * Create a FrameNode of Flex type.
850   *
851   * @param { UIContext } context - uiContext used to create the FrameNode.
852   * @param { 'Flex' } nodeType - node type.
853   * @returns { Flex } - Return Flex type FrameNode.
854   * @syscap SystemCapability.ArkUI.ArkUI.Full
855   * @atomicservice
856   * @since 12
857   */
858  function createNode(context: UIContext, nodeType: 'Flex'): Flex;
859
860  /**
861   * Define the FrameNode type for Swiper.
862   *
863   * @typedef { TypedFrameNode<SwiperInterface, SwiperAttribute> } Swiper
864   * @syscap SystemCapability.ArkUI.ArkUI.Full
865   * @crossplatform
866   * @atomicservice
867   * @since 12
868   */
869  type Swiper = TypedFrameNode<SwiperInterface, SwiperAttribute>;
870
871  /**
872   * Create a FrameNode of Swiper type.
873   *
874   * @param { UIContext } context - uiContext used to create the FrameNode.
875   * @param { 'Swiper' } nodeType - node type.
876   * @returns { Swiper } - Return Swiper type FrameNode.
877   * @syscap SystemCapability.ArkUI.ArkUI.Full
878   * @atomicservice
879   * @since 12
880   */
881  function createNode(context: UIContext, nodeType: 'Swiper'): Swiper;
882
883  /**
884   * Define the FrameNode type for Progress.
885   *
886   * @typedef { TypedFrameNode<ProgressInterface, ProgressAttribute> } Progress
887   * @syscap SystemCapability.ArkUI.ArkUI.Full
888   * @crossplatform
889   * @atomicservice
890   * @since 12
891   */
892  type Progress = TypedFrameNode<ProgressInterface, ProgressAttribute>;
893
894  /**
895   * Create a FrameNode of Progress type.
896   *
897   * @param { UIContext } context - uiContext used to create the FrameNode.
898   * @param { 'Progress' } nodeType - node type.
899   * @returns { Progress } - Return Progress type FrameNode.
900   * @syscap SystemCapability.ArkUI.ArkUI.Full
901   * @atomicservice
902   * @since 12
903   */
904  function createNode(context: UIContext, nodeType: 'Progress'): Progress;
905
906  /**
907   * Define the FrameNode type for Scroll.
908   *
909   * @typedef { TypedFrameNode<ScrollInterface, ScrollAttribute> } Scroll
910   * @syscap SystemCapability.ArkUI.ArkUI.Full
911   * @crossplatform
912   * @atomicservice
913   * @since 12
914   */
915  type Scroll = TypedFrameNode<ScrollInterface, ScrollAttribute>;
916
917  /**
918   * Create a FrameNode of Scroll type.
919   *
920   * @param { UIContext } context - uiContext used to create the FrameNode.
921   * @param { 'Scroll' } nodeType - node type.
922   * @returns { Scroll } - Return Scroll type FrameNode.
923   * @syscap SystemCapability.ArkUI.ArkUI.Full
924   * @atomicservice
925   * @since 12
926   */
927  function createNode(context: UIContext, nodeType: 'Scroll'): Scroll;
928
929  /**
930   * Define the FrameNode type for RelativeContainer.
931   *
932   * @typedef { TypedFrameNode<RelativeContainerInterface, RelativeContainerAttribute> } RelativeContainer
933   * @syscap SystemCapability.ArkUI.ArkUI.Full
934   * @crossplatform
935   * @atomicservice
936   * @since 12
937   */
938  type RelativeContainer = TypedFrameNode<RelativeContainerInterface, RelativeContainerAttribute>;
939
940  /**
941   * Create a FrameNode of RelativeContainer type.
942   *
943   * @param { UIContext } context - uiContext used to create the FrameNode.
944   * @param { 'RelativeContainer' } nodeType - node type.
945   * @returns { RelativeContainer } - Return RelativeContainer type FrameNode.
946   * @syscap SystemCapability.ArkUI.ArkUI.Full
947   * @atomicservice
948   * @since 12
949   */
950  function createNode(context: UIContext, nodeType: 'RelativeContainer'): RelativeContainer;
951
952  /**
953   * Define the FrameNode type for Divider.
954   *
955   * @typedef { TypedFrameNode<DividerInterface, DividerAttribute> } Divider
956   * @syscap SystemCapability.ArkUI.ArkUI.Full
957   * @crossplatform
958   * @atomicservice
959   * @since 12
960   */
961  type Divider = TypedFrameNode<DividerInterface, DividerAttribute>;
962
963  /**
964   * Create a FrameNode of Divider type.
965   *
966   * @param { UIContext } context - uiContext used to create the FrameNode.
967   * @param { 'Divider' } nodeType - node type.
968   * @returns { Divider } - Return Divider type FrameNode.
969   * @syscap SystemCapability.ArkUI.ArkUI.Full
970   * @atomicservice
971   * @since 12
972   */
973  function createNode(context: UIContext, nodeType: 'Divider'): Divider;
974
975  /**
976   * Define the FrameNode type for LoadingProgress.
977   *
978   * @typedef { TypedFrameNode<LoadingProgressInterface, LoadingProgressAttribute> } LoadingProgress
979   * @syscap SystemCapability.ArkUI.ArkUI.Full
980   * @crossplatform
981   * @atomicservice
982   * @since 12
983   */
984  type LoadingProgress = TypedFrameNode<LoadingProgressInterface, LoadingProgressAttribute>;
985
986  /**
987   * Create a FrameNode of LoadingProgress type.
988   *
989   * @param { UIContext } context - uiContext used to create the FrameNode.
990   * @param { 'LoadingProgress' } nodeType - node type.
991   * @returns { LoadingProgress } - Return LoadingProgress type FrameNode.
992   * @syscap SystemCapability.ArkUI.ArkUI.Full
993   * @atomicservice
994   * @since 12
995   */
996  function createNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress;
997
998  /**
999   * Define the FrameNode type for Search.
1000   *
1001   * @typedef { TypedFrameNode<SearchInterface, SearchAttribute> } Search
1002   * @syscap SystemCapability.ArkUI.ArkUI.Full
1003   * @crossplatform
1004   * @atomicservice
1005   * @since 12
1006   */
1007  type Search = TypedFrameNode<SearchInterface, SearchAttribute>;
1008
1009  /**
1010   * Create a FrameNode of Search type.
1011   *
1012   * @param { UIContext } context - uiContext used to create the FrameNode.
1013   * @param { 'Search' } nodeType - node type.
1014   * @returns { Search } - Return Search type FrameNode.
1015   * @syscap SystemCapability.ArkUI.ArkUI.Full
1016   * @atomicservice
1017   * @since 12
1018   */
1019  function createNode(context: UIContext, nodeType: 'Search'): Search;
1020
1021  /**
1022   * Define the FrameNode type for Blank.
1023   *
1024   * @typedef { TypedFrameNode<BlankInterface, BlankAttribute> } Blank
1025   * @syscap SystemCapability.ArkUI.ArkUI.Full
1026   * @crossplatform
1027   * @atomicservice
1028   * @since 12
1029   */
1030  type Blank = TypedFrameNode<BlankInterface, BlankAttribute>;
1031
1032  /**
1033   * Create a FrameNode of Blank type.
1034   *
1035   * @param { UIContext } context - uiContext used to create the FrameNode.
1036   * @param { 'Blank' } nodeType - node type.
1037   * @returns { Blank } - Return Blank type FrameNode.
1038   * @syscap SystemCapability.ArkUI.ArkUI.Full
1039   * @atomicservice
1040   * @since 12
1041   */
1042  function createNode(context: UIContext, nodeType: 'Blank'): Blank;
1043
1044  /**
1045   * Define the FrameNode type for Image.
1046   *
1047   * @typedef { TypedFrameNode<ImageInterface, ImageAttribute> } Image
1048   * @syscap SystemCapability.ArkUI.ArkUI.Full
1049   * @crossplatform
1050   * @atomicservice
1051   * @since 12
1052   */
1053  type Image = TypedFrameNode<ImageInterface, ImageAttribute>;
1054
1055  /**
1056   * Create a FrameNode of Image type.
1057   *
1058   * @param { UIContext } context - uiContext used to create the FrameNode.
1059   * @param { 'Image' } nodeType - node type.
1060   * @returns { Image } - Return Image type FrameNode.
1061   * @syscap SystemCapability.ArkUI.ArkUI.Full
1062   * @atomicservice
1063   * @since 12
1064   */
1065  function createNode(context: UIContext, nodeType: 'Image'): Image;
1066
1067  /**
1068   * Define the FrameNode type for List.
1069   *
1070   * @typedef { TypedFrameNode<ListInterface, ListAttribute> } List
1071   * @syscap SystemCapability.ArkUI.ArkUI.Full
1072   * @crossplatform
1073   * @atomicservice
1074   * @since 12
1075   */
1076  type List = TypedFrameNode<ListInterface, ListAttribute>;
1077
1078  /**
1079   * Create a FrameNode of List type.
1080   *
1081   * @param { UIContext } context - uiContext used to create the FrameNode.
1082   * @param { 'List' } nodeType - node type.
1083   * @returns { List } - Return List type FrameNode.
1084   * @syscap SystemCapability.ArkUI.ArkUI.Full
1085   * @atomicservice
1086   * @since 12
1087   */
1088  function createNode(context: UIContext, nodeType: 'List'): List;
1089
1090  /**
1091   * Define the FrameNode type for ListItem.
1092   *
1093   * @typedef { TypedFrameNode<ListItemInterface, ListItemAttribute> } ListItem
1094   * @syscap SystemCapability.ArkUI.ArkUI.Full
1095   * @crossplatform
1096   * @atomicservice
1097   * @since 12
1098   */
1099  type ListItem = TypedFrameNode<ListItemInterface, ListItemAttribute>;
1100
1101  /**
1102   * Create a FrameNode of ListItem type.
1103   *
1104   * @param { UIContext } context - uiContext used to create the FrameNode.
1105   * @param { 'ListItem' } nodeType - node type.
1106   * @returns { ListItem } - Return ListItem type FrameNode.
1107   * @syscap SystemCapability.ArkUI.ArkUI.Full
1108   * @atomicservice
1109   * @since 12
1110   */
1111  function createNode(context: UIContext, nodeType: 'ListItem'): ListItem;
1112
1113  /**
1114   * Define the FrameNode type for TextInput.
1115   *
1116   * @typedef { TypedFrameNode<TextInputInterface, TextInputAttribute> } TextInput
1117   * @syscap SystemCapability.ArkUI.ArkUI.Full
1118   * @crossplatform
1119   * @atomicservice
1120   * @since 12
1121   */
1122  type TextInput = TypedFrameNode<TextInputInterface, TextInputAttribute>;
1123
1124  /**
1125   * Create a FrameNode of TextInput type.
1126   *
1127   * @param { UIContext } context - uiContext used to create the FrameNode.
1128   * @param { 'TextInput' } nodeType - node type.
1129   * @returns { TextInput } - Return TextInput type FrameNode.
1130   * @syscap SystemCapability.ArkUI.ArkUI.Full
1131   * @atomicservice
1132   * @since 12
1133   */
1134  function createNode(context: UIContext, nodeType: 'TextInput'): TextInput;
1135
1136  /**
1137   * Define the FrameNode type for Button.
1138   *
1139   * @typedef { TypedFrameNode<ButtonInterface, ButtonAttribute> } Button
1140   * @syscap SystemCapability.ArkUI.ArkUI.Full
1141   * @crossplatform
1142   * @atomicservice
1143   * @since 12
1144   */
1145  type Button = TypedFrameNode<ButtonInterface, ButtonAttribute>;
1146
1147  /**
1148   * Create a FrameNode of Button type.
1149   *
1150   * @param { UIContext } context - uiContext used to create the FrameNode.
1151   * @param { 'Button' } nodeType - node type.
1152   * @returns { Button } - Return Button type FrameNode.
1153   * @syscap SystemCapability.ArkUI.ArkUI.Full
1154   * @atomicservice
1155   * @since 12
1156   */
1157  function createNode(context: UIContext, nodeType: 'Button'): Button;
1158
1159  /**
1160   * Define the FrameNode type for ListItemGroup.
1161   *
1162   * @typedef { TypedFrameNode<ListItemGroupInterface, ListItemGroupAttribute> } ListItemGroup
1163   * @syscap SystemCapability.ArkUI.ArkUI.Full
1164   * @crossplatform
1165   * @atomicservice
1166   * @since 12
1167   */
1168  type ListItemGroup = TypedFrameNode<ListItemGroupInterface, ListItemGroupAttribute>;
1169
1170  /**
1171   * Create a FrameNode of ListItemGroup type.
1172   *
1173   * @param { UIContext } context - uiContext used to create the FrameNode.
1174   * @param { 'ListItemGroup' } nodeType - node type.
1175   * @returns { ListItemGroup } - Return ListItemGroup type FrameNode.
1176   * @syscap SystemCapability.ArkUI.ArkUI.Full
1177   * @atomicservice
1178   * @since 12
1179   */
1180  function createNode(context: UIContext, nodeType: 'ListItemGroup'): ListItemGroup;
1181
1182  /**
1183   * Define the FrameNode type for WaterFlow.
1184   *
1185   * @typedef { TypedFrameNode<WaterFlowInterface, WaterFlowAttribute> } WaterFlow
1186   * @syscap SystemCapability.ArkUI.ArkUI.Full
1187   * @crossplatform
1188   * @atomicservice
1189   * @since 12
1190   */
1191  type WaterFlow = TypedFrameNode<WaterFlowInterface, WaterFlowAttribute>;
1192
1193  /**
1194   * Create a FrameNode of WaterFlow type.
1195   *
1196   * @param { UIContext } context - uiContext used to create the FrameNode.
1197   * @param { 'WaterFlow' } nodeType - node type.
1198   * @returns { WaterFlow } - Return WaterFlow type FrameNode.
1199   * @syscap SystemCapability.ArkUI.ArkUI.Full
1200   * @atomicservice
1201   * @since 12
1202   */
1203  function createNode(context: UIContext, nodeType: 'WaterFlow'): WaterFlow;
1204
1205  /**
1206   * Define the FrameNode type for FlowItem.
1207   *
1208   * @typedef { TypedFrameNode<FlowItemInterface, FlowItemAttribute> } FlowItem
1209   * @syscap SystemCapability.ArkUI.ArkUI.Full
1210   * @crossplatform
1211   * @atomicservice
1212   * @since 12
1213   */
1214  type FlowItem = TypedFrameNode<FlowItemInterface, FlowItemAttribute>;
1215
1216  /**
1217   * Create a FrameNode of FlowItem type.
1218   *
1219   * @param { UIContext } context - uiContext used to create the FrameNode.
1220   * @param { 'FlowItem' } nodeType - node type.
1221   * @returns { FlowItem } - Return FlowItem type FrameNode.
1222   * @syscap SystemCapability.ArkUI.ArkUI.Full
1223   * @atomicservice
1224   * @since 12
1225   */
1226  function createNode(context: UIContext, nodeType: 'FlowItem'): FlowItem;
1227
1228  /**
1229   * Define the FrameNode type for XComponent.
1230   *
1231   * @typedef { TypedFrameNode<XComponentInterface, XComponentAttribute> } XComponent
1232   * @syscap SystemCapability.ArkUI.ArkUI.Full
1233   * @crossplatform
1234   * @atomicservice
1235   * @since 12
1236   */
1237  type XComponent = TypedFrameNode<XComponentInterface, XComponentAttribute>;
1238
1239  /**
1240   * Create a FrameNode of XComponent type.
1241   *
1242   * @param { UIContext } context - uiContext used to create the FrameNode.
1243   * @param { 'XComponent' } nodeType - node type.
1244   * @returns { XComponent } - Return XComponent type FrameNode.
1245   * @syscap SystemCapability.ArkUI.ArkUI.Full
1246   * @atomicservice
1247   * @since 12
1248   */
1249  function createNode(context: UIContext, nodeType: 'XComponent'): XComponent;
1250
1251  /**
1252   * Create a FrameNode of XComponent type with options.
1253   *
1254   * @param { UIContext } context - uiContext used to create the FrameNode.
1255   * @param { 'XComponent' } nodeType - node type.
1256   * @param { XComponentOptions } options - initialization parameters.
1257   * @returns { XComponent } - Return XComponent type FrameNode.
1258   * @syscap SystemCapability.ArkUI.ArkUI.Full
1259   * @atomicservice
1260   * @since 12
1261   */
1262  function createNode(context: UIContext, nodeType: 'XComponent', options: XComponentOptions): XComponent;
1263
1264  /**
1265   * Define the FrameNode type for Marquee.
1266   *
1267   * @typedef { TypedFrameNode<MarqueeInterface, MarqueeAttribute> } Marquee
1268   * @syscap SystemCapability.ArkUI.ArkUI.Full
1269   * @crossplatform
1270   * @atomicservice
1271   * @since 14
1272   */
1273  type Marquee = TypedFrameNode<MarqueeInterface, MarqueeAttribute>;
1274
1275  /**
1276   * Create a FrameNode of Marquee type.
1277   *
1278   * @param { UIContext } context - uiContext used to create the FrameNode.
1279   * @param { 'Marquee' } nodeType - node type.
1280   * @returns { Marquee } - Return Marquee type FrameNode.
1281   * @syscap SystemCapability.ArkUI.ArkUI.Full
1282   * @atomicservice
1283   * @since 14
1284   */
1285  function createNode(context: UIContext, nodeType: 'Marquee'): Marquee;
1286
1287  /**
1288   * Define the FrameNode type for TextArea.
1289   *
1290   * @typedef { TypedFrameNode<TextAreaInterface, TextAreaAttribute> } TextArea
1291   * @syscap SystemCapability.ArkUI.ArkUI.Full
1292   * @crossplatform
1293   * @atomicservice
1294   * @since 14
1295   */
1296  type TextArea = TypedFrameNode<TextAreaInterface, TextAreaAttribute>;
1297
1298  /**
1299   * Create a FrameNode of TextArea type.
1300   *
1301   * @param { UIContext } context - uiContext used to create the FrameNode.
1302   * @param { 'TextArea' } nodeType - node type.
1303   * @returns { TextArea } - Return TextArea type FrameNode.
1304   * @syscap SystemCapability.ArkUI.ArkUI.Full
1305   * @atomicservice
1306   * @since 14
1307   */
1308  function createNode(context: UIContext, nodeType: 'TextArea'): TextArea;
1309
1310  /**
1311   * Define the FrameNode type for SymbolGlyph.
1312   *
1313   * @typedef { TypedFrameNode<SymbolGlyphInterface, SymbolGlyphAttribute> } SymbolGlyph
1314   * @syscap SystemCapability.ArkUI.ArkUI.Full
1315   * @crossplatform
1316   * @atomicservice
1317   * @since 14
1318   */
1319  type SymbolGlyph = TypedFrameNode<SymbolGlyphInterface, SymbolGlyphAttribute>;
1320
1321  /**
1322   * Create a FrameNode of SymbolGlyph type.
1323   *
1324   * @param { UIContext } context - uiContext used to create the FrameNode.
1325   * @param { 'SymbolGlyph' } nodeType - node type.
1326   * @returns { SymbolGlyph } - Return SymbolGlyph type FrameNode.
1327   * @syscap SystemCapability.ArkUI.ArkUI.Full
1328   * @atomicservice
1329   * @since 14
1330   */
1331  function createNode(context: UIContext, nodeType: 'SymbolGlyph'): SymbolGlyph;
1332
1333  /**
1334   * Define the FrameNode type for QRCode.
1335   *
1336   * @typedef { TypedFrameNode<QRCodeInterface, QRCodeAttribute> } QRCode
1337   * @syscap SystemCapability.ArkUI.ArkUI.Full
1338   * @crossplatform
1339   * @atomicservice
1340   * @since 14
1341   */
1342  type QRCode = TypedFrameNode<QRCodeInterface, QRCodeAttribute>;
1343
1344  /**
1345   * Create a FrameNode of QRCode type.
1346   *
1347   * @param { UIContext } context - uiContext used to create the FrameNode.
1348   * @param { 'QRCode' } nodeType - node type.
1349   * @returns { QRCode } - Return QRCode type FrameNode.
1350   * @syscap SystemCapability.ArkUI.ArkUI.Full
1351   * @atomicservice
1352   * @since 14
1353   */
1354  function createNode(context: UIContext, nodeType: 'QRCode'): QRCode;
1355
1356  /**
1357   * Define the FrameNode type for Badge.
1358   *
1359   * @typedef { TypedFrameNode<BadgeInterface, BadgeAttribute> } Badge
1360   * @syscap SystemCapability.ArkUI.ArkUI.Full
1361   * @crossplatform
1362   * @atomicservice
1363   * @since 14
1364   */
1365  type Badge = TypedFrameNode<BadgeInterface, BadgeAttribute>;
1366
1367  /**
1368   * Create a FrameNode of Badge type.
1369   *
1370   * @param { UIContext } context - uiContext used to create the FrameNode.
1371   * @param { 'Badge' } nodeType - node type.
1372   * @returns { Badge } - Return Badge type FrameNode.
1373   * @syscap SystemCapability.ArkUI.ArkUI.Full
1374   * @atomicservice
1375   * @since 14
1376   */
1377  function createNode(context: UIContext, nodeType: 'Badge'): Badge;
1378
1379  /**
1380   * Define the FrameNode type for TextClock.
1381   *
1382   * @typedef { TypedFrameNode<TextClockInterface, TextClockAttribute> } TextClock
1383   * @syscap SystemCapability.ArkUI.ArkUI.Full
1384   * @crossplatform
1385   * @atomicservice
1386   * @since 14
1387   */
1388  type TextClock = TypedFrameNode<TextClockInterface, TextClockAttribute>;
1389
1390  /**
1391   * Create a FrameNode of TextClock type.
1392   *
1393   * @param { UIContext } context - uiContext used to create the FrameNode.
1394   * @param { 'TextClock' } nodeType - node type.
1395   * @returns { TextClock } - Return TextClock type FrameNode.
1396   * @syscap SystemCapability.ArkUI.ArkUI.Full
1397   * @atomicservice
1398   * @since 14
1399   */
1400  function createNode(context: UIContext, nodeType: 'TextClock'): TextClock;
1401
1402  /**
1403   * Define the FrameNode type for TextTimer.
1404   *
1405   * @typedef { TypedFrameNode<TextTimerInterface, TextTimerAttribute> } TextTimer
1406   * @syscap SystemCapability.ArkUI.ArkUI.Full
1407   * @crossplatform
1408   * @atomicservice
1409   * @since 14
1410   */
1411  type TextTimer = TypedFrameNode<TextTimerInterface, TextTimerAttribute>;
1412
1413  /**
1414   * Create a FrameNode of TextTimer type.
1415   *
1416   * @param { UIContext } context - uiContext used to create the FrameNode.
1417   * @param { 'TextTimer' } nodeType - node type.
1418   * @returns { TextTimer } - Return TextTimer type FrameNode.
1419   * @syscap SystemCapability.ArkUI.ArkUI.Full
1420   * @atomicservice
1421   * @since 14
1422   */
1423  function createNode(context: UIContext, nodeType: 'TextTimer'): TextTimer;
1424
1425  /**
1426   * Define the FrameNode type for Grid.
1427   *
1428   * @typedef { TypedFrameNode<GridInterface, GridAttribute> } Grid
1429   * @syscap SystemCapability.ArkUI.ArkUI.Full
1430   * @crossplatform
1431   * @atomicservice
1432   * @since 14
1433   */
1434  type Grid = TypedFrameNode<GridInterface, GridAttribute>;
1435
1436  /**
1437   * Create a FrameNode of Grid type.
1438   *
1439   * @param { UIContext } context - uiContext used to create the FrameNode.
1440   * @param { 'Grid' } nodeType - node type.
1441   * @returns { Grid } - Return Grid type FrameNode.
1442   * @syscap SystemCapability.ArkUI.ArkUI.Full
1443   * @atomicservice
1444   * @since 14
1445   */
1446  function createNode(context: UIContext, nodeType: 'Grid'): Grid;
1447
1448  /**
1449   * Define the FrameNode type for GridItem.
1450   *
1451   * @typedef { TypedFrameNode<GridItemInterface, GridItemAttribute> } GridItem
1452   * @syscap SystemCapability.ArkUI.ArkUI.Full
1453   * @crossplatform
1454   * @atomicservice
1455   * @since 14
1456   */
1457  type GridItem = TypedFrameNode<GridItemInterface, GridItemAttribute>;
1458
1459  /**
1460   * Create a FrameNode of GridItem type.
1461   *
1462   * @param { UIContext } context - uiContext used to create the FrameNode.
1463   * @param { 'GridItem' } nodeType - node type.
1464   * @returns { GridItem } - Return GridItem type FrameNode.
1465   * @syscap SystemCapability.ArkUI.ArkUI.Full
1466   * @atomicservice
1467   * @since 14
1468   */
1469  function createNode(context: UIContext, nodeType: 'GridItem'): GridItem;
1470}
1471
1472/**
1473 * Used for lazy loading of typeNode.
1474 *
1475 * @syscap SystemCapability.ArkUI.ArkUI.Full
1476 * @crossplatform
1477 * @atomicservice
1478 * @since 12
1479 */
1480declare class NodeAdapter {
1481  /**
1482   * Constructor.
1483   *
1484   * @syscap SystemCapability.ArkUI.ArkUI.Full
1485   * @crossplatform
1486   * @atomicservice
1487   * @since 12
1488   */
1489  constructor();
1490  /**
1491   * Dispose the NodeAdapter immediately.
1492   *
1493   * @syscap SystemCapability.ArkUI.ArkUI.Full
1494   * @crossplatform
1495   * @atomicservice
1496   * @since 12
1497   */
1498  dispose(): void;
1499  /**
1500   * Set the total number of node count.
1501   *
1502   * @param { number } count - The total number of node count.
1503   * @syscap SystemCapability.ArkUI.ArkUI.Full
1504   * @crossplatform
1505   * @atomicservice
1506   * @since 12
1507   */
1508  set totalNodeCount(count: number);
1509  /**
1510   * Get the total number of node count.
1511   *
1512   * @returns { number } - Return the total number of node count.
1513   * @syscap SystemCapability.ArkUI.ArkUI.Full
1514   * @crossplatform
1515   * @atomicservice
1516   * @since 12
1517   */
1518  get totalNodeCount(): number;
1519  /**
1520   * Define the operation of reloading all data.
1521   *
1522   * @syscap SystemCapability.ArkUI.ArkUI.Full
1523   * @crossplatform
1524   * @atomicservice
1525   * @since 12
1526   */
1527  reloadAllItems(): void;
1528  /**
1529   * Define the data reload operation.Reload a specified amount of data starting from the index value.
1530   *
1531   * @param { number } start - Start loading index values for data.
1532   * @param { number } count - Load the number of data.
1533   * @syscap SystemCapability.ArkUI.ArkUI.Full
1534   * @crossplatform
1535   * @atomicservice
1536   * @since 12
1537   */
1538  reloadItem(start: number, count: number): void;
1539  /**
1540   * Define data deletion operations.Delete a specified amount of data starting from the index value.
1541   *
1542   * @param { number } start - Start deleting index values for data.
1543   * @param { number } count - Delete the number of data.
1544   * @syscap SystemCapability.ArkUI.ArkUI.Full
1545   * @crossplatform
1546   * @atomicservice
1547   * @since 12
1548   */
1549  removeItem(start: number, count: number): void;
1550  /**
1551   * Define data insertion operations.Insert a specified amount of data starting from the index value.
1552   *
1553   * @param { number } start - Start Insert index values for data.
1554   * @param { number } count - Insert the number of data.
1555   * @syscap SystemCapability.ArkUI.ArkUI.Full
1556   * @crossplatform
1557   * @atomicservice
1558   * @since 12
1559   */
1560  insertItem(start: number, count: number): void;
1561  /**
1562   * Define data movement operations. Move data from the starting index to the ending index.
1563   *
1564   * @param { number } from - Starting index value.
1565   * @param { number } to - End index value.
1566   * @syscap SystemCapability.ArkUI.ArkUI.Full
1567   * @crossplatform
1568   * @atomicservice
1569   * @since 12
1570   */
1571  moveItem(from: number, to: number): void;
1572  /**
1573   * Obtain all data results.
1574   *
1575   * @returns { Array<FrameNode> } - Return all valid FrameNode collections.
1576   * @syscap SystemCapability.ArkUI.ArkUI.Full
1577   * @crossplatform
1578   * @atomicservice
1579   * @since 12
1580   */
1581  getAllAvailableItems(): Array<FrameNode>;
1582  /**
1583   * This callback will be triggered when a FrameNode is bound.
1584   *
1585   * @param { FrameNode } target - The bound FrameNode node.
1586   * @syscap SystemCapability.ArkUI.ArkUI.Full
1587   * @crossplatform
1588   * @atomicservice
1589   * @since 12
1590   */
1591  onAttachToNode?(target: FrameNode): void;
1592  /**
1593   * This callback will be triggered when the binding is released.
1594   *
1595   * @syscap SystemCapability.ArkUI.ArkUI.Full
1596   * @crossplatform
1597   * @atomicservice
1598   * @since 12
1599   */
1600  onDetachFromNode?(): void;
1601  /**
1602   * Call this callback when loading for the first time or when a new node slides in.Used to generate custom IDs, developers need to ensure the uniqueness of the IDs themselves.
1603   *
1604   * @param { number } index - Load the index value of the data.
1605   * @returns { number } - Returning the developer's custom ID requires the developer to ensure its uniqueness.
1606   * @syscap SystemCapability.ArkUI.ArkUI.Full
1607   * @crossplatform
1608   * @atomicservice
1609   * @since 12
1610   */
1611  onGetChildId?(index: number): number;
1612  /**
1613   * Call this callback when loading for the first time or when a new node slides in.
1614   *
1615   * @param { number } index - Load the index value of the data.
1616   * @returns { FrameNode } - Returns the FrameNode node that loads the node.
1617   * @syscap SystemCapability.ArkUI.ArkUI.Full
1618   * @crossplatform
1619   * @atomicservice
1620   * @since 12
1621   */
1622  onCreateChild?(index: number): FrameNode;
1623  /**
1624   * Called when the child node is about to be destroyed.
1625   *
1626   * @param { number } id - The child node ID that is about to be destroyed.
1627   * @param { FrameNode } node - The FrameNode node that is about to be destroyed.
1628   * @syscap SystemCapability.ArkUI.ArkUI.Full
1629   * @crossplatform
1630   * @atomicservice
1631   * @since 12
1632   */
1633  onDisposeChild?(id: number, node: FrameNode): void;
1634  /**
1635   * Call this callback when reloading or reusing.
1636   *
1637   * @param { number } id - The index value of the reloaded data.
1638   * @param { FrameNode } node - Reused FrameNode nodes.
1639   * @syscap SystemCapability.ArkUI.ArkUI.Full
1640   * @crossplatform
1641   * @atomicservice
1642   * @since 12
1643   */
1644  onUpdateChild?(id: number, node: FrameNode): void;
1645  /**
1646   * Add a NodeAdapter to bind to the node.A node can only be bound to one NodeAdapter. Binding failure returns false.
1647   *
1648   * @param { NodeAdapter } adapter - Define lazy loading classes.
1649   * @param { FrameNode } node - The bound FrameNode node.
1650   * @returns { boolean } Return the binding result.
1651   * @syscap SystemCapability.ArkUI.ArkUI.Full
1652   * @crossplatform
1653   * @atomicservice
1654   * @since 12
1655   */
1656  static attachNodeAdapter(adapter: NodeAdapter, node: FrameNode): boolean;
1657  /**
1658   * Remove the bound NodeAdapter from the node.A node can only be bound to one NodeAdapter.
1659   *
1660   * @param { FrameNode } node - Unbind the FrameNode node.
1661   * @syscap SystemCapability.ArkUI.ArkUI.Full
1662   * @crossplatform
1663   * @atomicservice
1664   * @since 12
1665   */
1666  static detachNodeAdapter(node: FrameNode): void;
1667}