• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2020-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 * Defines the animator options.
23 * @interface AnimatorOptions
24 * @syscap SystemCapability.ArkUI.ArkUI.Full
25 * @since 6
26 */
27/**
28 * Defines the animator options.
29 * @interface AnimatorOptions
30 * @syscap SystemCapability.ArkUI.ArkUI.Full
31 * @crossplatform
32 * @since 10
33 */
34/**
35 * Defines the animator options.
36 * @interface AnimatorOptions
37 * @syscap SystemCapability.ArkUI.ArkUI.Full
38 * @crossplatform
39 * @atomicservice
40 * @since 11
41 */
42export interface AnimatorOptions {
43  /**
44   * Duration of the animation, in milliseconds.
45   * The default value is 0.
46   * @type {number}
47   * @syscap SystemCapability.ArkUI.ArkUI.Full
48   * @since 6
49   */
50  /**
51   * Duration of the animation, in milliseconds.
52   * The default value is 0.
53   * @type {number}
54   * @syscap SystemCapability.ArkUI.ArkUI.Full
55   * @crossplatform
56   * @since 10
57   */
58  /**
59   * Duration of the animation, in milliseconds.
60   * The default value is 0.
61   * @type {number}
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @atomicservice
65   * @since 11
66   */
67  duration: number;
68
69  /**
70   * Time curve of the animation. For details about the supported types.
71   * linear The animation speed keeps unchanged.
72   * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0).
73   * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0).
74   * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0).
75   * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0).
76   * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0).
77   * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0).
78   * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0).
79   * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0).
80   * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0).
81   * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0).
82   * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0).
83   * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0).
84   * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1.
85   * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
86   * The default value is ease.
87   * @type {string}
88   * @syscap SystemCapability.ArkUI.ArkUI.Full
89   * @since 6
90   */
91  /**
92   * Time curve of the animation. For details about the supported types.
93   * linear The animation speed keeps unchanged.
94   * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0).
95   * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0).
96   * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0).
97   * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0).
98   * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0).
99   * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0).
100   * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0).
101   * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0).
102   * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0).
103   * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0).
104   * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0).
105   * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0).
106   * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1.
107   * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
108   * The default value is ease.
109   * @type {string}
110   * @syscap SystemCapability.ArkUI.ArkUI.Full
111   * @crossplatform
112   * @since 10
113   */
114  /**
115   * Time curve of the animation. For details about the supported types.
116   * linear The animation speed keeps unchanged.
117   * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0).
118   * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0).
119   * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0).
120   * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0).
121   * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0).
122   * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0).
123   * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0).
124   * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0).
125   * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0).
126   * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0).
127   * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0).
128   * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0).
129   * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1.
130   * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
131   * interpolating-spring(velocity, mass, stiffness, damping), interpolating spring curve.
132   * The default value is ease.
133   * @type {string}
134   * @syscap SystemCapability.ArkUI.ArkUI.Full
135   * @crossplatform
136   * @atomicservice
137   * @since 11
138   */
139  easing: string;
140
141  /**
142   * Delay for the animation start. The default value indicates no delay.
143   * The default value is 0.
144   * @type {number}
145   * @syscap SystemCapability.ArkUI.ArkUI.Full
146   * @since 6
147   */
148  /**
149   * Delay for the animation start. The default value indicates no delay.
150   * The default value is 0.
151   * @type {number}
152   * @syscap SystemCapability.ArkUI.ArkUI.Full
153   * @crossplatform
154   * @since 10
155   */
156  /**
157   * Delay for the animation start. The default value indicates no delay.
158   * The default value is 0.
159   * @type {number}
160   * @syscap SystemCapability.ArkUI.ArkUI.Full
161   * @crossplatform
162   * @atomicservice
163   * @since 11
164   */
165  delay: number;
166
167  /**
168   * Whether to resume to the initial state after the animation is executed.
169   * none: The initial state is restored after the animation is executed.
170   * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
171   * @type {"none" | "forwards" | "backwards" | "both"}
172   * @syscap SystemCapability.ArkUI.ArkUI.Full
173   * @since 6
174   */
175  /**
176   * Whether to resume to the initial state after the animation is executed.
177   * none: The initial state is restored after the animation is executed.
178   * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
179   * @type {"none" | "forwards" | "backwards" | "both"}
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @crossplatform
182   * @since 10
183   */
184  /**
185   * Whether to resume to the initial state after the animation is executed.
186   * none: The initial state is restored after the animation is executed.
187   * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
188   * @type {"none" | "forwards" | "backwards" | "both"}
189   * @syscap SystemCapability.ArkUI.ArkUI.Full
190   * @crossplatform
191   * @atomicservice
192   * @since 11
193   */
194  fill: "none" | "forwards" | "backwards" | "both";
195
196  /**
197   * The animation playback mode.
198   * The default value is "normal".
199   * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"}
200   * @syscap SystemCapability.ArkUI.ArkUI.Full
201   * @since 6
202   */
203  /**
204   * The animation playback mode.
205   * The default value is "normal".
206   * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"}
207   * @syscap SystemCapability.ArkUI.ArkUI.Full
208   * @crossplatform
209   * @since 10
210   */
211  /**
212   * The animation playback mode.
213   * The default value is "normal".
214   * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"}
215   * @syscap SystemCapability.ArkUI.ArkUI.Full
216   * @crossplatform
217   * @atomicservice
218   * @since 11
219   */
220  direction: "normal" | "reverse" | "alternate" | "alternate-reverse";
221
222  /**
223   * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations.
224   * The default value is 1.
225   * @type {number}
226   * @syscap SystemCapability.ArkUI.ArkUI.Full
227   * @since 6
228   */
229  /**
230   * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations.
231   * The default value is 1.
232   * @type {number}
233   * @syscap SystemCapability.ArkUI.ArkUI.Full
234   * @crossplatform
235   * @since 10
236   */
237  /**
238   * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations.
239   * The default value is 1.
240   * @type {number}
241   * @syscap SystemCapability.ArkUI.ArkUI.Full
242   * @crossplatform
243   * @atomicservice
244   * @since 11
245   */
246  iterations: number;
247
248  /**
249   * Starting point of animator interpolation.
250   * The default value is 0.
251   * @type {number}
252   * @syscap SystemCapability.ArkUI.ArkUI.Full
253   * @since 6
254   */
255  /**
256   * Starting point of animator interpolation.
257   * The default value is 0.
258   * @type {number}
259   * @syscap SystemCapability.ArkUI.ArkUI.Full
260   * @crossplatform
261   * @since 10
262   */
263  /**
264   * Starting point of animator interpolation.
265   * The default value is 0.
266   * @type {number}
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @crossplatform
269   * @atomicservice
270   * @since 11
271   */
272  begin: number;
273
274  /**
275   * Ending point of Dynamic Interpolation
276   * The default value is 1.
277   * @type {number}
278   * @syscap SystemCapability.ArkUI.ArkUI.Full
279   * @since 6
280   */
281  /**
282   * Ending point of Dynamic Interpolation
283   * The default value is 1.
284   * @type {number}
285   * @syscap SystemCapability.ArkUI.ArkUI.Full
286   * @crossplatform
287   * @since 10
288   */
289  /**
290   * Ending point of Dynamic Interpolation
291   * The default value is 1.
292   * @type {number}
293   * @syscap SystemCapability.ArkUI.ArkUI.Full
294   * @crossplatform
295   * @atomicservice
296   * @since 11
297   */
298  end: number;
299}
300
301/**
302 * Defines the SimpleAnimatorOptions class.
303 *
304 * @syscap SystemCapability.ArkUI.ArkUI.Full
305 * @crossplatform
306 * @atomicservice
307 * @since 18
308 */
309export declare class SimpleAnimatorOptions {
310  /**
311   * constructor.
312   *
313   * @param { number } begin - Starting point of animator interpolation.
314   * @param { number } end - Ending point of animator interpolation.
315   * @syscap SystemCapability.ArkUI.ArkUI.Full
316   * @crossplatform
317   * @atomicservice
318   * @since 18
319   */
320  constructor(begin: number, end: number);
321
322  /**
323   * Set duration of the animation, in milliseconds.
324   *
325   * @param { number } duration - if not set, default is 1000.
326   * @returns { SimpleAnimatorOptions }
327   * @syscap SystemCapability.ArkUI.ArkUI.Full
328   * @crossplatform
329   * @atomicservice
330   * @since 18
331   */
332  duration(duration: number): SimpleAnimatorOptions;
333
334  /**
335   * Set time curve of the animation. For details about the supported types.
336   * linear The animation speed keeps unchanged.
337   * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0).
338   * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0).
339   * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0).
340   * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0).
341   * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0).
342   * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0).
343   * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0).
344   * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0).
345   * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0).
346   * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0).
347   * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0).
348   * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0).
349   * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1.
350   * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
351   * @param { string } curve - if not set, default is ease.
352   * @returns { SimpleAnimatorOptions }
353   * @syscap SystemCapability.ArkUI.ArkUI.Full
354   * @crossplatform
355   * @atomicservice
356   * @since 18
357   */
358  easing(curve: string): SimpleAnimatorOptions;
359
360  /**
361   * Set delay for the animation start. The default value indicates no delay.
362   *
363   * @param { number } delay - if not set, default is 0.
364   * @returns { SimpleAnimatorOptions }
365   * @syscap SystemCapability.ArkUI.ArkUI.Full
366   * @crossplatform
367   * @atomicservice
368   * @since 18
369   */
370  delay(delay: number): SimpleAnimatorOptions;
371
372  /**
373   * Set FillMode of animation. FillMode indicates whether to resume to the initial state after the animation is executed.
374   *
375   * @param { FillMode } fillMode - if not set, default is FillMode.Forwards.
376   * @returns { SimpleAnimatorOptions }
377   * @syscap SystemCapability.ArkUI.ArkUI.Full
378   * @crossplatform
379   * @atomicservice
380   * @since 18
381   */
382  fill(fillMode: FillMode): SimpleAnimatorOptions;
383
384  /**
385   * Set the animation playback mode.
386   *
387   * @param { PlayMode } direction - if not set, default is PlayMode.Normal.
388   * @returns { SimpleAnimatorOptions }
389   * @syscap SystemCapability.ArkUI.ArkUI.Full
390   * @crossplatform
391   * @atomicservice
392   * @since 18
393   */
394  direction(direction: PlayMode): SimpleAnimatorOptions;
395
396  /**
397   * Set number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations.
398   *
399   * @param { number } iterations - if not set, default is 1.
400   * @returns { SimpleAnimatorOptions }
401   * @syscap SystemCapability.ArkUI.ArkUI.Full
402   * @crossplatform
403   * @atomicservice
404   * @since 18
405   */
406  iterations(iterations: number): SimpleAnimatorOptions;
407}
408
409/**
410 * Defines the Animator result interface.
411 * @interface AnimatorResult
412 * @syscap SystemCapability.ArkUI.ArkUI.Full
413 * @since 6
414 */
415/**
416 * Defines the Animator result interface.
417 * @interface AnimatorResult
418 * @syscap SystemCapability.ArkUI.ArkUI.Full
419 * @crossplatform
420 * @since 10
421 */
422/**
423 * Defines the Animator result interface.
424 * @interface AnimatorResult
425 * @syscap SystemCapability.ArkUI.ArkUI.Full
426 * @crossplatform
427 * @atomicservice
428 * @since 11
429 */
430export interface AnimatorResult {
431  /**
432   * Update the options for current animator.
433   * @param { AnimatorOptions } options - Options.
434   * @syscap SystemCapability.ArkUI.ArkUI.Full
435   * @since 6
436   * @deprecated since 9
437   * @useinstead ohos.animator.reset
438   */
439  update(options: AnimatorOptions): void;
440
441  /**
442   * Reset the options for current animator.
443   * @param { AnimatorOptions } options - Options.
444   * @throws { BusinessError } 401 - Parameter error. Possible causes:
445   * <br> 1. Mandatory parameters are left unspecified.
446   * <br> 2. Incorrect parameters types.
447   * <br> 3. Parameter verification failed.
448   * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained.
449   * @syscap SystemCapability.ArkUI.ArkUI.Full
450   * @since 9
451   */
452  /**
453   * Reset the options for current animator.
454   * @param { AnimatorOptions } options - Options.
455   * @throws { BusinessError } 401 - Parameter error. Possible causes:
456   * <br> 1. Mandatory parameters are left unspecified.
457   * <br> 2. Incorrect parameters types.
458   * <br> 3. Parameter verification failed.
459   * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained.
460   * @syscap SystemCapability.ArkUI.ArkUI.Full
461   * @crossplatform
462   * @since 10
463   */
464  /**
465   * Reset the options for current animator.
466   * @param { AnimatorOptions } options - Options.
467   * @throws { BusinessError } 401 - Parameter error. Possible causes:
468   * <br> 1. Mandatory parameters are left unspecified.
469   * <br> 2. Incorrect parameters types.
470   * <br> 3. Parameter verification failed.
471   * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained.
472   * @syscap SystemCapability.ArkUI.ArkUI.Full
473   * @crossplatform
474   * @atomicservice
475   * @since 11
476   */
477  reset(options: AnimatorOptions): void;
478
479  /**
480   * Reset the options for current animator.
481   * @param { AnimatorOptions | SimpleAnimatorOptions } options - Options.
482   * @throws { BusinessError } 401 - Parameter error. Possible causes:
483   * <br> 1. Mandatory parameters are left unspecified.
484   * <br> 2. Incorrect parameters types.
485   * <br> 3. Parameter verification failed.
486   * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained.
487   * @syscap SystemCapability.ArkUI.ArkUI.Full
488   * @crossplatform
489   * @atomicservice
490   * @since 18
491   */
492  reset(options: AnimatorOptions | SimpleAnimatorOptions): void;
493
494  /**
495   * Starts the animation.
496   * @syscap SystemCapability.ArkUI.ArkUI.Full
497   * @since 6
498   */
499  /**
500   * Starts the animation.
501   * @syscap SystemCapability.ArkUI.ArkUI.Full
502   * @crossplatform
503   * @since 10
504   */
505  /**
506   * Starts the animation.
507   * @syscap SystemCapability.ArkUI.ArkUI.Full
508   * @crossplatform
509   * @atomicservice
510   * @since 11
511   */
512  play(): void;
513
514  /**
515   * Ends the animation.
516   * @syscap SystemCapability.ArkUI.ArkUI.Full
517   * @since 6
518   */
519  /**
520   * Ends the animation.
521   * @syscap SystemCapability.ArkUI.ArkUI.Full
522   * @crossplatform
523   * @since 10
524   */
525  /**
526   * Ends the animation.
527   * @syscap SystemCapability.ArkUI.ArkUI.Full
528   * @crossplatform
529   * @atomicservice
530   * @since 11
531   */
532  finish(): void;
533
534  /**
535   * Pauses the animation.
536   * @syscap SystemCapability.ArkUI.ArkUI.Full
537   * @since 6
538   */
539  /**
540   * Pauses the animation.
541   * @syscap SystemCapability.ArkUI.ArkUI.Full
542   * @crossplatform
543   * @since 10
544   */
545  /**
546   * Pauses the animation.
547   * @syscap SystemCapability.ArkUI.ArkUI.Full
548   * @crossplatform
549   * @atomicservice
550   * @since 11
551   */
552  pause(): void;
553
554  /**
555   * Cancels the animation.
556   * @syscap SystemCapability.ArkUI.ArkUI.Full
557   * @since 6
558   */
559  /**
560   * Cancels the animation.
561   * @syscap SystemCapability.ArkUI.ArkUI.Full
562   * @crossplatform
563   * @since 10
564   */
565  /**
566   * Cancels the animation.
567   * @syscap SystemCapability.ArkUI.ArkUI.Full
568   * @crossplatform
569   * @atomicservice
570   * @since 11
571   */
572  cancel(): void;
573
574  /**
575   * Plays the animation in reverse direction.
576   * @syscap SystemCapability.ArkUI.ArkUI.Full
577   * @since 6
578   */
579  /**
580   * Plays the animation in reverse direction.
581   * @syscap SystemCapability.ArkUI.ArkUI.Full
582   * @crossplatform
583   * @since 10
584   */
585  /**
586   * Plays the animation in reverse direction.
587   * Invalid when using interpolating-spring curve.
588   * @syscap SystemCapability.ArkUI.ArkUI.Full
589   * @crossplatform
590   * @atomicservice
591   * @since 11
592   */
593  reverse(): void;
594
595  /**
596   * Trigger when vsync callback.
597   * @syscap SystemCapability.ArkUI.ArkUI.Full
598   * @since 6
599   */
600  /**
601   * Trigger when vsync callback.
602   * @syscap SystemCapability.ArkUI.ArkUI.Full
603   * @crossplatform
604   * @since 10
605   */
606  /**
607   * Trigger when vsync callback.
608   * @syscap SystemCapability.ArkUI.ArkUI.Full
609   * @crossplatform
610   * @atomicservice
611   * @since 11
612   * @deprecated since 12
613   * @useinstead ohos.animator.onFrame
614   */
615  onframe: (progress: number) => void;
616
617  /**
618   * Trigger when vSync callback.
619   *
620   * @type { function }
621   * @syscap SystemCapability.ArkUI.ArkUI.Full
622   * @crossplatform
623   * @atomicservice
624   * @since 12
625   */
626  onFrame: (progress: number) => void;
627
628  /**
629   * The animation is finished.
630   * @syscap SystemCapability.ArkUI.ArkUI.Full
631   * @since 6
632   */
633  /**
634   * The animation is finished.
635   * @syscap SystemCapability.ArkUI.ArkUI.Full
636   * @crossplatform
637   * @since 10
638   */
639  /**
640   * The animation is finished.
641   * @syscap SystemCapability.ArkUI.ArkUI.Full
642   * @crossplatform
643   * @atomicservice
644   * @since 11
645   * @deprecated since 12
646   * @useinstead ohos.animator.onFinish
647   */
648  onfinish: () => void;
649
650  /**
651   * The animation is finished.
652   *
653   * @type { function }
654   * @syscap SystemCapability.ArkUI.ArkUI.Full
655   * @crossplatform
656   * @atomicservice
657   * @since 12
658   */
659  onFinish: () => void;
660
661  /**
662   * The animation is canceled.
663   * @syscap SystemCapability.ArkUI.ArkUI.Full
664   * @since 6
665   */
666  /**
667   * The animation is canceled.
668   * @syscap SystemCapability.ArkUI.ArkUI.Full
669   * @crossplatform
670   * @since 10
671   */
672  /**
673   * The animation is canceled.
674   * @syscap SystemCapability.ArkUI.ArkUI.Full
675   * @crossplatform
676   * @atomicservice
677   * @since 11
678   * @deprecated since 12
679   * @useinstead ohos.animator.onCancel
680   */
681  oncancel: () => void;
682
683  /**
684   * The animation is canceled.
685   *
686   * @type { function }
687   * @syscap SystemCapability.ArkUI.ArkUI.Full
688   * @crossplatform
689   * @atomicservice
690   * @since 12
691   */
692  onCancel: () => void;
693
694  /**
695   * The animation is repeated.
696   * @syscap SystemCapability.ArkUI.ArkUI.Full
697   * @since 6
698   */
699  /**
700   * The animation is repeated.
701   * @syscap SystemCapability.ArkUI.ArkUI.Full
702   * @crossplatform
703   * @since 10
704   */
705  /**
706   * The animation is repeated.
707   * @syscap SystemCapability.ArkUI.ArkUI.Full
708   * @crossplatform
709   * @atomicservice
710   * @since 11
711   * @deprecated since 12
712   * @useinstead ohos.animator.onRepeat
713   */
714  onrepeat: () => void;
715
716  /**
717   * The animation is repeated.
718   *
719   * @type { function }
720   * @syscap SystemCapability.ArkUI.ArkUI.Full
721   * @crossplatform
722   * @atomicservice
723   * @since 12
724   */
725  onRepeat: () => void;
726
727  /**
728   * The expected frame rate of dynamical of rate range.
729   * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange.
730   * @syscap SystemCapability.ArkUI.ArkUI.Full
731   * @atomicservice
732   * @since 12
733   */
734  setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void;
735}
736
737/**
738 * Defines the Animator class.
739 * @syscap SystemCapability.ArkUI.ArkUI.Full
740 * @since 6
741 */
742/**
743 * Defines the Animator class.
744 * @syscap SystemCapability.ArkUI.ArkUI.Full
745 * @crossplatform
746 * @since 10
747 */
748/**
749 * Defines the Animator class.
750 * @syscap SystemCapability.ArkUI.ArkUI.Full
751 * @crossplatform
752 * @atomicservice
753 * @since 11
754 */
755export default class Animator {
756  /**
757   * Create an animator object for custom animation.
758   * @param { AnimatorOptions } options - Options.
759   * @returns { AnimatorResult } animator result
760   * @syscap SystemCapability.ArkUI.ArkUI.Full
761   * @since 6
762   * @deprecated since 9
763   * @useinstead ohos.animator.create
764   */
765  static createAnimator(options: AnimatorOptions): AnimatorResult;
766
767  /**
768   * Create an animator object for custom animation.
769   * @param { AnimatorOptions } options - Options.
770   * @returns { AnimatorResult } animator result
771   * @throws { BusinessError } 401 - Parameter error. Possible causes:
772   * <br> 1. Mandatory parameters are left unspecified.
773   * <br> 2. Incorrect parameters types.
774   * <br> 3. Parameter verification failed.
775   * @syscap SystemCapability.ArkUI.ArkUI.Full
776   * @since 9
777   */
778  /**
779   * Create an animator object for custom animation.
780   * @param { AnimatorOptions } options - Options.
781   * @returns { AnimatorResult } animator result
782   * @throws { BusinessError } 401 - Parameter error. Possible causes:
783   * <br> 1. Mandatory parameters are left unspecified.
784   * <br> 2. Incorrect parameters types.
785   * <br> 3. Parameter verification failed.
786   * @syscap SystemCapability.ArkUI.ArkUI.Full
787   * @crossplatform
788   * @since 10
789   */
790  /**
791   * Create an animator object for custom animation.
792   * @param { AnimatorOptions } options - Options.
793   * @returns { AnimatorResult } animator result
794   * @throws { BusinessError } 401 - Parameter error. Possible causes:
795   * <br> 1. Mandatory parameters are left unspecified.
796   * <br> 2. Incorrect parameters types.
797   * <br> 3. Parameter verification failed.
798   * @syscap SystemCapability.ArkUI.ArkUI.Full
799   * @crossplatform
800   * @atomicservice
801   * @since 11
802   * @deprecated since 18
803   * @useinstead ohos.arkui.UIContext.UIContext#createAnimator
804   */
805  static create(options: AnimatorOptions): AnimatorResult;
806
807  /**
808   * Create an animator object for custom animation.
809   * @param { AnimatorOptions | SimpleAnimatorOptions } options - Options.
810   * @returns { AnimatorResult } animator result
811   * @throws { BusinessError } 401 - Parameter error. Possible causes:
812   * <br> 1. Mandatory parameters are left unspecified.
813   * <br> 2. Incorrect parameters types.
814   * <br> 3. Parameter verification failed.
815   * @syscap SystemCapability.ArkUI.ArkUI.Full
816   * @crossplatform
817   * @atomicservice
818   * @since 18
819   */
820  static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult;
821}
822