1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserver/inc/Graphics/wsscreendevice.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,79 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Interface for Render Stage Screen Abstraction
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @publishedPartner
1.23 + @prototype
1.24 +*/
1.25 +
1.26 +#ifndef WSSCREENDEVICE_H
1.27 +#define WSSCREENDEVICE_H
1.28 +
1.29 +#include <w32std.h>
1.30 +#include <graphics/wsgraphicdrawerinterface.h>
1.31 +
1.32 +/** Render Stage Palette support.
1.33 +
1.34 +This interface is intended to be optionally provided by a Render Stage
1.35 +when the pixel target can provide a Colour Palette. Not all pixel targets have
1.36 +this feature, for example OpenVG only targets.
1.37 +@publishedPartner
1.38 +@prototype
1.39 +*/
1.40 +class MWsPalette : public MWsObjectProvider
1.41 + {
1.42 +public:
1.43 + DECLARE_WS_TYPE_ID(KMWsPalette)
1.44 + virtual void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const = 0;
1.45 + virtual TInt GetPalette(CPalette*& aPalette) const = 0;
1.46 + virtual TInt SetCustomPalette(const CPalette* aPalette) = 0;
1.47 + };
1.48 +
1.49 +
1.50 +/** Render Stage Screen Device abstraction.
1.51 +
1.52 +Render Stages provide this interface as an abstraction of the target screen.
1.53 +The screen may not be pixel based, in which case read back of pixel data may
1.54 +not be a reflection of what appears on the screen. The screen might also only
1.55 +be partially readable, for example external video surfaces may be blanked out
1.56 +when a read back is done. The intention of the CopyScreenToBitmap methods is
1.57 +to provide a means to obtain a snapshot of the entire screen for architectures
1.58 +where a composition of the screen can be done once followed by a read back
1.59 +of the entire screen, as opposed to servicing a sequence of GetScanLine calls
1.60 +which may be prohibitively expensive.
1.61 +
1.62 +@publishedPartner
1.63 +@prototype
1.64 +*/
1.65 +class MWsScreenDevice : public MWsObjectProvider
1.66 + {
1.67 +public:
1.68 + DECLARE_WS_TYPE_ID(KMWsScreenDevice)
1.69 +
1.70 + virtual TInt ScreenNumber() const = 0;
1.71 + virtual TDisplayMode DisplayMode() const = 0;
1.72 + virtual TSize SizeInPixels() const = 0;
1.73 + virtual TSize SizeInTwips() const = 0;
1.74 + virtual TRect PointerRect() const = 0;
1.75 + virtual void GetPixel(TRgb& aColor,const TPoint& aPixel) const = 0;
1.76 + virtual void GetScanLine(TDes8& aScanLine,const TPoint& aStartPixel,TInt aPixelLength, TDisplayMode aDispMode) const = 0;
1.77 + virtual TBool RectCompare(const TRect& aRect1, const TRect& aRect2) const = 0;
1.78 + virtual void CopyScreenToBitmapL(CFbsBitmap* aBitmap, const TRect& aRect) const = 0;
1.79 + virtual void ClearDisplay(TRgb aBackColor)=0;
1.80 + };
1.81 +
1.82 +#endif // WSSCREENDEVICE_H