• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 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 * Provides an interface for SymbolGlyph.
18 *
19 * @interface SymbolGlyphInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @crossplatform
22 * @since 11
23 */
24interface SymbolGlyphInterface {
25  /**
26   * Called when resource is entered in SymbolGlyph.
27   *
28   * @param { Resource } value
29   * @returns { SymbolGlyphAttribute }
30   * @syscap SystemCapability.ArkUI.ArkUI.Full
31   * @crossplatform
32   * @since 11
33   */
34  (value: Resource): SymbolGlyphAttribute;
35}
36
37/**
38 * The symbol rendering strategy.
39 *
40 * @enum { number }
41 * @syscap SystemCapability.ArkUI.ArkUI.Full
42 * @crossplatform
43 * @since 11
44 */
45declare enum SymbolRenderingStrategy {
46  /**
47   * The single rendering strategy.
48   *
49   * @syscap SystemCapability.ArkUI.ArkUI.Full
50   * @crossplatform
51   * @since 11
52   */
53  SINGLE = 0,
54
55  /**
56   * The multiple color rendering strategy.
57   *
58   * @syscap SystemCapability.ArkUI.ArkUI.Full
59   * @crossplatform
60   * @since 11
61   */
62  MULTIPLE_COLOR = 1,
63
64  /**
65   * The multiple opacity rendering strategy.
66   *
67   * @syscap SystemCapability.ArkUI.ArkUI.Full
68   * @crossplatform
69   * @since 11
70   */
71  MULTIPLE_OPACITY = 2,
72}
73
74/**
75 * The symbol effect strategy.
76 *
77 * @enum { number }
78 * @syscap SystemCapability.ArkUI.ArkUI.Full
79 * @crossplatform
80 * @since 11
81 */
82declare enum SymbolEffectStrategy {
83  /**
84   * There is no effect strategy.
85   *
86   * @syscap SystemCapability.ArkUI.ArkUI.Full
87   * @crossplatform
88   * @since 11
89   */
90  NONE = 0,
91
92  /**
93   * The scale effect strategy.
94   *
95   * @syscap SystemCapability.ArkUI.ArkUI.Full
96   * @crossplatform
97   * @since 11
98   */
99  SCALE = 1,
100
101  /**
102   * The hierarchical effect strategy.
103   *
104   * @syscap SystemCapability.ArkUI.ArkUI.Full
105   * @crossplatform
106   * @since 11
107   */
108  HIERARCHICAL = 2,
109}
110
111/**
112 * Provides attribute for SymbolGlyph.
113 *
114 * @extends CommonMethod<SymbolGlyphAttribute>
115 * @syscap SystemCapability.ArkUI.ArkUI.Full
116 * @crossplatform
117 * @since 11
118 */
119declare class SymbolGlyphAttribute extends CommonMethod<SymbolGlyphAttribute> {
120  /**
121   * Called when the SymbolGlyph size is set.
122   *
123   * @param { number | string | Resource } value
124   * @returns { SymbolGlyphAttribute }
125   * @syscap SystemCapability.ArkUI.ArkUI.Full
126   * @crossplatform
127   * @since 11
128   */
129  fontSize(value: number | string | Resource): SymbolGlyphAttribute;
130
131  /**
132   * Called when the SymbolGlyph color is set.
133   *
134   * @param { Array<ResourceColor> } value
135   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
136   * @syscap SystemCapability.ArkUI.ArkUI.Full
137   * @crossplatform
138   * @since 11
139   */
140  fontColor(value: Array<ResourceColor>): SymbolGlyphAttribute;
141
142  /**
143   * Called when the font symbolGlyph weight is set.
144   *
145   * @param { number | FontWeight | string } value
146   * @returns { SymbolGlyphAttribute }
147   * @syscap SystemCapability.ArkUI.ArkUI.Full
148   * @crossplatform
149   * @since 11
150   */
151  fontWeight(value: number | FontWeight | string): SymbolGlyphAttribute;
152
153  /**
154   * Called when the symbolGlyph effect is set.
155   *
156   * @param { SymbolEffectStrategy } value
157   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
158   * @syscap SystemCapability.ArkUI.ArkUI.Full
159   * @crossplatform
160   * @since 11
161   */
162  effectStrategy(value: SymbolEffectStrategy): SymbolGlyphAttribute;
163
164  /**
165   * Called when the symbolGlyph rendering strategy is set.
166   *
167   * @param { SymbolRenderingStrategy } value
168   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
169   * @syscap SystemCapability.ArkUI.ArkUI.Full
170   * @crossplatform
171   * @since 11
172   */
173  renderingStrategy(value: SymbolRenderingStrategy): SymbolGlyphAttribute;
174}
175
176/**
177 * Defines SymbolGlyph Component.
178 *
179 * @syscap SystemCapability.ArkUI.ArkUI.Full
180 * @crossplatform
181 * @since 11
182 */
183declare const SymbolGlyph: SymbolGlyphInterface;
184
185/**
186 * Defines SymbolGlyph Component instance.
187 *
188 * @syscap SystemCapability.ArkUI.ArkUI.Full
189 * @crossplatform
190 * @since 11
191 */
192declare const SymbolGlyphInstance: SymbolGlyphAttribute;
193