/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file * @kit ArkUI */ /*** if arkts 1.1 */ import { UIContext } from '../@ohos.arkui.UIContext'; /*** endif */ import { RenderNode } from './RenderNode'; import { Size, Position, Edges, LengthMetrics, SizeT } from './Graphics'; import { DrawContext } from './Graphics'; import { ComponentContent } from './ComponentContent'; import { BusinessError } from '../@ohos.base'; /*** if arkts 1.2 */ import { UIContext } from '@ohos.arkui.UIContext'; import { UICommonEvent, UIGestureEvent, CommonAttribute } from './component/common' import { ListOptions, ListAttribute } from './component/list' /*** endif */ /** * Layout constraint, include the max size, the min size and the reference size for children to calculate percent. * * @interface LayoutConstraint * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ /** * Layout constraint, include the max size, the min size and the reference size for children to calculate percent. * * @interface LayoutConstraint * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ export declare interface LayoutConstraint { /** * MaxSize * * @type { Size } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ maxSize: Size; /** * MinSize * * @type { Size } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ minSize: Size; /** * PercentReference, if the size unit of the child nodes is percentage, then they use PercentReference to calculate * the px size. * * @type { Size } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ percentReference: Size; } /** * Defines the cross-language options. * Provides options for configuring or querying the cross-language access permissions for a FrameNode. * For example, for nodes created using ArkTS, this API can control whether non-ArkTS languages are allowed to * access or modify the properties of these nodes. * * @interface CrossLanguageOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ declare interface CrossLanguageOptions { /** * Defines if it enables setting attributes cross-language. Default value is false. * * @type { boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ attributeSetting?: boolean } /** * The interaction event binding status information on the component. * * @interface InteractionEventBindingInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 19 */ declare interface InteractionEventBindingInfo { /** * Whether to bind events declaratively. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 19 */ baseEventRegistered: boolean; /** * Whether to bind events in an imperative FrameNode mode. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 19 */ nodeEventRegistered: boolean; /** * Whether to bind the event as an imperative NativeNode. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 19 */ nativeEventRegistered: boolean; /** * Whether the component binds built-in event. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 19 */ builtInEventRegistered: boolean; } /** * Enum for the expand mode. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ export enum ExpandMode { /** * Do not expand the children of node. * The child nodes of the current FrameNode are not expanded. If the FrameNode contains LazyForEach child nodes, * the child nodes are not expanded when the nodes in the main tree are being obtained. * The child node sequence numbers are calculated based on the nodes in the main tree. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ NOT_EXPAND = 0, /** * Expand the children of node. * The child nodes of the current FrameNode are expanded. If the FrameNode contains LazyForEach child nodes, * all child nodes are expanded when being obtained. * The child node sequence numbers are calculated based on all child nodes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ EXPAND = 1, /** * Expand the children of node if needed. * The child nodes of the current FrameNode are expanded on demand. If the FrameNode contains LazyForEach child nodes, * the child nodes are not expanded when the nodes in the main tree are being obtained, but are expanded when nodes * not in the main tree are being obtained. The child node sequence numbers are calculated based on all child nodes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ LAZY_EXPAND = 2, } /** * Enum for the UI state of one component, which is used for handling of state style. * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export enum UIState { /** * The normal state. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ NORMAL = 0, /** * The pressed state. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ PRESSED = 1 << 0, /** * The focused state. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ FOCUSED = 1 << 1, /** * The disabled state. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ DISABLED = 1 << 2, /** * The selected state, this state is only supported by some specific kind of component, * they are Checkbox, Radio, Toggle and List/Grid/MenuItem, please check the StateStyles docs for details. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ SELECTED = 1 << 3, } /** * UI state change handling function, it returns the current UI states, the value is the result * of all current state enumeration values or calculations, and you can determine the state * by performing the & operation as follows。 * if (currentStates & UIState.PRESSED == UIState.PRESSED) * But, please be awared, for the normal state check, the equal should be used directly. * if (currentStates == UIState.NORMAL) * * @typedef { function } UIStatesChangeHandler * @param { FrameNode } node - Current node which is triggering the state change. * @param { number } currentUIStates - Current UI states when the handler is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ declare type UIStatesChangeHandler = (node: FrameNode, currentUIStates: number) => void; /** * Defines FrameNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Defines FrameNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ /** * Defines FrameNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ export declare class FrameNode { /** * Constructor. * Constructor used to create a FrameNode. * * @param { UIContext } uiContext - uiContext used to create the FrameNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Constructor. * Constructor used to create a FrameNode. * * @param { UIContext } uiContext - uiContext used to create the FrameNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ constructor(uiContext: UIContext); /** * Get the RenderNode in FrameNode. * * @returns { RenderNode | null } - Returns a RenderNode inside the FrameNode, or null if not contained. * If the current FrameNode does not hold any RenderNode, null is returned. * If the current FrameNode is a node created by a declarative component, null is returned. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Get the RenderNode in FrameNode. * * @returns { RenderNode | null } - Returns a RenderNode inside the FrameNode, or null if not contained. * If the current FrameNode does not hold any RenderNode, null is returned. * If the current FrameNode is a node created by a declarative component, null is returned. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getRenderNode(): RenderNode | null; /** * Return a flag to indicate whether the current FrameNode can be modified. Indicates whether the FrameNode supports appendChild, insertChildAfter, removeChild, clearChildren. * * @returns { boolean } - Returns true if the FrameNode can be modified, otherwise return false. * When false is returned, the FrameNode does not support the appendChild, insertChildAfter, removeChild, * and clearChildren operations. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ isModifiable(): boolean; /** * Add child to the end of the FrameNode's children. * If this FrameNode is not modifiable, an exception is thrown. * When appendChild is called, typeNode validates the type or number of child nodes. * If the validation fails, an exception is thrown. For specific limitations, see typeNode. * * @param { FrameNode } node - The node will be added. * The child node cannot be one created declaratively, which is not modifiable. * Only declarative nodes obtained from a BuilderNode can be used as child nodes. * If the child node does not meet the specifications, an exception is thrown. * The FrameNode cannot have a parent node. Otherwise, an exception is thrown. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ appendChild(node: FrameNode): void; /** * Add child to the current FrameNode. * If this FrameNode is not modifiable, an exception is thrown. * * @param { FrameNode } child - The node will be added. * The child node cannot be a declarative node, that is, a FrameNode that cannot be modified. * Only declarative nodes obtained from a BuilderNode can be used as child nodes. * If the child node does not meet the specifications, an exception is thrown. * The child node cannot have a parent node. Otherwise, an exception is thrown. * @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. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ insertChildAfter(child: FrameNode, sibling: FrameNode | null): void; /** * Remove child from the current FrameNode. * If this FrameNode is not modifiable, an exception is thrown. * * @param { FrameNode } node - The node will be removed. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ removeChild(node: FrameNode): void; /** * Clear children of the current FrameNode. * If this FrameNode is not modifiable, an exception is thrown. * * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ clearChildren(): void; /** * Get a child of the current FrameNode by index. * * @param { number } index - The index of the desired node in the children of FrameNode. * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ getChild(index: number): FrameNode | null; /** * Get a child of the current FrameNode by index. * * @param { number } index - The index of the desired node in the children of FrameNode. * @param { ExpandMode } expandMode - The expand mode. Default value is ExpandMode.EXPAND. * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 15 */ getChild(index: number, expandMode?: ExpandMode): FrameNode | null; /** * Get a child of the current FrameNode by index. * * @param { number } index - The index of the desired node in the children of FrameNode. * @param { ExpandMode | undefined } expandMode - The expand mode. Default value is ExpandMode.EXPAND. * @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ getChild(index: number, expandMode?: ExpandMode | undefined): FrameNode | null; /** * Get the index of the current FrameNode's first child node which is on the tree. * The child node sequence numbers are calculated based on all child nodes. * * @returns { number } - Returns the index of the current FrameNode's first child node which is on the tree. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ getFirstChildIndexWithoutExpand(): number; /** * Get the index of the current FrameNode's last child node which is on the tree. * The child node sequence numbers are calculated based on all child nodes. * * @returns { number } - Returns the index of the current FrameNode's last child node which is on the tree. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ getLastChildIndexWithoutExpand(): number; /** * Get the first child of the current FrameNode. * * @returns { FrameNode | null } - Returns a FrameNode, which is first child of the current FrameNode. If current FrameNode does not have child node, returns null. * If current FrameNode does not have child node, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getFirstChild(): FrameNode | null; /** * Get the next sibling node of the current FrameNode. * * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have next sibling node, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getNextSibling(): FrameNode | null; /** * Get the previous sibling node of the current FrameNode. * * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have previous sibling node, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPreviousSibling(): FrameNode | null; /** * Get the parent node of the current FrameNode. * * @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have parent node, returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getParent(): FrameNode | null; /** * Get the children count of the current FrameNode. * * @returns { number } - Returns the number of the children of the current FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getChildrenCount(): number; /** * Move node to the target Framenode as child. * If this FrameNode is not modifiable, an exception is thrown. * When targetParent is a typeNode, the API validates the type or number of child nodes. * If the validation fails, an exception is thrown. For specific limitations, see typeNode. * *

NOTE: *
Currently, only the following types of TypedFrameNode are supported for the movement operations: Stack, XComponent. *

* * @param { FrameNode } targetParent - The target parent node. * The target parent node must not be a declaratively created node, that is, a FrameNode that is not modifiable. * If it does not meet the specifications, an exception is thrown. * @param { number } [index] - The index which the node is moved to. If the value is a negative number or invalid, * the node is moved to the end of the target parent node. Moves to the end of the target parent node by default. * If the target FrameNode has n nodes, the value range for index is 0 to n-1. * Default value: -1 * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'18','1.2':'20' } * @arkts 1.1&1.2 */ moveTo(targetParent: FrameNode, index?: number): void; /** * Dispose the FrameNode immediately. * *

NOTE: *
After the dispose API is called, the FrameNode object no longer corresponds to any entity FrameNode. *
In this case, attempts to call certain query APIs, such as getMeasuredSize and getLayoutPosition, *
will result in a JS crash in the application. *
To check whether the current FrameNode object corresponds to an entity FrameNode, you can use getUniqueId API. *
A UniqueId value greater than 0 indicates that the object is associated with an entity FrameNode. *

* * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ dispose(): void; /** * Get the position of the node relative to window, in vp. * * @returns { Position } - Returns position of the node relative to window, in vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPositionToWindow(): Position; /** * Get the position of the node relative to its parent, in vp. * * @returns { Position } - Returns position of the node relative to its parent, in vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPositionToParent(): Position; /** * Get the size of the FrameNode after measure, with unit PX. * * @returns { Size } - Returns the size of the FrameNode after measure, with unit PX. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getMeasuredSize(): Size; /** * Get the offset to the parent of the FrameNode after layout, with unit PX. * The offset is the result of the parent component's layout on this node; * therefore, the offset attribute that takes effect after layout and the position attribute that does not * participate in layout do not affect this offset value. * * @returns { Position } - Returns the offset to the parent of the FrameNode after layout, with unit PX. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getLayoutPosition(): Position; /** * Get the user config border width of the FrameNode. * * @returns { Edges } - Returns the user config border width of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getUserConfigBorderWidth(): Edges; /** * Get the user config padding of the FrameNode. * * @returns { Edges } - Returns the user config padding of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getUserConfigPadding(): Edges; /** * Get the user config margin of the FrameNode. * * @returns { Edges } - Returns the user config margin of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getUserConfigMargin(): Edges; /** * Get the user config size of the FrameNode. * * @returns { SizeT } - Returns the user config size of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getUserConfigSize(): SizeT; /** * Get the id of the FrameNode. * * @returns { string } - Returns the id of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getId(): string; /** * Get the unique id of the FrameNode. * * @returns { number } - Returns the unique id of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getUniqueId(): number; /** * Get the type of the FrameNode. The type is the name of component, for example, the nodeType of Button is "Button", * and the nodeType of custom component is "__Common__". * * @returns { string } - Returns the type of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getNodeType(): string; /** * Get the opacity of the FrameNode. * The minimum value is 0, and the maximum value is 1. * * @returns { number } - Returns the opacity of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getOpacity(): number; /** * Get if the FrameNode is visible. * * @returns { boolean } - Returns if the FrameNode is visible. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ isVisible(): boolean; /** * Get if the FrameNode is clip to frame. * This API returns true after the dispose API is called to release the reference to the FrameNode. * * @returns { boolean } - Returns if the FrameNode is clip to frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ isClipToFrame(): boolean; /** * Get if the FrameNode is attached to the root node tree. * * @returns { boolean } - Returns if the FrameNode is attached to the root node tree. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ isAttached(): boolean; /** * Get if the node is disposed. * * @returns { boolean } - Returns true if the node is disposed, false otherwise. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ isDisposed(): boolean; /** * Get the inspector information of the FrameNode. * Obtains the structure information of the node, which is consistent with what is found in DevEco Studio's built-in * ArkUI Inspector tool. * * @returns { Object } - Returns the inspector information of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getInspectorInfo(): Object; /** * * Get the custom property of the component corresponding to this FrameNode. * * @param { string } name - the name of the custom property. * @returns { Object | undefined } - Returns the value of the custom property. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getCustomProperty(name: string): Object | undefined; /** * Set commonEvent response to the current FrameNode. * The set basic events will compete with declaratively defined events for event handling without overriding them. * If two event callbacks are set at the same time, the callback for the declaratively defined event is prioritized. * In scenarios involving LazyForEach, where nodes may be destroyed and reconstructed, you need to reset or re-attach * event listeners to the newly created nodes to ensure they respond to events correctly. * * @returns { UICommonEvent } - Returns a Object inside the FrameNode, which is used to set callbacks about different events. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ get commonEvent(): UICommonEvent; /** * Get gestureEvent of the current FrameNode. * Gesture events set using the gestureEvent API will not override gestures bound using the declarative gesture API. * If both APIs are used to set gestures, the declarative API takes precedence. * * @returns { UIGestureEvent } - Returns a Object inside the FrameNode, which is used to set callbacks about different gesture events. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'14','1.2':'20' } * @arkts 1.1&1.2 */ get gestureEvent(): UIGestureEvent; /** * Get the CommonAttribute of the current FrameNode. * Note that only the attributes of a custom node can be modified. * *

NOTE: *
The visual representation of the FrameNode is similar to that of a Stack container that is aligned to the top start edge. *
For details about the supported attributes, see CommonModifier. *

* * @returns { CommonAttribute } - Returns the CommonAttribute which is used to modify the common attributes of the FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ get commonAttribute(): CommonAttribute; /** * Draw Method. Executed when the current FrameNode is rendering its content. * * @param { DrawContext } context - The DrawContext will be used when executed draw method. * The self-drawing area cannot exceed the component's own size. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onDraw?(context: DrawContext): void; /** * Method to measure the FrameNode and its content to determine the measured size. Use this method to override the * default measure method when measuring the FrameNode. * * @param { LayoutConstraint } constraint - The layout constraint of the node, will be used when executed measure * method. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ onMeasure(constraint: LayoutConstraint): void; /** * Method to assign a position to the FrameNode and each of its children. Use this method to override the * default layout method. * It can be used to specify how the FrameNode and its child nodes are positioned and sized within the layout. * * @param { Position } position - The position of the node, will be used when executed layout method. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ onLayout(position: Position): void; /** * Set the size of the FrameNode after measure, with unit PX. * If the configured width and height are negative numbers, the value is automatically set to 0. * * @param { Size } size - The size of the FrameNode after measure. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ setMeasuredSize(size: Size): void; /** * Set the position to the parent of the FrameNode after layout, with unit PX. * * @param { Position } position - The position to the parent of the FrameNode after layout. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ setLayoutPosition(position: Position): void; /** * This is called to find out how big the FrameNode should be. The parent node supplies constraint information. The * actual measurement work of the FrameNode is performed in onMeasure or the default measure method. * * @param { LayoutConstraint } constraint - The layout constraint of the node, supplied by the parent node. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ measure(constraint: LayoutConstraint): void; /** * This is called to assign position to the FrameNode and all of its descendants. The position is used to init * the position of the frameNode, and the actual layout work of FrameNode is performed in onLayout or the default * layout method. * * @param { Position } position - The position of the node, will be used when executed the layout method. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ layout(position: Position): void; /** * Mark the frame node as need layout, so that it will be relaid out in the next frame. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ setNeedsLayout(): void; /** * Invalidate the RenderNode in the FrameNode, which will cause a re-render of the RenderNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ invalidate(): void; /** * Get the position of the node relative to screen, in vp. * * @returns { Position } - Returns position of the node relative to screen, in vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPositionToScreen(): Position; /** * Get the position of the node relative to unified display, in vp. * * @returns { Position } - Returns position of the node relative to unified display, in vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ getGlobalPositionOnDisplay(): Position; /** * Get the position of the node relative to window with transform, in vp. * * @returns { Position } - Returns position of the node relative to window with transform, in vp. * If other drawing attributes (such as transform and translate) are set, the return value may slightly deviate * due to the precision of floating point numbers. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPositionToWindowWithTransform(): Position; /** * Get the position of the node relative to its parent with transform, in vp. * The coordinates returned are the coordinates of the upper left corner during layout after transformation. * * @returns { Position } - Returns position of the node relative to its parent with transform, in vp. * If other drawing attributes (such as transform and translate) are set, the return value may slightly deviate * due to the precision of floating point numbers. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPositionToParentWithTransform(): Position; /** * Get the position of the node relative to screen with transform, in vp. * The coordinates returned are the coordinates of the upper left corner during layout after transformation. * * @returns { Position } - Returns position of the node relative to screen with transform, in vp. * If other drawing attributes (such as transform and translate) are set, the return value may slightly deviate * due to the precision of floating point numbers. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getPositionToScreenWithTransform(): Position; /** * Detach from parent and dispose all child recursively. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ disposeTree(): void; /** * Mount ComponentContent to FrameNode. * The current node must be modifiable, which means the return value of isModifiable must be true. * If the node is not modifiable, an exception is thrown. * * @param { ComponentContent } content - Newly added ComponentContent. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ addComponentContent(content: ComponentContent): void; /** * Mount ComponentContent to FrameNode. * * @param { ComponentContent } content - Newly added ComponentContent. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ addComponentContent(content: ComponentContent): void; /** * Set the cross-language options of the target FrameNode. * This API allows you to specify whether a FrameNode created in ArkTS can be accessed or modified by non-ArkTS languages. * If the current FrameNode is not modifiable or does not support setting cross-language access options, an exception will be thrown. * *

NOTE: *
Currently, only Scroll type TypedFrameNode supports setting cross-language access options. *

* * @param { CrossLanguageOptions } options - The cross-language options. * @throws { BusinessError } 100022 - The FrameNode cannot be set whether to support cross-language common attribute setting. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ setCrossLanguageOptions(options: CrossLanguageOptions): void; /** * Get the cross-language options of the target FrameNode. * This API allows you to check whether a FrameNode created in ArkTS can be accessed or modified by non-ArkTS languages. * * @returns { CrossLanguageOptions } - Returns the cross-language options of the target FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'15','1.2':'20' } * @arkts 1.1&1.2 */ getCrossLanguageOptions(): CrossLanguageOptions; /** * Recycle current FrameNode From JsFrameNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'18','1.2':'20' } * @arkts 1.1&1.2 */ recycle(): void; /** * Reuse current FrameNode From JsFrameNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'18','1.2':'20' } * @arkts 1.1&1.2 */ reuse(): void; /** * Gets event binding information of the target node. * * @param { EventQueryType } eventType - The interaction event type to be queried. * @returns { InteractionEventBindingInfo | undefined } * - Returns one InteractionEventBindingInfo object indicating the event binding details if any interaction * events binded on current node, returns undefined if no one binded on. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 19 */ getInteractionEventBindingInfo(eventType: EventQueryType): InteractionEventBindingInfo | undefined; /** * Adds the polymorphic style states supported by the component. To handle states efficiently, specify the * states of interest and the corresponding handler. When a state of interest occurs, the handler will be executed. * - You can adjust the UI style based on the current state within the callback. If this API is called multiple * times on the same node, the last set of states and handler will take precedence. * - Some component types have default system handling for certain states. For example, the Button * component has a default style effect for the PRESSED state. When custom state handling is implemented on such * components, the default style effect will be applied first, followed by the custom style changes, resulting in * a combined effect. To disable the default style effects, set excludeInner to true, if this is allowed * by the system implementation. * - And when this API is called, the provided handler function will be executed immediately. * - There is no need to explicitly register a listener for the NORMAL state. Once a non-NORMAL state is registered, * the system will automatically notify your application when the state changes back to NORMAL. * * @param { number } uiStates - The target UI state the node need to handle. * The combination of all target states can be calculated by the OR operation, * e.g. targetUIStates = UIState.PRESSED | UIState.FOCUSED. * @param { UIStatesChangeHandler } statesChangeHandler - The UI state chhanging handling function. * @param { boolean } [excludeInner] - The flag to forbid the inner default state style handling, default is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ addSupportedUIStates(uiStates: number, statesChangeHandler: UIStatesChangeHandler, excludeInner?: boolean): void; /** * Removes registered UI states. When all states registered using OH_ArkUI_AddSupportedUIStates * are removed, the registered stateChangeHandler will no longer be executed. * * @param { number } uiStates - The target UI state the node need to remove from. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ removeSupportedUIStates(uiStates: number): void; /** * create property animation in FrameNode. * * @param { AnimationPropertyType } property - enumeration of property that produces the animation. * @param { Optional } startValue - start value of animation. * Undefined means that the last final value is used as the starting value of the animation, * and it is recommended to set undefined if the property already has a value. * @param { number[] } endValue - end value of animation. * @param { AnimateParam } param - param of animation. * @returns { boolean } whether the createAnimation operation is successful. For example, * if the array lengths of startValue and endValue do not match the data lengths required by type, creating animation fails. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ createAnimation(property: AnimationPropertyType, startValue: Optional, endValue: number[], param: AnimateParam): boolean; /** * request to cancel all animations on specified properties. It blocks synchronously to wait for the cancellation result. * If the cancellation is successful, the corresponding properties on the node are restored to the cancelled value. * * @param { AnimationPropertyType[] } properties - animation property types to cancel. * @returns { boolean } whether the cancel operation is successful. For example, * if ipc fails, canceling the animation fails. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ cancelAnimations(properties: AnimationPropertyType[]): boolean; /** * get property value from node. * * @param { AnimationPropertyType } property - animation property type to get value. * @returns { number[] } - the property value on the node. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ getNodePropertyValue(property: AnimationPropertyType): number[]; } /** * Used to define the FrameNode type. * *

NOTE: *
The commonAttribute API is only effective on CustomFrameNode. *
For TypedFrameNode, the behavior of commonAttribute is undefined. *
For setting universal attributes, it is recommended that you use the attribute API, *
such as node.attribute.backgroundColor(Color.Pink), rather than commonAttribute. *

* * @extends FrameNode * @interface TypedFrameNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ export interface TypedFrameNode extends FrameNode { /** * Initialize FrameNode. * * @type { C } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ initialize: C; /** * Get attribute instance of FrameNode to set attributes. * * @type { T } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ readonly attribute: T; } /** * Used to define the FrameNode type. * * @extends FrameNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ export declare abstract class TypedFrameNode extends FrameNode { /** * Get attribute instance of FrameNode to set attributes. * * @returns { T } - Returns the attribute instance of FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ get attribute(): T; } /** * Provides methods to implement FrameNode. * When typeNode is used to create nodes such as Text, Image, Select, or Toggle, if the UIContext instance * corresponding to the passed UIContext is destroyed, calling this API will return an invalid FrameNode. * This invalid node cannot be properly mounted or displayed. * * @namespace typeNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ /** * Provides methods to implement FrameNode. * * @namespace typeNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts{ '1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ export declare namespace typeNode { /** * Define the FrameNode type for Text. * *

NOTE: *
TextInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Text component. *
TextAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Text component. *

* * @typedef { TypedFrameNode } Text * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Text = TypedFrameNode; /** * Create a FrameNode of Text type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Text' } nodeType - node type. * @returns { Text } - Return Text type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Text'): Text; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Text' } nodeType - node type. * @returns { TextAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Text'): TextAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { TextController } controller - the controller which is bind to the target FrameNode. * @param { 'Text' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: TextController, nodeType: 'Text'): void; /** * Define the FrameNode type for Column. * *

NOTE: *
ColumnInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Column component. *
ColumnAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Column component. *

* * @typedef { TypedFrameNode } Column * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Column = TypedFrameNode; /** * Create a FrameNode of Column type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Column' } nodeType - node type. * @returns { Column } - Return Column type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Column'): Column; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Column' } nodeType - node type. * @returns { ColumnAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Column'): ColumnAttribute | undefined; /** * Define the FrameNode type for Row. * *

NOTE: *
RowInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Row component. *
RowAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Row component. *

* * @typedef { TypedFrameNode } Row * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Row = TypedFrameNode; /** * Create a FrameNode of Row type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Row' } nodeType - node type. * @returns { Row } - Return Row type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Row'): Row; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Row' } nodeType - node type. * @returns { RowAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Row'): RowAttribute | undefined; /** * Define the FrameNode type for Stack. * *

NOTE: *
StackInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Stack component. *
StackAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Stack component. *

* * @typedef { TypedFrameNode } Stack * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Stack = TypedFrameNode; /** * Create a FrameNode of Stack type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Stack' } nodeType - node type. * @returns { Stack } - Return Stack type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Stack'): Stack; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Stack' } nodeType - node type. * @returns { StackAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Stack'): StackAttribute | undefined; /** * Define the FrameNode type for GridRow. * *

NOTE: *
GridRowInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the GridRow component. *
GridRowAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the GridRow component. *

* * @typedef { TypedFrameNode } GridRow * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type GridRow = TypedFrameNode; /** * Create a FrameNode of GridRow type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'GridRow' } nodeType - node type. * @returns { GridRow } - Return GridRow type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'GridRow'): GridRow; /** * Define the FrameNode type for GridCol. * *

NOTE: *
GridColInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the GridCol component. *
GridColAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the GridCol component. *

* * @typedef { TypedFrameNode } GridCol * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type GridCol = TypedFrameNode; /** * Create a FrameNode of GridCol type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'GridCol' } nodeType - node type. * @returns { GridCol } - Return GridCol type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'GridCol'): GridCol; /** * Define the FrameNode type for Flex. * *

NOTE: *
FlexInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Flex component. *
FlexAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Flex component. *

* * @typedef { TypedFrameNode } Flex * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Flex = TypedFrameNode; /** * Create a FrameNode of Flex type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Flex' } nodeType - node type. * @returns { Flex } - Return Flex type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Flex'): Flex; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Flex' } nodeType - node type. * @returns { FlexAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Flex'): FlexAttribute | undefined; /** * Define the FrameNode type for Swiper. * *

NOTE: *
SwiperInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Swiper component. *
SwiperAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Swiper component. *

* * @typedef { TypedFrameNode } Swiper * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Swiper = TypedFrameNode; /** * Create a FrameNode of Swiper type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Swiper' } nodeType - node type. * @returns { Swiper } - Return Swiper type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Swiper'): Swiper; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Swiper' } nodeType - node type. * @returns { SwiperAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Swiper'): SwiperAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { SwiperController } controller - the controller which is bind to the target FrameNode. * @param { 'Swiper' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: SwiperController, nodeType: 'Swiper'): void; /** * Define the FrameNode type for Progress. * *

NOTE: *
ProgressInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Progress component. *
ProgressAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Progress component. *

* * @typedef { TypedFrameNode } Progress * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Progress = TypedFrameNode; /** * Create a FrameNode of Progress type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Progress' } nodeType - node type. * @returns { Progress } - Return Progress type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Progress'): Progress; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Progress' } nodeType - node type. * @returns { ProgressAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Progress'): ProgressAttribute | undefined; /** * Define the FrameNode type for Scroll. * *

NOTE: *
ScrollInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Scroll component. *
ScrollAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Scroll component. *

* * @typedef { TypedFrameNode } Scroll * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Scroll = TypedFrameNode; /** * Create a FrameNode of Scroll type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Scroll' } nodeType - node type. * @returns { Scroll } - Return Scroll type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Scroll'): Scroll; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Scroll' } nodeType - node type. * @returns { ScrollAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 15 */ function getAttribute(node: FrameNode, nodeType: 'Scroll'): ScrollAttribute | undefined; /** * Get the event instance of Scroll node. * * @param { FrameNode } node - the target FrameNode. * @param { 'Scroll' } nodeType - node type. * @returns { UIScrollEvent | undefined } - Return the event instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 19 */ function getEvent(node: FrameNode, nodeType: 'Scroll'): UIScrollEvent | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { Scroller } controller - the controller which is bind to the target FrameNode. * @param { 'Scroll' } nodeType - node type. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. the type of the node is error. * 2. the node is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 15 */ function bindController(node: FrameNode, controller: Scroller, nodeType: 'Scroll'): void; /** * Define the FrameNode type for RelativeContainer. * *

NOTE: *
RelativeContainerInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the RelativeContainer component. *
RelativeContainerAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the RelativeContainer component. *

* * @typedef { TypedFrameNode } RelativeContainer * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type RelativeContainer = TypedFrameNode; /** * Create a FrameNode of RelativeContainer type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'RelativeContainer' } nodeType - node type. * @returns { RelativeContainer } - Return RelativeContainer type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'RelativeContainer'): RelativeContainer; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'RelativeContainer' } nodeType - node type. * @returns { RelativeContainerAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'RelativeContainer'): RelativeContainerAttribute | undefined; /** * Define the FrameNode type for Divider. * *

NOTE: *
DividerInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Divider component. *
DividerAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Divider component. *

* * @typedef { TypedFrameNode } Divider * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Divider = TypedFrameNode; /** * Create a FrameNode of Divider type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Divider' } nodeType - node type. * @returns { Divider } - Return Divider type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Divider'): Divider; /** * Define the FrameNode type for LoadingProgress. * *

NOTE: *
LoadingProgressInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the LoadingProgress component. *
LoadingProgressAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the LoadingProgress component. *

* * @typedef { TypedFrameNode } LoadingProgress * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type LoadingProgress = TypedFrameNode; /** * Create a FrameNode of LoadingProgress type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'LoadingProgress' } nodeType - node type. * @returns { LoadingProgress } - Return LoadingProgress type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'LoadingProgress' } nodeType - node type. * @returns { LoadingProgressAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'LoadingProgress'): LoadingProgressAttribute | undefined; /** * Define the FrameNode type for Search. * *

NOTE: *
SearchInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Search component. *
SearchAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Search component. *

* * @typedef { TypedFrameNode } Search * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Search = TypedFrameNode; /** * Create a FrameNode of Search type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Search' } nodeType - node type. * @returns { Search } - Return Search type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Search'): Search; /** * Define the FrameNode type for Blank. * *

NOTE: *
BlankInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Blank component. *
BlankAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Blank component. *

* * @typedef { TypedFrameNode } Blank * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Blank = TypedFrameNode; /** * Create a FrameNode of Blank type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Blank' } nodeType - node type. * @returns { Blank } - Return Blank type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Blank'): Blank; /** * Define the FrameNode type for Image. * *

NOTE: *
ImageInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Image component. *
ImageAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Image component. *

* * @typedef { TypedFrameNode } Image * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Image = TypedFrameNode; /** * Create a FrameNode of Image type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Image' } nodeType - node type. * @returns { Image } - Return Image type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Image'): Image; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Image' } nodeType - node type. * @returns { ImageAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Image'): ImageAttribute | undefined; /** * Define the FrameNode type for List. * *

NOTE: *
ListInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the List component. *
ListAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the List component. *

* * @typedef { TypedFrameNode } List * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type List = TypedFrameNode; /** * Define the List type of FrameNode. * * @extends TypedFrameNode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ abstract class ListFrameNode extends TypedFrameNode { /** * Initialize FrameNode. * * @param { ListOptions } [options] - list options * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ abstract initialize(options?: ListOptions): ListAttribute; } /** * Define the FrameNode type for List. * * @typedef { ListFrameNode } List * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ type List = ListFrameNode; /** * Create a FrameNode of List type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'List' } nodeType - node type. * @returns { List } - Return List type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'List'): List; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'List' } nodeType - node type. * @returns { ListAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'List'): ListAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { Scroller } controller - the controller which is bind to the target FrameNode. * @param { 'List' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: Scroller, nodeType: 'List'): void; /** * Define the FrameNode type for ListItem. * *

NOTE: *
ListItemInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the ListItem component. *
ListItemAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the ListItem component. *

* * @typedef { TypedFrameNode } ListItem * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type ListItem = TypedFrameNode; /** * Get the event instance of Scroll node. * * @param { FrameNode } node - the target FrameNode. * @param { 'List' } nodeType - node type. * @returns { UIListEvent | undefined } - Return the event instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 19 */ function getEvent(node: FrameNode, nodeType: 'List'): UIListEvent | undefined; /** * Create a FrameNode of ListItem type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'ListItem' } nodeType - node type. * @returns { ListItem } - Return ListItem type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'ListItem'): ListItem; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'ListItem' } nodeType - node type. * @returns { ListItemAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'ListItem'): ListItemAttribute | undefined; /** * Define the FrameNode type for TextInput. * *

NOTE: *
TextInputInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the TextInput component. *
TextInputAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the TextInput component. *

* * @typedef { TypedFrameNode } TextInput * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type TextInput = TypedFrameNode; /** * Create a FrameNode of TextInput type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'TextInput' } nodeType - node type. * @returns { TextInput } - Return TextInput type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'TextInput'): TextInput; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'TextInput' } nodeType - node type. * @returns { TextInputAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'TextInput'): TextInputAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { TextInputController } controller - the controller which is bind to the target FrameNode. * @param { 'TextInput' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: TextInputController, nodeType: 'TextInput'): void; /** * Define the FrameNode type for Button. * *

NOTE: *
ButtonInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Button component. *
ButtonAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Button component. *
If a value is specified for the label parameter, a Button component is created in label mode. * This component cannot contain child components, and any attempt to set child components will result in an exception. * The mode in which the Button component is created cannot be dynamically modified in subsequent initialize calls. * As such, to include child components, do not set the label parameter during the first initialize call. * When created in child component mode, a Button component can contain a single child component. * Any attempt to set multiple child components will result in an exception. *

* * @typedef { TypedFrameNode } Button * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type Button = TypedFrameNode; /** * Create a FrameNode of Button type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Button' } nodeType - node type. * @returns { Button } - Return Button type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'Button'): Button; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Button' } nodeType - node type. * @returns { ButtonAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Button'): ButtonAttribute | undefined; /** * Define the FrameNode type for ListItemGroup. * *

NOTE: *
ListItemGroupInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the ListItemGroup component. *
ListItemGroupAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the ListItemGroup component. *

* * @typedef { TypedFrameNode } ListItemGroup * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type ListItemGroup = TypedFrameNode; /** * Create a FrameNode of ListItemGroup type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'ListItemGroup' } nodeType - node type. * @returns { ListItemGroup } - Return ListItemGroup type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'ListItemGroup'): ListItemGroup; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'ListItemGroup' } nodeType - node type. * @returns { ListItemGroupAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'ListItemGroup'): ListItemGroupAttribute | undefined; /** * Define the FrameNode type for WaterFlow. * *

NOTE: *
WaterFlowInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the WaterFlow component. *
WaterFlowAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the WaterFlow component. *

* * @typedef { TypedFrameNode } WaterFlow * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type WaterFlow = TypedFrameNode; /** * Create a FrameNode of WaterFlow type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'WaterFlow' } nodeType - node type. * @returns { WaterFlow } - Return WaterFlow type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'WaterFlow'): WaterFlow; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'WaterFlow' } nodeType - node type. * @returns { WaterFlowAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'WaterFlow'): WaterFlowAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { Scroller } controller - the controller which is bind to the target FrameNode. * @param { 'WaterFlow' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: Scroller, nodeType: 'WaterFlow'): void; /** * Get the event instance of Scroll node. * * @param { FrameNode } node - the target FrameNode. * @param { 'WaterFlow' } nodeType - node type. * @returns { UIWaterFlowEvent | undefined } - Return the event instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 19 */ function getEvent(node: FrameNode, nodeType: 'WaterFlow'): UIWaterFlowEvent | undefined; /** * Define the FrameNode type for FlowItem. * *

NOTE: *
FlowItemInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the FlowItem component. *
FlowItemAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the FlowItem component. *

* * @typedef { TypedFrameNode } FlowItem * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type FlowItem = TypedFrameNode; /** * Create a FrameNode of FlowItem type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'FlowItem' } nodeType - node type. * @returns { FlowItem } - Return FlowItem type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'FlowItem'): FlowItem; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'FlowItem' } nodeType - node type. * @returns { FlowItemAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'FlowItem'): FlowItemAttribute | undefined; /** * Define the FrameNode type for XComponent. * *

NOTE: *
XComponentInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the XComponent component. *
XComponentAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the XComponent component. *

* * @typedef { TypedFrameNode } XComponent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type XComponent = TypedFrameNode; /** * Create a FrameNode of XComponent type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'XComponent' } nodeType - node type. * @returns { XComponent } - Return XComponent type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'XComponent'): XComponent; /** * Create a FrameNode of XComponent type with options. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'XComponent' } nodeType - node type. * @param { XComponentOptions } options - initialization parameters. * @returns { XComponent } - Return XComponent type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ function createNode(context: UIContext, nodeType: 'XComponent', options: XComponentOptions): XComponent; /** * Create a FrameNode of XComponent type with options for native developing. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'XComponent' } nodeType - node type. * @param { NativeXComponentParameters } parameters - initialization parameters. * @returns { XComponent } - Return XComponent type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 19 */ function createNode(context: UIContext, nodeType: 'XComponent', parameters: NativeXComponentParameters): XComponent; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'XComponent' } nodeType - node type. * @returns { XComponentAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'XComponent'): XComponentAttribute | undefined; /** * Define the FrameNode type for Checkbox. * *

NOTE: *
CheckboxInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Checkbox component. *
CheckboxAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Checkbox component. *

* * @typedef { TypedFrameNode } Checkbox * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type Checkbox = TypedFrameNode; /** * Create a FrameNode of Checkbox type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Checkbox' } nodeType - node type. * @returns { Checkbox } - Return Checkbox type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'Checkbox'): Checkbox; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Checkbox' } nodeType - node type. * @returns { CheckboxAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Checkbox'): CheckboxAttribute | undefined; /** * Define the FrameNode type for CheckboxGroup. * *

NOTE: *
CheckboxGroupInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the CheckboxGroup component. *
CheckboxGroupAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the CheckboxGroup component. *

* * @typedef { TypedFrameNode } CheckboxGroup * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type CheckboxGroup = TypedFrameNode; /** * Create a FrameNode of CheckboxGroup type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'CheckboxGroup' } nodeType - node type. * @returns { CheckboxGroup } - Return CheckboxGroup type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'CheckboxGroup'): CheckboxGroup; /** * Define the FrameNode type for Radio. * *

NOTE: *
RadioInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Radio component. *
RadioAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Radio component. *

* * @typedef { TypedFrameNode } Radio * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type Radio = TypedFrameNode; /** * Create a FrameNode of Radio type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Radio' } nodeType - node type. * @returns { Radio } - Return Radio type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'Radio'): Radio; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Radio' } nodeType - node type. * @returns { RadioAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Radio'): RadioAttribute | undefined; /** * Define the FrameNode type for Rating. * *

NOTE: *
RatingInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Rating component. *
RatingAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Rating component. *

* * @typedef { TypedFrameNode } Rating * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type Rating = TypedFrameNode; /** * Create a FrameNode of Rating type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Rating' } nodeType - node type. * @returns { Rating } - Return Rating type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'Rating'): Rating; /** * Define the FrameNode type for Select. * *

NOTE: *
SelectInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Select component. *
SelectAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Select component. *

* * @typedef { TypedFrameNode } Select * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type Select = TypedFrameNode; /** * Create a FrameNode of Select type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Select' } nodeType - node type. * @returns { Select } - Return Select type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'Select'): Select; /** * Define the FrameNode type for Slider. * *

NOTE: *
SliderInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Slider component. *
SliderAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Slider component. *

* * @typedef { TypedFrameNode } Slider * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type Slider = TypedFrameNode; /** * Create a FrameNode of Slider type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Slider' } nodeType - node type. * @returns { Slider } - Return Slider type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'Slider'): Slider; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Slider' } nodeType - node type. * @returns { SliderAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Slider'): SliderAttribute | undefined; /** * Define the FrameNode type for Toggle. * *

NOTE: *
ToggleInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Toggle component. *
ToggleAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Toggle component. *

* * @typedef { TypedFrameNode } Toggle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ type Toggle = TypedFrameNode; /** * Create a FrameNode of Toggle type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Toggle' } nodeType - node type. * @param { ToggleOptions } [options] - ToggleOptions. * @returns { Toggle } - Return Toggle type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ function createNode(context: UIContext, nodeType: 'Toggle', options?: ToggleOptions): Toggle; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Toggle' } nodeType - node type. * @returns { ToggleAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Toggle'): ToggleAttribute | undefined; /** * Define the FrameNode type for Marquee. * *

NOTE: *
MarqueeInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Marquee component. *
MarqueeAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Marquee component. *

* * @typedef { TypedFrameNode } Marquee * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type Marquee = TypedFrameNode; /** * Create a FrameNode of Marquee type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Marquee' } nodeType - node type. * @returns { Marquee } - Return Marquee type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'Marquee'): Marquee; /** * Define the FrameNode type for TextArea. * *

NOTE: *
TextAreaInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the TextArea component. *
TextAreaAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the TextArea component. *

* * @typedef { TypedFrameNode } TextArea * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type TextArea = TypedFrameNode; /** * Create a FrameNode of TextArea type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'TextArea' } nodeType - node type. * @returns { TextArea } - Return TextArea type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'TextArea'): TextArea; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'TextArea' } nodeType - node type. * @returns { TextAreaAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'TextArea'): TextAreaAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { TextAreaController } controller - the controller which is bind to the target FrameNode. * @param { 'TextArea' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: TextAreaController, nodeType: 'TextArea'): void; /** * Define the FrameNode type for SymbolGlyph. * *

NOTE: *
SymbolGlyphInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the SymbolGlyph component. *
SymbolGlyphAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the SymbolGlyph component. *

* * @typedef { TypedFrameNode } SymbolGlyph * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type SymbolGlyph = TypedFrameNode; /** * Create a FrameNode of SymbolGlyph type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'SymbolGlyph' } nodeType - node type. * @returns { SymbolGlyph } - Return SymbolGlyph type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'SymbolGlyph'): SymbolGlyph; /** * Define the FrameNode type for QRCode. * *

NOTE: *
QRCodeInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the QRCode component. *
QRCodeAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the QRCode component. *

* * @typedef { TypedFrameNode } QRCode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type QRCode = TypedFrameNode; /** * Create a FrameNode of QRCode type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'QRCode' } nodeType - node type. * @returns { QRCode } - Return QRCode type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'QRCode'): QRCode; /** * Define the FrameNode type for Badge. * *

NOTE: *
BadgeInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Badge component. *
BadgeAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Badge component. *

* * @typedef { TypedFrameNode } Badge * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type Badge = TypedFrameNode; /** * Create a FrameNode of Badge type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Badge' } nodeType - node type. * @returns { Badge } - Return Badge type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'Badge'): Badge; /** * Define the FrameNode type for TextClock. * *

NOTE: *
TextClockInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the TextClock component. *
TextClockAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the TextClock component. *

* * @typedef { TypedFrameNode } TextClock * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type TextClock = TypedFrameNode; /** * Create a FrameNode of TextClock type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'TextClock' } nodeType - node type. * @returns { TextClock } - Return TextClock type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'TextClock'): TextClock; /** * Define the FrameNode type for TextTimer. * *

NOTE: *
TextTimerInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the TextTimer component. *
TextTimerAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the TextTimer component. *

* * @typedef { TypedFrameNode } TextTimer * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type TextTimer = TypedFrameNode; /** * Create a FrameNode of TextTimer type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'TextTimer' } nodeType - node type. * @returns { TextTimer } - Return TextTimer type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'TextTimer'): TextTimer; /** * Define the FrameNode type for Grid. * *

NOTE: *
GridInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the Grid component. *
GridAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the Grid component. *

* * @typedef { TypedFrameNode } Grid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type Grid = TypedFrameNode; /** * Create a FrameNode of Grid type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'Grid' } nodeType - node type. * @returns { Grid } - Return Grid type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'Grid'): Grid; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'Grid' } nodeType - node type. * @returns { GridAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'Grid'): GridAttribute | undefined; /** * Bind the controller of FrameNode. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, an exception is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { Scroller } controller - the controller which is bind to the target FrameNode. * @param { 'Grid' } nodeType - node type. * @throws { BusinessError } 100023 - Parameter error. Possible causes: 1. The component type of the node * is incorrect. 2. The node is null or undefined. 3. The controller is null or undefined. * @throws { BusinessError } 100021 - The FrameNode is not modifiable. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function bindController(node: FrameNode, controller: Scroller, nodeType: 'Grid'): void; /** * Get the event instance of Scroll node. * * @param { FrameNode } node - the target FrameNode. * @param { 'Grid' } nodeType - node type. * @returns { UIGridEvent | undefined } - Return the event instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 19 */ function getEvent(node: FrameNode, nodeType: 'Grid'): UIGridEvent | undefined; /** * Define the FrameNode type for GridItem. * *

NOTE: *
GridItemInterface is used as the input parameter of the initialize API of TypedFrameNode. *
The input parameter is of the constructor type for the GridItem component. *
GridItemAttribute is used as the return value of the attribute API of TypedFrameNode. *
It returns the attribute setting object of the GridItem component. *

* * @typedef { TypedFrameNode } GridItem * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ type GridItem = TypedFrameNode; /** * Create a FrameNode of GridItem type. * * @param { UIContext } context - uiContext used to create the FrameNode. * @param { 'GridItem' } nodeType - node type. * @returns { GridItem } - Return GridItem type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 */ function createNode(context: UIContext, nodeType: 'GridItem'): GridItem; /** * Get the attribute instance of FrameNode to set attributes. * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. * This API does not support declaratively created nodes. * * @param { FrameNode } node - the target FrameNode. * @param { 'GridItem' } nodeType - node type. * @returns { GridItemAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it * does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ export function getAttribute(node: FrameNode, nodeType: 'GridItem'): GridItemAttribute | undefined; } /** * Used for lazy loading of typeNode. * *

NOTE: * The input parameter cannot be a negative number; otherwise, no processing is performed. *

* * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ /** * Used for lazy loading of typeNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ export declare class NodeAdapter { /** * Constructor. * A constructor used to create a NodeAdapter object. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ constructor(); /** * Dispose the NodeAdapter immediately. * Bindings, if any, of the object will be cleared before the object is disposed of. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ dispose(): void; /** * Set the total number of node count. * * @param { number } count - The total number of node count. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ set totalNodeCount(count: number); /** * Get the total number of node count. * * @returns { number } - Return the total number of node count. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ get totalNodeCount(): number; /** * Define the operation of reloading all data. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ reloadAllItems(): void; /** * Define the data reload operation.Reload a specified amount of data starting from the index value. * * @param { number } start - Start loading index values for data. * @param { number } count - Load the number of data. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ reloadItem(start: number, count: number): void; /** * Define data deletion operations.Delete a specified amount of data starting from the index value. * * @param { number } start - Start deleting index values for data. * @param { number } count - Delete the number of data. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ removeItem(start: number, count: number): void; /** * Define data insertion operations.Insert a specified amount of data starting from the index value. * * @param { number } start - Start Insert index values for data. * @param { number } count - Insert the number of data. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ insertItem(start: number, count: number): void; /** * Define data movement operations. Move data from the starting index to the ending index. * * @param { number } from - Starting index value. * @param { number } to - End index value. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ moveItem(from: number, to: number): void; /** * Obtain all data results. * * @returns { Array } - Return all valid FrameNode collections. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ getAllAvailableItems(): Array; /** * This callback will be triggered when a FrameNode is bound. * * @param { FrameNode } target - The bound FrameNode node. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onAttachToNode?(target: FrameNode): void; /** * This callback will be triggered when the binding is released. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onDetachFromNode?(): void; /** * 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. * * @param { number } index - Load the index value of the data. * @returns { number } - Returning the developer's custom ID requires the developer to ensure its uniqueness. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onGetChildId?(index: number): number; /** * Call this callback when loading for the first time or when a new node slides in. * * @param { number } index - Load the index value of the data. * @returns { FrameNode } - Returns the FrameNode node that loads the node. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onCreateChild?(index: number): FrameNode; /** * Called when the child node is about to be destroyed. * * @param { number } id - The child node ID that is about to be destroyed. * @param { FrameNode } node - The FrameNode node that is about to be destroyed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onDisposeChild?(id: number, node: FrameNode): void; /** * Call this callback when reloading or reusing. * * @param { number } id - The child node ID that is about to be reloaded. * @param { FrameNode } node - Reused FrameNode nodes. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onUpdateChild?(id: number, node: FrameNode): void; /** * Add a NodeAdapter to bind to the node.A node can only be bound to one NodeAdapter. Binding failure returns false. * * @param { NodeAdapter } adapter - Define lazy loading classes. * @param { FrameNode } node - The bound FrameNode node. * @returns { boolean } Return the binding result. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ static attachNodeAdapter(adapter: NodeAdapter, node: FrameNode): boolean; /** * Remove the bound NodeAdapter from the node.A node can only be bound to one NodeAdapter. * * @param { FrameNode } node - Unbind the FrameNode node. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts { '1.1':'12','1.2':'20' } * @arkts 1.1&1.2 */ static detachNodeAdapter(node: FrameNode): void; /** * Get if the node is disposed. * * @returns { boolean } - Returns true if the node is disposed, false otherwise. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ isDisposed(): boolean; }