proper timeout handling for input subsys
[picodrive.git] / platform / uiq3 / App.h
1 /*******************************************************************\r
2  *\r
3  *      File:           App.h\r
4  *\r
5  *      Author:         Peter van Sebille (peter@yipton.net)\r
6  *\r
7  *  Modified/adapted for picodriveN by notaz, 2006\r
8  *\r
9  *  (c) Copyright 2006, notaz\r
10  *      (c) Copyright 2001, Peter van Sebille\r
11  *      All Rights Reserved\r
12  *\r
13  *******************************************************************/\r
14 \r
15 #ifndef __APP_H\r
16 #define __APP_H\r
17 \r
18 #include <coecntrl.h>\r
19 #include <coeccntx.h>\r
20 #include <coemain.h>\r
21 \r
22 #include <qikappui.h>\r
23 #include <qikapplication.h>\r
24 #include <qikviewbase.h>\r
25 //#include <eikapp.h>\r
26 #include <qikdocument.h>\r
27 \r
28 #include "Engine.h"\r
29 #include "picodrive.hrh"\r
30 \r
31 const TUid KUidPicolApp      = { 0xA00010F3 };\r
32 const TUid KUidPicolMainView = { 0x00000001 };\r
33 //const TUid KUidPicolFOView = { 0x1000C194 };\r
34 //const TUid KUidPicolFCView = { 0x1000C195 };\r
35 const TUid KUidPicolStore    = { 0x00000011 }; // store stream UID\r
36 \r
37 //enum\r
38 //{\r
39 //  EScreenModeFlipOpen = 0,\r
40 //  EScreenModeFlipClosed\r
41 //};\r
42 \r
43 \r
44 extern "C" struct _currentConfig_t;\r
45 \r
46 class CPicolAppView : public CQikViewBase\r
47 {\r
48 public:\r
49         static CPicolAppView* NewLC(CQikAppUi& aAppUi, TPicoConfig &aCurrentConfig);\r
50         ~CPicolAppView();\r
51 \r
52         // from CQikViewBase\r
53         TVwsViewId ViewId()const;\r
54         void HandleCommandL(CQikCommand& aCommand);\r
55         void UpdateCommandList();\r
56 \r
57 protected:\r
58         // from CQikViewBase\r
59         void ViewConstructL();\r
60 \r
61 private:\r
62         CPicolAppView(CQikAppUi& aAppUi, TPicoConfig &aCurrentConfig);\r
63         void ConstructL();\r
64 \r
65 protected:              // new stuf\r
66         void DisplayAboutDialogL();\r
67         void DisplayOpenROMDialogL();\r
68         void DisplayConfigDialogL();\r
69         void DisplayDebugDialogL();\r
70 \r
71 /*      void StopGame();\r
72         void RunGameL();*/\r
73 \r
74 private:\r
75         TPicoConfig                     &iCurrentConfig;\r
76         TBool                           iROMLoaded;\r
77         TBool                           iTitleAdded;\r
78 };\r
79 \r
80 \r
81 \r
82 class CPicolAppUi : public CQikAppUi\r
83 {\r
84 public:\r
85 //      CPicolAppUi();\r
86         void ConstructL();\r
87 \r
88         CPicolAppView*          iAppView;\r
89 };\r
90 \r
91 \r
92 class CPicolDocument : public CQikDocument\r
93 {\r
94 public:\r
95         CPicolDocument(CQikApplication& aApp);\r
96         void StoreL(CStreamStore& aStore, CStreamDictionary& aStreamDic) const;\r
97         void RestoreL(const CStreamStore& aStore, const CStreamDictionary& aStreamDic);\r
98 \r
99         TPicoConfig                     iCurrentConfig;\r
100 \r
101 private: // from CQikDocument\r
102         CQikAppUi* CreateAppUiL();\r
103 };\r
104 \r
105 \r
106 class CPicolApplication : public CQikApplication\r
107 {\r
108 private: // from CApaApplication\r
109         CApaDocument* CreateDocumentL();\r
110         TUid AppDllUid() const;\r
111 };\r
112 \r
113 #endif\r