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/*** if arkts 1.1 */ 21import { UIContext } from '../@ohos.arkui.UIContext'; 22/*** endif */ 23import { RenderNode } from './RenderNode'; 24import { Size, Position, Edges, LengthMetrics, SizeT } from './Graphics'; 25import { DrawContext } from './Graphics'; 26import { ComponentContent } from './ComponentContent'; 27import { BusinessError } from '../@ohos.base'; 28/*** if arkts 1.2 */ 29import { UIContext } from '@ohos.arkui.UIContext'; 30import { UICommonEvent, UIGestureEvent, CommonAttribute } from './component/common' 31import { ListOptions, ListAttribute } from './component/list' 32/*** endif */ 33/** 34 * Layout constraint, include the max size, the min size and the reference size for children to calculate percent. 35 * 36 * @interface LayoutConstraint 37 * @syscap SystemCapability.ArkUI.ArkUI.Full 38 * @crossplatform 39 * @atomicservice 40 * @since 12 41 */ 42/** 43 * Layout constraint, include the max size, the min size and the reference size for children to calculate percent. 44 * 45 * @interface LayoutConstraint 46 * @syscap SystemCapability.ArkUI.ArkUI.Full 47 * @crossplatform 48 * @atomicservice 49 * @since 20 50 * @arkts 1.1&1.2 51 */ 52export declare interface LayoutConstraint { 53 /** 54 * MaxSize 55 * 56 * @type { Size } 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @crossplatform 59 * @atomicservice 60 * @since arkts { '1.1':'12','1.2':'20' } 61 * @arkts 1.1&1.2 62 */ 63 maxSize: Size; 64 65 /** 66 * MinSize 67 * 68 * @type { Size } 69 * @syscap SystemCapability.ArkUI.ArkUI.Full 70 * @crossplatform 71 * @atomicservice 72 * @since arkts { '1.1':'12','1.2':'20' } 73 * @arkts 1.1&1.2 74 */ 75 minSize: Size; 76 77 /** 78 * PercentReference, if the size unit of the child nodes is percentage, then they use PercentReference to calculate 79 * the px size. 80 * 81 * @type { Size } 82 * @syscap SystemCapability.ArkUI.ArkUI.Full 83 * @crossplatform 84 * @atomicservice 85 * @since arkts { '1.1':'12','1.2':'20' } 86 * @arkts 1.1&1.2 87 */ 88 percentReference: Size; 89} 90 91/** 92 * Defines the cross-language options. 93 * Provides options for configuring or querying the cross-language access permissions for a FrameNode. 94 * For example, for nodes created using ArkTS, this API can control whether non-ArkTS languages are allowed to 95 * access or modify the properties of these nodes. 96 * 97 * @interface CrossLanguageOptions 98 * @syscap SystemCapability.ArkUI.ArkUI.Full 99 * @crossplatform 100 * @atomicservice 101 * @since arkts { '1.1':'15','1.2':'20' } 102 * @arkts 1.1&1.2 103 */ 104declare interface CrossLanguageOptions { 105 /** 106 * Defines if it enables setting attributes cross-language. Default value is false. 107 * 108 * @type { boolean } 109 * @default false 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @crossplatform 112 * @atomicservice 113 * @since arkts { '1.1':'15','1.2':'20' } 114 * @arkts 1.1&1.2 115 */ 116 attributeSetting?: boolean 117} 118 119/** 120 * The interaction event binding status information on the component. 121 * 122 * @interface InteractionEventBindingInfo 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @crossplatform 125 * @atomicservice 126 * @since 19 127 */ 128declare interface InteractionEventBindingInfo { 129 /** 130 * Whether to bind events declaratively. 131 * 132 * @type { boolean } 133 * @syscap SystemCapability.ArkUI.ArkUI.Full 134 * @crossplatform 135 * @atomicservice 136 * @since 19 137 */ 138 baseEventRegistered: boolean; 139 140 /** 141 * Whether to bind events in an imperative FrameNode mode. 142 * 143 * @type { boolean } 144 * @syscap SystemCapability.ArkUI.ArkUI.Full 145 * @crossplatform 146 * @atomicservice 147 * @since 19 148 */ 149 nodeEventRegistered: boolean; 150 151 /** 152 * Whether to bind the event as an imperative NativeNode. 153 * 154 * @type { boolean } 155 * @syscap SystemCapability.ArkUI.ArkUI.Full 156 * @crossplatform 157 * @atomicservice 158 * @since 19 159 */ 160 nativeEventRegistered: boolean; 161 162 /** 163 * Whether the component binds built-in event. 164 * 165 * @type { boolean } 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @crossplatform 168 * @atomicservice 169 * @since 19 170 */ 171 builtInEventRegistered: boolean; 172} 173 174/** 175 * Enum for the expand mode. 176 * 177 * @enum { number } 178 * @syscap SystemCapability.ArkUI.ArkUI.Full 179 * @crossplatform 180 * @atomicservice 181 * @since arkts { '1.1':'15','1.2':'20' } 182 * @arkts 1.1&1.2 183 */ 184export enum ExpandMode { 185 /** 186 * Do not expand the children of node. 187 * The child nodes of the current FrameNode are not expanded. If the FrameNode contains LazyForEach child nodes, 188 * the child nodes are not expanded when the nodes in the main tree are being obtained. 189 * The child node sequence numbers are calculated based on the nodes in the main tree. 190 * 191 * @syscap SystemCapability.ArkUI.ArkUI.Full 192 * @crossplatform 193 * @atomicservice 194 * @since arkts { '1.1':'15','1.2':'20' } 195 * @arkts 1.1&1.2 196 */ 197 NOT_EXPAND = 0, 198 199 /** 200 * Expand the children of node. 201 * The child nodes of the current FrameNode are expanded. If the FrameNode contains LazyForEach child nodes, 202 * all child nodes are expanded when being obtained. 203 * The child node sequence numbers are calculated based on all child nodes. 204 * 205 * @syscap SystemCapability.ArkUI.ArkUI.Full 206 * @crossplatform 207 * @atomicservice 208 * @since arkts { '1.1':'15','1.2':'20' } 209 * @arkts 1.1&1.2 210 */ 211 EXPAND = 1, 212 213 /** 214 * Expand the children of node if needed. 215 * The child nodes of the current FrameNode are expanded on demand. If the FrameNode contains LazyForEach child nodes, 216 * the child nodes are not expanded when the nodes in the main tree are being obtained, but are expanded when nodes 217 * not in the main tree are being obtained. The child node sequence numbers are calculated based on all child nodes. 218 * 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @crossplatform 221 * @atomicservice 222 * @since arkts { '1.1':'15','1.2':'20' } 223 * @arkts 1.1&1.2 224 */ 225 LAZY_EXPAND = 2, 226} 227 228/** 229 * Enum for the UI state of one component, which is used for handling of state style. 230 * @enum { number } 231 * @syscap SystemCapability.ArkUI.ArkUI.Full 232 * @crossplatform 233 * @atomicservice 234 * @since 20 235 */ 236export enum UIState { 237 /** 238 * The normal state. 239 * 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @crossplatform 242 * @atomicservice 243 * @since 20 244 */ 245 NORMAL = 0, 246 247 /** 248 * The pressed state. 249 * 250 * @syscap SystemCapability.ArkUI.ArkUI.Full 251 * @crossplatform 252 * @atomicservice 253 * @since 20 254 */ 255 PRESSED = 1 << 0, 256 257 /** 258 * The focused state. 259 * 260 * @syscap SystemCapability.ArkUI.ArkUI.Full 261 * @crossplatform 262 * @atomicservice 263 * @since 20 264 */ 265 FOCUSED = 1 << 1, 266 267 /** 268 * The disabled state. 269 * 270 * @syscap SystemCapability.ArkUI.ArkUI.Full 271 * @crossplatform 272 * @atomicservice 273 * @since 20 274 */ 275 DISABLED = 1 << 2, 276 277 /** 278 * The selected state, this state is only supported by some specific kind of component, 279 * they are Checkbox, Radio, Toggle and List/Grid/MenuItem, please check the StateStyles docs for details. 280 * 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @atomicservice 284 * @since 20 285 */ 286 SELECTED = 1 << 3, 287} 288 289 /** 290 * UI state change handling function, it returns the current UI states, the value is the result 291 * of all current state enumeration values or calculations, and you can determine the state 292 * by performing the & operation as follows。 293 * if (currentStates & UIState.PRESSED == UIState.PRESSED) 294 * But, please be awared, for the normal state check, the equal should be used directly. 295 * if (currentStates == UIState.NORMAL) 296 * 297 * @typedef { function } UIStatesChangeHandler 298 * @param { FrameNode } node - Current node which is triggering the state change. 299 * @param { number } currentUIStates - Current UI states when the handler is triggered. 300 * 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @crossplatform 303 * @atomicservice 304 * @since 20 305 */ 306declare type UIStatesChangeHandler = (node: FrameNode, currentUIStates: number) => void; 307 308/** 309 * Defines FrameNode. 310 * 311 * @syscap SystemCapability.ArkUI.ArkUI.Full 312 * @crossplatform 313 * @since 11 314 */ 315/** 316 * Defines FrameNode. 317 * 318 * @syscap SystemCapability.ArkUI.ArkUI.Full 319 * @crossplatform 320 * @atomicservice 321 * @since 12 322 */ 323/** 324 * Defines FrameNode. 325 * 326 * @syscap SystemCapability.ArkUI.ArkUI.Full 327 * @crossplatform 328 * @atomicservice 329 * @since 20 330 * @arkts 1.1&1.2 331 */ 332export declare class FrameNode { 333 /** 334 * Constructor. 335 * Constructor used to create a FrameNode. 336 * 337 * @param { UIContext } uiContext - uiContext used to create the FrameNode 338 * @syscap SystemCapability.ArkUI.ArkUI.Full 339 * @crossplatform 340 * @since 11 341 */ 342 /** 343 * Constructor. 344 * Constructor used to create a FrameNode. 345 * 346 * @param { UIContext } uiContext - uiContext used to create the FrameNode 347 * @syscap SystemCapability.ArkUI.ArkUI.Full 348 * @crossplatform 349 * @atomicservice 350 * @since arkts { '1.1':'12','1.2':'20' } 351 * @arkts 1.1&1.2 352 */ 353 constructor(uiContext: UIContext); 354 355 /** 356 * Get the RenderNode in FrameNode. 357 * 358 * @returns { RenderNode | null } - Returns a RenderNode inside the FrameNode, or null if not contained. 359 * If the current FrameNode does not hold any RenderNode, null is returned. 360 * If the current FrameNode is a node created by a declarative component, null is returned. 361 * @syscap SystemCapability.ArkUI.ArkUI.Full 362 * @crossplatform 363 * @since 11 364 */ 365 /** 366 * Get the RenderNode in FrameNode. 367 * 368 * @returns { RenderNode | null } - Returns a RenderNode inside the FrameNode, or null if not contained. 369 * If the current FrameNode does not hold any RenderNode, null is returned. 370 * If the current FrameNode is a node created by a declarative component, null is returned. 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @crossplatform 373 * @atomicservice 374 * @since arkts { '1.1':'12','1.2':'20' } 375 * @arkts 1.1&1.2 376 */ 377 getRenderNode(): RenderNode | null; 378 379 /** 380 * Return a flag to indicate whether the current FrameNode can be modified. Indicates whether the FrameNode supports appendChild, insertChildAfter, removeChild, clearChildren. 381 * 382 * @returns { boolean } - Returns true if the FrameNode can be modified, otherwise return false. 383 * When false is returned, the FrameNode does not support the appendChild, insertChildAfter, removeChild, 384 * and clearChildren operations. 385 * @syscap SystemCapability.ArkUI.ArkUI.Full 386 * @crossplatform 387 * @atomicservice 388 * @since arkts { '1.1':'12','1.2':'20' } 389 * @arkts 1.1&1.2 390 */ 391 isModifiable(): boolean; 392 393 /** 394 * Add child to the end of the FrameNode's children. 395 * If this FrameNode is not modifiable, an exception is thrown. 396 * When appendChild is called, typeNode validates the type or number of child nodes. 397 * If the validation fails, an exception is thrown. For specific limitations, see typeNode. 398 * 399 * @param { FrameNode } node - The node will be added. 400 * The child node cannot be one created declaratively, which is not modifiable. 401 * Only declarative nodes obtained from a BuilderNode can be used as child nodes. 402 * If the child node does not meet the specifications, an exception is thrown. 403 * The FrameNode cannot have a parent node. Otherwise, an exception is thrown. 404 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 405 * @syscap SystemCapability.ArkUI.ArkUI.Full 406 * @crossplatform 407 * @atomicservice 408 * @since arkts { '1.1':'12','1.2':'20' } 409 * @arkts 1.1&1.2 410 */ 411 appendChild(node: FrameNode): void; 412 413 /** 414 * Add child to the current FrameNode. 415 * If this FrameNode is not modifiable, an exception is thrown. 416 * 417 * @param { FrameNode } child - The node will be added. 418 * The child node cannot be a declarative node, that is, a FrameNode that cannot be modified. 419 * Only declarative nodes obtained from a BuilderNode can be used as child nodes. 420 * If the child node does not meet the specifications, an exception is thrown. 421 * The child node cannot have a parent node. Otherwise, an exception is thrown. 422 * @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. 423 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 424 * @syscap SystemCapability.ArkUI.ArkUI.Full 425 * @crossplatform 426 * @atomicservice 427 * @since arkts { '1.1':'12','1.2':'20' } 428 * @arkts 1.1&1.2 429 */ 430 insertChildAfter(child: FrameNode, sibling: FrameNode | null): void; 431 432 /** 433 * Remove child from the current FrameNode. 434 * If this FrameNode is not modifiable, an exception is thrown. 435 * 436 * @param { FrameNode } node - The node will be removed. 437 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 438 * @syscap SystemCapability.ArkUI.ArkUI.Full 439 * @crossplatform 440 * @atomicservice 441 * @since arkts { '1.1':'12','1.2':'20' } 442 * @arkts 1.1&1.2 443 */ 444 removeChild(node: FrameNode): void; 445 446 /** 447 * Clear children of the current FrameNode. 448 * If this FrameNode is not modifiable, an exception is thrown. 449 * 450 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 451 * @syscap SystemCapability.ArkUI.ArkUI.Full 452 * @crossplatform 453 * @atomicservice 454 * @since arkts { '1.1':'12','1.2':'20' } 455 * @arkts 1.1&1.2 456 */ 457 clearChildren(): void; 458 459 /** 460 * Get a child of the current FrameNode by index. 461 * 462 * @param { number } index - The index of the desired node in the children of FrameNode. 463 * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null. 464 * @syscap SystemCapability.ArkUI.ArkUI.Full 465 * @crossplatform 466 * @atomicservice 467 * @since 12 468 */ 469 getChild(index: number): FrameNode | null; 470 471 /** 472 * Get a child of the current FrameNode by index. 473 * 474 * @param { number } index - The index of the desired node in the children of FrameNode. 475 * @param { ExpandMode } expandMode - The expand mode. Default value is ExpandMode.EXPAND. 476 * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null. 477 * @syscap SystemCapability.ArkUI.ArkUI.Full 478 * @crossplatform 479 * @atomicservice 480 * @since 15 481 */ 482 getChild(index: number, expandMode?: ExpandMode): FrameNode | null; 483 484 /** 485 * Get a child of the current FrameNode by index. 486 * 487 * @param { number } index - The index of the desired node in the children of FrameNode. 488 * @param { ExpandMode | undefined } expandMode - The expand mode. Default value is ExpandMode.EXPAND. 489 * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null. 490 * @syscap SystemCapability.ArkUI.ArkUI.Full 491 * @crossplatform 492 * @atomicservice 493 * @since 20 494 * @arkts 1.2 495 */ 496 getChild(index: number, expandMode?: ExpandMode | undefined): FrameNode | null; 497 498 /** 499 * Get the index of the current FrameNode's first child node which is on the tree. 500 * The child node sequence numbers are calculated based on all child nodes. 501 * 502 * @returns { number } - Returns the index of the current FrameNode's first child node which is on the tree. 503 * @syscap SystemCapability.ArkUI.ArkUI.Full 504 * @crossplatform 505 * @atomicservice 506 * @since arkts { '1.1':'15','1.2':'20' } 507 * @arkts 1.1&1.2 508 */ 509 getFirstChildIndexWithoutExpand(): number; 510 511 /** 512 * Get the index of the current FrameNode's last child node which is on the tree. 513 * The child node sequence numbers are calculated based on all child nodes. 514 * 515 * @returns { number } - Returns the index of the current FrameNode's last child node which is on the tree. 516 * @syscap SystemCapability.ArkUI.ArkUI.Full 517 * @crossplatform 518 * @atomicservice 519 * @since arkts { '1.1':'15','1.2':'20' } 520 * @arkts 1.1&1.2 521 */ 522 getLastChildIndexWithoutExpand(): number; 523 524 /** 525 * Get the first child of the current FrameNode. 526 * 527 * @returns { FrameNode | null } - Returns a FrameNode, which is first child of the current FrameNode. If current FrameNode does not have child node, returns null. 528 * If current FrameNode does not have child node, returns null. 529 * @syscap SystemCapability.ArkUI.ArkUI.Full 530 * @crossplatform 531 * @atomicservice 532 * @since arkts { '1.1':'12','1.2':'20' } 533 * @arkts 1.1&1.2 534 */ 535 getFirstChild(): FrameNode | null; 536 537 /** 538 * Get the next sibling node of the current FrameNode. 539 * 540 * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have next sibling node, returns null. 541 * @syscap SystemCapability.ArkUI.ArkUI.Full 542 * @crossplatform 543 * @atomicservice 544 * @since arkts { '1.1':'12','1.2':'20' } 545 * @arkts 1.1&1.2 546 */ 547 getNextSibling(): FrameNode | null; 548 549 /** 550 * Get the previous sibling node of the current FrameNode. 551 * 552 * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have previous sibling node, returns null. 553 * @syscap SystemCapability.ArkUI.ArkUI.Full 554 * @crossplatform 555 * @atomicservice 556 * @since arkts { '1.1':'12','1.2':'20' } 557 * @arkts 1.1&1.2 558 */ 559 getPreviousSibling(): FrameNode | null; 560 561 /** 562 * Get the parent node of the current FrameNode. 563 * 564 * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have parent node, returns null. 565 * @syscap SystemCapability.ArkUI.ArkUI.Full 566 * @crossplatform 567 * @atomicservice 568 * @since arkts { '1.1':'12','1.2':'20' } 569 * @arkts 1.1&1.2 570 */ 571 getParent(): FrameNode | null; 572 573 /** 574 * Get the children count of the current FrameNode. 575 * 576 * @returns { number } - Returns the number of the children of the current FrameNode. 577 * @syscap SystemCapability.ArkUI.ArkUI.Full 578 * @crossplatform 579 * @atomicservice 580 * @since arkts { '1.1':'12','1.2':'20' } 581 * @arkts 1.1&1.2 582 */ 583 getChildrenCount(): number; 584 585 /** 586 * Move node to the target Framenode as child. 587 * If this FrameNode is not modifiable, an exception is thrown. 588 * When targetParent is a typeNode, the API validates the type or number of child nodes. 589 * If the validation fails, an exception is thrown. For specific limitations, see typeNode. 590 * 591 * <p><strong>NOTE</strong>: 592 * <br>Currently, only the following types of TypedFrameNode are supported for the movement operations: Stack, XComponent. 593 * </p> 594 * 595 * @param { FrameNode } targetParent - The target parent node. 596 * The target parent node must not be a declaratively created node, that is, a FrameNode that is not modifiable. 597 * If it does not meet the specifications, an exception is thrown. 598 * @param { number } [index] - The index which the node is moved to. If the value is a negative number or invalid, 599 * the node is moved to the end of the target parent node. Moves to the end of the target parent node by default. 600 * If the target FrameNode has n nodes, the value range for index is 0 to n-1. 601 * Default value: -1 602 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 603 * @syscap SystemCapability.ArkUI.ArkUI.Full 604 * @crossplatform 605 * @atomicservice 606 * @since arkts { '1.1':'18','1.2':'20' } 607 * @arkts 1.1&1.2 608 */ 609 moveTo(targetParent: FrameNode, index?: number): void; 610 611 /** 612 * Dispose the FrameNode immediately. 613 * 614 * <p><strong>NOTE</strong>: 615 * <br>After the <em>dispose</em> API is called, the FrameNode object no longer corresponds to any entity FrameNode. 616 * <br>In this case, attempts to call certain query APIs, such as getMeasuredSize and getLayoutPosition, 617 * <br>will result in a JS crash in the application. 618 * <br>To check whether the current FrameNode object corresponds to an entity FrameNode, you can use getUniqueId API. 619 * <br>A <em>UniqueId</em> value greater than 0 indicates that the object is associated with an entity FrameNode. 620 * </p> 621 * 622 * @syscap SystemCapability.ArkUI.ArkUI.Full 623 * @crossplatform 624 * @atomicservice 625 * @since arkts { '1.1':'12','1.2':'20' } 626 * @arkts 1.1&1.2 627 */ 628 dispose(): void; 629 630 /** 631 * Get the position of the node relative to window, in vp. 632 * 633 * @returns { Position } - Returns position of the node relative to window, in vp. 634 * @syscap SystemCapability.ArkUI.ArkUI.Full 635 * @crossplatform 636 * @atomicservice 637 * @since arkts { '1.1':'12','1.2':'20' } 638 * @arkts 1.1&1.2 639 */ 640 getPositionToWindow(): Position; 641 642 /** 643 * Get the position of the node relative to its parent, in vp. 644 * 645 * @returns { Position } - Returns position of the node relative to its parent, in vp. 646 * @syscap SystemCapability.ArkUI.ArkUI.Full 647 * @crossplatform 648 * @atomicservice 649 * @since arkts { '1.1':'12','1.2':'20' } 650 * @arkts 1.1&1.2 651 */ 652 getPositionToParent(): Position; 653 654 /** 655 * Get the size of the FrameNode after measure, with unit PX. 656 * 657 * @returns { Size } - Returns the size of the FrameNode after measure, with unit PX. 658 * @syscap SystemCapability.ArkUI.ArkUI.Full 659 * @crossplatform 660 * @atomicservice 661 * @since arkts { '1.1':'12','1.2':'20' } 662 * @arkts 1.1&1.2 663 */ 664 getMeasuredSize(): Size; 665 666 /** 667 * Get the offset to the parent of the FrameNode after layout, with unit PX. 668 * The offset is the result of the parent component's layout on this node; 669 * therefore, the offset attribute that takes effect after layout and the position attribute that does not 670 * participate in layout do not affect this offset value. 671 * 672 * @returns { Position } - Returns the offset to the parent of the FrameNode after layout, with unit PX. 673 * @syscap SystemCapability.ArkUI.ArkUI.Full 674 * @crossplatform 675 * @atomicservice 676 * @since arkts { '1.1':'12','1.2':'20' } 677 * @arkts 1.1&1.2 678 */ 679 getLayoutPosition(): Position; 680 681 /** 682 * Get the user config border width of the FrameNode. 683 * 684 * @returns { Edges<LengthMetrics> } - Returns the user config border width of the FrameNode. 685 * @syscap SystemCapability.ArkUI.ArkUI.Full 686 * @crossplatform 687 * @atomicservice 688 * @since arkts { '1.1':'12','1.2':'20' } 689 * @arkts 1.1&1.2 690 */ 691 getUserConfigBorderWidth(): Edges<LengthMetrics>; 692 693 /** 694 * Get the user config padding of the FrameNode. 695 * 696 * @returns { Edges<LengthMetrics> } - Returns the user config padding of the FrameNode. 697 * @syscap SystemCapability.ArkUI.ArkUI.Full 698 * @crossplatform 699 * @atomicservice 700 * @since arkts { '1.1':'12','1.2':'20' } 701 * @arkts 1.1&1.2 702 */ 703 getUserConfigPadding(): Edges<LengthMetrics>; 704 705 /** 706 * Get the user config margin of the FrameNode. 707 * 708 * @returns { Edges<LengthMetrics> } - Returns the user config margin of the FrameNode. 709 * @syscap SystemCapability.ArkUI.ArkUI.Full 710 * @crossplatform 711 * @atomicservice 712 * @since arkts { '1.1':'12','1.2':'20' } 713 * @arkts 1.1&1.2 714 */ 715 getUserConfigMargin(): Edges<LengthMetrics>; 716 717 /** 718 * Get the user config size of the FrameNode. 719 * 720 * @returns { SizeT<LengthMetrics> } - Returns the user config size of the FrameNode. 721 * @syscap SystemCapability.ArkUI.ArkUI.Full 722 * @crossplatform 723 * @atomicservice 724 * @since arkts { '1.1':'12','1.2':'20' } 725 * @arkts 1.1&1.2 726 */ 727 getUserConfigSize(): SizeT<LengthMetrics>; 728 729 /** 730 * Get the id of the FrameNode. 731 * 732 * @returns { string } - Returns the id of the FrameNode. 733 * @syscap SystemCapability.ArkUI.ArkUI.Full 734 * @crossplatform 735 * @atomicservice 736 * @since arkts { '1.1':'12','1.2':'20' } 737 * @arkts 1.1&1.2 738 */ 739 getId(): string; 740 741 /** 742 * Get the unique id of the FrameNode. 743 * 744 * @returns { number } - Returns the unique id of the FrameNode. 745 * @syscap SystemCapability.ArkUI.ArkUI.Full 746 * @crossplatform 747 * @atomicservice 748 * @since arkts { '1.1':'12','1.2':'20' } 749 * @arkts 1.1&1.2 750 */ 751 getUniqueId(): number; 752 753 /** 754 * Get the type of the FrameNode. The type is the name of component, for example, the nodeType of Button is "Button", 755 * and the nodeType of custom component is "__Common__". 756 * 757 * @returns { string } - Returns the type of the FrameNode. 758 * @syscap SystemCapability.ArkUI.ArkUI.Full 759 * @crossplatform 760 * @atomicservice 761 * @since arkts { '1.1':'12','1.2':'20' } 762 * @arkts 1.1&1.2 763 */ 764 getNodeType(): string; 765 766 /** 767 * Get the opacity of the FrameNode. 768 * The minimum value is 0, and the maximum value is 1. 769 * 770 * @returns { number } - Returns the opacity of the FrameNode. 771 * @syscap SystemCapability.ArkUI.ArkUI.Full 772 * @crossplatform 773 * @atomicservice 774 * @since arkts { '1.1':'12','1.2':'20' } 775 * @arkts 1.1&1.2 776 */ 777 getOpacity(): number; 778 779 /** 780 * Get if the FrameNode is visible. 781 * 782 * @returns { boolean } - Returns if the FrameNode is visible. 783 * @syscap SystemCapability.ArkUI.ArkUI.Full 784 * @crossplatform 785 * @atomicservice 786 * @since arkts { '1.1':'12','1.2':'20' } 787 * @arkts 1.1&1.2 788 */ 789 isVisible(): boolean; 790 791 /** 792 * Get if the FrameNode is clip to frame. 793 * This API returns true after the dispose API is called to release the reference to the FrameNode. 794 * 795 * @returns { boolean } - Returns if the FrameNode is clip to frame. 796 * @syscap SystemCapability.ArkUI.ArkUI.Full 797 * @crossplatform 798 * @atomicservice 799 * @since arkts { '1.1':'12','1.2':'20' } 800 * @arkts 1.1&1.2 801 */ 802 isClipToFrame(): boolean; 803 804 /** 805 * Get if the FrameNode is attached to the root node tree. 806 * 807 * @returns { boolean } - Returns if the FrameNode is attached to the root node tree. 808 * @syscap SystemCapability.ArkUI.ArkUI.Full 809 * @crossplatform 810 * @atomicservice 811 * @since arkts { '1.1':'12','1.2':'20' } 812 * @arkts 1.1&1.2 813 */ 814 isAttached(): boolean; 815 816 /** 817 * Get if the node is disposed. 818 * 819 * @returns { boolean } - Returns true if the node is disposed, false otherwise. 820 * @syscap SystemCapability.ArkUI.ArkUI.Full 821 * @crossplatform 822 * @atomicservice 823 * @since 20 824 */ 825 isDisposed(): boolean; 826 827 /** 828 * Get the inspector information of the FrameNode. 829 * Obtains the structure information of the node, which is consistent with what is found in DevEco Studio's built-in 830 * ArkUI Inspector tool. 831 * 832 * @returns { Object } - Returns the inspector information of the FrameNode. 833 * @syscap SystemCapability.ArkUI.ArkUI.Full 834 * @crossplatform 835 * @atomicservice 836 * @since arkts { '1.1':'12','1.2':'20' } 837 * @arkts 1.1&1.2 838 */ 839 getInspectorInfo(): Object; 840 841 /** 842 * * Get the custom property of the component corresponding to this FrameNode. 843 * 844 * @param { string } name - the name of the custom property. 845 * @returns { Object | undefined } - Returns the value of the custom property. 846 * @syscap SystemCapability.ArkUI.ArkUI.Full 847 * @crossplatform 848 * @atomicservice 849 * @since arkts { '1.1':'12','1.2':'20' } 850 * @arkts 1.1&1.2 851 */ 852 getCustomProperty(name: string): Object | undefined; 853 854 /** 855 * Set commonEvent response to the current FrameNode. 856 * The set basic events will compete with declaratively defined events for event handling without overriding them. 857 * If two event callbacks are set at the same time, the callback for the declaratively defined event is prioritized. 858 * In scenarios involving LazyForEach, where nodes may be destroyed and reconstructed, you need to reset or re-attach 859 * event listeners to the newly created nodes to ensure they respond to events correctly. 860 * 861 * @returns { UICommonEvent } - Returns a Object inside the FrameNode, which is used to set callbacks about different events. 862 * @syscap SystemCapability.ArkUI.ArkUI.Full 863 * @crossplatform 864 * @atomicservice 865 * @since arkts { '1.1':'12','1.2':'20' } 866 * @arkts 1.1&1.2 867 */ 868 get commonEvent(): UICommonEvent; 869 870 /** 871 * Get gestureEvent of the current FrameNode. 872 * Gesture events set using the gestureEvent API will not override gestures bound using the declarative gesture API. 873 * If both APIs are used to set gestures, the declarative API takes precedence. 874 * 875 * @returns { UIGestureEvent } - Returns a Object inside the FrameNode, which is used to set callbacks about different gesture events. 876 * @syscap SystemCapability.ArkUI.ArkUI.Full 877 * @crossplatform 878 * @atomicservice 879 * @since arkts { '1.1':'14','1.2':'20' } 880 * @arkts 1.1&1.2 881 */ 882 get gestureEvent(): UIGestureEvent; 883 884 /** 885 * Get the CommonAttribute of the current FrameNode. 886 * Note that only the attributes of a custom node can be modified. 887 * 888 * <p><strong>NOTE</strong>: 889 * <br>The visual representation of the FrameNode is similar to that of a Stack container that is aligned to the top start edge. 890 * <br>For details about the supported attributes, see CommonModifier. 891 * </p> 892 * 893 * @returns { CommonAttribute } - Returns the CommonAttribute which is used to modify the common attributes of the FrameNode. 894 * @syscap SystemCapability.ArkUI.ArkUI.Full 895 * @crossplatform 896 * @atomicservice 897 * @since arkts { '1.1':'12','1.2':'20' } 898 * @arkts 1.1&1.2 899 */ 900 get commonAttribute(): CommonAttribute; 901 902 /** 903 * Draw Method. Executed when the current FrameNode is rendering its content. 904 * 905 * @param { DrawContext } context - The DrawContext will be used when executed draw method. 906 * The self-drawing area cannot exceed the component's own size. 907 * @syscap SystemCapability.ArkUI.ArkUI.Full 908 * @crossplatform 909 * @atomicservice 910 * @since 12 911 */ 912 onDraw?(context: DrawContext): void; 913 914 /** 915 * Method to measure the FrameNode and its content to determine the measured size. Use this method to override the 916 * default measure method when measuring the FrameNode. 917 * 918 * @param { LayoutConstraint } constraint - The layout constraint of the node, will be used when executed measure 919 * method. 920 * @syscap SystemCapability.ArkUI.ArkUI.Full 921 * @crossplatform 922 * @atomicservice 923 * @since arkts { '1.1':'12','1.2':'20' } 924 * @arkts 1.1&1.2 925 */ 926 onMeasure(constraint: LayoutConstraint): void; 927 928 /** 929 * Method to assign a position to the FrameNode and each of its children. Use this method to override the 930 * default layout method. 931 * It can be used to specify how the FrameNode and its child nodes are positioned and sized within the layout. 932 * 933 * @param { Position } position - The position of the node, will be used when executed layout method. 934 * @syscap SystemCapability.ArkUI.ArkUI.Full 935 * @crossplatform 936 * @atomicservice 937 * @since arkts { '1.1':'12','1.2':'20' } 938 * @arkts 1.1&1.2 939 */ 940 onLayout(position: Position): void; 941 942 /** 943 * Set the size of the FrameNode after measure, with unit PX. 944 * If the configured width and height are negative numbers, the value is automatically set to 0. 945 * 946 * @param { Size } size - The size of the FrameNode after measure. 947 * @syscap SystemCapability.ArkUI.ArkUI.Full 948 * @crossplatform 949 * @atomicservice 950 * @since arkts { '1.1':'12','1.2':'20' } 951 * @arkts 1.1&1.2 952 */ 953 setMeasuredSize(size: Size): void; 954 955 /** 956 * Set the position to the parent of the FrameNode after layout, with unit PX. 957 * 958 * @param { Position } position - The position to the parent of the FrameNode after layout. 959 * @syscap SystemCapability.ArkUI.ArkUI.Full 960 * @crossplatform 961 * @atomicservice 962 * @since arkts { '1.1':'12','1.2':'20' } 963 * @arkts 1.1&1.2 964 */ 965 setLayoutPosition(position: Position): void; 966 967 /** 968 * This is called to find out how big the FrameNode should be. The parent node supplies constraint information. The 969 * actual measurement work of the FrameNode is performed in onMeasure or the default measure method. 970 * 971 * @param { LayoutConstraint } constraint - The layout constraint of the node, supplied by the parent node. 972 * @syscap SystemCapability.ArkUI.ArkUI.Full 973 * @crossplatform 974 * @atomicservice 975 * @since arkts { '1.1':'12','1.2':'20' } 976 * @arkts 1.1&1.2 977 */ 978 measure(constraint: LayoutConstraint): void; 979 980 /** 981 * This is called to assign position to the FrameNode and all of its descendants. The position is used to init 982 * the position of the frameNode, and the actual layout work of FrameNode is performed in onLayout or the default 983 * layout method. 984 * 985 * @param { Position } position - The position of the node, will be used when executed the layout method. 986 * @syscap SystemCapability.ArkUI.ArkUI.Full 987 * @crossplatform 988 * @atomicservice 989 * @since arkts { '1.1':'12','1.2':'20' } 990 * @arkts 1.1&1.2 991 */ 992 layout(position: Position): void; 993 994 /** 995 * Mark the frame node as need layout, so that it will be relaid out in the next frame. 996 * 997 * @syscap SystemCapability.ArkUI.ArkUI.Full 998 * @crossplatform 999 * @atomicservice 1000 * @since arkts { '1.1':'12','1.2':'20' } 1001 * @arkts 1.1&1.2 1002 */ 1003 setNeedsLayout(): void; 1004 1005 /** 1006 * Invalidate the RenderNode in the FrameNode, which will cause a re-render of the RenderNode. 1007 * 1008 * @syscap SystemCapability.ArkUI.ArkUI.Full 1009 * @crossplatform 1010 * @atomicservice 1011 * @since arkts { '1.1':'12','1.2':'20' } 1012 * @arkts 1.1&1.2 1013 */ 1014 invalidate(): void; 1015 1016 /** 1017 * Get the position of the node relative to screen, in vp. 1018 * 1019 * @returns { Position } - Returns position of the node relative to screen, in vp. 1020 * @syscap SystemCapability.ArkUI.ArkUI.Full 1021 * @crossplatform 1022 * @atomicservice 1023 * @since arkts { '1.1':'12','1.2':'20' } 1024 * @arkts 1.1&1.2 1025 */ 1026 getPositionToScreen(): Position; 1027 1028 /** 1029 * Get the position of the node relative to unified display, in vp. 1030 * 1031 * @returns { Position } - Returns position of the node relative to unified display, in vp. 1032 * @syscap SystemCapability.ArkUI.ArkUI.Full 1033 * @crossplatform 1034 * @atomicservice 1035 * @since 20 1036 * @arkts 1.1&1.2 1037 */ 1038 getGlobalPositionOnDisplay(): Position; 1039 1040 /** 1041 * Get the position of the node relative to window with transform, in vp. 1042 * 1043 * @returns { Position } - Returns position of the node relative to window with transform, in vp. 1044 * If other drawing attributes (such as transform and translate) are set, the return value may slightly deviate 1045 * due to the precision of floating point numbers. 1046 * @syscap SystemCapability.ArkUI.ArkUI.Full 1047 * @crossplatform 1048 * @atomicservice 1049 * @since arkts { '1.1':'12','1.2':'20' } 1050 * @arkts 1.1&1.2 1051 */ 1052 getPositionToWindowWithTransform(): Position; 1053 1054 /** 1055 * Get the position of the node relative to its parent with transform, in vp. 1056 * The coordinates returned are the coordinates of the upper left corner during layout after transformation. 1057 * 1058 * @returns { Position } - Returns position of the node relative to its parent with transform, in vp. 1059 * If other drawing attributes (such as transform and translate) are set, the return value may slightly deviate 1060 * due to the precision of floating point numbers. 1061 * @syscap SystemCapability.ArkUI.ArkUI.Full 1062 * @crossplatform 1063 * @atomicservice 1064 * @since arkts { '1.1':'12','1.2':'20' } 1065 * @arkts 1.1&1.2 1066 */ 1067 getPositionToParentWithTransform(): Position; 1068 1069 /** 1070 * Get the position of the node relative to screen with transform, in vp. 1071 * The coordinates returned are the coordinates of the upper left corner during layout after transformation. 1072 * 1073 * @returns { Position } - Returns position of the node relative to screen with transform, in vp. 1074 * If other drawing attributes (such as transform and translate) are set, the return value may slightly deviate 1075 * due to the precision of floating point numbers. 1076 * @syscap SystemCapability.ArkUI.ArkUI.Full 1077 * @crossplatform 1078 * @atomicservice 1079 * @since arkts { '1.1':'12','1.2':'20' } 1080 * @arkts 1.1&1.2 1081 */ 1082 getPositionToScreenWithTransform(): Position; 1083 1084 /** 1085 * Detach from parent and dispose all child recursively. 1086 * 1087 * @syscap SystemCapability.ArkUI.ArkUI.Full 1088 * @crossplatform 1089 * @atomicservice 1090 * @since arkts { '1.1':'12','1.2':'20' } 1091 * @arkts 1.1&1.2 1092 */ 1093 disposeTree(): void; 1094 1095 /** 1096 * Mount ComponentContent to FrameNode. 1097 * The current node must be modifiable, which means the return value of isModifiable must be true. 1098 * If the node is not modifiable, an exception is thrown. 1099 * 1100 * @param { ComponentContent<T> } content - Newly added ComponentContent. 1101 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 1102 * @syscap SystemCapability.ArkUI.ArkUI.Full 1103 * @crossplatform 1104 * @atomicservice 1105 * @since 12 1106 */ 1107 addComponentContent<T>(content: ComponentContent<T>): void; 1108 1109 /** 1110 * Mount ComponentContent to FrameNode. 1111 * 1112 * @param { ComponentContent<T> } content - Newly added ComponentContent. 1113 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 1114 * @syscap SystemCapability.ArkUI.ArkUI.Full 1115 * @crossplatform 1116 * @atomicservice 1117 * @since 20 1118 * @arkts 1.2 1119 */ 1120 addComponentContent<T extends Object>(content: ComponentContent<T>): void; 1121 1122 /** 1123 * Set the cross-language options of the target FrameNode. 1124 * This API allows you to specify whether a FrameNode created in ArkTS can be accessed or modified by non-ArkTS languages. 1125 * If the current FrameNode is not modifiable or does not support setting cross-language access options, an exception will be thrown. 1126 * 1127 * <p><strong>NOTE</strong>: 1128 * <br>Currently, only Scroll type TypedFrameNode supports setting cross-language access options. 1129 * </p> 1130 * 1131 * @param { CrossLanguageOptions } options - The cross-language options. 1132 * @throws { BusinessError } 100022 - The FrameNode cannot be set whether to support cross-language common attribute setting. 1133 * @syscap SystemCapability.ArkUI.ArkUI.Full 1134 * @crossplatform 1135 * @atomicservice 1136 * @since arkts { '1.1':'15','1.2':'20' } 1137 * @arkts 1.1&1.2 1138 */ 1139 setCrossLanguageOptions(options: CrossLanguageOptions): void; 1140 1141 /** 1142 * Get the cross-language options of the target FrameNode. 1143 * This API allows you to check whether a FrameNode created in ArkTS can be accessed or modified by non-ArkTS languages. 1144 * 1145 * @returns { CrossLanguageOptions } - Returns the cross-language options of the target FrameNode. 1146 * @syscap SystemCapability.ArkUI.ArkUI.Full 1147 * @crossplatform 1148 * @atomicservice 1149 * @since arkts { '1.1':'15','1.2':'20' } 1150 * @arkts 1.1&1.2 1151 */ 1152 getCrossLanguageOptions(): CrossLanguageOptions; 1153 1154 /** 1155 * Recycle current FrameNode From JsFrameNode. 1156 * 1157 * @syscap SystemCapability.ArkUI.ArkUI.Full 1158 * @crossplatform 1159 * @atomicservice 1160 * @since arkts { '1.1':'18','1.2':'20' } 1161 * @arkts 1.1&1.2 1162 */ 1163 recycle(): void; 1164 1165 /** 1166 * Reuse current FrameNode From JsFrameNode. 1167 * 1168 * @syscap SystemCapability.ArkUI.ArkUI.Full 1169 * @crossplatform 1170 * @atomicservice 1171 * @since arkts { '1.1':'18','1.2':'20' } 1172 * @arkts 1.1&1.2 1173 */ 1174 reuse(): void; 1175 1176 /** 1177 * Gets event binding information of the target node. 1178 * 1179 * @param { EventQueryType } eventType - The interaction event type to be queried. 1180 * @returns { InteractionEventBindingInfo | undefined } 1181 * - Returns one InteractionEventBindingInfo object indicating the event binding details if any interaction 1182 * events binded on current node, returns undefined if no one binded on. 1183 * @syscap SystemCapability.ArkUI.ArkUI.Full 1184 * @crossplatform 1185 * @atomicservice 1186 * @since 19 1187 */ 1188 getInteractionEventBindingInfo(eventType: EventQueryType): InteractionEventBindingInfo | undefined; 1189 1190 /** 1191 * Adds the polymorphic style states supported by the component. To handle states efficiently, specify the 1192 * states of interest and the corresponding handler. When a state of interest occurs, the handler will be executed. 1193 * - You can adjust the UI style based on the current state within the callback. If this API is called multiple 1194 * times on the same node, the last set of states and handler will take precedence. 1195 * - Some component types have default system handling for certain states. For example, the <b>Button</b> 1196 * component has a default style effect for the PRESSED state. When custom state handling is implemented on such 1197 * components, the default style effect will be applied first, followed by the custom style changes, resulting in 1198 * a combined effect. To disable the default style effects, set <b>excludeInner</b> to <b>true</b>, if this is allowed 1199 * by the system implementation. 1200 * - And when this API is called, the provided handler function will be executed immediately. 1201 * - There is no need to explicitly register a listener for the NORMAL state. Once a non-NORMAL state is registered, 1202 * the system will automatically notify your application when the state changes back to NORMAL. 1203 * 1204 * @param { number } uiStates - The target UI state the node need to handle. 1205 * The combination of all target states can be calculated by the OR operation, 1206 * e.g. targetUIStates = UIState.PRESSED | UIState.FOCUSED. 1207 * @param { UIStatesChangeHandler } statesChangeHandler - The UI state chhanging handling function. 1208 * @param { boolean } [excludeInner] - The flag to forbid the inner default state style handling, default is false. 1209 * @syscap SystemCapability.ArkUI.ArkUI.Full 1210 * @crossplatform 1211 * @atomicservice 1212 * @since 20 1213 */ 1214 addSupportedUIStates(uiStates: number, statesChangeHandler: UIStatesChangeHandler, excludeInner?: boolean): void; 1215 1216 /** 1217 * Removes registered UI states. When all states registered using <b>OH_ArkUI_AddSupportedUIStates</b> 1218 * are removed, the registered <b>stateChangeHandler</b> will no longer be executed. 1219 * 1220 * @param { number } uiStates - The target UI state the node need to remove from. 1221 * 1222 * @syscap SystemCapability.ArkUI.ArkUI.Full 1223 * @crossplatform 1224 * @atomicservice 1225 * @since 20 1226 */ 1227 removeSupportedUIStates(uiStates: number): void; 1228 1229 /** 1230 * create property animation in FrameNode. 1231 * 1232 * @param { AnimationPropertyType } property - enumeration of property that produces the animation. 1233 * @param { Optional<number[]> } startValue - start value of animation. 1234 * Undefined means that the last final value is used as the starting value of the animation, 1235 * and it is recommended to set undefined if the property already has a value. 1236 * @param { number[] } endValue - end value of animation. 1237 * @param { AnimateParam } param - param of animation. 1238 * @returns { boolean } whether the createAnimation operation is successful. For example, 1239 * if the array lengths of startValue and endValue do not match the data lengths required by type, creating animation fails. 1240 * @syscap SystemCapability.ArkUI.ArkUI.Full 1241 * @crossplatform 1242 * @atomicservice 1243 * @since 20 1244 */ 1245 createAnimation(property: AnimationPropertyType, startValue: Optional<number[]>, endValue: number[], param: AnimateParam): boolean; 1246 1247 /** 1248 * request to cancel all animations on specified properties. It blocks synchronously to wait for the cancellation result. 1249 * If the cancellation is successful, the corresponding properties on the node are restored to the cancelled value. 1250 * 1251 * @param { AnimationPropertyType[] } properties - animation property types to cancel. 1252 * @returns { boolean } whether the cancel operation is successful. For example, 1253 * if ipc fails, canceling the animation fails. 1254 * @syscap SystemCapability.ArkUI.ArkUI.Full 1255 * @crossplatform 1256 * @atomicservice 1257 * @since 20 1258 */ 1259 cancelAnimations(properties: AnimationPropertyType[]): boolean; 1260 1261 /** 1262 * get property value from node. 1263 * 1264 * @param { AnimationPropertyType } property - animation property type to get value. 1265 * @returns { number[] } - the property value on the node. 1266 * @syscap SystemCapability.ArkUI.ArkUI.Full 1267 * @crossplatform 1268 * @atomicservice 1269 * @since 20 1270 */ 1271 getNodePropertyValue(property: AnimationPropertyType): number[]; 1272} 1273 1274/** 1275 * Used to define the FrameNode type. 1276 * 1277 * <p><strong>NOTE</strong>: 1278 * <br>The commonAttribute API is only effective on <em>CustomFrameNode</em>. 1279 * <br>For <em>TypedFrameNode</em>, the behavior of <em>commonAttribute</em> is undefined. 1280 * <br>For setting universal attributes, it is recommended that you use the attribute API, 1281 * <br>such as node.attribute.backgroundColor(Color.Pink), rather than commonAttribute. 1282 * </p> 1283 * 1284 * @extends FrameNode 1285 * @interface TypedFrameNode 1286 * @syscap SystemCapability.ArkUI.ArkUI.Full 1287 * @crossplatform 1288 * @atomicservice 1289 * @since 12 1290 */ 1291export interface TypedFrameNode<C, T> extends FrameNode { 1292 /** 1293 * Initialize FrameNode. 1294 * 1295 * @type { C } 1296 * @syscap SystemCapability.ArkUI.ArkUI.Full 1297 * @crossplatform 1298 * @atomicservice 1299 * @since 12 1300 */ 1301 initialize: C; 1302 /** 1303 * Get attribute instance of FrameNode to set attributes. 1304 * 1305 * @type { T } 1306 * @readonly 1307 * @syscap SystemCapability.ArkUI.ArkUI.Full 1308 * @crossplatform 1309 * @atomicservice 1310 * @since 12 1311 */ 1312 readonly attribute: T; 1313} 1314 1315/** 1316 * Used to define the FrameNode type. 1317 * 1318 * @extends FrameNode 1319 * @syscap SystemCapability.ArkUI.ArkUI.Full 1320 * @crossplatform 1321 * @atomicservice 1322 * @since 20 1323 * @arkts 1.2 1324 */ 1325export declare abstract class TypedFrameNode<T> extends FrameNode { 1326 /** 1327 * Get attribute instance of FrameNode to set attributes. 1328 * 1329 * @returns { T } - Returns the attribute instance of FrameNode. 1330 * @syscap SystemCapability.ArkUI.ArkUI.Full 1331 * @crossplatform 1332 * @atomicservice 1333 * @since 20 1334 * @arkts 1.2 1335 */ 1336 get attribute(): T; 1337} 1338 1339/** 1340 * Provides methods to implement FrameNode. 1341 * When typeNode is used to create nodes such as Text, Image, Select, or Toggle, if the UIContext instance 1342 * corresponding to the passed UIContext is destroyed, calling this API will return an invalid FrameNode. 1343 * This invalid node cannot be properly mounted or displayed. 1344 * 1345 * @namespace typeNode 1346 * @syscap SystemCapability.ArkUI.ArkUI.Full 1347 * @crossplatform 1348 * @atomicservice 1349 * @since 12 1350 */ 1351/** 1352 * Provides methods to implement FrameNode. 1353 * 1354 * @namespace typeNode 1355 * @syscap SystemCapability.ArkUI.ArkUI.Full 1356 * @crossplatform 1357 * @atomicservice 1358 * @since arkts{ '1.1':'20','1.2':'20'} 1359 * @arkts 1.1&1.2 1360 */ 1361export declare namespace typeNode { 1362 /** 1363 * Define the FrameNode type for Text. 1364 * 1365 * <p><strong>NOTE</strong>: 1366 * <br><em>TextInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1367 * <br>The input parameter is of the constructor type for the <em>Text</em> component. 1368 * <br><em>TextAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1369 * <br>It returns the attribute setting object of the <em>Text</em> component. 1370 * </p> 1371 * 1372 * @typedef { TypedFrameNode<TextInterface, TextAttribute> } Text 1373 * @syscap SystemCapability.ArkUI.ArkUI.Full 1374 * @crossplatform 1375 * @atomicservice 1376 * @since 12 1377 */ 1378 type Text = TypedFrameNode<TextInterface, TextAttribute>; 1379 1380 /** 1381 * Create a FrameNode of Text type. 1382 * 1383 * @param { UIContext } context - uiContext used to create the FrameNode. 1384 * @param { 'Text' } nodeType - node type. 1385 * @returns { Text } - Return Text type FrameNode. 1386 * @syscap SystemCapability.ArkUI.ArkUI.Full 1387 * @atomicservice 1388 * @since 12 1389 */ 1390 function createNode(context: UIContext, nodeType: 'Text'): Text; 1391 1392 /** 1393 * Get the attribute instance of FrameNode to set attributes. 1394 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1395 * This API does not support declaratively created nodes. 1396 * 1397 * @param { FrameNode } node - the target FrameNode. 1398 * @param { 'Text' } nodeType - node type. 1399 * @returns { TextAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1400 * does not exist. 1401 * @syscap SystemCapability.ArkUI.ArkUI.Full 1402 * @crossplatform 1403 * @atomicservice 1404 * @since 20 1405 */ 1406 export function getAttribute(node: FrameNode, nodeType: 'Text'): TextAttribute | undefined; 1407 1408 /** 1409 * Bind the controller of FrameNode. 1410 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 1411 * This API does not support declaratively created nodes. 1412 * 1413 * @param { FrameNode } node - the target FrameNode. 1414 * @param { TextController } controller - the controller which is bind to the target FrameNode. 1415 * @param { 'Text' } nodeType - node type. 1416 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 1417 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 1418 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 1419 * @syscap SystemCapability.ArkUI.ArkUI.Full 1420 * @crossplatform 1421 * @atomicservice 1422 * @since 20 1423 */ 1424 export function bindController(node: FrameNode, controller: TextController, nodeType: 'Text'): void; 1425 1426 /** 1427 * Define the FrameNode type for Column. 1428 * 1429 * <p><strong>NOTE</strong>: 1430 * <br><em>ColumnInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1431 * <br>The input parameter is of the constructor type for the <em>Column</em> component. 1432 * <br><em>ColumnAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1433 * <br>It returns the attribute setting object of the <em>Column</em> component. 1434 * </p> 1435 * 1436 * @typedef { TypedFrameNode<ColumnInterface, ColumnAttribute> } Column 1437 * @syscap SystemCapability.ArkUI.ArkUI.Full 1438 * @crossplatform 1439 * @atomicservice 1440 * @since 12 1441 */ 1442 type Column = TypedFrameNode<ColumnInterface, ColumnAttribute>; 1443 1444 /** 1445 * Create a FrameNode of Column type. 1446 * 1447 * @param { UIContext } context - uiContext used to create the FrameNode. 1448 * @param { 'Column' } nodeType - node type. 1449 * @returns { Column } - Return Column type FrameNode. 1450 * @syscap SystemCapability.ArkUI.ArkUI.Full 1451 * @atomicservice 1452 * @since 12 1453 */ 1454 function createNode(context: UIContext, nodeType: 'Column'): Column; 1455 1456 /** 1457 * Get the attribute instance of FrameNode to set attributes. 1458 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1459 * This API does not support declaratively created nodes. 1460 * 1461 * @param { FrameNode } node - the target FrameNode. 1462 * @param { 'Column' } nodeType - node type. 1463 * @returns { ColumnAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1464 * does not exist. 1465 * @syscap SystemCapability.ArkUI.ArkUI.Full 1466 * @crossplatform 1467 * @atomicservice 1468 * @since 20 1469 */ 1470 export function getAttribute(node: FrameNode, nodeType: 'Column'): ColumnAttribute | undefined; 1471 1472 /** 1473 * Define the FrameNode type for Row. 1474 * 1475 * <p><strong>NOTE</strong>: 1476 * <br><em>RowInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1477 * <br>The input parameter is of the constructor type for the <em>Row</em> component. 1478 * <br><em>RowAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1479 * <br>It returns the attribute setting object of the <em>Row</em> component. 1480 * </p> 1481 * 1482 * @typedef { TypedFrameNode<RowInterface, RowAttribute> } Row 1483 * @syscap SystemCapability.ArkUI.ArkUI.Full 1484 * @crossplatform 1485 * @atomicservice 1486 * @since 12 1487 */ 1488 type Row = TypedFrameNode<RowInterface, RowAttribute>; 1489 1490 /** 1491 * Create a FrameNode of Row type. 1492 * 1493 * @param { UIContext } context - uiContext used to create the FrameNode. 1494 * @param { 'Row' } nodeType - node type. 1495 * @returns { Row } - Return Row type FrameNode. 1496 * @syscap SystemCapability.ArkUI.ArkUI.Full 1497 * @atomicservice 1498 * @since 12 1499 */ 1500 function createNode(context: UIContext, nodeType: 'Row'): Row; 1501 1502 /** 1503 * Get the attribute instance of FrameNode to set attributes. 1504 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1505 * This API does not support declaratively created nodes. 1506 * 1507 * @param { FrameNode } node - the target FrameNode. 1508 * @param { 'Row' } nodeType - node type. 1509 * @returns { RowAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1510 * does not exist. 1511 * @syscap SystemCapability.ArkUI.ArkUI.Full 1512 * @crossplatform 1513 * @atomicservice 1514 * @since 20 1515 */ 1516 export function getAttribute(node: FrameNode, nodeType: 'Row'): RowAttribute | undefined; 1517 1518 /** 1519 * Define the FrameNode type for Stack. 1520 * 1521 * <p><strong>NOTE</strong>: 1522 * <br><em>StackInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1523 * <br>The input parameter is of the constructor type for the <em>Stack</em> component. 1524 * <br><em>StackAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1525 * <br>It returns the attribute setting object of the <em>Stack</em> component. 1526 * </p> 1527 * 1528 * @typedef { TypedFrameNode<StackInterface, StackAttribute> } Stack 1529 * @syscap SystemCapability.ArkUI.ArkUI.Full 1530 * @crossplatform 1531 * @atomicservice 1532 * @since 12 1533 */ 1534 type Stack = TypedFrameNode<StackInterface, StackAttribute>; 1535 1536 /** 1537 * Create a FrameNode of Stack type. 1538 * 1539 * @param { UIContext } context - uiContext used to create the FrameNode. 1540 * @param { 'Stack' } nodeType - node type. 1541 * @returns { Stack } - Return Stack type FrameNode. 1542 * @syscap SystemCapability.ArkUI.ArkUI.Full 1543 * @atomicservice 1544 * @since 12 1545 */ 1546 function createNode(context: UIContext, nodeType: 'Stack'): Stack; 1547 1548 /** 1549 * Get the attribute instance of FrameNode to set attributes. 1550 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1551 * This API does not support declaratively created nodes. 1552 * 1553 * @param { FrameNode } node - the target FrameNode. 1554 * @param { 'Stack' } nodeType - node type. 1555 * @returns { StackAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1556 * does not exist. 1557 * @syscap SystemCapability.ArkUI.ArkUI.Full 1558 * @crossplatform 1559 * @atomicservice 1560 * @since 20 1561 */ 1562 export function getAttribute(node: FrameNode, nodeType: 'Stack'): StackAttribute | undefined; 1563 1564 /** 1565 * Define the FrameNode type for GridRow. 1566 * 1567 * <p><strong>NOTE</strong>: 1568 * <br><em>GridRowInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1569 * <br>The input parameter is of the constructor type for the <em>GridRow</em> component. 1570 * <br><em>GridRowAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1571 * <br>It returns the attribute setting object of the <em>GridRow</em> component. 1572 * </p> 1573 * 1574 * @typedef { TypedFrameNode<GridRowInterface, GridRowAttribute> } GridRow 1575 * @syscap SystemCapability.ArkUI.ArkUI.Full 1576 * @crossplatform 1577 * @atomicservice 1578 * @since 12 1579 */ 1580 type GridRow = TypedFrameNode<GridRowInterface, GridRowAttribute>; 1581 1582 /** 1583 * Create a FrameNode of GridRow type. 1584 * 1585 * @param { UIContext } context - uiContext used to create the FrameNode. 1586 * @param { 'GridRow' } nodeType - node type. 1587 * @returns { GridRow } - Return GridRow type FrameNode. 1588 * @syscap SystemCapability.ArkUI.ArkUI.Full 1589 * @atomicservice 1590 * @since 12 1591 */ 1592 function createNode(context: UIContext, nodeType: 'GridRow'): GridRow; 1593 1594 /** 1595 * Define the FrameNode type for GridCol. 1596 * 1597 * <p><strong>NOTE</strong>: 1598 * <br><em>GridColInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1599 * <br>The input parameter is of the constructor type for the <em>GridCol</em> component. 1600 * <br><em>GridColAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1601 * <br>It returns the attribute setting object of the <em>GridCol</em> component. 1602 * </p> 1603 * 1604 * @typedef { TypedFrameNode<GridColInterface, GridColAttribute> } GridCol 1605 * @syscap SystemCapability.ArkUI.ArkUI.Full 1606 * @crossplatform 1607 * @atomicservice 1608 * @since 12 1609 */ 1610 type GridCol = TypedFrameNode<GridColInterface, GridColAttribute>; 1611 1612 /** 1613 * Create a FrameNode of GridCol type. 1614 * 1615 * @param { UIContext } context - uiContext used to create the FrameNode. 1616 * @param { 'GridCol' } nodeType - node type. 1617 * @returns { GridCol } - Return GridCol type FrameNode. 1618 * @syscap SystemCapability.ArkUI.ArkUI.Full 1619 * @atomicservice 1620 * @since 12 1621 */ 1622 function createNode(context: UIContext, nodeType: 'GridCol'): GridCol; 1623 1624 /** 1625 * Define the FrameNode type for Flex. 1626 * 1627 * <p><strong>NOTE</strong>: 1628 * <br><em>FlexInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1629 * <br>The input parameter is of the constructor type for the <em>Flex</em> component. 1630 * <br><em>FlexAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1631 * <br>It returns the attribute setting object of the <em>Flex</em> component. 1632 * </p> 1633 * 1634 * @typedef { TypedFrameNode<FlexInterface, FlexAttribute> } Flex 1635 * @syscap SystemCapability.ArkUI.ArkUI.Full 1636 * @crossplatform 1637 * @atomicservice 1638 * @since 12 1639 */ 1640 type Flex = TypedFrameNode<FlexInterface, FlexAttribute>; 1641 1642 /** 1643 * Create a FrameNode of Flex type. 1644 * 1645 * @param { UIContext } context - uiContext used to create the FrameNode. 1646 * @param { 'Flex' } nodeType - node type. 1647 * @returns { Flex } - Return Flex type FrameNode. 1648 * @syscap SystemCapability.ArkUI.ArkUI.Full 1649 * @atomicservice 1650 * @since 12 1651 */ 1652 function createNode(context: UIContext, nodeType: 'Flex'): Flex; 1653 1654 /** 1655 * Get the attribute instance of FrameNode to set attributes. 1656 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1657 * This API does not support declaratively created nodes. 1658 * 1659 * @param { FrameNode } node - the target FrameNode. 1660 * @param { 'Flex' } nodeType - node type. 1661 * @returns { FlexAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1662 * does not exist. 1663 * @syscap SystemCapability.ArkUI.ArkUI.Full 1664 * @crossplatform 1665 * @atomicservice 1666 * @since 20 1667 */ 1668 export function getAttribute(node: FrameNode, nodeType: 'Flex'): FlexAttribute | undefined; 1669 1670 /** 1671 * Define the FrameNode type for Swiper. 1672 * 1673 * <p><strong>NOTE</strong>: 1674 * <br><em>SwiperInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1675 * <br>The input parameter is of the constructor type for the <em>Swiper</em> component. 1676 * <br><em>SwiperAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1677 * <br>It returns the attribute setting object of the <em>Swiper</em> component. 1678 * </p> 1679 * 1680 * @typedef { TypedFrameNode<SwiperInterface, SwiperAttribute> } Swiper 1681 * @syscap SystemCapability.ArkUI.ArkUI.Full 1682 * @crossplatform 1683 * @atomicservice 1684 * @since 12 1685 */ 1686 type Swiper = TypedFrameNode<SwiperInterface, SwiperAttribute>; 1687 1688 /** 1689 * Create a FrameNode of Swiper type. 1690 * 1691 * @param { UIContext } context - uiContext used to create the FrameNode. 1692 * @param { 'Swiper' } nodeType - node type. 1693 * @returns { Swiper } - Return Swiper type FrameNode. 1694 * @syscap SystemCapability.ArkUI.ArkUI.Full 1695 * @atomicservice 1696 * @since 12 1697 */ 1698 function createNode(context: UIContext, nodeType: 'Swiper'): Swiper; 1699 1700 /** 1701 * Get the attribute instance of FrameNode to set attributes. 1702 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1703 * This API does not support declaratively created nodes. 1704 * 1705 * @param { FrameNode } node - the target FrameNode. 1706 * @param { 'Swiper' } nodeType - node type. 1707 * @returns { SwiperAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1708 * does not exist. 1709 * @syscap SystemCapability.ArkUI.ArkUI.Full 1710 * @crossplatform 1711 * @atomicservice 1712 * @since 20 1713 */ 1714 export function getAttribute(node: FrameNode, nodeType: 'Swiper'): SwiperAttribute | undefined; 1715 1716 /** 1717 * Bind the controller of FrameNode. 1718 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 1719 * This API does not support declaratively created nodes. 1720 * 1721 * @param { FrameNode } node - the target FrameNode. 1722 * @param { SwiperController } controller - the controller which is bind to the target FrameNode. 1723 * @param { 'Swiper' } nodeType - node type. 1724 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 1725 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 1726 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 1727 * @syscap SystemCapability.ArkUI.ArkUI.Full 1728 * @crossplatform 1729 * @atomicservice 1730 * @since 20 1731 */ 1732 export function bindController(node: FrameNode, controller: SwiperController, nodeType: 'Swiper'): void; 1733 1734 /** 1735 * Define the FrameNode type for Progress. 1736 * 1737 * <p><strong>NOTE</strong>: 1738 * <br><em>ProgressInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1739 * <br>The input parameter is of the constructor type for the <em>Progress</em> component. 1740 * <br><em>ProgressAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1741 * <br>It returns the attribute setting object of the <em>Progress</em> component. 1742 * </p> 1743 * 1744 * @typedef { TypedFrameNode<ProgressInterface, ProgressAttribute> } Progress 1745 * @syscap SystemCapability.ArkUI.ArkUI.Full 1746 * @crossplatform 1747 * @atomicservice 1748 * @since 12 1749 */ 1750 type Progress = TypedFrameNode<ProgressInterface, ProgressAttribute>; 1751 1752 /** 1753 * Create a FrameNode of Progress type. 1754 * 1755 * @param { UIContext } context - uiContext used to create the FrameNode. 1756 * @param { 'Progress' } nodeType - node type. 1757 * @returns { Progress } - Return Progress type FrameNode. 1758 * @syscap SystemCapability.ArkUI.ArkUI.Full 1759 * @atomicservice 1760 * @since 12 1761 */ 1762 function createNode(context: UIContext, nodeType: 'Progress'): Progress; 1763 1764 /** 1765 * Get the attribute instance of FrameNode to set attributes. 1766 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1767 * This API does not support declaratively created nodes. 1768 * 1769 * @param { FrameNode } node - the target FrameNode. 1770 * @param { 'Progress' } nodeType - node type. 1771 * @returns { ProgressAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1772 * does not exist. 1773 * @syscap SystemCapability.ArkUI.ArkUI.Full 1774 * @crossplatform 1775 * @atomicservice 1776 * @since 20 1777 */ 1778 export function getAttribute(node: FrameNode, nodeType: 'Progress'): ProgressAttribute | undefined; 1779 1780 /** 1781 * Define the FrameNode type for Scroll. 1782 * 1783 * <p><strong>NOTE</strong>: 1784 * <br><em>ScrollInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1785 * <br>The input parameter is of the constructor type for the <em>Scroll</em> component. 1786 * <br><em>ScrollAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1787 * <br>It returns the attribute setting object of the <em>Scroll</em> component. 1788 * </p> 1789 * 1790 * @typedef { TypedFrameNode<ScrollInterface, ScrollAttribute> } Scroll 1791 * @syscap SystemCapability.ArkUI.ArkUI.Full 1792 * @crossplatform 1793 * @atomicservice 1794 * @since 12 1795 */ 1796 type Scroll = TypedFrameNode<ScrollInterface, ScrollAttribute>; 1797 1798 /** 1799 * Create a FrameNode of Scroll type. 1800 * 1801 * @param { UIContext } context - uiContext used to create the FrameNode. 1802 * @param { 'Scroll' } nodeType - node type. 1803 * @returns { Scroll } - Return Scroll type FrameNode. 1804 * @syscap SystemCapability.ArkUI.ArkUI.Full 1805 * @atomicservice 1806 * @since 12 1807 */ 1808 function createNode(context: UIContext, nodeType: 'Scroll'): Scroll; 1809 1810 /** 1811 * Get the attribute instance of FrameNode to set attributes. 1812 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1813 * This API does not support declaratively created nodes. 1814 * 1815 * @param { FrameNode } node - the target FrameNode. 1816 * @param { 'Scroll' } nodeType - node type. 1817 * @returns { ScrollAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1818 * does not exist. 1819 * @syscap SystemCapability.ArkUI.ArkUI.Full 1820 * @atomicservice 1821 * @since 15 1822 */ 1823 function getAttribute(node: FrameNode, nodeType: 'Scroll'): ScrollAttribute | undefined; 1824 1825 /** 1826 * Get the event instance of Scroll node. 1827 * 1828 * @param { FrameNode } node - the target FrameNode. 1829 * @param { 'Scroll' } nodeType - node type. 1830 * @returns { UIScrollEvent | undefined } - Return the event instance of FrameNode, and return undefined if it 1831 * does not exist. 1832 * @syscap SystemCapability.ArkUI.ArkUI.Full 1833 * @atomicservice 1834 * @since 19 1835 */ 1836 function getEvent(node: FrameNode, nodeType: 'Scroll'): UIScrollEvent | undefined; 1837 1838 /** 1839 * Bind the controller of FrameNode. 1840 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 1841 * This API does not support declaratively created nodes. 1842 * 1843 * @param { FrameNode } node - the target FrameNode. 1844 * @param { Scroller } controller - the controller which is bind to the target FrameNode. 1845 * @param { 'Scroll' } nodeType - node type. 1846 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. the type of the node is error. 1847 * 2. the node is null or undefined. 1848 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 1849 * @syscap SystemCapability.ArkUI.ArkUI.Full 1850 * @atomicservice 1851 * @since 15 1852 */ 1853 function bindController(node: FrameNode, controller: Scroller, nodeType: 'Scroll'): void; 1854 1855 /** 1856 * Define the FrameNode type for RelativeContainer. 1857 * 1858 * <p><strong>NOTE</strong>: 1859 * <br><em>RelativeContainerInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1860 * <br>The input parameter is of the constructor type for the <em>RelativeContainer</em> component. 1861 * <br><em>RelativeContainerAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1862 * <br>It returns the attribute setting object of the <em>RelativeContainer</em> component. 1863 * </p> 1864 * 1865 * @typedef { TypedFrameNode<RelativeContainerInterface, RelativeContainerAttribute> } RelativeContainer 1866 * @syscap SystemCapability.ArkUI.ArkUI.Full 1867 * @crossplatform 1868 * @atomicservice 1869 * @since 12 1870 */ 1871 type RelativeContainer = TypedFrameNode<RelativeContainerInterface, RelativeContainerAttribute>; 1872 1873 /** 1874 * Create a FrameNode of RelativeContainer type. 1875 * 1876 * @param { UIContext } context - uiContext used to create the FrameNode. 1877 * @param { 'RelativeContainer' } nodeType - node type. 1878 * @returns { RelativeContainer } - Return RelativeContainer type FrameNode. 1879 * @syscap SystemCapability.ArkUI.ArkUI.Full 1880 * @atomicservice 1881 * @since 12 1882 */ 1883 function createNode(context: UIContext, nodeType: 'RelativeContainer'): RelativeContainer; 1884 1885 /** 1886 * Get the attribute instance of FrameNode to set attributes. 1887 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1888 * This API does not support declaratively created nodes. 1889 * 1890 * @param { FrameNode } node - the target FrameNode. 1891 * @param { 'RelativeContainer' } nodeType - node type. 1892 * @returns { RelativeContainerAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1893 * does not exist. 1894 * @syscap SystemCapability.ArkUI.ArkUI.Full 1895 * @crossplatform 1896 * @atomicservice 1897 * @since 20 1898 */ 1899 export function getAttribute(node: FrameNode, nodeType: 'RelativeContainer'): RelativeContainerAttribute | undefined; 1900 1901 /** 1902 * Define the FrameNode type for Divider. 1903 * 1904 * <p><strong>NOTE</strong>: 1905 * <br><em>DividerInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1906 * <br>The input parameter is of the constructor type for the <em>Divider</em> component. 1907 * <br><em>DividerAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1908 * <br>It returns the attribute setting object of the <em>Divider</em> component. 1909 * </p> 1910 * 1911 * @typedef { TypedFrameNode<DividerInterface, DividerAttribute> } Divider 1912 * @syscap SystemCapability.ArkUI.ArkUI.Full 1913 * @crossplatform 1914 * @atomicservice 1915 * @since 12 1916 */ 1917 type Divider = TypedFrameNode<DividerInterface, DividerAttribute>; 1918 1919 /** 1920 * Create a FrameNode of Divider type. 1921 * 1922 * @param { UIContext } context - uiContext used to create the FrameNode. 1923 * @param { 'Divider' } nodeType - node type. 1924 * @returns { Divider } - Return Divider type FrameNode. 1925 * @syscap SystemCapability.ArkUI.ArkUI.Full 1926 * @atomicservice 1927 * @since 12 1928 */ 1929 function createNode(context: UIContext, nodeType: 'Divider'): Divider; 1930 1931 /** 1932 * Define the FrameNode type for LoadingProgress. 1933 * 1934 * <p><strong>NOTE</strong>: 1935 * <br><em>LoadingProgressInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1936 * <br>The input parameter is of the constructor type for the <em>LoadingProgress</em> component. 1937 * <br><em>LoadingProgressAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1938 * <br>It returns the attribute setting object of the <em>LoadingProgress</em> component. 1939 * </p> 1940 * 1941 * @typedef { TypedFrameNode<LoadingProgressInterface, LoadingProgressAttribute> } LoadingProgress 1942 * @syscap SystemCapability.ArkUI.ArkUI.Full 1943 * @crossplatform 1944 * @atomicservice 1945 * @since 12 1946 */ 1947 type LoadingProgress = TypedFrameNode<LoadingProgressInterface, LoadingProgressAttribute>; 1948 1949 /** 1950 * Create a FrameNode of LoadingProgress type. 1951 * 1952 * @param { UIContext } context - uiContext used to create the FrameNode. 1953 * @param { 'LoadingProgress' } nodeType - node type. 1954 * @returns { LoadingProgress } - Return LoadingProgress type FrameNode. 1955 * @syscap SystemCapability.ArkUI.ArkUI.Full 1956 * @atomicservice 1957 * @since 12 1958 */ 1959 function createNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress; 1960 1961 /** 1962 * Get the attribute instance of FrameNode to set attributes. 1963 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 1964 * This API does not support declaratively created nodes. 1965 * 1966 * @param { FrameNode } node - the target FrameNode. 1967 * @param { 'LoadingProgress' } nodeType - node type. 1968 * @returns { LoadingProgressAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 1969 * does not exist. 1970 * @syscap SystemCapability.ArkUI.ArkUI.Full 1971 * @crossplatform 1972 * @atomicservice 1973 * @since 20 1974 */ 1975 export function getAttribute(node: FrameNode, nodeType: 'LoadingProgress'): LoadingProgressAttribute | undefined; 1976 1977 /** 1978 * Define the FrameNode type for Search. 1979 * 1980 * <p><strong>NOTE</strong>: 1981 * <br><em>SearchInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 1982 * <br>The input parameter is of the constructor type for the <em>Search</em> component. 1983 * <br><em>SearchAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 1984 * <br>It returns the attribute setting object of the <em>Search</em> component. 1985 * </p> 1986 * 1987 * @typedef { TypedFrameNode<SearchInterface, SearchAttribute> } Search 1988 * @syscap SystemCapability.ArkUI.ArkUI.Full 1989 * @crossplatform 1990 * @atomicservice 1991 * @since 12 1992 */ 1993 type Search = TypedFrameNode<SearchInterface, SearchAttribute>; 1994 1995 /** 1996 * Create a FrameNode of Search type. 1997 * 1998 * @param { UIContext } context - uiContext used to create the FrameNode. 1999 * @param { 'Search' } nodeType - node type. 2000 * @returns { Search } - Return Search type FrameNode. 2001 * @syscap SystemCapability.ArkUI.ArkUI.Full 2002 * @atomicservice 2003 * @since 12 2004 */ 2005 function createNode(context: UIContext, nodeType: 'Search'): Search; 2006 2007 /** 2008 * Define the FrameNode type for Blank. 2009 * 2010 * <p><strong>NOTE</strong>: 2011 * <br><em>BlankInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2012 * <br>The input parameter is of the constructor type for the <em>Blank</em> component. 2013 * <br><em>BlankAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2014 * <br>It returns the attribute setting object of the <em>Blank</em> component. 2015 * </p> 2016 * 2017 * @typedef { TypedFrameNode<BlankInterface, BlankAttribute> } Blank 2018 * @syscap SystemCapability.ArkUI.ArkUI.Full 2019 * @crossplatform 2020 * @atomicservice 2021 * @since 12 2022 */ 2023 type Blank = TypedFrameNode<BlankInterface, BlankAttribute>; 2024 2025 /** 2026 * Create a FrameNode of Blank type. 2027 * 2028 * @param { UIContext } context - uiContext used to create the FrameNode. 2029 * @param { 'Blank' } nodeType - node type. 2030 * @returns { Blank } - Return Blank type FrameNode. 2031 * @syscap SystemCapability.ArkUI.ArkUI.Full 2032 * @atomicservice 2033 * @since 12 2034 */ 2035 function createNode(context: UIContext, nodeType: 'Blank'): Blank; 2036 2037 /** 2038 * Define the FrameNode type for Image. 2039 * 2040 * <p><strong>NOTE</strong>: 2041 * <br><em>ImageInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2042 * <br>The input parameter is of the constructor type for the <em>Image</em> component. 2043 * <br><em>ImageAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2044 * <br>It returns the attribute setting object of the <em>Image</em> component. 2045 * </p> 2046 * 2047 * @typedef { TypedFrameNode<ImageInterface, ImageAttribute> } Image 2048 * @syscap SystemCapability.ArkUI.ArkUI.Full 2049 * @crossplatform 2050 * @atomicservice 2051 * @since 12 2052 */ 2053 type Image = TypedFrameNode<ImageInterface, ImageAttribute>; 2054 2055 /** 2056 * Create a FrameNode of Image type. 2057 * 2058 * @param { UIContext } context - uiContext used to create the FrameNode. 2059 * @param { 'Image' } nodeType - node type. 2060 * @returns { Image } - Return Image type FrameNode. 2061 * @syscap SystemCapability.ArkUI.ArkUI.Full 2062 * @atomicservice 2063 * @since 12 2064 */ 2065 function createNode(context: UIContext, nodeType: 'Image'): Image; 2066 2067 /** 2068 * Get the attribute instance of FrameNode to set attributes. 2069 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2070 * This API does not support declaratively created nodes. 2071 * 2072 * @param { FrameNode } node - the target FrameNode. 2073 * @param { 'Image' } nodeType - node type. 2074 * @returns { ImageAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2075 * does not exist. 2076 * @syscap SystemCapability.ArkUI.ArkUI.Full 2077 * @crossplatform 2078 * @atomicservice 2079 * @since 20 2080 */ 2081 export function getAttribute(node: FrameNode, nodeType: 'Image'): ImageAttribute | undefined; 2082 2083 /** 2084 * Define the FrameNode type for List. 2085 * 2086 * <p><strong>NOTE</strong>: 2087 * <br><em>ListInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2088 * <br>The input parameter is of the constructor type for the <em>List</em> component. 2089 * <br><em>ListAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2090 * <br>It returns the attribute setting object of the <em>List</em> component. 2091 * </p> 2092 * 2093 * @typedef { TypedFrameNode<ListInterface, ListAttribute> } List 2094 * @syscap SystemCapability.ArkUI.ArkUI.Full 2095 * @crossplatform 2096 * @atomicservice 2097 * @since 12 2098 */ 2099 type List = TypedFrameNode<ListInterface, ListAttribute>; 2100 2101 /** 2102 * Define the List type of FrameNode. 2103 * 2104 * @extends TypedFrameNode<ListAttribute> 2105 * @syscap SystemCapability.ArkUI.ArkUI.Full 2106 * @crossplatform 2107 * @atomicservice 2108 * @since 20 2109 * @arkts 1.2 2110 */ 2111 abstract class ListFrameNode extends TypedFrameNode<ListAttribute> { 2112 /** 2113 * Initialize FrameNode. 2114 * 2115 * @param { ListOptions } [options] - list options 2116 * @returns { ListAttribute } 2117 * @syscap SystemCapability.ArkUI.ArkUI.Full 2118 * @crossplatform 2119 * @atomicservice 2120 * @since 20 2121 * @arkts 1.2 2122 */ 2123 abstract initialize(options?: ListOptions): ListAttribute; 2124 } 2125 2126 /** 2127 * Define the FrameNode type for List. 2128 * 2129 * @typedef { ListFrameNode } List 2130 * @syscap SystemCapability.ArkUI.ArkUI.Full 2131 * @crossplatform 2132 * @atomicservice 2133 * @since 20 2134 * @arkts 1.2 2135 */ 2136 type List = ListFrameNode; 2137 2138 /** 2139 * Create a FrameNode of List type. 2140 * 2141 * @param { UIContext } context - uiContext used to create the FrameNode. 2142 * @param { 'List' } nodeType - node type. 2143 * @returns { List } - Return List type FrameNode. 2144 * @syscap SystemCapability.ArkUI.ArkUI.Full 2145 * @atomicservice 2146 * @since arkts { '1.1':'12','1.2':'20' } 2147 * @arkts 1.1&1.2 2148 */ 2149 function createNode(context: UIContext, nodeType: 'List'): List; 2150 2151 /** 2152 * Get the attribute instance of FrameNode to set attributes. 2153 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2154 * This API does not support declaratively created nodes. 2155 * 2156 * @param { FrameNode } node - the target FrameNode. 2157 * @param { 'List' } nodeType - node type. 2158 * @returns { ListAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2159 * does not exist. 2160 * @syscap SystemCapability.ArkUI.ArkUI.Full 2161 * @crossplatform 2162 * @atomicservice 2163 * @since 20 2164 */ 2165 export function getAttribute(node: FrameNode, nodeType: 'List'): ListAttribute | undefined; 2166 2167 /** 2168 * Bind the controller of FrameNode. 2169 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 2170 * This API does not support declaratively created nodes. 2171 * 2172 * @param { FrameNode } node - the target FrameNode. 2173 * @param { Scroller } controller - the controller which is bind to the target FrameNode. 2174 * @param { 'List' } nodeType - node type. 2175 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 2176 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 2177 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 2178 * @syscap SystemCapability.ArkUI.ArkUI.Full 2179 * @crossplatform 2180 * @atomicservice 2181 * @since 20 2182 */ 2183 export function bindController(node: FrameNode, controller: Scroller, nodeType: 'List'): void; 2184 2185 /** 2186 * Define the FrameNode type for ListItem. 2187 * 2188 * <p><strong>NOTE</strong>: 2189 * <br><em>ListItemInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2190 * <br>The input parameter is of the constructor type for the <em>ListItem</em> component. 2191 * <br><em>ListItemAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2192 * <br>It returns the attribute setting object of the <em>ListItem</em> component. 2193 * </p> 2194 * 2195 * @typedef { TypedFrameNode<ListItemInterface, ListItemAttribute> } ListItem 2196 * @syscap SystemCapability.ArkUI.ArkUI.Full 2197 * @crossplatform 2198 * @atomicservice 2199 * @since 12 2200 */ 2201 type ListItem = TypedFrameNode<ListItemInterface, ListItemAttribute>; 2202 2203 /** 2204 * Get the event instance of Scroll node. 2205 * 2206 * @param { FrameNode } node - the target FrameNode. 2207 * @param { 'List' } nodeType - node type. 2208 * @returns { UIListEvent | undefined } - Return the event instance of FrameNode, and return undefined if it 2209 * does not exist. 2210 * @syscap SystemCapability.ArkUI.ArkUI.Full 2211 * @atomicservice 2212 * @since 19 2213 */ 2214 function getEvent(node: FrameNode, nodeType: 'List'): UIListEvent | undefined; 2215 2216 /** 2217 * Create a FrameNode of ListItem type. 2218 * 2219 * @param { UIContext } context - uiContext used to create the FrameNode. 2220 * @param { 'ListItem' } nodeType - node type. 2221 * @returns { ListItem } - Return ListItem type FrameNode. 2222 * @syscap SystemCapability.ArkUI.ArkUI.Full 2223 * @atomicservice 2224 * @since 12 2225 */ 2226 function createNode(context: UIContext, nodeType: 'ListItem'): ListItem; 2227 2228 /** 2229 * Get the attribute instance of FrameNode to set attributes. 2230 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2231 * This API does not support declaratively created nodes. 2232 * 2233 * @param { FrameNode } node - the target FrameNode. 2234 * @param { 'ListItem' } nodeType - node type. 2235 * @returns { ListItemAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2236 * does not exist. 2237 * @syscap SystemCapability.ArkUI.ArkUI.Full 2238 * @crossplatform 2239 * @atomicservice 2240 * @since 20 2241 */ 2242 export function getAttribute(node: FrameNode, nodeType: 'ListItem'): ListItemAttribute | undefined; 2243 2244 /** 2245 * Define the FrameNode type for TextInput. 2246 * 2247 * <p><strong>NOTE</strong>: 2248 * <br><em>TextInputInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2249 * <br>The input parameter is of the constructor type for the <em>TextInput</em> component. 2250 * <br><em>TextInputAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2251 * <br>It returns the attribute setting object of the <em>TextInput</em> component. 2252 * </p> 2253 * 2254 * @typedef { TypedFrameNode<TextInputInterface, TextInputAttribute> } TextInput 2255 * @syscap SystemCapability.ArkUI.ArkUI.Full 2256 * @crossplatform 2257 * @atomicservice 2258 * @since 12 2259 */ 2260 type TextInput = TypedFrameNode<TextInputInterface, TextInputAttribute>; 2261 2262 /** 2263 * Create a FrameNode of TextInput type. 2264 * 2265 * @param { UIContext } context - uiContext used to create the FrameNode. 2266 * @param { 'TextInput' } nodeType - node type. 2267 * @returns { TextInput } - Return TextInput type FrameNode. 2268 * @syscap SystemCapability.ArkUI.ArkUI.Full 2269 * @atomicservice 2270 * @since 12 2271 */ 2272 function createNode(context: UIContext, nodeType: 'TextInput'): TextInput; 2273 2274 /** 2275 * Get the attribute instance of FrameNode to set attributes. 2276 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2277 * This API does not support declaratively created nodes. 2278 * 2279 * @param { FrameNode } node - the target FrameNode. 2280 * @param { 'TextInput' } nodeType - node type. 2281 * @returns { TextInputAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2282 * does not exist. 2283 * @syscap SystemCapability.ArkUI.ArkUI.Full 2284 * @crossplatform 2285 * @atomicservice 2286 * @since 20 2287 */ 2288 export function getAttribute(node: FrameNode, nodeType: 'TextInput'): TextInputAttribute | undefined; 2289 2290 /** 2291 * Bind the controller of FrameNode. 2292 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 2293 * This API does not support declaratively created nodes. 2294 * 2295 * @param { FrameNode } node - the target FrameNode. 2296 * @param { TextInputController } controller - the controller which is bind to the target FrameNode. 2297 * @param { 'TextInput' } nodeType - node type. 2298 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 2299 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 2300 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 2301 * @syscap SystemCapability.ArkUI.ArkUI.Full 2302 * @crossplatform 2303 * @atomicservice 2304 * @since 20 2305 */ 2306 export function bindController(node: FrameNode, controller: TextInputController, nodeType: 'TextInput'): void; 2307 2308 /** 2309 * Define the FrameNode type for Button. 2310 * 2311 * <p><strong>NOTE</strong>: 2312 * <br><em>ButtonInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2313 * <br>The input parameter is of the constructor type for the <em>Button</em> component. 2314 * <br><em>ButtonAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2315 * <br>It returns the attribute setting object of the <em>Button</em> component. 2316 * <br>If a value is specified for the label parameter, a Button component is created in label mode. 2317 * This component cannot contain child components, and any attempt to set child components will result in an exception. 2318 * The mode in which the Button component is created cannot be dynamically modified in subsequent initialize calls. 2319 * As such, to include child components, do not set the label parameter during the first initialize call. 2320 * When created in child component mode, a Button component can contain a single child component. 2321 * Any attempt to set multiple child components will result in an exception. 2322 * </p> 2323 * 2324 * @typedef { TypedFrameNode<ButtonInterface, ButtonAttribute> } Button 2325 * @syscap SystemCapability.ArkUI.ArkUI.Full 2326 * @crossplatform 2327 * @atomicservice 2328 * @since 12 2329 */ 2330 type Button = TypedFrameNode<ButtonInterface, ButtonAttribute>; 2331 2332 /** 2333 * Create a FrameNode of Button type. 2334 * 2335 * @param { UIContext } context - uiContext used to create the FrameNode. 2336 * @param { 'Button' } nodeType - node type. 2337 * @returns { Button } - Return Button type FrameNode. 2338 * @syscap SystemCapability.ArkUI.ArkUI.Full 2339 * @atomicservice 2340 * @since 12 2341 */ 2342 function createNode(context: UIContext, nodeType: 'Button'): Button; 2343 2344 /** 2345 * Get the attribute instance of FrameNode to set attributes. 2346 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2347 * This API does not support declaratively created nodes. 2348 * 2349 * @param { FrameNode } node - the target FrameNode. 2350 * @param { 'Button' } nodeType - node type. 2351 * @returns { ButtonAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2352 * does not exist. 2353 * @syscap SystemCapability.ArkUI.ArkUI.Full 2354 * @crossplatform 2355 * @atomicservice 2356 * @since 20 2357 */ 2358 export function getAttribute(node: FrameNode, nodeType: 'Button'): ButtonAttribute | undefined; 2359 2360 /** 2361 * Define the FrameNode type for ListItemGroup. 2362 * 2363 * <p><strong>NOTE</strong>: 2364 * <br><em>ListItemGroupInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2365 * <br>The input parameter is of the constructor type for the <em>ListItemGroup</em> component. 2366 * <br><em>ListItemGroupAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2367 * <br>It returns the attribute setting object of the <em>ListItemGroup</em> component. 2368 * </p> 2369 * 2370 * @typedef { TypedFrameNode<ListItemGroupInterface, ListItemGroupAttribute> } ListItemGroup 2371 * @syscap SystemCapability.ArkUI.ArkUI.Full 2372 * @crossplatform 2373 * @atomicservice 2374 * @since 12 2375 */ 2376 type ListItemGroup = TypedFrameNode<ListItemGroupInterface, ListItemGroupAttribute>; 2377 2378 /** 2379 * Create a FrameNode of ListItemGroup type. 2380 * 2381 * @param { UIContext } context - uiContext used to create the FrameNode. 2382 * @param { 'ListItemGroup' } nodeType - node type. 2383 * @returns { ListItemGroup } - Return ListItemGroup type FrameNode. 2384 * @syscap SystemCapability.ArkUI.ArkUI.Full 2385 * @atomicservice 2386 * @since 12 2387 */ 2388 function createNode(context: UIContext, nodeType: 'ListItemGroup'): ListItemGroup; 2389 2390 /** 2391 * Get the attribute instance of FrameNode to set attributes. 2392 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2393 * This API does not support declaratively created nodes. 2394 * 2395 * @param { FrameNode } node - the target FrameNode. 2396 * @param { 'ListItemGroup' } nodeType - node type. 2397 * @returns { ListItemGroupAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2398 * does not exist. 2399 * @syscap SystemCapability.ArkUI.ArkUI.Full 2400 * @crossplatform 2401 * @atomicservice 2402 * @since 20 2403 */ 2404 export function getAttribute(node: FrameNode, nodeType: 'ListItemGroup'): ListItemGroupAttribute | undefined; 2405 2406 /** 2407 * Define the FrameNode type for WaterFlow. 2408 * 2409 * <p><strong>NOTE</strong>: 2410 * <br><em>WaterFlowInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2411 * <br>The input parameter is of the constructor type for the <em>WaterFlow</em> component. 2412 * <br><em>WaterFlowAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2413 * <br>It returns the attribute setting object of the <em>WaterFlow</em> component. 2414 * </p> 2415 * 2416 * @typedef { TypedFrameNode<WaterFlowInterface, WaterFlowAttribute> } WaterFlow 2417 * @syscap SystemCapability.ArkUI.ArkUI.Full 2418 * @crossplatform 2419 * @atomicservice 2420 * @since 12 2421 */ 2422 type WaterFlow = TypedFrameNode<WaterFlowInterface, WaterFlowAttribute>; 2423 2424 /** 2425 * Create a FrameNode of WaterFlow type. 2426 * 2427 * @param { UIContext } context - uiContext used to create the FrameNode. 2428 * @param { 'WaterFlow' } nodeType - node type. 2429 * @returns { WaterFlow } - Return WaterFlow type FrameNode. 2430 * @syscap SystemCapability.ArkUI.ArkUI.Full 2431 * @atomicservice 2432 * @since 12 2433 */ 2434 function createNode(context: UIContext, nodeType: 'WaterFlow'): WaterFlow; 2435 2436 /** 2437 * Get the attribute instance of FrameNode to set attributes. 2438 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2439 * This API does not support declaratively created nodes. 2440 * 2441 * @param { FrameNode } node - the target FrameNode. 2442 * @param { 'WaterFlow' } nodeType - node type. 2443 * @returns { WaterFlowAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2444 * does not exist. 2445 * @syscap SystemCapability.ArkUI.ArkUI.Full 2446 * @crossplatform 2447 * @atomicservice 2448 * @since 20 2449 */ 2450 export function getAttribute(node: FrameNode, nodeType: 'WaterFlow'): WaterFlowAttribute | undefined; 2451 2452 /** 2453 * Bind the controller of FrameNode. 2454 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 2455 * This API does not support declaratively created nodes. 2456 * 2457 * @param { FrameNode } node - the target FrameNode. 2458 * @param { Scroller } controller - the controller which is bind to the target FrameNode. 2459 * @param { 'WaterFlow' } nodeType - node type. 2460 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 2461 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 2462 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 2463 * @syscap SystemCapability.ArkUI.ArkUI.Full 2464 * @crossplatform 2465 * @atomicservice 2466 * @since 20 2467 */ 2468 export function bindController(node: FrameNode, controller: Scroller, nodeType: 'WaterFlow'): void; 2469 2470 /** 2471 * Get the event instance of Scroll node. 2472 * 2473 * @param { FrameNode } node - the target FrameNode. 2474 * @param { 'WaterFlow' } nodeType - node type. 2475 * @returns { UIWaterFlowEvent | undefined } - Return the event instance of FrameNode, and return undefined if it 2476 * does not exist. 2477 * @syscap SystemCapability.ArkUI.ArkUI.Full 2478 * @atomicservice 2479 * @since 19 2480 */ 2481 function getEvent(node: FrameNode, nodeType: 'WaterFlow'): UIWaterFlowEvent | undefined; 2482 2483 /** 2484 * Define the FrameNode type for FlowItem. 2485 * 2486 * <p><strong>NOTE</strong>: 2487 * <br><em>FlowItemInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2488 * <br>The input parameter is of the constructor type for the <em>FlowItem</em> component. 2489 * <br><em>FlowItemAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2490 * <br>It returns the attribute setting object of the <em>FlowItem</em> component. 2491 * </p> 2492 * 2493 * @typedef { TypedFrameNode<FlowItemInterface, FlowItemAttribute> } FlowItem 2494 * @syscap SystemCapability.ArkUI.ArkUI.Full 2495 * @crossplatform 2496 * @atomicservice 2497 * @since 12 2498 */ 2499 type FlowItem = TypedFrameNode<FlowItemInterface, FlowItemAttribute>; 2500 2501 /** 2502 * Create a FrameNode of FlowItem type. 2503 * 2504 * @param { UIContext } context - uiContext used to create the FrameNode. 2505 * @param { 'FlowItem' } nodeType - node type. 2506 * @returns { FlowItem } - Return FlowItem type FrameNode. 2507 * @syscap SystemCapability.ArkUI.ArkUI.Full 2508 * @atomicservice 2509 * @since 12 2510 */ 2511 function createNode(context: UIContext, nodeType: 'FlowItem'): FlowItem; 2512 2513 /** 2514 * Get the attribute instance of FrameNode to set attributes. 2515 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2516 * This API does not support declaratively created nodes. 2517 * 2518 * @param { FrameNode } node - the target FrameNode. 2519 * @param { 'FlowItem' } nodeType - node type. 2520 * @returns { FlowItemAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2521 * does not exist. 2522 * @syscap SystemCapability.ArkUI.ArkUI.Full 2523 * @crossplatform 2524 * @atomicservice 2525 * @since 20 2526 */ 2527 export function getAttribute(node: FrameNode, nodeType: 'FlowItem'): FlowItemAttribute | undefined; 2528 2529 /** 2530 * Define the FrameNode type for XComponent. 2531 * 2532 * <p><strong>NOTE</strong>: 2533 * <br><em>XComponentInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2534 * <br>The input parameter is of the constructor type for the <em>XComponent</em> component. 2535 * <br><em>XComponentAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2536 * <br>It returns the attribute setting object of the <em>XComponent</em> component. 2537 * </p> 2538 * 2539 * @typedef { TypedFrameNode<XComponentInterface, XComponentAttribute> } XComponent 2540 * @syscap SystemCapability.ArkUI.ArkUI.Full 2541 * @crossplatform 2542 * @atomicservice 2543 * @since 12 2544 */ 2545 type XComponent = TypedFrameNode<XComponentInterface, XComponentAttribute>; 2546 2547 /** 2548 * Create a FrameNode of XComponent type. 2549 * 2550 * @param { UIContext } context - uiContext used to create the FrameNode. 2551 * @param { 'XComponent' } nodeType - node type. 2552 * @returns { XComponent } - Return XComponent type FrameNode. 2553 * @syscap SystemCapability.ArkUI.ArkUI.Full 2554 * @atomicservice 2555 * @since 12 2556 */ 2557 function createNode(context: UIContext, nodeType: 'XComponent'): XComponent; 2558 2559 /** 2560 * Create a FrameNode of XComponent type with options. 2561 * 2562 * @param { UIContext } context - uiContext used to create the FrameNode. 2563 * @param { 'XComponent' } nodeType - node type. 2564 * @param { XComponentOptions } options - initialization parameters. 2565 * @returns { XComponent } - Return XComponent type FrameNode. 2566 * @syscap SystemCapability.ArkUI.ArkUI.Full 2567 * @atomicservice 2568 * @since 12 2569 */ 2570 function createNode(context: UIContext, nodeType: 'XComponent', options: XComponentOptions): XComponent; 2571 2572 /** 2573 * Create a FrameNode of XComponent type with options for native developing. 2574 * 2575 * @param { UIContext } context - uiContext used to create the FrameNode. 2576 * @param { 'XComponent' } nodeType - node type. 2577 * @param { NativeXComponentParameters } parameters - initialization parameters. 2578 * @returns { XComponent } - Return XComponent type FrameNode. 2579 * @syscap SystemCapability.ArkUI.ArkUI.Full 2580 * @atomicservice 2581 * @since 19 2582 */ 2583 function createNode(context: UIContext, nodeType: 'XComponent', parameters: NativeXComponentParameters): XComponent; 2584 2585 /** 2586 * Get the attribute instance of FrameNode to set attributes. 2587 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2588 * This API does not support declaratively created nodes. 2589 * 2590 * @param { FrameNode } node - the target FrameNode. 2591 * @param { 'XComponent' } nodeType - node type. 2592 * @returns { XComponentAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2593 * does not exist. 2594 * @syscap SystemCapability.ArkUI.ArkUI.Full 2595 * @crossplatform 2596 * @atomicservice 2597 * @since 20 2598 */ 2599 export function getAttribute(node: FrameNode, nodeType: 'XComponent'): XComponentAttribute | undefined; 2600 2601 /** 2602 * Define the FrameNode type for Checkbox. 2603 * 2604 * <p><strong>NOTE</strong>: 2605 * <br><em>CheckboxInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2606 * <br>The input parameter is of the constructor type for the <em>Checkbox</em> component. 2607 * <br><em>CheckboxAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2608 * <br>It returns the attribute setting object of the <em>Checkbox</em> component. 2609 * </p> 2610 * 2611 * @typedef { TypedFrameNode<CheckboxInterface, CheckboxAttribute> } Checkbox 2612 * @syscap SystemCapability.ArkUI.ArkUI.Full 2613 * @crossplatform 2614 * @atomicservice 2615 * @since 18 2616 */ 2617 type Checkbox = TypedFrameNode<CheckboxInterface, CheckboxAttribute>; 2618 2619 /** 2620 * Create a FrameNode of Checkbox type. 2621 * 2622 * @param { UIContext } context - uiContext used to create the FrameNode. 2623 * @param { 'Checkbox' } nodeType - node type. 2624 * @returns { Checkbox } - Return Checkbox type FrameNode. 2625 * @syscap SystemCapability.ArkUI.ArkUI.Full 2626 * @atomicservice 2627 * @since 18 2628 */ 2629 function createNode(context: UIContext, nodeType: 'Checkbox'): Checkbox; 2630 2631 /** 2632 * Get the attribute instance of FrameNode to set attributes. 2633 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2634 * This API does not support declaratively created nodes. 2635 * 2636 * @param { FrameNode } node - the target FrameNode. 2637 * @param { 'Checkbox' } nodeType - node type. 2638 * @returns { CheckboxAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2639 * does not exist. 2640 * @syscap SystemCapability.ArkUI.ArkUI.Full 2641 * @crossplatform 2642 * @atomicservice 2643 * @since 20 2644 */ 2645 export function getAttribute(node: FrameNode, nodeType: 'Checkbox'): CheckboxAttribute | undefined; 2646 2647 /** 2648 * Define the FrameNode type for CheckboxGroup. 2649 * 2650 * <p><strong>NOTE</strong>: 2651 * <br><em>CheckboxGroupInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2652 * <br>The input parameter is of the constructor type for the <em>CheckboxGroup</em> component. 2653 * <br><em>CheckboxGroupAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2654 * <br>It returns the attribute setting object of the <em>CheckboxGroup</em> component. 2655 * </p> 2656 * 2657 * @typedef { TypedFrameNode<CheckboxGroupInterface, CheckboxGroupAttribute> } CheckboxGroup 2658 * @syscap SystemCapability.ArkUI.ArkUI.Full 2659 * @crossplatform 2660 * @atomicservice 2661 * @since 18 2662 */ 2663 type CheckboxGroup = TypedFrameNode<CheckboxGroupInterface, CheckboxGroupAttribute>; 2664 2665 /** 2666 * Create a FrameNode of CheckboxGroup type. 2667 * 2668 * @param { UIContext } context - uiContext used to create the FrameNode. 2669 * @param { 'CheckboxGroup' } nodeType - node type. 2670 * @returns { CheckboxGroup } - Return CheckboxGroup type FrameNode. 2671 * @syscap SystemCapability.ArkUI.ArkUI.Full 2672 * @atomicservice 2673 * @since 18 2674 */ 2675 function createNode(context: UIContext, nodeType: 'CheckboxGroup'): CheckboxGroup; 2676 2677 /** 2678 * Define the FrameNode type for Radio. 2679 * 2680 * <p><strong>NOTE</strong>: 2681 * <br><em>RadioInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2682 * <br>The input parameter is of the constructor type for the <em>Radio</em> component. 2683 * <br><em>RadioAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2684 * <br>It returns the attribute setting object of the <em>Radio</em> component. 2685 * </p> 2686 * 2687 * @typedef { TypedFrameNode<RadioInterface, RadioAttribute> } Radio 2688 * @syscap SystemCapability.ArkUI.ArkUI.Full 2689 * @crossplatform 2690 * @atomicservice 2691 * @since 18 2692 */ 2693 type Radio = TypedFrameNode<RadioInterface, RadioAttribute>; 2694 2695 /** 2696 * Create a FrameNode of Radio type. 2697 * 2698 * @param { UIContext } context - uiContext used to create the FrameNode. 2699 * @param { 'Radio' } nodeType - node type. 2700 * @returns { Radio } - Return Radio type FrameNode. 2701 * @syscap SystemCapability.ArkUI.ArkUI.Full 2702 * @atomicservice 2703 * @since 18 2704 */ 2705 function createNode(context: UIContext, nodeType: 'Radio'): Radio; 2706 2707 /** 2708 * Get the attribute instance of FrameNode to set attributes. 2709 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2710 * This API does not support declaratively created nodes. 2711 * 2712 * @param { FrameNode } node - the target FrameNode. 2713 * @param { 'Radio' } nodeType - node type. 2714 * @returns { RadioAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2715 * does not exist. 2716 * @syscap SystemCapability.ArkUI.ArkUI.Full 2717 * @crossplatform 2718 * @atomicservice 2719 * @since 20 2720 */ 2721 export function getAttribute(node: FrameNode, nodeType: 'Radio'): RadioAttribute | undefined; 2722 2723 /** 2724 * Define the FrameNode type for Rating. 2725 * 2726 * <p><strong>NOTE</strong>: 2727 * <br><em>RatingInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2728 * <br>The input parameter is of the constructor type for the <em>Rating</em> component. 2729 * <br><em>RatingAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2730 * <br>It returns the attribute setting object of the <em>Rating</em> component. 2731 * </p> 2732 * 2733 * @typedef { TypedFrameNode<RatingInterface, RatingAttribute> } Rating 2734 * @syscap SystemCapability.ArkUI.ArkUI.Full 2735 * @crossplatform 2736 * @atomicservice 2737 * @since 18 2738 */ 2739 type Rating = TypedFrameNode<RatingInterface, RatingAttribute>; 2740 2741 /** 2742 * Create a FrameNode of Rating type. 2743 * 2744 * @param { UIContext } context - uiContext used to create the FrameNode. 2745 * @param { 'Rating' } nodeType - node type. 2746 * @returns { Rating } - Return Rating type FrameNode. 2747 * @syscap SystemCapability.ArkUI.ArkUI.Full 2748 * @atomicservice 2749 * @since 18 2750 */ 2751 function createNode(context: UIContext, nodeType: 'Rating'): Rating; 2752 2753 /** 2754 * Define the FrameNode type for Select. 2755 * 2756 * <p><strong>NOTE</strong>: 2757 * <br><em>SelectInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2758 * <br>The input parameter is of the constructor type for the <em>Select</em> component. 2759 * <br><em>SelectAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2760 * <br>It returns the attribute setting object of the <em>Select</em> component. 2761 * </p> 2762 * 2763 * @typedef { TypedFrameNode<SelectInterface, SelectAttribute> } Select 2764 * @syscap SystemCapability.ArkUI.ArkUI.Full 2765 * @crossplatform 2766 * @atomicservice 2767 * @since 18 2768 */ 2769 type Select = TypedFrameNode<SelectInterface, SelectAttribute>; 2770 2771 /** 2772 * Create a FrameNode of Select type. 2773 * 2774 * @param { UIContext } context - uiContext used to create the FrameNode. 2775 * @param { 'Select' } nodeType - node type. 2776 * @returns { Select } - Return Select type FrameNode. 2777 * @syscap SystemCapability.ArkUI.ArkUI.Full 2778 * @atomicservice 2779 * @since 18 2780 */ 2781 function createNode(context: UIContext, nodeType: 'Select'): Select; 2782 2783 /** 2784 * Define the FrameNode type for Slider. 2785 * 2786 * <p><strong>NOTE</strong>: 2787 * <br><em>SliderInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2788 * <br>The input parameter is of the constructor type for the <em>Slider</em> component. 2789 * <br><em>SliderAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2790 * <br>It returns the attribute setting object of the <em>Slider</em> component. 2791 * </p> 2792 * 2793 * @typedef { TypedFrameNode<SliderInterface, SliderAttribute> } Slider 2794 * @syscap SystemCapability.ArkUI.ArkUI.Full 2795 * @crossplatform 2796 * @atomicservice 2797 * @since 18 2798 */ 2799 type Slider = TypedFrameNode<SliderInterface, SliderAttribute>; 2800 2801 /** 2802 * Create a FrameNode of Slider type. 2803 * 2804 * @param { UIContext } context - uiContext used to create the FrameNode. 2805 * @param { 'Slider' } nodeType - node type. 2806 * @returns { Slider } - Return Slider type FrameNode. 2807 * @syscap SystemCapability.ArkUI.ArkUI.Full 2808 * @atomicservice 2809 * @since 18 2810 */ 2811 function createNode(context: UIContext, nodeType: 'Slider'): Slider; 2812 2813 /** 2814 * Get the attribute instance of FrameNode to set attributes. 2815 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2816 * This API does not support declaratively created nodes. 2817 * 2818 * @param { FrameNode } node - the target FrameNode. 2819 * @param { 'Slider' } nodeType - node type. 2820 * @returns { SliderAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2821 * does not exist. 2822 * @syscap SystemCapability.ArkUI.ArkUI.Full 2823 * @crossplatform 2824 * @atomicservice 2825 * @since 20 2826 */ 2827 export function getAttribute(node: FrameNode, nodeType: 'Slider'): SliderAttribute | undefined; 2828 2829 /** 2830 * Define the FrameNode type for Toggle. 2831 * 2832 * <p><strong>NOTE</strong>: 2833 * <br><em>ToggleInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2834 * <br>The input parameter is of the constructor type for the <em>Toggle</em> component. 2835 * <br><em>ToggleAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2836 * <br>It returns the attribute setting object of the <em>Toggle</em> component. 2837 * </p> 2838 * 2839 * @typedef { TypedFrameNode<ToggleInterface, ToggleAttribute> } Toggle 2840 * @syscap SystemCapability.ArkUI.ArkUI.Full 2841 * @crossplatform 2842 * @atomicservice 2843 * @since 18 2844 */ 2845 type Toggle = TypedFrameNode<ToggleInterface, ToggleAttribute>; 2846 2847 /** 2848 * Create a FrameNode of Toggle type. 2849 * 2850 * @param { UIContext } context - uiContext used to create the FrameNode. 2851 * @param { 'Toggle' } nodeType - node type. 2852 * @param { ToggleOptions } [options] - ToggleOptions. 2853 * @returns { Toggle } - Return Toggle type FrameNode. 2854 * @syscap SystemCapability.ArkUI.ArkUI.Full 2855 * @atomicservice 2856 * @since 18 2857 */ 2858 function createNode(context: UIContext, nodeType: 'Toggle', options?: ToggleOptions): Toggle; 2859 2860 /** 2861 * Get the attribute instance of FrameNode to set attributes. 2862 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2863 * This API does not support declaratively created nodes. 2864 * 2865 * @param { FrameNode } node - the target FrameNode. 2866 * @param { 'Toggle' } nodeType - node type. 2867 * @returns { ToggleAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2868 * does not exist. 2869 * @syscap SystemCapability.ArkUI.ArkUI.Full 2870 * @crossplatform 2871 * @atomicservice 2872 * @since 20 2873 */ 2874 export function getAttribute(node: FrameNode, nodeType: 'Toggle'): ToggleAttribute | undefined; 2875 2876 /** 2877 * Define the FrameNode type for Marquee. 2878 * 2879 * <p><strong>NOTE</strong>: 2880 * <br><em>MarqueeInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2881 * <br>The input parameter is of the constructor type for the <em>Marquee</em> component. 2882 * <br><em>MarqueeAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2883 * <br>It returns the attribute setting object of the <em>Marquee</em> component. 2884 * </p> 2885 * 2886 * @typedef { TypedFrameNode<MarqueeInterface, MarqueeAttribute> } Marquee 2887 * @syscap SystemCapability.ArkUI.ArkUI.Full 2888 * @crossplatform 2889 * @atomicservice 2890 * @since 14 2891 */ 2892 type Marquee = TypedFrameNode<MarqueeInterface, MarqueeAttribute>; 2893 2894 /** 2895 * Create a FrameNode of Marquee type. 2896 * 2897 * @param { UIContext } context - uiContext used to create the FrameNode. 2898 * @param { 'Marquee' } nodeType - node type. 2899 * @returns { Marquee } - Return Marquee type FrameNode. 2900 * @syscap SystemCapability.ArkUI.ArkUI.Full 2901 * @atomicservice 2902 * @since 14 2903 */ 2904 function createNode(context: UIContext, nodeType: 'Marquee'): Marquee; 2905 2906 /** 2907 * Define the FrameNode type for TextArea. 2908 * 2909 * <p><strong>NOTE</strong>: 2910 * <br><em>TextAreaInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2911 * <br>The input parameter is of the constructor type for the <em>TextArea</em> component. 2912 * <br><em>TextAreaAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2913 * <br>It returns the attribute setting object of the <em>TextArea</em> component. 2914 * </p> 2915 * 2916 * @typedef { TypedFrameNode<TextAreaInterface, TextAreaAttribute> } TextArea 2917 * @syscap SystemCapability.ArkUI.ArkUI.Full 2918 * @crossplatform 2919 * @atomicservice 2920 * @since 14 2921 */ 2922 type TextArea = TypedFrameNode<TextAreaInterface, TextAreaAttribute>; 2923 2924 /** 2925 * Create a FrameNode of TextArea type. 2926 * 2927 * @param { UIContext } context - uiContext used to create the FrameNode. 2928 * @param { 'TextArea' } nodeType - node type. 2929 * @returns { TextArea } - Return TextArea type FrameNode. 2930 * @syscap SystemCapability.ArkUI.ArkUI.Full 2931 * @atomicservice 2932 * @since 14 2933 */ 2934 function createNode(context: UIContext, nodeType: 'TextArea'): TextArea; 2935 2936 /** 2937 * Get the attribute instance of FrameNode to set attributes. 2938 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 2939 * This API does not support declaratively created nodes. 2940 * 2941 * @param { FrameNode } node - the target FrameNode. 2942 * @param { 'TextArea' } nodeType - node type. 2943 * @returns { TextAreaAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 2944 * does not exist. 2945 * @syscap SystemCapability.ArkUI.ArkUI.Full 2946 * @crossplatform 2947 * @atomicservice 2948 * @since 20 2949 */ 2950 export function getAttribute(node: FrameNode, nodeType: 'TextArea'): TextAreaAttribute | undefined; 2951 2952 /** 2953 * Bind the controller of FrameNode. 2954 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 2955 * This API does not support declaratively created nodes. 2956 * 2957 * @param { FrameNode } node - the target FrameNode. 2958 * @param { TextAreaController } controller - the controller which is bind to the target FrameNode. 2959 * @param { 'TextArea' } nodeType - node type. 2960 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 2961 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 2962 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 2963 * @syscap SystemCapability.ArkUI.ArkUI.Full 2964 * @crossplatform 2965 * @atomicservice 2966 * @since 20 2967 */ 2968 export function bindController(node: FrameNode, controller: TextAreaController, nodeType: 'TextArea'): void; 2969 2970 /** 2971 * Define the FrameNode type for SymbolGlyph. 2972 * 2973 * <p><strong>NOTE</strong>: 2974 * <br><em>SymbolGlyphInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 2975 * <br>The input parameter is of the constructor type for the <em>SymbolGlyph</em> component. 2976 * <br><em>SymbolGlyphAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 2977 * <br>It returns the attribute setting object of the <em>SymbolGlyph</em> component. 2978 * </p> 2979 * 2980 * @typedef { TypedFrameNode<SymbolGlyphInterface, SymbolGlyphAttribute> } SymbolGlyph 2981 * @syscap SystemCapability.ArkUI.ArkUI.Full 2982 * @crossplatform 2983 * @atomicservice 2984 * @since 14 2985 */ 2986 type SymbolGlyph = TypedFrameNode<SymbolGlyphInterface, SymbolGlyphAttribute>; 2987 2988 /** 2989 * Create a FrameNode of SymbolGlyph type. 2990 * 2991 * @param { UIContext } context - uiContext used to create the FrameNode. 2992 * @param { 'SymbolGlyph' } nodeType - node type. 2993 * @returns { SymbolGlyph } - Return SymbolGlyph type FrameNode. 2994 * @syscap SystemCapability.ArkUI.ArkUI.Full 2995 * @atomicservice 2996 * @since 14 2997 */ 2998 function createNode(context: UIContext, nodeType: 'SymbolGlyph'): SymbolGlyph; 2999 3000 /** 3001 * Define the FrameNode type for QRCode. 3002 * 3003 * <p><strong>NOTE</strong>: 3004 * <br><em>QRCodeInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 3005 * <br>The input parameter is of the constructor type for the <em>QRCode</em> component. 3006 * <br><em>QRCodeAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 3007 * <br>It returns the attribute setting object of the <em>QRCode</em> component. 3008 * </p> 3009 * 3010 * @typedef { TypedFrameNode<QRCodeInterface, QRCodeAttribute> } QRCode 3011 * @syscap SystemCapability.ArkUI.ArkUI.Full 3012 * @crossplatform 3013 * @atomicservice 3014 * @since 14 3015 */ 3016 type QRCode = TypedFrameNode<QRCodeInterface, QRCodeAttribute>; 3017 3018 /** 3019 * Create a FrameNode of QRCode type. 3020 * 3021 * @param { UIContext } context - uiContext used to create the FrameNode. 3022 * @param { 'QRCode' } nodeType - node type. 3023 * @returns { QRCode } - Return QRCode type FrameNode. 3024 * @syscap SystemCapability.ArkUI.ArkUI.Full 3025 * @atomicservice 3026 * @since 14 3027 */ 3028 function createNode(context: UIContext, nodeType: 'QRCode'): QRCode; 3029 3030 /** 3031 * Define the FrameNode type for Badge. 3032 * 3033 * <p><strong>NOTE</strong>: 3034 * <br><em>BadgeInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 3035 * <br>The input parameter is of the constructor type for the <em>Badge</em> component. 3036 * <br><em>BadgeAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 3037 * <br>It returns the attribute setting object of the <em>Badge</em> component. 3038 * </p> 3039 * 3040 * @typedef { TypedFrameNode<BadgeInterface, BadgeAttribute> } Badge 3041 * @syscap SystemCapability.ArkUI.ArkUI.Full 3042 * @crossplatform 3043 * @atomicservice 3044 * @since 14 3045 */ 3046 type Badge = TypedFrameNode<BadgeInterface, BadgeAttribute>; 3047 3048 /** 3049 * Create a FrameNode of Badge type. 3050 * 3051 * @param { UIContext } context - uiContext used to create the FrameNode. 3052 * @param { 'Badge' } nodeType - node type. 3053 * @returns { Badge } - Return Badge type FrameNode. 3054 * @syscap SystemCapability.ArkUI.ArkUI.Full 3055 * @atomicservice 3056 * @since 14 3057 */ 3058 function createNode(context: UIContext, nodeType: 'Badge'): Badge; 3059 3060 /** 3061 * Define the FrameNode type for TextClock. 3062 * 3063 * <p><strong>NOTE</strong>: 3064 * <br><em>TextClockInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 3065 * <br>The input parameter is of the constructor type for the <em>TextClock</em> component. 3066 * <br><em>TextClockAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 3067 * <br>It returns the attribute setting object of the <em>TextClock</em> component. 3068 * </p> 3069 * 3070 * @typedef { TypedFrameNode<TextClockInterface, TextClockAttribute> } TextClock 3071 * @syscap SystemCapability.ArkUI.ArkUI.Full 3072 * @crossplatform 3073 * @atomicservice 3074 * @since 14 3075 */ 3076 type TextClock = TypedFrameNode<TextClockInterface, TextClockAttribute>; 3077 3078 /** 3079 * Create a FrameNode of TextClock type. 3080 * 3081 * @param { UIContext } context - uiContext used to create the FrameNode. 3082 * @param { 'TextClock' } nodeType - node type. 3083 * @returns { TextClock } - Return TextClock type FrameNode. 3084 * @syscap SystemCapability.ArkUI.ArkUI.Full 3085 * @atomicservice 3086 * @since 14 3087 */ 3088 function createNode(context: UIContext, nodeType: 'TextClock'): TextClock; 3089 3090 /** 3091 * Define the FrameNode type for TextTimer. 3092 * 3093 * <p><strong>NOTE</strong>: 3094 * <br><em>TextTimerInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 3095 * <br>The input parameter is of the constructor type for the <em>TextTimer</em> component. 3096 * <br><em>TextTimerAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 3097 * <br>It returns the attribute setting object of the <em>TextTimer</em> component. 3098 * </p> 3099 * 3100 * @typedef { TypedFrameNode<TextTimerInterface, TextTimerAttribute> } TextTimer 3101 * @syscap SystemCapability.ArkUI.ArkUI.Full 3102 * @crossplatform 3103 * @atomicservice 3104 * @since 14 3105 */ 3106 type TextTimer = TypedFrameNode<TextTimerInterface, TextTimerAttribute>; 3107 3108 /** 3109 * Create a FrameNode of TextTimer type. 3110 * 3111 * @param { UIContext } context - uiContext used to create the FrameNode. 3112 * @param { 'TextTimer' } nodeType - node type. 3113 * @returns { TextTimer } - Return TextTimer type FrameNode. 3114 * @syscap SystemCapability.ArkUI.ArkUI.Full 3115 * @atomicservice 3116 * @since 14 3117 */ 3118 function createNode(context: UIContext, nodeType: 'TextTimer'): TextTimer; 3119 3120 /** 3121 * Define the FrameNode type for Grid. 3122 * 3123 * <p><strong>NOTE</strong>: 3124 * <br><em>GridInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 3125 * <br>The input parameter is of the constructor type for the <em>Grid</em> component. 3126 * <br><em>GridAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 3127 * <br>It returns the attribute setting object of the <em>Grid</em> component. 3128 * </p> 3129 * 3130 * @typedef { TypedFrameNode<GridInterface, GridAttribute> } Grid 3131 * @syscap SystemCapability.ArkUI.ArkUI.Full 3132 * @crossplatform 3133 * @atomicservice 3134 * @since 14 3135 */ 3136 type Grid = TypedFrameNode<GridInterface, GridAttribute>; 3137 3138 /** 3139 * Create a FrameNode of Grid type. 3140 * 3141 * @param { UIContext } context - uiContext used to create the FrameNode. 3142 * @param { 'Grid' } nodeType - node type. 3143 * @returns { Grid } - Return Grid type FrameNode. 3144 * @syscap SystemCapability.ArkUI.ArkUI.Full 3145 * @atomicservice 3146 * @since 14 3147 */ 3148 function createNode(context: UIContext, nodeType: 'Grid'): Grid; 3149 3150 /** 3151 * Get the attribute instance of FrameNode to set attributes. 3152 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 3153 * This API does not support declaratively created nodes. 3154 * 3155 * @param { FrameNode } node - the target FrameNode. 3156 * @param { 'Grid' } nodeType - node type. 3157 * @returns { GridAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 3158 * does not exist. 3159 * @syscap SystemCapability.ArkUI.ArkUI.Full 3160 * @crossplatform 3161 * @atomicservice 3162 * @since 20 3163 */ 3164 export function getAttribute(node: FrameNode, nodeType: 'Grid'): GridAttribute | undefined; 3165 3166 /** 3167 * Bind the controller of FrameNode. 3168 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. 3169 * This API does not support declaratively created nodes. 3170 * 3171 * @param { FrameNode } node - the target FrameNode. 3172 * @param { Scroller } controller - the controller which is bind to the target FrameNode. 3173 * @param { 'Grid' } nodeType - node type. 3174 * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node 3175 * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. 3176 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. 3177 * @syscap SystemCapability.ArkUI.ArkUI.Full 3178 * @crossplatform 3179 * @atomicservice 3180 * @since 20 3181 */ 3182 export function bindController(node: FrameNode, controller: Scroller, nodeType: 'Grid'): void; 3183 3184 /** 3185 * Get the event instance of Scroll node. 3186 * 3187 * @param { FrameNode } node - the target FrameNode. 3188 * @param { 'Grid' } nodeType - node type. 3189 * @returns { UIGridEvent | undefined } - Return the event instance of FrameNode, and return undefined if it 3190 * does not exist. 3191 * @syscap SystemCapability.ArkUI.ArkUI.Full 3192 * @atomicservice 3193 * @since 19 3194 */ 3195 function getEvent(node: FrameNode, nodeType: 'Grid'): UIGridEvent | undefined; 3196 3197 /** 3198 * Define the FrameNode type for GridItem. 3199 * 3200 * <p><strong>NOTE</strong>: 3201 * <br><em>GridItemInterface</em> is used as the input parameter of the initialize API of TypedFrameNode. 3202 * <br>The input parameter is of the constructor type for the <em>GridItem</em> component. 3203 * <br><em>GridItemAttribute</em> is used as the return value of the attribute API of <em>TypedFrameNode</em>. 3204 * <br>It returns the attribute setting object of the <em>GridItem</em> component. 3205 * </p> 3206 * 3207 * @typedef { TypedFrameNode<GridItemInterface, GridItemAttribute> } GridItem 3208 * @syscap SystemCapability.ArkUI.ArkUI.Full 3209 * @crossplatform 3210 * @atomicservice 3211 * @since 14 3212 */ 3213 type GridItem = TypedFrameNode<GridItemInterface, GridItemAttribute>; 3214 3215 /** 3216 * Create a FrameNode of GridItem type. 3217 * 3218 * @param { UIContext } context - uiContext used to create the FrameNode. 3219 * @param { 'GridItem' } nodeType - node type. 3220 * @returns { GridItem } - Return GridItem type FrameNode. 3221 * @syscap SystemCapability.ArkUI.ArkUI.Full 3222 * @atomicservice 3223 * @since 14 3224 */ 3225 function createNode(context: UIContext, nodeType: 'GridItem'): GridItem; 3226 3227 /** 3228 * Get the attribute instance of FrameNode to set attributes. 3229 * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. 3230 * This API does not support declaratively created nodes. 3231 * 3232 * @param { FrameNode } node - the target FrameNode. 3233 * @param { 'GridItem' } nodeType - node type. 3234 * @returns { GridItemAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it 3235 * does not exist. 3236 * @syscap SystemCapability.ArkUI.ArkUI.Full 3237 * @crossplatform 3238 * @atomicservice 3239 * @since 20 3240 */ 3241 export function getAttribute(node: FrameNode, nodeType: 'GridItem'): GridItemAttribute | undefined; 3242} 3243 3244/** 3245 * Used for lazy loading of typeNode. 3246 * 3247 * <p><strong>NOTE</strong>: 3248 * The input parameter cannot be a negative number; otherwise, no processing is performed. 3249 * </p> 3250 * 3251 * @syscap SystemCapability.ArkUI.ArkUI.Full 3252 * @crossplatform 3253 * @atomicservice 3254 * @since 12 3255 */ 3256/** 3257 * Used for lazy loading of typeNode. 3258 * 3259 * @syscap SystemCapability.ArkUI.ArkUI.Full 3260 * @crossplatform 3261 * @atomicservice 3262 * @since 20 3263 * @arkts 1.1&1.2 3264 */ 3265export declare class NodeAdapter { 3266 /** 3267 * Constructor. 3268 * A constructor used to create a NodeAdapter object. 3269 * 3270 * @syscap SystemCapability.ArkUI.ArkUI.Full 3271 * @crossplatform 3272 * @atomicservice 3273 * @since arkts { '1.1':'12','1.2':'20' } 3274 * @arkts 1.1&1.2 3275 */ 3276 constructor(); 3277 /** 3278 * Dispose the NodeAdapter immediately. 3279 * Bindings, if any, of the object will be cleared before the object is disposed of. 3280 * 3281 * @syscap SystemCapability.ArkUI.ArkUI.Full 3282 * @crossplatform 3283 * @atomicservice 3284 * @since arkts { '1.1':'12','1.2':'20' } 3285 * @arkts 1.1&1.2 3286 */ 3287 dispose(): void; 3288 /** 3289 * Set the total number of node count. 3290 * 3291 * @param { number } count - The total number of node count. 3292 * @syscap SystemCapability.ArkUI.ArkUI.Full 3293 * @crossplatform 3294 * @atomicservice 3295 * @since arkts { '1.1':'12','1.2':'20' } 3296 * @arkts 1.1&1.2 3297 */ 3298 set totalNodeCount(count: number); 3299 /** 3300 * Get the total number of node count. 3301 * 3302 * @returns { number } - Return the total number of node count. 3303 * @syscap SystemCapability.ArkUI.ArkUI.Full 3304 * @crossplatform 3305 * @atomicservice 3306 * @since arkts { '1.1':'12','1.2':'20' } 3307 * @arkts 1.1&1.2 3308 */ 3309 get totalNodeCount(): number; 3310 /** 3311 * Define the operation of reloading all data. 3312 * 3313 * @syscap SystemCapability.ArkUI.ArkUI.Full 3314 * @crossplatform 3315 * @atomicservice 3316 * @since arkts { '1.1':'12','1.2':'20' } 3317 * @arkts 1.1&1.2 3318 */ 3319 reloadAllItems(): void; 3320 /** 3321 * Define the data reload operation.Reload a specified amount of data starting from the index value. 3322 * 3323 * @param { number } start - Start loading index values for data. 3324 * @param { number } count - Load the number of data. 3325 * @syscap SystemCapability.ArkUI.ArkUI.Full 3326 * @crossplatform 3327 * @atomicservice 3328 * @since arkts { '1.1':'12','1.2':'20' } 3329 * @arkts 1.1&1.2 3330 */ 3331 reloadItem(start: number, count: number): void; 3332 /** 3333 * Define data deletion operations.Delete a specified amount of data starting from the index value. 3334 * 3335 * @param { number } start - Start deleting index values for data. 3336 * @param { number } count - Delete the number of data. 3337 * @syscap SystemCapability.ArkUI.ArkUI.Full 3338 * @crossplatform 3339 * @atomicservice 3340 * @since arkts { '1.1':'12','1.2':'20' } 3341 * @arkts 1.1&1.2 3342 */ 3343 removeItem(start: number, count: number): void; 3344 /** 3345 * Define data insertion operations.Insert a specified amount of data starting from the index value. 3346 * 3347 * @param { number } start - Start Insert index values for data. 3348 * @param { number } count - Insert the number of data. 3349 * @syscap SystemCapability.ArkUI.ArkUI.Full 3350 * @crossplatform 3351 * @atomicservice 3352 * @since arkts { '1.1':'12','1.2':'20' } 3353 * @arkts 1.1&1.2 3354 */ 3355 insertItem(start: number, count: number): void; 3356 /** 3357 * Define data movement operations. Move data from the starting index to the ending index. 3358 * 3359 * @param { number } from - Starting index value. 3360 * @param { number } to - End index value. 3361 * @syscap SystemCapability.ArkUI.ArkUI.Full 3362 * @crossplatform 3363 * @atomicservice 3364 * @since arkts { '1.1':'12','1.2':'20' } 3365 * @arkts 1.1&1.2 3366 */ 3367 moveItem(from: number, to: number): void; 3368 /** 3369 * Obtain all data results. 3370 * 3371 * @returns { Array<FrameNode> } - Return all valid FrameNode collections. 3372 * @syscap SystemCapability.ArkUI.ArkUI.Full 3373 * @crossplatform 3374 * @atomicservice 3375 * @since arkts { '1.1':'12','1.2':'20' } 3376 * @arkts 1.1&1.2 3377 */ 3378 getAllAvailableItems(): Array<FrameNode>; 3379 /** 3380 * This callback will be triggered when a FrameNode is bound. 3381 * 3382 * @param { FrameNode } target - The bound FrameNode node. 3383 * @syscap SystemCapability.ArkUI.ArkUI.Full 3384 * @crossplatform 3385 * @atomicservice 3386 * @since 12 3387 */ 3388 onAttachToNode?(target: FrameNode): void; 3389 /** 3390 * This callback will be triggered when the binding is released. 3391 * 3392 * @syscap SystemCapability.ArkUI.ArkUI.Full 3393 * @crossplatform 3394 * @atomicservice 3395 * @since 12 3396 */ 3397 onDetachFromNode?(): void; 3398 /** 3399 * 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. 3400 * 3401 * @param { number } index - Load the index value of the data. 3402 * @returns { number } - Returning the developer's custom ID requires the developer to ensure its uniqueness. 3403 * @syscap SystemCapability.ArkUI.ArkUI.Full 3404 * @crossplatform 3405 * @atomicservice 3406 * @since 12 3407 */ 3408 onGetChildId?(index: number): number; 3409 /** 3410 * Call this callback when loading for the first time or when a new node slides in. 3411 * 3412 * @param { number } index - Load the index value of the data. 3413 * @returns { FrameNode } - Returns the FrameNode node that loads the node. 3414 * @syscap SystemCapability.ArkUI.ArkUI.Full 3415 * @crossplatform 3416 * @atomicservice 3417 * @since 12 3418 */ 3419 onCreateChild?(index: number): FrameNode; 3420 /** 3421 * Called when the child node is about to be destroyed. 3422 * 3423 * @param { number } id - The child node ID that is about to be destroyed. 3424 * @param { FrameNode } node - The FrameNode node that is about to be destroyed. 3425 * @syscap SystemCapability.ArkUI.ArkUI.Full 3426 * @crossplatform 3427 * @atomicservice 3428 * @since 12 3429 */ 3430 onDisposeChild?(id: number, node: FrameNode): void; 3431 /** 3432 * Call this callback when reloading or reusing. 3433 * 3434 * @param { number } id - The child node ID that is about to be reloaded. 3435 * @param { FrameNode } node - Reused FrameNode nodes. 3436 * @syscap SystemCapability.ArkUI.ArkUI.Full 3437 * @crossplatform 3438 * @atomicservice 3439 * @since 12 3440 */ 3441 onUpdateChild?(id: number, node: FrameNode): void; 3442 /** 3443 * Add a NodeAdapter to bind to the node.A node can only be bound to one NodeAdapter. Binding failure returns false. 3444 * 3445 * @param { NodeAdapter } adapter - Define lazy loading classes. 3446 * @param { FrameNode } node - The bound FrameNode node. 3447 * @returns { boolean } Return the binding result. 3448 * @syscap SystemCapability.ArkUI.ArkUI.Full 3449 * @crossplatform 3450 * @atomicservice 3451 * @since arkts { '1.1':'12','1.2':'20' } 3452 * @arkts 1.1&1.2 3453 */ 3454 static attachNodeAdapter(adapter: NodeAdapter, node: FrameNode): boolean; 3455 /** 3456 * Remove the bound NodeAdapter from the node.A node can only be bound to one NodeAdapter. 3457 * 3458 * @param { FrameNode } node - Unbind the FrameNode node. 3459 * @syscap SystemCapability.ArkUI.ArkUI.Full 3460 * @crossplatform 3461 * @atomicservice 3462 * @since arkts { '1.1':'12','1.2':'20' } 3463 * @arkts 1.1&1.2 3464 */ 3465 static detachNodeAdapter(node: FrameNode): void; 3466 3467 /** 3468 * Get if the node is disposed. 3469 * 3470 * @returns { boolean } - Returns true if the node is disposed, false otherwise. 3471 * @syscap SystemCapability.ArkUI.ArkUI.Full 3472 * @crossplatform 3473 * @atomicservice 3474 * @since 20 3475 */ 3476 isDisposed(): boolean; 3477}