os/graphics/windowing/windowserver/inc/Graphics/openwfc/WSGRAPHICDRAWERINTERFACE.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/inc/Graphics/openwfc/WSGRAPHICDRAWERINTERFACE.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1367 @@
     1.4 +// Copyright (c) 2005-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 +// WSGRAPHICDRAWERINTEFACE.H
    1.18 +// Server-side base-classes for graphic drawer plugins
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#ifndef __WSGRAPHICDRAWERINTEFACE_H__
    1.23 +#define __WSGRAPHICDRAWERINTEFACE_H__
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <w32std.h>
    1.27 +#include <gdi.h>
    1.28 +#include <bitstd.h>
    1.29 +
    1.30 +class CWsGraphicDrawer;
    1.31 +struct TGraphicDrawerId;
    1.32 +class MWsEventHandler;
    1.33 +class CWsGraphicMessageQueue;
    1.34 +class CWsClient;
    1.35 +class CWsWindow;
    1.36 +
    1.37 +#if !defined(SYMBIAN_GRAPHICS_GCE)
    1.38 +	class MWsFlickerFreeBufferObserver;
    1.39 +#endif
    1.40 +
    1.41 +class MWsScreenRedrawObserver;
    1.42 +class MWsMemoryRelease;
    1.43 +class MEventHandler;
    1.44 +class MWsElement;
    1.45 +class MWsGraphicsContext;
    1.46 +class MWsAnimationScheduler;
    1.47 +
    1.48 +/** 
    1.49 +@publishedPartner
    1.50 +@released
    1.51 +*/
    1.52 +enum TWinType
    1.53 +	{
    1.54 +	EWinTypeClient,
    1.55 +	EWinTypeRoot,
    1.56 +	EWinTypeGroup,
    1.57 +	};
    1.58 +
    1.59 +/** Declares an object type, ETypeId, for a class, in order to allow the WSERV object
    1.60 +provider mechanism to locate and provide objects from the class.
    1.61 +@publishedPartner
    1.62 +@released
    1.63 +@see MWsObjectProvider */
    1.64 +#define DECLARE_WS_TYPE_ID(id) enum { EWsObjectInterfaceId = id };
    1.65 +
    1.66 +class MWsObjectProvider
    1.67 +/** A class for dynamic extension of object instances
    1.68 +	WSERV classes which wish to allow dynamic extension show derive those
    1.69 +	extensions from MWsObjectProvider and use the DECLARE_WS_TYPE_ID macro
    1.70 +	Similiar in principle and operation to CONE's MObjectProvider
    1.71 +	@publishedPartner
    1.72 +	@released
    1.73 +	@see MObjectProvider
    1.74 +*/	{
    1.75 +public:
    1.76 +	template<class T>
    1.77 +	T* ObjectInterface()
    1.78 +	/** Gets an object of the type defined by the template parameter.
    1.79 +
    1.80 +	@return A pointer to an object of the type required, or NULL if none can be
    1.81 +	found. */
    1.82 +		{ return (T*)ResolveObjectInterface(T::EWsObjectInterfaceId); }
    1.83 +	/** Gets an object of the type defined by the template parameter.
    1.84 +	@return A pointer to a const object of the type required, or NULL if none can be
    1.85 +	found. */
    1.86 +	template<class T>
    1.87 +	const T* ObjectInterface() const
    1.88 +		{ return (T*)const_cast<MWsObjectProvider*>(this)->ResolveObjectInterface(T::EWsObjectInterfaceId); }
    1.89 +	/** Resolve an instance of an interface
    1.90 +	should be overriden by implementations when they have custom interfaces to provide. */
    1.91 +	IMPORT_C virtual TAny* ResolveObjectInterface(TUint aTypeId);
    1.92 +	};
    1.93 +
    1.94 +class MWsScreen: public MWsObjectProvider
    1.95 +/** A destination for a drawing occasion of a CWsGraphicDrawer
    1.96 +	Used by animation schedulers to update screens
    1.97 +	@publishedPartner
    1.98 +	@released
    1.99 +*/	{
   1.100 +public:
   1.101 +	using MWsObjectProvider::ResolveObjectInterface;
   1.102 +	
   1.103 +private:
   1.104 +	friend class MWsAnimationScheduler;
   1.105 +#if !defined(SYMBIAN_GRAPHICS_GCE)
   1.106 +	/** Called by the MWsAnimationScheduler when scheduled animation is to be serviced
   1.107 +		
   1.108 +		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
   1.109 +
   1.110 +		@released */
   1.111 +	virtual void OnAnimation() = 0;
   1.112 +#else
   1.113 +	/** Called by the MWsAnimationScheduler when a scheduled animation is to be serviced.
   1.114 +		@param aFinished If not NULL then this is signalled when the animation has 
   1.115 +		been processed and further animations may be submitted. An animation may be
   1.116 +		submitted prior to signalling, but the render stage pipeline may not be ready
   1.117 +		to process it. 
   1.118 +		
   1.119 +		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
   1.120 +
   1.121 +		@released */
   1.122 +	virtual void OnAnimation(TRequestStatus* aFinished) = 0;
   1.123 +#endif
   1.124 +	/** Called by the MWsAnimationScheduler when the screen needs to be redrawn in its entirity
   1.125 +		
   1.126 +		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
   1.127 +
   1.128 +		@released */
   1.129 +	virtual void Redraw() = 0;
   1.130 +	/** Called by MWsAnimationScheduler when the any parts of the screen that potentially contain
   1.131 +		commands to draw graphics in the list of IDs passed need to be redrawn
   1.132 +		@param aInvalid the list of IDs that are invalid
   1.133 +		@return whether the screen did any redrawing
   1.134 +		
   1.135 +		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
   1.136 +
   1.137 +		@released */
   1.138 +	virtual TBool RedrawInvalid(const TArray<TGraphicDrawerId>& aInvalid) = 0;
   1.139 +	};
   1.140 +
   1.141 +/**
   1.142 +@publishedPartner
   1.143 +@prototype
   1.144 +*/
   1.145 +class CWsMessageData : public CBase, public MWsObjectProvider
   1.146 +	{
   1.147 +public:
   1.148 +	virtual TPtrC8 Data() const = 0;
   1.149 +	virtual void Release() = 0;
   1.150 +	IMPORT_C TInt ClientHandle() const;
   1.151 +	IMPORT_C TInt Id() const;
   1.152 +	IMPORT_C const CWsGraphicDrawer* Drawer();
   1.153 +	IMPORT_C void SetClientHandle(TInt aClientHandle);
   1.154 +	IMPORT_C void SetId( TInt aId);
   1.155 +	IMPORT_C void SetDrawer(const CWsGraphicDrawer* aDrawer);
   1.156 +private:
   1.157 +	friend class CWsGraphicMessageQueue;
   1.158 +	friend class CWsClient;
   1.159 +	CWsMessageData* iNext;
   1.160 +	const CWsGraphicDrawer* iDrawer;
   1.161 +	TInt iId;
   1.162 +	TInt iClientHandle;
   1.163 +	TInt iMWsMessageDataSpare[3];
   1.164 +	};
   1.165 +
   1.166 +class MWsClient: public MWsObjectProvider
   1.167 +/*** Represents a client session
   1.168 +	@publishedPartner 
   1.169 +	@released  */
   1.170 +	{
   1.171 +public:
   1.172 +	/** Determines if this client has the specified capability */
   1.173 +	virtual TBool HasCapability(TCapability aCapability) const = 0;
   1.174 +	/** Retrieves the Secure ID of the client's process */
   1.175 +	virtual TSecureId SecureId() const = 0;
   1.176 +	/** Retrieves the Vendor ID of the client's process */
   1.177 +	virtual TVendorId VendorId() const = 0;
   1.178 +private:
   1.179 +	friend class CWsGraphicDrawer;
   1.180 +	virtual TInt SendMessage(const CWsGraphicDrawer* aOnBehalfOf,const TDesC8& aData) = 0;
   1.181 +	virtual TInt SendMessage(const CWsGraphicDrawer* aOnBehalfOf,CWsMessageData& aData) = 0;
   1.182 +	};
   1.183 +
   1.184 +class MWsGraphicDrawerEnvironment: public MWsObjectProvider
   1.185 +/** The environment for a graphic drawer
   1.186 +@publishedPartner
   1.187 +@released
   1.188 +*/	{
   1.189 +public:
   1.190 +	/** Locate a graphic by ID
   1.191 +	@return the graphic with that ID, else NULL if no such graphic exists */
   1.192 +	virtual const CWsGraphicDrawer* ResolveGraphic(const TGraphicDrawerId& aId) const = 0;
   1.193 +	/** The number of screens the device has; this is constant for a device */
   1.194 +	virtual TInt ScreenCount() const = 0;
   1.195 +	/** Get a particular screen by ordinal
   1.196 +	@return the screen, or NULL if aIndex is out of bounds */
   1.197 +	virtual MWsScreen* Screen(TInt aIndex) = 0;
   1.198 +	/** Get a particular screen by ordinal
   1.199 +	@return the screen, or NULL if aIndex is out of bounds */
   1.200 +	virtual const MWsScreen* Screen(TInt aIndex) const = 0;
   1.201 +	/**  Not supported
   1.202 +	@return success of overriding the default scheduler */
   1.203 +	virtual TBool SetCustomAnimationScheduler(MWsAnimationScheduler* aScheduler) = 0;
   1.204 +	/** Query whether a custom animation scheduler has been set
   1.205 +	@return ETrue if the custom animation scheduler has been set */
   1.206 +	virtual TBool HasCustomAnimationScheduler() const = 0;
   1.207 +	/** Clears a custom animation scheduler
   1.208 +	@return success if the custom scheduler was set, and hence removed */
   1.209 +	virtual TBool ClearCustomAnimationScheduler(MWsAnimationScheduler* aCurrentScheduler) = 0;
   1.210 +protected:
   1.211 +	friend class CWsGraphicDrawer;
   1.212 +	/** Schedules all potentially affected parts of the screen to repaint
   1.213 +	This is called automatically whenever a graphic is added, replaced or removed.
   1.214 +	However, if a graphic which changes representation during runtime must call this
   1.215 +	explicitly.
   1.216 +	Note: this is not a suitable method for animating a graphic.  For animation,
   1.217 +	use MWsGc::Invalidate when the graphic is being drawn to schedule the next
   1.218 +	animation frame instead.
   1.219 +	@param aId the ID of the artwork; the artwork may not exist */
   1.220 +	virtual void Invalidate(const TGraphicDrawerId& aId) = 0;
   1.221 +public:
   1.222 +	/** Register to be notified when some events occur.
   1.223 +	@return KErrNone if successful */
   1.224 +	virtual TInt RegisterEventHandler(CWsGraphicDrawer* aDrawer, MWsEventHandler* aHandler, TUint32 aEventMask) = 0;
   1.225 +	/** Unregister from events notification
   1.226 +	@return KErrNone if successful */
   1.227 +	virtual TInt UnregisterEventHandler(CWsGraphicDrawer* aDrawer) = 0;
   1.228 +	/** Register to be notified when some events occur.
   1.229 +	@return KErrNone if successful
   1.230 +	@prototype */
   1.231 +	virtual TInt RegisterWsEventHandler(MWsEventHandler* aHandler, TUint32 aEventMask) = 0;
   1.232 +	/** Unregister from events notification
   1.233 +	@return KErrNone if successful 
   1.234 +	@prototype */
   1.235 +	virtual TInt UnregisterWsEventHandler(MWsEventHandler* aHandler) = 0;
   1.236 +	/** Logs a message to the wserv logger, if one is loaded
   1.237 +	@param aPriority The priority of the message - low priority is 1, high is 9
   1.238 +	@param aFmt The string to log.  This may contain a single %d, %x or equivalent
   1.239 +	@param aParam An integer parameter corresponding to a %d, if present
   1.240 +	@prototype */
   1.241 +	virtual void Log(TInt aPriority,const TDesC &aFmt,TInt aParam=0) = 0;
   1.242 +	/** Registers an interface for releasing memory in low memory situations.
   1.243 +	The release function may be called as a result of any Alloc or ReAlloc attempts in the window server
   1.244 +	process.
   1.245 +	@param aMemoryRelease a callback interface
   1.246 +	@return KErrNone or a system wide error code
   1.247 +	@prototype */
   1.248 +	virtual TInt RegisterMemoryRelease(MWsMemoryRelease * aMemoryRelease) = 0;
   1.249 +	/** Removes a registration set by RegisterMemoryRelease
   1.250 +	@param aMemoryRelease the registered release object to remove
   1.251 +	@prototype */
   1.252 +	virtual void UnregisterMemoryRelease(MWsMemoryRelease * aMemoryRelease) = 0;
   1.253 +	};
   1.254 +
   1.255 +class MWsGc: public MWsObjectProvider
   1.256 +/** A destination for a drawing occasion of a CWsGraphicDrawer
   1.257 +	Used to register invalidation schedules for animation
   1.258 +	@publishedPartner
   1.259 +	@released
   1.260 +*/	{
   1.261 +public:
   1.262 +	/** The Client requesting this drawing occasion
   1.263 +		@return the client
   1.264 +		@publishedPartner 
   1.265 +		@released  */
   1.266 +	virtual MWsClient& Client() = 0;
   1.267 +	/** The screen that is currently being drawn to
   1.268 +		@return the screen
   1.269 +		@publishedPartner 
   1.270 +		@released  */
   1.271 +	virtual MWsScreen& Screen() = 0;
   1.272 +#if !defined(SYMBIAN_GRAPHICS_GCE)
   1.273 +	/** The origin of the GC relative to the screen's origin
   1.274 +		@return the origin
   1.275 +		@publishedPartner
   1.276 +		@released  */
   1.277 +	virtual TPoint GcOrigin() const = 0;
   1.278 +	/** The clipping region currently being used
   1.279 +		@return the clipping region
   1.280 +		@publishedPartner
   1.281 +		@released */
   1.282 +	virtual const TRegion& ClippingRegion() = 0;
   1.283 +	/** The BITGDI graphics context to draw to
   1.284 +		@publishedPartner
   1.285 +		@released */
   1.286 +	virtual CFbsBitGc& BitGc() = 0;
   1.287 +	/** Saves the state of the GC to an internal buffer.  Several GC states can be saved in a FILO.
   1.288 +		Do not restore a GC (using PopBitGcSettings()) that wasn't properly saved!
   1.289 +		@return KErrNone if successful, else one of the system-wide error codes. */
   1.290 +	virtual TInt PushBitGcSettings() = 0;
   1.291 +	/** Restores the last GC state that was saved. */
   1.292 +	virtual void PopBitGcSettings() = 0;
   1.293 +#endif	
   1.294 +	/** The time for the current redraw
   1.295 +		@publishedPartner 
   1.296 +		@released */
   1.297 +	virtual const TTime& Now() const = 0;
   1.298 +	/** Schedule an animation of a rectangle in the future.
   1.299 +	    Scheduled animation doesn't work in low memory conditions or
   1.300 +	    if aRect values fall outside the window area of this animation.
   1.301 +		@param aRect the rectangle to animate, in the GC's coordinates
   1.302 +		@param aFromNow the time in microseconds from Now() that the rectangle will be invalid
   1.303 +		@publishedPartner 
   1.304 +		@released */
   1.305 +	virtual void ScheduleAnimation(const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow) = 0;
   1.306 +	/** Schedule an animation of a rectangle in the future
   1.307 +		@param aRect the rectangle to animate, in the GC's coordinates
   1.308 +		@param aFromNow the time in microseconds from Now() that the rectangle will be invalid
   1.309 +		@param aFreq microseconds between frames that this rectangle will probably be invalid in the future (0 means no such hint is known)
   1.310 +		@param aStop the duration in microseconds from Now() that the aFreq hint will be valid for (0 means indefinitely)
   1.311 +		@publishedPartner 
   1.312 +		@released */
   1.313 +	virtual void ScheduleAnimation(const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop) = 0;
   1.314 +	/** Sets the origin of gc
   1.315 +		@param aOrigin The new origin of the gc
   1.316 +		@publishedPartner 
   1.317 +		@prototype	*/
   1.318 +	virtual void SetGcOrigin(const TPoint& aOrigin) = 0;
   1.319 +	};
   1.320 +
   1.321 +/** Interface Extension
   1.322 +*/
   1.323 +enum
   1.324 +	{
   1.325 +	KMWsScreenConfigInterfaceId = 1,
   1.326 +#if !defined(SYMBIAN_GRAPHICS_GCE)
   1.327 +	KMWsBackBufferInterfaceId = 2,
   1.328 +	KMWsFrontBufferInterfaceId = 3,
   1.329 +#endif
   1.330 +	KMWsGraphicDrawerMessageAlloc = 4,
   1.331 +	KMWsGraphicMessageAlloc = 5,
   1.332 +	KWsGraphicHandleSynchronMessageId = 6,
   1.333 +	KWsGraphicMessageCallbackInterfaceId = 7,
   1.334 +	KWsActiveSchedulerDebug = 8,
   1.335 +#if !defined(SYMBIAN_GRAPHICS_GCE)
   1.336 +	KWsFlickerFreeBufferObserver = 9,
   1.337 +#endif
   1.338 +	KMWsWindow = 10,
   1.339 +	KWsScreenRedraw = 11,
   1.340 +	KWsScreenRedrawObserver = 12,
   1.341 +	KCWsRenderStage = 13,
   1.342 +	KMWsRenderStageFactory = 14,
   1.343 +	KMWsMemoryRelease = 15,
   1.344 +#if !defined(SYMBIAN_GRAPHICS_GCE)	
   1.345 +	KMWsGcClipRect = 16,
   1.346 +#endif	
   1.347 +	KMWsFader = 17,
   1.348 +	KMWsPluginManager = 18,
   1.349 +	KMWsIniFile = 19,
   1.350 +	KMWsRawEventServer = 20,
   1.351 +	KMWsPlaceSurfaceId = 21,
   1.352 +#if defined(SYMBIAN_GRAPHICS_GCE)
   1.353 +	KMWsTextCursor = 22,				// CWsRenderStage Object Extension will yield an MWsTextCursor
   1.354 +#endif
   1.355 +	KMWsGraphicsContext = 23,			// CWsRenderStage Object Extension will yield an MWsGraphicsContext
   1.356 +	KMWsCompositionContext = 24,		// CWsRenderStage Object Extension will yield an MWsCompositionContext
   1.357 +										// 		MWsCompositionContext::CreateLayer will yield a MWsLayer
   1.358 +	KMWsEventHandler = 25,				// CWsRenderStage Object Extension will yield an MWsEventHandler
   1.359 +	KMWsScreenDevice = 26,				// CWsRenderStage Object Extension will yield an MWsScreenDevice
   1.360 +	KMWsPalette = 27,					// CWsRenderStage Object Extension will optionally yield an MWsPalette
   1.361 +#if defined(SYMBIAN_GRAPHICS_GCE)
   1.362 +	KMWsUiBufferInterfaceId = 28,		// CWsRenderStage Object Extension will optionally yield an MWsUiBuffer
   1.363 +#endif
   1.364 +	KMWsDebugBar = 29,					// CWsRenderStage Object Extension will optionally yield an MWsDebugBar
   1.365 +	KMWsDrawableSourceProvider = 30,	// CWsRenderStage Object Extension will optionally yield an MWsDrawableSourceProvider
   1.366 +	KMWsScreenConfigListInterfaceId = 31,	//MWsScreen can return this list interface
   1.367 +	KMWsWindowTreeObserver = 32,        // CWsRenderStage Object Extension will optionally yield an MWsWindowTreeObserver
   1.368 +	KMWsDrawAnnotationObserver = 33, 	// CWsRenderStage Object Extension will optionally yield an MWsDrawAnnotationObserver
   1.369 +	KMWsWindowVisibilityNotifier = 34, 	// CWsRenderStage Object Extension will optionally yield an MWsWindowVisibilityNotifier
   1.370 +	KMWsWindowTree = 35,				// Object Extension to be used by render stages for recovery of MWsWindowTree
   1.371 +	KMWsScene = 36,                     // CWsRenderStage Object Extension will yield an MWsScene
   1.372 +	                                    //      MWsScene::CreateSceneElement will yield a MWsElement
   1.373 +	KMWsContentReadyForComposition = 37,// CWsRenderStage Object Extension will optionally yield an MWsContentReadyForComposition
   1.374 +	};
   1.375 +
   1.376 +class TSurfaceConfiguration;
   1.377 +
   1.378 +
   1.379 +/** Extension to GC to allow surface placement.
   1.380 +
   1.381 +@publishedPartner
   1.382 +@prototype
   1.383 +@deprecated
   1.384 +
   1.385 +NOTE: This interface is deprecated. Do not use!
   1.386 +*/
   1.387 +class MWsSurfacePlacement: public MWsObjectProvider
   1.388 +	{
   1.389 +	public:
   1.390 +	DECLARE_WS_TYPE_ID(KMWsPlaceSurfaceId)
   1.391 +	virtual TInt	PlaceSurface(const TSurfaceConfiguration& aConfig)=0;
   1.392 +	};
   1.393 +
   1.394 +/** Current screen mode configuration.Values return from this interface shall not be cached as they
   1.395 +can change at anytime when wserv changes its screen mode. Plugin can listen to event EScreenSizeModeChanged
   1.396 +to be notified when it happens.
   1.397 +
   1.398 +@publishedPartner
   1.399 +@released
   1.400 +*/
   1.401 +class MWsScreenConfig: public MWsObjectProvider
   1.402 +	{
   1.403 +public:
   1.404 +	DECLARE_WS_TYPE_ID(KMWsScreenConfigInterfaceId)
   1.405 +
   1.406 +	/** Get screen display mode */
   1.407 +	virtual TDisplayMode DisplayMode() const = 0;
   1.408 +	/** Get physical screen size in pixels */
   1.409 +	virtual TSize SizeInPixels() const = 0;
   1.410 +	/** Get screen size in pixels for current screen size mode as defined in wsini */
   1.411 +	virtual TSize ScreenModeSizeInPixels() const = 0;
   1.412 +	/** Get frame buffer line pitch */
   1.413 +	virtual TInt Stride() const = 0;
   1.414 +	/** Get screen orientation */
   1.415 +	virtual CFbsBitGc::TGraphicsOrientation Orientation() const = 0;
   1.416 +	/** Get screen size mode */
   1.417 +	virtual TInt SizeMode() const = 0;
   1.418 +	/** Get screen scaling factor */
   1.419 +	virtual TSize ScalingFactor() const = 0;
   1.420 +	/** Get screen origin */
   1.421 +	virtual TPoint Origin() const = 0;
   1.422 +	/** Get screen scaled origin */
   1.423 +	virtual TPoint ScaledOrigin() const = 0;
   1.424 +	};
   1.425 +
   1.426 +/**	Available list of screen modes as specified during start-up.
   1.427 + * 	This interface can generally be enquired from the MWsScreen instance.
   1.428 + * 	Can be read by render stage to configure its Display Configuration policy.
   1.429 + * 	
   1.430 + * 	Note that mode list is not contiguous, so methods may leave if missing index is requested.
   1.431 + **/
   1.432 +class MWsScreenConfigList: public MWsObjectProvider
   1.433 +	{
   1.434 +public:
   1.435 +	DECLARE_WS_TYPE_ID(KMWsScreenConfigListInterfaceId)
   1.436 +
   1.437 +	enum	TModeFlags
   1.438 +		{
   1.439 +		EDynamic=			0x00000001,		//"-1,-1"
   1.440 +		EHighRes=			0x00000002,		//High-res policy mode
   1.441 +		EDisconnected=		0x00000004,		//Mode to use when disconnected
   1.442 +		EHalDefault=		0x00000008,
   1.443 +		ETwipsSpecified=	0x00000010,
   1.444 +		EClientDefinedDigitiserArea=	0x00000020,	
   1.445 +		};
   1.446 +	
   1.447 +	/** Get  list of valid display modes - may be sparse **/
   1.448 +	virtual TInt	GetScreenSizeModeList(RArray<TInt>&aList) const =0;
   1.449 +	/** Get screen display mode */
   1.450 +	virtual TDisplayMode DisplayModeL(TInt aIndex) const = 0;
   1.451 +	/** Get screen size in pixels for current screen size mode as defined in wsini */
   1.452 +	virtual TSize ScreenModeSizeInPixelsL(TInt aIndex) const = 0;
   1.453 +	/** Get screen size in twips for current screen size mode as defined in wsini */
   1.454 +	virtual TSize ScreenModeSizeInTwipsL(TInt aIndex) const = 0;
   1.455 +	/** Get screen orientation */
   1.456 +	virtual CFbsBitGc::TGraphicsOrientation OrientationL(TInt aIndex) const = 0;
   1.457 +	/** Get screen orientation */
   1.458 +	virtual TInt AvailableOrientationsL(TInt aIndex) const = 0;
   1.459 +	/** Get screen scaling factor - note this is expected to stay at 1:1 */
   1.460 +	virtual TSize ScalingFactorL(TInt aIndex) const = 0;
   1.461 +	/** Get screen origin */
   1.462 +	virtual TPoint OriginL(TInt aIndex) const = 0;
   1.463 +	/** Get screen scaled origin - note this is expected to stay at 1:1  */
   1.464 +	virtual TPoint ScaledOriginL(TInt aIndex) const = 0;
   1.465 +	/** Get the modeflags for specified mode  */
   1.466 +	virtual TInt ModeFlagsL(TInt aIndex) const = 0;
   1.467 +	
   1.468 +	};
   1.469 +	
   1.470 +class MWsWindowTree : public MWsObjectProvider
   1.471 +	{
   1.472 +public:	
   1.473 +	DECLARE_WS_TYPE_ID(KMWsWindowTree)
   1.474 +	virtual void SendTree() const = 0;
   1.475 +	};
   1.476 + 
   1.477 +#if !defined(SYMBIAN_GRAPHICS_GCE)
   1.478 +/** Wserv flickerfree buffer access
   1.479 +
   1.480 +@publishedPartner
   1.481 +@released
   1.482 +*/
   1.483 +class MWsBackBuffer: public MWsObjectProvider
   1.484 +	{
   1.485 +public:
   1.486 +	DECLARE_WS_TYPE_ID(KMWsBackBufferInterfaceId)
   1.487 +	/** Get wserv flickerfree buffer bitmap
   1.488 +	*/
   1.489 +	virtual CFbsBitmap* GetBitmap() = 0;
   1.490 +	/** Get default wserv flickerfree buffer drawing context. This will always return the original
   1.491 +	context not the current context (e.g. not the redirecting context when it is redirected).
   1.492 +	*/
   1.493 +	virtual CFbsBitGc* GetBitGc() = 0;
   1.494 +	/** Set wserv flickerfree buffer drawing context to redirect its drawing output. Drawing context must
   1.495 +	have been activated on a device prior calling this function.
   1.496 +	@param aBitGc The context where flickerfree buffer drawing output is redirected to. If it is NULL
   1.497 +	the redirection will be cancelled and default drawing context will be restored.
   1.498 +	@return KErrNone if successful, otherwise one of system-wide error codes.
   1.499 +	*/
   1.500 +	virtual TInt SetBitGc(CFbsBitGc* aBitGc) = 0;
   1.501 +	/** Redirects drawing to another back buffer. Target back buffer must provide bitmap and drawing context
   1.502 +	which has been activated on a bitmap device.
   1.503 +	@param aTarget Target back buffer where drawing is redirected to. If it is NULL
   1.504 +	the redirection will be terminated.
   1.505 +	@return KErrNone if successful, otherwise one of system-wide error codes.
   1.506 +	@prototype
   1.507 +	*/
   1.508 +	virtual TInt RedirectTo(MWsBackBuffer* aTarget) = 0;
   1.509 +	
   1.510 +	/** Sets the back buffers observer.  The observer will be called just before and just after each
   1.511 +	complete sequence of drawing to the back buffer.
   1.512 +	@param aObserver The observer handling the callbacks
   1.513 +	@prototype
   1.514 +	*/
   1.515 +	virtual void SetObserver(MWsFlickerFreeBufferObserver* aObserver) = 0;
   1.516 +	
   1.517 +	/** This returns the observer set by SetObserver.
   1.518 +	@return The observer set by SetObserver, or NULL
   1.519 +	@prototype
   1.520 +	*/
   1.521 +	virtual MWsFlickerFreeBufferObserver* Observer() = 0;
   1.522 +
   1.523 +	/** Get current wserv flickerfree buffer drawing context. This will return the redirected context 
   1.524 +	when it is set.
   1.525 +	@return The graphics context to use to draw to the flicker buffer directly.
   1.526 +	@prototype
   1.527 +	*/
   1.528 +	virtual CFbsBitGc* GetBitGcCurrent() = 0;
   1.529 +	};
   1.530 +
   1.531 +/** Wserv screen buffer access
   1.532 +
   1.533 +@publishedPartner
   1.534 +@released
   1.535 +*/
   1.536 +class MWsFrontBuffer: public MWsObjectProvider
   1.537 +	{
   1.538 +public:
   1.539 +	DECLARE_WS_TYPE_ID(KMWsFrontBufferInterfaceId)
   1.540 +	/** Get pointer to framebuffer
   1.541 +	*/
   1.542 +	virtual const TAny* GetBits() = 0;
   1.543 +	/** Get default wserv screen drawing context. This will always return the original
   1.544 +	context not the current context (e.g. not the redirecting context when it is redirected).
   1.545 +	*/
   1.546 +	virtual CFbsBitGc* GetBitGc() = 0;
   1.547 +	/** Set wserv screen drawing context to redirect its drawing output. Drawing context must
   1.548 +	have been activated on a device prior calling this function.
   1.549 +	@param aBitGc The context where screen drawing output is redirected to. If it is NULL
   1.550 +	the redirection will be cancelled and default drawing context will be restored.
   1.551 +	@return KErrNone if successful, otherwise one of system-wide error codes.
   1.552 +	*/
   1.553 +	virtual TInt SetBitGc(CFbsBitGc* aBitGc) = 0;
   1.554 +	/** Set wserv screen drawing context to redirect its drawing output and perform fullscreen 
   1.555 +	redraw if necessary. Drawing context must have been activated on a device prior calling this 
   1.556 +	function.
   1.557 +	@param aBitGc The context where screen drawing output is redirected to. If it is NULL
   1.558 +	the redirection will be cancelled and default drawing context will be restored.
   1.559 +	@param aInvalidateScreen Flag to tell wserv to perform fullscreen redraw or not
   1.560 +	@return KErrNone if successful, otherwise one of system-wide error codes.
   1.561 +	@prototype
   1.562 +	*/
   1.563 +	virtual TInt SetBitGc(CFbsBitGc* aBitGc, TBool aInvalidateScreen) = 0;	
   1.564 +	
   1.565 +	/** Get current wserv screen drawing context. This will return the redirected context 
   1.566 +	when it is set.
   1.567 +	@prototype
   1.568 +	*/
   1.569 +	virtual CFbsBitGc* GetBitGcCurrent() = 0;
   1.570 +	};
   1.571 +#endif // !SYMBIAN_GRAPHICS_GCE
   1.572 +
   1.573 +/** Optional Memory Allocator for incoming messages
   1.574 +	To be implemented by CRPs which want to control large incoming messages themselves
   1.575 +
   1.576 +@publishedPartner
   1.577 +@released
   1.578 +*/
   1.579 +class MWsGraphicDrawerMessageAlloc: public MWsObjectProvider
   1.580 +	{
   1.581 +public:
   1.582 +	DECLARE_WS_TYPE_ID(KMWsGraphicDrawerMessageAlloc)
   1.583 +	virtual TAny* Alloc(TInt aSize) = 0;
   1.584 +	virtual void Free(TAny* aCell) = 0;
   1.585 +	};
   1.586 +
   1.587 +/** Optional Memory Allocator for incoming messages
   1.588 +	To be implemented by CWsGraphics which want to control large incoming messages themselves
   1.589 +
   1.590 +@publishedPartner
   1.591 +@released
   1.592 +*/
   1.593 +class MWsGraphicMessageAlloc: public MWsObjectProvider
   1.594 +	{
   1.595 +public:
   1.596 +	DECLARE_WS_TYPE_ID(KMWsGraphicMessageAlloc)
   1.597 +	NONSHARABLE_CLASS(MBuffer): public MWsObjectProvider
   1.598 +		{
   1.599 +	public:
   1.600 +		virtual TPtr8 Buffer() = 0;
   1.601 +		virtual void Release() = 0;
   1.602 +		};
   1.603 +	virtual MBuffer* Alloc(TInt aSize) = 0;
   1.604 +	};
   1.605 +
   1.606 +/** For debug purposes only
   1.607 +
   1.608 +@publishedPartner
   1.609 +@prototype
   1.610 +*/	
   1.611 +class MWsActiveSchedulerDebug: public MWsObjectProvider
   1.612 +	{
   1.613 +public:
   1.614 +	DECLARE_WS_TYPE_ID(KWsActiveSchedulerDebug)
   1.615 +	virtual TInt64 Requests() const = 0;
   1.616 +	virtual TInt64 Errors() const = 0;
   1.617 +	virtual TInt64 Draws() const = 0;
   1.618 +	virtual TInt64 Total() const = 0;
   1.619 +	virtual TInt64 Preparing() const = 0;
   1.620 +	virtual TInt64 Drawing() const = 0;
   1.621 +	virtual TInt64 Idle() const = 0;
   1.622 +	};
   1.623 +
   1.624 +#if !defined(SYMBIAN_GRAPHICS_GCE)
   1.625 +/** This forms part of the MWsBackBuffer interface
   1.626 +
   1.627 +@publishedPartner
   1.628 +@prototype
   1.629 +*/
   1.630 +class MWsFlickerFreeBufferObserver: public MWsObjectProvider 
   1.631 +	{
   1.632 +public:	
   1.633 +	DECLARE_WS_TYPE_ID(KWsFlickerFreeBufferObserver)
   1.634 +	/** Function that gets called before the flicker buffer is updated
   1.635 +	@param aBuffer The back buffer that is about to be updated
   1.636 +	@param aRegion The region of the back buffer that is about to be updated
   1.637 +	*/
   1.638 +	virtual void BeforeUpdate(MWsBackBuffer& aBuffer,const TRegion& aRegion) = 0;
   1.639 +	/** Function that gets called after the flicker buffer has been updated
   1.640 +	@param aBuffer The back buffer that has been updated
   1.641 +	@param aRegion The region of the the back buffer that has been updated
   1.642 +	*/
   1.643 +	virtual void AfterUpdate(MWsBackBuffer& aBuffer,const TRegion& aRegion) = 0;
   1.644 +	};
   1.645 +#endif // !SYMBIAN_GRAPHICS_GCE
   1.646 +
   1.647 +/** An interface through which a window can be examined
   1.648 +This returns non const copies instead of const references, and the
   1.649 +functions themselves are non const.
   1.650 +
   1.651 +@publishedPartner
   1.652 +@prototype
   1.653 +*/
   1.654 +class MWsWindow : public MWsObjectProvider
   1.655 +	{
   1.656 +public:	
   1.657 +	DECLARE_WS_TYPE_ID(KMWsWindow)
   1.658 +public:
   1.659 +	/** Gets the origin of the window.
   1.660 +	@return TPoint containing the origin of the window.
   1.661 +	*/
   1.662 +	virtual TPoint Origin() const = 0;
   1.663 +	/** Gets the windows rect in absolute co-ordinates.
   1.664 +	@return TRect
   1.665 +	*/
   1.666 +	virtual TRect AbsRect() const = 0;
   1.667 +	/** Gets the size of the window
   1.668 +	@return TSize containing the size of the window
   1.669 +	*/
   1.670 +	virtual TSize Size() const = 0;
   1.671 +	/** Get the window's handle
   1.672 +	@return TUint32 containing the window's handle.
   1.673 +	*/
   1.674 +	virtual TUint32 Handle() const = 0;
   1.675 +	/** Invalidate an area of the window.
   1.676 +	@param aRect TRect containing the area to invalidate.
   1.677 +	*/
   1.678 +	virtual void Invalidate(const TRect * aRect = 0) = 0;
   1.679 +	/** Get the MWsScreen for this window.
   1.680 +	@return A pointer to the MWsScreen that this window is on.
   1.681 +	*/
   1.682 +	virtual MWsScreen * WsScreen() const = 0;
   1.683 +	/** Finds a child of this window by specifiying its handle.
   1.684 +	@param aHandle A handle to the window to find.
   1.685 +	@return an MWsWindow pointer to the found window
   1.686 +	*/
   1.687 +	virtual MWsWindow * FindChildByHandle(TUint32 aHandle) = 0;
   1.688 +	/**
   1.689 +	Returns the ordinal priority of the node. 
   1.690 +	*/
   1.691 +	virtual TInt OrdinalPriority() const = 0;
   1.692 +	/** Get the window's basic area before any clipping is done.
   1.693 +	For windows with rounded corners, the window area is different from AbsRect.
   1.694 +	@return a reference to the window area 
   1.695 +	*/	
   1.696 +	virtual const TRegion& WindowArea() const = 0;
   1.697 +	};
   1.698 +
   1.699 +/** 
   1.700 +An interface providing information about a window group.
   1.701 +@publishedPartner
   1.702 +@prototype
   1.703 +*/
   1.704 +class MWsWindowGroup
   1.705 +	{
   1.706 +public:
   1.707 +	virtual TInt Identifier() const = 0;
   1.708 +	virtual TPtrC Name() const = 0;
   1.709 +	virtual TBool IsFocusable() const = 0;
   1.710 +	virtual TInt OrdinalPriority() const = 0;
   1.711 +	virtual const MWsClient * Client() const = 0;
   1.712 +	};
   1.713 +
   1.714 +/**
   1.715 +An interface through which a sprite can be examined. 
   1.716 +@publishedPartner
   1.717 +@prototype
   1.718 +*/
   1.719 +class MWsSprite 
   1.720 +	{
   1.721 +public:
   1.722 +	enum TSpriteType
   1.723 +		{
   1.724 +		EWindowSprite,
   1.725 +		EFloatingSprite,
   1.726 +		ECustomTextCursorSprite,
   1.727 +		EPointerCursorSprite
   1.728 +		};
   1.729 +public:
   1.730 +	virtual TRect Rect() const = 0;
   1.731 +	virtual TSpriteType SpriteType() const = 0;
   1.732 +	};
   1.733 +
   1.734 +/**
   1.735 +An interface through which a standard text cursor can be examined. 
   1.736 +@publishedPartner
   1.737 +@prototype
   1.738 +*/
   1.739 +class MWsStandardTextCursor
   1.740 +	{
   1.741 +public:
   1.742 +	/**
   1.743 +	Cursor type.
   1.744 +	@return The cursor type; either TTextCursor::ETypeRectangle or TTextCursor::ETypeHollowRectangle.
   1.745 +	*/
   1.746 +	virtual TInt Type() const = 0;
   1.747 +	/**
   1.748 +	Draw rectangle.
   1.749 +	@return Draw rectangle of the cursor in <b>window</b> co-ordinates.
   1.750 +	*/
   1.751 +	virtual TRect Rect() const = 0;
   1.752 +	/**
   1.753 +	Clipping rectangle in <b>window</b> co-ordinates.
   1.754 +	@return If a clipping rect has been set, the cursor must be drawn clipped to the returned rectangle.
   1.755 +	@see MWsWindowTreeObserver::ECursorClipRectSet
   1.756 +	*/
   1.757 +	virtual TRect ClipRect() const = 0;
   1.758 +	/**
   1.759 +	Cursor flags.
   1.760 +	For possible values, see TTextCursor::EFlags.
   1.761 +	Note, only flags included by the mask TTextCursor::EUserFlags are provided.
   1.762 +	@see TTextCursor::EFlags
   1.763 +	*/
   1.764 +    virtual TUint Flags() const = 0;
   1.765 +	/**
   1.766 +	Cursor color.
   1.767 +	@return The cursor color.
   1.768 +	*/
   1.769 +	virtual TRgb Color() const = 0;
   1.770 +	/**
   1.771 +	Flash time interval.
   1.772 +	@return If TTextCursor::EFlagNoFlash is set, zero; otherwise the time interval between cursor flash on/off.
   1.773 +	@see MWsStandardTextCursor::Flags()
   1.774 +	*/
   1.775 +	virtual TTimeIntervalMicroSeconds32 FlashInterval() const = 0;
   1.776 +	};
   1.777 +
   1.778 +
   1.779 +/** An interface providing information about a window tree node.
   1.780 +@publishedPartner
   1.781 +@prototype
   1.782 +*/
   1.783 +class MWsWindowTreeNode
   1.784 +	{
   1.785 +public:
   1.786 +	
   1.787 +	enum TType
   1.788 +		{
   1.789 +		EWinTreeNodeClient = EWinTypeClient,	//0
   1.790 +		EWinTreeNodeRoot = EWinTypeRoot,		//1
   1.791 +		EWinTreeNodeGroup = EWinTypeGroup,		//2 
   1.792 +		EWinTreeNodeAnim = 16,					//3-15 reserved for expansion of TWinType
   1.793 +		EWinTreeNodeSprite,
   1.794 +		EWinTreeNodeStandardTextCursor,
   1.795 +		};
   1.796 +	
   1.797 +	/** 
   1.798 +	 @return The Node Type for this MWsWindowTreeNode. 	 */
   1.799 +	virtual TType NodeType() const = 0;
   1.800 +	/**
   1.801 +	 @return A pointer to a MWsWindow interface only when this 
   1.802 +	 MWsWindowTreeNode represents a client window 
   1.803 +	 (i.e. node type EWinTreeNodeClient), NULL otherwise. */
   1.804 +	virtual const MWsWindow* Window() const = 0;
   1.805 +	/**
   1.806 +	 @return A pointer to a MWsSprite interface only when this 
   1.807 +	 MWsWindowTreeNode represents a sprite, NULL otherwise. */
   1.808 +	virtual const MWsSprite* Sprite() const = 0;
   1.809 +	/**
   1.810 +	 @return A pointer to a MWsStandardTextCursor interface only when this 
   1.811 +	 MWsWindowTreeNode represents a standard text cursor, NULL otherwise. */
   1.812 +	virtual const MWsStandardTextCursor* StandardTextCursor() const = 0;
   1.813 +	/** 
   1.814 +	 @return The MWsWindowGroup this MWsWindowTreeNode belongs to, or "this"
   1.815 +	 MWsWindowTreeNode object if the NodeType is EWinTreeNodeGroup. Will  
   1.816 +	 return NULL if this MWsWindowTreeNode is of type EWinTreeNodeRoot. */
   1.817 +	virtual const MWsWindowGroup* WindowGroup() const = 0;
   1.818 +	/**
   1.819 +	 @return The parent MWsWindowTreeNode. NULL if current node is of type
   1.820 +	 EWinTreeNodeRoot. The parent of a floating sprite is the root window. */
   1.821 +	virtual const MWsWindowTreeNode* ParentNode() const = 0;
   1.822 +	};
   1.823 +
   1.824 +/** 
   1.825 +An interface optionally provided by render stages, to observe changes in 
   1.826 +window tree structure, or changes to tree nodes.
   1.827 +
   1.828 +@publishedPartner
   1.829 +@prototype
   1.830 +*/
   1.831 +class MWsWindowTreeObserver : public MWsObjectProvider
   1.832 +	{
   1.833 +public:	
   1.834 +	DECLARE_WS_TYPE_ID(KMWsWindowTreeObserver)
   1.835 +	
   1.836 +public:
   1.837 +	/**
   1.838 +	 This enum encapsulates the set of boolean attribute changes that can be observed
   1.839 +	 using the MWsWindowTreeObserver interface. 
   1.840 +	 @see FlagChanged */
   1.841 +	enum TFlags
   1.842 +		{
   1.843 +		/** For a window to be drawn, it needs to be activated and visible and have visible parents.
   1.844 +	 	Making a window invisible, implies that its children should be invisible as well.
   1.845 +	 	The default value for a window is true. */
   1.846 +		EVisible = 1,
   1.847 +		/** Non-fading windows should not be drawn faded regardless of their fade-count.
   1.848 +		The default value is false. */
   1.849 +		ENonFading,
   1.850 +		/** Windows with this attribute enabled uses alpha channel to control its transparency.
   1.851 +		The default value is false. */
   1.852 +		EAlphaChannelTransparencyEnabled,
   1.853 +		/** True if a clipping rect should be applied when drawing a standard text cursor, false otherwise.
   1.854 +		The default value is false. */
   1.855 +		ECursorClipRectSet,
   1.856 +		/** Implicitly defaults to true. Will remain true as long as the application's primary screendevice 
   1.857 +		is in the same orientation as the device. This information is only given for top-windows, 
   1.858 +		i.e. children of group-windows, and only when wsini.ini is configured with SIZE_MODE > 0. */
   1.859 +		EScreenDeviceValid
   1.860 +		};
   1.861 +	/**
   1.862 +	 This enum encapsulates the set of non-boolean attribute changes that can be observed
   1.863 +	 using the MWsWindowTreeObserver interface. 
   1.864 +	 @see AttributeChanged */
   1.865 +	enum TAttributes
   1.866 +		{
   1.867 +		/** Cursor type.
   1.868 +		@see MWsStandardTextCursor::Type()*/
   1.869 +		ECursorType = 1,
   1.870 +		/** Cursor clip rect.
   1.871 +		@see MWsStandardTextCursor::ClipRect()*/
   1.872 +		ECursorClipRect,
   1.873 +		/** Cursor flags.
   1.874 +		@see MWsStandardTextCursor::Flags()*/
   1.875 +		ECursorFlags,
   1.876 +		/** Cursor color.
   1.877 +		@see MWsStandardTextCursor::Color()*/
   1.878 +		ECursorColor,
   1.879 +		/** Window shape.
   1.880 +		@see MWsWindow::WindowArea()*/
   1.881 +		EWindowShape,
   1.882 +		/** Window group name
   1.883 +		@see MWsWindowGroup::Name()*/
   1.884 +		EWindowGroupName
   1.885 +		};
   1.886 +	/** 
   1.887 +	 Callback to notify that a MWsWindowTreeNode has just been created. 
   1.888 +	 Nodes are always added as the left-most sibling as this means they are
   1.889 +	 added in front of exisitng nodes.
   1.890 +	 @param aWindowTreeNode Use to query attributes of the node that has been 
   1.891 +	 						created. Note that attributes such as e.g. the extent
   1.892 +	 						is not yet set by the client when this notification arrives.
   1.893 +	 @param aParent The parent node which aWindowTreeNode has been attached to. 
   1.894 +	 				Special cases: aParent will be set to NULL for root windows, 
   1.895 +	 				and set to the root window for floating sprites. */
   1.896 +	virtual void NodeCreated(const MWsWindowTreeNode& aWindowTreeNode, const MWsWindowTreeNode* aParent) = 0;
   1.897 +	/** 
   1.898 +	 Callback to notify that a node in the window tree is about to be destroyed. 
   1.899 +	 @param aWindowTreeNode Use to query attributes of node that's about to be destroyed. */
   1.900 +	virtual void NodeReleased(const MWsWindowTreeNode& aWindowTreeNode) = 0;
   1.901 +	/**
   1.902 +	 Callback to notify that a node in the window tree has been activated. This 
   1.903 +	 event is only generated for windows which has a visual appearance 
   1.904 +	 (i.e. root windows and group windows are not activated). Before a node 
   1.905 +	 can be drawn it needs to be activated and visible and have a non-zero size.
   1.906 +	 @param aWindowTreeNode Use to query attributes of node that has been activated. */
   1.907 +	virtual void NodeActivated(const MWsWindowTreeNode& aWindowTreeNode) = 0;
   1.908 +	/**
   1.909 +	 Callback to notify that a node's extent has changed. It is guaranteed that there
   1.910 +	 will be at least one NodeExtentChanged notification between the NodeCreated and 
   1.911 +	 NodeActivated notifications.
   1.912 +	 Note that when a window has child-windows, those are always moving along with their
   1.913 +	 parent but no NodeExtentChanged notifications will be generated for the child-windows.
   1.914 +	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
   1.915 +	 @param aRect The new rectangle. */
   1.916 +	virtual void NodeExtentChanged(const MWsWindowTreeNode& aWindowTreeNode, const TRect& aRect) = 0;
   1.917 +	/**
   1.918 +	 Callback to notify that the ordinal position of a window has changed.
   1.919 +	 @param aWindowTreeNode Use to query attributes of the node that has been changed.. 
   1.920 +	 @param aNewPos The new position of this node among its siblings. */
   1.921 +	virtual void SiblingOrderChanged(const MWsWindowTreeNode& aWindowTreeNode, TInt aNewPos) = 0;
   1.922 +	/**
   1.923 +	 Callback to notify that a node has had one of its boolean attributes changed.
   1.924 +	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
   1.925 +	 @param aFlag The attribute that has changed.
   1.926 +	 @param aNewValue The new value for the attribute. */
   1.927 +	virtual void FlagChanged(const MWsWindowTreeNode& aWindowTreeNode, TFlags aFlag, TBool aNewValue) = 0;
   1.928 +	/**
   1.929 +	 Callback to notify that a node has had one of its non-boolean attributes changed.
   1.930 +	 @param aWindowTreeNode Use to identify the affected node and query the new value of the changed attribute.
   1.931 +	 @param aAttribute The attribute that has changed. */
   1.932 +	virtual void AttributeChanged(const MWsWindowTreeNode& aWindowTreeNode, TAttributes aAttribute) = 0;
   1.933 +	/**
   1.934 +	 Callback to notify that a window's fade count has been changed.
   1.935 +	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
   1.936 +	 @param aFadeCount Zero means the window is not faded, an integer > 0 means 
   1.937 +	 					faded if absolute fading is used, or the number of times 
   1.938 +	 					SetFaded has been called if using counting fade. */
   1.939 +	virtual void FadeCountChanged(const MWsWindowTreeNode& aWindowTreeNode, TInt aFadeCount) = 0;
   1.940 +	/**
   1.941 +	 Callback to notify that the user defined transparent region of a window has changed. 
   1.942 +	 This information is for optimisation purpose only, the rendering engine don't need 
   1.943 +	 to do a full back-to-front rendering behind the opaque region. 
   1.944 +	 @param aWindowTreeNode  Use to query attributes of the node that has been changed.
   1.945 +	 @param aNewTransparentRegion   The transparent region defined by the user. Coordinates 
   1.946 +	 								are relative the window's origin.
   1.947 +	 @param aNewOpaqueRegion 	The inverse of aNewTransparentRegion.  Coordinates are 
   1.948 +	 							relative the window's origin. */	
   1.949 +	virtual void TransparentRegionChanged(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aNewTransparentRegion, const TRegion* aNewOpaqueRegion) = 0;
   1.950 +	/**
   1.951 +	 Callback to notify that a element has been added to this window.
   1.952 +	 The render stages implementing this interface know when elements are added or removed through MWsElement interface.
   1.953 +	 The purpose of the ElementAdded API is only to enable render stages to make an association between the element and the window.
   1.954 +	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
   1.955 +	 @param aElement Use to query attributes of the new element. */
   1.956 +	virtual void ElementAdded(const MWsWindowTreeNode& aWindowTreeNode, const MWsElement& aElement) = 0;
   1.957 +	/**
   1.958 +	 Callback to notify that a window has been moved to another window group.
   1.959 +	 @param aWindowTreeNode Use to query attributes of the node that has been moved.
   1.960 +	 @param aNewWindowGroupNode The window group aWindowTreeNode has been moved to. 
   1.961 +	 @see RWindowBase::MoveToGroup */
   1.962 +	virtual void MovedToWindowGroup(const MWsWindowTreeNode& aWindowTreeNode, const MWsWindowTreeNode& aNewWindowGroupNode) = 0;
   1.963 +	/**
   1.964 +	 Callback to notify that a window group chain has been formed or extended.
   1.965 +	 @param aParent The window group node to which a child has been attached.
   1.966 +	 @param aChild The window group node that has been attached to aParent. */
   1.967 +	virtual void WindowGroupChained(const MWsWindowTreeNode& aParent, const MWsWindowTreeNode& aChild) = 0;
   1.968 +	/**
   1.969 +	 Callback to notify that a window group chain has been broken. 
   1.970 +	 Special case: Deleting a window group that is part of a chain will break all chaining 
   1.971 +	 after the deleted window group and a notification for each node being dequed will be sent.
   1.972 +	 @param aWindowGroupNode The window group chain is broken directly after this window group. */
   1.973 +	virtual void WindowGroupChainBrokenAfter(const MWsWindowTreeNode& aWindowGroupNode) = 0;
   1.974 +	/**
   1.975 +	 Callback to notify that all nodes below aWindowTreeNode should be drawn faded,
   1.976 +	 unless they have the ENonFading flag set. 
   1.977 +	 This API is primarily used in conjunction with application frameworks that uses 
   1.978 +	 absolute fading rather than counting fade.
   1.979 +	 @param aWindowTreeNode Typically a root window, for which all children should have their
   1.980 +	 					fade state set to aFaded.
   1.981 +	 @param aFaded The new fade state to apply. ETrue means faded, EFalse not faded. */
   1.982 +	virtual void FadeAllChildren(const MWsWindowTreeNode& aWindowTreeNode, TBool aFaded) = 0;
   1.983 +	};
   1.984 +
   1.985 +/** 
   1.986 +An interface optionally provided by render stages, to observe which node in 
   1.987 +the window tree structure that is being rendered.
   1.988 +
   1.989 +Text cursors and sprites (floating or non) are annotated by the same APIs.
   1.990 +
   1.991 +@publishedPartner
   1.992 +@prototype
   1.993 +*/
   1.994 +class MWsDrawAnnotationObserver : public MWsObjectProvider
   1.995 +	{
   1.996 +public:	
   1.997 +	DECLARE_WS_TYPE_ID(KMWsDrawAnnotationObserver)
   1.998 +	virtual void WindowRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
   1.999 +	virtual void WindowRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
  1.1000 +	virtual void WindowAnimRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
  1.1001 +	virtual void WindowAnimRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
  1.1002 +	virtual void SpriteRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
  1.1003 +	virtual void SpriteRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
  1.1004 +	virtual void SpriteFlash(const MWsWindowTreeNode& aWindowTreeNode, TBool aFlashOn) = 0;
  1.1005 +	virtual void SegmentRedrawStart(const TRegion& aRegion) = 0;
  1.1006 +	virtual void SegmentRedrawEnd() = 0;
  1.1007 +	};
  1.1008 +
  1.1009 +/** 
  1.1010 +Implemented by a WSERV screen to respond to window visibility change notifications sent
  1.1011 +by a render stage implementing MWsWindowVisibilityNotifier.
  1.1012 +
  1.1013 +Immediately after WSERV sucessfully obtains a pointer to MWsWindowVisibilityNotifier, 
  1.1014 +WSERV will call MWsWindowVisibilityNotifier::RegisterWindowVisibilityObserver()
  1.1015 +to provide a means for the render stage to notify WSERV, when window visibility changes.
  1.1016 +
  1.1017 +@see MWsWindowVisibilityNotifier
  1.1018 +
  1.1019 +@publishedPartner
  1.1020 +@prototype
  1.1021 +*/
  1.1022 +class MWsWindowVisibilityObserver
  1.1023 +	{
  1.1024 +public:
  1.1025 +	/** 
  1.1026 +	Called by the render stage to indicate a window's visible region has changed.
  1.1027 +	After this method has been called, it does not need to be called again until
  1.1028 +	after WSERV calls SendVisibilityChanges.
  1.1029 +	@see MWsWindowVisibilityNotifier::SendVisibilityChanges
  1.1030 +	*/
  1.1031 +	virtual void VisibilityChanged() = 0;
  1.1032 +
  1.1033 +	/**
  1.1034 +	Called by the render stage to update a window's visible region.
  1.1035 +	@param aWindow The window whose visible region has changed.
  1.1036 +	@param aVisibleRegion Region of the window not obscured by a fully opaque window. Part of this region could potentially still
  1.1037 +	be obscured by opaque parts of translucent windows on top of aWindow.
  1.1038 +	*/
  1.1039 +	virtual void SetWindowVisibility(const MWsWindow& aWindow, const TRegion& aVisibleRegion) = 0;
  1.1040 +	};
  1.1041 +
  1.1042 +/** 
  1.1043 +This interface may be implemented by a render stage wishing to take over responsibility
  1.1044 +from WSERV, for updating a window's visible region.
  1.1045 +For example, if a render stage introduces non-WSERV visuals which overlap WSERV windows, WSERV may
  1.1046 +need to receive updated window visibility information.
  1.1047 +
  1.1048 +Immediately after sucessfully obtaining this interface, WSERV will call RegisterWindowVisibilityObserver
  1.1049 +to provide a means for the render stage to notify WSERV when window visibility changes.
  1.1050 +
  1.1051 +@see MWsWindowVisibilityObserver
  1.1052 +
  1.1053 +@publishedPartner
  1.1054 +@prototype
  1.1055 +*/
  1.1056 +class MWsWindowVisibilityNotifier : public MWsObjectProvider
  1.1057 +	{
  1.1058 +public:	
  1.1059 +	DECLARE_WS_TYPE_ID(KMWsWindowVisibilityNotifier)
  1.1060 +
  1.1061 +	/** 
  1.1062 +	Register to be notified when window visibility changes.
  1.1063 +	@param aWindowVisibilityObserver Observer to be notified.
  1.1064 +	*/
  1.1065 +	virtual void RegisterWindowVisibilityObserver(MWsWindowVisibilityObserver* aWindowVisibilityObserver) = 0;
  1.1066 +
  1.1067 +	/** 
  1.1068 +	Register to be notified when visibility of a specific window changes.
  1.1069 +	After registering a window, the render stage must immediately provide the
  1.1070 +	current visible region by calling VisibilityChanged() and later, in response
  1.1071 +	to SendVisibilityChanges, call SetWindowVisibility.
  1.1072 +	RegisterWindow and UnregisterWindow are symmetrical operations. For each
  1.1073 +	call to RegisterWindow, there will follow exactly one call to UnregisterWindow.
  1.1074 +	@param aWindow Window for which WSERV needs accurate visibility information.
  1.1075 +	@see MWsWindowVisibilityObserver
  1.1076 +	*/
  1.1077 +	virtual void RegisterWindow(const MWsWindow& aWindow) = 0;
  1.1078 +
  1.1079 +	/** 
  1.1080 +	Stops visibility notifications being sent for the specified window.
  1.1081 +	RegisterWindow and UnregisterWindow are symmetrical operations. For each
  1.1082 +	call to RegisterWindow, there will follow exactly one call to UnregisterWindow.
  1.1083 +	@param aWindow Window for which visibility notifications are no longer required.
  1.1084 +	*/
  1.1085 +	virtual void UnregisterWindow(const MWsWindow& aWindow) = 0;
  1.1086 +
  1.1087 +	/** 
  1.1088 +	Asks the render stage to call SetWindowVisibility for each window whose
  1.1089 +	visible region has changed.
  1.1090 +	All visible region changes must be sent before this method returns.
  1.1091 +	@see MWsWindowVisibilityObserver
  1.1092 +	*/
  1.1093 +	virtual void SendVisibilityChanges() = 0;
  1.1094 +	};
  1.1095 +
  1.1096 +/** This is an extension of the MWsScreen interface for handling the
  1.1097 +animation aspects of the redraw sequence.
  1.1098 +
  1.1099 +@publishedPartner
  1.1100 +@prototype
  1.1101 +*/
  1.1102 +class MWsScreenRedraw: public MWsObjectProvider
  1.1103 +	{
  1.1104 +public:
  1.1105 +	DECLARE_WS_TYPE_ID(KWsScreenRedraw)
  1.1106 +	/**Sets the screen redraw observer. 
  1.1107 +	@param aObserver
  1.1108 +	*/
  1.1109 +	virtual void SetObserver(MWsScreenRedrawObserver* aObserver) = 0;
  1.1110 +	/** Checks if there is a redraw in progress or scheduled to take place.
  1.1111 +	@return Returns ETrue if there is an update pending.
  1.1112 +	*/	
  1.1113 +	virtual TBool IsUpdatePending() = 0;
  1.1114 +	/** Gets the current time according to the animation scheduler
  1.1115 +	@return The current time as a TTime reference.
  1.1116 +	*/
  1.1117 +	virtual const TTime& Now() const = 0;
  1.1118 +	/** Schedule a render of the screen without requesting any area of it
  1.1119 +	to be redrawn.  Effectively, request a rerun of the render stages.
  1.1120 +	@param aFromNow The time from now, in microseconds, to perform the render.
  1.1121 +	*/
  1.1122 +	virtual void ScheduleRender(const TTimeIntervalMicroSeconds& aFromNow) = 0;
  1.1123 +	/** Gets the the animation region for this screen redraw.
  1.1124 +	@return the Region being redrawn during the animation
  1.1125 +	*/
  1.1126 +	virtual const TRegion * AnimationRegion() const = 0;
  1.1127 +	/** Updates the screen device to reflect any animation changes
  1.1128 +	*/
  1.1129 +	virtual void UpdateDevice() = 0;
  1.1130 +	};
  1.1131 +	
  1.1132 +/** This is part of the MWsScreenRedraw interface
  1.1133 +
  1.1134 +@publishedPartner
  1.1135 +@prototype
  1.1136 +*/
  1.1137 +class MWsScreenRedrawObserver: public MWsObjectProvider
  1.1138 +	{
  1.1139 +public:
  1.1140 +	DECLARE_WS_TYPE_ID(KWsScreenRedrawObserver)
  1.1141 +	/** Callback function that gets called after the completion of every redraw sequence.
  1.1142 +	@see MWsScreenRedraw::SetObserver
  1.1143 +	@publishedPartner
  1.1144 +	@prototype
  1.1145 +	*/
  1.1146 +	virtual void ScreenUpdated(TInt aScreenNumber) = 0;
  1.1147 +	};
  1.1148 +
  1.1149 +/** This is part of the MGraphicDrawerInterface
  1.1150 +
  1.1151 +@publishedPartner
  1.1152 +@prototype
  1.1153 +*/
  1.1154 +class MWsMemoryRelease : public MWsObjectProvider
  1.1155 +	{
  1.1156 +public:
  1.1157 +	DECLARE_WS_TYPE_ID(KMWsMemoryRelease)
  1.1158 +	enum TMemoryReleaseLevel
  1.1159 +		{
  1.1160 +		ELow,
  1.1161 +		EMedium,
  1.1162 +		EHigh
  1.1163 +		};
  1.1164 +	/** This function is called on registered memory release objects whenever there
  1.1165 +	is insufficient memory available to honour an Alloc or ReAlloc in the window server
  1.1166 +	process.  It may be called up to three times, once for each level defined in TLevel.
  1.1167 +	The meaning of each level is open to interpretation by individual implementations.
  1.1168 +	@see MGraphicDrawerEnvironment::RegisterMemoryRelease
  1.1169 +	@param aLevel 
  1.1170 +	@return ETrue to indicate that memory was freed, EFalse otherwise.
  1.1171 +	@publishedPartner
  1.1172 +	@prototype
  1.1173 +	*/
  1.1174 +	virtual TBool ReleaseMemory(TMemoryReleaseLevel aLevel) = 0;
  1.1175 +	};
  1.1176 +
  1.1177 +#if !defined(SYMBIAN_GRAPHICS_GCE)
  1.1178 +/** This is an extension of the MWsGc.  This interface is not used in
  1.1179 +non-NGA configurations.  It has been removed from NGA configurations.
  1.1180 +
  1.1181 +@see MWsGc
  1.1182 +@publishedPartner
  1.1183 +@prototype
  1.1184 +*/
  1.1185 +class MWsGcClipRect : public MWsObjectProvider
  1.1186 +	{
  1.1187 +public:
  1.1188 +	DECLARE_WS_TYPE_ID(KMWsGcClipRect)
  1.1189 +	/** Sets a master clipping rectangle on the GC.  This will combine with any clipping rectangles
  1.1190 +	specified by the client.
  1.1191 +	@param aRect
  1.1192 +	*/
  1.1193 +	virtual void SetClipRect(TRect aRect) = 0;
  1.1194 +	/** Resets the master clipping rectangle specified in SetMasterClipRect
  1.1195 +	*/
  1.1196 +	virtual void ResetClipRect() = 0;
  1.1197 +	/** Returns the combined clipping rectangle.
  1.1198 +	@param aRect this is set to the clipping rectangle
  1.1199 +	@param aSet this is true if there is a clipping rectangle in effect
  1.1200 +	*/
  1.1201 +	virtual void GetClipRect(TRect & aRect, TBool & aSet) = 0;
  1.1202 +	};
  1.1203 +#endif
  1.1204 +
  1.1205 +/** DebugBarDrawer interface
  1.1206 +     
  1.1207 +@publishedPartner
  1.1208 +@prototype
  1.1209 +*/
  1.1210 +class MWsDebugBar : public MWsObjectProvider
  1.1211 +	{
  1.1212 +public:
  1.1213 +	DECLARE_WS_TYPE_ID(KMWsDebugBar)
  1.1214 +	
  1.1215 +public:
  1.1216 +	/**
  1.1217 +	 * Prints a debug information bar overlaid at the top the screen.
  1.1218 +	 * 
  1.1219 +	 * @param aDebugText An array of text lines.
  1.1220 +	 */
  1.1221 +	virtual void DrawDebugBar(const TArray<TPtrC>& aDebugText)=0;
  1.1222 +	};
  1.1223 +
  1.1224 +/** This is an extension of MWsGc and provides plugin fading capabilities for wserv.
  1.1225 +    Default implementation of the plugin uses bitgdi fade. 
  1.1226 +    
  1.1227 +@see MWsGc
  1.1228 +@publishedPartner
  1.1229 +@prototype
  1.1230 +*/
  1.1231 +class MWsFader : public MWsObjectProvider
  1.1232 +	{
  1.1233 +public:
  1.1234 +	DECLARE_WS_TYPE_ID(KMWsFader)
  1.1235 +	
  1.1236 +public:
  1.1237 +	/** Sets any parameters for the fade.
  1.1238 +	@param aData Descriptor containing the fade parameters
  1.1239 +	*/
  1.1240 +	virtual void SetFadingParameters(const TDesC8& aData)=0;
  1.1241 +#if !defined(SYMBIAN_GRAPHICS_GCE)
  1.1242 +	/** Perform a fade of the specified region
  1.1243 +	@param aBitGc CFbsBitGc to perform the fading with.
  1.1244 +	@param aRegion TRegion containing the region that the fading is to be performed on.
  1.1245 +	*/
  1.1246 +	virtual void FadeArea(CFbsBitGc* aBitGc,const TRegion * aRegion)=0;
  1.1247 +#else
  1.1248 +	/** Perform a fade of the specified region
  1.1249 +	@param aRegion TRegion containing the region that the fading is to be performed on.
  1.1250 +	*/
  1.1251 +	virtual void FadeArea(const TRegion& aRegion)=0;
  1.1252 +#endif
  1.1253 +	};
  1.1254 +
  1.1255 +/** Plugin Manager Interface
  1.1256 +@publishedPartner
  1.1257 +@prototype
  1.1258 +*/	
  1.1259 +class MWsPluginManager : public MWsObjectProvider
  1.1260 +	{
  1.1261 +public:
  1.1262 +	DECLARE_WS_TYPE_ID(KMWsPluginManager)
  1.1263 +	
  1.1264 +	/** Resolve an instance of an interface
  1.1265 +	@param aTypeId
  1.1266 +	*/
  1.1267 +	virtual TAny* ResolvePluginInterface(TUint aTypeId) = 0;
  1.1268 +	};
  1.1269 +	
  1.1270 +/** An Interface to allow CRP's and CWsPlugins to access the wserv ini file
  1.1271 +@publishedPartner
  1.1272 +@prototype
  1.1273 +*/
  1.1274 +class MWsIniFile : public MWsObjectProvider
  1.1275 +	{
  1.1276 +public:
  1.1277 +	DECLARE_WS_TYPE_ID(KMWsIniFile)
  1.1278 +	
  1.1279 +	/** Find the value of the specified variable if present in the window server ini file.
  1.1280 +	@param aVarName TDesC containing the name of the variable to find.
  1.1281 +	@param aResult TPtrC that gets set to the value of the ini variable.
  1.1282 +	@return ETrue if ini file variable found
  1.1283 +	*/
  1.1284 +	virtual TBool FindVar(const TDesC &aVarName, TPtrC &aResult) = 0;
  1.1285 +
  1.1286 +	/** Find the value of the specified variable if present in the window server ini file.
  1.1287 +	@param aVarName TDesC containing the name of the variable to find
  1.1288 +	@param aResult TInt that gets set to the value of the ini variable
  1.1289 +	@return ETrue if ini file variable found
  1.1290 +	*/
  1.1291 +	virtual TBool FindVar(const TDesC &aVarName, TInt &aResult) = 0;
  1.1292 +
  1.1293 +	/** Find if the variable is present in the ini file
  1.1294 +	@param aVarName TDesC containing the name of the variable to find
  1.1295 +	@return ETrue if ini file variable found
  1.1296 +	*/
  1.1297 +	virtual TBool FindVar(const TDesC &aVarName) = 0;
  1.1298 +
  1.1299 +	/** Find if the variable is present in the [SCREENx] section
  1.1300 +	@param aScreen TInt containing the screen number
  1.1301 +	@param aVarName TDesC containing the name of the variable to find
  1.1302 +	@return ETrue if ini file variable found
  1.1303 +	*/
  1.1304 +	virtual TBool FindVar( TInt aScreen, const TDesC &aVarName) = 0;
  1.1305 +
  1.1306 +	/** Find the value of the specified variable if present in the [SCREENx] section of the ini file
  1.1307 +	@param aScreen TInt containing the screen number
  1.1308 +	@param aVarName TDesC containing the name of the variable to find
  1.1309 +	@param aResult TInt that gets set to the value of the ini variable
  1.1310 +	@return ETrue if ini file variable found
  1.1311 +	*/
  1.1312 +	virtual TBool FindVar( TInt aScreen, const TDesC &aVarName, TInt &aResult) = 0;
  1.1313 +
  1.1314 +	/** Find the value of the specified variable if present in the [SCREENx] section of the ini file
  1.1315 +	@param aScreen TInt containing the screen number
  1.1316 +	@param aVarName TDesC containing the name of the variable to find
  1.1317 +	@param aResult TPtrC that gets set to the value of the ini variable.
  1.1318 +	@return ETrue if ini file variable found
  1.1319 +	*/
  1.1320 +	virtual TBool FindVar( TInt aScreen, const TDesC& aVarName, TPtrC &aResult) = 0;
  1.1321 +
  1.1322 +	/** Find if the specified variable is present in the named section of the ini file
  1.1323 +	@param aSection TDesC containing the name of the section 
  1.1324 +	@param aVarName TDesC containing the name of the variable to find
  1.1325 +	@return ETrue if ini file variable found
  1.1326 +	*/
  1.1327 +	virtual TBool FindVar(const TDesC& aSection, const TDesC &aVarName) = 0;
  1.1328 +	
  1.1329 +	/** Find the value of the specified variable in the named section of the ini file.
  1.1330 +	@param aSection TDesC containing the name of the section 
  1.1331 +	@param aVarName TDesC containing the name of the variable to find
  1.1332 +	@param aResult TInt that gets set to the value of the ini variable
  1.1333 +	@return ETrue if ini file variable found
  1.1334 +	*/
  1.1335 +	virtual TBool FindVar(const TDesC& aSection, const TDesC &aVarName, TInt &aResult) = 0;
  1.1336 +
  1.1337 +	/** Find the value of the specified variable in the named section of the ini file.
  1.1338 +	@param aSection TDesC containing the name of the section 
  1.1339 +	@param aVarName TDesC containing the name of the variable to find
  1.1340 +	@param aResult TPtrC that gets set to the value of the ini variable.
  1.1341 +	@return ETrue if ini file variable found
  1.1342 +	*/
  1.1343 +	virtual TBool FindVar(const TDesC& aSection, const TDesC& aVarName, TPtrC &aResult) = 0;
  1.1344 +	};
  1.1345 +
  1.1346 +/** An interface that allows CRP's and CWsPlugin derived objects to handle events like anim dll's
  1.1347 +@publishedPartner
  1.1348 +@prototype
  1.1349 +*/
  1.1350 +class MWsRawEventServer : public MWsObjectProvider
  1.1351 +	{
  1.1352 +public:
  1.1353 +	DECLARE_WS_TYPE_ID(KMWsRawEventServer)
  1.1354 +
  1.1355 +	/** Register to be notified when some kernel events occur.
  1.1356 +	@return KErrNone if successful
  1.1357 +	@prototype */
  1.1358 +	virtual TInt RegisterRawEventHandler(MEventHandler* aHandler) = 0;
  1.1359 +	/** Unregister from events notification
  1.1360 +	@prototype */
  1.1361 +	virtual void UnregisterRawEventHandler(MEventHandler* aHandler) = 0;
  1.1362 +	/** Creates a new raw event
  1.1363 +	@prototype */
  1.1364 +	virtual void PostRawEvent(const TRawEvent & aEvent) = 0;
  1.1365 +	/** Creates a new key event
  1.1366 +	@prototype */
  1.1367 +	virtual void PostKeyEvent(const TKeyEvent & aEvent) = 0;
  1.1368 +	};
  1.1369 +
  1.1370 +#endif //#ifndef __WSGRAPHICDRAWERINTEFACE_H__