diff --git a/api/arkui/FrameNode.d.ets b/api/arkui/FrameNode.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..954a42b33992e90fc5f22313eda75c3bcd7a5305 --- /dev/null +++ b/api/arkui/FrameNode.d.ets @@ -0,0 +1,407 @@ +/* + * 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.2 */ +import { UIContext } from '@ohos.arkui.UIContext'; +import { UICommonEvent, UIGestureEvent, CommonAttribute } from './component/common' +import { ListOptions, ListAttribute } from './component/list' +import { QRCodeAttribute } from './component/qrcode'; +import { TextClockAttribute, TextClockOptions } from './component/textClock'; +import { SearchOptions, SearchAttribute } from './component/search'; +import { BadgeParamWithNumber, BadgeParamWithString, BadgeAttribute } from './component/badge'; +import { ProgressOptions, ProgressAttribute } from './component/progress'; +import { LoadingProgressAttribute } from './component/loadingProgress'; +import { TextTimerOptions, TextTimerAttribute } from './component/textTimer'; +/*** endif */ + +/** + * 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 { + /** + * overload for createNode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + overload createNode { createProgressNode, createLoadingProgressNode, createQRCodeNode, createBadgeNode, createTextClockNode, createTextTimerNode, createListNode }; + /** + * Define the Progress type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class ProgressFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { ProgressOptions } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: ProgressOptions): ProgressAttribute; + } + /** + * Define the FrameNode type for Progress. + * + * @typedef { ProgressFrameNode } Progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Progress = ProgressFrameNode; + + /** + * 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 20 + * @arkts 1.2 + */ + export function createProgressNode(context: UIContext, nodeType: 'Progress'): Progress; + + /** + * Define the LoadingProgress type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class LoadingProgressFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(): LoadingProgressAttribute; + } + + /** + * Define the FrameNode type for LoadingProgress. + * + * @typedef { LoadingProgressFrameNode } LoadingProgress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type LoadingProgress = LoadingProgressFrameNode; + + /** + * 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 20 + * @arkts 1.2 + */ + export function createLoadingProgressNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress; + + /** + * Define the QRCode type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class QRCodeFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: string): QRCodeAttribute; + } + /** + * Define the FrameNode type for QRCode. + * + * @typedef { QRCodeFrameNode } QRCode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type QRCode = QRCodeFrameNode; + + /** + * 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 20 + * @arkts 1.2 + */ + export function createQRCodeNode(context: UIContext, nodeType: 'QRCode'): QRCode; +/** + * Define the Badge type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class BadgeFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { BadgeParamWithNumber | BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute; + } + + /** + * Define the FrameNode type for Badge. + * + * @typedef { BadgeFrameNode } Badge + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Badge = BadgeFrameNode; + + /** + * 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 20 + * @arkts 1.2 + */ + export function createBadgeNode(context: UIContext, nodeType: 'Badge'): Badge; +/** + * Define the TextClock type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class TextClockFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { TextClockOptions } [options] - TextClock options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: TextClockOptions): TextClockAttribute; + } + + /** + * Define the FrameNode type for TextClock. + * + * @typedef { TextClockFrameNode } TextClock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type TextClock = TextClockFrameNode; + + /** + * Create a FrameNode of TextClock type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextClock' } nodeType - node type. + * @returns { TextClock } - Return List type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createTextClockNode(context: UIContext, nodeType: 'TextClock'): TextClock; +/** + * Define the TextTimer type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class TextTimerFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { TextTimerOptions } [options] - TextTimer options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: TextTimerOptions): TextTimerAttribute; + } + + /** + * Define the FrameNode type for TextTimer. + * + * @typedef { TextTimerFrameNode } TextTimer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type TextTimer = TextTimerFrameNode; + + /** + * 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 20 + * @arkts 1.2 + */ + export function createTextTimerNode(context: UIContext, nodeType: 'TextTimer'): TextTimer; + /** + * 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 12 + */ + /** + * 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':'20','1.2':'20'} + * @arkts 1.1&1.2 + */ + export function createListNode(context: UIContext, nodeType: 'List'): List; +} \ No newline at end of file diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index 2fc0e0f3384865cdbf9280ddab3ebc849055bc59..984aad26beb272b70859e3f3d03aa1e99a43a8b4 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -1405,43 +1405,6 @@ export declare namespace typeNode { */ 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. * @@ -1460,10 +1423,9 @@ export declare namespace typeNode { * @returns { List } - Return List type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ - export function createNode(context: UIContext, nodeType: 'List'): List; + function createNode(context: UIContext, nodeType: 'List'): List; /** * Define the FrameNode type for ListItem.