os/graphics/windowing/windowserver/inc/W32ADLL.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/inc/W32ADLL.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1094 @@
     1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Header for writing animated DLL add ons
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#if !defined(__W32ADLL_H__)
    1.22 +#define __W32ADLL_H__
    1.23 +
    1.24 +#if !defined(__W32STD_H__)
    1.25 +#include <w32std.h>
    1.26 +#endif
    1.27 +
    1.28 +#if !defined(__BITSTD_H__)
    1.29 +#include <bitstd.h>
    1.30 +#endif
    1.31 +
    1.32 +/**
    1.33 +@publishedAll
    1.34 +@deprecated
    1.35 +*/
    1.36 +const TUint KWservAnimDllUidValue8=268435858;
    1.37 +
    1.38 +/**
    1.39 +@publishedAll
    1.40 +@deprecated
    1.41 +*/
    1.42 +const TUid KWservAnimDllUid8={KWservAnimDllUidValue8};
    1.43 +
    1.44 +/**
    1.45 +@publishedAll
    1.46 +@released
    1.47 +*/
    1.48 +const TUint KWservAnimDllUidValue16=268450594;
    1.49 +
    1.50 +/**
    1.51 +@publishedAll
    1.52 +@released
    1.53 +*/
    1.54 +const TUid KWservAnimDllUid16={KWservAnimDllUidValue16};
    1.55 +
    1.56 +/**
    1.57 +@publishedAll
    1.58 +@released
    1.59 +*/
    1.60 +const TUint KWservAnimDllUidValue=KWservAnimDllUidValue16;
    1.61 +
    1.62 +/**
    1.63 +@publishedAll
    1.64 +@released
    1.65 +*/
    1.66 +const TUid KWservAnimDllUid={KWservAnimDllUidValue};
    1.67 +
    1.68 +//
    1.69 +// Contains functions callable from animated DLLs
    1.70 +//
    1.71 +
    1.72 +
    1.73 +class TWindowInfo
    1.74 +/** Animation window information.
    1.75 +
    1.76 +Stores the window position and display mode for the animation.
    1.77 +During a redraw of the animation window, the redraw regions
    1.78 +can be retrieved by calling GetRedrawRegionAndRedrawShadowRegion().
    1.79 +
    1.80 +@publishedAll 
    1.81 +@released
    1.82 +@see TWindowInfo::GetRedrawRegionAndRedrawShadowRegion() */
    1.83 +	{
    1.84 +public:
    1.85 +	/** The screen position. */
    1.86 +	TRect iScreenPos;
    1.87 +	/** The display mode.
    1.88 +	
    1.89 +	This is the minimum display mode that the screen has to be in to display this window. */
    1.90 +	TDisplayMode iMode;
    1.91 +public:
    1.92 +	/** Constructs an animation window information object. */
    1.93 +	inline TWindowInfo() : iRegionPair(NULL) {}
    1.94 +public:
    1.95 +	/** Stores a pair of region pointers. */
    1.96 +	struct TRegionPair
    1.97 +		{
    1.98 +		const TRegion* iRegion1;
    1.99 +		const TRegion* iRegion2;
   1.100 +		};
   1.101 +	/** Returns the current redraw region and redraw shadow region.
   1.102 +	This function must only be called from an override of CWindowAnim's pure virtual Redraw function.
   1.103 +	The region pointers retrieved must not be used beyond the end of the Redraw override.
   1.104 +	@param aRedrawRegion The redraw region in screen coordinates.
   1.105 +	@param aRedrawShadowRegion The redraw shadow region in screen coordinates. */
   1.106 +	inline void GetRedrawRegionAndRedrawShadowRegion(const TRegion*& aRedrawRegion, const TRegion*& aRedrawShadowRegion) const
   1.107 +		{
   1.108 +		if (iRegionPair)
   1.109 +			{
   1.110 +			aRedrawRegion=iRegionPair->iRegion1;
   1.111 +			aRedrawShadowRegion=iRegionPair->iRegion2;
   1.112 +			iRegionPair=NULL;
   1.113 +			}
   1.114 +		else
   1.115 +			{
   1.116 +			aRedrawRegion=NULL;
   1.117 +			aRedrawShadowRegion=NULL;
   1.118 +			}
   1.119 +		}
   1.120 +private:
   1.121 +	mutable const TRegionPair* iRegionPair;
   1.122 +	TAny *iFree2;
   1.123 +	friend class CWsAnim;
   1.124 +	};
   1.125 +
   1.126 +
   1.127 +class MEventHandler
   1.128 +/** Event handler interface.
   1.129 +
   1.130 +The interface provides a function to handle raw events, e.g. key presses, 
   1.131 +pen events, power buttons etc. Raw events are passed to the OfferRawEvent() 
   1.132 +function when the MAnimGeneralFunctions::GetRawEvents() function has been 
   1.133 +called.
   1.134 +
   1.135 +@publishedAll
   1.136 +@released */
   1.137 +	{
   1.138 +public:
   1.139 +	/** Handles raw events. 
   1.140 +	
   1.141 +	If the incoming event can be handled, the function should 
   1.142 +	process it and then return true. If it cannot be processed the function should 
   1.143 +	return false, and the event will be passed to other event handling code.
   1.144 +	
   1.145 +	This function must be implemented in every animation DLL. If event 
   1.146 +	handling is not required, the function should simply return false.
   1.147 +	
   1.148 +	@param aRawEvent The raw event to be processed
   1.149 +	@return ETrue if the raw event is handled by this function, EFalse if the function 
   1.150 +	chooses not to process it. */
   1.151 +	virtual TBool OfferRawEvent(const TRawEvent &aRawEvent)=0;
   1.152 +	};
   1.153 +
   1.154 +enum TAnimNotifications
   1.155 +/** Bit flags to be used by anims when registering for notifications */
   1.156 +	{
   1.157 +	/** Notify when direct screen access begins or ends.*/
   1.158 +	EDirectScreenAccess = 0x0001,
   1.159 +	/** Notify when the wserv heartbeat timer starts or stops. */
   1.160 +	EHeartbeatTimer	= 0x0002,
   1.161 +	/** Notify when screen device changes.*/
   1.162 +	EScreenDeviceChange = 0x0004
   1.163 +	};
   1.164 +//Forward Declaration.
   1.165 +class MAnimGeneralFunctionsWindowExtension;    
   1.166 +class MAnimGeneralFunctionsEventExtension ;
   1.167 +
   1.168 +class MAnimGeneralFunctions
   1.169 +/** General animation utility functions interface. 
   1.170 +
   1.171 +The interface provides functions to set the animation timing, 
   1.172 +event functions, and other general functions.
   1.173 +
   1.174 +You do not have to create an object of this type. The class is implemented 
   1.175 +by the window server and provides utility functions to all CAnim-derived 
   1.176 +classes via the CAnim::iFunctions pointer.
   1.177 +
   1.178 +It is not intended for user derivation.
   1.179 +
   1.180 +@publishedAll
   1.181 +@released */
   1.182 +	{
   1.183 +public:
   1.184 +	/** Animation synchronisation flags. 
   1.185 +	
   1.186 +	The animation can be synchronised to any of these values; 
   1.187 +	the Animate() call will take place at the start of the new unit (day, hour, etc...). */
   1.188 +	enum TAnimSync
   1.189 +		{
   1.190 +		/** Not synchronised. Animate() is called after some number of flash cycles - 
   1.191 +		set by SetSync(). */
   1.192 +		ESyncNone,
   1.193 +		/** Animate() every flash tick. This occurs twice a second, on the second and after 
   1.194 +		7/12ths of a second, e.g. the function is called in a flash-on (7/12 seconds) - 
   1.195 +		flash-off (5/12 seconds) cycle. */
   1.196 +		ESyncFlash,
   1.197 +		/** Animate() called as soon after every second as system activity allows. */
   1.198 +		ESyncSecond,
   1.199 +		/** Animate() called as soon after every minute as system activity allows. */
   1.200 +		ESyncMinute,
   1.201 +		/** Animate() called as soon after midnight every day as system activity allows. */
   1.202 +		ESyncDay,
   1.203 +		};
   1.204 +	enum
   1.205 +		{
   1.206 +		ENumberOfExtendedInterfaces=0,
   1.207 +		EWindowExtensionInterface,
   1.208 +		EEventExtentionInterface,
   1.209 +		EInterfaceCount, // Always keep at the end.
   1.210 +		};
   1.211 +	//Timing functions
   1.212 +	/** Calls the DLL's Animate() function then deactivates the graphics context. 
   1.213 +	
   1.214 +	This allows users to do drawing from their own active object.
   1.215 +	
   1.216 +	Note:
   1.217 +	
   1.218 +	If the user calls the CAnim-derived classes' Animate() function directly, 
   1.219 +	or otherwise does drawing from their own active object, then this will not 
   1.220 +	deactivate the graphics context. This causes the window server to panic the 
   1.221 +	client.
   1.222 +	
   1.223 +	Alternatively, use CFreeTimerWindowAnim, which allows you to deactivate the 
   1.224 +	graphics context yourself.
   1.225 +	
   1.226 +	@param aDateTime The parameter passed into the animation DLL's Animate() 
   1.227 +	function. */
   1.228 +	virtual void Animate(TDateTime *aDateTime)=0;
   1.229 +	/** Sets the synchronisation mode. 
   1.230 +	
   1.231 +	This determines the time intervals between calls to the Animate() function.
   1.232 +	
   1.233 +	@param aSyncMode The synchronisation mode. */
   1.234 +	virtual void SetSync(TAnimSync aSyncMode)=0;
   1.235 +	/** Sets the repeat interval. 
   1.236 +	
   1.237 +	If the synchronisation mode is TAnimSync::ESyncNone, then the Animate() function 
   1.238 +	is called at intervals defined by some number of flash ticks. There are two 
   1.239 +	flash ticks a second, with a 7/12 second - 5/12 second cycle. If the function 
   1.240 +	is called when the synchronisation mode is not TAnimSync::ESyncNone, then 
   1.241 +	the window server panics the client.
   1.242 +	
   1.243 +	If the new interval is greater than the current countdown, then the call does 
   1.244 +	not affect the current countdown. For example, if the countdown has 10 flash 
   1.245 +	ticks remaining, and the interval is set to 20, the new interval does not 
   1.246 +	apply until the current countdown is complete. 
   1.247 +	
   1.248 +	However if the new interval is less the current countdown, then the new interval 
   1.249 +	applies immediately i.e. the countdown is reset to the interval value.
   1.250 +	
   1.251 +	If the interval is set to zero the countdown stops, and the Animate() function 
   1.252 +	is no longer called.
   1.253 +	
   1.254 +	@param aInterval The number of flash ticks between calls to the Animate() 
   1.255 +	function. */
   1.256 +	virtual void SetInterval(TInt aInterval)=0;
   1.257 +	/** Sets the next interval. 
   1.258 +	
   1.259 +	This function immediately resets the current countdown to the specified number 
   1.260 +	of flash ticks, irrespective of its current value. After the countdown expires, 
   1.261 +	the interval returns to its usual rate. Note that this may be zero (i.e. 
   1.262 +	not at all).
   1.263 +	
   1.264 +	To call this function, the synchronisation mode must be TAnimSync::ESyncNone, 
   1.265 +	otherwise the window server panics the client.
   1.266 +	
   1.267 +	Note: there are two flash ticks a second, with a 7/12 second - 5/12 second cycle.
   1.268 +	
   1.269 +	@param aInterval The interval to the next Animate(). If the value is less 
   1.270 +	than 1, it automatically gets set to 1.
   1.271 +	@see SetInterval() */
   1.272 +	virtual void SetNextInterval(TInt aInterval)=0;
   1.273 +	/** Gets the system time as it was when Animate() was last called.
   1.274 +	
   1.275 +	@return The system time when Animate() was last called. */
   1.276 +	virtual TDateTime SystemTime() const=0;
   1.277 +	/** Tests the flash cycle state. 
   1.278 +	
   1.279 +	The flash cycle has 2 states: on (7/12 second) or off (5/12 second).
   1.280 +	
   1.281 +	@return ETrue if in the on part of the flash cycle, otherwise EFalse. */
   1.282 +	virtual TBool FlashStateOn() const=0;
   1.283 +	/** Gets the current synchronisation mode.
   1.284 +	
   1.285 +	@return The current sync mode. */
   1.286 +	virtual TAnimSync Sync() const=0;
   1.287 +	//Other functions generally useful
   1.288 +	/** Gets a pointer to the screen device. 
   1.289 +	
   1.290 +	For example, this might be used to gain access to twips to pixel conversion functions.
   1.291 +	
   1.292 +	@return A pointer to the screen device. */
   1.293 +	virtual const CFbsScreenDevice *ScreenDevice()=0;
   1.294 +	/** Creates and duplicates a bitmap from a handle. 
   1.295 +	
   1.296 +	This function might be used to duplicate client side bitmaps on the server side.
   1.297 +	
   1.298 +	@param aHandle A handle to the bitmap to be duplicated.
   1.299 +	@return A pointer to the duplicate bitmap. */
   1.300 +	virtual CFbsBitmap *DuplicateBitmapL(TInt aHandle)=0;
   1.301 +	/** Creates and duplicates a font from a handle.
   1.302 +	
   1.303 +	This function might be used to duplicate client side fonts on the server side.
   1.304 +	
   1.305 +	@param aHandle A handle to the font to be duplicated.
   1.306 +	@return A pointer to the duplicate font. */
   1.307 +	virtual CFbsFont *DuplicateFontL(TInt aHandle)=0;
   1.308 +	/** Closes a duplicate font.
   1.309 +	
   1.310 +	@param Pointer to the duplicate font.
   1.311 +	@see DuplicateFontL() */
   1.312 +	virtual void CloseFont(CFbsFont *)=0;
   1.313 +	/** Gets a reference to the calling client's thread.
   1.314 +	
   1.315 +	@return A reference to the calling client's thread. */
   1.316 +	virtual const RThread &Client()=0;
   1.317 +	/** Send a reply to the client process in response to a request
   1.318 +	from the client. 	
   1.319 +	
   1.320 +	@see RAnim::CommandReply()
   1.321 +	
   1.322 +	@param aDes The data to be sent back to the client
   1.323 +	 */
   1.324 +	virtual void ReplyBuf(const TDesC8 &aDes)=0;
   1.325 +	/** Send a reply to the client process in response to a request
   1.326 +	from the client. 	
   1.327 +	
   1.328 +	@see RAnim::CommandReply()
   1.329 +	
   1.330 +	@param aDes The data to be sent back to the client
   1.331 +	 */
   1.332 +	virtual void ReplyBuf(const TDesC16 &aDes)=0;				
   1.333 +	/** Panics the client. 
   1.334 +	
   1.335 +	This will result in the client thread being destroyed. */
   1.336 +	virtual void Panic() const=0;
   1.337 +	
   1.338 +	//Event functions
   1.339 +	
   1.340 +	/** Switches animation raw event handling on and off.
   1.341 +	
   1.342 +	If raw event handling is switched on, then raw events, e.g. pointer, key, or power events
   1.343 +	are all offered to the animation event handling code's MEventHandler::OfferRawEvent().
   1.344 +	
   1.345 +	If Animation works in a window for which advanced pointers have been enabled,
   1.346 +	then after switching on raw event handling it will receive pointer events from all 
   1.347 +	detected pointers. Otherwise it will receive events only from one emulated pointer.
   1.348 +	
   1.349 +	@param aGetEvents If ETrue, raw events are passed to the animation 
   1.350 +	event handling code. If EFalse, events are not passed to the animation. 
   1.351 +	@see RWindowBase::EnableAdvancedPointers() */
   1.352 +	virtual void GetRawEvents(TBool aGetEvents) const=0;
   1.353 +	/** Posts a raw event, just as if it had come from the kernel.
   1.354 +	  
   1.355 +	If aRawEvent has pointer-related type (move, switch on, down, up or out of range),
   1.356 +	then its Z coordinate and iPointerNumber fields will be validated and may be
   1.357 +	overwritten by WSERV in order to guarantee correct behaviour depending on:
   1.358 +	1. Pointer Pressure and Proximity support on current platform.
   1.359 +	2. Multiple pointers support on current platform.
   1.360 +	3. Animation's awareness of these fields. If Animation works in a window
   1.361 +	   for which advanced pointers have been enabled, it is assumed that it has
   1.362 +	   initialized these fields. Otherwise WSERV will assume that these fields have
   1.363 +	   not been provided and may overwrite them with most appropriate values.
   1.364 +	For more information about event validation, please refer to System Documentation.
   1.365 +	
   1.366 +	@param aRawEvent The raw event 
   1.367 +	@see RWindowBase::EnableAdvancedPointers() */
   1.368 +	virtual void PostRawEvent(const TRawEvent &aRawEvent) const=0;
   1.369 +	/** Posts a key event.
   1.370 +	
   1.371 +	The function is similar to PostRawEvent() but should be 
   1.372 +	used for posting key events. 
   1.373 +	
   1.374 +	@param aRawEvent The key event. */
   1.375 +	virtual void PostKeyEvent(const TKeyEvent &aRawEvent) const=0;
   1.376 +	/** Get the address of an object which can retrieve information from and send
   1.377 +	information to the client-side.
   1.378 +
   1.379 +	@return A pointer to RMessagePtr2. Complete must be called on the returned object (or a 
   1.380 +	copy of it) if and only if Message is called from an override of CAnim's CommandReplyL which 
   1.381 +	has been caused by a client-side RAnim::AsyncCommandReply call. If Message is called outside 
   1.382 +	an override of CAnim's CommandReplyL or outside an override of CWindowAnim's ConstructL or 
   1.383 +	CSpriteAnim's ConstructL, the it returns NULL. 
   1.384 +	@see RMessagePtr2 */
   1.385 +	virtual const RMessagePtr2* Message()=0; // replaces Reserved1
   1.386 +	/**Returns an extension interface, maybe extended further in the future.
   1.387 +	@param aInterfaceId The ID of the interface to return.
   1.388 +	@return A pointer to the extension interface.
   1.389 +	When aInterface=0 (ENumberOfExtendedInterfaces), the number of interfaces is returned (currently 2).
   1.390 +	When aInterface=1 (EWindowExtensionInterface), a pointer to the Window Extension interface is returned.
   1.391 +	When aInterface=2 (EEventExtentionInterface), a pointer to the Event Extension interface is returned.
   1.392 +	*/
   1.393 +	virtual TAny* ExtendedInterface(TInt aInterface)=0; // replaces Reserved2
   1.394 +
   1.395 +	/** Register to receive notifications.
   1.396 +	@param aNotifications A bitset of TAnimNotifications values indicating which notifications are required
   1.397 +	@return One of the system wide error codes
   1.398 +	*/
   1.399 +	virtual TInt RegisterForNotifications(TUint32 aNotifications)=0;
   1.400 +	/*
   1.401 +	Return number of ExtendedInterfaces. */
   1.402 +	inline TInt NumberOfExtendedInterfaces()
   1.403 +		{
   1.404 +		return reinterpret_cast<TInt>(ExtendedInterface(ENumberOfExtendedInterfaces));
   1.405 +		}
   1.406 +	/** Gets access to Window Extension utility functions.
   1.407 +	@return A pointer to a class containing functions for working with Window. */
   1.408 +	inline MAnimGeneralFunctionsWindowExtension* WindowExtension()
   1.409 +		{
   1.410 +		return static_cast<MAnimGeneralFunctionsWindowExtension*>(ExtendedInterface(EWindowExtensionInterface));
   1.411 +		}
   1.412 +	/** Gets access to EventExtension utility functions. 
   1.413 +	@return A pointer to a class containing functions for working with Event. */
   1.414 +	inline MAnimGeneralFunctionsEventExtension* EventExtension()
   1.415 +		{
   1.416 +		return static_cast<MAnimGeneralFunctionsEventExtension*>(ExtendedInterface(EEventExtentionInterface));
   1.417 +		}
   1.418 +	private:
   1.419 +	virtual void Reserved1() const;
   1.420 +	virtual void Reserved2() const;
   1.421 +	virtual void Reserved3() const;
   1.422 +	};
   1.423 +
   1.424 +/* Structure for passing window configuration information. Currently transparancey
   1.425 +related configuration information is supported, though this may be added to, as
   1.426 +apprioriate.
   1.427 +
   1.428 +@publishedAll
   1.429 +@released
   1.430 +*/
   1.431 +class TWindowConfig
   1.432 +	{
   1.433 +public:
   1.434 +	/** Transparency flags. 
   1.435 +	
   1.436 +	Used to represent transparency configuration of the window. */
   1.437 +	enum
   1.438 +		{
   1.439 +		/** Transparency is enabled on the window. */
   1.440 +		ETransparencyEnabled=0x0001,
   1.441 +		/** Window transparency uses alpha blending channel. */
   1.442 +		EAlphaBlendedTransparency=0x0002,
   1.443 +		};
   1.444 +public:
   1.445 +	/** Indicate configuration of window, using enumerations defined within this class. */
   1.446 +	TInt iFlags;
   1.447 +private:
   1.448 +	TInt iReserved0;
   1.449 +	TInt iReserved1;
   1.450 +	TInt iReserved2;
   1.451 +	};
   1.452 +	
   1.453 +class MAnimGeneralFunctionsWindowExtension
   1.454 +/** General Window utility functions interface. 
   1.455 +
   1.456 +The member functions define the interface for querying and manipulating 
   1.457 +the window and screen attributes.
   1.458 +
   1.459 +You obtain one by calling: iFunctions->ExtendedInterface(MAnimGeneralFunctions::EWindowExtensionInterface) 
   1.460 +and casting the result.
   1.461 +
   1.462 +It is not intended for user derivation.
   1.463 +
   1.464 +@publishedAll 
   1.465 +@released */
   1.466 +	{
   1.467 +public:
   1.468 +	/** Class contains the information pertaining to a window group: name, priority, 
   1.469 +	focusability. */
   1.470 +	class TWindowGroupInfo
   1.471 +		{
   1.472 +	public:
   1.473 +		enum
   1.474 +			{
   1.475 +			/** Window is focusable flag. */
   1.476 +			EIsFocusable=0x0001,
   1.477 +			};
   1.478 +	public:
   1.479 +		/** Returns whether or not the window is focusable. 
   1.480 +		@return ETrue if focusable, else returns EFalse. */
   1.481 +		inline TBool IsFocusable() const {return iFlags&EIsFocusable;}
   1.482 +	public:
   1.483 +	/* Window group attributes. */
   1.484 +		TInt iId;
   1.485 +		TUint32 iFlags;
   1.486 +		TInt iOrdinalPriority;
   1.487 +		TInt iNameLength;
   1.488 +		TInt iParentId;
   1.489 +		};
   1.490 +public:
   1.491 +	/** Returns the total number of screens.
   1.492 +	@return The total number of screens. */
   1.493 +	virtual TInt Screens() const=0;
   1.494 +
   1.495 +	/** Returns the number of the screen which is currently in focus.
   1.496 +	@return The number of the screen which is currently in focus.*/
   1.497 +	virtual TInt FocusScreens() const=0;
   1.498 +
   1.499 +	/** Changes the focused screen.
   1.500 +	@param aScreenNo New screen number. */
   1.501 +	virtual void SetFocusScreen(TInt aScreenNo)=0;
   1.502 +
   1.503 +	/** Returns the number of window groups available for the specified screen.
   1.504 +
   1.505 +	@param aScreen The screen number.
   1.506 +	@return The number of window groups. */
   1.507 +	virtual TInt WindowGroups(TInt aScreen) const=0;
   1.508 +	
   1.509 +	/** Takes a screen number and an ordinal position and returns the complete window 
   1.510 +	group information of the specified window. If the window group does not exist, the 
   1.511 +	function returns EFalse.
   1.512 +	
   1.513 +	Note: the ordinal position specified should be the total or full ordinal position 
   1.514 +	of all group windows of all priorities on that screen.
   1.515 +
   1.516 +	@param aInfo on return, complete window information.
   1.517 +	@param aScreen Screen number.
   1.518 +	@param aFullOrdinalPosition Ordinal position of the window.
   1.519 +	@return ETrue if window group information exists, EFalse otherwise.  */
   1.520 +	virtual TBool WindowGroupInfo(TWindowGroupInfo& aInfo,TInt aScreen,TInt aFullOrdinalPosition) const=0;
   1.521 +
   1.522 +	/** Takes a screen number and an ordinal position and returns the window group name.
   1.523 +	If the window group does not exist, the function returns false.
   1.524 +
   1.525 +	Note: the ordinal position specified should be the total or full ordinal position of 
   1.526 +	all group windows of all priorities on that screen.
   1.527 +
   1.528 +	Note: if the name does not fit into the descriptor provided then it will be truncated.
   1.529 +
   1.530 +	@param aWindowName On return, the window group name.
   1.531 +	@param aScreen The screen number.
   1.532 +	@param aFullOrdinalPosition The ordinal position of the window.
   1.533 +	@return ETrue if the window group name exists, EFalse otherwise. */
   1.534 +	virtual TBool WindowGroupName(TPtrC& aWindowName,TInt aScreen,TInt aFullOrdinalPosition) const=0;
   1.535 +	
   1.536 +	/** Changes the ordinal position and priority of the window group with the specified ID.
   1.537 +
   1.538 +	@param aWindowGroupId The window group ID.
   1.539 +	@param aPos The ordinal position to move the window to.
   1.540 +	@param aOrdinalPriority The new ordinal priority of the window.
   1.541 +	@return KErrNotFound if there is no window group with the specified ID, KErrNone otherwise. */
   1.542 +	virtual TInt SetOrdinalPosition(TInt aWindowGroupId,TInt aPos,TInt aOrdinalPriority)=0;
   1.543 +	
   1.544 +	/** Accessor for window configuration.
   1.545 +
   1.546 +	@param aWindowConfig Gets filled in with window configuration details. */
   1.547 +	virtual void WindowConfig(TWindowConfig& aWindowConfig) const=0;
   1.548 +private:
   1.549 +	virtual void Reserved1() const;
   1.550 +	virtual void Reserved2() const;
   1.551 +	virtual void Reserved3() const;
   1.552 +	};
   1.553 +	
   1.554 +class MAnimGeneralFunctionsEventExtension
   1.555 +/** Event utility functions interface. 
   1.556 +
   1.557 +The member functions define the interface for generate repeated key events .
   1.558 +
   1.559 +It is not intended for user derivation.
   1.560 +*/
   1.561 +	{
   1.562 +public:
   1.563 +	/** Posts a key event.
   1.564 +	
   1.565 +	The function is similar to PostKeyEvent() but should be 
   1.566 +used for posting repeated key events. 
   1.567 +	
   1.568 +	@param aRawEvent The key event.
   1.569 +	@param aRepeats value */
   1.570 +	virtual void PostKeyEvent(const TKeyEvent& aRawEvent, TInt aRepeats) const=0;
   1.571 +
   1.572 +private:
   1.573 +	virtual void Reserved1() const;
   1.574 +	virtual void Reserved2() const;
   1.575 +	};
   1.576 +	
   1.577 +class MAnimWindowFunctions
   1.578 +/** Window utility functions interface. 
   1.579 +
   1.580 +The member functions define the interface for querying and manipulating 
   1.581 +the window in which the animation takes place.
   1.582 +
   1.583 +You do not have to create an object of this type. The class is implemented 
   1.584 +by the window server, and provides these utility functions to all CWindowAnim 
   1.585 +and CFreeTimerWindowAnim derived classes via the iWindowFunctions pointer.
   1.586 +
   1.587 +It is not intended for user derivation.
   1.588 +
   1.589 +@publishedAll 
   1.590 +@released */
   1.591 +	{
   1.592 +public:
   1.593 +	/** Activates the graphics context.
   1.594 +	
   1.595 +	This function should be called to enable drawing in the CAnim-derived classes'
   1.596 +	Command(), CommandReplyL(), Animate(), or FocusChanged() functions.
   1.597 +	
   1.598 +	Note: this function is called automatically by the animation DLL framework in the 
   1.599 +	Redraw() function. */
   1.600 +	virtual void ActivateGc()=0;
   1.601 +	/** Sets the rectangle that this animation will draw to. 
   1.602 +	
   1.603 +	This function must be called as part of the initialisation/construction of 
   1.604 +	the CAnim-derived object, i.e. in CAnim::ConstructL(). This is so that the 
   1.605 +	window server knows which area the animation is operating in. Anything that 
   1.606 +	is drawn by the animation outside this rectangle may not be redrawn correctly
   1.607 +	as the window server uses this rectangle to decide when the animation should
   1.608 +	be redrawn.
   1.609 +	
   1.610 +	@param aRect The rectangle to be drawn to. */
   1.611 +	virtual void SetRect(const TRect &aRect)=0;
   1.612 +	/** Gets the window size.
   1.613 +	
   1.614 +	@return The window size, in pixels. */
   1.615 +	virtual TSize WindowSize() const=0;
   1.616 +	/** Tests whether to draw the animation. 
   1.617 +	
   1.618 +	If the window is completely hidden, there is normally no need to draw 
   1.619 +	the animation. However in some conditions the animation should be drawn even 
   1.620 +	if it is obscured. The window server is aware of these cases, and returns 
   1.621 +	ETrue if it is not safe to draw the animation.
   1.622 +	
   1.623 +	@return True if the window is completely hidden and there is no requirement 
   1.624 +	to continue drawing the animation, otherwise false. */
   1.625 +	virtual TBool IsHidden()=0;
   1.626 +	/** Sets the visibility of the window the animation is drawing to.
   1.627 +	
   1.628 +	This does the same as RWindowBase::SetVisible().
   1.629 +	
   1.630 +	@param aState True for visible, false otherwise. */
   1.631 +	virtual void SetVisible(TBool aState)=0;
   1.632 +	/** Forces a redraw of a rectangular part of the window.
   1.633 +	
   1.634 +	The function causes a redraw message on the part of the window specified, 
   1.635 +	which provides a non-immediate way to do drawing.
   1.636 +	
   1.637 +	It can be used to redraw the whole of the window, not just the part used by 
   1.638 +	the animation.
   1.639 +	
   1.640 +	@param aRect The rectangle to be redrawn. These co-ordinates are relative 
   1.641 +	to the origin of the window. */
   1.642 +	virtual void Invalidate(const TRect &aRect)=0;
   1.643 +	/** Gets window information.
   1.644 +	
   1.645 +	@param aData The window information. */
   1.646 +	virtual void Parameters(TWindowInfo &aData)=0;
   1.647 +	/** Gets the visible region.
   1.648 +
   1.649 +	This region is the area of the visible window which 
   1.650 +	is currently unshadowed. If there is not enough memory to calculate this region 
   1.651 +	then aRegion's error flag is set.
   1.652 +	
   1.653 +	@param aRegion The visible region. */
   1.654 +	virtual void VisibleRegion(TRegion& aRegion)=0;
   1.655 +	//virtual void CopyScreen(CFbsBitGc *aBitmapGc,TRect aRect)=0;
   1.656 +private:
   1.657 +	virtual void Reserved() const;
   1.658 +	virtual void Reserved1() const;
   1.659 +	virtual void Reserved2() const;
   1.660 +	virtual void Reserved3() const;
   1.661 +	};
   1.662 +
   1.663 +
   1.664 +class MAnimFreeTimerWindowFunctions : public MAnimWindowFunctions
   1.665 +/** Free timer animation utility functions interface.
   1.666 +
   1.667 +The class inherits functions from MAnimWindowFunctions, and defines the additional 
   1.668 +interface required for window operations which support animations with their 
   1.669 +own timers.
   1.670 +
   1.671 +You do NOT have to create an object of this type. The class is implemented 
   1.672 +by the window server, and provides utility functions to all CFreeTimerWindowAnim 
   1.673 +derived classes via the WindowFunctions() member. 
   1.674 +
   1.675 +It is not intended for user derivation.
   1.676 +
   1.677 +@publishedAll 
   1.678 +@released */
   1.679 +	{
   1.680 +public:
   1.681 +	/** Deactivates the graphics context. 
   1.682 +	
   1.683 +	This function is used in the context of a CFreeTimerWindowAnim derived class 
   1.684 +	when writing animation DLLs with their own timer. Within the timer's RunL(), 
   1.685 +	the ActivateGc() function should be called prior to drawing to the window. 
   1.686 +	DeactivateGc() should be called after drawing is finished. */
   1.687 +	virtual void DeactivateGc()=0;
   1.688 +	/** Forces the screen to update. */
   1.689 +	virtual void Update()=0;
   1.690 +private:
   1.691 +	virtual void Reserved3() const;
   1.692 +	};
   1.693 +
   1.694 +class MAnimSpriteFunctions
   1.695 +/** Sprite animation utility functions interface.
   1.696 +
   1.697 +The interface includes functions for querying and manipulating a sprite.
   1.698 +
   1.699 +You do NOT have to create an object of this type. The class is implemented 
   1.700 +by the window server, and provides utility functions to all CSpriteAnim derived 
   1.701 +classes via the CSpriteAnim::iSpriteFunctions pointer. 
   1.702 +
   1.703 +It is not intended for user derivation.
   1.704 +
   1.705 +@publishedAll 
   1.706 +@released */
   1.707 +	{
   1.708 +public:
   1.709 +	/** Gets sprite member data.
   1.710 +	
   1.711 +	Each member of the sprite is effectively a bitmap, which is displayed for a 
   1.712 +	different amount of time.
   1.713 +	
   1.714 +	@param aMember The index of the sprite member for which information is required.
   1.715 +	@return A pointer to the sprite member. */
   1.716 +	virtual TSpriteMember *GetSpriteMember(TInt aMember) const=0;
   1.717 +	/** Redraws part of a sprite.
   1.718 +	Updates a sprite on the screen, possibly after the bitmap for a particular 
   1.719 +	sprite member has been changed.
   1.720 +	
   1.721 +	Use the	aRect parameter to specify the (small) part of the sprite which has been changed, 
   1.722 +	then any flicker will only occur in this rectangle. 
   1.723 +	
   1.724 +	A full update used to be required if you had removed pixels from the mask, i.e. made 
   1.725 +	pixels in the sprite transparent when they were not before. If drawing is 
   1.726 +	additive, e.g. you are using a mask or the draw mode is EDrawModePEN, a partial 
   1.727 +	update used to be possible. But current versions of the window-server always do full back to front rendering.
   1.728 +	
   1.729 +	Note: if the sprite member aMember is not visible then there is no need for a change 
   1.730 +	to the display, so the aRect and aFullUpdate parameters are ignored.
   1.731 +	
   1.732 +	@param aMember The index of the sprite member that is to be updated.
   1.733 +	@param aRect The part of the sprite member which has changed.
   1.734 +	@param aFullUpdate	Not used. Wserv now always do full back to front rendering. */
   1.735 +	virtual void UpdateMember(TInt aMember,const TRect& aRect,TBool aFullUpdate)=0;
   1.736 +	/** Turns a sprite on or off.
   1.737 +	
   1.738 +	In effect this makes the sprite bitmap visible.
   1.739 +	
   1.740 +	@param aActive ETrue to turn sprite on. EFalse to turn it off. */
   1.741 +	virtual void Activate(TBool aActive)=0;
   1.742 +	/** Finishes constructing the sprite.
   1.743 +	
   1.744 +	It also sets the currently displayed sprite member to zero.
   1.745 +	
   1.746 +	This function must be called after members change size. */
   1.747 +	virtual void SizeChangedL()=0;
   1.748 +	/** Set the sprite's position.
   1.749 +	
   1.750 +	@param aPos The new position of the sprite. */
   1.751 +	virtual void SetPosition(const TPoint &aPos)=0;
   1.752 +private:
   1.753 +	virtual void Reserved() const;
   1.754 +public:
   1.755 +	/** Returns the visibility of the sprite.
   1.756 +	
   1.757 +	A sprite can be seen if it is neither obscured by another window nor hidden.
   1.758 +	
   1.759 +	@return ETrue if the sprite can be seen, EFalse otherwise. */
   1.760 +	virtual TBool SpriteCanBeSeen() const = 0;
   1.761 +private:
   1.762 +	virtual void Reserved2() const;
   1.763 +	virtual void Reserved3() const;
   1.764 +	virtual void Reserved4() const;
   1.765 +	};
   1.766 +
   1.767 +
   1.768 +class CAnimGc : public CBitmapContext
   1.769 +/** Animation graphics context. 
   1.770 +
   1.771 +An object of this type is linked into CAnim by the window server, which allows 
   1.772 +you to draw to the animation window. The object's functions allow you to set 
   1.773 +and cancel the clipping region, and to draw to the visible window using 
   1.774 +the inherited CBitmapContext functions. 
   1.775 +
   1.776 +@publishedAll
   1.777 +@released */
   1.778 +	{
   1.779 +public:
   1.780 +	/** Sets the clipping region.
   1.781 +	
   1.782 +	Only the parts of the animation which are within the clipping region are drawn.
   1.783 +	
   1.784 +	@param aRegion The clipping region. */
   1.785 +	virtual TInt SetClippingRegion(const TRegion &aRegion)=0;
   1.786 +	/** Cancels the clipping region.
   1.787 +	
   1.788 +	@see SetClippingRegion() */
   1.789 +	virtual void CancelClippingRegion()=0;
   1.790 +	};
   1.791 +
   1.792 +class CWsAnim; // Forward ref for friend declaration
   1.793 +
   1.794 +
   1.795 +class CAnim : public CBase , public MEventHandler
   1.796 +/** Server side animated object base interface.
   1.797 +
   1.798 +Animations implement this interface, which is called by the window server 
   1.799 +to pass commands from clients, perform a step in the animation, or to pass 
   1.800 +window server events (if required) so that the animation can handle them 
   1.801 +before the application.
   1.802 +
   1.803 +The functions are all pure virtual, and must be implemented in 
   1.804 +the derived class to provide server side behaviour. The functions will be 
   1.805 +called by the window server with optional arguments passed in from the client 
   1.806 +side animation class RAnim.
   1.807 +
   1.808 +You should derive from CWindowAnim, CFreeTimerWindowAnim or CSpriteAnim, 
   1.809 +depending on whether the animation is to draw to a sprite or a window,
   1.810 +rather than directly from this class.
   1.811 +
   1.812 +The derived class is constructed in the DLL factory class CAnimDll::CreateInstanceL() 
   1.813 +function.
   1.814 +
   1.815 +The operation to perform an animation step is called by the window server 
   1.816 +on a timer. The timing properties are set through an MAnimGeneralFunctions 
   1.817 +member, which also provides other utility functions. 
   1.818 +
   1.819 +@publishedAll 
   1.820 +@released */
   1.821 +	{
   1.822 +public:
   1.823 +	/** Implements client-side initiated commands, returning a value. 
   1.824 +	
   1.825 +	The window server calls this function in response to application calls to 
   1.826 +	the client side command function RAnim::CommandReplyL(). The arguments passed 
   1.827 +	to the function by the window server are the same as were used on the client 
   1.828 +	side function call.
   1.829 +	
   1.830 +	This function returns values to the client side, and should be used to return 
   1.831 +	error codes for commands which might leave.
   1.832 +	
   1.833 +	@param aOpcode Opcode understood by the class.
   1.834 +	@param aArgs Arguments packaged on the client side, for example as a struct 
   1.835 +	of a type determined by the aOpcode argument. These mirror the aArgs argument 
   1.836 +	passed in to RAnim::CommandReply().
   1.837 +	@return Value passed back to client side function when this function completes. 
   1.838 +	Typically this would be KErrNone or another of the system-wide error codes. 
   1.839 +	However any value may be returned to the client side.
   1.840 +	@see RAnim */
   1.841 +	virtual TInt CommandReplyL(TInt aOpcode, TAny *aArgs)=0;
   1.842 +	/** Implements client-side initiated commands. 
   1.843 +	
   1.844 +	The window server calls this function in response to application calls to 
   1.845 +	the client side command function RAnim::Command(). The arguments passed to 
   1.846 +	the function by the window server are the same as were used on the client 
   1.847 +	side function call.
   1.848 +	
   1.849 +	Because this function does not return errors, it is not safe for commands 
   1.850 +	which might leave.
   1.851 +	
   1.852 +	@param aOpcode Opcode understood by the class
   1.853 +	@param aArgs Arguments packaged on the client side, for example as a struct 
   1.854 +	of a type determined by the aOpcode argument. These mirror the aArgs argument 
   1.855 +	passed in to RAnim::Command().
   1.856 +	@see RAnim */
   1.857 +	virtual void Command(TInt aOpcode, TAny *aArgs)=0;
   1.858 +	/** Main animation function, called by the window server. 
   1.859 +	
   1.860 +	The drawing code which implements a given animation should be provided here.
   1.861 +	
   1.862 +	This function is called at a frequency determined by the SetSync() helper 
   1.863 +	function. Note that if sync is not set, then this function will never be 
   1.864 +	called. This effect can be exploited to use the animation framework, with 
   1.865 +	its server side speed, for what are strictly not animations, e.g. for streaming 
   1.866 +	video images.
   1.867 +	
   1.868 +	The aDateTime parameter will be null if the current time (as determined by 
   1.869 +	the window server) matches the time implied by the sync period, modulo normalisation, 
   1.870 +	otherwise it will contain a valid (non-normalised) time.
   1.871 +	
   1.872 +	Normalisation is to some specified granularity, for example if one minute 
   1.873 +	is specified as the animation frequency, then in effect the window server 
   1.874 +	will decide whether the implied time is correct to the minute, but not to 
   1.875 +	the second.
   1.876 +	
   1.877 +	Implied time is the time implied by the (normalised) actual time of the previous 
   1.878 +	animation call plus the sync interval. For example if the last call was at 
   1.879 +	time 't' and the sync interval is 1 second then if the time at this call 
   1.880 +	is t + 1 second, then actual time and implied time match and the value placed 
   1.881 +	into aDateTime will be NULL.
   1.882 +	
   1.883 +	Cases in which the two may not match include, for example, system time having 
   1.884 +	been reset between animation calls (perhaps British Summer Time or other daylight 
   1.885 +	saving time has just come into effect). The intention is that when system 
   1.886 +	time changes, a mechanism is provided to alert the animation code and allow 
   1.887 +	it to reset itself. The assumption is that somewhere in its initialisation 
   1.888 +	code, the animation will have performed a CAnimFunctions utility call to set 
   1.889 +	a base time, which is then implicitly tracked by incrementing by a suitable 
   1.890 +	interval; when aDateTime is non-NULL after a call to Animate(), base time 
   1.891 +	should be reset.
   1.892 +	
   1.893 +	@param aDateTime Null if the current time w.r.t. the window server matches 
   1.894 +	the time implied by the synch period. Otherwise a valid (non-normalised) time. */
   1.895 +	virtual void Animate(TDateTime *aDateTime)=0;
   1.896 +	virtual void HandleNotification(const TWsEvent& /*aEvent*/) {};
   1.897 +private:
   1.898 +	inline CAnim() {}
   1.899 +	virtual void Reserved1() const {};
   1.900 +	virtual void Reserved2() const {};
   1.901 +	virtual void Reserved3() const {};
   1.902 +protected:
   1.903 +	/** Pointer to a class containing functions implemented by the window server. 
   1.904 +	
   1.905 +	These are available to any CAnim derived class.
   1.906 +	
   1.907 +	Note that this value is automatically set for you by the animation framework. 
   1.908 +	You do not need to assign a value to this pointer. 
   1.909 +	@publishedAll
   1.910 +	@released	*/
   1.911 +	MAnimGeneralFunctions *iFunctions;
   1.912 +	friend class CWsAnim;
   1.913 +	friend class CWindowAnim;
   1.914 +	friend class CSpriteAnim;
   1.915 +	};
   1.916 +
   1.917 +
   1.918 +class CWindowAnim : public CAnim
   1.919 +/** Window animation interface. 
   1.920 +
   1.921 +This interface is provided to create animations other than sprites. A window 
   1.922 +animation can be provided by deriving from this class.
   1.923 +
   1.924 +The interface inherits from CAnim and has access to its functions. It additionally 
   1.925 +can access an interface for querying and manipulating the window in which 
   1.926 +the animation takes place, using its iWindowFunctions member.
   1.927 +
   1.928 +The derived class is constructed in the DLL factory class CAnimDll::CreateInstanceL().
   1.929 +
   1.930 +@publishedAll
   1.931 +@released 
   1.932 +@see CFreeTimerWindowAnim
   1.933 +@see CSpriteAnim */
   1.934 +	{
   1.935 +public:
   1.936 +	/** Server side construction and initialisation of an animation class. 
   1.937 +	
   1.938 +	Note: the aHasFocus argument allows the animation to start in a known focus state. 
   1.939 +	For example, an animation may or may not have focus, depending on how it was 
   1.940 +	started. Together with the FocusChanged() function, this allows an animation 
   1.941 +	to always know its focus state.
   1.942 +	
   1.943 +	@param aArgs Packaged arguments which may be required during construction. 
   1.944 +	These are transferred from the aParams argument of the client side constructor's 
   1.945 +	RAnim::Construct().
   1.946 +	@param aHasFocus Specifies whether or not the animation has window server focus. */
   1.947 +	virtual void ConstructL(TAny *aArgs, TBool aHasFocus)=0;
   1.948 +	/** Redraws the objects.
   1.949 +	
   1.950 +	The function is called by the window server when it needs to redraw the object. 
   1.951 +	The object must provide all the low level drawing code. */
   1.952 +	virtual void Redraw()=0;
   1.953 +	/** Notifies change of focus.
   1.954 +	
   1.955 +	The function is called by the window server to notify a change of focus, 
   1.956 +	allowing the animation code to track whether it does or does not have focus, 
   1.957 +	and to change its appearance accordingly.
   1.958 +	
   1.959 +	@param aState Indicates whether the focus has or has not changed. */
   1.960 +	virtual void FocusChanged(TBool aState)=0;
   1.961 +protected:
   1.962 +	/** Protected constructor.
   1.963 +	
   1.964 +	Prevents objects of this class being directly constructed. */
   1.965 +	inline CWindowAnim() {}
   1.966 +private:
   1.967 +	virtual void ReservedW1() const {};
   1.968 +	virtual void ReservedW2() const {};
   1.969 +protected:
   1.970 +	/** Pointer to a class containing functions implemented by the window server.
   1.971 +	
   1.972 +	These are available to any CWindowAnim-derived class.
   1.973 +	
   1.974 +	Note that this and the iGc pointer are automatically set for you by the 
   1.975 +	animation framework - you do not need to assign a value to them.*/
   1.976 +	MAnimWindowFunctions *iWindowFunctions;
   1.977 +	/** Pointer to the graphics context. */
   1.978 +	CAnimGc *iGc;
   1.979 +	friend class CWsAnim;
   1.980 +	};
   1.981 +
   1.982 +
   1.983 +class CFreeTimerWindowAnim : public CWindowAnim
   1.984 +/** Free timer animation interface.
   1.985 +
   1.986 +This interface allows animations to have their own timers or other active 
   1.987 +objects, and to draw to the window when the timer completes. The implication 
   1.988 +of this is that animations derived from this class can have an extremely short 
   1.989 +user-defined time between calls to the Animate() function, unlike the 
   1.990 +other animation classes, which are tied to the (approximately) half second 
   1.991 +flash cycle.
   1.992 +
   1.993 +The interface inherits from CWindowAnim and has access to its functions. It 
   1.994 +additionally can access functions declared in the MAnimFreeTimerWindowFunctions 
   1.995 +interface, using WindowFunctions(). 
   1.996 +
   1.997 +In order to draw to the window inside the RunL() of your own timer, you will 
   1.998 +need call the ActivateGc() function before doing any drawing, and the DeactivateGc() 
   1.999 +function after finishing the drawing.
  1.1000 +
  1.1001 +@publishedAll 
  1.1002 +@released 
  1.1003 +@see CSpriteAnim */
  1.1004 +	{
  1.1005 +protected:
  1.1006 +	inline MAnimFreeTimerWindowFunctions* WindowFunctions()
  1.1007 +	/** Gets the free timer utility functions.
  1.1008 +	
  1.1009 +	These functions include all the MAnimWindowFunctions, 
  1.1010 +	and additional functions to deactivate the graphics context and to force the 
  1.1011 +	screen to update.
  1.1012 +	
  1.1013 +	@return A pointer to the free timer utility functions. */
  1.1014 +		{return STATIC_CAST(MAnimFreeTimerWindowFunctions*,iWindowFunctions);}
  1.1015 +private:
  1.1016 +	virtual void ReservedF1() const {};
  1.1017 +	};
  1.1018 +
  1.1019 +
  1.1020 +class CSpriteAnim : public CAnim
  1.1021 +/** Sprite animation interface.
  1.1022 +
  1.1023 +Sprites are bitmaps that can overlay a window or the screen. A sprite animation 
  1.1024 +can be provided by deriving from this class.
  1.1025 +
  1.1026 +The interface inherits from CAnim and has access to its functions. It additionally 
  1.1027 +can access an interface for querying and manipulating a sprite, using its 
  1.1028 +iSpriteFunctions member. 
  1.1029 +
  1.1030 +The derived class is constructed in the DLL factory class CAnimDll::CreateInstanceL() 
  1.1031 +function.
  1.1032 +
  1.1033 +@publishedAll 
  1.1034 +@released 
  1.1035 +@see CFreeTimerWindowAnim
  1.1036 +@see CWindowAnim */
  1.1037 +	{
  1.1038 +public:
  1.1039 +	/** Server side construction and initialisation of an animation class. 
  1.1040 +	
  1.1041 +	@param aArgs Packaged arguments which may be required during construction. 
  1.1042 +	These are transferred from the aParams argument of the client side constructor's 
  1.1043 +	RAnim::Construct(). */
  1.1044 +	virtual void ConstructL(TAny *aArgs)=0;
  1.1045 +protected:
  1.1046 +	inline CSpriteAnim() 
  1.1047 +	/** Protected constructor.
  1.1048 +	
  1.1049 +	Ensures that only derived classes can be constructed. */
  1.1050 +		{}
  1.1051 +private:
  1.1052 +	virtual void ReservedS1() const {};
  1.1053 +	virtual void ReservedS2() const {};
  1.1054 +protected:
  1.1055 +	/** Pointer to a class containing functions implemented by the window server.
  1.1056 +	
  1.1057 +	These are available to any CSpriteAnim-derived class.
  1.1058 +	
  1.1059 +	Note that this value is automatically set for you by the animation framework. 
  1.1060 +	You do not need to assign a value to this pointer. */
  1.1061 +	MAnimSpriteFunctions *iSpriteFunctions;
  1.1062 +	friend class CWsAnim;
  1.1063 +	};
  1.1064 +
  1.1065 +
  1.1066 +class CAnimDll : public CBase
  1.1067 +/** Animation DLL factory interface. 
  1.1068 +
  1.1069 +An animation DLL class must be a derived class of CAnimDll, and can be thought 
  1.1070 +of as a server side factory class. CAnimDll consists of a single pure virtual 
  1.1071 +factory function, CreateInstanceL(TInt aType), which is used to create new 
  1.1072 +instances of animation objects of type CAnim contained in the DLL. Animation 
  1.1073 +DLL objects are created by the CreateCAnimDllL() function, which is called 
  1.1074 +by the window server at the request of the client.
  1.1075 +
  1.1076 +For efficiency reasons, it makes sense to collect multiple animation classes 
  1.1077 +into a single DLL, even if they are otherwise logically quite separate classes. 
  1.1078 +
  1.1079 +@publishedAll 
  1.1080 +@released */
  1.1081 +	{
  1.1082 +public:
  1.1083 +	/** Factory function for animation DLLs.
  1.1084 +	
  1.1085 +	It must be provided in the derived class.
  1.1086 +	
  1.1087 +	The parameter can be used to differentiate between multiple animation 
  1.1088 +	classes contained in the same animation DLL.
  1.1089 +	
  1.1090 +	@param aType Identifies an animation class to be constructed. This is the 
  1.1091 +	same value as the aType argument of the client side animation constructor 
  1.1092 +	RAnim::Construct(). It is passed from the client side by the animation framework.
  1.1093 +	@return Pointer to a CAnim-derived animation class object. */
  1.1094 +	virtual CAnim *CreateInstanceL(TInt aType)=0;
  1.1095 +	};
  1.1096 +
  1.1097 +#endif