sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "graphicscontextchecker.h" sl@0: #include "panics.h" sl@0: sl@0: #define CHECK_TEXTCURSOR() \ sl@0: CHK_ASSERT_ALWAYS(iTextCursor, EEventCheckerPanicUsingMWsTextCursorAfterEnd) sl@0: sl@0: #define CHECK_FADER() \ sl@0: CHK_ASSERT_ALWAYS(iFader, EEventCheckerPanicUsingMWsFaderAfterEnd) sl@0: sl@0: #define CHECK_DRAWING_TARGET() \ sl@0: CHK_ASSERT_ALWAYS(iTarget != ETargetNone, EEventCheckerPanicDrawingWithoutTarget) sl@0: sl@0: #define CHECK_GC_AND_DRAWING_TARGET() \ sl@0: do { \ sl@0: CHK_ASSERT_ALWAYS(iContext, EEventCheckerPanicUsingMWsGraphicsContextAfterEnd); \ sl@0: CHECK_DRAWING_TARGET(); \ sl@0: } while(EFalse) sl@0: sl@0: #define CHECK_TEXTCURSOR_AND_DRAWING_TARGET() \ sl@0: do { \ sl@0: CHECK_TEXTCURSOR(); \ sl@0: CHECK_DRAWING_TARGET(); \ sl@0: } while(EFalse) sl@0: sl@0: #define CHECK_FADER_AND_DRAWING_TARGET() \ sl@0: do { \ sl@0: CHECK_FADER(); \ sl@0: CHECK_DRAWING_TARGET(); \ sl@0: } while(EFalse) sl@0: sl@0: CGraphicsContextChecker* CGraphicsContextChecker::NewL(MWsGraphicDrawerEnvironment& /*aEnv*/) sl@0: { sl@0: CGraphicsContextChecker* self = new(ELeave) CGraphicsContextChecker(); sl@0: return self; sl@0: } sl@0: sl@0: CGraphicsContextChecker::CGraphicsContextChecker() sl@0: : iTarget(ETargetNone) sl@0: { sl@0: } sl@0: sl@0: CGraphicsContextChecker::~CGraphicsContextChecker() sl@0: { sl@0: iContext = NULL; sl@0: iTextCursor = NULL; sl@0: iFader = NULL; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetGraphicsContext(MWsGraphicsContext* aGraphicsContext) sl@0: { sl@0: iContext = aGraphicsContext; sl@0: } sl@0: sl@0: const MWsGraphicsContext* CGraphicsContextChecker::GraphicsContext() const sl@0: { sl@0: return iContext; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetTextCursor(MWsTextCursor* aTextCursor) sl@0: { sl@0: iTextCursor = aTextCursor; sl@0: } sl@0: sl@0: const MWsTextCursor* CGraphicsContextChecker::TextCursor() const sl@0: { sl@0: return iTextCursor; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetFader(MWsFader* aFader) sl@0: { sl@0: iFader = aFader; sl@0: } sl@0: sl@0: const MWsFader* CGraphicsContextChecker::Fader() const sl@0: { sl@0: return iFader; sl@0: } sl@0: sl@0: TAny* CGraphicsContextChecker::ResolveObjectInterface(TUint aTypeId) sl@0: { sl@0: if(aTypeId == MWsDrawAnnotationObserver::EWsObjectInterfaceId) sl@0: return static_cast(this); sl@0: sl@0: //The remaining part of this method isn't exactly beautiful since we are merging three object sl@0: //provider interfaces into one object, so we have no way of knowing sl@0: //which interface this method was called on. sl@0: //however, aTypeId is a unique id and the chance that multiple sl@0: //mixins implement the same extension is slim sl@0: TAny* interface = NULL; sl@0: if(!interface && iContext) sl@0: interface = iContext->ResolveObjectInterface(aTypeId); sl@0: if(!interface && iTextCursor) sl@0: interface = iTextCursor->ResolveObjectInterface(aTypeId); sl@0: if(!interface && iFader) sl@0: interface = iFader->ResolveObjectInterface(aTypeId); sl@0: return interface; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::BitBlt(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->BitBlt(aDestPos, aSourceBitmap); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::BitBlt(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->BitBlt(aDestPos, aSourceBitmap, aSourceRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::BitBltMasked(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap& aMaskBitmap, TBool aInvertMask) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->BitBltMasked(aDestPos, aSourceBitmap, aSourceRect, aMaskBitmap, aInvertMask); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::BitBltMasked(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap& aMaskBitmap, const TPoint& aMaskPos) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->BitBltMasked(aDestPos, aSourceBitmap, aSourceRect, aMaskBitmap, aMaskPos); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::ResetClippingRegion() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->ResetClippingRegion(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::Clear() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->Clear(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::Clear(const TRect& aRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->Clear(aRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::ResetBrushPattern() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->ResetBrushPattern(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::ResetFont() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->ResetFont(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawArc(const TRect& aRect, const TPoint& aStart, const TPoint& aEnd) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawArc(aRect, aStart, aEnd); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawPie(const TRect& aRect, const TPoint& aStart, const TPoint& aEnd) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawPie(aRect, aStart, aEnd); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawBitmap(const TRect& aDestRect, const CFbsBitmap& aSourceBitmap) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawBitmap(aDestRect, aSourceBitmap); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawBitmap(const TRect& aDestRect, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawBitmap(aDestRect, aSourceBitmap, aSourceRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap& aMaskBitmap, TBool aInvertMask) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawBitmapMasked(aDestRect, aSourceBitmap, aSourceRect, aMaskBitmap, aInvertMask); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawRoundRect(const TRect& aRect, const TSize& aEllipse) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawRoundRect(aRect, aEllipse); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawPolyLine(const TArray& aPointList) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawPolyLine(aPointList); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawPolyLineNoEndPoint(const TArray& aPointList) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawPolyLineNoEndPoint(aPointList); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawPolygon(const TArray& aPointList, TFillRule aFillRule) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawPolygon(aPointList, aFillRule); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawEllipse(const TRect& aRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawEllipse(aRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawLine(const TPoint& aStart, const TPoint& aEnd) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawLine(aStart, aEnd); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawLineTo(const TPoint& aPoint) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawLineTo(aPoint); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawLineBy(const TPoint& aVector) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawLineBy(aVector); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawRect(const TRect& aRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawRect(aRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawText(const TDesC& aText, const TTextParameters* aParam) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawText(aText, aParam); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawText(const TDesC& aText, const TTextParameters* aParam, const TPoint& aPosition) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawText(aText, aParam, aPosition); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawText(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawText(aText, aParam, aClipRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawText(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipFillRect, TInt aBaselineOffset, TTextAlign aHrz, TInt aMargin) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawText(aText, aParam, aClipFillRect, aBaselineOffset, aHrz, aMargin); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, TBool aUp) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawTextVertical(aText, aParam, aUp); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TPoint& aPosition, TBool aUp) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawTextVertical(aText, aParam, aPosition, aUp); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect, TBool aUp) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawTextVertical(aText, aParam, aClipRect, aUp); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect, TInt aBaselineOffset, TBool aUp, TTextAlign aVert, TInt aMargin) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawTextVertical(aText, aParam, aClipRect, aBaselineOffset, aUp, aVert, aMargin); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect, TInt aBaselineOffset, TInt aTextWidth, TBool aUp, TTextAlign aVert, TInt aMargin) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->DrawTextVertical(aText, aParam, aClipRect, aBaselineOffset, aTextWidth, aUp, aVert, aMargin); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::MoveTo(const TPoint& aPoint) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->MoveTo(aPoint); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::MoveBy(const TPoint& aVector) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->MoveBy(aVector); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::Plot(const TPoint& aPoint) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->Plot(aPoint); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::Reset() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->Reset(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetBrushColor(const TRgb& aColor) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetBrushColor(aColor); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetBrushOrigin(const TPoint& aOrigin) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetBrushOrigin(aOrigin); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetBrushStyle(TBrushStyle aBrushStyle) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetBrushStyle(aBrushStyle); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetClippingRegion(const TRegion& aRegion) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetClippingRegion(aRegion); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetDrawMode(TDrawMode aDrawMode) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetDrawMode(aDrawMode); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetOrigin(const TPoint& aPoint) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetOrigin(aPoint); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetPenColor(const TRgb& aColor) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetPenColor(aColor); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetPenStyle(TPenStyle aPenStyle) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetPenStyle(aPenStyle); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetPenSize(const TSize& aSize) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetPenSize(aSize); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetTextShadowColor(const TRgb& aColor) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetTextShadowColor(aColor); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetCharJustification(TInt aExcessWidth, TInt aNumChars) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetCharJustification(aExcessWidth, aNumChars); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetWordJustification(TInt aExcessWidth, TInt aNumGaps) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetWordJustification(aExcessWidth, aNumGaps); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetUnderlineStyle(TFontUnderline aUnderlineStyle) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetUnderlineStyle(aUnderlineStyle); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetStrikethroughStyle(aStrikethroughStyle); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetBrushPattern(const CFbsBitmap& aBitmap) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetBrushPattern(aBitmap); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetBrushPattern(TInt aFbsBitmapHandle) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetBrushPattern(aFbsBitmapHandle); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetFont(const CFont* aFont) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetFont(aFont); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::CopyRect(const TPoint& aOffset, const TRect& aRect) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->CopyRect(aOffset, aRect); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::UpdateJustification(const TDesC& aText, const TTextParameters* aParam) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->UpdateJustification(aText, aParam); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::UpdateJustificationVertical(const TDesC& aText, const TTextParameters* aParam, TBool aUp) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->UpdateJustificationVertical(aText, aParam, aUp); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetFontNoDuplicate(const CFont* aFont) sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->SetFontNoDuplicate(aFont); sl@0: } sl@0: sl@0: TBool CGraphicsContextChecker::HasBrushPattern() const sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->HasBrushPattern(); sl@0: } sl@0: sl@0: TBool CGraphicsContextChecker::HasFont() const sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->HasFont(); sl@0: } sl@0: sl@0: TRgb CGraphicsContextChecker::BrushColor() const sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->BrushColor(); sl@0: } sl@0: sl@0: TRgb CGraphicsContextChecker::PenColor() const sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->PenColor(); sl@0: } sl@0: sl@0: TRgb CGraphicsContextChecker::TextShadowColor() const sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->TextShadowColor(); sl@0: } sl@0: sl@0: TInt CGraphicsContextChecker::GetError() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->GetError(); sl@0: } sl@0: sl@0: TPoint CGraphicsContextChecker::Origin() const sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->Origin(); sl@0: } sl@0: sl@0: const TRegion& CGraphicsContextChecker::ClippingRegion() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->ClippingRegion(); sl@0: } sl@0: sl@0: TInt CGraphicsContextChecker::Push() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: return iContext->Push(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::Pop() sl@0: { sl@0: CHECK_GC_AND_DRAWING_TARGET(); sl@0: iContext->Pop(); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::DrawTextCursor(const TTextCursorInfo& aTextCursorInfo) sl@0: { sl@0: //CHECK_TEXTCURSOR_AND_DRAWING_TARGET(); sl@0: CHECK_TEXTCURSOR(); sl@0: iTextCursor->DrawTextCursor(aTextCursorInfo); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SetFadingParameters(const TDesC8& aData) sl@0: { sl@0: CHECK_FADER_AND_DRAWING_TARGET(); sl@0: iFader->SetFadingParameters(aData); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::FadeArea(const TRegion& aRegion) sl@0: { sl@0: CHECK_FADER_AND_DRAWING_TARGET(); sl@0: iFader->FadeArea(aRegion); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::WindowRedrawStart(const MWsWindowTreeNode& /*aWindowTreeNode*/, const TRegion& /*aRegion*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget == ETargetNone, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: iTarget = ETargetWindow; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::WindowRedrawEnd(const MWsWindowTreeNode& /*aWindowTreeNode*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget == ETargetWindow, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: iTarget = ETargetNone; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::WindowAnimRedrawStart(const MWsWindowTreeNode& /*aWindowTreeNode*/, const TRegion& /*aRegion*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget == ETargetNone, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: iTarget = ETargetWindowAnim; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::WindowAnimRedrawEnd(const MWsWindowTreeNode& /*aWindowTreeNode*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget == ETargetWindowAnim, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: iTarget = ETargetNone; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SpriteRedrawStart(const MWsWindowTreeNode& aWindowTreeNode, const TRegion& /*aRegion*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget==ETargetNone, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: iTarget = (aWindowTreeNode.ParentNode()->NodeType() == MWsWindowTreeNode::EWinTreeNodeRoot) ? ETargetFloatingSprite : ETargetWindowSprite; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SpriteRedrawEnd(const MWsWindowTreeNode& /*aWindowTreeNode*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS((iTarget==ETargetFloatingSprite || iTarget==ETargetWindowSprite), EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: iTarget = ETargetNone; sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SpriteFlash(const MWsWindowTreeNode& /*aWindowTreeNode*/, TBool /*aFlashOn*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS((iTarget==ETargetFloatingSprite || iTarget==ETargetWindowSprite), EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SegmentRedrawStart(const TRegion& /*aRegion*/) sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget == ETargetWindow, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: } sl@0: sl@0: void CGraphicsContextChecker::SegmentRedrawEnd() sl@0: { sl@0: CHK_ASSERT_ALWAYS(iTarget == ETargetWindow, EEventCheckerPanicUnbalancedDrawingTargetEvents); sl@0: } sl@0: