class CBitmapAnim : public CFreeTimerWindowAnim |
class CBitmapAnim
This class encapsulates the enire animation: attributes and frames.
Public Member Functions | |
---|---|
~CBitmapAnim () | |
CBitmapAnim * | NewL () |
Private Member Enumerations | |
---|---|
enum |
TAnimateFlags
{
ERunning = 0x0001, EFlashing = 0x0002, EFrozen = 0x0004, EPlayModeCycle = 0x0010, EPlayModeBounce = 0x0020, EPlayForwards = 0x0040, EPlayBackwards = 0x0080, EFlash = 0x0100, ENoBitmapWindowRestoring = 0x0800, EDisplayLastFrameWhenFinished = 0x4000 } |
Inherited Attributes | |
---|---|
CAnim::iFunctions | |
CWindowAnim::iGc | |
CWindowAnim::iWindowFunctions |
void | Animate | ( | TDateTime * | aDateTime | ) | [private, virtual] |
Main animation function, called by the window server.
The drawing code which implements a given animation should be provided here.
This function is called at a frequency determined by the SetSync() helper function. Note that if sync is not set, then this function will never be called. This effect can be exploited to use the animation framework, with its server side speed, for what are strictly not animations, e.g. for streaming video images.
The aDateTime parameter will be null if the current time (as determined by the window server) matches the time implied by the sync period, modulo normalisation, otherwise it will contain a valid (non-normalised) time.
Normalisation is to some specified granularity, for example if one minute is specified as the animation frequency, then in effect the window server will decide whether the implied time is correct to the minute, but not to the second.
Implied time is the time implied by the (normalised) actual time of the previous animation call plus the sync interval. For example if the last call was at time 't' and the sync interval is 1 second then if the time at this call is t + 1 second, then actual time and implied time match and the value placed into aDateTime will be NULL.
Cases in which the two may not match include, for example, system time having been reset between animation calls (perhaps British Summer Time or other daylight saving time has just come into effect). The intention is that when system time changes, a mechanism is provided to alert the animation code and allow it to reset itself. The assumption is that somewhere in its initialisation code, the animation will have performed a CAnimFunctions utility call to set a base time, which is then implicitly tracked by incrementing by a suitable interval; when aDateTime is non-NULL after a call to Animate() , base time should be reset.
TDateTime * aDateTime | Null if the current time w.r.t. the window server matches the time implied by the synch period. Otherwise a valid (non-normalised) time. |
void | AppendFrameL | ( | const TFrameData & | aFrameData | ) | [private] |
const TFrameData & aFrameData |
void | Command | ( | TInt | aOpcode, |
TAny * | aArgs | |||
) | [private, virtual] |
Implements client-side initiated commands.
The window server calls this function in response to application calls to the client side command function RAnim::Command() . The arguments passed to the function by the window server are the same as were used on the client side function call.
Because this function does not return errors, it is not safe for commands which might leave.
TInt | CommandReplyL | ( | TInt | aOpcode, |
TAny * | aArgs | |||
) | [private, virtual] |
Implements client-side initiated commands, returning a value.
The window server calls this function in response to application calls to the client side command function RAnim::CommandReplyL(). The arguments passed to the function by the window server are the same as were used on the client side function call.
This function returns values to the client side, and should be used to return error codes for commands which might leave.
void | ConstructL | ( | TAny * | aArgs, |
TBool | aHasFocus | |||
) | [private, virtual] |
Server side construction and initialisation of an animation class.
Note: the aHasFocus argument allows the animation to start in a known focus state. For example, an animation may or may not have focus, depending on how it was started. Together with the FocusChanged() function, this allows an animation to always know its focus state.
void | DisplayFrame | ( | TInt | aPreviousIndex = -1 | ) | [private] |
TInt aPreviousIndex = -1 |
void | DrawBitmap | ( | TInt | aPreviousIndex = -1, |
TBool | aRedraw = EFalse | |||
) | [private] |
void | FocusChanged | ( | TBool | aState | ) | [private, virtual] |
Notifies change of focus.
The function is called by the window server to notify a change of focus, allowing the animation code to track whether it does or does not have focus, and to change its appearance accordingly.
TBool aState | Indicates whether the focus has or has not changed. |
TBool | FrameNeedsRedrawing | ( | const TRegion * | aRedrawRegion, |
TRect | aFrameScreenRect | |||
) | [private, static] |
TBool | OfferRawEvent | ( | const TRawEvent & | aRawEvent | ) | [private, virtual] |
const TRawEvent & aRawEvent |
void | Redraw | ( | ) | [private, virtual] |
Redraws the objects.
The function is called by the window server when it needs to redraw the object. The object must provide all the low level drawing code.
void | RenderFrameBackground | ( | TInt | aIndex | ) | [private] |
TInt aIndex |
void | SetBackgroundFrameL | ( | TFrameData | aFrameDataArg | ) | [private] |
TFrameData aFrameDataArg |
void | SetFlash | ( | TBmpAnimAttributes | aFlash | ) | [private] |
TBmpAnimAttributes aFlash |
void | SetFrameInterval | ( | TBmpAnimAttributes | aFrameInterval | ) | [private] |
TBmpAnimAttributes aFrameInterval |
TInt | SetIndexFrame | ( | SBitmapAnimIndexFrame | aIndexFrame | ) | [private] |
SBitmapAnimIndexFrame aIndexFrame |
void | SetNumberOfCycles | ( | SBitmapAnimNumberOfCycles | aNumberOfCycles | ) | [private] |
SBitmapAnimNumberOfCycles aNumberOfCycles |
void | SetPlayMode | ( | TBmpAnimAttributes | aPlayMode | ) | [private] |
TBmpAnimAttributes aPlayMode |
void | SetPosition | ( | SBitmapAnimNewPosition | aNewPosition | ) | [private] |
SBitmapAnimNewPosition aNewPosition |
ERunning = 0x0001 | |
EFlashing = 0x0002 | |
EFrozen = 0x0004 | |
EPlayModeCycle = 0x0010 | |
EPlayModeBounce = 0x0020 | |
EPlayForwards = 0x0040 | |
EPlayBackwards = 0x0080 | |
EFlash = 0x0100 | |
ENoBitmapWindowRestoring = 0x0800 | |
EDisplayLastFrameWhenFinished = 0x4000 |
RPointerArray < CBitmapAnimFrameData > | iBitmapAnimFrameDataArray | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.