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: #ifndef __DEBUGBAR_H__
sl@0: #define __DEBUGBAR_H__
sl@0: 
sl@0: #include <e32base.h>
sl@0: #include <fbs.h>
sl@0: 
sl@0: class CScreen;
sl@0: 
sl@0: class CDebugBar : public CBase
sl@0: 	{
sl@0: 	public:
sl@0: 		static CDebugBar* NewL(CScreen * aScreen,const TRect& aScreenRect,TTimeIntervalMicroSeconds32 aRefreshInterval);
sl@0: 		const TRect& Rect() const;
sl@0: 		~CDebugBar();
sl@0: 		void OnKeyEvent();
sl@0: 		void RedrawDebugBar() const;
sl@0: 	private:
sl@0: 		CDebugBar(CScreen * aScreen,const TRect& aScreenRect);
sl@0: 		void ConstructL(TTimeIntervalMicroSeconds32 aRefreshInterval);
sl@0: 		static TBool RedrawDebugBarCallback(TAny* aAny);
sl@0: 	private:
sl@0: 		CPeriodic* iTimer;
sl@0: 		CScreen* iScreen;
sl@0: 		CFbsFont* iFont;
sl@0: 		TRect iScreenRect;
sl@0: 		TInt iBaseline;
sl@0: 		mutable TBuf<128> iBuf;
sl@0: 		TInt iKeyEvents;
sl@0: 		TInt iPolls;
sl@0: 		mutable TInt64 iLastTotal;
sl@0: 		mutable TInt64 iLastIdle;
sl@0: 		mutable TInt64 iLastDrawing;
sl@0: 		mutable TInt64 iLastReclaimedIdleTime;
sl@0: 	};
sl@0: 
sl@0: #endif