|
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 // Interface for Render Stage Screen Abstraction |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @publishedPartner |
|
20 @prototype |
|
21 */ |
|
22 |
|
23 #ifndef WSSCREENDEVICE_H |
|
24 #define WSSCREENDEVICE_H |
|
25 |
|
26 #include <w32std.h> |
|
27 #include <graphics/wsgraphicdrawerinterface.h> |
|
28 |
|
29 /** Render Stage Palette support. |
|
30 |
|
31 This interface is intended to be optionally provided by a Render Stage |
|
32 when the pixel target can provide a Colour Palette. Not all pixel targets have |
|
33 this feature, for example OpenVG only targets. |
|
34 @publishedPartner |
|
35 @prototype |
|
36 */ |
|
37 class MWsPalette : public MWsObjectProvider |
|
38 { |
|
39 public: |
|
40 DECLARE_WS_TYPE_ID(KMWsPalette) |
|
41 virtual void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const = 0; |
|
42 virtual TInt GetPalette(CPalette*& aPalette) const = 0; |
|
43 virtual TInt SetCustomPalette(const CPalette* aPalette) = 0; |
|
44 }; |
|
45 |
|
46 |
|
47 /** Render Stage Screen Device abstraction. |
|
48 |
|
49 Render Stages provide this interface as an abstraction of the target screen. |
|
50 The screen may not be pixel based, in which case read back of pixel data may |
|
51 not be a reflection of what appears on the screen. The screen might also only |
|
52 be partially readable, for example external video surfaces may be blanked out |
|
53 when a read back is done. The intention of the CopyScreenToBitmap methods is |
|
54 to provide a means to obtain a snapshot of the entire screen for architectures |
|
55 where a composition of the screen can be done once followed by a read back |
|
56 of the entire screen, as opposed to servicing a sequence of GetScanLine calls |
|
57 which may be prohibitively expensive. |
|
58 |
|
59 @publishedPartner |
|
60 @prototype |
|
61 */ |
|
62 class MWsScreenDevice : public MWsObjectProvider |
|
63 { |
|
64 public: |
|
65 DECLARE_WS_TYPE_ID(KMWsScreenDevice) |
|
66 |
|
67 virtual TInt ScreenNumber() const = 0; |
|
68 virtual TDisplayMode DisplayMode() const = 0; |
|
69 virtual TSize SizeInPixels() const = 0; |
|
70 virtual TSize SizeInTwips() const = 0; |
|
71 virtual TRect PointerRect() const = 0; |
|
72 virtual void GetPixel(TRgb& aColor,const TPoint& aPixel) const = 0; |
|
73 virtual void GetScanLine(TDes8& aScanLine,const TPoint& aStartPixel,TInt aPixelLength, TDisplayMode aDispMode) const = 0; |
|
74 virtual TBool RectCompare(const TRect& aRect1, const TRect& aRect2) const = 0; |
|
75 virtual void CopyScreenToBitmapL(CFbsBitmap* aBitmap, const TRect& aRect) const = 0; |
|
76 virtual void ClearDisplay(TRgb aBackColor)=0; |
|
77 }; |
|
78 |
|
79 #endif // WSSCREENDEVICE_H |