examples/sfexamples/vibrapool/inc/VibraPoolAppView.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 __VIBRAPOOLAPPVIEW_h__
00020 #define __VIBRAPOOLAPPVIEW_h__
00021 
00022 // INCLUDES
00023 #include <coecntrl.h>
00024 #include <hwrmvibra.h>  // Vibration API
00025 #include "moveball.h"   // Our asynchronous class to move the ball
00026 
00027 // CLASS DECLARATION
00028 class CVibraPoolAppView : public CCoeControl, MUpdateContainer
00029         {
00030         public: // New methods
00031 
00039                 static CVibraPoolAppView* NewL( const TRect& aRect );
00040 
00049                 static CVibraPoolAppView* NewLC( const TRect& aRect );
00050 
00055                 virtual ~CVibraPoolAppView();
00056 
00057         public:  // Functions from base classes
00058 
00064                 void Draw( const TRect& aRect ) const;
00065 
00070                 virtual void SizeChanged();
00071 
00072         private: // Constructors
00073 
00081                 void ConstructL(const TRect& aRect);
00082 
00087                 CVibraPoolAppView();
00088 
00089         private:        // Functions specific to our example
00090                 
00094                 void WallsDetection();
00095                 
00099                 TBool HolesDetection();
00100                 
00105                 void UpdateScreen();
00106         
00107         public:         // Functions specific to our example
00108                 
00112                 void ReStartGame();
00113             void StopGame();
00114                 
00115         private:        // Member variables
00116         
00117                 CHWRMVibra* iVibra;
00118                 CMoveBall*  iMove;
00119                 TPoint          iBallLoc;
00120                 TInt            iMoveX;
00121                 TInt            iMoveY;
00122                 TBool           iDrawBall;
00123         };
00124 
00125 #endif // __VIBRAPOOLAPPVIEW_h__
00126 
00127 // End of File

Generated by  doxygen 1.6.2