IUIAnimationTimer interface
Defines an animation timer, which provides services for managing animation timing.
When to implement
Client applications generally do not need to implement this interface.
When to use
Client applications can use timing services provided by IUIAnimationTimer to drive animations. An implementation is provided by the UIAnimationTimer object. Client applications can choose to connect the animation timer to the animation manager by calling the IUIAnimationTimer::SetTimerUpdateHandler method.
Members
The IUIAnimationTimer interface inherits from the IUnknown interface. IUIAnimationTimer also has these types of members:
Methods
The IUIAnimationTimer interface has these methods.
| Method | Description |
|---|---|
| IUIAnimationTimer::Disable |
Disables the animation timer. |
| IUIAnimationTimer::Enable |
Enables the animation timer. |
| IUIAnimationTimer::GetTime |
Gets the current time. |
| IUIAnimationTimer::IsEnabled |
Determines whether the timer is currently enabled. |
| IUIAnimationTimer::SetFrameRateThreshold |
Sets the frame rate below which the timer notifies the application that rendering is too slow. |
| IUIAnimationTimer::SetTimerEventHandler |
Specifies a timer event handler. |
| IUIAnimationTimer::SetTimerUpdateHandler |
Specifies a timer update handler. |
Remarks
A timer helps to manage animation rendering by automatically indicating the passage of a small unit of time, called a tick. In turn, ticks can trigger animation rendering or other animation events. Each animation timer provides timing for a single animation manager.
The timing system is designed to provide the necessary timing services needed to support animations and does not require applications to play an explicit role in generating the ticks. The animation timer can be set up to automatically update the animation manager for each tick without application-side handling.
An application may not need to use a timer with Windows Animation, depending on the graphics platform it is using. For example, an application drawing with Direct2D or Direct3D can synchronize to monitor's refresh rate, yielding very smooth animation. However, such applications may still find the IUIAnimationTimer interface useful for its GetTime method, which returns an accurate system time in UI_ANIMATION_SECONDS, the units used throughout the Windows Animation API.
Examples
For an example that creates the animation timer object, see Create the Main Animation Objects.
Requirements
|
Minimum supported client |
Windows 7, Windows Vista and Platform Update for Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
None supported |
|
Header |
|
|
IDL |
|
|
DLL |
|
|
IID |
IID_IUIAnimationTimer is defined as 6B0EFAD1-A053-41d6-9085-33A689144665 |
See also
- IUnknown
- IUIAnimationTimerClientEventHandler
- IUIAnimationTimerEventHandler
- IUIAnimationTimerUpdateHandler