From b984df0d11c2cabcc6021dae8322544ee936b654 Mon Sep 17 00:00:00 2001 From: hehehe-li Date: Thu, 28 Aug 2025 21:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Earkts1.2=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6api=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hehehe-li --- api/arkui/component/pasteButton.static.d.ets | 182 ++++++++ api/arkui/component/saveButton.static.d.ets | 348 +++++++++++++++ .../component/securityComponent.static.d.ets | 414 ++++++++++++++++++ 3 files changed, 944 insertions(+) create mode 100644 api/arkui/component/pasteButton.static.d.ets create mode 100644 api/arkui/component/saveButton.static.d.ets create mode 100644 api/arkui/component/securityComponent.static.d.ets diff --git a/api/arkui/component/pasteButton.static.d.ets b/api/arkui/component/pasteButton.static.d.ets new file mode 100644 index 0000000000..35d6e90504 --- /dev/null +++ b/api/arkui/component/pasteButton.static.d.ets @@ -0,0 +1,182 @@ + +/* + * Copyright (c) 2025 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 + * @arkts 1.2 + */ + +import { ButtonType } from "./button"; +import { ClickEvent, AttributeModifier, CommonMethod } from "./common"; +import { SecurityComponentMethod } from "./securityComponent"; +import { BusinessError } from '../../@ohos.base'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Enumerates the icon styles. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum PasteIconStyle { + /** + * Icon rendered as lines. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + LINES = 0 +} + +/** + * Enumerates the text that can be displayed on the paste button. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum PasteDescription { + /** + * Paste + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + PASTE = 0 +} + +/** + * Declares the interface for setting the paste button options. + * + * @interface PasteButtonOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface PasteButtonOptions { + /** + * Style of the icon to be drawn. + * + * @type { ?PasteIconStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + icon?: PasteIconStyle; + + /** + * Text to be displayed on the button. + * + * @type { ?PasteDescription } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + text?: PasteDescription; + + /** + * Type of the button. + * + * @type { ?ButtonType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + buttonType?: ButtonType; +} + +/** + * Enumerates the click event results of the paste button. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum PasteButtonOnClickResult { + /** + * Success. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SUCCESS = 0 + /** + * Failure because the application is not temporarily authorized for accessing the current pasteboard data. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + TEMPORARY_AUTHORIZATION_FAILED = 1 +} + +/** + * Callback function when the paste button is clicked. + * + * @typedef { function } PasteButtonCallback + * @param { ClickEvent } event - The click event. + * @param { PasteButtonOnClickResult } result - The result of click event. + * @param { BusinessError } [error] - The error code and message of click event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, error?: BusinessError) => void; + +/** + * Declare interfaces for the attributes of the paste button. + * + * @extends SecurityComponentMethod + * @interface PasteButtonAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface PasteButtonAttribute extends SecurityComponentMethod { + /** + * Called when the paste button is clicked. + * + * @param { PasteButtonCallback | undefined } event + * @returns { PasteButtonAttribute } Returns the attribute of the paste button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onClick(event: PasteButtonCallback | undefined): this; +} + +/** + * Set a paste button. + * + * @param { PasteButtonOptions } [options] - Options of the paste button. + * @returns { PasteButtonAttribute } Attributes of the paste button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +@memo +@ComponentBuilder +export declare function PasteButton( + options?: PasteButtonOptions +): PasteButtonAttribute; \ No newline at end of file diff --git a/api/arkui/component/saveButton.static.d.ets b/api/arkui/component/saveButton.static.d.ets new file mode 100644 index 0000000000..ef54411a50 --- /dev/null +++ b/api/arkui/component/saveButton.static.d.ets @@ -0,0 +1,348 @@ + +/* + * Copyright (c) 2025 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 + * @arkts 1.2 + */ +import { Resource, Dimension, BorderRadiuses, SizeOptions } from "./units"; +import { ButtonType } from "./button"; +import { ClickEvent, AttributeModifier, CommonMethod } from "./common"; +import { SecurityComponentMethod } from "./securityComponent"; +import { BusinessError } from '../../@ohos.base'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Enumerates the icon styles. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum SaveIconStyle { + /** + * Icon filled with the specified color. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + FULL_FILLED = 0 + /** + * Icon rendered as lines. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + LINES = 1, + /** + * Icon rendered as picture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + PICTURE = 2 +} +/** + * Enumerates the text that can be displayed on the save button. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum SaveDescription { + /** + * Download + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + DOWNLOAD = 0 + /** + * Download File + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + DOWNLOAD_FILE = 1, + /** + * Save + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SAVE = 2, + /** + * Save Image + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SAVE_IMAGE = 3, + /** + * Save File + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SAVE_FILE = 4, + /** + * Download and Share + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + DOWNLOAD_AND_SHARE = 5, + /** + * Receive + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + RECEIVE = 6, + /** + * Continue to Receive + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + CONTINUE_TO_RECEIVE = 7, + /** + * Save to gallery + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SAVE_TO_GALLERY = 8, + /** + * Export to gallery + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + EXPORT_TO_GALLERY = 9, + /** + * Quick save to gallery + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + QUICK_SAVE_TO_GALLERY = 10, + /** + * Resave to gallery + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + RESAVE_TO_GALLERY = 11, + + /** + * Save all + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SAVE_ALL = 12 +} +/** + * Declares the interface for setting the save button options. + * + * @interface SaveButtonOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface SaveButtonOptions { + /** + * Style of the icon to be drawn. + * + * @type { ?SaveIconStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + icon?: SaveIconStyle; + /** + * Text to be displayed on the button. + * + * @type { ?SaveDescription } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + text?: SaveDescription; + /** + * Type of the button. + * + * @type { ?ButtonType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + buttonType?: ButtonType; +} +/** + * Enumerates the click event results of the save button. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum SaveButtonOnClickResult { + /** + * Success. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + SUCCESS = 0 + /** + * Failure because the application is not temporarily authorized for saving files. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + TEMPORARY_AUTHORIZATION_FAILED = 1 +} +/** + * Callback function when the save button is clicked. + * + * @typedef { function } SaveButtonCallback + * @param { ClickEvent } event - The click event. + * @param { SaveButtonOnClickResult } result - The result of click event. + * @param { BusinessError } [error] - The error code and message of click event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, error?: BusinessError) => void; + +/** + * Declares interface for the attributes of the save button. + * + * @extends SecurityComponentMethod + * @interface SaveButtonAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface SaveButtonAttribute extends SecurityComponentMethod { + /** + * Called when the save button is clicked. + * + * @param { SaveButtonCallback | undefined } event + * @returns { SaveButtonAttribute } Returns the attribute of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onClick(event: SaveButtonCallback | undefined): this; + /** + * Sets the icon of the save button. + * + * @permission ohos.permission.CUSTOMIZE_SAVE_BUTTON + * @param { Resource | undefined } icon - Source of the icon. + * @returns { SaveButtonAttribute } Returns the attributes of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + setIcon(icon: Resource | undefined): this; + + /** + * Sets the text of the save button. + * + * @permission ohos.permission.CUSTOMIZE_SAVE_BUTTON + * @param { string | Resource | undefined } text - Content of text. + * @returns { SaveButtonAttribute } Returns the attributes of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + setText(text: string | Resource | undefined): this; + + /** + * Sets the size of the icon. + * + * @param { Dimension | SizeOptions | undefined } size - Dimensions of the icon to set. + * @returns { SaveButtonAttribute } Returns the attributes of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + iconSize(size: Dimension | SizeOptions | undefined): this; + + /** + * Sets the border radius of the icon. + * + * @permission ohos.permission.CUSTOMIZE_SAVE_BUTTON + * @param { Dimension | BorderRadiuses | undefined } radius - Border radius of the icon to set. + * @returns { SaveButtonAttribute } Returns the attributes of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + iconBorderRadius(radius: Dimension | BorderRadiuses | undefined): this; + + /** + * Enables the press effect of the button. + * + * @permission ohos.permission.CUSTOMIZE_SAVE_BUTTON + * @param { boolean | undefined } enabled - Whether to enable the press effect. The value true means + * to enable the press effect; the value false means the opposite. + * @returns { SaveButtonAttribute } Returns the attributes of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + stateEffect(enabled: boolean | undefined): this; +} + + +/** + * Set a save button. + * + * @param { SaveButtonOptions } [options] - Options of the save button. + * @returns { SaveButtonAttribute } Attributes of the save button. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +@memo +@ComponentBuilder +export declare function SaveButton( + options?: SaveButtonOptions, +): SaveButtonAttribute; \ No newline at end of file diff --git a/api/arkui/component/securityComponent.static.d.ets b/api/arkui/component/securityComponent.static.d.ets new file mode 100644 index 0000000000..ece084e46b --- /dev/null +++ b/api/arkui/component/securityComponent.static.d.ets @@ -0,0 +1,414 @@ + +/* + * Copyright (c) 2025 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 + * @arkts 1.2 + */ + +import { Dimension, Position, Edges, LocalizedEdges, ResourceColor, Padding, Length, SizeOptions, ConstraintSizeOptions, BorderRadiuses } from "./units"; +import { FontStyle, FontWeight, BorderStyle, TextHeightAdaptivePolicy, Axis, Alignment } from "./enums"; +import { ChainStyle, LocalizedAlignRuleOptions, AlignRuleOption, AttributeModifier, CommonMethod } from "./common"; +import { Resource } from '../../global/resource'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Enumerates the layout direction of the icon and text. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare enum SecurityComponentLayoutDirection { + /** + * Horizontal layout. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + HORIZONTAL = 0 + /** + * Vertical layout. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + VERTICAL = 1 +} + +/** + * Declares the interface for the method of a security component. + * + * @interface SecurityComponentMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface SecurityComponentMethod { + /** + * Icon size. + * + * @param { Dimension | undefined } value - Indicates the size of the icon. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + iconSize(value: Dimension | undefined): this; + /** + * Layout direction of the icon and text. + * + * @param { SecurityComponentLayoutDirection | undefined } value - Indicates the layout direction of the icon and text. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + layoutDirection(value: SecurityComponentLayoutDirection | undefined): this; + /** + * Position of the security component. + * + * @param { Position | undefined } value - Indicates the position of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + position(value: Position | undefined): this; + /** + * Anchor of the security component for positioning. The top start edge of the component is used as + * the reference point for offset. + * + * @param { Position | undefined } value - Indicates the anchor of the component when it is positioned. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + markAnchor(value: Position | undefined): this; + /** + * Coordinate offset relative to the layout completion position. + * Setting this attribute does not affect the layout of the parent container. + * The position is adjusted only during drawing. + * + * @param { Position | Edges | LocalizedEdges | undefined } value + * @returns { SecurityComponentMethod } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + offset(value: Position | Edges | LocalizedEdges | undefined): this; + /** + * Font size of the inner text. + * + * @param { Dimension | undefined } value - Indicates the font size of the text in the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + fontSize(value: Dimension | undefined): this; + /** + * Font style of the inner text. + * + * @param { FontStyle | undefined } value - Indicates the font style of the text in the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + fontStyle(value: FontStyle | undefined): this; + /** + * Font weight of the inner text. + * + * @param { int | FontWeight | string | Resource | undefined } value - Font weight of the text in + * the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + fontWeight(value: int | FontWeight | string | Resource | undefined): this; + /** + * Font family of the inner text. + * + * @param { string | Resource | undefined } value - Indicates the font family of the text in the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + fontFamily(value: string | Resource | undefined): this; + /** + * Font color of the inner text. + * + * @param { ResourceColor | undefined } value - Indicates the font color of the text in the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + fontColor(value: ResourceColor | undefined): this; + /** + * Color of the icon. + * + * @param { ResourceColor | undefined } value - Indicates the icon color in the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + iconColor(value: ResourceColor | undefined): this; + /** + * Background color. + * + * @param { ResourceColor | undefined } value - Indicates the background color of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + backgroundColor(value: ResourceColor | undefined): this; + /** + * Style of the border. + * + * @param { BorderStyle | undefined } value - Indicates the border style of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + borderStyle(value: BorderStyle | undefined): this; + /** + * Width of the border. + * + * @param { Dimension | undefined } value - Indicates the border width of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + borderWidth(value: Dimension | undefined): this; + /** + * Color of the border. + * + * @param { ResourceColor | undefined } value - Indicates the border color of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + borderColor(value: ResourceColor | undefined): this; + /** + * Radius of the border. + * + * @param { Dimension| BorderRadiuses | undefined } radius - Indicates the border radius of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + borderRadius(radius: Dimension | BorderRadiuses | undefined): this; + /** + * Padding between the background border and icon/inner text. + * + * @param { Padding | Dimension | undefined } value - Indicates the padding of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + padding(value: Padding | Dimension | undefined): this; + /** + * Space between the inner text and icon. + * + * @param { Dimension | undefined } value - Indicates the space between the inner text and icon. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + textIconSpace(value: Dimension | undefined): this; + /** + * Key. User can set an key to the component to identify it. + * + * @param { string | undefined } value - identify the key of the component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @test + */ + key(value: string | undefined): this; + /** + * Sets the width of the component. + * + * @param { Length | undefined } value - Indicates the width of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + width(value: Length | undefined): this; + /** + * Sets the height of the component. + * + * @param { Length | undefined } value - Indicates the height of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + height(value: Length | undefined): this; + /** + * The size of the component. + * + * @param { SizeOptions | undefined } value - Indicates the size of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + size(value: SizeOptions | undefined): this; + /** + * constraint Size: + * minWidth: minimum Width, maxWidth: maximum Width, minHeight: minimum Height, maxHeight: maximum Height. + * + * @param { ConstraintSizeOptions | undefined } value - Indicates the constraint size of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + constraintSize(value: ConstraintSizeOptions | undefined): this; + /** + * align + * + * @param { Alignment | undefined } alignType - Indicates the align type of the security component. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + align(alignType: Alignment | undefined): this; + /** + * Specifies the alignRules of relative container + * + * @param { AlignRuleOption | LocalizedAlignRuleOptions | undefined } alignRule + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + alignRules(alignRule: AlignRuleOption | LocalizedAlignRuleOptions | undefined): this; + + /** + * Id. User can set an id to the component to identify it. + * + * @param { string | undefined } description + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + id(description: string | undefined): this; + /** + * Specifies the direction and style of chain in relative container + * + * @param { Axis | undefined } direction - Indicates direction of the chain + * @param { ChainStyle | undefined } style - Indicates style of the chain + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + chainMode(direction: Axis | undefined, style: ChainStyle | undefined): this; + /** + * Sets the minimum font scale factor for text. + * + * @param { double | Resource | undefined } scale Minimum font scale factor to set. + * @returns { SecurityComponentMethod } Returns the attributes of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + minFontScale(scale: double | Resource | undefined): this; + /** + * Sets the maximum font scale factor for text. + * + * @param { double | Resource | undefined } scale Maximum font scale factor to set. + * @returns { SecurityComponentMethod } Returns the attributes of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + maxFontScale(scale: double | Resource | undefined): this; + /** + * Called when the maximum number of lines of text is set. + * + * @param { int | Resource | undefined } line + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + maxLines(line: int | Resource | undefined): this; + /** + * Called when the minimum font size of the font is set. + * + * @param { double | string | Resource | undefined } minSize + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + minFontSize(minSize: double | string | Resource | undefined): this; + /** + * Called when the maximum font size of the font is set. + * + * @param { double | string | Resource | undefined } maxSize + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + maxFontSize(maxSize: double | string | Resource | undefined): this; + /** + * Called when the height adaptive policy is set. + * + * @param { TextHeightAdaptivePolicy | undefined } policy - The height adaptive policy. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + heightAdaptivePolicy(policy: TextHeightAdaptivePolicy | undefined): this; + /** + * If the value is true, the component is available and can respond to operations such as clicking. + * If it is set to false, click operations are not responded. + * + * @param { boolean | undefined } respond - Indicates whether the button is responded to. + * @returns { SecurityComponentMethod } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + enabled(respond: boolean | undefined): this; +} \ No newline at end of file -- Gitee