sl@0: // Copyright (c) 1995-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: #include <graphics/wsgraphicscontext.h>
sl@0: #include <graphics/wsrenderstage.h>
sl@0: class CScreen;
sl@0: 
sl@0: class CDebugBar : public CBase
sl@0: 	{
sl@0: 	public:
sl@0: 		static CDebugBar* NewL(CScreen * aScreen,TTimeIntervalMicroSeconds32 aRefreshInterval);
sl@0: 		~CDebugBar();
sl@0: 		void OnKeyEvent();
sl@0: 		void DebugBarInfo(RArray<TPtrC>& aArray) const;
sl@0: 				
sl@0: 	private:
sl@0: 		CDebugBar(CScreen * aScreen);
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: 		mutable TBuf<128> iTextLine0;
sl@0: 		mutable TBuf<128> iTextLine1;
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: #endif
sl@0: 
sl@0: