windowing/windowserver/nga/CLIENT/scrdevextension.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2008-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 //
       
    15 
       
    16 #ifndef SCRDEVEXTENSION_H_
       
    17 #define SCRDEVEXTENSION_H_
       
    18 
       
    19 #include <graphics/displaycontrol.h>
       
    20 #include <graphics/displaymapping.h>
       
    21 #include <graphics/testscreencapture.h>
       
    22 #include <w32std.h>
       
    23 
       
    24 
       
    25 class CWsScreenDevice::CScrDevExtension : public CBase, public MDisplayControl, public MDisplayMapping, public MTestScreenCapture, public MWsClientClass
       
    26 {
       
    27 public:
       
    28 	CScrDevExtension(RWsBuffer *aBuffer,TInt32 aWsHandle);
       
    29 	~CScrDevExtension();
       
    30 //create or access the 1:1 extension instance behind the screen device
       
    31 	TInt RepeatableConstruct();
       
    32 //get a specific interface
       
    33 	void*	GetInterface(TUint aId);
       
    34 //Access pre-existing data members
       
    35 	CFbsTypefaceStore* TypefaceStore();
       
    36 	void  SetTypefaceStore(CFbsTypefaceStore*);
       
    37 //implementing MDisplayControlBase 
       
    38 	virtual TInt NumberOfResolutions() const;
       
    39 	virtual TInt GetResolutions(RArray<TResolution>& aResolutions) const;
       
    40 	virtual void GetConfiguration(TDisplayConfiguration& aConfig) const;
       
    41 	virtual TInt SetConfiguration(const TDisplayConfiguration& aConfig);
       
    42 	virtual TInt PreferredDisplayVersion() const;
       
    43 //implementing MDisplayControl
       
    44 	virtual TBool DisplayChangeEventsEnabled() const;
       
    45 	virtual void EnableDisplayChangeEvents(TBool aEnable);
       
    46 //implementing MDisplayMapping
       
    47 	virtual TInt MapCoordinates(TCoordinateSpace aSourceSpace, const TRect& aSource, TCoordinateSpace aTargetSpace, TRect& aTarget) const;
       
    48 	virtual void GetMaximumWindowExtent(TRect& aExtent) const;
       
    49 	virtual void GetMaximumSurfaceSize(TSize& aPixels, TSize& aTwips) const;
       
    50 	virtual void GetDisplayExtentOfWindow(const RWindowBase& aWindow, TRect& aExtent) const;
       
    51 //implementing MTestScreenCapture
       
    52 	virtual TInt TranslateExtent(const TRect& aInitial, TRect& aTarget) const;
       
    53 	virtual TInt GetCompositedSize(TSize& aSize) const;
       
    54 	virtual TInt ComposeScreen(const CFbsBitmap& aBitmap) const;
       
    55 private:
       
    56 	//function used by GetResolutions
       
    57 	TInt FillResolutionArray(TInt aNumOfRes, RArray<TResolution>& aResolutions) const;
       
    58 protected:
       
    59 	MWsClientClass* WriteClient() const;
       
    60 	TInt	iSupportedExtensionsBits;
       
    61 	CFbsTypefaceStore* iTypefaceStore;
       
    62 };
       
    63 
       
    64 #endif /*SCRDEVEXTENSION_H_*/