sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __COMMANDBUFFER_H__
|
sl@0
|
17 |
#define __COMMANDBUFFER_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <w32std.h>
|
sl@0
|
20 |
#include <s32mem.h>
|
sl@0
|
21 |
#include <graphics/remotegcutils.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
class CBitmapCache;
|
sl@0
|
24 |
class CFontsCache;
|
sl@0
|
25 |
class CDrawableCacheBase;
|
sl@0
|
26 |
class CDrawSection;
|
sl@0
|
27 |
class MWsGraphicsContext;
|
sl@0
|
28 |
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
MWsGraphicResolver should be implemented by CWsGraphicDrawers that want to be able to play DrawWsGraphic drawcommands.
|
sl@0
|
31 |
@publishedPartner
|
sl@0
|
32 |
@released*/
|
sl@0
|
33 |
class MWsGraphicResolver
|
sl@0
|
34 |
{
|
sl@0
|
35 |
public:
|
sl@0
|
36 |
/**
|
sl@0
|
37 |
This method is called when a DrawWsGraphics drawcommand is played by the commandbuffer. The CWsGraphicDrawer that
|
sl@0
|
38 |
implements this method needs to resolve the WsGraphics from the MWsGraphicDrawerEnvironment and then draw it.
|
sl@0
|
39 |
|
sl@0
|
40 |
@param aId The id of the WsGraphic.
|
sl@0
|
41 |
@param aIsUid If ETrue the WsGraphic has a uid.
|
sl@0
|
42 |
@param aRect The rect to draw the WsGraphic in.
|
sl@0
|
43 |
@param aData Data passed along with the DrawWsGraphic command.
|
sl@0
|
44 |
*/
|
sl@0
|
45 |
virtual void DrawWsGraphic(TInt aId, TBool aIsUid, const TRect& aRect, const TDesC8& aData) const = 0;
|
sl@0
|
46 |
};
|
sl@0
|
47 |
|
sl@0
|
48 |
/**
|
sl@0
|
49 |
The commandbuffer can record and play drawcommands.
|
sl@0
|
50 |
It has an array of CDrawSections which contains information about every redraw that has been recorded.
|
sl@0
|
51 |
@publishedPartner
|
sl@0
|
52 |
@released*/
|
sl@0
|
53 |
NONSHARABLE_CLASS(CCommandBuffer): public CBase
|
sl@0
|
54 |
{
|
sl@0
|
55 |
public:
|
sl@0
|
56 |
IMPORT_C static CCommandBuffer* NewL();
|
sl@0
|
57 |
IMPORT_C ~CCommandBuffer();
|
sl@0
|
58 |
IMPORT_C void InternalizeL(const TDesC8& aBuf);
|
sl@0
|
59 |
IMPORT_C void InternalizeAppendL(const TDesC8& aBuf);
|
sl@0
|
60 |
IMPORT_C const TRegion& ClippingRegion() const;
|
sl@0
|
61 |
IMPORT_C TInt Play(const TPoint& aPosition, const TRect& aSourceRect, const MWsGraphicResolver& aWsGraphicResolver, CBitmapContext& aBitmapContext);
|
sl@0
|
62 |
IMPORT_C TInt Play(const TPoint& aMasterOrigin, const TRegion * aMasterClippingRegion, const TRect& aMasterClippingRect, const MWsGraphicResolver& aWsGraphicResolver, CBitmapContext& aContext);
|
sl@0
|
63 |
IMPORT_C TInt Play(const TPoint& aOffset, const TRegion* aClippingRegion, const TRect& aSourceRect, const MWsGraphicResolver& aWsGraphicResolver, MWsGraphicsContext& aGraphicsContext);
|
sl@0
|
64 |
IMPORT_C TInt Play(const TPoint& aOffset, const TRegion* aClippingRegion, const TRect& aSourceRect, RWsSession& aWsSession, CWindowGc& aWindowGc);
|
sl@0
|
65 |
|
sl@0
|
66 |
IMPORT_C TBool IsIdentical(const CCommandBuffer& aBuffer) const;
|
sl@0
|
67 |
void ExternalizeL(RWsGraphicMsgBuf& aMsgBuf, TBool aEntireBuffer);
|
sl@0
|
68 |
void Reset();
|
sl@0
|
69 |
void Prepare(const TRect& aDrawRect);
|
sl@0
|
70 |
TInt Finish(const TRect& aDrawRect, const TRect& aBoundingRect, TBool aHasBitmapCommand);
|
sl@0
|
71 |
|
sl@0
|
72 |
template<typename TClass> void Write(const TClass& aValue);
|
sl@0
|
73 |
void WriteText(const TDesC16 &aText);
|
sl@0
|
74 |
void WriteText(const TDesC8 &aText);
|
sl@0
|
75 |
|
sl@0
|
76 |
private:
|
sl@0
|
77 |
void ConstructL();
|
sl@0
|
78 |
CCommandBuffer();
|
sl@0
|
79 |
|
sl@0
|
80 |
// Help methods
|
sl@0
|
81 |
void Tidy();
|
sl@0
|
82 |
TBool AllSectionsExternalized() const;
|
sl@0
|
83 |
TBool CheckForDuplicate(const CDrawSection& aDrawSection) const;
|
sl@0
|
84 |
void UpdateClippingRegion(TInt aDrawSectionIndex);
|
sl@0
|
85 |
// Reading writing
|
sl@0
|
86 |
void Write(const TUint8* aSrc, TUint aLength);
|
sl@0
|
87 |
void DoWriteTextL(const TDesC8 &aText);
|
sl@0
|
88 |
void ReadL(TUint8* aDest, TUint aLength);
|
sl@0
|
89 |
template<typename TClass> void ReadL(TClass& aValue);
|
sl@0
|
90 |
void ReadTextLC(TPtrC8& aText);
|
sl@0
|
91 |
void ReadTextLC(TPtrC16& aText);
|
sl@0
|
92 |
void DoReadTextLC(TPtrC8& aText,TBool a16Bit);
|
sl@0
|
93 |
|
sl@0
|
94 |
// Drawing the commands
|
sl@0
|
95 |
#ifdef SYMBIAN_GRAPHICS_GCE
|
sl@0
|
96 |
template<typename ContextType> void DoPlayL(const MWsGraphicResolver& aWsGraphicResolver, ContextType& aGraphicsContext);
|
sl@0
|
97 |
template<typename ContextType> void DrawSectionL(const CDrawSection& aDrawSection, const MWsGraphicResolver& aWsGraphicResolver, ContextType& aGraphicsContext);
|
sl@0
|
98 |
#else
|
sl@0
|
99 |
void DoPlayL(const MWsGraphicResolver& aWsGraphicResolver, CBitmapContext& aBitmapContext);
|
sl@0
|
100 |
void DrawSectionL(const CDrawSection& aDrawSection, const MWsGraphicResolver& aWsGraphicResolver, CBitmapContext& aBitmapContext);
|
sl@0
|
101 |
#endif
|
sl@0
|
102 |
#if defined(SYMBIAN_GRAPHICS_GCE)
|
sl@0
|
103 |
template<typename ContextType> void Clear(ContextType& aGraphicsContext) const;
|
sl@0
|
104 |
template<typename ContextType> void ClearRectL(ContextType& aGraphicsContext);
|
sl@0
|
105 |
template<typename ContextType> void CopyRectL(ContextType& aGraphicsContext);
|
sl@0
|
106 |
template<typename ContextType> void BitBlt1L(ContextType& aGraphicsContext);
|
sl@0
|
107 |
void DoBitBlt1L(CWindowGc& aWindowGc, TPoint aPoint, TInt aHandle);
|
sl@0
|
108 |
void DoBitBlt1L(MWsGraphicsContext& aGraphicsContext, TPoint aPoint, TInt aHandle);
|
sl@0
|
109 |
template<typename ContextType> void BitBlt2L(ContextType& aGraphicsContext);
|
sl@0
|
110 |
void DoBitBlt2L(CWindowGc& aWindowGc, TPoint aPoint, TInt aHandle, TRect aSourceRect);
|
sl@0
|
111 |
void DoBitBlt2L(MWsGraphicsContext& aGraphicsContext, TPoint aPoint, TInt aHandle, TRect aSourceRect);
|
sl@0
|
112 |
template<typename ContextType> void BitBltMaskedL(ContextType& aGraphicsContext);
|
sl@0
|
113 |
void DoBitBltMaskedL(CWindowGc& aWindowGc, TPoint aPoint, TInt aBitmapHandle, TRect aSourceRect, TInt aMaskHandle, TBool aInvertMask);
|
sl@0
|
114 |
void DoBitBltMaskedL(MWsGraphicsContext& aGraphicsContext, TPoint aPoint, TInt aBitmapHandle, TRect aSourceRect, TInt aMaskHandle, TBool aInvertMask);
|
sl@0
|
115 |
void SetFadedL(CWindowGc& aWindowGc);
|
sl@0
|
116 |
void SetFadingParametersL(CWindowGc& aWindowGc);
|
sl@0
|
117 |
template<typename ContextType> void AlphaBlendBitmapsL(ContextType& aGraphicsContext);
|
sl@0
|
118 |
void DoAlphaBlendBitmapsL(CWindowGc& aWindowGc, TPoint aDestPoint, TInt aSrcHandle, TRect aSourceRect, TInt aAlphaHandle, TPoint aAlphaPoint);
|
sl@0
|
119 |
void DoAlphaBlendBitmapsL(MWsGraphicsContext& aGraphicsContext, TPoint aDestPoint, TInt aSrcHandle, TRect aSourceRect, TInt aAlphaHandle, TPoint aAlphaPoint);
|
sl@0
|
120 |
template<typename ContextType> void SetOriginL(ContextType& aGraphicsContext);
|
sl@0
|
121 |
template<typename ContextType> void SetDrawModeL(ContextType& aGraphicsContext);
|
sl@0
|
122 |
void DoSetDrawModeL(CWindowGc& aWindowGc, CGraphicsContext::TDrawMode aDrawMode);
|
sl@0
|
123 |
void DoSetDrawModeL(MWsGraphicsContext& aGraphicsContext, CGraphicsContext::TDrawMode aDrawMode);
|
sl@0
|
124 |
template<typename ContextType> void SetClippingRectL(ContextType& aGraphicsContext);
|
sl@0
|
125 |
template<typename ContextType> void CancelClippingRect(ContextType& aGraphicsContext);
|
sl@0
|
126 |
void Reset(CWindowGc& aWindowGc);
|
sl@0
|
127 |
void Reset(MWsGraphicsContext& aGraphicsContext);
|
sl@0
|
128 |
template<typename ContextType> void UseFontL(ContextType& aGraphicsContext);
|
sl@0
|
129 |
void DoUseFontL(CWindowGc& aWindowGc, TInt aFontHandle);
|
sl@0
|
130 |
void DoUseFontL(MWsGraphicsContext& aGraphicsContext, TInt aFontHandle);
|
sl@0
|
131 |
void DiscardFont(CWindowGc& aWindowGc) const;
|
sl@0
|
132 |
void DiscardFont(MWsGraphicsContext& aGraphicsContext) const;
|
sl@0
|
133 |
template<typename ContextType> void SetUnderlineStyleL(ContextType& aGraphicsContext);
|
sl@0
|
134 |
void DoSetUnderlineStyleL(CWindowGc& aWindowGc, TFontUnderline aUnderlineStyle);
|
sl@0
|
135 |
void DoSetUnderlineStyleL(MWsGraphicsContext& aGraphicsContext, TFontUnderline aUnderlineStyle);
|
sl@0
|
136 |
template<typename ContextType> void SetStrikethroughStyleL(ContextType& aGraphicsContext);
|
sl@0
|
137 |
void DoSetStrikethroughStyleL(CWindowGc& aWindowGc, TFontStrikethrough aStrikethroughStyle);
|
sl@0
|
138 |
void DoSetStrikethroughStyleL(MWsGraphicsContext& aGraphicsContext, TFontStrikethrough aStrikethroughStyle);
|
sl@0
|
139 |
template<typename ContextType> void SetWordJustificationL(ContextType& aGraphicsContext);
|
sl@0
|
140 |
template<typename ContextType> void SetCharJustificationL(ContextType& aGraphicsContext);
|
sl@0
|
141 |
template<typename ContextType> void SetPenColorL(ContextType& aGraphicsContext);
|
sl@0
|
142 |
template<typename ContextType> void SetPenStyleL(ContextType& aGraphicsContext);
|
sl@0
|
143 |
void DoSetPenStyleL(CWindowGc& aWindowGc, CGraphicsContext::TPenStyle aPenStyle);
|
sl@0
|
144 |
void DoSetPenStyleL(MWsGraphicsContext& aGraphicsContext, CGraphicsContext::TPenStyle aPenStyle);
|
sl@0
|
145 |
template<typename ContextType> void SetPenSizeL(ContextType& aGraphicsContext);
|
sl@0
|
146 |
void DoSetPenSizeL(CWindowGc& aWindowGc, TSize aSize);
|
sl@0
|
147 |
void DoSetPenSizeL(MWsGraphicsContext& aGraphicsContext, TSize aSize);
|
sl@0
|
148 |
template<typename ContextType> void SetBrushColorL(ContextType& aGraphicsContext);
|
sl@0
|
149 |
template<typename ContextType> void SetBrushStyleL(ContextType& aGraphicsContext);
|
sl@0
|
150 |
void DoSetBrushStyleL(CWindowGc& aWindowGc, CGraphicsContext::TBrushStyle aBrushStyle);
|
sl@0
|
151 |
void DoSetBrushStyleL(MWsGraphicsContext& aGraphicsContext, CGraphicsContext::TBrushStyle aBrushStyle);
|
sl@0
|
152 |
template<typename ContextType> void SetBrushOriginL(ContextType& aGraphicsContext);
|
sl@0
|
153 |
template<typename ContextType> void UseBrushPatternL(ContextType& aGraphicsContext);
|
sl@0
|
154 |
void DoUseBrushPatternL(CWindowGc& aWindowGc, TInt aDeviceHandle);
|
sl@0
|
155 |
void DoUseBrushPatternL(MWsGraphicsContext& aGraphicsContext, TInt aDeviceHandle);
|
sl@0
|
156 |
void DiscardBrushPattern(CWindowGc& aWindowGc) const;
|
sl@0
|
157 |
void DiscardBrushPattern(MWsGraphicsContext& aGraphicsContext) const;
|
sl@0
|
158 |
template<typename ContextType> void MoveToL(ContextType& aGraphicsContext);
|
sl@0
|
159 |
template<typename ContextType> void MoveByL(ContextType& aGraphicsContext);
|
sl@0
|
160 |
template<typename ContextType> void PlotL(ContextType& aGraphicsContext);
|
sl@0
|
161 |
template<typename ContextType> void DrawArcL(ContextType& aGraphicsContext);
|
sl@0
|
162 |
template<typename ContextType> void DrawLineL(ContextType& aGraphicsContext);
|
sl@0
|
163 |
template<typename ContextType> void DrawLineToL(ContextType& aGraphicsContext);
|
sl@0
|
164 |
template<typename ContextType> void DrawLineByL(ContextType& aGraphicsContext);
|
sl@0
|
165 |
void DrawPolyLineL(CWindowGc& aWindowGc);
|
sl@0
|
166 |
void DrawPolyLineL(MWsGraphicsContext& aGraphicsContext);
|
sl@0
|
167 |
template<typename ContextType> void DrawPieL(ContextType& aGraphicsContext);
|
sl@0
|
168 |
template<typename ContextType> void DrawEllipseL(ContextType& aGraphicsContext);
|
sl@0
|
169 |
template<typename ContextType> void DrawRectL(ContextType& aGraphicsContext);
|
sl@0
|
170 |
template<typename ContextType> void DrawRoundRectL(ContextType& aGraphicsContext);
|
sl@0
|
171 |
void DrawPolygonL(CWindowGc& aWindowGc);
|
sl@0
|
172 |
void DrawPolygonL(MWsGraphicsContext& aGraphicsContext);
|
sl@0
|
173 |
void DrawBitmap1L(CWindowGc& aWindowGc);
|
sl@0
|
174 |
void DrawBitmap1L(MWsGraphicsContext& aGraphicsContext);
|
sl@0
|
175 |
template<typename ContextType> void DrawBitmap2L(ContextType& aGraphicsContext);
|
sl@0
|
176 |
void DoDrawBitmap2L(CWindowGc& aWindowGc, TRect aDestRect, TInt aBitmapHandle);
|
sl@0
|
177 |
void DoDrawBitmap2L(MWsGraphicsContext& aGraphicsContext, TRect aDestRect, TInt aBitmapHandle);
|
sl@0
|
178 |
template<typename ContextType> void DrawBitmap3L(ContextType& aGraphicsContext);
|
sl@0
|
179 |
void DoDrawBitmap3L(CWindowGc& aWindowGc, TRect aDestRect, TInt aBitmapHandle, TRect aSourceRect);
|
sl@0
|
180 |
void DoDrawBitmap3L(MWsGraphicsContext& aGraphicsContext, TRect aDestRect, TInt aBitmapHandle, TRect aSourceRect);
|
sl@0
|
181 |
template<typename ContextType> void DrawBitmapMaskedL(ContextType& aGraphicsContext);
|
sl@0
|
182 |
void DoDrawBitmapMaskedL(CWindowGc& aWindowGc, TRect aDestRect, TInt aBitmapHandle, TRect aSourceRect, TInt aMaskHandle, TBool aInvertedMask);
|
sl@0
|
183 |
void DoDrawBitmapMaskedL(MWsGraphicsContext& aGraphicsContext, TRect aDestRect, TInt aBitmapHandle, TRect aSourceRect, TInt aMaskHandle, TBool aInvertedMask);
|
sl@0
|
184 |
template<typename ContextType> void DrawText1L(ContextType& aGraphicsContext);
|
sl@0
|
185 |
void DoDrawText1L(CWindowGc& aWindowGc, TPtrC16 aText, TPoint aPoint);
|
sl@0
|
186 |
void DoDrawText1L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, TPoint aPoint);
|
sl@0
|
187 |
template<typename ContextType> void DrawText2L(ContextType& aGraphicsContext);
|
sl@0
|
188 |
void DoDrawText2L(CWindowGc& aWindowGc, TPtrC16 aText, TRect aBox, TInt aBaselineOffset, CGraphicsContext::TTextAlign aHoriz, TInt aLeftMargin);
|
sl@0
|
189 |
void DoDrawText2L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, TRect aBox, TInt aBaselineOffset, CGraphicsContext::TTextAlign aHoriz, TInt aLeftMargin);
|
sl@0
|
190 |
template<typename ContextType> void DrawText3L(ContextType& aGraphicsContext);
|
sl@0
|
191 |
void DoDrawText3L(CWindowGc& aWindowGc, TPtrC16 aText, TPoint aPoint);
|
sl@0
|
192 |
void DoDrawText3L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, TPoint aPoint);
|
sl@0
|
193 |
template<typename ContextType> void DrawText4L(ContextType& aGraphicsContext);
|
sl@0
|
194 |
void DoDrawText4L(CWindowGc& aWindowGc, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TPoint aPoint);
|
sl@0
|
195 |
void DoDrawText4L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TPoint aPoint);
|
sl@0
|
196 |
template<typename ContextType> void DrawText5L(ContextType& aGraphicsContext);
|
sl@0
|
197 |
void DoDrawText5L(CWindowGc& aWindowGc, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TRect aBox, TInt aBaselineOffset, CGraphicsContext::TTextAlign aHoriz, TInt aLeftMargin);
|
sl@0
|
198 |
void DoDrawText5L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TRect aBox, TInt aBaselineOffset, CGraphicsContext::TTextAlign aHoriz, TInt aLeftMargin);
|
sl@0
|
199 |
template<typename ContextType> void MapColorsL(ContextType& aGraphicsContext);
|
sl@0
|
200 |
template<typename ContextType> void SetClippingRegionL(ContextType& aGraphicsContext);
|
sl@0
|
201 |
template<typename ContextType> void CancelClippingRegion(ContextType& aGraphicsContext);
|
sl@0
|
202 |
void DoCancelClippingRegion(CWindowGc& aWindowGc);
|
sl@0
|
203 |
void DoCancelClippingRegion(MWsGraphicsContext& aGraphicsContext);
|
sl@0
|
204 |
template<typename ContextType> void DrawTextVertical1L(ContextType& aGraphicsContext);
|
sl@0
|
205 |
void DoDrawTextVertical1L(CWindowGc& aWindowGc, TPtrC16 aText, TPoint aPoint, TBool aUp);
|
sl@0
|
206 |
void DoDrawTextVertical1L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, TPoint aPoint, TBool aUp);
|
sl@0
|
207 |
template<typename ContextType> void DrawTextVertical2L(ContextType& aGraphicsContext);
|
sl@0
|
208 |
void DoDrawTextVertical2L(CWindowGc& aWindowGc, TPtrC16 aText, TRect aBox, TInt aBaselineOffset, TBool aUp, CGraphicsContext::TTextAlign aVertical, TInt aMargin);
|
sl@0
|
209 |
void DoDrawTextVertical2L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, TRect aBox, TInt aBaselineOffset, TBool aUp, CGraphicsContext::TTextAlign aVertical, TInt aMargin);
|
sl@0
|
210 |
template<typename ContextType> void DrawTextVertical3L(ContextType& aGraphicsContext);
|
sl@0
|
211 |
void DoDrawTextVertical3L(CWindowGc& aWindowGc, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TPoint aPoint, TBool aUp);
|
sl@0
|
212 |
void DoDrawTextVertical3L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TPoint aPoint, TBool aUp);
|
sl@0
|
213 |
template<typename ContextType> void DrawTextVertical4L(ContextType& aGraphicsContext);
|
sl@0
|
214 |
void DoDrawTextVertical4L(CWindowGc& aWindowGc, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TRect aBox, TInt aBaselineOffset, TBool aUp, CGraphicsContext::TTextAlign aVertical, TInt aMargin);
|
sl@0
|
215 |
void DoDrawTextVertical4L(MWsGraphicsContext& aGraphicsContext, TPtrC16 aText, CGraphicsContext::TTextParameters aParam, TRect aBox, TInt aBaselineOffset, TBool aUp, CGraphicsContext::TTextAlign aVertical, TInt aMargin);
|
sl@0
|
216 |
void DrawWsGraphic1L(const MWsGraphicResolver& aWsGraphicResolver);
|
sl@0
|
217 |
void DrawWsGraphic2L(const MWsGraphicResolver& aWsGraphicResolver);
|
sl@0
|
218 |
template<typename ContextType> void SetShadowColorL(ContextType& aGraphicsContext);
|
sl@0
|
219 |
void DoSetShadowColorL(CWindowGc& aWindowGc, TRgb aShadowColor);
|
sl@0
|
220 |
void DoSetShadowColorL(MWsGraphicsContext& aGraphicsContext, TRgb aShadowColor);
|
sl@0
|
221 |
template<typename ContextType> void DrawResourceToPosL(ContextType& aGraphicsContext);
|
sl@0
|
222 |
template<typename ContextType> void DrawResourceToRectL(ContextType& aGraphicsContext);
|
sl@0
|
223 |
template<typename ContextType> void DrawResourceFromRectToRectL(ContextType& aGraphicsContext);
|
sl@0
|
224 |
template<typename ContextType> void DrawResourceWithDataL(ContextType& aGraphicsContext);
|
sl@0
|
225 |
void DoDrawResourceToPos(CWindowGc& aGraphicsContext, const TAny* aDrawableSource, const TPoint& aPos, CWindowGc::TGraphicsRotation aRotation);
|
sl@0
|
226 |
void DoDrawResourceToRect(CWindowGc& aGraphicsContext, const TAny* aDrawableSource, const TRect& aRect, CWindowGc::TGraphicsRotation aRotation);
|
sl@0
|
227 |
void DoDrawResourceFromRectToRect(CWindowGc& aGraphicsContext, const TAny* aDrawableSource, const TRect& aRectDest, const TRect& aRectSrc, CWindowGc::TGraphicsRotation aRotation);
|
sl@0
|
228 |
void DoDrawResourceWithData(CWindowGc& aGraphicsContext, const TAny* aDrawableSource, const TRect& aRect, const TDesC8& aParam);
|
sl@0
|
229 |
void DoDrawResourceToPos(MWsGraphicsContext& aGraphicsContext, const TAny* aDrawableSource, const TPoint& aPos, CWindowGc::TGraphicsRotation aRotation);
|
sl@0
|
230 |
void DoDrawResourceToRect(MWsGraphicsContext& aGraphicsContext, const TAny* aDrawableSource, const TRect& aRect, CWindowGc::TGraphicsRotation aRotation);
|
sl@0
|
231 |
void DoDrawResourceFromRectToRect(MWsGraphicsContext& aGraphicsContext, const TAny* aDrawableSource, const TRect& aRectDest, const TRect& aRectSrc, CWindowGc::TGraphicsRotation aRotation);
|
sl@0
|
232 |
void DoDrawResourceWithData(MWsGraphicsContext& aGraphicsContext, const TAny* aDrawableSource, const TRect& aRect, const TDesC8& aParam);
|
sl@0
|
233 |
#else //SYMBIAN_GRAPHICS_GCE
|
sl@0
|
234 |
void Clear(CBitmapContext& aBitmapContext) const;
|
sl@0
|
235 |
void ClearRectL(CBitmapContext& aBitmapContext);
|
sl@0
|
236 |
void CopyRectL(CBitmapContext& aBitmapContext);
|
sl@0
|
237 |
void BitBlt1L(CBitmapContext& aBitmapContext);
|
sl@0
|
238 |
void BitBlt2L(CBitmapContext& aBitmapContext);
|
sl@0
|
239 |
void BitBltMaskedL(CBitmapContext& aBitmapContext);
|
sl@0
|
240 |
void SetFadedL(CBitmapContext& aBitmapContext);
|
sl@0
|
241 |
void SetFadingParametersL(CBitmapContext& aBitmapContext);
|
sl@0
|
242 |
void AlphaBlendBitmapsL(CBitmapContext& aBitmapContext);
|
sl@0
|
243 |
void SetOriginL(CBitmapContext& aBitmapContext);
|
sl@0
|
244 |
void SetDrawModeL(CBitmapContext& aBitmapContext);
|
sl@0
|
245 |
void SetClippingRectL(CBitmapContext& aBitmapContext);
|
sl@0
|
246 |
void CancelClippingRect(CBitmapContext& aBitmapContext);
|
sl@0
|
247 |
void Reset(CBitmapContext& aBitmapContext);
|
sl@0
|
248 |
void UseFontL(CBitmapContext& aBitmapContext);
|
sl@0
|
249 |
void DiscardFont(CBitmapContext& aBitmapContext) const;
|
sl@0
|
250 |
void SetUnderlineStyleL(CBitmapContext& aBitmapContext);
|
sl@0
|
251 |
void SetStrikethroughStyleL(CBitmapContext& aBitmapContext);
|
sl@0
|
252 |
void SetWordJustificationL(CBitmapContext& aBitmapContext);
|
sl@0
|
253 |
void SetCharJustificationL(CBitmapContext& aBitmapContext);
|
sl@0
|
254 |
void SetPenColorL(CBitmapContext& aBitmapContext);
|
sl@0
|
255 |
void SetPenStyleL(CBitmapContext& aBitmapContext);
|
sl@0
|
256 |
void SetPenSizeL(CBitmapContext& aBitmapContext);
|
sl@0
|
257 |
void SetBrushColorL(CBitmapContext& aBitmapContext);
|
sl@0
|
258 |
void SetBrushStyleL(CBitmapContext& aBitmapContext);
|
sl@0
|
259 |
void SetBrushOriginL(CBitmapContext& aBitmapContext);
|
sl@0
|
260 |
void UseBrushPatternL(CBitmapContext& aBitmapContext);
|
sl@0
|
261 |
void DiscardBrushPattern(CBitmapContext& aBitmapContext) const;
|
sl@0
|
262 |
void MoveToL(CBitmapContext& aBitmapContext);
|
sl@0
|
263 |
void MoveByL(CBitmapContext& aBitmapContext);
|
sl@0
|
264 |
void PlotL(CBitmapContext& aBitmapContext);
|
sl@0
|
265 |
void DrawArcL(CBitmapContext& aBitmapContext);
|
sl@0
|
266 |
void DrawLineL(CBitmapContext& aBitmapContext);
|
sl@0
|
267 |
void DrawLineToL(CBitmapContext& aBitmapContext);
|
sl@0
|
268 |
void DrawLineByL(CBitmapContext& aBitmapContext);
|
sl@0
|
269 |
void DrawPolyLineL(CBitmapContext& aBitmapContext);
|
sl@0
|
270 |
void DrawPieL(CBitmapContext& aBitmapContext);
|
sl@0
|
271 |
void DrawEllipseL(CBitmapContext& aBitmapContext);
|
sl@0
|
272 |
void DrawRectL(CBitmapContext& aBitmapContext);
|
sl@0
|
273 |
void DrawRoundRectL(CBitmapContext& aBitmapContext);
|
sl@0
|
274 |
void DrawPolygonL(CBitmapContext& aBitmapContext);
|
sl@0
|
275 |
void DrawBitmap1L(CBitmapContext& aBitmapContext);
|
sl@0
|
276 |
void DrawBitmap2L(CBitmapContext& aBitmapContext);
|
sl@0
|
277 |
void DrawBitmap3L(CBitmapContext& aBitmapContext);
|
sl@0
|
278 |
void DrawBitmapMaskedL(CBitmapContext& aBitmapContext);
|
sl@0
|
279 |
void DrawText1L(CBitmapContext& aBitmapContext);
|
sl@0
|
280 |
void DrawText2L(CBitmapContext& aBitmapContext);
|
sl@0
|
281 |
void DrawText3L(CBitmapContext& aBitmapContext);
|
sl@0
|
282 |
void MapColorsL(CBitmapContext& aBitmapContext);
|
sl@0
|
283 |
void SetClippingRegionL(CBitmapContext& aBitmapContext);
|
sl@0
|
284 |
void CancelClippingRegion(CBitmapContext& aBitmapContext);
|
sl@0
|
285 |
void DrawTextVertical1L(CBitmapContext& aBitmapContext);
|
sl@0
|
286 |
void DrawTextVertical2L(CBitmapContext& aBitmapContext);
|
sl@0
|
287 |
void DrawWsGraphic1L(const MWsGraphicResolver& aWsGraphicResolver);
|
sl@0
|
288 |
void DrawWsGraphic2L(const MWsGraphicResolver& aWsGraphicResolver);
|
sl@0
|
289 |
void SetShadowColorL(CBitmapContext& aBitmapContext);
|
sl@0
|
290 |
#endif //SYMBIAN_GRAPHICS_GCE
|
sl@0
|
291 |
private:
|
sl@0
|
292 |
// Values set by the system calling play
|
sl@0
|
293 |
TPoint iMasterOrigin;
|
sl@0
|
294 |
const TRegion * iMasterClippingRegion;
|
sl@0
|
295 |
const TRegion * iActiveMasterClippingRegion;
|
sl@0
|
296 |
|
sl@0
|
297 |
RRegionBuf<10> iDrawSectionClippingRegion;
|
sl@0
|
298 |
TRect iMasterClippingRect;
|
sl@0
|
299 |
TRect iDrawSectionRect;
|
sl@0
|
300 |
|
sl@0
|
301 |
// Values set by the draw commands executed during play
|
sl@0
|
302 |
TPoint iOrigin;
|
sl@0
|
303 |
RRegionBuf<10> iClippingRegion;
|
sl@0
|
304 |
TRect iClippingRect;
|
sl@0
|
305 |
TBool iParsedClippingRegionIsSet;
|
sl@0
|
306 |
|
sl@0
|
307 |
#ifndef SYMBIAN_GRAPHICS_GCE
|
sl@0
|
308 |
TPoint iOffSet; //only used by nonnga in order to preserve compatibility with nga
|
sl@0
|
309 |
RRegionBuf<10> iCurrentSectionClippingRegion; //only used by nonnga in order to preserve compatibility with nga
|
sl@0
|
310 |
#else
|
sl@0
|
311 |
RRegion iIntersectedRegion;
|
sl@0
|
312 |
CDrawableCacheBase* iDrawableCache;
|
sl@0
|
313 |
#endif
|
sl@0
|
314 |
|
sl@0
|
315 |
TInt iError;
|
sl@0
|
316 |
CBufBase* iRecordSegBuf;
|
sl@0
|
317 |
CBitmapCache* iBitmapCache;
|
sl@0
|
318 |
CFontsCache* iFontCache;
|
sl@0
|
319 |
CBufBase* iBufRead;
|
sl@0
|
320 |
RBufReadStream iBufReadStream;
|
sl@0
|
321 |
RPointerArray<CDrawSection> iDrawSections;
|
sl@0
|
322 |
};
|
sl@0
|
323 |
|
sl@0
|
324 |
template<typename TClass> void CCommandBuffer::Write(const TClass& aValue)
|
sl@0
|
325 |
{
|
sl@0
|
326 |
__ASSERT_COMPILE(sizeof(TClass) <= KMaxTUint8);
|
sl@0
|
327 |
|
sl@0
|
328 |
#ifdef _DEBUG
|
sl@0
|
329 |
const TUint8 size = sizeof(TClass);
|
sl@0
|
330 |
Write(reinterpret_cast<const TUint8*>(&size), 1);
|
sl@0
|
331 |
#endif
|
sl@0
|
332 |
|
sl@0
|
333 |
Write(reinterpret_cast<const TUint8*>(&aValue), sizeof(TClass));
|
sl@0
|
334 |
}
|
sl@0
|
335 |
|
sl@0
|
336 |
template<typename TClass> void CCommandBuffer::ReadL(TClass& aValue)
|
sl@0
|
337 |
{
|
sl@0
|
338 |
__ASSERT_COMPILE(sizeof(TClass) <= KMaxTUint8);
|
sl@0
|
339 |
|
sl@0
|
340 |
#ifdef _DEBUG
|
sl@0
|
341 |
TUint8 size = 0;
|
sl@0
|
342 |
ReadL(reinterpret_cast<TUint8*>(&size), 1);
|
sl@0
|
343 |
ASSERT(sizeof(TClass) == size);
|
sl@0
|
344 |
#endif
|
sl@0
|
345 |
|
sl@0
|
346 |
ReadL(reinterpret_cast<TUint8*>(&aValue), sizeof(TClass));
|
sl@0
|
347 |
}
|
sl@0
|
348 |
|
sl@0
|
349 |
#endif // __COMMANDBUFFER_H__
|