Location:
w32adll.h
Link against: N/A
MAnimGeneralFunctions
Supported from 5.1
General animation utility functions interface. The interface provides functions to set the animation timing, event functions, and other general functions.
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:
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 MAnimGeneralFunctions
:
Animate()
, Client()
, CloseFont()
, DuplicateBitmapL()
, DuplicateFontL()
, ESyncDay
, ESyncFlash
, ESyncMinute
, ESyncNone
, ESyncSecond
, FlashStateOn()
, GetRawEvents()
, Panic()
, PostKeyEvent()
, PostRawEvent()
, ScreenDevice()
, SetInterval()
, SetNextInterval()
, SetSync()
, Sync()
, SystemTime()
, TAnimSync
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.
Alternatively use CFreeTimerWindowAnim
, which
allows you to deactivate the graphics context yourself.
|
void SetSync(TAnimSync aSyncMode);
Sets the synchronisation mode. This determines the time intervals
between calls to the Animate()
function.
|
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
|
TDateTime SystemTime() const;
Gets the system time as it was when Animate()
was last
called.
|
TBool FlashStateOn() const;
Tests the flash cycle state. The flash cycle has 2 states — on (7/12 second) or off (5/12 second).
|
TAnimSync Sync() const;
Gets the current synchronisation mode.
|
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.
|
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. This function might be used to duplicate client side fonts on the server side — actually to provide a handle to the same font in the font and bitmap server as the client.
|
|
void CloseFont(CFbsFont *);
Close a duplicate font.
|
const RThread& Client();
Gets a reference to the calling client's thread.
|
void GetRawEvents(TBool aGetEvents) const;
Switches animation raw event handling on and off. If raw event handling
is switched on, then raw events, e.g. pen events, key presses, power events
etc., are all offered to the animation event handling code —
MEventHandler::OfferRawEventL()
.
|
void PostRawEvent(const TRawEvent &aRawEvent) const;
Posts a raw event, just as if it had come from the kernel.
|
void PostKeyEvent(const TRawEvent &aRawEvent) const;
Withdrawn in 6.0
Posts a key event. The function is similar to PostRawEvent()
but should be used for posting key events.
The function was superseded by the following function after ER5u. This
was because TRawEvent
does not allow the modifier states for the
key event to be specified.
|
void PostKeyEvent(const TKeyEvent& aRawEvent) const;
Supported from 6.0
Posts a key event. The function is similar to PostRawEvent()
but should be used for posting key events.
|
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...).
|