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/** 22 * Enum for DownloadIconStyle 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @atomicservice 28 * @since 12 29 */ 30export declare enum DownloadIconStyle { 31 /** 32 * FULL_FILLED type. 33 * 34 * @syscap SystemCapability.ArkUI.ArkUI.Full 35 * @crossplatform 36 * @atomicservice 37 * @since 12 38 */ 39 FULL_FILLED = 1, 40 41 /** 42 * LINES type. 43 * 44 * @syscap SystemCapability.ArkUI.ArkUI.Full 45 * @crossplatform 46 * @atomicservice 47 * @since 12 48 */ 49 LINES = 2 50} 51 52/** 53 * Enum for DownloadDescription 54 * 55 * @enum { number } 56 * @syscap SystemCapability.ArkUI.ArkUI.Full 57 * @crossplatform 58 * @atomicservice 59 * @since 12 60 */ 61export declare enum DownloadDescription { 62 63 /** 64 * Description is DOWNLOAD. 65 * 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @crossplatform 68 * @atomicservice 69 * @since 12 70 */ 71 DOWNLOAD = 1, 72 73 /** 74 * Description is DOWNLOAD_FILE. 75 * 76 * @syscap SystemCapability.ArkUI.ArkUI.Full 77 * @crossplatform 78 * @atomicservice 79 * @since 12 80 */ 81 DOWNLOAD_FILE = 2, 82 83 /** 84 * Description is SAVE. 85 * 86 * @syscap SystemCapability.ArkUI.ArkUI.Full 87 * @crossplatform 88 * @atomicservice 89 * @since 12 90 */ 91 SAVE = 3, 92 93 /** 94 * Description is SAVE_IMAGE. 95 * 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @crossplatform 98 * @atomicservice 99 * @since 12 100 */ 101 SAVE_IMAGE = 4, 102 103 /** 104 * Description is SAVE_FILE. 105 * 106 * @syscap SystemCapability.ArkUI.ArkUI.Full 107 * @crossplatform 108 * @atomicservice 109 * @since 12 110 */ 111 SAVE_FILE = 5, 112 113 /** 114 * Description is DOWNLOAD_AND_SHARE. 115 * 116 * @syscap SystemCapability.ArkUI.ArkUI.Full 117 * @crossplatform 118 * @atomicservice 119 * @since 12 120 */ 121 DOWNLOAD_AND_SHARE = 6, 122 123 /** 124 * Description is RECEIVE. 125 * 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @crossplatform 128 * @atomicservice 129 * @since 12 130 */ 131 RECEIVE = 7, 132 133 /** 134 * Description is CONTINUE_TO_RECEIVE. 135 * 136 * @syscap SystemCapability.ArkUI.ArkUI.Full 137 * @crossplatform 138 * @atomicservice 139 * @since 12 140 */ 141 CONTINUE_TO_RECEIVE = 8 142} 143 144/** 145 * Enum for DownloadDescription 146 * 147 * @enum { number } 148 * @syscap SystemCapability.ArkUI.ArkUI.Full 149 * @crossplatform 150 * @atomicservice 151 * @since 12 152 */ 153export declare enum DownloadLayoutDirection { 154 155 /** 156 * Layout direction is HORIZONTAL. 157 * 158 * @syscap SystemCapability.ArkUI.ArkUI.Full 159 * @crossplatform 160 * @atomicservice 161 * @since 12 162 */ 163 HORIZONTAL = 0, 164 165 /** 166 * Layout direction is VERTICAL. 167 * 168 * @syscap SystemCapability.ArkUI.ArkUI.Full 169 * @crossplatform 170 * @atomicservice 171 * @since 12 172 */ 173 VERTICAL = 1 174} 175 176/** 177 * Defines the download content options. 178 * 179 * @interface DownloadContentOptions 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @crossplatform 182 * @atomicservice 183 * @since 12 184 */ 185export interface DownloadContentOptions { 186 /** 187 * DownloadFileButton icon Style. 188 * 189 * @type { ?DownloadIconStyle } 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @crossplatform 192 * @atomicservice 193 * @since 12 194 */ 195 icon?: DownloadIconStyle; 196 197 /** 198 * DownloadFileButton description. 199 * 200 * @type { ?DownloadDescription } 201 * @syscap SystemCapability.ArkUI.ArkUI.Full 202 * @crossplatform 203 * @atomicservice 204 * @since 12 205 */ 206 text?: DownloadDescription; 207} 208 209/** 210 * Defines the DownloadFileButton style option. 211 * 212 * @interface DownloadStyleOptions 213 * @syscap SystemCapability.ArkUI.ArkUI.Full 214 * @crossplatform 215 * @atomicservice 216 * @since 12 217 */ 218export interface DownloadStyleOptions { 219 220 /** 221 * Icon size. 222 * 223 * @type { ?Dimension } 224 * @syscap SystemCapability.ArkUI.ArkUI.Full 225 * @crossplatform 226 * @atomicservice 227 * @since 12 228 */ 229 iconSize?: Dimension; 230 231 /** 232 * Layout direction. 233 * 234 * @type { ?DownloadLayoutDirection } 235 * @syscap SystemCapability.ArkUI.ArkUI.Full 236 * @crossplatform 237 * @atomicservice 238 * @since 12 239 */ 240 layoutDirection?: DownloadLayoutDirection; 241 242 /** 243 * Font size. 244 * 245 * @type { ?Dimension } 246 * @syscap SystemCapability.ArkUI.ArkUI.Full 247 * @crossplatform 248 * @atomicservice 249 * @since 12 250 */ 251 fontSize?: Dimension; 252 253 /** 254 * Font Style. 255 * 256 * @type { ?FontStyle } 257 * @syscap SystemCapability.ArkUI.ArkUI.Full 258 * @crossplatform 259 * @atomicservice 260 * @since 12 261 */ 262 fontStyle?: FontStyle; 263 264 /** 265 * Font weight. 266 * 267 * @type { ?(number | FontWeight | string) } 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @crossplatform 270 * @atomicservice 271 * @since 12 272 */ 273 fontWeight?: number | FontWeight | string; 274 275 /** 276 * Font family. 277 * 278 * @type { ?(string | Resource) } 279 * @syscap SystemCapability.ArkUI.ArkUI.Full 280 * @crossplatform 281 * @atomicservice 282 * @since 12 283 */ 284 fontFamily?: string | Resource; 285 286 /** 287 * Font color. 288 * 289 * @type { ?ResourceColor } 290 * @syscap SystemCapability.ArkUI.ArkUI.Full 291 * @crossplatform 292 * @atomicservice 293 * @since 12 294 */ 295 fontColor?: ResourceColor; 296 297 /** 298 * Icon color. 299 * 300 * @type { ?ResourceColor } 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @crossplatform 303 * @atomicservice 304 * @since 12 305 */ 306 iconColor?: ResourceColor; 307 308 /** 309 * Text and Icon space. 310 * 311 * @type { ?Dimension } 312 * @syscap SystemCapability.ArkUI.ArkUI.Full 313 * @crossplatform 314 * @atomicservice 315 * @since 12 316 */ 317 textIconSpace?: Dimension; 318} 319 320/** 321 * Declare Component DownloadFileButton 322 * 323 * @syscap SystemCapability.ArkUI.ArkUI.Full 324 * @crossplatform 325 * @atomicservice 326 * @since 12 327 */ 328@Component 329export declare struct DownloadFileButton { 330 /** 331 * Set DownloadFileButton Content. 332 * 333 * @type { DownloadContentOptions }. 334 * @syscap SystemCapability.ArkUI.ArkUI.Full 335 * @crossplatform 336 * @atomicservice 337 * @since 12 338 */ 339 @State contentOptions: DownloadContentOptions; 340 /** 341 * Set DownloadFileButton Style. 342 * 343 * @type { DownloadStyleOptions }. 344 * @syscap SystemCapability.ArkUI.ArkUI.Full 345 * @crossplatform 346 * @atomicservice 347 * @since 12 348 */ 349 @State styleOptions: DownloadStyleOptions; 350}