Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Animation Overview

[Top]


Purpose

Allows animations to be run in a high-priority system thread.

[Top]


Architectural relationships

This API defines a framework for polymorphic DLLs that perform animations. These animation DLLs plug in to the Window Server, and so are run in the Window Server's high-priority thread, rather than the application thread.

The Window Server Client-Side API defines base classes for client interfaces that applications use to control animation DLLs. Providers of animation DLLs specialise these client interfaces appropriately.

[Top]


Description

The API has four key concepts: animation factory, animation base class, window animation base class, and sprite animation base class.


Animation factory

Each animation DLL must define a factory for the animations it provides. The DLL must export at ordinal 1 a function to create an instance of this factory class.

The base class for such factories is CAnimDll.


Animation base class

Every animation implements an interface that is called by the window server to:

This interface is CAnim, with its base class MEventHandler. The operation to perform an animation step is called by the window server on a timer: the animation is informed if for any reason timer events are missed or become out of sync. The timing properties are set through an MAnimGeneralFunctions member (an abstract interface that is implemented by the window server). This also provides other utility functions.


Window animation base class

For animations other than sprites, animation providers derive classes from the window animation base class, CWindowAnim, based on CAnim. This adds access to an interface for querying and manipulating the window in which the animation takes place, MAnimWindowFunctions.

A further specialised base class allows animations to be provided that implement their own animation timers. This is CFreeTimerWindowAnim, based on CWindowAnim, with related utility functions provided by MAnimFreeTimerWindowFunctions.


Sprite animation base class

Sprites are bitmaps that can overlay a window. A sprite animation can be provided by deriving a class from CSpriteAnim, based on CAnim. This adds access to an interface for querying and manipulating a sprite, MAnimSpriteFunctions.

[Top]


See also

Window Server Client Side Overview