CAknBitmapAnimation Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

PowerMgmt ProtServ ReadDeviceData WriteDeviceData

Exceptions

None

Other Information

w32adll.h header file defines (server-side) interfaces for writing animation plugins. The class CAnim is the common base class for sprite and window animation (CSpriteAnim and CWindowAnim). In general, this header file is intended to be used by the animation plugin, not by the client application. The general PlatSec rule for DLLs applies when writing the animation plugin (it's a polymorphic DLL) i.e. it must run at the same capabality as the loading process. In this case the animation plugin DLL must have at least the (Wserv) capabilities mentioned in the required capabilities section of this document.


#include <aknbitmapanimation.h>

Inherits CAknControl.


Public Member Functions

virtual IMPORT_C  ~CAknBitmapAnimation ()
  Destructor.
IMPORT_C RBitmapAnim &  Animation ()
  gives access to RBitmapAnimation.
IMPORT_C CBitmapAnimClientData *  BitmapAnimData () const
  gives access to CBitmapAnimClientData.
IMPORT_C TInt  CancelAnimation ()
  Cancels the animation.
IMPORT_C void  SetFrameIndexL (TInt aIndex)
  Sets the frame index, initialising the animation if necessary.
IMPORT_C void  SetFrameIntervalL (TInt aFrameIntervalInMilliSeconds)
  Sets the frame interval in milliSeconds, initialising the animation if necessary.
IMPORT_C void  StartAnimationL ()
  Starts the animation, initialising the animation if necessary, and starting the timer if necessary.
IMPORT_C void  SetScaleModeForAnimationFrames (TScaleMode aMode)
  Sets the scale mode for the animation frames that is used when the animation frames are scaled to the size of the control.
IMPORT_C void  SetScaleModeForAnimationBackgroundFrame (TScaleMode aMode)
  Sets the scale mode for the animation background frame that is used when the animation background frame is scaled to the size of the control.
IMPORT_C void  ExcludeAnimationFramesFromCache ()
  Excludes the animation frames from the icon cache.
TInt  AnimationHasStarted (TBool aHasStarted)
  Records whether the animation has started.
IMPORT_C TBool  ConstructFromSkinL (const TAknsItemID &aItemID)
  Construct the animation from skin.
virtual IMPORT_C void  ConstructFromResourceL (TResourceReader &aResourceReader)
  Construct animation from resource.
virtual IMPORT_C TSize  MinimumSize ()
  Minimum size.

Static Public Member Functions

static IMPORT_C CAknBitmapAnimation NewL ()
  2 phase construction.

Constructor & Destructor Documentation

virtual IMPORT_C CAknBitmapAnimation::~CAknBitmapAnimation  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C RBitmapAnim& CAknBitmapAnimation::Animation  ) 
 

gives access to RBitmapAnimation.

Returns:
the RBitmapAnim
TInt CAknBitmapAnimation::AnimationHasStarted TBool  aHasStarted  ) 
 

Records whether the animation has started.

If there is a timer, it is cancelled.

Parameters:
aHasStarted  if ETrue, started flag is recorded; if EFalse, the existing flag value is not changed.
Returns:
returns KErrNone in the case of no error occurring.
IMPORT_C CBitmapAnimClientData* CAknBitmapAnimation::BitmapAnimData  )  const
 

gives access to CBitmapAnimClientData.

Returns:
the CBitmapAnimClientData
IMPORT_C TInt CAknBitmapAnimation::CancelAnimation  ) 
 

Cancels the animation.

Returns:
the error code from stopping the animation
virtual IMPORT_C void CAknBitmapAnimation::ConstructFromResourceL TResourceReader &  aResourceReader  )  [virtual]
 

Construct animation from resource.

This can be called after a call to NewL. Can also be called after a failed attempt to call ConstructFromSkinL.

Parameters:
aResourceReader  the resource reader
IMPORT_C TBool CAknBitmapAnimation::ConstructFromSkinL const TAknsItemID aItemID  ) 
 

Construct the animation from skin.

Usually this method should be called before ConstructFromResourceL, and if EFalse is returned the caller should try to construct the same animation with ConstructFromResourceL. The ownership of the constructed animation and its frames is vested in this class. Furthermore, the animation is not automatically updated during a skin change.

Parameters:
aItemID  Item ID of the animation.
Returns:
ETrue if the animation was found and succesfully constructed. EFalse if the animation (or at least one of its frames) was not found.
IMPORT_C void CAknBitmapAnimation::ExcludeAnimationFramesFromCache  ) 
 

Excludes the animation frames from the icon cache.

Note that this method should be called before setting the size of the control to be in effect. If the animation frames are created outside of the scope of this class method AknIconUtils::ExcludeFromCache should be called for animation frames to get the same effect.

By default scalable animation frames are being put to icon cache after they are no longer used. This makes it possible to retrieve recently used animation frames fast without the need to render them again. Excluding infrequently used animation frames from icon cache could improve performance and memory usage of the system.

virtual IMPORT_C TSize CAknBitmapAnimation::MinimumSize  )  [virtual]
 

Minimum size.

static IMPORT_C CAknBitmapAnimation* CAknBitmapAnimation::NewL  )  [static]
 

2 phase construction.

The pattern for constructing this class is non-standard. Call NewL, set the container window, then call the appropriate method to contruct from either skin or resource.

IMPORT_C void CAknBitmapAnimation::SetFrameIndexL TInt  aIndex  ) 
 

Sets the frame index, initialising the animation if necessary.

Parameters:
aIndex  the frame index
IMPORT_C void CAknBitmapAnimation::SetFrameIntervalL TInt  aFrameIntervalInMilliSeconds  ) 
 

Sets the frame interval in milliSeconds, initialising the animation if necessary.

Parameters:
aFrameIntervalInMilliSeconds  the frame interval
IMPORT_C void CAknBitmapAnimation::SetScaleModeForAnimationBackgroundFrame TScaleMode  aMode  ) 
 

Sets the scale mode for the animation background frame that is used when the animation background frame is scaled to the size of the control.

Default scale mode is EAspectRatioPreserved.

Parameters:
aMode  scale mode
IMPORT_C void CAknBitmapAnimation::SetScaleModeForAnimationFrames TScaleMode  aMode  ) 
 

Sets the scale mode for the animation frames that is used when the animation frames are scaled to the size of the control.

Default scale mode is EAspectRatioPreserved.

Parameters:
aMode  scale mode
IMPORT_C void CAknBitmapAnimation::StartAnimationL  ) 
 

Starts the animation, initialising the animation if necessary, and starting the timer if necessary.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top