Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <W32ADLL.H>

Class MAnimGeneralFunctions

class MAnimGeneralFunctions;

Description

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.

Members

Defined in MAnimGeneralFunctions:


Member functions


Animate(TDateTime *)

virtual void Animate(TDateTime *aDateTime)=0;

Description

Calls the DLL's MAnimGeneralFunctions::Animate(TDateTime *) 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' MAnimGeneralFunctions::Animate(TDateTime *) 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.

Parameters

TDateTime *aDateTime

The parameter passed into the animation DLL's MAnimGeneralFunctions::Animate(TDateTime *) function.


SetSync(TAnimSync)

virtual void SetSync(TAnimSync aSyncMode)=0;

Description

Sets the synchronisation mode.

This determines the time intervals between calls to the MAnimGeneralFunctions::Animate(TDateTime *) function.

Parameters

MAnimGeneralFunctions::TAnimSync aSyncMode

The synchronisation mode.


SetInterval(TInt)

virtual void SetInterval(TInt aInterval)=0;

Description

Sets the repeat interval.

If the synchronisation mode is TAnimSync::ESyncNone, then the MAnimGeneralFunctions::Animate(TDateTime *) 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 MAnimGeneralFunctions::Animate(TDateTime *) function is no longer called.

Parameters

TInt aInterval

The number of flash ticks between calls to the MAnimGeneralFunctions::Animate(TDateTime *) function.


SetNextInterval(TInt)

virtual void SetNextInterval(TInt aInterval)=0;

Description

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.

Parameters

TInt aInterval

The interval to the next MAnimGeneralFunctions::Animate(TDateTime *). If the value is less than 1, it automatically gets set to 1.

See also:


SystemTime()const

virtual TDateTime SystemTime() const=0;

Description

Gets the system time as it was when MAnimGeneralFunctions::Animate(TDateTime *) was last called.

Return value

TDateTime

The system time when MAnimGeneralFunctions::Animate(TDateTime *) was last called.


FlashStateOn()const

virtual TBool FlashStateOn() const=0;

Description

Tests the flash cycle state.

The flash cycle has 2 states: on (7/12 second) or off (5/12 second).

Return value

TBool

ETrue if in the on part of the flash cycle, otherwise EFalse.


Sync()const

virtual TAnimSync Sync() const=0;

Description

Gets the current synchronisation mode.

Return value

MAnimGeneralFunctions::TAnimSync

The current sync mode.


ScreenDevice()

virtual const CFbsScreenDevice* ScreenDevice()=0;

Description

Gets a pointer to the screen device.

For example, this might be used to gain access to twips to pixel conversion functions.

Return value

const CFbsScreenDevice *

A pointer to the screen device.


DuplicateBitmapL(TInt)

virtual CFbsBitmap* DuplicateBitmapL(TInt aHandle)=0;

Description

Creates and duplicates a bitmap from a handle.

This function might be used to duplicate client side bitmaps on the server side.

Parameters

TInt aHandle

A handle to the bitmap to be duplicated.

Return value

CFbsBitmap *

A pointer to the duplicate bitmap.


DuplicateFontL(TInt)

virtual CFbsFont* DuplicateFontL(TInt aHandle)=0;

Description

Creates and duplicates a font from a handle.

This function might be used to duplicate client side fonts on the server side.

Parameters

TInt aHandle

A handle to the font to be duplicated.

Return value

CFbsFont *

A pointer to the duplicate font.


CloseFont(CFbsFont *)

virtual void CloseFont(CFbsFont *)=0;

Description

Closes a duplicate font.

Parameters

CFbsFont *

See also:


Client()

virtual const RThread& Client()=0;

Description

Gets a reference to the calling client's thread.

Return value

const RThread &

A reference to the calling client's thread.


ReplyBuf(const TDesC8 &)

virtual void ReplyBuf(const TDesC8 &aDes)=0;

Description

Parameters

const TDesC8 &aDes


ReplyBuf(const TDesC16 &)

virtual void ReplyBuf(const TDesC16 &aDes)=0;

Description

Parameters

const TDesC16 &aDes


Panic()const

virtual void Panic() const=0;

Description

Panics the client.

This will result in the client thread being destroyed.


GetRawEvents(TBool)const

virtual void GetRawEvents(TBool aGetEvents) const=0;

Description

Switches animation raw event handling on and off.

If raw event handling is switched on, then raw events, e.g. pointer, key, or power events are all offered to the animation event handling code's MEventHandler::OfferRawEvent(const TRawEvent &).

Parameters

TBool aGetEvents

If ETrue, raw events are passed to the animation event handling code. If EFalse, events are not passed to the animation.


PostRawEvent(const TRawEvent &)const

virtual void PostRawEvent(const TRawEvent &aRawEvent) const=0;

Description

Posts a raw event, just as if it had come from the kernel.

Parameters

const TRawEvent &aRawEvent

The raw event


PostKeyEvent(const TKeyEvent &)const

virtual void PostKeyEvent(const TKeyEvent &aRawEvent) const=0;

Description

Posts a key event.

The function is similar to MAnimGeneralFunctions::PostRawEvent(const TRawEvent &)const but should be used for posting key events.

Parameters

const TKeyEvent &aRawEvent

The key event.


Message()

virtual const RMessagePtr2* Message()=0;

Description

Get the address of an object which can retrieve information from and send information to the client-side.

Return value

const RMessagePtr2 *

A pointer to RMessagePtr2. Complete must be called on the returned object (or a copy of it) if and only if Message is called from an override of CAnim's CommandReplyL which has been caused by a client-side RAnim::AsyncCommandReply(TRequestStatus &,TInt,const TIpcArgs &) call. If Message is called outside an override of CAnim's CommandReplyL or outside an override of CWindowAnim's ConstructL or CSpriteAnim's ConstructL, the it returns NULL.

See also:


ExtendedInterface(TInt)

virtual TAny* ExtendedInterface(TInt aInterface)=0;

Description

Returns an extension interface, maybe extended further in the future.

Parameters

TInt aInterface

Return value

TAny *

A pointer to the extension interface. When aInterface=0 (ENumberOfExtendedInterfaces), the number of interfaces is returned (currently 2). When aInterface=1 (EWindowExtensionInterface), a pointer to the Window Extension interface is returned. When aInterface=2 (EEventExtentionInterface), a pointer to the Event Extension interface is returned.


RegisterForNotifications(TUint32)

virtual TInt RegisterForNotifications(TUint32 aNotifications)=0;

Description

Register to receive notifications.

Parameters

TUint32 aNotifications

A bitset of TAnimNotifications values indicating which notifications are required

Return value

TInt

One of the system wide error codes


NumberOfExtendedInterfaces()

inline TInt NumberOfExtendedInterfaces();

Description

Return value

TInt


WindowExtension()

inline MAnimGeneralFunctionsWindowExtension* WindowExtension();

Description

Gets access to Window Extension utility functions.

Return value

MAnimGeneralFunctionsWindowExtension *

A pointer to a class containing functions for working with Window.


EventExtension()

inline MAnimGeneralFunctionsEventExtension* EventExtension();

Description

Gets access to EventExtension utility functions.

Return value

MAnimGeneralFunctionsEventExtension *

A pointer to a class containing functions for working with Event.


Reserved1()const

private: virtual void Reserved1() const;

Description


Reserved2()const

private: virtual void Reserved2() const;

Description


Reserved3()const

private: virtual void Reserved3() const;

Description

[Top]


Member enumerations


Enum TAnimSync

TAnimSync

Description

Animation synchronisation flags.

The animation can be synchronised to any of these values; the MAnimGeneralFunctions::Animate(TDateTime *) call will take place at the start of the new unit (day, hour, etc...).

ESyncNone

Not synchronised. MAnimGeneralFunctions::Animate(TDateTime *) is called after some number of flash cycles - set by MAnimGeneralFunctions::SetSync(TAnimSync).

ESyncFlash

MAnimGeneralFunctions::Animate(TDateTime *) every flash tick. This occurs twice a second, on the second and after 7/12ths of a second, e.g. the function is called in a flash-on (7/12 seconds) - flash-off (5/12 seconds) cycle.

ESyncSecond

MAnimGeneralFunctions::Animate(TDateTime *) called as soon after every second as system activity allows.

ESyncMinute

MAnimGeneralFunctions::Animate(TDateTime *) called as soon after every minute as system activity allows.

ESyncDay

MAnimGeneralFunctions::Animate(TDateTime *) called as soon after midnight every day as system activity allows.


Enum anonymous

n/a

Description

ENumberOfExtendedInterfaces

EWindowExtensionInterface

EEventExtentionInterface

EInterfaceCount