os/graphics/windowing/windowserver/test/t_stress/tstressanim/inc/stressanim.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/t_stress/tstressanim/inc/stressanim.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     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 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent
    1.23 +*/
    1.24 +
    1.25 +
    1.26 +#if !defined(__STRESSTESTANIM_H__)
    1.27 +#define __STRESSTESTANIM_H__
    1.28 +
    1.29 +#include <e32std.h>
    1.30 +#include <w32std.h>
    1.31 +#include <w32adll.h>
    1.32 +#include <bitstd.h>
    1.33 +
    1.34 +
    1.35 +class CStressWindowAnim : public CWindowAnim
    1.36 +	{
    1.37 +	enum {ENumPolyPoints=9};
    1.38 +public:
    1.39 +	~CStressWindowAnim();
    1.40 +	virtual void ConstructL(TAny *aArgs, TBool aHasFocus);
    1.41 +	virtual void Animate(TDateTime *aDateTime);
    1.42 +	virtual void Redraw();
    1.43 +	virtual void Command(TInt aOpcode, TAny *aArgs);
    1.44 +	virtual TInt CommandReplyL(TInt aOpcode, TAny *aArgs);
    1.45 +	void SetPolyList(const TRect &aRect);
    1.46 +	void DrawPolyLine();
    1.47 +	void DrawBitmap();
    1.48 +	void DrawText();
    1.49 +	void TweakPolyList(TInt aState);
    1.50 +	void FocusChanged(TBool aState);
    1.51 +	void InvalidateText();
    1.52 +	void InvalidateBitmap();
    1.53 +	//Pure virtual function from MEventHandler
    1.54 +	virtual TBool OfferRawEvent(const TRawEvent &aRawEvent);
    1.55 +private:
    1.56 +	void AppendTime(TDes& aTimeText,const TTime& aTime) const;
    1.57 +private:
    1.58 +	TPoint iPos;
    1.59 +	TSize iSize;
    1.60 +	TInt iColor;
    1.61 +	TBool iMasked;
    1.62 +	TRect iPolyRect;
    1.63 +	TInt iPolyState;
    1.64 +	TInt iWiggleSize;
    1.65 +	TPoint iTextPos;
    1.66 +	TBool iHasFocus;
    1.67 +	CArrayFixFlat<TPoint> *iPolyList;
    1.68 +	CFbsBitmap iBitmap1;
    1.69 +	CFbsBitmap iBitmap2;
    1.70 +	CFbsBitmap iMask;
    1.71 +	CFbsFont *iFont;
    1.72 +	
    1.73 +	TUint32	iLastAnimShot;
    1.74 +	TBool iDoAnimation;
    1.75 +	TInt iKernelTicksPeriod;
    1.76 +	};
    1.77 +	
    1.78 +class CStressAnimDll : public CAnimDll 
    1.79 +	{
    1.80 +public:
    1.81 +	CAnim *CreateInstanceL(TInt aType);
    1.82 +private:
    1.83 +	};
    1.84 +	
    1.85 +
    1.86 +#endif // __STRESSTESTANIM_H__