Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Implementing the client side

The animation framework requires implementers to write server side and client side code. On the client side, provided by the Window Server Client-Side API, RAnimDll should be derived from for DLL level functionality, and for each animation an RAnim class should be derived. The client side classes can be thought of as thin layers of code which are used to pass information through to the matching server side classes, where the detailed logic is implemented.

Clients must request an animation DLL to be loaded before the animations provided by it can be used. This is done using the RAnimDll.

RAnim provides functions for implementing client side behaviour. Generally, the client side code will be concerned with setting up and initialising the server side classes which implement the actual animation graphics. The mechanisms which allow information to be packaged on the client side, passed through the window server, and recovered on the server side, are described in How to pass arguments from client to server classes.

Two kinds of command function are provided — RAnim::Command() and RAnim::CommandReply(). Choice of which function to use depends on whether a return value is required, and on whether the command must take effect immediately or can be cached to the window server queue. If leaves are possible in code either within or called from a command function, a return code should always be tested and errors should be handled appropriately.

The CommandReply() function forces immediate action. In general by the time these functions return, window server requests will have been carried out. The background to this behaviour is window server buffering of the requests it receives. In effect the behaviour of these commands is to put a request to the window server queue and then flush the queue to ensure immediate action. The Command() function is buffered by the window server. Although these functions will return immediately, there is no guarantee when the window server request will actually be carried out.


See also

RWsSession::Flush()

Client-side buffer