CAknsEffectAnim Class Reference

class CAknsEffectAnim : public CBase

Animation controller for using effect animations.

Since
3.0

Inherits from

Constructor & Destructor Documentation

CAknsEffectAnim()

CAknsEffectAnim ( ) [private]

~CAknsEffectAnim()

IMPORT_C ~CAknsEffectAnim ( ) [virtual]

Member Functions Documentation

BeginConfigInputLayersL(const TSize &, TBool)

IMPORT_C void BeginConfigInputLayersL ( const TSize & aNewSize,
TBool aAboutToStart
)

Starts configuring input layers, should be called prior to Begin() and Continue() to restore input layers to animation. Configure sequence is as follows: 1. Call BeginConfigLayers to start configuration 2. Use InputRgbGc and InputAlphaGc to prepare input layers 3. Call EndConfigLayers to end configuration

Parameters

const TSize & aNewSize The layer size, must be larger than or equal to minimum size. Providing size smaller than minimum size will lead to leave with KErrArgument.
TBool aAboutToStart If animation is about to be started or continued after layer configuration this should be set to ETrue (to keep input layers). Otherwise EFalse should be used.

ConstructFromSkinL(const TAknsItemID &)

IMPORT_C TBool ConstructFromSkinL ( const TAknsItemID & aItemID )

Constructs animation from skin item. Leaves if animation construction fails.

Parameters

const TAknsItemID & aItemID Animation skin item ID

ConstructL(MAknsEffectAnimObserver *)

void ConstructL ( MAknsEffectAnimObserver * aObserver ) [private]

Parameters

MAknsEffectAnimObserver * aObserver

Continue()

IMPORT_C TInt Continue ( )

Continues the animation from the state where it was paused.

EndConfigInputLayersL()

IMPORT_C void EndConfigInputLayersL ( )

Ends layer configuration.

InputAlphaGc()

IMPORT_C CFbsBitGc * InputAlphaGc ( ) const

Graphics context for drawing the input layer alpha. Can be NULL, in this case animation is not expecting input layer alpha.

InputRgbGc()

IMPORT_C CFbsBitGc * InputRgbGc ( ) const

Graphics context for drawing the input layer RGB. Can be NULL, in this case animation is not expecting input layer.

IsIdling()

IMPORT_C TBool IsIdling ( ) const

MinimumSize()

IMPORT_C TSize MinimumSize ( ) const

NeedsInputLayer()

IMPORT_C TBool NeedsInputLayer ( ) const

NewL(MAknsEffectAnimObserver *)

IMPORT_C CAknsEffectAnim * NewL ( MAknsEffectAnimObserver * aObserver ) [static]

Creates a new animation controller. Full construction requires a call to ConstructFromSkinL. Leaves with KErrNotSupported if highlight animations have been disabled, see AknsUtils::SetAvkonHighlightAnimationEnabledL .

Parameters

MAknsEffectAnimObserver * aObserver Must be non-NULL

OutputAlpha()

IMPORT_C const CFbsBitmap * OutputAlpha ( ) const

OutputRgb()

IMPORT_C const CFbsBitmap * OutputRgb ( ) const

Pause()

IMPORT_C TInt Pause ( )

Pauses the animation. Input layers are not released.

Render(CFbsBitGc &, const TRect &)

IMPORT_C TBool Render ( CFbsBitGc & aGc,
const TRect & aGcRect
) const

Renders the current animation frame with the provided graphics context. The animation may have an output mask. The output mask will be used in the rendering if it exists. Otherwise nonmasked renderig will be used. Rendering will use BitBlt. For more specialized rendering use the exposed output bitmaps.

Parameters

CFbsBitGc & aGc The graphics context used for rendering.
const TRect & aGcRect The frame is blit to this rectangle on the graphics context target.

Render(CWindowGc &, const TRect &)

IMPORT_C TBool Render ( CWindowGc & aGc,
const TRect & aGcRect
) const

Similar to the other Render, this version is just for the window graphics context.

Parameters

CWindowGc & aGc
const TRect & aGcRect

Render(CBitmapContext &, const TRect &)

IMPORT_C TBool Render ( CBitmapContext & aGc,
const TRect & aGcRect
) const

Similar to the other renders, this version is just for the bitmap graphics context.

Since
3.1

Parameters

CBitmapContext & aGc
const TRect & aGcRect

SetIdling(TInt)

IMPORT_C void SetIdling ( TInt aIntervalMs )

When animation is idling it won't update the actual animation. Observer AnimFrameReady will be called when idle timer timeouts. Animation observer should check there whether or not animation is idling and ignore redraw calls caused by idling.

Only animations in state EAknsAnimStateRunning can be set idling. Setting idling causes the animation to go in paused state. Trying to idle animation in any other state will be silently ignored. Also, idling is interrupted when animation is started, stoppped, paused or continued. Idling is not interrupted if the animation is resized when being idled. Idling can be reset, e.g. calling SetIdling multiple times is ok.

Parameters

TInt aIntervalMs

Size()

IMPORT_C TSize Size ( ) const

Start()

IMPORT_C TInt Start ( )

Starts the animation from the very beginning.

State()

IMPORT_C TInt State ( )

Stop()

IMPORT_C TInt Stop ( )

Stops the animation. Input layers are released, output layer is kept.

UpdateOutput()

IMPORT_C TInt UpdateOutput ( )

Renders the output layer once without notifying the animation observer. Doesn't set animator error state if fails.

Member Data Documentation

TInt iAboutToStart

TInt iAboutToStart [private]

CAknsAlAnimatorBmp * iAnim

CAknsAlAnimatorBmp * iAnim [private]