1/* 2 * Copyright (c) 2021 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/** 22 * Provides an interface for RichText component. 23 * 24 * @interface RichTextInterface 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 8 27 */ 28/** 29 * Provides an interface for RichText component. 30 * 31 * @interface RichTextInterface 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @atomicservice 35 * @since 11 36 */ 37/** 38 * Provides an interface for RichText component. 39 * 40 * @interface RichTextInterface 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @crossplatform 43 * @since 12 44 */ 45interface RichTextInterface { 46 /** 47 * Set value. 48 * 49 * @param { string } content 50 * @returns { RichTextAttribute } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @since 8 53 */ 54 /** 55 * Set value. 56 * 57 * @param { string } content 58 * @returns { RichTextAttribute } 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @crossplatform 61 * @atomicservice 62 * @since 11 63 */ 64 /** 65 * Set value. 66 * 67 * @param { string } content 68 * @returns { RichTextAttribute } 69 * @syscap SystemCapability.ArkUI.ArkUI.Full 70 * @crossplatform 71 * @since 12 72 */ 73 (content: string): RichTextAttribute; 74} 75 76/** 77 * Defines the RichText attribute functions. 78 * 79 * @extends CommonMethod<RichTextAttribute> 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @since 8 82 */ 83/** 84 * Defines the RichText attribute functions. 85 * 86 * @extends CommonMethod<RichTextAttribute> 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @atomicservice 90 * @since 11 91 */ 92/** 93 * Defines the RichText attribute functions. 94 * 95 * @extends CommonMethod<RichTextAttribute> 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @crossplatform 98 * @since 12 99 */ 100declare class RichTextAttribute extends CommonMethod<RichTextAttribute> { 101 /** 102 * Triggered when the RichText loading starts. 103 * 104 * @param { function } callback 105 * @returns { RichTextAttribute } 106 * @syscap SystemCapability.ArkUI.ArkUI.Full 107 * @since 8 108 */ 109 /** 110 * Triggered when the RichText loading starts. 111 * 112 * @param { function } callback 113 * @returns { RichTextAttribute } 114 * @syscap SystemCapability.ArkUI.ArkUI.Full 115 * @crossplatform 116 * @atomicservice 117 * @since 11 118 */ 119 /** 120 * Triggered when the RichText loading starts. 121 * 122 * @param { function } callback 123 * @returns { RichTextAttribute } 124 * @syscap SystemCapability.ArkUI.ArkUI.Full 125 * @crossplatform 126 * @since 12 127 */ 128 onStart(callback: () => void): RichTextAttribute; 129 130 /** 131 * Triggered when the RichText loading ends. 132 * 133 * @param { function } callback 134 * @returns { RichTextAttribute } 135 * @syscap SystemCapability.ArkUI.ArkUI.Full 136 * @since 8 137 */ 138 /** 139 * Triggered when the RichText loading ends. 140 * 141 * @param { function } callback 142 * @returns { RichTextAttribute } 143 * @syscap SystemCapability.ArkUI.ArkUI.Full 144 * @crossplatform 145 * @atomicservice 146 * @since 11 147 */ 148 /** 149 * Triggered when the RichText loading ends. 150 * 151 * @param { function } callback 152 * @returns { RichTextAttribute } 153 * @syscap SystemCapability.ArkUI.ArkUI.Full 154 * @crossplatform 155 * @since 12 156 */ 157 onComplete(callback: () => void): RichTextAttribute; 158} 159 160/** 161 * Defines RichText Component. 162 * 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @since 8 165 */ 166/** 167 * Defines RichText Component. 168 * 169 * @syscap SystemCapability.ArkUI.ArkUI.Full 170 * @crossplatform 171 * @atomicservice 172 * @since 11 173 */ 174/** 175 * Defines RichText Component. 176 * 177 * @syscap SystemCapability.ArkUI.ArkUI.Full 178 * @crossplatform 179 * @since 12 180 */ 181declare const RichText: RichTextInterface; 182 183/** 184 * Defines RichText Component instance. 185 * 186 * @syscap SystemCapability.ArkUI.ArkUI.Full 187 * @since 8 188 */ 189/** 190 * Defines RichText Component instance. 191 * 192 * @syscap SystemCapability.ArkUI.ArkUI.Full 193 * @crossplatform 194 * @atomicservice 195 * @since 11 196 */ 197/** 198 * Defines RichText Component instance. 199 * 200 * @syscap SystemCapability.ArkUI.ArkUI.Full 201 * @crossplatform 202 * @since 12 203 */ 204declare const RichTextInstance: RichTextAttribute; 205