• 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 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Provides an interface for SymbolGlyph.
23 *
24 * @interface SymbolGlyphInterface
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 11
27 */
28/**
29 * Provides an interface for SymbolGlyph.
30 *
31 * @interface SymbolGlyphInterface
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @form
34 * @atomicservice
35 * @since 12
36 */
37interface SymbolGlyphInterface {
38  /**
39   * Called when resource is entered in SymbolGlyph.
40   *
41   * @param { Resource } value
42   * @returns { SymbolGlyphAttribute }
43   * @syscap SystemCapability.ArkUI.ArkUI.Full
44   * @since 11
45   */
46  /**
47   * Called when resource is entered in SymbolGlyph.
48   *
49   * @param { Resource } value
50   * @returns { SymbolGlyphAttribute }
51   * @syscap SystemCapability.ArkUI.ArkUI.Full
52   * @form
53   * @atomicservice
54   * @since 12
55   */
56  (value?: Resource): SymbolGlyphAttribute;
57}
58
59/**
60 * The symbol rendering strategy.
61 *
62 * @enum { number }
63 * @syscap SystemCapability.ArkUI.ArkUI.Full
64 * @since 11
65 */
66/**
67 * The symbol rendering strategy.
68 *
69 * @enum { number }
70 * @syscap SystemCapability.ArkUI.ArkUI.Full
71 * @form
72 * @atomicservice
73 * @since 12
74 */
75declare enum SymbolRenderingStrategy {
76  /**
77   * The single rendering strategy.
78   *
79   * @syscap SystemCapability.ArkUI.ArkUI.Full
80   * @since 11
81   */
82  /**
83   * The single rendering strategy.
84   *
85   * @syscap SystemCapability.ArkUI.ArkUI.Full
86   * @form
87   * @atomicservice
88   * @since 12
89   */
90  SINGLE = 0,
91
92  /**
93   * The multiple color rendering strategy.
94   *
95   * @syscap SystemCapability.ArkUI.ArkUI.Full
96   * @since 11
97   */
98  /**
99   * The multiple color rendering strategy.
100   *
101   * @syscap SystemCapability.ArkUI.ArkUI.Full
102   * @form
103   * @atomicservice
104   * @since 12
105   */
106  MULTIPLE_COLOR = 1,
107
108  /**
109   * The multiple opacity rendering strategy.
110   *
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @since 11
113   */
114  /**
115   * The multiple opacity rendering strategy.
116   *
117   * @syscap SystemCapability.ArkUI.ArkUI.Full
118   * @form
119   * @atomicservice
120   * @since 12
121   */
122  MULTIPLE_OPACITY = 2,
123}
124
125/**
126 * The symbol effect strategy.
127 *
128 * @enum { number }
129 * @syscap SystemCapability.ArkUI.ArkUI.Full
130 * @since 11
131 */
132/**
133 * The symbol effect strategy.
134 *
135 * @enum { number }
136 * @syscap SystemCapability.ArkUI.ArkUI.Full
137 * @form
138 * @atomicservice
139 * @since 12
140 */
141declare enum SymbolEffectStrategy {
142  /**
143   * There is no effect strategy.
144   *
145   * @syscap SystemCapability.ArkUI.ArkUI.Full
146   * @since 11
147   */
148  /**
149   * There is no effect strategy.
150   *
151   * @syscap SystemCapability.ArkUI.ArkUI.Full
152   * @form
153   * @atomicservice
154   * @since 12
155   */
156  NONE = 0,
157
158  /**
159   * The scale effect strategy.
160   *
161   * @syscap SystemCapability.ArkUI.ArkUI.Full
162   * @since 11
163   */
164  /**
165   * The scale effect strategy.
166   *
167   * @syscap SystemCapability.ArkUI.ArkUI.Full
168   * @form
169   * @atomicservice
170   * @since 12
171   */
172  SCALE = 1,
173
174  /**
175   * The hierarchical effect strategy.
176   *
177   * @syscap SystemCapability.ArkUI.ArkUI.Full
178   * @since 11
179   */
180  /**
181   * The hierarchical effect strategy.
182   *
183   * @syscap SystemCapability.ArkUI.ArkUI.Full
184   * @form
185   * @atomicservice
186   * @since 12
187   */
188  HIERARCHICAL = 2,
189}
190
191/**
192 * The direction type of symbol effect
193 *
194 * @enum { number }
195 * @syscap SystemCapability.ArkUI.ArkUI.Full
196 * @form
197 * @atomicservice
198 * @since 12
199 */
200declare enum EffectDirection {
201  /**
202   * The scale down animation of symbol
203   *
204   * @syscap SystemCapability.ArkUI.ArkUI.Full
205   * @form
206   * @atomicservice
207   * @since 12
208   */
209  DOWN = 0,
210  /**
211   * The scale up animation of symbol
212   *
213   * @syscap SystemCapability.ArkUI.ArkUI.Full
214   * @form
215   * @atomicservice
216   * @since 12
217   */
218  UP = 1,
219}
220
221/**
222 * Declare scope type of the symbol effect
223 *
224 * @enum { number }
225 * @syscap SystemCapability.ArkUI.ArkUI.Full
226 * @form
227 * @atomicservice
228 * @since 12
229 */
230declare enum EffectScope {
231  /**
232   * The layered animation of symbol
233   *
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @form
236   * @atomicservice
237   * @since 12
238   */
239  LAYER = 0,
240  /**
241   * The whole animation of symbol
242   *
243   * @syscap SystemCapability.ArkUI.ArkUI.Full
244   * @form
245   * @atomicservice
246   * @since 12
247   */
248  WHOLE = 1,
249}
250
251/**
252 * Declare fill style of symbol
253 *
254 * @enum { number }
255 * @syscap SystemCapability.ArkUI.ArkUI.Full
256 * @form
257 * @atomicservice
258 * @since 12
259 */
260declare enum EffectFillStyle {
261  /**
262   * The cumulative fill style of symbol
263   *
264   * @syscap SystemCapability.ArkUI.ArkUI.Full
265   * @form
266   * @atomicservice
267   * @since 12
268   */
269  CUMULATIVE = 0,
270
271  /**
272   * The iterative fill style of symbol
273   *
274   * @syscap SystemCapability.ArkUI.ArkUI.Full
275   * @form
276   * @atomicservice
277   * @since 12
278   */
279  ITERATIVE = 1,
280}
281
282/**
283 * Defines SymbolEffect class.
284 *
285 * @syscap SystemCapability.ArkUI.ArkUI.Full
286 * @form
287 * @atomicservice
288 * @since 12
289 */
290declare class SymbolEffect {
291}
292
293/**
294 * Defines ScaleSymbolEffect class.
295 *
296 * @extends SymbolEffect
297 * @syscap SystemCapability.ArkUI.ArkUI.Full
298 * @form
299 * @atomicservice
300 * @since 12
301 */
302declare class ScaleSymbolEffect extends SymbolEffect {
303  /**
304   * constructor.
305   *
306   * @param { EffectScope } [scope] -  The scope type of symbol effect.
307   * @param { EffectDirection } [direction] - The direction of symbol effect.
308   * @syscap SystemCapability.ArkUI.ArkUI.Full
309   * @form
310   * @atomicservice
311   * @since 12
312   */
313  constructor(scope?: EffectScope, direction?: EffectDirection);
314
315  /**
316   * The scope type of symbol effect
317   *
318   * @type { ?EffectScope }
319   * @syscap SystemCapability.ArkUI.ArkUI.Full
320   * @form
321   * @atomicservice
322   * @since 12
323   */
324  scope?: EffectScope;
325
326  /**
327   * The direction of symbol effect
328   *
329   * @type { ?EffectDirection }
330   * @syscap SystemCapability.ArkUI.ArkUI.Full
331   * @form
332   * @atomicservice
333   * @since 12
334   */
335  direction?: EffectDirection;
336}
337
338/**
339 * Defines HierarchicalSymbolEffect class.
340 *
341 * @extends SymbolEffect
342 * @syscap SystemCapability.ArkUI.ArkUI.Full
343 * @form
344 * @atomicservice
345 * @since 12
346 */
347declare class HierarchicalSymbolEffect extends SymbolEffect {
348  /**
349   * constructor.
350   *
351   * @param { EffectFillStyle } [fillStyle] -  The fill style of symbol effect.
352   * @syscap SystemCapability.ArkUI.ArkUI.Full
353   * @form
354   * @atomicservice
355   * @since 12
356   */
357  constructor(fillStyle?: EffectFillStyle);
358
359  /**
360   * The fill style of symbol effect
361   *
362   * @type { ?EffectFillStyle }
363   * @syscap SystemCapability.ArkUI.ArkUI.Full
364   * @form
365   * @atomicservice
366   * @since 12
367   */
368  fillStyle?: EffectFillStyle;
369}
370
371/**
372 * Defines AppearSymbolEffect class.
373 *
374 * @extends SymbolEffect
375 * @syscap SystemCapability.ArkUI.ArkUI.Full
376 * @form
377 * @atomicservice
378 * @since 12
379 */
380declare class AppearSymbolEffect extends SymbolEffect {
381  /**
382   * constructor.
383   *
384   * @param { EffectScope } [scope] -  The scope type of symbol effect.
385   * @syscap SystemCapability.ArkUI.ArkUI.Full
386   * @form
387   * @atomicservice
388   * @since 12
389   */
390  constructor(scope?: EffectScope);
391
392  /**
393   * The scope type of symbol effect
394   *
395   * @type { ?EffectScope }
396   * @syscap SystemCapability.ArkUI.ArkUI.Full
397   * @form
398   * @atomicservice
399   * @since 12
400   */
401  scope?: EffectScope;
402}
403
404/**
405 * Defines DisappearSymbolEffect class.
406 *
407 * @extends SymbolEffect
408 * @syscap SystemCapability.ArkUI.ArkUI.Full
409 * @form
410 * @atomicservice
411 * @since 12
412 */
413declare class DisappearSymbolEffect extends SymbolEffect {
414  /**
415   * constructor.
416   *
417   * @param { EffectScope } [scope] -  The scope type of symbol effect.
418   * @syscap SystemCapability.ArkUI.ArkUI.Full
419   * @form
420   * @atomicservice
421   * @since 12
422   */
423  constructor(scope?: EffectScope);
424
425  /**
426   * The scope type of symbol effect
427   *
428   * @type { ?EffectScope }
429   * @syscap SystemCapability.ArkUI.ArkUI.Full
430   * @form
431   * @atomicservice
432   * @since 12
433   */
434  scope?: EffectScope;
435}
436
437/**
438 * Defines BounceSymbolEffect class.
439 *
440 * @extends SymbolEffect
441 * @syscap SystemCapability.ArkUI.ArkUI.Full
442 * @form
443 * @atomicservice
444 * @since 12
445 */
446declare class BounceSymbolEffect extends SymbolEffect {
447  /**
448   * constructor.
449   *
450   * @param { EffectScope } [scope] -  The scope type of symbol effect.
451   * @param { EffectDirection } [direction] - The direction of symbol effect.
452   * @syscap SystemCapability.ArkUI.ArkUI.Full
453   * @form
454   * @atomicservice
455   * @since 12
456   */
457  constructor(scope?: EffectScope, direction?: EffectDirection);
458
459  /**
460   * The scope type of symbol effect
461   *
462   * @type { ?EffectScope }
463   * @syscap SystemCapability.ArkUI.ArkUI.Full
464   * @form
465   * @atomicservice
466   * @since 12
467   */
468  scope?: EffectScope;
469
470  /**
471   * The direction of symbol effect
472   *
473   * @type { ?EffectDirection }
474   * @syscap SystemCapability.ArkUI.ArkUI.Full
475   * @form
476   * @atomicservice
477   * @since 12
478   */
479  direction?: EffectDirection;
480}
481
482/**
483 * Defines ReplaceSymbolEffect class.
484 *
485 * @extends SymbolEffect
486 * @syscap SystemCapability.ArkUI.ArkUI.Full
487 * @form
488 * @atomicservice
489 * @since 12
490 */
491declare class ReplaceSymbolEffect extends SymbolEffect {
492  /**
493   * constructor.
494   *
495   * @param { EffectScope } [scope] -  The scope type of symbol effect.
496   * @syscap SystemCapability.ArkUI.ArkUI.Full
497   * @form
498   * @atomicservice
499   * @since 12
500   */
501  constructor(scope?: EffectScope);
502
503  /**
504   * The scope type of symbol effect
505   *
506   * @type { ?EffectScope }
507   * @syscap SystemCapability.ArkUI.ArkUI.Full
508   * @form
509   * @atomicservice
510   * @since 12
511   */
512  scope?: EffectScope;
513}
514
515/**
516 * Defines PulseSymbolEffect class.
517 *
518 * @extends SymbolEffect
519 * @syscap SystemCapability.ArkUI.ArkUI.Full
520 * @form
521 * @atomicservice
522 * @since 12
523 */
524declare class PulseSymbolEffect extends SymbolEffect {
525}
526
527/**
528 * Provides attribute for SymbolGlyph.
529 *
530 * @extends CommonMethod<SymbolGlyphAttribute>
531 * @syscap SystemCapability.ArkUI.ArkUI.Full
532 * @since 11
533 */
534/**
535 * Provides attribute for SymbolGlyph.
536 *
537 * @extends CommonMethod<SymbolGlyphAttribute>
538 * @syscap SystemCapability.ArkUI.ArkUI.Full
539 * @form
540 * @atomicservice
541 * @since 12
542 */
543declare class SymbolGlyphAttribute extends CommonMethod<SymbolGlyphAttribute> {
544  /**
545   * Called when the SymbolGlyph size is set.
546   *
547   * @param { number | string | Resource } value
548   * @returns { SymbolGlyphAttribute }
549   * @syscap SystemCapability.ArkUI.ArkUI.Full
550   * @since 11
551   */
552  /**
553   * Called when the SymbolGlyph size is set.
554   *
555   * @param { number | string | Resource } value
556   * @returns { SymbolGlyphAttribute }
557   * @syscap SystemCapability.ArkUI.ArkUI.Full
558   * @form
559   * @atomicservice
560   * @since 12
561   */
562  fontSize(value: number | string | Resource): SymbolGlyphAttribute;
563
564  /**
565   * Called when the SymbolGlyph color is set.
566   *
567   * @param { Array<ResourceColor> } value
568   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
569   * @syscap SystemCapability.ArkUI.ArkUI.Full
570   * @since 11
571   */
572  /**
573   * Called when the SymbolGlyph color is set.
574   *
575   * @param { Array<ResourceColor> } value
576   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
577   * @syscap SystemCapability.ArkUI.ArkUI.Full
578   * @form
579   * @atomicservice
580   * @since 12
581   */
582  fontColor(value: Array<ResourceColor>): SymbolGlyphAttribute;
583
584  /**
585   * Called when the font symbolGlyph weight is set.
586   *
587   * @param { number | FontWeight | string } value
588   * @returns { SymbolGlyphAttribute }
589   * @syscap SystemCapability.ArkUI.ArkUI.Full
590   * @since 11
591   */
592  /**
593   * Called when the font symbolGlyph weight is set.
594   *
595   * @param { number | FontWeight | string } value
596   * @returns { SymbolGlyphAttribute }
597   * @syscap SystemCapability.ArkUI.ArkUI.Full
598   * @form
599   * @atomicservice
600   * @since 12
601   */
602  fontWeight(value: number | FontWeight | string): SymbolGlyphAttribute;
603
604  /**
605   * Called when the symbolGlyph effect is set.
606   *
607   * @param { SymbolEffectStrategy } value
608   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
609   * @syscap SystemCapability.ArkUI.ArkUI.Full
610   * @since 11
611   */
612  /**
613   * Called when the symbolGlyph effect is set.
614   *
615   * @param { SymbolEffectStrategy } value
616   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
617   * @syscap SystemCapability.ArkUI.ArkUI.Full
618   * @form
619   * @atomicservice
620   * @since 12
621   */
622  effectStrategy(value: SymbolEffectStrategy): SymbolGlyphAttribute;
623
624  /**
625   * Called when the symbolGlyph rendering strategy is set.
626   *
627   * @param { SymbolRenderingStrategy } value
628   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
629   * @syscap SystemCapability.ArkUI.ArkUI.Full
630   * @since 11
631   */
632  /**
633   * Called when the symbolGlyph rendering strategy is set.
634   *
635   * @param { SymbolRenderingStrategy } value
636   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
637   * @syscap SystemCapability.ArkUI.ArkUI.Full
638   * @form
639   * @atomicservice
640   * @since 12
641   */
642  renderingStrategy(value: SymbolRenderingStrategy): SymbolGlyphAttribute;
643
644  /**
645   * Define effect options for SymbolGlyph.
646   *
647   * @param { SymbolEffect } [symbolEffect] - The symbol effect type
648   * @param { boolean } [isActive] - The active state of the effect
649   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
650   * @syscap SystemCapability.ArkUI.ArkUI.Full
651   * @form
652   * @atomicservice
653   * @since 12
654   */
655  symbolEffect(symbolEffect: SymbolEffect, isActive?: boolean): SymbolGlyphAttribute;
656
657  /**
658   *  Define effect options for SymbolGlyph.
659   *
660   * @param { SymbolEffect } [symbolEffect] - The symbol effect type
661   * @param { number } [triggerValue] - The trigger of the effect
662   * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph.
663   * @syscap SystemCapability.ArkUI.ArkUI.Full
664   * @form
665   * @atomicservice
666   * @since 12
667   */
668  symbolEffect(symbolEffect: SymbolEffect, triggerValue?: number): SymbolGlyphAttribute;
669
670  /**
671   * Called when the minimum font scale of the font is set.
672   *
673   * @param { Optional<number|Resource> } scale
674   * @returns { SymbolGlyphAttribute }
675   * @syscap SystemCapability.ArkUI.ArkUI.Full
676   * @atomicservice
677   * @since 18
678   */
679  minFontScale(scale: Optional<number | Resource>): SymbolGlyphAttribute;
680
681  /**
682   * Called when the maximum font scale of the font is set.
683   *
684   * @param { Optional<number|Resource> } scale
685   * @returns { SymbolGlyphAttribute }
686   * @syscap SystemCapability.ArkUI.ArkUI.Full
687   * @atomicservice
688   * @since 18
689   */
690  maxFontScale(scale: Optional<number | Resource>): SymbolGlyphAttribute;
691}
692
693/**
694 * Defines SymbolGlyph Component.
695 *
696 * @syscap SystemCapability.ArkUI.ArkUI.Full
697 * @since 11
698 */
699/**
700 * Defines SymbolGlyph Component.
701 *
702 * @syscap SystemCapability.ArkUI.ArkUI.Full
703 * @form
704 * @atomicservice
705 * @since 12
706 */
707declare const SymbolGlyph: SymbolGlyphInterface;
708
709/**
710 * Defines SymbolGlyph Component instance.
711 *
712 * @syscap SystemCapability.ArkUI.ArkUI.Full
713 * @since 11
714 */
715/**
716 * Defines SymbolGlyph Component instance.
717 *
718 * @syscap SystemCapability.ArkUI.ArkUI.Full
719 * @form
720 * @atomicservice
721 * @since 12
722 */
723declare const SymbolGlyphInstance: SymbolGlyphAttribute;
724