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