examples/SFExamples/SkeletonS60/inc/SkeletonAppView.h

00001 // 
00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 // All rights reserved.
00004 // This component and the accompanying materials are made available
00005 // under the terms of the License "Eclipse Public License v1.0"
00006 // which accompanies this distribution, and is available
00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 // 
00009 // Initial Contributors:
00010 // Nokia Corporation - initial contribution.
00011 // 
00012 // Contributors:
00013 // 
00014 // Description:  Declares view class for application.
00015 // 
00016 // 
00017 
00018 
00019 #ifndef __SKELETONAPPVIEW_h__
00020 #define __SKELETONAPPVIEW_h__
00021 
00022 // INCLUDES
00023 #include <coecntrl.h>
00024 
00025 class CInactivityTimer;
00026 
00027 // CLASS DECLARATION
00028 class CSkeletonAppView : public CCoeControl
00029         {
00030         public: // New methods
00031 
00039                 static CSkeletonAppView* NewL( const TRect& aRect );
00040 
00049                 static CSkeletonAppView* NewLC( const TRect& aRect );
00050 
00055                 virtual ~CSkeletonAppView();
00056 
00057         public:  // Functions from base classes
00058 
00064                 void Draw( const TRect& aRect ) const;
00065 
00070                 virtual void SizeChanged();
00071                 
00072                 /*
00073                 * From CoeControl, FocusChanged.
00074                 * Called by framework when application focus changes.
00075                 */
00076                 void FocusChanged(TDrawNow aDrawNow);
00077                         
00082                 TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
00083         
00084         public: 
00089                 static TInt Tick(TAny* aCallback);
00090                 
00094                 void StartHeartbeat();
00095                 
00099                 void StopHeartbeat();
00100                 
00104                 void SetPausedDisplay(TBool aPaused);
00105                 
00106         private: // Constructors
00107 
00115                 void ConstructL(const TRect& aRect);
00116 
00121                 CSkeletonAppView();
00122         private:                        
00123         
00128                 void GameLoop();
00129         private:
00130                 CPeriodic* iPeriodicTimer;
00131                 TUint iKeyState; 
00132                 CInactivityTimer* iInactivity;
00133                 TBool iPauseDisplay;
00134                 
00135                 // For demonstration only
00136                 TBool iFired;
00137                 TTime iStart;
00138                 TTime iStop;
00139                 TUint iFrames;
00140                 TBuf<20> iFpsMessage;
00141                 TInt64  iDuration;
00142         
00143         };
00144 
00145 #endif // __SKELETONAPPVIEW_h__
00146 
00147 // End of File

Generated by  doxygen 1.6.2