OHOS::Animator

Overview

Related Modules:

Graphic

Description:

Represents an animator.

This class is used to set the animator attributes, such as the duration, whether an animator is repeated, start and stop of an animator.

Since:

1.0

Version:

1.0

Summary

Public Types

Public Type Name

Description

: uint8_t { STOP, START, PAUSE, RUNNING }

Enumerates the states of this animator.

Public Member Functions

Public Member Function Name

Description

Animator ()

 

A default constructor used to create an Animator instance.

Animator (AnimatorCallbackcallback, UIViewview, uint32_t time, bool repeat)

 

A constructor used to create an Animator instance.

~Animator ()

virtual 

A destructor used to delete the Animator instance.

Start ()

void 

Starts this animator.

Stop ()

void 

Stops this animator.

Pause ()

void 

Pauses this animator.

Resume ()

void 

Resumes this animator from where it was paused.

GetState () const

uint8_t 

Obtains the current state of this animator.

SetState (uint8_t state)

void 

Sets the current state for this animator.

GetTime () const

uint32_t 

Obtains the total duration of this animator.

SetTime (uint32_t time)

void 

Sets the total duration for this animator.

GetRunTime () const

uint32_t 

Obtains the running time of this animator.

SetRunTime (uint32_t runTime)

void 

Sets the running time for this animator.

IsRepeat () const

bool 

Checks whether this animator is repeated.

operator new (size_t size)

void  

Overrides the new function.

operator delete (void p)

void 

Overrides the delete function.