• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * Defines the resource which can use ASTC.
23 *
24 * @interface ASTCResource
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @systemapi
27 * @since 12
28 */
29interface ASTCResource {
30  /**
31   * Array of ASTC uri resources, indicating the range of ASTC data to be obtained.
32   * @type { Array<string> }
33   * @syscap SystemCapability.ArkUI.ArkUI.Full
34   * @systemapi
35   * @since 12
36   */
37  sources: Array<string>;
38  /**
39   * Column size, indicating the number of ASTC resources to splice per row.
40   * @type { number }
41   * @syscap SystemCapability.ArkUI.ArkUI.Full
42   * @systemapi
43   * @since 12
44   */
45  column: number;
46}
47
48/**
49 * @interface MediaCachedImageInterface
50 * @syscap SystemCapability.ArkUI.ArkUI.Full
51 * @systemapi
52 * @since 12
53 */
54interface MediaCachedImageInterface {
55  /**
56   * Image resource to be obtained.
57   *
58   * @param { PixelMap | ResourceStr | DrawableDescriptor | ASTCResource } src
59   * @returns { MediaCachedImageAttribute }
60   * @syscap SystemCapability.ArkUI.ArkUI.Full
61   * @systemapi
62   * @since 12
63   */
64  (src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): MediaCachedImageAttribute;
65}
66
67/**
68 * Attributes of MediaCachedImage inherited from ImageAttribute.
69 *
70 * @extends ImageAttribute
71 * @syscap SystemCapability.ArkUI.ArkUI.Full
72 * @systemapi
73 * @since 12
74 */
75declare class MediaCachedImageAttribute extends ImageAttribute {}
76
77/**
78 * MediaCachedImage component.
79 *
80 * @syscap SystemCapability.ArkUI.ArkUI.Full
81 * @systemapi
82 * @since 12
83 */
84declare const MediaCachedImage: MediaCachedImageInterface;
85
86/**
87 * Instance of MediaCachedImage component.
88 *
89 * @syscap SystemCapability.ArkUI.ArkUI.Full
90 * @systemapi
91 * @since 12
92 */
93declare const MediaCachedImageInstance: MediaCachedImageAttribute;
94