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 the CommonAttribute of the current FrameNode. 465 * 466 * @returns { CommonAttribute } - Returns the CommonAttribute which is used to modify the common attributes of the FrameNode. 467 * @syscap SystemCapability.ArkUI.ArkUI.Full 468 * @crossplatform 469 * @atomicservice 470 * @since 12 471 */ 472 get commonAttribute(): CommonAttribute; 473 474 /** 475 * Draw Method. Executed when the current FrameNode is rendering its content. 476 * 477 * @param { DrawContext } context - The DrawContext will be used when executed draw method. 478 * @syscap SystemCapability.ArkUI.ArkUI.Full 479 * @crossplatform 480 * @atomicservice 481 * @since 12 482 */ 483 onDraw?(context: DrawContext): void; 484 485 /** 486 * Method to measure the FrameNode and its content to determine the measured size. Use this method to override the 487 * default measure method when measuring the FrameNode. 488 * 489 * @param { LayoutConstraint } constraint - The layout constraint of the node, will be used when executed measure 490 * method. 491 * @syscap SystemCapability.ArkUI.ArkUI.Full 492 * @crossplatform 493 * @atomicservice 494 * @since 12 495 */ 496 onMeasure(constraint: LayoutConstraint): void; 497 498 /** 499 * Method to assign a position to the FrameNode and each of its children. Use this method to override the 500 * default layout method. 501 * 502 * @param { Position } position - The position of the node, will be used when executed layout method. 503 * @syscap SystemCapability.ArkUI.ArkUI.Full 504 * @crossplatform 505 * @atomicservice 506 * @since 12 507 */ 508 onLayout(position: Position): void; 509 510 /** 511 * Set the size of the FrameNode after measure, with unit PX. 512 * 513 * @param { Size } size - The size of the FrameNode after measure. 514 * @syscap SystemCapability.ArkUI.ArkUI.Full 515 * @crossplatform 516 * @atomicservice 517 * @since 12 518 */ 519 setMeasuredSize(size: Size): void; 520 521 /** 522 * Set the position to the parent of the FrameNode after layout, with unit PX. 523 * 524 * @param { Position } position - The position to the parent of the FrameNode after layout. 525 * @syscap SystemCapability.ArkUI.ArkUI.Full 526 * @crossplatform 527 * @atomicservice 528 * @since 12 529 */ 530 setLayoutPosition(position: Position): void; 531 532 /** 533 * This is called to find out how big the FrameNode should be. The parent node supplies constraint information. The 534 * actual measurement work of the FrameNode is performed in onMeasure or the default measure method. 535 * 536 * @param { LayoutConstraint } constraint - The layout constraint of the node, supplied by the parent node. 537 * @syscap SystemCapability.ArkUI.ArkUI.Full 538 * @crossplatform 539 * @atomicservice 540 * @since 12 541 */ 542 measure(constraint: LayoutConstraint): void; 543 544 /** 545 * This is called to assign position to the FrameNode and all of its descendants. The position is used to init 546 * the position of the frameNode, and the actual layout work of FrameNode is performed in onLayout or the default 547 * layout method. 548 * 549 * @param { Position } position - The position of the node, will be used when executed the layout method. 550 * @syscap SystemCapability.ArkUI.ArkUI.Full 551 * @crossplatform 552 * @atomicservice 553 * @since 12 554 */ 555 layout(position: Position): void; 556 557 /** 558 * Mark the frame node as need layout. 559 * 560 * @syscap SystemCapability.ArkUI.ArkUI.Full 561 * @crossplatform 562 * @atomicservice 563 * @since 12 564 */ 565 setNeedsLayout(): void; 566 567 /** 568 * Invalidate the RenderNode in the FrameNode, which will cause a re-render of the RenderNode. 569 * 570 * @syscap SystemCapability.ArkUI.ArkUI.Full 571 * @crossplatform 572 * @atomicservice 573 * @since 12 574 */ 575 invalidate(): void; 576 577 /** 578 * Get the position of the node relative to screen. 579 * 580 * @returns { Position } - Returns position of the node relative to screen. 581 * @syscap SystemCapability.ArkUI.ArkUI.Full 582 * @crossplatform 583 * @atomicservice 584 * @since 12 585 */ 586 getPositionToScreen(): Position; 587 588 /** 589 * Get the position of the node relative to window with transform. 590 * 591 * @returns { Position } - Returns position of the node relative to window with transform. 592 * @syscap SystemCapability.ArkUI.ArkUI.Full 593 * @crossplatform 594 * @atomicservice 595 * @since 12 596 */ 597 getPositionToWindowWithTransform(): Position; 598 599 /** 600 * Get the position of the node relative to its parent with transform. 601 * 602 * @returns { Position } - Returns position of the node relative to its parent with transform. 603 * @syscap SystemCapability.ArkUI.ArkUI.Full 604 * @crossplatform 605 * @atomicservice 606 * @since 12 607 */ 608 getPositionToParentWithTransform(): Position; 609 610 /** 611 * Get the position of the node relative to screen with transform. 612 * 613 * @returns { Position } - Returns position of the node relative to screen with transform. 614 * @syscap SystemCapability.ArkUI.ArkUI.Full 615 * @crossplatform 616 * @atomicservice 617 * @since 12 618 */ 619 getPositionToScreenWithTransform(): Position; 620 621 /** 622 * Detach from parent and dispose all child recursively. 623 * 624 * @syscap SystemCapability.ArkUI.ArkUI.Full 625 * @crossplatform 626 * @atomicservice 627 * @since 12 628 */ 629 disposeTree(): void; 630 631 /** 632 * Mount ComponentContent to FrameNode. 633 * 634 * @param { ComponentContent<T> } content - Newly added ComponentContent. 635 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 636 * @syscap SystemCapability.ArkUI.ArkUI.Full 637 * @crossplatform 638 * @atomicservice 639 * @since 12 640 */ 641 addComponentContent<T>(content: ComponentContent<T>): void; 642} 643 644/** 645 * Used to define the FrameNode type. 646 * 647 * @interface TypedFrameNode 648 * @extends FrameNode 649 * @syscap SystemCapability.ArkUI.ArkUI.Full 650 * @crossplatform 651 * @atomicservice 652 * @since 12 653 */ 654export interface TypedFrameNode<C, T> extends FrameNode { 655 /** 656 * Initialize FrameNode. 657 * 658 * @type { C } 659 * @syscap SystemCapability.ArkUI.ArkUI.Full 660 * @crossplatform 661 * @atomicservice 662 * @since 12 663 */ 664 initialize: C; 665 /** 666 * Get attribute instance of FrameNode to set attributes. 667 * 668 * @type { T } 669 * @readonly 670 * @syscap SystemCapability.ArkUI.ArkUI.Full 671 * @crossplatform 672 * @atomicservice 673 * @since 12 674 */ 675 readonly attribute: T; 676} 677 678/** 679 * Provides methods to implement FrameNode. 680 * 681 * @namespace typeNode 682 * @syscap SystemCapability.ArkUI.ArkUI.Full 683 * @crossplatform 684 * @atomicservice 685 * @since 12 686 */ 687export namespace typeNode { 688 /** 689 * Define the FrameNode type for Text. 690 * 691 * @typedef { TypedFrameNode<TextInterface, TextAttribute> } Text 692 * @syscap SystemCapability.ArkUI.ArkUI.Full 693 * @crossplatform 694 * @atomicservice 695 * @since 12 696 */ 697 type Text = TypedFrameNode<TextInterface, TextAttribute>; 698 699 /** 700 * Create a FrameNode of Text type. 701 * 702 * @param { UIContext } context - uiContext used to create the FrameNode. 703 * @param { 'Text' } nodeType - node type. 704 * @returns { Text } - Return Text type FrameNode. 705 * @syscap SystemCapability.ArkUI.ArkUI.Full 706 * @atomicservice 707 * @since 12 708 */ 709 function createNode(context: UIContext, nodeType: 'Text'): Text; 710 711 /** 712 * Define the FrameNode type for Column. 713 * 714 * @typedef { TypedFrameNode<ColumnInterface, ColumnAttribute> } Column 715 * @syscap SystemCapability.ArkUI.ArkUI.Full 716 * @crossplatform 717 * @atomicservice 718 * @since 12 719 */ 720 type Column = TypedFrameNode<ColumnInterface, ColumnAttribute>; 721 722 /** 723 * Create a FrameNode of Column type. 724 * 725 * @param { UIContext } context - uiContext used to create the FrameNode. 726 * @param { 'Column' } nodeType - node type. 727 * @returns { Column } - Return Column type FrameNode. 728 * @syscap SystemCapability.ArkUI.ArkUI.Full 729 * @atomicservice 730 * @since 12 731 */ 732 function createNode(context: UIContext, nodeType: 'Column'): Column; 733 734 /** 735 * Define the FrameNode type for Row. 736 * 737 * @typedef { TypedFrameNode<RowInterface, RowAttribute> } Row 738 * @syscap SystemCapability.ArkUI.ArkUI.Full 739 * @crossplatform 740 * @atomicservice 741 * @since 12 742 */ 743 type Row = TypedFrameNode<RowInterface, RowAttribute>; 744 745 /** 746 * Create a FrameNode of Row type. 747 * 748 * @param { UIContext } context - uiContext used to create the FrameNode. 749 * @param { 'Row' } nodeType - node type. 750 * @returns { Row } - Return Row type FrameNode. 751 * @syscap SystemCapability.ArkUI.ArkUI.Full 752 * @atomicservice 753 * @since 12 754 */ 755 function createNode(context: UIContext, nodeType: 'Row'): Row; 756 757 /** 758 * Define the FrameNode type for Stack. 759 * 760 * @typedef { TypedFrameNode<StackInterface, StackAttribute> } Stack 761 * @syscap SystemCapability.ArkUI.ArkUI.Full 762 * @crossplatform 763 * @atomicservice 764 * @since 12 765 */ 766 type Stack = TypedFrameNode<StackInterface, StackAttribute>; 767 768 /** 769 * Create a FrameNode of Stack type. 770 * 771 * @param { UIContext } context - uiContext used to create the FrameNode. 772 * @param { 'Stack' } nodeType - node type. 773 * @returns { Stack } - Return Stack type FrameNode. 774 * @syscap SystemCapability.ArkUI.ArkUI.Full 775 * @atomicservice 776 * @since 12 777 */ 778 function createNode(context: UIContext, nodeType: 'Stack'): Stack; 779 780 /** 781 * Define the FrameNode type for GridRow. 782 * 783 * @typedef { TypedFrameNode<GridRowInterface, GridRowAttribute> } GridRow 784 * @syscap SystemCapability.ArkUI.ArkUI.Full 785 * @crossplatform 786 * @atomicservice 787 * @since 12 788 */ 789 type GridRow = TypedFrameNode<GridRowInterface, GridRowAttribute>; 790 791 /** 792 * Create a FrameNode of GridRow type. 793 * 794 * @param { UIContext } context - uiContext used to create the FrameNode. 795 * @param { 'GridRow' } nodeType - node type. 796 * @returns { GridRow } - Return GridRow type FrameNode. 797 * @syscap SystemCapability.ArkUI.ArkUI.Full 798 * @atomicservice 799 * @since 12 800 */ 801 function createNode(context: UIContext, nodeType: 'GridRow'): GridRow; 802 803 /** 804 * Define the FrameNode type for GridCol. 805 * 806 * @typedef { TypedFrameNode<GridColInterface, GridColAttribute> } GridCol 807 * @syscap SystemCapability.ArkUI.ArkUI.Full 808 * @crossplatform 809 * @atomicservice 810 * @since 12 811 */ 812 type GridCol = TypedFrameNode<GridColInterface, GridColAttribute>; 813 814 /** 815 * Create a FrameNode of GridCol type. 816 * 817 * @param { UIContext } context - uiContext used to create the FrameNode. 818 * @param { 'GridCol' } nodeType - node type. 819 * @returns { GridCol } - Return GridCol type FrameNode. 820 * @syscap SystemCapability.ArkUI.ArkUI.Full 821 * @atomicservice 822 * @since 12 823 */ 824 function createNode(context: UIContext, nodeType: 'GridCol'): GridCol; 825 826 /** 827 * Define the FrameNode type for Flex. 828 * 829 * @typedef { TypedFrameNode<FlexInterface, FlexAttribute> } Flex 830 * @syscap SystemCapability.ArkUI.ArkUI.Full 831 * @crossplatform 832 * @atomicservice 833 * @since 12 834 */ 835 type Flex = TypedFrameNode<FlexInterface, FlexAttribute>; 836 837 /** 838 * Create a FrameNode of Flex type. 839 * 840 * @param { UIContext } context - uiContext used to create the FrameNode. 841 * @param { 'Flex' } nodeType - node type. 842 * @returns { Flex } - Return Flex type FrameNode. 843 * @syscap SystemCapability.ArkUI.ArkUI.Full 844 * @atomicservice 845 * @since 12 846 */ 847 function createNode(context: UIContext, nodeType: 'Flex'): Flex; 848 849 /** 850 * Define the FrameNode type for Swiper. 851 * 852 * @typedef { TypedFrameNode<SwiperInterface, SwiperAttribute> } Swiper 853 * @syscap SystemCapability.ArkUI.ArkUI.Full 854 * @crossplatform 855 * @atomicservice 856 * @since 12 857 */ 858 type Swiper = TypedFrameNode<SwiperInterface, SwiperAttribute>; 859 860 /** 861 * Create a FrameNode of Swiper type. 862 * 863 * @param { UIContext } context - uiContext used to create the FrameNode. 864 * @param { 'Swiper' } nodeType - node type. 865 * @returns { Swiper } - Return Swiper type FrameNode. 866 * @syscap SystemCapability.ArkUI.ArkUI.Full 867 * @atomicservice 868 * @since 12 869 */ 870 function createNode(context: UIContext, nodeType: 'Swiper'): Swiper; 871 872 /** 873 * Define the FrameNode type for Progress. 874 * 875 * @typedef { TypedFrameNode<ProgressInterface, ProgressAttribute> } Progress 876 * @syscap SystemCapability.ArkUI.ArkUI.Full 877 * @crossplatform 878 * @atomicservice 879 * @since 12 880 */ 881 type Progress = TypedFrameNode<ProgressInterface, ProgressAttribute>; 882 883 /** 884 * Create a FrameNode of Progress type. 885 * 886 * @param { UIContext } context - uiContext used to create the FrameNode. 887 * @param { 'Progress' } nodeType - node type. 888 * @returns { Progress } - Return Progress type FrameNode. 889 * @syscap SystemCapability.ArkUI.ArkUI.Full 890 * @atomicservice 891 * @since 12 892 */ 893 function createNode(context: UIContext, nodeType: 'Progress'): Progress; 894 895 /** 896 * Define the FrameNode type for Scroll. 897 * 898 * @typedef { TypedFrameNode<ScrollInterface, ScrollAttribute> } Scroll 899 * @syscap SystemCapability.ArkUI.ArkUI.Full 900 * @crossplatform 901 * @atomicservice 902 * @since 12 903 */ 904 type Scroll = TypedFrameNode<ScrollInterface, ScrollAttribute>; 905 906 /** 907 * Create a FrameNode of Scroll type. 908 * 909 * @param { UIContext } context - uiContext used to create the FrameNode. 910 * @param { 'Scroll' } nodeType - node type. 911 * @returns { Scroll } - Return Scroll type FrameNode. 912 * @syscap SystemCapability.ArkUI.ArkUI.Full 913 * @atomicservice 914 * @since 12 915 */ 916 function createNode(context: UIContext, nodeType: 'Scroll'): Scroll; 917 918 /** 919 * Define the FrameNode type for RelativeContainer. 920 * 921 * @typedef { TypedFrameNode<RelativeContainerInterface, RelativeContainerAttribute> } RelativeContainer 922 * @syscap SystemCapability.ArkUI.ArkUI.Full 923 * @crossplatform 924 * @atomicservice 925 * @since 12 926 */ 927 type RelativeContainer = TypedFrameNode<RelativeContainerInterface, RelativeContainerAttribute>; 928 929 /** 930 * Create a FrameNode of RelativeContainer type. 931 * 932 * @param { UIContext } context - uiContext used to create the FrameNode. 933 * @param { 'RelativeContainer' } nodeType - node type. 934 * @returns { RelativeContainer } - Return RelativeContainer type FrameNode. 935 * @syscap SystemCapability.ArkUI.ArkUI.Full 936 * @atomicservice 937 * @since 12 938 */ 939 function createNode(context: UIContext, nodeType: 'RelativeContainer'): RelativeContainer; 940 941 /** 942 * Define the FrameNode type for Divider. 943 * 944 * @typedef { TypedFrameNode<DividerInterface, DividerAttribute> } Divider 945 * @syscap SystemCapability.ArkUI.ArkUI.Full 946 * @crossplatform 947 * @atomicservice 948 * @since 12 949 */ 950 type Divider = TypedFrameNode<DividerInterface, DividerAttribute>; 951 952 /** 953 * Create a FrameNode of Divider type. 954 * 955 * @param { UIContext } context - uiContext used to create the FrameNode. 956 * @param { 'Divider' } nodeType - node type. 957 * @returns { Divider } - Return Divider type FrameNode. 958 * @syscap SystemCapability.ArkUI.ArkUI.Full 959 * @atomicservice 960 * @since 12 961 */ 962 function createNode(context: UIContext, nodeType: 'Divider'): Divider; 963 964 /** 965 * Define the FrameNode type for LoadingProgress. 966 * 967 * @typedef { TypedFrameNode<LoadingProgressInterface, LoadingProgressAttribute> } LoadingProgress 968 * @syscap SystemCapability.ArkUI.ArkUI.Full 969 * @crossplatform 970 * @atomicservice 971 * @since 12 972 */ 973 type LoadingProgress = TypedFrameNode<LoadingProgressInterface, LoadingProgressAttribute>; 974 975 /** 976 * Create a FrameNode of LoadingProgress type. 977 * 978 * @param { UIContext } context - uiContext used to create the FrameNode. 979 * @param { 'LoadingProgress' } nodeType - node type. 980 * @returns { LoadingProgress } - Return LoadingProgress type FrameNode. 981 * @syscap SystemCapability.ArkUI.ArkUI.Full 982 * @atomicservice 983 * @since 12 984 */ 985 function createNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress; 986 987 /** 988 * Define the FrameNode type for Search. 989 * 990 * @typedef { TypedFrameNode<SearchInterface, SearchAttribute> } Search 991 * @syscap SystemCapability.ArkUI.ArkUI.Full 992 * @crossplatform 993 * @atomicservice 994 * @since 12 995 */ 996 type Search = TypedFrameNode<SearchInterface, SearchAttribute>; 997 998 /** 999 * Create a FrameNode of Search type. 1000 * 1001 * @param { UIContext } context - uiContext used to create the FrameNode. 1002 * @param { 'Search' } nodeType - node type. 1003 * @returns { Search } - Return Search type FrameNode. 1004 * @syscap SystemCapability.ArkUI.ArkUI.Full 1005 * @atomicservice 1006 * @since 12 1007 */ 1008 function createNode(context: UIContext, nodeType: 'Search'): Search; 1009 1010 /** 1011 * Define the FrameNode type for Blank. 1012 * 1013 * @typedef { TypedFrameNode<BlankInterface, BlankAttribute> } Blank 1014 * @syscap SystemCapability.ArkUI.ArkUI.Full 1015 * @crossplatform 1016 * @atomicservice 1017 * @since 12 1018 */ 1019 type Blank = TypedFrameNode<BlankInterface, BlankAttribute>; 1020 1021 /** 1022 * Create a FrameNode of Blank type. 1023 * 1024 * @param { UIContext } context - uiContext used to create the FrameNode. 1025 * @param { 'Blank' } nodeType - node type. 1026 * @returns { Blank } - Return Blank type FrameNode. 1027 * @syscap SystemCapability.ArkUI.ArkUI.Full 1028 * @atomicservice 1029 * @since 12 1030 */ 1031 function createNode(context: UIContext, nodeType: 'Blank'): Blank; 1032 1033 /** 1034 * Define the FrameNode type for Image. 1035 * 1036 * @typedef { TypedFrameNode<ImageInterface, ImageAttribute> } Image 1037 * @syscap SystemCapability.ArkUI.ArkUI.Full 1038 * @crossplatform 1039 * @atomicservice 1040 * @since 12 1041 */ 1042 type Image = TypedFrameNode<ImageInterface, ImageAttribute>; 1043 1044 /** 1045 * Create a FrameNode of Image type. 1046 * 1047 * @param { UIContext } context - uiContext used to create the FrameNode. 1048 * @param { 'Image' } nodeType - node type. 1049 * @returns { Image } - Return Image type FrameNode. 1050 * @syscap SystemCapability.ArkUI.ArkUI.Full 1051 * @atomicservice 1052 * @since 12 1053 */ 1054 function createNode(context: UIContext, nodeType: 'Image'): Image; 1055 1056 /** 1057 * Define the FrameNode type for List. 1058 * 1059 * @typedef { TypedFrameNode<ListInterface, ListAttribute> } List 1060 * @syscap SystemCapability.ArkUI.ArkUI.Full 1061 * @crossplatform 1062 * @atomicservice 1063 * @since 12 1064 */ 1065 type List = TypedFrameNode<ListInterface, ListAttribute>; 1066 1067 /** 1068 * Create a FrameNode of List type. 1069 * 1070 * @param { UIContext } context - uiContext used to create the FrameNode. 1071 * @param { 'List' } nodeType - node type. 1072 * @returns { List } - Return List type FrameNode. 1073 * @syscap SystemCapability.ArkUI.ArkUI.Full 1074 * @atomicservice 1075 * @since 12 1076 */ 1077 function createNode(context: UIContext, nodeType: 'List'): List; 1078 1079 /** 1080 * Define the FrameNode type for ListItem. 1081 * 1082 * @typedef { TypedFrameNode<ListItemInterface, ListItemAttribute> } ListItem 1083 * @syscap SystemCapability.ArkUI.ArkUI.Full 1084 * @crossplatform 1085 * @atomicservice 1086 * @since 12 1087 */ 1088 type ListItem = TypedFrameNode<ListItemInterface, ListItemAttribute>; 1089 1090 /** 1091 * Create a FrameNode of ListItem type. 1092 * 1093 * @param { UIContext } context - uiContext used to create the FrameNode. 1094 * @param { 'ListItem' } nodeType - node type. 1095 * @returns { ListItem } - Return ListItem type FrameNode. 1096 * @syscap SystemCapability.ArkUI.ArkUI.Full 1097 * @atomicservice 1098 * @since 12 1099 */ 1100 function createNode(context: UIContext, nodeType: 'ListItem'): ListItem; 1101 1102 /** 1103 * Define the FrameNode type for TextInput. 1104 * 1105 * @typedef { TypedFrameNode<TextInputInterface, TextInputAttribute> } TextInput 1106 * @syscap SystemCapability.ArkUI.ArkUI.Full 1107 * @crossplatform 1108 * @atomicservice 1109 * @since 12 1110 */ 1111 type TextInput = TypedFrameNode<TextInputInterface, TextInputAttribute>; 1112 1113 /** 1114 * Create a FrameNode of TextInput type. 1115 * 1116 * @param { UIContext } context - uiContext used to create the FrameNode. 1117 * @param { 'TextInput' } nodeType - node type. 1118 * @returns { TextInput } - Return TextInput type FrameNode. 1119 * @syscap SystemCapability.ArkUI.ArkUI.Full 1120 * @atomicservice 1121 * @since 12 1122 */ 1123 function createNode(context: UIContext, nodeType: 'TextInput'): TextInput; 1124 1125 /** 1126 * Define the FrameNode type for Button. 1127 * 1128 * @typedef { TypedFrameNode<ButtonInterface, ButtonAttribute> } Button 1129 * @syscap SystemCapability.ArkUI.ArkUI.Full 1130 * @crossplatform 1131 * @atomicservice 1132 * @since 12 1133 */ 1134 type Button = TypedFrameNode<ButtonInterface, ButtonAttribute>; 1135 1136 /** 1137 * Create a FrameNode of Button type. 1138 * 1139 * @param { UIContext } context - uiContext used to create the FrameNode. 1140 * @param { 'Button' } nodeType - node type. 1141 * @returns { Button } - Return Button type FrameNode. 1142 * @syscap SystemCapability.ArkUI.ArkUI.Full 1143 * @atomicservice 1144 * @since 12 1145 */ 1146 function createNode(context: UIContext, nodeType: 'Button'): Button; 1147 1148 /** 1149 * Define the FrameNode type for ListItemGroup. 1150 * 1151 * @typedef { TypedFrameNode<ListItemGroupInterface, ListItemGroupAttribute> } ListItemGroup 1152 * @syscap SystemCapability.ArkUI.ArkUI.Full 1153 * @crossplatform 1154 * @atomicservice 1155 * @since 12 1156 */ 1157 type ListItemGroup = TypedFrameNode<ListItemGroupInterface, ListItemGroupAttribute>; 1158 1159 /** 1160 * Create a FrameNode of ListItemGroup type. 1161 * 1162 * @param { UIContext } context - uiContext used to create the FrameNode. 1163 * @param { 'ListItemGroup' } nodeType - node type. 1164 * @returns { ListItemGroup } - Return ListItemGroup type FrameNode. 1165 * @syscap SystemCapability.ArkUI.ArkUI.Full 1166 * @atomicservice 1167 * @since 12 1168 */ 1169 function createNode(context: UIContext, nodeType: 'ListItemGroup'): ListItemGroup; 1170 1171 /** 1172 * Define the FrameNode type for WaterFlow. 1173 * 1174 * @typedef { TypedFrameNode<WaterFlowInterface, WaterFlowAttribute> } WaterFlow 1175 * @syscap SystemCapability.ArkUI.ArkUI.Full 1176 * @crossplatform 1177 * @atomicservice 1178 * @since 12 1179 */ 1180 type WaterFlow = TypedFrameNode<WaterFlowInterface, WaterFlowAttribute>; 1181 1182 /** 1183 * Create a FrameNode of WaterFlow type. 1184 * 1185 * @param { UIContext } context - uiContext used to create the FrameNode. 1186 * @param { 'WaterFlow' } nodeType - node type. 1187 * @returns { WaterFlow } - Return WaterFlow type FrameNode. 1188 * @syscap SystemCapability.ArkUI.ArkUI.Full 1189 * @atomicservice 1190 * @since 12 1191 */ 1192 function createNode(context: UIContext, nodeType: 'WaterFlow'): WaterFlow; 1193 1194 /** 1195 * Define the FrameNode type for FlowItem. 1196 * 1197 * @typedef { TypedFrameNode<FlowItemInterface, FlowItemAttribute> } FlowItem 1198 * @syscap SystemCapability.ArkUI.ArkUI.Full 1199 * @crossplatform 1200 * @atomicservice 1201 * @since 12 1202 */ 1203 type FlowItem = TypedFrameNode<FlowItemInterface, FlowItemAttribute>; 1204 1205 /** 1206 * Create a FrameNode of FlowItem type. 1207 * 1208 * @param { UIContext } context - uiContext used to create the FrameNode. 1209 * @param { 'FlowItem' } nodeType - node type. 1210 * @returns { FlowItem } - Return FlowItem type FrameNode. 1211 * @syscap SystemCapability.ArkUI.ArkUI.Full 1212 * @atomicservice 1213 * @since 12 1214 */ 1215 function createNode(context: UIContext, nodeType: 'FlowItem'): FlowItem; 1216 1217 /** 1218 * Define the FrameNode type for XComponent. 1219 * 1220 * @typedef { TypedFrameNode<XComponentInterface, XComponentAttribute> } XComponent 1221 * @syscap SystemCapability.ArkUI.ArkUI.Full 1222 * @crossplatform 1223 * @atomicservice 1224 * @since 12 1225 */ 1226 type XComponent = TypedFrameNode<XComponentInterface, XComponentAttribute>; 1227 1228 /** 1229 * Create a FrameNode of XComponent type. 1230 * 1231 * @param { UIContext } context - uiContext used to create the FrameNode. 1232 * @param { 'XComponent' } nodeType - node type. 1233 * @returns { XComponent } - Return XComponent type FrameNode. 1234 * @syscap SystemCapability.ArkUI.ArkUI.Full 1235 * @atomicservice 1236 * @since 12 1237 */ 1238 function createNode(context: UIContext, nodeType: 'XComponent'): XComponent; 1239 1240 /** 1241 * Create a FrameNode of XComponent type with options. 1242 * 1243 * @param { UIContext } context - uiContext used to create the FrameNode. 1244 * @param { 'XComponent' } nodeType - node type. 1245 * @param { XComponentOptions } options - initialization parameters. 1246 * @returns { XComponent } - Return XComponent type FrameNode. 1247 * @syscap SystemCapability.ArkUI.ArkUI.Full 1248 * @atomicservice 1249 * @since 12 1250 */ 1251 function createNode(context: UIContext, nodeType: 'XComponent', options: XComponentOptions): XComponent; 1252} 1253 1254/** 1255 * Used for lazy loading of typeNode. 1256 * 1257 * @syscap SystemCapability.ArkUI.ArkUI.Full 1258 * @crossplatform 1259 * @atomicservice 1260 * @since 12 1261 */ 1262declare class NodeAdapter { 1263 /** 1264 * Constructor. 1265 * 1266 * @syscap SystemCapability.ArkUI.ArkUI.Full 1267 * @crossplatform 1268 * @atomicservice 1269 * @since 12 1270 */ 1271 constructor(); 1272 /** 1273 * Dispose the NodeAdapter immediately. 1274 * 1275 * @syscap SystemCapability.ArkUI.ArkUI.Full 1276 * @crossplatform 1277 * @atomicservice 1278 * @since 12 1279 */ 1280 dispose(): void; 1281 /** 1282 * Set the total number of node count. 1283 * 1284 * @param { number } count - The total number of node count. 1285 * @syscap SystemCapability.ArkUI.ArkUI.Full 1286 * @crossplatform 1287 * @atomicservice 1288 * @since 12 1289 */ 1290 set totalNodeCount(count: number); 1291 /** 1292 * Get the total number of node count. 1293 * 1294 * @returns { number } - Return the total number of node count. 1295 * @syscap SystemCapability.ArkUI.ArkUI.Full 1296 * @crossplatform 1297 * @atomicservice 1298 * @since 12 1299 */ 1300 get totalNodeCount(): number; 1301 /** 1302 * Define the operation of reloading all data. 1303 * 1304 * @syscap SystemCapability.ArkUI.ArkUI.Full 1305 * @crossplatform 1306 * @atomicservice 1307 * @since 12 1308 */ 1309 reloadAllItems(): void; 1310 /** 1311 * Define the data reload operation.Reload a specified amount of data starting from the index value. 1312 * 1313 * @param { number } start - Start loading index values for data. 1314 * @param { number } count - Load the number of data. 1315 * @syscap SystemCapability.ArkUI.ArkUI.Full 1316 * @crossplatform 1317 * @atomicservice 1318 * @since 12 1319 */ 1320 reloadItem(start: number, count: number): void; 1321 /** 1322 * Define data deletion operations.Delete a specified amount of data starting from the index value. 1323 * 1324 * @param { number } start - Start deleting index values for data. 1325 * @param { number } count - Delete the number of data. 1326 * @syscap SystemCapability.ArkUI.ArkUI.Full 1327 * @crossplatform 1328 * @atomicservice 1329 * @since 12 1330 */ 1331 removeItem(start: number, count: number): void; 1332 /** 1333 * Define data insertion operations.Insert a specified amount of data starting from the index value. 1334 * 1335 * @param { number } start - Start Insert index values for data. 1336 * @param { number } count - Insert the number of data. 1337 * @syscap SystemCapability.ArkUI.ArkUI.Full 1338 * @crossplatform 1339 * @atomicservice 1340 * @since 12 1341 */ 1342 insertItem(start: number, count: number): void; 1343 /** 1344 * Define data movement operations. Move data from the starting index to the ending index. 1345 * 1346 * @param { number } from - Starting index value. 1347 * @param { number } to - End index value. 1348 * @syscap SystemCapability.ArkUI.ArkUI.Full 1349 * @crossplatform 1350 * @atomicservice 1351 * @since 12 1352 */ 1353 moveItem(from: number, to: number): void; 1354 /** 1355 * Obtain all data results. 1356 * 1357 * @returns { Array<FrameNode> } - Return all valid FrameNode collections. 1358 * @syscap SystemCapability.ArkUI.ArkUI.Full 1359 * @crossplatform 1360 * @atomicservice 1361 * @since 12 1362 */ 1363 getAllAvailableItems(): Array<FrameNode>; 1364 /** 1365 * This callback will be triggered when a FrameNode is bound. 1366 * 1367 * @param { FrameNode } target - The bound FrameNode node. 1368 * @syscap SystemCapability.ArkUI.ArkUI.Full 1369 * @crossplatform 1370 * @atomicservice 1371 * @since 12 1372 */ 1373 onAttachToNode?(target: FrameNode): void; 1374 /** 1375 * This callback will be triggered when the binding is released. 1376 * 1377 * @syscap SystemCapability.ArkUI.ArkUI.Full 1378 * @crossplatform 1379 * @atomicservice 1380 * @since 12 1381 */ 1382 onDetachFromNode?(): void; 1383 /** 1384 * 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. 1385 * 1386 * @param { number } index - Load the index value of the data. 1387 * @returns { number } - Returning the developer's custom ID requires the developer to ensure its uniqueness. 1388 * @syscap SystemCapability.ArkUI.ArkUI.Full 1389 * @crossplatform 1390 * @atomicservice 1391 * @since 12 1392 */ 1393 onGetChildId?(index: number): number; 1394 /** 1395 * Call this callback when loading for the first time or when a new node slides in. 1396 * 1397 * @param { number } index - Load the index value of the data. 1398 * @returns { FrameNode } - Returns the FrameNode node that loads the node. 1399 * @syscap SystemCapability.ArkUI.ArkUI.Full 1400 * @crossplatform 1401 * @atomicservice 1402 * @since 12 1403 */ 1404 onCreateChild?(index: number): FrameNode; 1405 /** 1406 * Called when the child node is about to be destroyed. 1407 * 1408 * @param { number } id - The child node ID that is about to be destroyed. 1409 * @param { FrameNode } node - The FrameNode node that is about to be destroyed. 1410 * @syscap SystemCapability.ArkUI.ArkUI.Full 1411 * @crossplatform 1412 * @atomicservice 1413 * @since 12 1414 */ 1415 onDisposeChild?(id: number, node: FrameNode): void; 1416 /** 1417 * Call this callback when reloading or reusing. 1418 * 1419 * @param { number } id - The index value of the reloaded data. 1420 * @param { FrameNode } node - Reused FrameNode nodes. 1421 * @syscap SystemCapability.ArkUI.ArkUI.Full 1422 * @crossplatform 1423 * @atomicservice 1424 * @since 12 1425 */ 1426 onUpdateChild?(id: number, node: FrameNode): void; 1427 /** 1428 * Add a NodeAdapter to bind to the node.A node can only be bound to one NodeAdapter. Binding failure returns false. 1429 * 1430 * @param { NodeAdapter } adapter - Define lazy loading classes. 1431 * @param { FrameNode } node - The bound FrameNode node. 1432 * @returns { boolean } Return the binding result. 1433 * @syscap SystemCapability.ArkUI.ArkUI.Full 1434 * @crossplatform 1435 * @atomicservice 1436 * @since 12 1437 */ 1438 static attachNodeAdapter(adapter: NodeAdapter, node: FrameNode): boolean; 1439 /** 1440 * Remove the bound NodeAdapter from the node.A node can only be bound to one NodeAdapter. 1441 * 1442 * @param { FrameNode } node - Unbind the FrameNode node. 1443 * @syscap SystemCapability.ArkUI.ArkUI.Full 1444 * @crossplatform 1445 * @atomicservice 1446 * @since 12 1447 */ 1448 static detachNodeAdapter(node: FrameNode): void; 1449}