Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: w32std.h
Link against: ws32.lib

Class RAnim

RAnim

Support

Supported from 5.0

Description

Client-side handle to a server-side animation class.

This class should be sub-classed to provide a client side interface to the server side animation DLL. The server side animation DLL is derived from CAnim.

Defined in RAnim:
Close(), Command(), CommandReply(), Construct(), Destroy(), RAnim(), ~RAnim()


Construction and destruction


RAnim()

protected: RAnim();

Description

Default constructor. Developers should use the other constructor overload.


RAnim()

protected: RAnim(RAnimDll& aAnimDll);

Description

Protected C++ constructor.

This constructor should be used to construct an animation object from a given animation DLL. The DLL must be loaded first, see the discussion of RAnimDll.

Parameters

RAnimDll& aAnimDll

The animation DLL.


Construct()

protected: TInt Construct(const RWindowBase& aDevice, TInt aType, const TDesC8& aParams);

Description

Completes construction of the object based on a window device, and creates the server-side animation system.

Construction information is passed to the server side via aType and aParams. The server then passes the information to the function CreateInstanceL() inside the Anim DLL.

Parameters

const RWindowBase& aDevice

A window device.

TInt aType

The type of this animation object, as understood by CAnimDll::CreateInstanceL().

const TDesC8& aParams

Packaged arguments which will be passed to the server side object to tell it how to construct itself or initialise itself.

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.

See also:


Construct()

protected: TInt Construct(const RWsSprite& aDevice, TInt aType, const TDesC8 &aParams);

Support

Supported from 5.1

Description

Completes construction of the Anim DLL based on a sprite.

Construction information is passed to the server side via aType and aParams. The server then passes the information to the function CreateInstanceL() inside the Anim DLL.

Parameters

const RWsSprite& aDevice

A sprite.

TInt aType

The type of this animation object, as understood by CAnimDll::CreateInstanceL().

const TDesC8& aParams

Packaged arguments which will be passed to the server side object to tell it how to construct itself or initialise itself.

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.

See also:


~RAnim()

virtual ~RAnim();

Description

Empty virtual destructor.

[Top]


Member functions


Close()

virtual void Close();

Description

Sends the close command.

This frees resources belonging to an animation object. It would be called to release resources when the RAnim is owned in-line by another object (so that destruction is automatic).


Command()

protected: void Command(TInt aOpcode, const TPtrC8& aArgs);

Description

Sends a command and its arguments to the server-side CAnim instance, and returns immediately.

Commands issued by this function may be buffered before being passed to the server.

Server-side errors cannot be detected, so Command() should not be used for operations which could fail or which may leave. Use CommandReply() for those. Although the window server will not fail due to errors not being returned to the client side, client side behaviour will almost certainly not be correct if errors have been generated but not received.

Use of this function results in a server-side call to the equivalent CAnim::Command().

Parameters

TInt aOpcode

An operation meaningful to the server-side CAnim object.

const TPtrC8& aArgs

Packaged arguments which will be passed to the server side object.

See also:


Command()

protected: void Command(TInt aOpcode);

Description

Sends a command to the server-side CAnim instance, and returns immediately.

Commands issued by this function may be buffered before being passed to the server.

Server-side errors cannot be detected, so Command() should not be used for operations which could fail or which may leave. Use CommandReply() for those. Although the window server will not fail due to errors not being returned to the client side, client side behaviour will almost certainly not be correct if errors have been generated but not received.

Use of this function results in a server-side call to the equivalent CAnim::Command().

Parameters

TInt aOpcode

An operation meaningful to the server-side CAnim object.

See also:


CommandReply()

protected: TInt CommandReply(TInt aOpcode);

Description

Sends a command to the server-side CAnim instance, and waits for a response.

This function executes synchronously and returns the code returned by the server-side method CAnim::CommandReplyL(). The request is not buffered.

Parameters

TInt aOpcode

An opcode meaningful to the server-side CAnim-derived class.

Return value

TInt

A value defined by the animation writer. The value may, in some cases, be defined to be an error code.

See also:


CommandReply()

protected: TInt CommandReply(TInt aOpcode, const TPtrC8 &aArgs);

Description

Sends a command and its arguments to the server-side CAnim instance, and waits for a response.

The packaged command arguments are passed to the matching server side function, where the behaviour should be implemented. The request is not buffered. The function executes synchronously and returns the code returned by the server-side method CAnim::CommandReplyL().

Parameters

TInt aOpcode

An opcode meaningful to the server-side CAnim-derived class.

const TPtrC8& aArgs

Packaged arguments which will be passed to the server side object.

Return value

TInt

A value defined by the animation writer. The value may, in some cases, be defined to be an error code.

See also:


Destroy()

void Destroy();

Description

Closes and deletes the server-side animation object.

This should be called on heap allocated objects.