1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/*** if arkts 1.2 */ 22import { TextAttribute } from './component/text' 23import { AttributeModifier }from './component/common' 24/*** endif */ 25 26/*** if arkts 1.2 */ 27/** 28 * Declare the apply normal status function. 29 * 30 * @typedef { function } TextApplyNormalFunction 31 * @param { TextAttribute } textAttribute - The attribute of component. 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @atomicservice 35 * @since 20 36 * @arkts 1.2 37 */ 38declare type TextApplyNormalFunction = (textAttribute: TextAttribute) => void; 39 40/** 41 * Defines Text Modifier 42 * 43 * @extends TextAttribute, AttributeModifier<TextAttribute> 44 * @typedef TextModifier 45 * @syscap SystemCapability.ArkUI.ArkUI.Full 46 * @atomicservice 47 * @since 20 48 * @arkts 1.2 49*/ 50export declare interface TextModifier extends TextAttribute, AttributeModifier<TextAttribute> { 51 52 /** 53 * Defines the normal update attribute function. 54 * 55 * @type {undefined | ((instance: TextAttribute) => void)} 56 * @syscap SystemCapability.ArkUI.ArkUI.Full 57 * @crossplatform 58 * @atomicservice 59 * @since 20 60 * @arkts 1.2 61 */ 62 applyNormalAttribute: undefined | ((instance: TextAttribute) => void); 63 /** 64 * Defines the pressed update attribute function. 65 * 66 * @type {undefined | ((instance: TextAttribute) => void)} 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @crossplatform 69 * @atomicservice 70 * @since 20 71 * @arkts 1.2 72 */ 73 applyPressedAttribute: undefined | ((instance: TextAttribute) => void); 74 /** 75 * Defines the focused update attribute function. 76 * 77 * @type {undefined | ((instance: TextAttribute) => void)} 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @atomicservice 81 * @since 20 82 * @arkts 1.2 83 */ 84 applyFocusedAttribute: undefined | ((instance: TextAttribute) => void); 85 /** 86 * Defines the disabled update attribute function. 87 * 88 * @type {undefined | ((instance: TextAttribute) => void)} 89 * @syscap SystemCapability.ArkUI.ArkUI.Full 90 * @crossplatform 91 * @atomicservice 92 * @since 20 93 * @arkts 1.2 94 */ 95 applyDisabledAttribute: undefined | ((instance: TextAttribute) => void); 96 /** 97 * Defines the selected update attribute function. 98 * 99 * @type {undefined | ((instance: TextAttribute) => void)} 100 * @syscap SystemCapability.ArkUI.ArkUI.Full 101 * @crossplatform 102 * @atomicservice 103 * @since 20 104 * @arkts 1.2 105 */ 106 applySelectedAttribute: undefined | ((instance: TextAttribute) => void); 107} 108/*** endif */ 109 110/** 111 * Defines Text Modifier 112 * 113 * @extends TextAttribute 114 * @implements AttributeModifier<TextAttribute> 115 * @syscap SystemCapability.ArkUI.ArkUI.Full 116 * @atomicservice 117 * @since 12 118*/ 119/** 120 * Defines Text Modifier 121 * 122 * @extends TextAttribute 123 * @implements AttributeModifier<TextAttribute> 124 * @syscap SystemCapability.ArkUI.ArkUI.Full 125 * @crossplatform 126 * @atomicservice 127 * @since 20 128 */ 129export declare class TextModifier extends TextAttribute implements AttributeModifier<TextAttribute> { 130 131 /** 132 * Defines the normal update attribute function. 133 * 134 * @param { TextAttribute } instance 135 * @syscap SystemCapability.ArkUI.ArkUI.Full 136 * @crossplatform 137 * @atomicservice 138 * @since 12 139 */ 140 applyNormalAttribute?(instance: TextAttribute): void; 141} 142