os/graphics/windowing/windowserver/inc/Graphics/openwfc/WSGRAPHICDRAWERINTERFACE.H
First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // WSGRAPHICDRAWERINTEFACE.H
15 // Server-side base-classes for graphic drawer plugins
19 #ifndef __WSGRAPHICDRAWERINTEFACE_H__
20 #define __WSGRAPHICDRAWERINTEFACE_H__
27 class CWsGraphicDrawer;
28 struct TGraphicDrawerId;
29 class MWsEventHandler;
30 class CWsGraphicMessageQueue;
34 #if !defined(SYMBIAN_GRAPHICS_GCE)
35 class MWsFlickerFreeBufferObserver;
38 class MWsScreenRedrawObserver;
39 class MWsMemoryRelease;
42 class MWsGraphicsContext;
43 class MWsAnimationScheduler;
56 /** Declares an object type, ETypeId, for a class, in order to allow the WSERV object
57 provider mechanism to locate and provide objects from the class.
60 @see MWsObjectProvider */
61 #define DECLARE_WS_TYPE_ID(id) enum { EWsObjectInterfaceId = id };
63 class MWsObjectProvider
64 /** A class for dynamic extension of object instances
65 WSERV classes which wish to allow dynamic extension show derive those
66 extensions from MWsObjectProvider and use the DECLARE_WS_TYPE_ID macro
67 Similiar in principle and operation to CONE's MObjectProvider
75 /** Gets an object of the type defined by the template parameter.
77 @return A pointer to an object of the type required, or NULL if none can be
79 { return (T*)ResolveObjectInterface(T::EWsObjectInterfaceId); }
80 /** Gets an object of the type defined by the template parameter.
81 @return A pointer to a const object of the type required, or NULL if none can be
84 const T* ObjectInterface() const
85 { return (T*)const_cast<MWsObjectProvider*>(this)->ResolveObjectInterface(T::EWsObjectInterfaceId); }
86 /** Resolve an instance of an interface
87 should be overriden by implementations when they have custom interfaces to provide. */
88 IMPORT_C virtual TAny* ResolveObjectInterface(TUint aTypeId);
91 class MWsScreen: public MWsObjectProvider
92 /** A destination for a drawing occasion of a CWsGraphicDrawer
93 Used by animation schedulers to update screens
98 using MWsObjectProvider::ResolveObjectInterface;
101 friend class MWsAnimationScheduler;
102 #if !defined(SYMBIAN_GRAPHICS_GCE)
103 /** Called by the MWsAnimationScheduler when scheduled animation is to be serviced
105 WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
108 virtual void OnAnimation() = 0;
110 /** Called by the MWsAnimationScheduler when a scheduled animation is to be serviced.
111 @param aFinished If not NULL then this is signalled when the animation has
112 been processed and further animations may be submitted. An animation may be
113 submitted prior to signalling, but the render stage pipeline may not be ready
116 WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
119 virtual void OnAnimation(TRequestStatus* aFinished) = 0;
121 /** Called by the MWsAnimationScheduler when the screen needs to be redrawn in its entirity
123 WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
126 virtual void Redraw() = 0;
127 /** Called by MWsAnimationScheduler when the any parts of the screen that potentially contain
128 commands to draw graphics in the list of IDs passed need to be redrawn
129 @param aInvalid the list of IDs that are invalid
130 @return whether the screen did any redrawing
132 WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
135 virtual TBool RedrawInvalid(const TArray<TGraphicDrawerId>& aInvalid) = 0;
142 class CWsMessageData : public CBase, public MWsObjectProvider
145 virtual TPtrC8 Data() const = 0;
146 virtual void Release() = 0;
147 IMPORT_C TInt ClientHandle() const;
148 IMPORT_C TInt Id() const;
149 IMPORT_C const CWsGraphicDrawer* Drawer();
150 IMPORT_C void SetClientHandle(TInt aClientHandle);
151 IMPORT_C void SetId( TInt aId);
152 IMPORT_C void SetDrawer(const CWsGraphicDrawer* aDrawer);
154 friend class CWsGraphicMessageQueue;
155 friend class CWsClient;
156 CWsMessageData* iNext;
157 const CWsGraphicDrawer* iDrawer;
160 TInt iMWsMessageDataSpare[3];
163 class MWsClient: public MWsObjectProvider
164 /*** Represents a client session
169 /** Determines if this client has the specified capability */
170 virtual TBool HasCapability(TCapability aCapability) const = 0;
171 /** Retrieves the Secure ID of the client's process */
172 virtual TSecureId SecureId() const = 0;
173 /** Retrieves the Vendor ID of the client's process */
174 virtual TVendorId VendorId() const = 0;
176 friend class CWsGraphicDrawer;
177 virtual TInt SendMessage(const CWsGraphicDrawer* aOnBehalfOf,const TDesC8& aData) = 0;
178 virtual TInt SendMessage(const CWsGraphicDrawer* aOnBehalfOf,CWsMessageData& aData) = 0;
181 class MWsGraphicDrawerEnvironment: public MWsObjectProvider
182 /** The environment for a graphic drawer
187 /** Locate a graphic by ID
188 @return the graphic with that ID, else NULL if no such graphic exists */
189 virtual const CWsGraphicDrawer* ResolveGraphic(const TGraphicDrawerId& aId) const = 0;
190 /** The number of screens the device has; this is constant for a device */
191 virtual TInt ScreenCount() const = 0;
192 /** Get a particular screen by ordinal
193 @return the screen, or NULL if aIndex is out of bounds */
194 virtual MWsScreen* Screen(TInt aIndex) = 0;
195 /** Get a particular screen by ordinal
196 @return the screen, or NULL if aIndex is out of bounds */
197 virtual const MWsScreen* Screen(TInt aIndex) const = 0;
199 @return success of overriding the default scheduler */
200 virtual TBool SetCustomAnimationScheduler(MWsAnimationScheduler* aScheduler) = 0;
201 /** Query whether a custom animation scheduler has been set
202 @return ETrue if the custom animation scheduler has been set */
203 virtual TBool HasCustomAnimationScheduler() const = 0;
204 /** Clears a custom animation scheduler
205 @return success if the custom scheduler was set, and hence removed */
206 virtual TBool ClearCustomAnimationScheduler(MWsAnimationScheduler* aCurrentScheduler) = 0;
208 friend class CWsGraphicDrawer;
209 /** Schedules all potentially affected parts of the screen to repaint
210 This is called automatically whenever a graphic is added, replaced or removed.
211 However, if a graphic which changes representation during runtime must call this
213 Note: this is not a suitable method for animating a graphic. For animation,
214 use MWsGc::Invalidate when the graphic is being drawn to schedule the next
215 animation frame instead.
216 @param aId the ID of the artwork; the artwork may not exist */
217 virtual void Invalidate(const TGraphicDrawerId& aId) = 0;
219 /** Register to be notified when some events occur.
220 @return KErrNone if successful */
221 virtual TInt RegisterEventHandler(CWsGraphicDrawer* aDrawer, MWsEventHandler* aHandler, TUint32 aEventMask) = 0;
222 /** Unregister from events notification
223 @return KErrNone if successful */
224 virtual TInt UnregisterEventHandler(CWsGraphicDrawer* aDrawer) = 0;
225 /** Register to be notified when some events occur.
226 @return KErrNone if successful
228 virtual TInt RegisterWsEventHandler(MWsEventHandler* aHandler, TUint32 aEventMask) = 0;
229 /** Unregister from events notification
230 @return KErrNone if successful
232 virtual TInt UnregisterWsEventHandler(MWsEventHandler* aHandler) = 0;
233 /** Logs a message to the wserv logger, if one is loaded
234 @param aPriority The priority of the message - low priority is 1, high is 9
235 @param aFmt The string to log. This may contain a single %d, %x or equivalent
236 @param aParam An integer parameter corresponding to a %d, if present
238 virtual void Log(TInt aPriority,const TDesC &aFmt,TInt aParam=0) = 0;
239 /** Registers an interface for releasing memory in low memory situations.
240 The release function may be called as a result of any Alloc or ReAlloc attempts in the window server
242 @param aMemoryRelease a callback interface
243 @return KErrNone or a system wide error code
245 virtual TInt RegisterMemoryRelease(MWsMemoryRelease * aMemoryRelease) = 0;
246 /** Removes a registration set by RegisterMemoryRelease
247 @param aMemoryRelease the registered release object to remove
249 virtual void UnregisterMemoryRelease(MWsMemoryRelease * aMemoryRelease) = 0;
252 class MWsGc: public MWsObjectProvider
253 /** A destination for a drawing occasion of a CWsGraphicDrawer
254 Used to register invalidation schedules for animation
259 /** The Client requesting this drawing occasion
263 virtual MWsClient& Client() = 0;
264 /** The screen that is currently being drawn to
268 virtual MWsScreen& Screen() = 0;
269 #if !defined(SYMBIAN_GRAPHICS_GCE)
270 /** The origin of the GC relative to the screen's origin
274 virtual TPoint GcOrigin() const = 0;
275 /** The clipping region currently being used
276 @return the clipping region
279 virtual const TRegion& ClippingRegion() = 0;
280 /** The BITGDI graphics context to draw to
283 virtual CFbsBitGc& BitGc() = 0;
284 /** Saves the state of the GC to an internal buffer. Several GC states can be saved in a FILO.
285 Do not restore a GC (using PopBitGcSettings()) that wasn't properly saved!
286 @return KErrNone if successful, else one of the system-wide error codes. */
287 virtual TInt PushBitGcSettings() = 0;
288 /** Restores the last GC state that was saved. */
289 virtual void PopBitGcSettings() = 0;
291 /** The time for the current redraw
294 virtual const TTime& Now() const = 0;
295 /** Schedule an animation of a rectangle in the future.
296 Scheduled animation doesn't work in low memory conditions or
297 if aRect values fall outside the window area of this animation.
298 @param aRect the rectangle to animate, in the GC's coordinates
299 @param aFromNow the time in microseconds from Now() that the rectangle will be invalid
302 virtual void ScheduleAnimation(const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow) = 0;
303 /** Schedule an animation of a rectangle in the future
304 @param aRect the rectangle to animate, in the GC's coordinates
305 @param aFromNow the time in microseconds from Now() that the rectangle will be invalid
306 @param aFreq microseconds between frames that this rectangle will probably be invalid in the future (0 means no such hint is known)
307 @param aStop the duration in microseconds from Now() that the aFreq hint will be valid for (0 means indefinitely)
310 virtual void ScheduleAnimation(const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop) = 0;
311 /** Sets the origin of gc
312 @param aOrigin The new origin of the gc
315 virtual void SetGcOrigin(const TPoint& aOrigin) = 0;
318 /** Interface Extension
322 KMWsScreenConfigInterfaceId = 1,
323 #if !defined(SYMBIAN_GRAPHICS_GCE)
324 KMWsBackBufferInterfaceId = 2,
325 KMWsFrontBufferInterfaceId = 3,
327 KMWsGraphicDrawerMessageAlloc = 4,
328 KMWsGraphicMessageAlloc = 5,
329 KWsGraphicHandleSynchronMessageId = 6,
330 KWsGraphicMessageCallbackInterfaceId = 7,
331 KWsActiveSchedulerDebug = 8,
332 #if !defined(SYMBIAN_GRAPHICS_GCE)
333 KWsFlickerFreeBufferObserver = 9,
336 KWsScreenRedraw = 11,
337 KWsScreenRedrawObserver = 12,
338 KCWsRenderStage = 13,
339 KMWsRenderStageFactory = 14,
340 KMWsMemoryRelease = 15,
341 #if !defined(SYMBIAN_GRAPHICS_GCE)
345 KMWsPluginManager = 18,
347 KMWsRawEventServer = 20,
348 KMWsPlaceSurfaceId = 21,
349 #if defined(SYMBIAN_GRAPHICS_GCE)
350 KMWsTextCursor = 22, // CWsRenderStage Object Extension will yield an MWsTextCursor
352 KMWsGraphicsContext = 23, // CWsRenderStage Object Extension will yield an MWsGraphicsContext
353 KMWsCompositionContext = 24, // CWsRenderStage Object Extension will yield an MWsCompositionContext
354 // MWsCompositionContext::CreateLayer will yield a MWsLayer
355 KMWsEventHandler = 25, // CWsRenderStage Object Extension will yield an MWsEventHandler
356 KMWsScreenDevice = 26, // CWsRenderStage Object Extension will yield an MWsScreenDevice
357 KMWsPalette = 27, // CWsRenderStage Object Extension will optionally yield an MWsPalette
358 #if defined(SYMBIAN_GRAPHICS_GCE)
359 KMWsUiBufferInterfaceId = 28, // CWsRenderStage Object Extension will optionally yield an MWsUiBuffer
361 KMWsDebugBar = 29, // CWsRenderStage Object Extension will optionally yield an MWsDebugBar
362 KMWsDrawableSourceProvider = 30, // CWsRenderStage Object Extension will optionally yield an MWsDrawableSourceProvider
363 KMWsScreenConfigListInterfaceId = 31, //MWsScreen can return this list interface
364 KMWsWindowTreeObserver = 32, // CWsRenderStage Object Extension will optionally yield an MWsWindowTreeObserver
365 KMWsDrawAnnotationObserver = 33, // CWsRenderStage Object Extension will optionally yield an MWsDrawAnnotationObserver
366 KMWsWindowVisibilityNotifier = 34, // CWsRenderStage Object Extension will optionally yield an MWsWindowVisibilityNotifier
367 KMWsWindowTree = 35, // Object Extension to be used by render stages for recovery of MWsWindowTree
368 KMWsScene = 36, // CWsRenderStage Object Extension will yield an MWsScene
369 // MWsScene::CreateSceneElement will yield a MWsElement
370 KMWsContentReadyForComposition = 37,// CWsRenderStage Object Extension will optionally yield an MWsContentReadyForComposition
373 class TSurfaceConfiguration;
376 /** Extension to GC to allow surface placement.
382 NOTE: This interface is deprecated. Do not use!
384 class MWsSurfacePlacement: public MWsObjectProvider
387 DECLARE_WS_TYPE_ID(KMWsPlaceSurfaceId)
388 virtual TInt PlaceSurface(const TSurfaceConfiguration& aConfig)=0;
391 /** Current screen mode configuration.Values return from this interface shall not be cached as they
392 can change at anytime when wserv changes its screen mode. Plugin can listen to event EScreenSizeModeChanged
393 to be notified when it happens.
398 class MWsScreenConfig: public MWsObjectProvider
401 DECLARE_WS_TYPE_ID(KMWsScreenConfigInterfaceId)
403 /** Get screen display mode */
404 virtual TDisplayMode DisplayMode() const = 0;
405 /** Get physical screen size in pixels */
406 virtual TSize SizeInPixels() const = 0;
407 /** Get screen size in pixels for current screen size mode as defined in wsini */
408 virtual TSize ScreenModeSizeInPixels() const = 0;
409 /** Get frame buffer line pitch */
410 virtual TInt Stride() const = 0;
411 /** Get screen orientation */
412 virtual CFbsBitGc::TGraphicsOrientation Orientation() const = 0;
413 /** Get screen size mode */
414 virtual TInt SizeMode() const = 0;
415 /** Get screen scaling factor */
416 virtual TSize ScalingFactor() const = 0;
417 /** Get screen origin */
418 virtual TPoint Origin() const = 0;
419 /** Get screen scaled origin */
420 virtual TPoint ScaledOrigin() const = 0;
423 /** Available list of screen modes as specified during start-up.
424 * This interface can generally be enquired from the MWsScreen instance.
425 * Can be read by render stage to configure its Display Configuration policy.
427 * Note that mode list is not contiguous, so methods may leave if missing index is requested.
429 class MWsScreenConfigList: public MWsObjectProvider
432 DECLARE_WS_TYPE_ID(KMWsScreenConfigListInterfaceId)
436 EDynamic= 0x00000001, //"-1,-1"
437 EHighRes= 0x00000002, //High-res policy mode
438 EDisconnected= 0x00000004, //Mode to use when disconnected
439 EHalDefault= 0x00000008,
440 ETwipsSpecified= 0x00000010,
441 EClientDefinedDigitiserArea= 0x00000020,
444 /** Get list of valid display modes - may be sparse **/
445 virtual TInt GetScreenSizeModeList(RArray<TInt>&aList) const =0;
446 /** Get screen display mode */
447 virtual TDisplayMode DisplayModeL(TInt aIndex) const = 0;
448 /** Get screen size in pixels for current screen size mode as defined in wsini */
449 virtual TSize ScreenModeSizeInPixelsL(TInt aIndex) const = 0;
450 /** Get screen size in twips for current screen size mode as defined in wsini */
451 virtual TSize ScreenModeSizeInTwipsL(TInt aIndex) const = 0;
452 /** Get screen orientation */
453 virtual CFbsBitGc::TGraphicsOrientation OrientationL(TInt aIndex) const = 0;
454 /** Get screen orientation */
455 virtual TInt AvailableOrientationsL(TInt aIndex) const = 0;
456 /** Get screen scaling factor - note this is expected to stay at 1:1 */
457 virtual TSize ScalingFactorL(TInt aIndex) const = 0;
458 /** Get screen origin */
459 virtual TPoint OriginL(TInt aIndex) const = 0;
460 /** Get screen scaled origin - note this is expected to stay at 1:1 */
461 virtual TPoint ScaledOriginL(TInt aIndex) const = 0;
462 /** Get the modeflags for specified mode */
463 virtual TInt ModeFlagsL(TInt aIndex) const = 0;
467 class MWsWindowTree : public MWsObjectProvider
470 DECLARE_WS_TYPE_ID(KMWsWindowTree)
471 virtual void SendTree() const = 0;
474 #if !defined(SYMBIAN_GRAPHICS_GCE)
475 /** Wserv flickerfree buffer access
480 class MWsBackBuffer: public MWsObjectProvider
483 DECLARE_WS_TYPE_ID(KMWsBackBufferInterfaceId)
484 /** Get wserv flickerfree buffer bitmap
486 virtual CFbsBitmap* GetBitmap() = 0;
487 /** Get default wserv flickerfree buffer drawing context. This will always return the original
488 context not the current context (e.g. not the redirecting context when it is redirected).
490 virtual CFbsBitGc* GetBitGc() = 0;
491 /** Set wserv flickerfree buffer drawing context to redirect its drawing output. Drawing context must
492 have been activated on a device prior calling this function.
493 @param aBitGc The context where flickerfree buffer drawing output is redirected to. If it is NULL
494 the redirection will be cancelled and default drawing context will be restored.
495 @return KErrNone if successful, otherwise one of system-wide error codes.
497 virtual TInt SetBitGc(CFbsBitGc* aBitGc) = 0;
498 /** Redirects drawing to another back buffer. Target back buffer must provide bitmap and drawing context
499 which has been activated on a bitmap device.
500 @param aTarget Target back buffer where drawing is redirected to. If it is NULL
501 the redirection will be terminated.
502 @return KErrNone if successful, otherwise one of system-wide error codes.
505 virtual TInt RedirectTo(MWsBackBuffer* aTarget) = 0;
507 /** Sets the back buffers observer. The observer will be called just before and just after each
508 complete sequence of drawing to the back buffer.
509 @param aObserver The observer handling the callbacks
512 virtual void SetObserver(MWsFlickerFreeBufferObserver* aObserver) = 0;
514 /** This returns the observer set by SetObserver.
515 @return The observer set by SetObserver, or NULL
518 virtual MWsFlickerFreeBufferObserver* Observer() = 0;
520 /** Get current wserv flickerfree buffer drawing context. This will return the redirected context
522 @return The graphics context to use to draw to the flicker buffer directly.
525 virtual CFbsBitGc* GetBitGcCurrent() = 0;
528 /** Wserv screen buffer access
533 class MWsFrontBuffer: public MWsObjectProvider
536 DECLARE_WS_TYPE_ID(KMWsFrontBufferInterfaceId)
537 /** Get pointer to framebuffer
539 virtual const TAny* GetBits() = 0;
540 /** Get default wserv screen drawing context. This will always return the original
541 context not the current context (e.g. not the redirecting context when it is redirected).
543 virtual CFbsBitGc* GetBitGc() = 0;
544 /** Set wserv screen drawing context to redirect its drawing output. Drawing context must
545 have been activated on a device prior calling this function.
546 @param aBitGc The context where screen drawing output is redirected to. If it is NULL
547 the redirection will be cancelled and default drawing context will be restored.
548 @return KErrNone if successful, otherwise one of system-wide error codes.
550 virtual TInt SetBitGc(CFbsBitGc* aBitGc) = 0;
551 /** Set wserv screen drawing context to redirect its drawing output and perform fullscreen
552 redraw if necessary. Drawing context must have been activated on a device prior calling this
554 @param aBitGc The context where screen drawing output is redirected to. If it is NULL
555 the redirection will be cancelled and default drawing context will be restored.
556 @param aInvalidateScreen Flag to tell wserv to perform fullscreen redraw or not
557 @return KErrNone if successful, otherwise one of system-wide error codes.
560 virtual TInt SetBitGc(CFbsBitGc* aBitGc, TBool aInvalidateScreen) = 0;
562 /** Get current wserv screen drawing context. This will return the redirected context
566 virtual CFbsBitGc* GetBitGcCurrent() = 0;
568 #endif // !SYMBIAN_GRAPHICS_GCE
570 /** Optional Memory Allocator for incoming messages
571 To be implemented by CRPs which want to control large incoming messages themselves
576 class MWsGraphicDrawerMessageAlloc: public MWsObjectProvider
579 DECLARE_WS_TYPE_ID(KMWsGraphicDrawerMessageAlloc)
580 virtual TAny* Alloc(TInt aSize) = 0;
581 virtual void Free(TAny* aCell) = 0;
584 /** Optional Memory Allocator for incoming messages
585 To be implemented by CWsGraphics which want to control large incoming messages themselves
590 class MWsGraphicMessageAlloc: public MWsObjectProvider
593 DECLARE_WS_TYPE_ID(KMWsGraphicMessageAlloc)
594 NONSHARABLE_CLASS(MBuffer): public MWsObjectProvider
597 virtual TPtr8 Buffer() = 0;
598 virtual void Release() = 0;
600 virtual MBuffer* Alloc(TInt aSize) = 0;
603 /** For debug purposes only
608 class MWsActiveSchedulerDebug: public MWsObjectProvider
611 DECLARE_WS_TYPE_ID(KWsActiveSchedulerDebug)
612 virtual TInt64 Requests() const = 0;
613 virtual TInt64 Errors() const = 0;
614 virtual TInt64 Draws() const = 0;
615 virtual TInt64 Total() const = 0;
616 virtual TInt64 Preparing() const = 0;
617 virtual TInt64 Drawing() const = 0;
618 virtual TInt64 Idle() const = 0;
621 #if !defined(SYMBIAN_GRAPHICS_GCE)
622 /** This forms part of the MWsBackBuffer interface
627 class MWsFlickerFreeBufferObserver: public MWsObjectProvider
630 DECLARE_WS_TYPE_ID(KWsFlickerFreeBufferObserver)
631 /** Function that gets called before the flicker buffer is updated
632 @param aBuffer The back buffer that is about to be updated
633 @param aRegion The region of the back buffer that is about to be updated
635 virtual void BeforeUpdate(MWsBackBuffer& aBuffer,const TRegion& aRegion) = 0;
636 /** Function that gets called after the flicker buffer has been updated
637 @param aBuffer The back buffer that has been updated
638 @param aRegion The region of the the back buffer that has been updated
640 virtual void AfterUpdate(MWsBackBuffer& aBuffer,const TRegion& aRegion) = 0;
642 #endif // !SYMBIAN_GRAPHICS_GCE
644 /** An interface through which a window can be examined
645 This returns non const copies instead of const references, and the
646 functions themselves are non const.
651 class MWsWindow : public MWsObjectProvider
654 DECLARE_WS_TYPE_ID(KMWsWindow)
656 /** Gets the origin of the window.
657 @return TPoint containing the origin of the window.
659 virtual TPoint Origin() const = 0;
660 /** Gets the windows rect in absolute co-ordinates.
663 virtual TRect AbsRect() const = 0;
664 /** Gets the size of the window
665 @return TSize containing the size of the window
667 virtual TSize Size() const = 0;
668 /** Get the window's handle
669 @return TUint32 containing the window's handle.
671 virtual TUint32 Handle() const = 0;
672 /** Invalidate an area of the window.
673 @param aRect TRect containing the area to invalidate.
675 virtual void Invalidate(const TRect * aRect = 0) = 0;
676 /** Get the MWsScreen for this window.
677 @return A pointer to the MWsScreen that this window is on.
679 virtual MWsScreen * WsScreen() const = 0;
680 /** Finds a child of this window by specifiying its handle.
681 @param aHandle A handle to the window to find.
682 @return an MWsWindow pointer to the found window
684 virtual MWsWindow * FindChildByHandle(TUint32 aHandle) = 0;
686 Returns the ordinal priority of the node.
688 virtual TInt OrdinalPriority() const = 0;
689 /** Get the window's basic area before any clipping is done.
690 For windows with rounded corners, the window area is different from AbsRect.
691 @return a reference to the window area
693 virtual const TRegion& WindowArea() const = 0;
697 An interface providing information about a window group.
704 virtual TInt Identifier() const = 0;
705 virtual TPtrC Name() const = 0;
706 virtual TBool IsFocusable() const = 0;
707 virtual TInt OrdinalPriority() const = 0;
708 virtual const MWsClient * Client() const = 0;
712 An interface through which a sprite can be examined.
723 ECustomTextCursorSprite,
727 virtual TRect Rect() const = 0;
728 virtual TSpriteType SpriteType() const = 0;
732 An interface through which a standard text cursor can be examined.
736 class MWsStandardTextCursor
741 @return The cursor type; either TTextCursor::ETypeRectangle or TTextCursor::ETypeHollowRectangle.
743 virtual TInt Type() const = 0;
746 @return Draw rectangle of the cursor in <b>window</b> co-ordinates.
748 virtual TRect Rect() const = 0;
750 Clipping rectangle in <b>window</b> co-ordinates.
751 @return If a clipping rect has been set, the cursor must be drawn clipped to the returned rectangle.
752 @see MWsWindowTreeObserver::ECursorClipRectSet
754 virtual TRect ClipRect() const = 0;
757 For possible values, see TTextCursor::EFlags.
758 Note, only flags included by the mask TTextCursor::EUserFlags are provided.
759 @see TTextCursor::EFlags
761 virtual TUint Flags() const = 0;
764 @return The cursor color.
766 virtual TRgb Color() const = 0;
769 @return If TTextCursor::EFlagNoFlash is set, zero; otherwise the time interval between cursor flash on/off.
770 @see MWsStandardTextCursor::Flags()
772 virtual TTimeIntervalMicroSeconds32 FlashInterval() const = 0;
776 /** An interface providing information about a window tree node.
780 class MWsWindowTreeNode
786 EWinTreeNodeClient = EWinTypeClient, //0
787 EWinTreeNodeRoot = EWinTypeRoot, //1
788 EWinTreeNodeGroup = EWinTypeGroup, //2
789 EWinTreeNodeAnim = 16, //3-15 reserved for expansion of TWinType
791 EWinTreeNodeStandardTextCursor,
795 @return The Node Type for this MWsWindowTreeNode. */
796 virtual TType NodeType() const = 0;
798 @return A pointer to a MWsWindow interface only when this
799 MWsWindowTreeNode represents a client window
800 (i.e. node type EWinTreeNodeClient), NULL otherwise. */
801 virtual const MWsWindow* Window() const = 0;
803 @return A pointer to a MWsSprite interface only when this
804 MWsWindowTreeNode represents a sprite, NULL otherwise. */
805 virtual const MWsSprite* Sprite() const = 0;
807 @return A pointer to a MWsStandardTextCursor interface only when this
808 MWsWindowTreeNode represents a standard text cursor, NULL otherwise. */
809 virtual const MWsStandardTextCursor* StandardTextCursor() const = 0;
811 @return The MWsWindowGroup this MWsWindowTreeNode belongs to, or "this"
812 MWsWindowTreeNode object if the NodeType is EWinTreeNodeGroup. Will
813 return NULL if this MWsWindowTreeNode is of type EWinTreeNodeRoot. */
814 virtual const MWsWindowGroup* WindowGroup() const = 0;
816 @return The parent MWsWindowTreeNode. NULL if current node is of type
817 EWinTreeNodeRoot. The parent of a floating sprite is the root window. */
818 virtual const MWsWindowTreeNode* ParentNode() const = 0;
822 An interface optionally provided by render stages, to observe changes in
823 window tree structure, or changes to tree nodes.
828 class MWsWindowTreeObserver : public MWsObjectProvider
831 DECLARE_WS_TYPE_ID(KMWsWindowTreeObserver)
835 This enum encapsulates the set of boolean attribute changes that can be observed
836 using the MWsWindowTreeObserver interface.
840 /** For a window to be drawn, it needs to be activated and visible and have visible parents.
841 Making a window invisible, implies that its children should be invisible as well.
842 The default value for a window is true. */
844 /** Non-fading windows should not be drawn faded regardless of their fade-count.
845 The default value is false. */
847 /** Windows with this attribute enabled uses alpha channel to control its transparency.
848 The default value is false. */
849 EAlphaChannelTransparencyEnabled,
850 /** True if a clipping rect should be applied when drawing a standard text cursor, false otherwise.
851 The default value is false. */
853 /** Implicitly defaults to true. Will remain true as long as the application's primary screendevice
854 is in the same orientation as the device. This information is only given for top-windows,
855 i.e. children of group-windows, and only when wsini.ini is configured with SIZE_MODE > 0. */
859 This enum encapsulates the set of non-boolean attribute changes that can be observed
860 using the MWsWindowTreeObserver interface.
861 @see AttributeChanged */
865 @see MWsStandardTextCursor::Type()*/
867 /** Cursor clip rect.
868 @see MWsStandardTextCursor::ClipRect()*/
871 @see MWsStandardTextCursor::Flags()*/
874 @see MWsStandardTextCursor::Color()*/
877 @see MWsWindow::WindowArea()*/
879 /** Window group name
880 @see MWsWindowGroup::Name()*/
884 Callback to notify that a MWsWindowTreeNode has just been created.
885 Nodes are always added as the left-most sibling as this means they are
886 added in front of exisitng nodes.
887 @param aWindowTreeNode Use to query attributes of the node that has been
888 created. Note that attributes such as e.g. the extent
889 is not yet set by the client when this notification arrives.
890 @param aParent The parent node which aWindowTreeNode has been attached to.
891 Special cases: aParent will be set to NULL for root windows,
892 and set to the root window for floating sprites. */
893 virtual void NodeCreated(const MWsWindowTreeNode& aWindowTreeNode, const MWsWindowTreeNode* aParent) = 0;
895 Callback to notify that a node in the window tree is about to be destroyed.
896 @param aWindowTreeNode Use to query attributes of node that's about to be destroyed. */
897 virtual void NodeReleased(const MWsWindowTreeNode& aWindowTreeNode) = 0;
899 Callback to notify that a node in the window tree has been activated. This
900 event is only generated for windows which has a visual appearance
901 (i.e. root windows and group windows are not activated). Before a node
902 can be drawn it needs to be activated and visible and have a non-zero size.
903 @param aWindowTreeNode Use to query attributes of node that has been activated. */
904 virtual void NodeActivated(const MWsWindowTreeNode& aWindowTreeNode) = 0;
906 Callback to notify that a node's extent has changed. It is guaranteed that there
907 will be at least one NodeExtentChanged notification between the NodeCreated and
908 NodeActivated notifications.
909 Note that when a window has child-windows, those are always moving along with their
910 parent but no NodeExtentChanged notifications will be generated for the child-windows.
911 @param aWindowTreeNode Use to query attributes of the node that has been changed.
912 @param aRect The new rectangle. */
913 virtual void NodeExtentChanged(const MWsWindowTreeNode& aWindowTreeNode, const TRect& aRect) = 0;
915 Callback to notify that the ordinal position of a window has changed.
916 @param aWindowTreeNode Use to query attributes of the node that has been changed..
917 @param aNewPos The new position of this node among its siblings. */
918 virtual void SiblingOrderChanged(const MWsWindowTreeNode& aWindowTreeNode, TInt aNewPos) = 0;
920 Callback to notify that a node has had one of its boolean attributes changed.
921 @param aWindowTreeNode Use to query attributes of the node that has been changed.
922 @param aFlag The attribute that has changed.
923 @param aNewValue The new value for the attribute. */
924 virtual void FlagChanged(const MWsWindowTreeNode& aWindowTreeNode, TFlags aFlag, TBool aNewValue) = 0;
926 Callback to notify that a node has had one of its non-boolean attributes changed.
927 @param aWindowTreeNode Use to identify the affected node and query the new value of the changed attribute.
928 @param aAttribute The attribute that has changed. */
929 virtual void AttributeChanged(const MWsWindowTreeNode& aWindowTreeNode, TAttributes aAttribute) = 0;
931 Callback to notify that a window's fade count has been changed.
932 @param aWindowTreeNode Use to query attributes of the node that has been changed.
933 @param aFadeCount Zero means the window is not faded, an integer > 0 means
934 faded if absolute fading is used, or the number of times
935 SetFaded has been called if using counting fade. */
936 virtual void FadeCountChanged(const MWsWindowTreeNode& aWindowTreeNode, TInt aFadeCount) = 0;
938 Callback to notify that the user defined transparent region of a window has changed.
939 This information is for optimisation purpose only, the rendering engine don't need
940 to do a full back-to-front rendering behind the opaque region.
941 @param aWindowTreeNode Use to query attributes of the node that has been changed.
942 @param aNewTransparentRegion The transparent region defined by the user. Coordinates
943 are relative the window's origin.
944 @param aNewOpaqueRegion The inverse of aNewTransparentRegion. Coordinates are
945 relative the window's origin. */
946 virtual void TransparentRegionChanged(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aNewTransparentRegion, const TRegion* aNewOpaqueRegion) = 0;
948 Callback to notify that a element has been added to this window.
949 The render stages implementing this interface know when elements are added or removed through MWsElement interface.
950 The purpose of the ElementAdded API is only to enable render stages to make an association between the element and the window.
951 @param aWindowTreeNode Use to query attributes of the node that has been changed.
952 @param aElement Use to query attributes of the new element. */
953 virtual void ElementAdded(const MWsWindowTreeNode& aWindowTreeNode, const MWsElement& aElement) = 0;
955 Callback to notify that a window has been moved to another window group.
956 @param aWindowTreeNode Use to query attributes of the node that has been moved.
957 @param aNewWindowGroupNode The window group aWindowTreeNode has been moved to.
958 @see RWindowBase::MoveToGroup */
959 virtual void MovedToWindowGroup(const MWsWindowTreeNode& aWindowTreeNode, const MWsWindowTreeNode& aNewWindowGroupNode) = 0;
961 Callback to notify that a window group chain has been formed or extended.
962 @param aParent The window group node to which a child has been attached.
963 @param aChild The window group node that has been attached to aParent. */
964 virtual void WindowGroupChained(const MWsWindowTreeNode& aParent, const MWsWindowTreeNode& aChild) = 0;
966 Callback to notify that a window group chain has been broken.
967 Special case: Deleting a window group that is part of a chain will break all chaining
968 after the deleted window group and a notification for each node being dequed will be sent.
969 @param aWindowGroupNode The window group chain is broken directly after this window group. */
970 virtual void WindowGroupChainBrokenAfter(const MWsWindowTreeNode& aWindowGroupNode) = 0;
972 Callback to notify that all nodes below aWindowTreeNode should be drawn faded,
973 unless they have the ENonFading flag set.
974 This API is primarily used in conjunction with application frameworks that uses
975 absolute fading rather than counting fade.
976 @param aWindowTreeNode Typically a root window, for which all children should have their
977 fade state set to aFaded.
978 @param aFaded The new fade state to apply. ETrue means faded, EFalse not faded. */
979 virtual void FadeAllChildren(const MWsWindowTreeNode& aWindowTreeNode, TBool aFaded) = 0;
983 An interface optionally provided by render stages, to observe which node in
984 the window tree structure that is being rendered.
986 Text cursors and sprites (floating or non) are annotated by the same APIs.
991 class MWsDrawAnnotationObserver : public MWsObjectProvider
994 DECLARE_WS_TYPE_ID(KMWsDrawAnnotationObserver)
995 virtual void WindowRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
996 virtual void WindowRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
997 virtual void WindowAnimRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
998 virtual void WindowAnimRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
999 virtual void SpriteRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& aRegion) = 0;
1000 virtual void SpriteRedrawEnd(const MWsWindowTreeNode& aWindowTreeNode) = 0;
1001 virtual void SpriteFlash(const MWsWindowTreeNode& aWindowTreeNode, TBool aFlashOn) = 0;
1002 virtual void SegmentRedrawStart(const TRegion& aRegion) = 0;
1003 virtual void SegmentRedrawEnd() = 0;
1007 Implemented by a WSERV screen to respond to window visibility change notifications sent
1008 by a render stage implementing MWsWindowVisibilityNotifier.
1010 Immediately after WSERV sucessfully obtains a pointer to MWsWindowVisibilityNotifier,
1011 WSERV will call MWsWindowVisibilityNotifier::RegisterWindowVisibilityObserver()
1012 to provide a means for the render stage to notify WSERV, when window visibility changes.
1014 @see MWsWindowVisibilityNotifier
1019 class MWsWindowVisibilityObserver
1023 Called by the render stage to indicate a window's visible region has changed.
1024 After this method has been called, it does not need to be called again until
1025 after WSERV calls SendVisibilityChanges.
1026 @see MWsWindowVisibilityNotifier::SendVisibilityChanges
1028 virtual void VisibilityChanged() = 0;
1031 Called by the render stage to update a window's visible region.
1032 @param aWindow The window whose visible region has changed.
1033 @param aVisibleRegion Region of the window not obscured by a fully opaque window. Part of this region could potentially still
1034 be obscured by opaque parts of translucent windows on top of aWindow.
1036 virtual void SetWindowVisibility(const MWsWindow& aWindow, const TRegion& aVisibleRegion) = 0;
1040 This interface may be implemented by a render stage wishing to take over responsibility
1041 from WSERV, for updating a window's visible region.
1042 For example, if a render stage introduces non-WSERV visuals which overlap WSERV windows, WSERV may
1043 need to receive updated window visibility information.
1045 Immediately after sucessfully obtaining this interface, WSERV will call RegisterWindowVisibilityObserver
1046 to provide a means for the render stage to notify WSERV when window visibility changes.
1048 @see MWsWindowVisibilityObserver
1053 class MWsWindowVisibilityNotifier : public MWsObjectProvider
1056 DECLARE_WS_TYPE_ID(KMWsWindowVisibilityNotifier)
1059 Register to be notified when window visibility changes.
1060 @param aWindowVisibilityObserver Observer to be notified.
1062 virtual void RegisterWindowVisibilityObserver(MWsWindowVisibilityObserver* aWindowVisibilityObserver) = 0;
1065 Register to be notified when visibility of a specific window changes.
1066 After registering a window, the render stage must immediately provide the
1067 current visible region by calling VisibilityChanged() and later, in response
1068 to SendVisibilityChanges, call SetWindowVisibility.
1069 RegisterWindow and UnregisterWindow are symmetrical operations. For each
1070 call to RegisterWindow, there will follow exactly one call to UnregisterWindow.
1071 @param aWindow Window for which WSERV needs accurate visibility information.
1072 @see MWsWindowVisibilityObserver
1074 virtual void RegisterWindow(const MWsWindow& aWindow) = 0;
1077 Stops visibility notifications being sent for the specified window.
1078 RegisterWindow and UnregisterWindow are symmetrical operations. For each
1079 call to RegisterWindow, there will follow exactly one call to UnregisterWindow.
1080 @param aWindow Window for which visibility notifications are no longer required.
1082 virtual void UnregisterWindow(const MWsWindow& aWindow) = 0;
1085 Asks the render stage to call SetWindowVisibility for each window whose
1086 visible region has changed.
1087 All visible region changes must be sent before this method returns.
1088 @see MWsWindowVisibilityObserver
1090 virtual void SendVisibilityChanges() = 0;
1093 /** This is an extension of the MWsScreen interface for handling the
1094 animation aspects of the redraw sequence.
1099 class MWsScreenRedraw: public MWsObjectProvider
1102 DECLARE_WS_TYPE_ID(KWsScreenRedraw)
1103 /**Sets the screen redraw observer.
1106 virtual void SetObserver(MWsScreenRedrawObserver* aObserver) = 0;
1107 /** Checks if there is a redraw in progress or scheduled to take place.
1108 @return Returns ETrue if there is an update pending.
1110 virtual TBool IsUpdatePending() = 0;
1111 /** Gets the current time according to the animation scheduler
1112 @return The current time as a TTime reference.
1114 virtual const TTime& Now() const = 0;
1115 /** Schedule a render of the screen without requesting any area of it
1116 to be redrawn. Effectively, request a rerun of the render stages.
1117 @param aFromNow The time from now, in microseconds, to perform the render.
1119 virtual void ScheduleRender(const TTimeIntervalMicroSeconds& aFromNow) = 0;
1120 /** Gets the the animation region for this screen redraw.
1121 @return the Region being redrawn during the animation
1123 virtual const TRegion * AnimationRegion() const = 0;
1124 /** Updates the screen device to reflect any animation changes
1126 virtual void UpdateDevice() = 0;
1129 /** This is part of the MWsScreenRedraw interface
1134 class MWsScreenRedrawObserver: public MWsObjectProvider
1137 DECLARE_WS_TYPE_ID(KWsScreenRedrawObserver)
1138 /** Callback function that gets called after the completion of every redraw sequence.
1139 @see MWsScreenRedraw::SetObserver
1143 virtual void ScreenUpdated(TInt aScreenNumber) = 0;
1146 /** This is part of the MGraphicDrawerInterface
1151 class MWsMemoryRelease : public MWsObjectProvider
1154 DECLARE_WS_TYPE_ID(KMWsMemoryRelease)
1155 enum TMemoryReleaseLevel
1161 /** This function is called on registered memory release objects whenever there
1162 is insufficient memory available to honour an Alloc or ReAlloc in the window server
1163 process. It may be called up to three times, once for each level defined in TLevel.
1164 The meaning of each level is open to interpretation by individual implementations.
1165 @see MGraphicDrawerEnvironment::RegisterMemoryRelease
1167 @return ETrue to indicate that memory was freed, EFalse otherwise.
1171 virtual TBool ReleaseMemory(TMemoryReleaseLevel aLevel) = 0;
1174 #if !defined(SYMBIAN_GRAPHICS_GCE)
1175 /** This is an extension of the MWsGc. This interface is not used in
1176 non-NGA configurations. It has been removed from NGA configurations.
1182 class MWsGcClipRect : public MWsObjectProvider
1185 DECLARE_WS_TYPE_ID(KMWsGcClipRect)
1186 /** Sets a master clipping rectangle on the GC. This will combine with any clipping rectangles
1187 specified by the client.
1190 virtual void SetClipRect(TRect aRect) = 0;
1191 /** Resets the master clipping rectangle specified in SetMasterClipRect
1193 virtual void ResetClipRect() = 0;
1194 /** Returns the combined clipping rectangle.
1195 @param aRect this is set to the clipping rectangle
1196 @param aSet this is true if there is a clipping rectangle in effect
1198 virtual void GetClipRect(TRect & aRect, TBool & aSet) = 0;
1202 /** DebugBarDrawer interface
1207 class MWsDebugBar : public MWsObjectProvider
1210 DECLARE_WS_TYPE_ID(KMWsDebugBar)
1214 * Prints a debug information bar overlaid at the top the screen.
1216 * @param aDebugText An array of text lines.
1218 virtual void DrawDebugBar(const TArray<TPtrC>& aDebugText)=0;
1221 /** This is an extension of MWsGc and provides plugin fading capabilities for wserv.
1222 Default implementation of the plugin uses bitgdi fade.
1228 class MWsFader : public MWsObjectProvider
1231 DECLARE_WS_TYPE_ID(KMWsFader)
1234 /** Sets any parameters for the fade.
1235 @param aData Descriptor containing the fade parameters
1237 virtual void SetFadingParameters(const TDesC8& aData)=0;
1238 #if !defined(SYMBIAN_GRAPHICS_GCE)
1239 /** Perform a fade of the specified region
1240 @param aBitGc CFbsBitGc to perform the fading with.
1241 @param aRegion TRegion containing the region that the fading is to be performed on.
1243 virtual void FadeArea(CFbsBitGc* aBitGc,const TRegion * aRegion)=0;
1245 /** Perform a fade of the specified region
1246 @param aRegion TRegion containing the region that the fading is to be performed on.
1248 virtual void FadeArea(const TRegion& aRegion)=0;
1252 /** Plugin Manager Interface
1256 class MWsPluginManager : public MWsObjectProvider
1259 DECLARE_WS_TYPE_ID(KMWsPluginManager)
1261 /** Resolve an instance of an interface
1264 virtual TAny* ResolvePluginInterface(TUint aTypeId) = 0;
1267 /** An Interface to allow CRP's and CWsPlugins to access the wserv ini file
1271 class MWsIniFile : public MWsObjectProvider
1274 DECLARE_WS_TYPE_ID(KMWsIniFile)
1276 /** Find the value of the specified variable if present in the window server ini file.
1277 @param aVarName TDesC containing the name of the variable to find.
1278 @param aResult TPtrC that gets set to the value of the ini variable.
1279 @return ETrue if ini file variable found
1281 virtual TBool FindVar(const TDesC &aVarName, TPtrC &aResult) = 0;
1283 /** Find the value of the specified variable if present in the window server ini file.
1284 @param aVarName TDesC containing the name of the variable to find
1285 @param aResult TInt that gets set to the value of the ini variable
1286 @return ETrue if ini file variable found
1288 virtual TBool FindVar(const TDesC &aVarName, TInt &aResult) = 0;
1290 /** Find if the variable is present in the ini file
1291 @param aVarName TDesC containing the name of the variable to find
1292 @return ETrue if ini file variable found
1294 virtual TBool FindVar(const TDesC &aVarName) = 0;
1296 /** Find if the variable is present in the [SCREENx] section
1297 @param aScreen TInt containing the screen number
1298 @param aVarName TDesC containing the name of the variable to find
1299 @return ETrue if ini file variable found
1301 virtual TBool FindVar( TInt aScreen, const TDesC &aVarName) = 0;
1303 /** Find the value of the specified variable if present in the [SCREENx] section of the ini file
1304 @param aScreen TInt containing the screen number
1305 @param aVarName TDesC containing the name of the variable to find
1306 @param aResult TInt that gets set to the value of the ini variable
1307 @return ETrue if ini file variable found
1309 virtual TBool FindVar( TInt aScreen, const TDesC &aVarName, TInt &aResult) = 0;
1311 /** Find the value of the specified variable if present in the [SCREENx] section of the ini file
1312 @param aScreen TInt containing the screen number
1313 @param aVarName TDesC containing the name of the variable to find
1314 @param aResult TPtrC that gets set to the value of the ini variable.
1315 @return ETrue if ini file variable found
1317 virtual TBool FindVar( TInt aScreen, const TDesC& aVarName, TPtrC &aResult) = 0;
1319 /** Find if the specified variable is present in the named section of the ini file
1320 @param aSection TDesC containing the name of the section
1321 @param aVarName TDesC containing the name of the variable to find
1322 @return ETrue if ini file variable found
1324 virtual TBool FindVar(const TDesC& aSection, const TDesC &aVarName) = 0;
1326 /** Find the value of the specified variable in the named section of the ini file.
1327 @param aSection TDesC containing the name of the section
1328 @param aVarName TDesC containing the name of the variable to find
1329 @param aResult TInt that gets set to the value of the ini variable
1330 @return ETrue if ini file variable found
1332 virtual TBool FindVar(const TDesC& aSection, const TDesC &aVarName, TInt &aResult) = 0;
1334 /** Find the value of the specified variable in the named section of the ini file.
1335 @param aSection TDesC containing the name of the section
1336 @param aVarName TDesC containing the name of the variable to find
1337 @param aResult TPtrC that gets set to the value of the ini variable.
1338 @return ETrue if ini file variable found
1340 virtual TBool FindVar(const TDesC& aSection, const TDesC& aVarName, TPtrC &aResult) = 0;
1343 /** An interface that allows CRP's and CWsPlugin derived objects to handle events like anim dll's
1347 class MWsRawEventServer : public MWsObjectProvider
1350 DECLARE_WS_TYPE_ID(KMWsRawEventServer)
1352 /** Register to be notified when some kernel events occur.
1353 @return KErrNone if successful
1355 virtual TInt RegisterRawEventHandler(MEventHandler* aHandler) = 0;
1356 /** Unregister from events notification
1358 virtual void UnregisterRawEventHandler(MEventHandler* aHandler) = 0;
1359 /** Creates a new raw event
1361 virtual void PostRawEvent(const TRawEvent & aEvent) = 0;
1362 /** Creates a new key event
1364 virtual void PostKeyEvent(const TKeyEvent & aEvent) = 0;
1367 #endif //#ifndef __WSGRAPHICDRAWERINTEFACE_H__