1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/app.h
3 // Purpose: wxApp class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
18 class WXDLLIMPEXP_FWD_CORE wxFrame
;
19 class WXDLLIMPEXP_FWD_CORE wxWindow
;
20 class WXDLLIMPEXP_FWD_CORE wxApp
;
21 class WXDLLIMPEXP_FWD_CORE wxKeyEvent
;
22 class WXDLLIMPEXP_FWD_BASE wxLog
;
24 // Represents the application. Derive OnInit and declare
25 // a new App object to start application
26 class WXDLLEXPORT wxApp
: public wxAppBase
28 DECLARE_DYNAMIC_CLASS(wxApp
)
34 // override base class (pure) virtuals
35 virtual bool Initialize(int& argc
, wxChar
**argv
);
36 virtual void CleanUp();
38 virtual bool Yield(bool onlyIfNeeded
= false);
39 virtual void WakeUpIdle();
41 virtual void SetPrintMode(int mode
) { m_printMode
= mode
; }
42 virtual int GetPrintMode() const { return m_printMode
; }
44 // implementation only
45 void OnEndSession(wxCloseEvent
& event
);
46 void OnQueryEndSession(wxCloseEvent
& event
);
49 virtual bool OnExceptionInMainLoop();
50 #endif // wxUSE_EXCEPTIONS
53 int m_printMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
57 static bool RegisterWindowClasses();
58 static bool UnregisterWindowClasses();
61 // initialize the richedit DLL of (at least) given version, return true if
62 // ok (Win95 has version 1, Win98/NT4 has 1 and 2, W2K has 3)
63 static bool InitRichEdit(int version
= 2);
64 #endif // wxUSE_RICHEDIT
66 // returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it
67 // wasn't found at all
68 static int GetComCtl32Version();
70 // the SW_XXX value to be used for the frames opened by the application
71 // (currently seems unused which is a bug -- TODO)
72 static int m_nCmdShow
;
76 DECLARE_NO_COPY_CLASS(wxApp
)
79 // ----------------------------------------------------------------------------
80 // Palm OS specific wxEntry() overload and IMPLEMENT_WXWIN_MAIN definition
81 // ----------------------------------------------------------------------------
84 #define SW_SHOWNORMAL 1
87 extern int WXDLLEXPORT
90 #define IMPLEMENT_WXWIN_MAIN \
94 uint32_t PilotMain(uint16_t cmd, MemPtr cmdPBP, uint16_t launchFlags) \
97 case 0 /* sysAppLaunchCmdNormalLaunch */ : \
103 return 0 /* errNone */ ; \