windowing/windowserver/inc/Graphics/openwfc/WSGRAPHICDRAWERINTERFACE.H
changeset 0 5d03bc08d59c
child 26 15986eb6c500
child 45 36b2e23a8629
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // WSGRAPHICDRAWERINTEFACE.H
       
    15 // Server-side base-classes for graphic drawer plugins
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef __WSGRAPHICDRAWERINTEFACE_H__
       
    20 #define __WSGRAPHICDRAWERINTEFACE_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <w32std.h>
       
    24 #include <gdi.h>
       
    25 #include <bitstd.h>
       
    26 
       
    27 class CWsGraphicDrawer;
       
    28 struct TGraphicDrawerId;
       
    29 class MWsEventHandler;
       
    30 class CWsGraphicMessageQueue;
       
    31 class CWsClient;
       
    32 class CWsWindow;
       
    33 
       
    34 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
    35 	class MWsFlickerFreeBufferObserver;
       
    36 #endif
       
    37 
       
    38 class MWsScreenRedrawObserver;
       
    39 class MWsMemoryRelease;
       
    40 class MEventHandler;
       
    41 class MWsElement;
       
    42 class MWsGraphicsContext;
       
    43 
       
    44 /** 
       
    45 @publishedPartner
       
    46 @released
       
    47 */
       
    48 enum TWinType
       
    49 	{
       
    50 	EWinTypeClient,
       
    51 	EWinTypeRoot,
       
    52 	EWinTypeGroup,
       
    53 	};
       
    54 
       
    55 /** Declares an object type, ETypeId, for a class, in order to allow the WSERV object
       
    56 provider mechanism to locate and provide objects from the class.
       
    57 @publishedPartner
       
    58 @released
       
    59 @see MWsObjectProvider */
       
    60 #define DECLARE_WS_TYPE_ID(id) enum { EWsObjectInterfaceId = id };
       
    61 
       
    62 class MWsObjectProvider
       
    63 /** A class for dynamic extension of object instances
       
    64 	WSERV classes which wish to allow dynamic extension show derive those
       
    65 	extensions from MWsObjectProvider and use the DECLARE_WS_TYPE_ID macro
       
    66 	Similiar in principle and operation to CONE's MObjectProvider
       
    67 	@publishedPartner
       
    68 	@released
       
    69 	@see MObjectProvider
       
    70 */	{
       
    71 public:
       
    72 	template<class T>
       
    73 	T* ObjectInterface()
       
    74 	/** Gets an object of the type defined by the template parameter.
       
    75 
       
    76 	@return A pointer to an object of the type required, or NULL if none can be
       
    77 	found. */
       
    78 		{ return (T*)ResolveObjectInterface(T::EWsObjectInterfaceId); }
       
    79 	/** Gets an object of the type defined by the template parameter.
       
    80 	@return A pointer to a const object of the type required, or NULL if none can be
       
    81 	found. */
       
    82 	template<class T>
       
    83 	const T* ObjectInterface() const
       
    84 		{ return (T*)const_cast<MWsObjectProvider*>(this)->ResolveObjectInterface(T::EWsObjectInterfaceId); }
       
    85 	/** Resolve an instance of an interface
       
    86 	should be overriden by implementations when they have custom interfaces to provide. */
       
    87 	IMPORT_C virtual TAny* ResolveObjectInterface(TUint aTypeId);
       
    88 	};
       
    89 
       
    90 class MWsScreen: public MWsObjectProvider
       
    91 /** A destination for a drawing occasion of a CWsGraphicDrawer
       
    92 	Used by animation schedulers to update screens
       
    93 	@publishedPartner
       
    94 	@released
       
    95 */	{
       
    96 public:
       
    97 	using MWsObjectProvider::ResolveObjectInterface;
       
    98 	
       
    99 private:
       
   100 	friend class MWsAnimationScheduler;
       
   101 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
   102 	/** Called by the MWsAnimationScheduler when scheduled animation is to be serviced
       
   103 		
       
   104 		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   105 
       
   106 		@released */
       
   107 	virtual void OnAnimation() = 0;
       
   108 #else
       
   109 	/** Called by the MWsAnimationScheduler when a scheduled animation is to be serviced.
       
   110 		@param aFinished If not NULL then this is signalled when the animation has 
       
   111 		been processed and further animations may be submitted. An animation may be
       
   112 		submitted prior to signalling, but the render stage pipeline may not be ready
       
   113 		to process it. 
       
   114 		
       
   115 		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   116 
       
   117 		@released */
       
   118 	virtual void OnAnimation(TRequestStatus* aFinished) = 0;
       
   119 #endif
       
   120 	/** Called by the MWsAnimationScheduler when the screen needs to be redrawn in its entirity
       
   121 		
       
   122 		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   123 
       
   124 		@released */
       
   125 	virtual void Redraw() = 0;
       
   126 	/** Called by MWsAnimationScheduler when the any parts of the screen that potentially contain
       
   127 		commands to draw graphics in the list of IDs passed need to be redrawn
       
   128 		@param aInvalid the list of IDs that are invalid
       
   129 		@return whether the screen did any redrawing
       
   130 		
       
   131 		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   132 
       
   133 		@released */
       
   134 	virtual TBool RedrawInvalid(const TArray<TGraphicDrawerId>& aInvalid) = 0;
       
   135 	};
       
   136 
       
   137 class MWsAnimationScheduler: public MWsObjectProvider
       
   138 /** A system mechanism for customising the animation timer to a particular hardware variant or to a
       
   139 	particular external compositor e.g. an out-of-scene transition engine.
       
   140 	The default animation scheduler in WSERV does not understand device-dependant parameters e.g.
       
   141 	screen refresh rates
       
   142 	@publishedPartner
       
   143 	@released
       
   144 	to be adapted when WSERV migrates to surfaces
       
   145 */	{
       
   146 public:
       
   147 	/** Called to schedule an animation event for a screen to occur not before some point
       
   148 	A screen may be scheduled to animate several times without actually receiving an animation event from the scheduler
       
   149 	If the scheduler cannot honour the request e.g. device constraints, it ignores the request.
       
   150 	@param aScreen the screen to recieve the event
       
   151 	@param aWhen the point in time the event need not occur before
       
   152 	*/
       
   153 	virtual void ScheduleAnimation(MWsScreen& aScreen,const TTime& aWhen) = 0;
       
   154 	/** Called if a screen determines that it no longer needs to schedule any animation
       
   155 	@param aScreen the screen not needing to receive any animation events
       
   156 	*/
       
   157 	virtual void UnscheduleAnimation(MWsScreen& aScreen) = 0;
       
   158 	/** Called to schedule the redrawing of all screens containing this graphic.
       
   159 	The redrawing of affected screens can be deferred by the scheduler.
       
   160 	@param aId the ID of the graphic to be redrawn.  The graphic itself need not exist
       
   161 		(e.g. it has just been deleted, hence the need to redraw all potentially affected screens). */
       
   162 	virtual void Invalidate(const TGraphicDrawerId& aId) = 0;
       
   163 	/** Called when the Window Server receives a TRawEvent::EInactive  event, to signal power-saving */
       
   164 	virtual void OnInactive() = 0;
       
   165 	/** Called when the Window Server receives a TRawEvent::EActive event, to signal screen back on */
       
   166 	virtual void OnActive() = 0;
       
   167 
       
   168 	/** Called to schedule a redraw for a screen which is out of date
       
   169 	A screen may be scheduled to redraw several times without actually receiving aredraw event from the scheduler
       
   170 	If this request is ignored then the screen will be draw incorrectly untill a such a request is not ignored.
       
   171 	@param aScreen the screen to recieve the event
       
   172 	@param aWhen the point in time the event need not occur before
       
   173 	*/
       
   174 	virtual void ScheduleRedraw(MWsScreen& aScreen,const TTime& aWhen) = 0;
       
   175 	/** Called to force a previously scheduled redraw for a screen to happen synchronously
       
   176 	Used when we are about to loose our ability to perform the redraw correctly.
       
   177 	@param aScreen the screen to recieve the event
       
   178 	*/
       
   179 	virtual void DoRedrawNow(MWsScreen& aScreen) = 0;
       
   180 
       
   181 protected:
       
   182 	IMPORT_C void Animate(MWsScreen& aScreen);
       
   183 	IMPORT_C void Animate(MWsScreen& aScreen, TRequestStatus* aFinished);
       
   184 	IMPORT_C void Redraw(MWsScreen& aScreen);
       
   185 	IMPORT_C TBool RedrawInvalid(MWsScreen& aScreen,const TArray<TGraphicDrawerId>& aInvalid);
       
   186 	};
       
   187 
       
   188 /**
       
   189 @publishedPartner
       
   190 @prototype
       
   191 */
       
   192 class CWsMessageData : public CBase, public MWsObjectProvider
       
   193 	{
       
   194 public:
       
   195 	virtual TPtrC8 Data() const = 0;
       
   196 	virtual void Release() = 0;
       
   197 	IMPORT_C TInt ClientHandle() const;
       
   198 	IMPORT_C TInt Id() const;
       
   199 	IMPORT_C const CWsGraphicDrawer* Drawer();
       
   200 	IMPORT_C void SetClientHandle(TInt aClientHandle);
       
   201 	IMPORT_C void SetId( TInt aId);
       
   202 	IMPORT_C void SetDrawer(const CWsGraphicDrawer* aDrawer);
       
   203 private:
       
   204 	friend class CWsGraphicMessageQueue;
       
   205 	friend class CWsClient;
       
   206 	CWsMessageData* iNext;
       
   207 	const CWsGraphicDrawer* iDrawer;
       
   208 	TInt iId;
       
   209 	TInt iClientHandle;
       
   210 	TInt iMWsMessageDataSpare[3];
       
   211 	};
       
   212 
       
   213 class MWsClient: public MWsObjectProvider
       
   214 /*** Represents a client session
       
   215 	@publishedPartner 
       
   216 	@released  */
       
   217 	{
       
   218 public:
       
   219 	/** Determines if this client has the specified capability */
       
   220 	virtual TBool HasCapability(TCapability aCapability) const = 0;
       
   221 	/** Retrieves the Secure ID of the client's process */
       
   222 	virtual TSecureId SecureId() const = 0;
       
   223 	/** Retrieves the Vendor ID of the client's process */
       
   224 	virtual TVendorId VendorId() const = 0;
       
   225 private:
       
   226 	friend class CWsGraphicDrawer;
       
   227 	virtual TInt SendMessage(const CWsGraphicDrawer* aOnBehalfOf,const TDesC8& aData) = 0;
       
   228 	virtual TInt SendMessage(const CWsGraphicDrawer* aOnBehalfOf,CWsMessageData& aData) = 0;
       
   229 	};
       
   230 
       
   231 class MWsGraphicDrawerEnvironment: public MWsObjectProvider
       
   232 /** The environment for a graphic drawer
       
   233 @publishedPartner
       
   234 @released
       
   235 */	{
       
   236 public:
       
   237 	/** Locate a graphic by ID
       
   238 	@return the graphic with that ID, else NULL if no such graphic exists */
       
   239 	virtual const CWsGraphicDrawer* ResolveGraphic(const TGraphicDrawerId& aId) const = 0;
       
   240 	/** The number of screens the device has; this is constant for a device */
       
   241 	virtual TInt ScreenCount() const = 0;
       
   242 	/** Get a particular screen by ordinal
       
   243 	@return the screen, or NULL if aIndex is out of bounds */
       
   244 	virtual MWsScreen* Screen(TInt aIndex) = 0;
       
   245 	/** Get a particular screen by ordinal
       
   246 	@return the screen, or NULL if aIndex is out of bounds */
       
   247 	virtual const MWsScreen* Screen(TInt aIndex) const = 0;
       
   248 	/** Set the animation scheduler; this can only be done once by custom code
       
   249 	@return success of overriding the default scheduler */
       
   250 	virtual TBool SetCustomAnimationScheduler(MWsAnimationScheduler* aScheduler) = 0;
       
   251 	/** Query whether a custom animation scheduler has been set
       
   252 	@return ETrue if the custom animation scheduler has been set */
       
   253 	virtual TBool HasCustomAnimationScheduler() const = 0;
       
   254 	/** Clears a custom animation scheduler
       
   255 	@return success if the custom scheduler was set, and hence removed */
       
   256 	virtual TBool ClearCustomAnimationScheduler(MWsAnimationScheduler* aCurrentScheduler) = 0;
       
   257 protected:
       
   258 	friend class CWsGraphicDrawer;
       
   259 	/** Schedules all potentially affected parts of the screen to repaint
       
   260 	This is called automatically whenever a graphic is added, replaced or removed.
       
   261 	However, if a graphic which changes representation during runtime must call this
       
   262 	explicitly.
       
   263 	Note: this is not a suitable method for animating a graphic.  For animation,
       
   264 	use MWsGc::Invalidate when the graphic is being drawn to schedule the next
       
   265 	animation frame instead.
       
   266 	@param aId the ID of the artwork; the artwork may not exist */
       
   267 	virtual void Invalidate(const TGraphicDrawerId& aId) = 0;
       
   268 public:
       
   269 	/** Register to be notified when some events occur.
       
   270 	@return KErrNone if successful */
       
   271 	virtual TInt RegisterEventHandler(CWsGraphicDrawer* aDrawer, MWsEventHandler* aHandler, TUint32 aEventMask) = 0;
       
   272 	/** Unregister from events notification
       
   273 	@return KErrNone if successful */
       
   274 	virtual TInt UnregisterEventHandler(CWsGraphicDrawer* aDrawer) = 0;
       
   275 	/** Register to be notified when some events occur.
       
   276 	@return KErrNone if successful
       
   277 	@prototype */
       
   278 	virtual TInt RegisterWsEventHandler(MWsEventHandler* aHandler, TUint32 aEventMask) = 0;
       
   279 	/** Unregister from events notification
       
   280 	@return KErrNone if successful 
       
   281 	@prototype */
       
   282 	virtual TInt UnregisterWsEventHandler(MWsEventHandler* aHandler) = 0;
       
   283 	/** Logs a message to the wserv logger, if one is loaded
       
   284 	@param aPriority The priority of the message - low priority is 1, high is 9
       
   285 	@param aFmt The string to log.  This may contain a single %d, %x or equivalent
       
   286 	@param aParam An integer parameter corresponding to a %d, if present
       
   287 	@prototype */
       
   288 	virtual void Log(TInt aPriority,const TDesC &aFmt,TInt aParam=0) = 0;
       
   289 	/** Registers an interface for releasing memory in low memory situations.
       
   290 	The release function may be called as a result of any Alloc or ReAlloc attempts in the window server
       
   291 	process.
       
   292 	@param aMemoryRelease a callback interface
       
   293 	@return KErrNone or a system wide error code
       
   294 	@prototype */
       
   295 	virtual TInt RegisterMemoryRelease(MWsMemoryRelease * aMemoryRelease) = 0;
       
   296 	/** Removes a registration set by RegisterMemoryRelease
       
   297 	@param aMemoryRelease the registered release object to remove
       
   298 	@prototype */
       
   299 	virtual void UnregisterMemoryRelease(MWsMemoryRelease * aMemoryRelease) = 0;
       
   300 	};
       
   301 
       
   302 class MWsGc: public MWsObjectProvider
       
   303 /** A destination for a drawing occasion of a CWsGraphicDrawer
       
   304 	Used to register invalidation schedules for animation
       
   305 	@publishedPartner
       
   306 	@released
       
   307 */	{
       
   308 public:
       
   309 	/** The Client requesting this drawing occasion
       
   310 		@return the client
       
   311 		@publishedPartner 
       
   312 		@released  */
       
   313 	virtual MWsClient& Client() = 0;
       
   314 	/** The screen that is currently being drawn to
       
   315 		@return the screen
       
   316 		@publishedPartner 
       
   317 		@released  */
       
   318 	virtual MWsScreen& Screen() = 0;
       
   319 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
   320 	/** The origin of the GC relative to the screen's origin
       
   321 		@return the origin
       
   322 		@publishedPartner
       
   323 		@released  */
       
   324 	virtual TPoint GcOrigin() const = 0;
       
   325 	/** The clipping region currently being used
       
   326 		@return the clipping region
       
   327 		@publishedPartner
       
   328 		@released */
       
   329 	virtual const TRegion& ClippingRegion() = 0;
       
   330 	/** The BITGDI graphics context to draw to
       
   331 		@publishedPartner
       
   332 		@released */
       
   333 	virtual CFbsBitGc& BitGc() = 0;
       
   334 	/** Saves the state of the GC to an internal buffer.  Several GC states can be saved in a FILO.
       
   335 		Do not restore a GC (using PopBitGcSettings()) that wasn't properly saved!
       
   336 		@return KErrNone if successful, else one of the system-wide error codes. */
       
   337 	virtual TInt PushBitGcSettings() = 0;
       
   338 	/** Restores the last GC state that was saved. */
       
   339 	virtual void PopBitGcSettings() = 0;
       
   340 #endif	
       
   341 	/** The time for the current redraw
       
   342 		@publishedPartner 
       
   343 		@released */
       
   344 	virtual const TTime& Now() const = 0;
       
   345 	/** Schedule an animation of a rectangle in the future.
       
   346 	    Scheduled animation doesn't work in low memory conditions or
       
   347 	    if aRect values fall outside the window area of this animation.
       
   348 		@param aRect the rectangle to animate, in the GC's coordinates
       
   349 		@param aFromNow the time in microseconds from Now() that the rectangle will be invalid
       
   350 		@publishedPartner 
       
   351 		@released */
       
   352 	virtual void ScheduleAnimation(const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow) = 0;
       
   353 	/** Schedule an animation of a rectangle in the future
       
   354 		@param aRect the rectangle to animate, in the GC's coordinates
       
   355 		@param aFromNow the time in microseconds from Now() that the rectangle will be invalid
       
   356 		@param aFreq microseconds between frames that this rectangle will probably be invalid in the future (0 means no such hint is known)
       
   357 		@param aStop the duration in microseconds from Now() that the aFreq hint will be valid for (0 means indefinitely)
       
   358 		@publishedPartner 
       
   359 		@released */
       
   360 	virtual void ScheduleAnimation(const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop) = 0;
       
   361 	/** Sets the origin of gc
       
   362 		@param aOrigin The new origin of the gc
       
   363 		@publishedPartner 
       
   364 		@prototype	*/
       
   365 	virtual void SetGcOrigin(const TPoint& aOrigin) = 0;
       
   366 	};
       
   367 
       
   368 /** Interface Extension
       
   369 */
       
   370 enum
       
   371 	{
       
   372 	KMWsScreenConfigInterfaceId = 1,
       
   373 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
   374 	KMWsBackBufferInterfaceId = 2,
       
   375 	KMWsFrontBufferInterfaceId = 3,
       
   376 #endif
       
   377 	KMWsGraphicDrawerMessageAlloc = 4,
       
   378 	KMWsGraphicMessageAlloc = 5,
       
   379 	KWsGraphicHandleSynchronMessageId = 6,
       
   380 	KWsGraphicMessageCallbackInterfaceId = 7,
       
   381 	KWsActiveSchedulerDebug = 8,
       
   382 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
   383 	KWsFlickerFreeBufferObserver = 9,
       
   384 #endif
       
   385 	KMWsWindow = 10,
       
   386 	KWsScreenRedraw = 11,
       
   387 	KWsScreenRedrawObserver = 12,
       
   388 	KCWsRenderStage = 13,
       
   389 	KMWsRenderStageFactory = 14,
       
   390 	KMWsMemoryRelease = 15,
       
   391 #if !defined(SYMBIAN_GRAPHICS_GCE)	
       
   392 	KMWsGcClipRect = 16,
       
   393 #endif	
       
   394 	KMWsFader = 17,
       
   395 	KMWsPluginManager = 18,
       
   396 	KMWsIniFile = 19,
       
   397 	KMWsRawEventServer = 20,
       
   398 	KMWsPlaceSurfaceId = 21,
       
   399 #if defined(SYMBIAN_GRAPHICS_GCE)
       
   400 	KMWsTextCursor = 22,				// CWsRenderStage Object Extension will yield an MWsTextCursor
       
   401 #endif
       
   402 	KMWsGraphicsContext = 23,			// CWsRenderStage Object Extension will yield an MWsGraphicsContext
       
   403 	KMWsCompositionContext = 24,		// CWsRenderStage Object Extension will yield an MWsCompositionContext
       
   404 										// 		MWsCompositionContext::CreateLayer will yield a MWsLayer
       
   405 	KMWsEventHandler = 25,				// CWsRenderStage Object Extension will yield an MWsEventHandler
       
   406 	KMWsScreenDevice = 26,				// CWsRenderStage Object Extension will yield an MWsScreenDevice
       
   407 	KMWsPalette = 27,					// CWsRenderStage Object Extension will optionally yield an MWsPalette
       
   408 #if defined(SYMBIAN_GRAPHICS_GCE)
       
   409 	KMWsUiBufferInterfaceId = 28,		// CWsRenderStage Object Extension will optionally yield an MWsUiBuffer
       
   410 #endif
       
   411 	KMWsDebugBar = 29,					// CWsRenderStage Object Extension will optionally yield an MWsDebugBar
       
   412 	KMWsDrawableSourceProvider = 30,	// CWsRenderStage Object Extension will optionally yield an MWsDrawableSourceProvider
       
   413 	KMWsScreenConfigListInterfaceId = 31,	//MWsScreen can return this list interface
       
   414 	KMWsWindowTreeObserver = 32,        // CWsRenderStage Object Extension will optionally yield an MWsWindowTreeObserver
       
   415 	KMWsDrawAnnotationObserver = 33, 	// CWsRenderStage Object Extension will optionally yield an MWsDrawAnnotationObserver
       
   416 	KMWsWindowVisibilityNotifier = 34, 	// CWsRenderStage Object Extension will optionally yield an MWsWindowVisibilityNotifier
       
   417 	KMWsWindowTree = 35,				// Object Extension to be used by render stages for recovery of MWsWindowTree
       
   418 	KMWsScene = 36,                     // CWsRenderStage Object Extension will yield an MWsScene
       
   419 	                                    //      MWsScene::CreateSceneElement will yield a MWsElement
       
   420 
       
   421 	};
       
   422 
       
   423 class TSurfaceConfiguration;
       
   424 
       
   425 
       
   426 /** Extension to GC to allow surface placement.
       
   427 
       
   428 @publishedPartner
       
   429 @prototype
       
   430 @deprecated
       
   431 
       
   432 NOTE: This interface is deprecated. Do not use!
       
   433 */
       
   434 class MWsSurfacePlacement: public MWsObjectProvider
       
   435 	{
       
   436 	public:
       
   437 	DECLARE_WS_TYPE_ID(KMWsPlaceSurfaceId)
       
   438 	virtual TInt	PlaceSurface(const TSurfaceConfiguration& aConfig)=0;
       
   439 	};
       
   440 
       
   441 /** Current screen mode configuration.Values return from this interface shall not be cached as they
       
   442 can change at anytime when wserv changes its screen mode. Plugin can listen to event EScreenSizeModeChanged
       
   443 to be notified when it happens.
       
   444 
       
   445 @publishedPartner
       
   446 @released
       
   447 */
       
   448 class MWsScreenConfig: public MWsObjectProvider
       
   449 	{
       
   450 public:
       
   451 	DECLARE_WS_TYPE_ID(KMWsScreenConfigInterfaceId)
       
   452 
       
   453 	/** Get screen display mode */
       
   454 	virtual TDisplayMode DisplayMode() const = 0;
       
   455 	/** Get physical screen size in pixels */
       
   456 	virtual TSize SizeInPixels() const = 0;
       
   457 	/** Get screen size in pixels for current screen size mode as defined in wsini */
       
   458 	virtual TSize ScreenModeSizeInPixels() const = 0;
       
   459 	/** Get frame buffer line pitch */
       
   460 	virtual TInt Stride() const = 0;
       
   461 	/** Get screen orientation */
       
   462 	virtual CFbsBitGc::TGraphicsOrientation Orientation() const = 0;
       
   463 	/** Get screen size mode */
       
   464 	virtual TInt SizeMode() const = 0;
       
   465 	/** Get screen scaling factor */
       
   466 	virtual TSize ScalingFactor() const = 0;
       
   467 	/** Get screen origin */
       
   468 	virtual TPoint Origin() const = 0;
       
   469 	/** Get screen scaled origin */
       
   470 	virtual TPoint ScaledOrigin() const = 0;
       
   471 	};
       
   472 
       
   473 /**	Available list of screen modes as specified during start-up.
       
   474  * 	This interface can generally be enquired from the MWsScreen instance.
       
   475  * 	Can be read by render stage to configure its Display Configuration policy.
       
   476  * 	
       
   477  * 	Note that mode list is not contiguous, so methods may leave if missing index is requested.
       
   478  **/
       
   479 class MWsScreenConfigList: public MWsObjectProvider
       
   480 	{
       
   481 public:
       
   482 	DECLARE_WS_TYPE_ID(KMWsScreenConfigListInterfaceId)
       
   483 
       
   484 	enum	TModeFlags
       
   485 		{
       
   486 		EDynamic=			0x00000001,		//"-1,-1"
       
   487 		EHighRes=			0x00000002,		//High-res policy mode
       
   488 		EDisconnected=		0x00000004,		//Mode to use when disconnected
       
   489 		EHalDefault=		0x00000008,
       
   490 		ETwipsSpecified=	0x00000010,
       
   491 		EClientDefinedDigitiserArea=	0x00000020,	
       
   492 		};
       
   493 	
       
   494 	/** Get  list of valid display modes - may be sparse **/
       
   495 	virtual TInt	GetScreenSizeModeList(RArray<TInt>&aList) const =0;
       
   496 	/** Get screen display mode */
       
   497 	virtual TDisplayMode DisplayModeL(TInt aIndex) const = 0;
       
   498 	/** Get screen size in pixels for current screen size mode as defined in wsini */
       
   499 	virtual TSize ScreenModeSizeInPixelsL(TInt aIndex) const = 0;
       
   500 	/** Get screen size in twips for current screen size mode as defined in wsini */
       
   501 	virtual TSize ScreenModeSizeInTwipsL(TInt aIndex) const = 0;
       
   502 	/** Get screen orientation */
       
   503 	virtual CFbsBitGc::TGraphicsOrientation OrientationL(TInt aIndex) const = 0;
       
   504 	/** Get screen orientation */
       
   505 	virtual TInt AvailableOrientationsL(TInt aIndex) const = 0;
       
   506 	/** Get screen scaling factor - note this is expected to stay at 1:1 */
       
   507 	virtual TSize ScalingFactorL(TInt aIndex) const = 0;
       
   508 	/** Get screen origin */
       
   509 	virtual TPoint OriginL(TInt aIndex) const = 0;
       
   510 	/** Get screen scaled origin - note this is expected to stay at 1:1  */
       
   511 	virtual TPoint ScaledOriginL(TInt aIndex) const = 0;
       
   512 	/** Get the modeflags for specified mode  */
       
   513 	virtual TInt ModeFlagsL(TInt aIndex) const = 0;
       
   514 	
       
   515 	};
       
   516 	
       
   517 class MWsWindowTree : public MWsObjectProvider
       
   518 	{
       
   519 public:	
       
   520 	DECLARE_WS_TYPE_ID(KMWsWindowTree)
       
   521 	virtual void SendTree() const = 0;
       
   522 	};
       
   523  
       
   524 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
   525 /** Wserv flickerfree buffer access
       
   526 
       
   527 @publishedPartner
       
   528 @released
       
   529 */
       
   530 class MWsBackBuffer: public MWsObjectProvider
       
   531 	{
       
   532 public:
       
   533 	DECLARE_WS_TYPE_ID(KMWsBackBufferInterfaceId)
       
   534 	/** Get wserv flickerfree buffer bitmap
       
   535 	*/
       
   536 	virtual CFbsBitmap* GetBitmap() = 0;
       
   537 	/** Get default wserv flickerfree buffer drawing context. This will always return the original
       
   538 	context not the current context (e.g. not the redirecting context when it is redirected).
       
   539 	*/
       
   540 	virtual CFbsBitGc* GetBitGc() = 0;
       
   541 	/** Set wserv flickerfree buffer drawing context to redirect its drawing output. Drawing context must
       
   542 	have been activated on a device prior calling this function.
       
   543 	@param aBitGc The context where flickerfree buffer drawing output is redirected to. If it is NULL
       
   544 	the redirection will be cancelled and default drawing context will be restored.
       
   545 	@return KErrNone if successful, otherwise one of system-wide error codes.
       
   546 	*/
       
   547 	virtual TInt SetBitGc(CFbsBitGc* aBitGc) = 0;
       
   548 	/** Redirects drawing to another back buffer. Target back buffer must provide bitmap and drawing context
       
   549 	which has been activated on a bitmap device.
       
   550 	@param aTarget Target back buffer where drawing is redirected to. If it is NULL
       
   551 	the redirection will be terminated.
       
   552 	@return KErrNone if successful, otherwise one of system-wide error codes.
       
   553 	@prototype
       
   554 	*/
       
   555 	virtual TInt RedirectTo(MWsBackBuffer* aTarget) = 0;
       
   556 	
       
   557 	/** Sets the back buffers observer.  The observer will be called just before and just after each
       
   558 	complete sequence of drawing to the back buffer.
       
   559 	@param aObserver The observer handling the callbacks
       
   560 	@prototype
       
   561 	*/
       
   562 	virtual void SetObserver(MWsFlickerFreeBufferObserver* aObserver) = 0;
       
   563 	
       
   564 	/** This returns the observer set by SetObserver.
       
   565 	@return The observer set by SetObserver, or NULL
       
   566 	@prototype
       
   567 	*/
       
   568 	virtual MWsFlickerFreeBufferObserver* Observer() = 0;
       
   569 
       
   570 	/** Get current wserv flickerfree buffer drawing context. This will return the redirected context 
       
   571 	when it is set.
       
   572 	@return The graphics context to use to draw to the flicker buffer directly.
       
   573 	@prototype
       
   574 	*/
       
   575 	virtual CFbsBitGc* GetBitGcCurrent() = 0;
       
   576 	};
       
   577 
       
   578 /** Wserv screen buffer access
       
   579 
       
   580 @publishedPartner
       
   581 @released
       
   582 */
       
   583 class MWsFrontBuffer: public MWsObjectProvider
       
   584 	{
       
   585 public:
       
   586 	DECLARE_WS_TYPE_ID(KMWsFrontBufferInterfaceId)
       
   587 	/** Get pointer to framebuffer
       
   588 	*/
       
   589 	virtual const TAny* GetBits() = 0;
       
   590 	/** Get default wserv screen drawing context. This will always return the original
       
   591 	context not the current context (e.g. not the redirecting context when it is redirected).
       
   592 	*/
       
   593 	virtual CFbsBitGc* GetBitGc() = 0;
       
   594 	/** Set wserv screen drawing context to redirect its drawing output. Drawing context must
       
   595 	have been activated on a device prior calling this function.
       
   596 	@param aBitGc The context where screen drawing output is redirected to. If it is NULL
       
   597 	the redirection will be cancelled and default drawing context will be restored.
       
   598 	@return KErrNone if successful, otherwise one of system-wide error codes.
       
   599 	*/
       
   600 	virtual TInt SetBitGc(CFbsBitGc* aBitGc) = 0;
       
   601 	/** Set wserv screen drawing context to redirect its drawing output and perform fullscreen 
       
   602 	redraw if necessary. Drawing context must have been activated on a device prior calling this 
       
   603 	function.
       
   604 	@param aBitGc The context where screen drawing output is redirected to. If it is NULL
       
   605 	the redirection will be cancelled and default drawing context will be restored.
       
   606 	@param aInvalidateScreen Flag to tell wserv to perform fullscreen redraw or not
       
   607 	@return KErrNone if successful, otherwise one of system-wide error codes.
       
   608 	@prototype
       
   609 	*/
       
   610 	virtual TInt SetBitGc(CFbsBitGc* aBitGc, TBool aInvalidateScreen) = 0;	
       
   611 	
       
   612 	/** Get current wserv screen drawing context. This will return the redirected context 
       
   613 	when it is set.
       
   614 	@prototype
       
   615 	*/
       
   616 	virtual CFbsBitGc* GetBitGcCurrent() = 0;
       
   617 	};
       
   618 #endif // !SYMBIAN_GRAPHICS_GCE
       
   619 
       
   620 /** Optional Memory Allocator for incoming messages
       
   621 	To be implemented by CRPs which want to control large incoming messages themselves
       
   622 
       
   623 @publishedPartner
       
   624 @released
       
   625 */
       
   626 class MWsGraphicDrawerMessageAlloc: public MWsObjectProvider
       
   627 	{
       
   628 public:
       
   629 	DECLARE_WS_TYPE_ID(KMWsGraphicDrawerMessageAlloc)
       
   630 	virtual TAny* Alloc(TInt aSize) = 0;
       
   631 	virtual void Free(TAny* aCell) = 0;
       
   632 	};
       
   633 
       
   634 /** Optional Memory Allocator for incoming messages
       
   635 	To be implemented by CWsGraphics which want to control large incoming messages themselves
       
   636 
       
   637 @publishedPartner
       
   638 @released
       
   639 */
       
   640 class MWsGraphicMessageAlloc: public MWsObjectProvider
       
   641 	{
       
   642 public:
       
   643 	DECLARE_WS_TYPE_ID(KMWsGraphicMessageAlloc)
       
   644 	NONSHARABLE_CLASS(MBuffer): public MWsObjectProvider
       
   645 		{
       
   646 	public:
       
   647 		virtual TPtr8 Buffer() = 0;
       
   648 		virtual void Release() = 0;
       
   649 		};
       
   650 	virtual MBuffer* Alloc(TInt aSize) = 0;
       
   651 	};
       
   652 
       
   653 /** For debug purposes only
       
   654 
       
   655 @publishedPartner
       
   656 @prototype
       
   657 */	
       
   658 class MWsActiveSchedulerDebug: public MWsObjectProvider
       
   659 	{
       
   660 public:
       
   661 	DECLARE_WS_TYPE_ID(KWsActiveSchedulerDebug)
       
   662 	virtual TInt64 Requests() const = 0;
       
   663 	virtual TInt64 Errors() const = 0;
       
   664 	virtual TInt64 Draws() const = 0;
       
   665 	virtual TInt64 Total() const = 0;
       
   666 	virtual TInt64 Preparing() const = 0;
       
   667 	virtual TInt64 Drawing() const = 0;
       
   668 	virtual TInt64 Idle() const = 0;
       
   669 	};
       
   670 
       
   671 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
   672 /** This forms part of the MWsBackBuffer interface
       
   673 
       
   674 @publishedPartner
       
   675 @prototype
       
   676 */
       
   677 class MWsFlickerFreeBufferObserver: public MWsObjectProvider 
       
   678 	{
       
   679 public:	
       
   680 	DECLARE_WS_TYPE_ID(KWsFlickerFreeBufferObserver)
       
   681 	/** Function that gets called before the flicker buffer is updated
       
   682 	@param aBuffer The back buffer that is about to be updated
       
   683 	@param aRegion The region of the back buffer that is about to be updated
       
   684 	*/
       
   685 	virtual void BeforeUpdate(MWsBackBuffer& aBuffer,const TRegion& aRegion) = 0;
       
   686 	/** Function that gets called after the flicker buffer has been updated
       
   687 	@param aBuffer The back buffer that has been updated
       
   688 	@param aRegion The region of the the back buffer that has been updated
       
   689 	*/
       
   690 	virtual void AfterUpdate(MWsBackBuffer& aBuffer,const TRegion& aRegion) = 0;
       
   691 	};
       
   692 #endif // !SYMBIAN_GRAPHICS_GCE
       
   693 
       
   694 /** An interface through which a window can be examined
       
   695 This returns non const copies instead of const references, and the
       
   696 functions themselves are non const.
       
   697 
       
   698 @publishedPartner
       
   699 @prototype
       
   700 */
       
   701 class MWsWindow : public MWsObjectProvider
       
   702 	{
       
   703 public:	
       
   704 	DECLARE_WS_TYPE_ID(KMWsWindow)
       
   705 public:
       
   706 	/** Gets the origin of the window.
       
   707 	@return TPoint containing the origin of the window.
       
   708 	*/
       
   709 	virtual TPoint Origin() const = 0;
       
   710 	/** Gets the windows rect in absolute co-ordinates.
       
   711 	@return TRect
       
   712 	*/
       
   713 	virtual TRect AbsRect() const = 0;
       
   714 	/** Gets the size of the window
       
   715 	@return TSize containing the size of the window
       
   716 	*/
       
   717 	virtual TSize Size() const = 0;
       
   718 	/** Get the window's handle
       
   719 	@return TUint32 containing the window's handle.
       
   720 	*/
       
   721 	virtual TUint32 Handle() const = 0;
       
   722 	/** Invalidate an area of the window.
       
   723 	@param aRect TRect containing the area to invalidate.
       
   724 	*/
       
   725 	virtual void Invalidate(const TRect * aRect = 0) = 0;
       
   726 	/** Get the MWsScreen for this window.
       
   727 	@return A pointer to the MWsScreen that this window is on.
       
   728 	*/
       
   729 	virtual MWsScreen * WsScreen() const = 0;
       
   730 	/** Finds a child of this window by specifiying its handle.
       
   731 	@param aHandle A handle to the window to find.
       
   732 	@return an MWsWindow pointer to the found window
       
   733 	*/
       
   734 	virtual MWsWindow * FindChildByHandle(TUint32 aHandle) = 0;
       
   735 	/**
       
   736 	Returns the ordinal priority of the node. 
       
   737 	*/
       
   738 	virtual TInt OrdinalPriority() const = 0;
       
   739 	/** Get the window's basic area before any clipping is done.
       
   740 	For windows with rounded corners, the window area is different from AbsRect.
       
   741 	@return a reference to the window area 
       
   742 	*/	
       
   743 	virtual const TRegion& WindowArea() const = 0;
       
   744 	};
       
   745 
       
   746 /** 
       
   747 An interface providing information about a window group.
       
   748 @publishedPartner
       
   749 @prototype
       
   750 */
       
   751 class MWsWindowGroup
       
   752 	{
       
   753 public:
       
   754 	virtual TInt Identifier() const = 0;
       
   755 	virtual TPtrC Name() const = 0;
       
   756 	virtual TBool IsFocusable() const = 0;
       
   757 	virtual TInt OrdinalPriority() const = 0;
       
   758 	virtual const MWsClient * Client() const = 0;
       
   759 	};
       
   760 
       
   761 /**
       
   762 An interface through which a sprite can be examined. 
       
   763 @publishedPartner
       
   764 @prototype
       
   765 */
       
   766 class MWsSprite 
       
   767 	{
       
   768 public:
       
   769 	enum TSpriteType
       
   770 		{
       
   771 		EWindowSprite,
       
   772 		EFloatingSprite,
       
   773 		ECustomTextCursorSprite,
       
   774 		EPointerCursorSprite
       
   775 		};
       
   776 public:
       
   777 	virtual TRect Rect() const = 0;
       
   778 	virtual TSpriteType SpriteType() const = 0;
       
   779 	};
       
   780 
       
   781 /**
       
   782 An interface through which a standard text cursor can be examined. 
       
   783 @publishedPartner
       
   784 @prototype
       
   785 */
       
   786 class MWsStandardTextCursor
       
   787 	{
       
   788 public:
       
   789 	/**
       
   790 	Cursor type.
       
   791 	@return The cursor type; either TTextCursor::ETypeRectangle or TTextCursor::ETypeHollowRectangle.
       
   792 	*/
       
   793 	virtual TInt Type() const = 0;
       
   794 	/**
       
   795 	Draw rectangle.
       
   796 	@return Draw rectangle of the cursor in <b>window</b> co-ordinates.
       
   797 	*/
       
   798 	virtual TRect Rect() const = 0;
       
   799 	/**
       
   800 	Clipping rectangle in <b>window</b> co-ordinates.
       
   801 	@return If a clipping rect has been set, the cursor must be drawn clipped to the returned rectangle.
       
   802 	@see MWsWindowTreeObserver::ECursorClipRectSet
       
   803 	*/
       
   804 	virtual TRect ClipRect() const = 0;
       
   805 	/**
       
   806 	Cursor flags.
       
   807 	For possible values, see TTextCursor::EFlags.
       
   808 	Note, only flags included by the mask TTextCursor::EUserFlags are provided.
       
   809 	@see TTextCursor::EFlags
       
   810 	*/
       
   811     virtual TUint Flags() const = 0;
       
   812 	/**
       
   813 	Cursor color.
       
   814 	@return The cursor color.
       
   815 	*/
       
   816 	virtual TRgb Color() const = 0;
       
   817 	/**
       
   818 	Flash time interval.
       
   819 	@return If TTextCursor::EFlagNoFlash is set, zero; otherwise the time interval between cursor flash on/off.
       
   820 	@see MWsStandardTextCursor::Flags()
       
   821 	*/
       
   822 	virtual TTimeIntervalMicroSeconds32 FlashInterval() const = 0;
       
   823 	};
       
   824 
       
   825 
       
   826 /** An interface providing information about a window tree node.
       
   827 @publishedPartner
       
   828 @prototype
       
   829 */
       
   830 class MWsWindowTreeNode
       
   831 	{
       
   832 public:
       
   833 	
       
   834 	enum TType
       
   835 		{
       
   836 		EWinTreeNodeClient = EWinTypeClient,	//0
       
   837 		EWinTreeNodeRoot = EWinTypeRoot,		//1
       
   838 		EWinTreeNodeGroup = EWinTypeGroup,		//2 
       
   839 		EWinTreeNodeAnim = 16,					//3-15 reserved for expansion of TWinType
       
   840 		EWinTreeNodeSprite,
       
   841 		EWinTreeNodeStandardTextCursor,
       
   842 		};
       
   843 	
       
   844 	/** 
       
   845 	 @return The Node Type for this MWsWindowTreeNode. 	 */
       
   846 	virtual TType NodeType() const = 0;
       
   847 	/**
       
   848 	 @return A pointer to a MWsWindow interface only when this 
       
   849 	 MWsWindowTreeNode represents a client window 
       
   850 	 (i.e. node type EWinTreeNodeClient), NULL otherwise. */
       
   851 	virtual const MWsWindow* Window() const = 0;
       
   852 	/**
       
   853 	 @return A pointer to a MWsSprite interface only when this 
       
   854 	 MWsWindowTreeNode represents a sprite, NULL otherwise. */
       
   855 	virtual const MWsSprite* Sprite() const = 0;
       
   856 	/**
       
   857 	 @return A pointer to a MWsStandardTextCursor interface only when this 
       
   858 	 MWsWindowTreeNode represents a standard text cursor, NULL otherwise. */
       
   859 	virtual const MWsStandardTextCursor* StandardTextCursor() const = 0;
       
   860 	/** 
       
   861 	 @return The MWsWindowGroup this MWsWindowTreeNode belongs to, or "this"
       
   862 	 MWsWindowTreeNode object if the NodeType is EWinTreeNodeGroup. Will  
       
   863 	 return NULL if this MWsWindowTreeNode is of type EWinTreeNodeRoot. */
       
   864 	virtual const MWsWindowGroup* WindowGroup() const = 0;
       
   865 	/**
       
   866 	 @return The parent MWsWindowTreeNode. NULL if current node is of type
       
   867 	 EWinTreeNodeRoot. The parent of a floating sprite is the root window. */
       
   868 	virtual const MWsWindowTreeNode* ParentNode() const = 0;
       
   869 	};
       
   870 
       
   871 /** 
       
   872 An interface optionally provided by render stages, to observe changes in 
       
   873 window tree structure, or changes to tree nodes.
       
   874 
       
   875 @publishedPartner
       
   876 @prototype
       
   877 */
       
   878 class MWsWindowTreeObserver : public MWsObjectProvider
       
   879 	{
       
   880 public:	
       
   881 	DECLARE_WS_TYPE_ID(KMWsWindowTreeObserver)
       
   882 	
       
   883 public:
       
   884 	/**
       
   885 	 This enum encapsulates the set of boolean attribute changes that can be observed
       
   886 	 using the MWsWindowTreeObserver interface. 
       
   887 	 @see FlagChanged */
       
   888 	enum TFlags
       
   889 		{
       
   890 		/** For a window to be drawn, it needs to be activated and visible and have visible parents.
       
   891 	 	Making a window invisible, implies that its children should be invisible as well.
       
   892 	 	The default value for a window is true. */
       
   893 		EVisible = 1,
       
   894 		/** Non-fading windows should not be drawn faded regardless of their fade-count.
       
   895 		The default value is false. */
       
   896 		ENonFading,
       
   897 		/** Windows with this attribute enabled uses alpha channel to control its transparency.
       
   898 		The default value is false. */
       
   899 		EAlphaChannelTransparencyEnabled,
       
   900 		/** True if a clipping rect should be applied when drawing a standard text cursor, false otherwise.
       
   901 		The default value is false. */
       
   902 		ECursorClipRectSet
       
   903 		};
       
   904 	/**
       
   905 	 This enum encapsulates the set of non-boolean attribute changes that can be observed
       
   906 	 using the MWsWindowTreeObserver interface. 
       
   907 	 @see AttributeChanged */
       
   908 	enum TAttributes
       
   909 		{
       
   910 		/** Cursor type.
       
   911 		@see MWsStandardTextCursor::Type()*/
       
   912 		ECursorType = 1,
       
   913 		/** Cursor clip rect.
       
   914 		@see MWsStandardTextCursor::ClipRect()*/
       
   915 		ECursorClipRect,
       
   916 		/** Cursor flags.
       
   917 		@see MWsStandardTextCursor::Flags()*/
       
   918 		ECursorFlags,
       
   919 		/** Cursor color.
       
   920 		@see MWsStandardTextCursor::Color()*/
       
   921 		ECursorColor,
       
   922 		/** Window shape.
       
   923 		@see MWsWindow::WindowArea()*/
       
   924 		EWindowShape,
       
   925 		/** Window group name
       
   926 		@see MWsWindowGroup::Name()*/
       
   927 		EWindowGroupName
       
   928 		};
       
   929 	/** 
       
   930 	 Callback to notify that a MWsWindowTreeNode has just been created. 
       
   931 	 Nodes are always added as the left-most sibling as this means they are
       
   932 	 added in front of exisitng nodes.
       
   933 	 @param aWindowTreeNode Use to query attributes of the node that has been 
       
   934 	 						created. Note that attributes such as e.g. the extent
       
   935 	 						is not yet set by the client when this notification arrives.
       
   936 	 @param aParent The parent node which aWindowTreeNode has been attached to. 
       
   937 	 				Special cases: aParent will be set to NULL for root windows, 
       
   938 	 				and set to the root window for floating sprites. */
       
   939 	virtual void NodeCreated(const MWsWindowTreeNode& aWindowTreeNode, const MWsWindowTreeNode* aParent) = 0;
       
   940 	/** 
       
   941 	 Callback to notify that a node in the window tree is about to be destroyed. 
       
   942 	 @param aWindowTreeNode Use to query attributes of node that's about to be destroyed. */
       
   943 	virtual void NodeReleased(const MWsWindowTreeNode& aWindowTreeNode) = 0;
       
   944 	/**
       
   945 	 Callback to notify that a node in the window tree has been activated. This 
       
   946 	 event is only generated for windows which has a visual appearance 
       
   947 	 (i.e. root windows and group windows are not activated). Before a node 
       
   948 	 can be drawn it needs to be activated and visible and have a non-zero size.
       
   949 	 @param aWindowTreeNode Use to query attributes of node that has been activated. */
       
   950 	virtual void NodeActivated(const MWsWindowTreeNode& aWindowTreeNode) = 0;
       
   951 	/**
       
   952 	 Callback to notify that a node's extent has changed. It is guaranteed that there
       
   953 	 will be at least one NodeExtentChanged notification between the NodeCreated and 
       
   954 	 NodeActivated notifications.
       
   955 	 Note that when a window has child-windows, those are always moving along with their
       
   956 	 parent but no NodeExtentChanged notifications will be generated for the child-windows.
       
   957 	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
       
   958 	 @param aRect The new rectangle. */
       
   959 	virtual void NodeExtentChanged(const MWsWindowTreeNode& aWindowTreeNode, const TRect& aRect) = 0;
       
   960 	/**
       
   961 	 Callback to notify that the ordinal position of a window has changed.
       
   962 	 @param aWindowTreeNode Use to query attributes of the node that has been changed.. 
       
   963 	 @param aNewPos The new position of this node among its siblings. */
       
   964 	virtual void SiblingOrderChanged(const MWsWindowTreeNode& aWindowTreeNode, TInt aNewPos) = 0;
       
   965 	/**
       
   966 	 Callback to notify that a node has had one of its boolean attributes changed.
       
   967 	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
       
   968 	 @param aFlag The attribute that has changed.
       
   969 	 @param aNewValue The new value for the attribute. */
       
   970 	virtual void FlagChanged(const MWsWindowTreeNode& aWindowTreeNode, TFlags aFlag, TBool aNewValue) = 0;
       
   971 	/**
       
   972 	 Callback to notify that a node has had one of its non-boolean attributes changed.
       
   973 	 @param aWindowTreeNode Use to identify the affected node and query the new value of the changed attribute.
       
   974 	 @param aAttribute The attribute that has changed. */
       
   975 	virtual void AttributeChanged(const MWsWindowTreeNode& aWindowTreeNode, TAttributes aAttribute) = 0;
       
   976 	/**
       
   977 	 Callback to notify that a window's fade count has been changed.
       
   978 	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
       
   979 	 @param aFadeCount Zero means the window is not faded, an integer > 0 means 
       
   980 	 					faded if absolute fading is used, or the number of times 
       
   981 	 					SetFaded has been called if using counting fade. */
       
   982 	virtual void FadeCountChanged(const MWsWindowTreeNode& aWindowTreeNode, TInt aFadeCount) = 0;
       
   983 	/**
       
   984 	 Callback to notify that the user defined transparent region of a window has changed. 
       
   985 	 This information is for optimisation purpose only, the rendering engine don't need 
       
   986 	 to do a full back-to-front rendering behind the opaque region. 
       
   987 	 @param aWindowTreeNode  Use to query attributes of the node that has been changed.
       
   988 	 @param aNewTransparentRegion   The transparent region defined by the user. Coordinates 
       
   989 	 								are relative the window's origin.
       
   990 	 @param aNewOpaqueRegion 	The inverse of aNewTransparentRegion.  Coordinates are 
       
   991 	 							relative the window's origin. */	
       
   992 	virtual void TransparentRegionChanged(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aNewTransparentRegion, const TRegion* aNewOpaqueRegion) = 0;
       
   993 	/**
       
   994 	 Callback to notify that a element has been added to this window.
       
   995 	 The render stages implementing this interface know when elements are added or removed through MWsElement interface.
       
   996 	 The purpose of the ElementAdded API is only to enable render stages to make an association between the element and the window.
       
   997 	 @param aWindowTreeNode Use to query attributes of the node that has been changed.
       
   998 	 @param aElement Use to query attributes of the new element. */
       
   999 	virtual void ElementAdded(const MWsWindowTreeNode& aWindowTreeNode, const MWsElement& aElement) = 0;
       
  1000 	/**
       
  1001 	 Callback to notify that a window has been moved to another window group.
       
  1002 	 @param aWindowTreeNode Use to query attributes of the node that has been moved.
       
  1003 	 @param aNewWindowGroupNode The window group aWindowTreeNode has been moved to. 
       
  1004 	 @see RWindowBase::MoveToGroup */
       
  1005 	virtual void MovedToWindowGroup(const MWsWindowTreeNode& aWindowTreeNode, const MWsWindowTreeNode& aNewWindowGroupNode) = 0;
       
  1006 	/**
       
  1007 	 Callback to notify that a window group chain has been formed or extended.
       
  1008 	 @param aParent The window group node to which a child has been attached.
       
  1009 	 @param aChild The window group node that has been attached to aParent. */
       
  1010 	virtual void WindowGroupChained(const MWsWindowTreeNode& aParent, const MWsWindowTreeNode& aChild) = 0;
       
  1011 	/**
       
  1012 	 Callback to notify that a window group chain has been broken. 
       
  1013 	 Special case: Deleting a window group that is part of a chain will break all chaining 
       
  1014 	 after the deleted window group and a notification for each node being dequed will be sent.
       
  1015 	 @param aWindowGroupNode The window group chain is broken directly after this window group. */
       
  1016 	virtual void WindowGroupChainBrokenAfter(const MWsWindowTreeNode& aWindowGroupNode) = 0;
       
  1017 	/**
       
  1018 	 Callback to notify that all nodes below aWindowTreeNode should be drawn faded,
       
  1019 	 unless they have the ENonFading flag set. 
       
  1020 	 This API is primarily used in conjunction with application frameworks that uses 
       
  1021 	 absolute fading rather than counting fade.
       
  1022 	 @param aWindowTreeNode Typically a root window, for which all children should have their
       
  1023 	 					fade state set to aFaded.
       
  1024 	 @param aFaded The new fade state to apply. ETrue means faded, EFalse not faded. */
       
  1025 	virtual void FadeAllChildren(const MWsWindowTreeNode& aWindowTreeNode, TBool aFaded) = 0;
       
  1026 	};
       
  1027 
       
  1028 /** 
       
  1029 An interface optionally provided by render stages, to observe which node in 
       
  1030 the window tree structure that is being rendered.
       
  1031 
       
  1032 Text cursors and sprites (floating or non) are annotated by the same APIs.
       
  1033 
       
  1034 @publishedPartner
       
  1035 @prototype
       
  1036 */
       
  1037 class MWsDrawAnnotationObserver : public MWsObjectProvider
       
  1038 	{
       
  1039 public:	
       
  1040 	DECLARE_WS_TYPE_ID(KMWsDrawAnnotationObserver)
       
  1041 	virtual void WindowRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
       
  1042 	virtual void WindowRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
       
  1043 	virtual void WindowAnimRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
       
  1044 	virtual void WindowAnimRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
       
  1045 	virtual void SpriteRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
       
  1046 	virtual void SpriteRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
       
  1047 	virtual void SpriteFlash(const MWsWindowTreeNode& aWindowTreeNode, TBool aFlashOn) = 0;
       
  1048 	virtual void SegmentRedrawStart(const TRegion& aRegion) = 0;
       
  1049 	virtual void SegmentRedrawEnd() = 0;
       
  1050 	};
       
  1051 
       
  1052 /** 
       
  1053 Implemented by a WSERV screen to respond to window visibility change notifications sent
       
  1054 by a render stage implementing MWsWindowVisibilityNotifier.
       
  1055 
       
  1056 Immediately after WSERV sucessfully obtains a pointer to MWsWindowVisibilityNotifier, 
       
  1057 WSERV will call MWsWindowVisibilityNotifier::RegisterWindowVisibilityObserver()
       
  1058 to provide a means for the render stage to notify WSERV, when window visibility changes.
       
  1059 
       
  1060 @see MWsWindowVisibilityNotifier
       
  1061 
       
  1062 @publishedPartner
       
  1063 @prototype
       
  1064 */
       
  1065 class MWsWindowVisibilityObserver
       
  1066 	{
       
  1067 public:
       
  1068 	/** 
       
  1069 	Called by the render stage to indicate a window's visible region has changed.
       
  1070 	After this method has been called, it does not need to be called again until
       
  1071 	after WSERV calls SendVisibilityChanges.
       
  1072 	@see MWsWindowVisibilityNotifier::SendVisibilityChanges
       
  1073 	*/
       
  1074 	virtual void VisibilityChanged() = 0;
       
  1075 
       
  1076 	/**
       
  1077 	Called by the render stage to update a window's visible region.
       
  1078 	@param aWindow The window whose visible region has changed.
       
  1079 	@param aVisibleRegion Region of the window not obscured by a fully opaque window. Part of this region could potentially still
       
  1080 	be obscured by opaque parts of translucent windows on top of aWindow.
       
  1081 	*/
       
  1082 	virtual void SetWindowVisibility(const MWsWindow& aWindow, const TRegion& aVisibleRegion) = 0;
       
  1083 	};
       
  1084 
       
  1085 /** 
       
  1086 This interface may be implemented by a render stage wishing to take over responsibility
       
  1087 from WSERV, for updating a window's visible region.
       
  1088 For example, if a render stage introduces non-WSERV visuals which overlap WSERV windows, WSERV may
       
  1089 need to receive updated window visibility information.
       
  1090 
       
  1091 Immediately after sucessfully obtaining this interface, WSERV will call RegisterWindowVisibilityObserver
       
  1092 to provide a means for the render stage to notify WSERV when window visibility changes.
       
  1093 
       
  1094 @see MWsWindowVisibilityObserver
       
  1095 
       
  1096 @publishedPartner
       
  1097 @prototype
       
  1098 */
       
  1099 class MWsWindowVisibilityNotifier : public MWsObjectProvider
       
  1100 	{
       
  1101 public:	
       
  1102 	DECLARE_WS_TYPE_ID(KMWsWindowVisibilityNotifier)
       
  1103 
       
  1104 	/** 
       
  1105 	Register to be notified when window visibility changes.
       
  1106 	@param aWindowVisibilityObserver Observer to be notified.
       
  1107 	*/
       
  1108 	virtual void RegisterWindowVisibilityObserver(MWsWindowVisibilityObserver* aWindowVisibilityObserver) = 0;
       
  1109 
       
  1110 	/** 
       
  1111 	Register to be notified when visibility of a specific window changes.
       
  1112 	After registering a window, the render stage must immediately provide the
       
  1113 	current visible region by calling VisibilityChanged() and later, in response
       
  1114 	to SendVisibilityChanges, call SetWindowVisibility.
       
  1115 	RegisterWindow and UnregisterWindow are symmetrical operations. For each
       
  1116 	call to RegisterWindow, there will follow exactly one call to UnregisterWindow.
       
  1117 	@param aWindow Window for which WSERV needs accurate visibility information.
       
  1118 	@see MWsWindowVisibilityObserver
       
  1119 	*/
       
  1120 	virtual void RegisterWindow(const MWsWindow& aWindow) = 0;
       
  1121 
       
  1122 	/** 
       
  1123 	Stops visibility notifications being sent for the specified window.
       
  1124 	RegisterWindow and UnregisterWindow are symmetrical operations. For each
       
  1125 	call to RegisterWindow, there will follow exactly one call to UnregisterWindow.
       
  1126 	@param aWindow Window for which visibility notifications are no longer required.
       
  1127 	*/
       
  1128 	virtual void UnregisterWindow(const MWsWindow& aWindow) = 0;
       
  1129 
       
  1130 	/** 
       
  1131 	Asks the render stage to call SetWindowVisibility for each window whose
       
  1132 	visible region has changed.
       
  1133 	All visible region changes must be sent before this method returns.
       
  1134 	@see MWsWindowVisibilityObserver
       
  1135 	*/
       
  1136 	virtual void SendVisibilityChanges() = 0;
       
  1137 	};
       
  1138 
       
  1139 /** This is an extension of the MWsScreen interface for handling the
       
  1140 animation aspects of the redraw sequence.
       
  1141 
       
  1142 @publishedPartner
       
  1143 @prototype
       
  1144 */
       
  1145 class MWsScreenRedraw: public MWsObjectProvider
       
  1146 	{
       
  1147 public:
       
  1148 	DECLARE_WS_TYPE_ID(KWsScreenRedraw)
       
  1149 	/**Sets the screen redraw observer. 
       
  1150 	@param aObserver
       
  1151 	*/
       
  1152 	virtual void SetObserver(MWsScreenRedrawObserver* aObserver) = 0;
       
  1153 	/** Checks if there is a redraw in progress or scheduled to take place.
       
  1154 	@return Returns ETrue if there is an update pending.
       
  1155 	*/	
       
  1156 	virtual TBool IsUpdatePending() = 0;
       
  1157 	/** Gets the current time according to the animation scheduler
       
  1158 	@return The current time as a TTime reference.
       
  1159 	*/
       
  1160 	virtual const TTime& Now() const = 0;
       
  1161 	/** Schedule a render of the screen without requesting any area of it
       
  1162 	to be redrawn.  Effectively, request a rerun of the render stages.
       
  1163 	@param aFromNow The time from now, in microseconds, to perform the render.
       
  1164 	*/
       
  1165 	virtual void ScheduleRender(const TTimeIntervalMicroSeconds& aFromNow) = 0;
       
  1166 	/** Gets the the animation region for this screen redraw.
       
  1167 	@return the Region being redrawn during the animation
       
  1168 	*/
       
  1169 	virtual const TRegion * AnimationRegion() const = 0;
       
  1170 	/** Updates the screen device to reflect any animation changes
       
  1171 	*/
       
  1172 	virtual void UpdateDevice() = 0;
       
  1173 	};
       
  1174 	
       
  1175 /** This is part of the MWsScreenRedraw interface
       
  1176 
       
  1177 @publishedPartner
       
  1178 @prototype
       
  1179 */
       
  1180 class MWsScreenRedrawObserver: public MWsObjectProvider
       
  1181 	{
       
  1182 public:
       
  1183 	DECLARE_WS_TYPE_ID(KWsScreenRedrawObserver)
       
  1184 	/** Callback function that gets called after the completion of every redraw sequence.
       
  1185 	@see MWsScreenRedraw::SetObserver
       
  1186 	@publishedPartner
       
  1187 	@prototype
       
  1188 	*/
       
  1189 	virtual void ScreenUpdated(TInt aScreenNumber) = 0;
       
  1190 	};
       
  1191 
       
  1192 /** This is part of the MGraphicDrawerInterface
       
  1193 
       
  1194 @publishedPartner
       
  1195 @prototype
       
  1196 */
       
  1197 class MWsMemoryRelease : public MWsObjectProvider
       
  1198 	{
       
  1199 public:
       
  1200 	DECLARE_WS_TYPE_ID(KMWsMemoryRelease)
       
  1201 	enum TMemoryReleaseLevel
       
  1202 		{
       
  1203 		ELow,
       
  1204 		EMedium,
       
  1205 		EHigh
       
  1206 		};
       
  1207 	/** This function is called on registered memory release objects whenever there
       
  1208 	is insufficient memory available to honour an Alloc or ReAlloc in the window server
       
  1209 	process.  It may be called up to three times, once for each level defined in TLevel.
       
  1210 	The meaning of each level is open to interpretation by individual implementations.
       
  1211 	@see MGraphicDrawerEnvironment::RegisterMemoryRelease
       
  1212 	@param aLevel 
       
  1213 	@return ETrue to indicate that memory was freed, EFalse otherwise.
       
  1214 	@publishedPartner
       
  1215 	@prototype
       
  1216 	*/
       
  1217 	virtual TBool ReleaseMemory(TMemoryReleaseLevel aLevel) = 0;
       
  1218 	};
       
  1219 
       
  1220 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
  1221 /** This is an extension of the MWsGc.  This interface is not used in
       
  1222 non-NGA configurations.  It has been removed from NGA configurations.
       
  1223 
       
  1224 @see MWsGc
       
  1225 @publishedPartner
       
  1226 @prototype
       
  1227 */
       
  1228 class MWsGcClipRect : public MWsObjectProvider
       
  1229 	{
       
  1230 public:
       
  1231 	DECLARE_WS_TYPE_ID(KMWsGcClipRect)
       
  1232 	/** Sets a master clipping rectangle on the GC.  This will combine with any clipping rectangles
       
  1233 	specified by the client.
       
  1234 	@param aRect
       
  1235 	*/
       
  1236 	virtual void SetClipRect(TRect aRect) = 0;
       
  1237 	/** Resets the master clipping rectangle specified in SetMasterClipRect
       
  1238 	*/
       
  1239 	virtual void ResetClipRect() = 0;
       
  1240 	/** Returns the combined clipping rectangle.
       
  1241 	@param aRect this is set to the clipping rectangle
       
  1242 	@param aSet this is true if there is a clipping rectangle in effect
       
  1243 	*/
       
  1244 	virtual void GetClipRect(TRect & aRect, TBool & aSet) = 0;
       
  1245 	};
       
  1246 #endif
       
  1247 
       
  1248 /** DebugBarDrawer interface
       
  1249      
       
  1250 @publishedPartner
       
  1251 @prototype
       
  1252 */
       
  1253 class MWsDebugBar : public MWsObjectProvider
       
  1254 	{
       
  1255 public:
       
  1256 	DECLARE_WS_TYPE_ID(KMWsDebugBar)
       
  1257 	
       
  1258 public:
       
  1259 	/**
       
  1260 	 * Prints a debug information bar overlaid at the top the screen.
       
  1261 	 * 
       
  1262 	 * @param aDebugText An array of text lines.
       
  1263 	 */
       
  1264 	virtual void DrawDebugBar(const TArray<TPtrC>& aDebugText)=0;
       
  1265 	};
       
  1266 
       
  1267 /** This is an extension of MWsGc and provides plugin fading capabilities for wserv.
       
  1268     Default implementation of the plugin uses bitgdi fade. 
       
  1269     
       
  1270 @see MWsGc
       
  1271 @publishedPartner
       
  1272 @prototype
       
  1273 */
       
  1274 class MWsFader : public MWsObjectProvider
       
  1275 	{
       
  1276 public:
       
  1277 	DECLARE_WS_TYPE_ID(KMWsFader)
       
  1278 	
       
  1279 public:
       
  1280 	/** Sets any parameters for the fade.
       
  1281 	@param aData Descriptor containing the fade parameters
       
  1282 	*/
       
  1283 	virtual void SetFadingParameters(const TDesC8& aData)=0;
       
  1284 #if !defined(SYMBIAN_GRAPHICS_GCE)
       
  1285 	/** Perform a fade of the specified region
       
  1286 	@param aBitGc CFbsBitGc to perform the fading with.
       
  1287 	@param aRegion TRegion containing the region that the fading is to be performed on.
       
  1288 	*/
       
  1289 	virtual void FadeArea(CFbsBitGc* aBitGc,const TRegion * aRegion)=0;
       
  1290 #else
       
  1291 	/** Perform a fade of the specified region
       
  1292 	@param aRegion TRegion containing the region that the fading is to be performed on.
       
  1293 	*/
       
  1294 	virtual void FadeArea(const TRegion& aRegion)=0;
       
  1295 #endif
       
  1296 	};
       
  1297 
       
  1298 /** Plugin Manager Interface
       
  1299 @publishedPartner
       
  1300 @prototype
       
  1301 */	
       
  1302 class MWsPluginManager : public MWsObjectProvider
       
  1303 	{
       
  1304 public:
       
  1305 	DECLARE_WS_TYPE_ID(KMWsPluginManager)
       
  1306 	
       
  1307 	/** Resolve an instance of an interface
       
  1308 	@param aTypeId
       
  1309 	*/
       
  1310 	virtual TAny* ResolvePluginInterface(TUint aTypeId) = 0;
       
  1311 	};
       
  1312 	
       
  1313 /** An Interface to allow CRP's and CWsPlugins to access the wserv ini file
       
  1314 @publishedPartner
       
  1315 @prototype
       
  1316 */
       
  1317 class MWsIniFile : public MWsObjectProvider
       
  1318 	{
       
  1319 public:
       
  1320 	DECLARE_WS_TYPE_ID(KMWsIniFile)
       
  1321 	
       
  1322 	/** Find the value of the specified variable if present in the window server ini file.
       
  1323 	@param aVarName TDesC containing the name of the variable to find.
       
  1324 	@param aResult TPtrC that gets set to the value of the ini variable.
       
  1325 	@return ETrue if ini file variable found
       
  1326 	*/
       
  1327 	virtual TBool FindVar(const TDesC &aVarName, TPtrC &aResult) = 0;
       
  1328 
       
  1329 	/** Find the value of the specified variable if present in the window server ini file.
       
  1330 	@param aVarName TDesC containing the name of the variable to find
       
  1331 	@param aResult TInt that gets set to the value of the ini variable
       
  1332 	@return ETrue if ini file variable found
       
  1333 	*/
       
  1334 	virtual TBool FindVar(const TDesC &aVarName, TInt &aResult) = 0;
       
  1335 
       
  1336 	/** Find if the variable is present in the ini file
       
  1337 	@param aVarName TDesC containing the name of the variable to find
       
  1338 	@return ETrue if ini file variable found
       
  1339 	*/
       
  1340 	virtual TBool FindVar(const TDesC &aVarName) = 0;
       
  1341 
       
  1342 	/** Find if the variable is present in the [SCREENx] section
       
  1343 	@param aScreen TInt containing the screen number
       
  1344 	@param aVarName TDesC containing the name of the variable to find
       
  1345 	@return ETrue if ini file variable found
       
  1346 	*/
       
  1347 	virtual TBool FindVar( TInt aScreen, const TDesC &aVarName) = 0;
       
  1348 
       
  1349 	/** Find the value of the specified variable if present in the [SCREENx] section of the ini file
       
  1350 	@param aScreen TInt containing the screen number
       
  1351 	@param aVarName TDesC containing the name of the variable to find
       
  1352 	@param aResult TInt that gets set to the value of the ini variable
       
  1353 	@return ETrue if ini file variable found
       
  1354 	*/
       
  1355 	virtual TBool FindVar( TInt aScreen, const TDesC &aVarName, TInt &aResult) = 0;
       
  1356 
       
  1357 	/** Find the value of the specified variable if present in the [SCREENx] section of the ini file
       
  1358 	@param aScreen TInt containing the screen number
       
  1359 	@param aVarName TDesC containing the name of the variable to find
       
  1360 	@param aResult TPtrC that gets set to the value of the ini variable.
       
  1361 	@return ETrue if ini file variable found
       
  1362 	*/
       
  1363 	virtual TBool FindVar( TInt aScreen, const TDesC& aVarName, TPtrC &aResult) = 0;
       
  1364 
       
  1365 	/** Find if the specified variable is present in the named section of the ini file
       
  1366 	@param aSection TDesC containing the name of the section 
       
  1367 	@param aVarName TDesC containing the name of the variable to find
       
  1368 	@return ETrue if ini file variable found
       
  1369 	*/
       
  1370 	virtual TBool FindVar(const TDesC& aSection, const TDesC &aVarName) = 0;
       
  1371 	
       
  1372 	/** Find the value of the specified variable in the named section of the ini file.
       
  1373 	@param aSection TDesC containing the name of the section 
       
  1374 	@param aVarName TDesC containing the name of the variable to find
       
  1375 	@param aResult TInt that gets set to the value of the ini variable
       
  1376 	@return ETrue if ini file variable found
       
  1377 	*/
       
  1378 	virtual TBool FindVar(const TDesC& aSection, const TDesC &aVarName, TInt &aResult) = 0;
       
  1379 
       
  1380 	/** Find the value of the specified variable in the named section of the ini file.
       
  1381 	@param aSection TDesC containing the name of the section 
       
  1382 	@param aVarName TDesC containing the name of the variable to find
       
  1383 	@param aResult TPtrC that gets set to the value of the ini variable.
       
  1384 	@return ETrue if ini file variable found
       
  1385 	*/
       
  1386 	virtual TBool FindVar(const TDesC& aSection, const TDesC& aVarName, TPtrC &aResult) = 0;
       
  1387 	};
       
  1388 
       
  1389 /** An interface that allows CRP's and CWsPlugin derived objects to handle events like anim dll's
       
  1390 @publishedPartner
       
  1391 @prototype
       
  1392 */
       
  1393 class MWsRawEventServer : public MWsObjectProvider
       
  1394 	{
       
  1395 public:
       
  1396 	DECLARE_WS_TYPE_ID(KMWsRawEventServer)
       
  1397 
       
  1398 	/** Register to be notified when some kernel events occur.
       
  1399 	@return KErrNone if successful
       
  1400 	@prototype */
       
  1401 	virtual TInt RegisterRawEventHandler(MEventHandler* aHandler) = 0;
       
  1402 	/** Unregister from events notification
       
  1403 	@prototype */
       
  1404 	virtual void UnregisterRawEventHandler(MEventHandler* aHandler) = 0;
       
  1405 	/** Creates a new raw event
       
  1406 	@prototype */
       
  1407 	virtual void PostRawEvent(const TRawEvent & aEvent) = 0;
       
  1408 	/** Creates a new key event
       
  1409 	@prototype */
       
  1410 	virtual void PostKeyEvent(const TKeyEvent & aEvent) = 0;
       
  1411 	};
       
  1412 
       
  1413 #endif //#ifndef __WSGRAPHICDRAWERINTEFACE_H__