Location:
w32adll.h
Link against: N/A
CAnimFunctions
Withdrawn in 5.1
Supported from 5.0
Server side utility functions. These include functions to set the animation timings, to set the drawing rectangle, to panic the client from the server, etc.
You do NOT have to create an object of this type. The class is
implemented by the window server, and provides utility functions to all
CAnim
derived classes via the Canim::iFunctions
pointer.
It is not intended for user derivation.
Note:
Animation code can call CObject
members from this
class, however there is no point in doing so — and indeed may
have severe consequences.
The class was replaced by the
MAnimGeneralFunctions
interface, and its derived classes, after
ER5.
The classes’ functions are declared as pure virtual in the header file. However, as stated above, you do not need to derive from this class, so these have not been marked as pure virtual in this document.
|
Defined in CAnimFunctions
:
Animate()
, Client()
, CloseFont()
, DuplicateBitmapL()
, DuplicateFontL()
, ESyncDay
, ESyncFlash
, ESyncMinute
, ESyncNone
, ESyncSecond
, FlashStateOn()
, Invalidate()
, IsHidden()
, Panic()
, ScreenDevice()
, SetInterval()
, SetNextInterval()
, SetRect()
, SetSync()
, SetVisible()
, Sync()
, SystemTime()
, TAnimSync
, WindowSize()
, void ActivateGc()
Inherited from CBase
:
operator new()
Inherited from CObject
:
AccessCount()
,
Close()
,
Dec()
,
FullName()
,
Inc()
,
Name()
,
Open()
,
Owner()
,
SetName()
,
SetNameL()
,
SetOwner()
,
UniqueID()
void ActivateGc();
Activate graphics context. This function should be called to
enable drawing in the CAnim
derived classes’
Command()
, Animate()
, or FocusChanged()
functions.
Note:
The function is called automatically by the animation DLL
framework before it calls the Redraw()
function.
void Animate(TDateTime* aDateTime);
Calls the DLL's Animate()
function then deactivates
the graphics context. This allows users to do drawing from their own active
object.
Note:
If the user calls the CAnim
derived
classes’ Animate()
function directly, or otherwise does
drawing from their own active object, then this will not deactivate the
graphics context. This causes the window server to panic the client.
|
const RThread& Client();
Gets a reference to the calling client's thread.
|
void CloseFont(CFbsFont *);
Close a duplicate font.
|
CFbsBitmap* DuplicateBitmapL(TInt aHandle);
Creates and duplicates a bitmap from a handle. This function might be used to duplicate client side bitmaps on the server side — actually to provide a handle to the same bitmap in the font and bitmap server as the client.
|
|
CFbsFont* DuplicateFontL(TInt aHandle);
Creates and duplicates a font from a handle.
|
|
TBool FlashStateOn() const;
Tests the flash cycle state. The flash cycle has 2 states — on or off.
|
void Invalidate(const TRect& aRect);
Forces redraw of a rectangular part of the window. The function causes a redraw message on the part of the window specified, which provides a non-immediate way to do drawing.
It can be used to redraw the whole of the window, not just the part used by the animation.
|
TBool IsHidden();
Tests whether to draw the animation.
If the window is completely hidden/obscured there is normally no need to
draw the animation. However in some conditions the animation should be drawn
even if it is obscured. The window server is aware of these cases, and returns
ETrue
if it is safe to NOT draw the
animation.
|
const CFbsScreenDevice* ScreenDevice();
Gets a pointer to the screen device. This might be used, for example, to gain access to twix to pixel conversion functions.
|
void SetInterval(TInt aInterval);
Sets the repeat interval.
If the synchronisation mode is TAnimSync::ESyncNone
, then
the Animate()
function is called at intervals defined by some
number of flash ticks. There are two flash ticks a second, with a 7/12
second — 5/12 second cycle. If the function is called when the
synchronisation mode is not TAnimSync::ESyncNone
, then the window
server panics the client.
If the new interval is greater than the current countdown, then the call does not affect the current countdown. For example, if the countdown has 10 flash ticks remaining, and the interval is set to 20, the new interval does not apply until the current countdown is complete.
However if the new interval is less the current countdown, then the new interval applies immediately i.e. the countdown is reset to the interval value.
If the interval is set to zero the countdown stops, and the
Animate()
function is no longer called.
|
void SetNextInterval(TInt aInterval);
Sets the next interval.
This function immediately resets the current countdown to the specified number of flash ticks, irrespective of its current value. After the countdown expires the interval returns to its usual rate — note that this may be zero (i.e. not at all).
To call this function the synchronisation mode must be
TAnimSync::ESyncNone
— otherwise the window server
panics the client.
Note:
There are two flash ticks a second, with a 7/12 second — 5/12 second cycle
|
void SetRect(const TRect &aRect);
Sets the rectangle that this instance wants to draw to.
This function must be called as part of the initialisation/construction
of the CAnim
derived object, i.e. in
CAnim::ConstructL()
. This is so that the window server knows which
area the animation is operating in.
|
void SetSync(TAnimSync aSyncMode);
Sets the synchronisation mode. This determines the time intervals between
calls to the Animate()
function.
|
void SetVisible(TBool aState);
Sets the visibility of the window the animation is drawing to. This does
the same as RWindowBase::SetVisible()
.
|
TAnimSync Sync() const;
Gets the current synchronisation mode.
|
TDateTime SystemTime() const;
Gets the system time as it was when Animate()
was last
called.
|
TAnimSync
Animation synchronisation flags. The animation can be synchronised to any of the below, the Animate() call will take place at the start of the new unit (day, hour, etc...).
|