X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e193f384f7b98daef459653ddb8485173fba8ba..398b582f36d8ee1d6cf948ff2da592bc2ef250b4:/include/wx/app.h diff --git a/include/wx/app.h b/include/wx/app.h index 0e00618dbe..559fdebc4f 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -100,7 +100,7 @@ public: // value of this method. // // Override: often. - virtual int OnExit() { return 0; } + virtual int OnExit(); // called when a fatal exception occurs, this function should take care // not to do anything which might provoke a nested exception! It may be @@ -232,6 +232,9 @@ public: static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; } + // process all events in the wxPendingEvents list + virtual void ProcessPendingEvents(); + // access to the command line arguments int argc; wxChar **argv; @@ -279,7 +282,10 @@ protected: #include "wx/stubs/app.h" #endif #else // !GUI - typedef wxAppBase wxApp; + // can't use typedef because wxApp forward declared as a class + class WXDLLEXPORT wxApp : public wxAppBase + { + }; #endif // GUI/!GUI // ---------------------------------------------------------------------------- @@ -299,14 +305,17 @@ WXDLLEXPORT_DATA(extern wxApp*) wxTheApp; // event loop related functions only work in GUI programs // ------------------------------------------------------ -#if wxUSE_GUI - // Force an exit from main loop extern void WXDLLEXPORT wxExit(); // Yield to other apps/messages extern bool WXDLLEXPORT wxYield(); +// Yield to other apps/messages +extern void WXDLLEXPORT wxWakeUpIdle(); + +#if wxUSE_GUI + // Post a message to the given eventhandler which will be processed during the // next event loop iteration inline void WXDLLEXPORT wxPostEvent(wxEvtHandler *dest, wxEvent& event) @@ -322,7 +331,7 @@ inline void WXDLLEXPORT wxPostEvent(wxEvtHandler *dest, wxEvent& event) // and call these functions instead at the program startup and termination // ------------------------------------------------------------------------- -#if wxUSE_NOGUI +#if !wxUSE_GUI // initialize the library (may be called as many times as needed, but each // call to wxInitialize() must be matched by wxUninitialize()) @@ -332,7 +341,7 @@ extern bool WXDLLEXPORT wxInitialize(); // wxUninitialize() extern void WXDLLEXPORT wxUninitialize(); -#endif // wxUSE_NOGUI +#endif // !wxUSE_GUI // ---------------------------------------------------------------------------- // macros for dynamic creation of the application object @@ -353,7 +362,7 @@ public: // be in your main program (e.g. hello.cpp). Now IMPLEMENT_APP should add this // code if required. -#if defined(__AIX__) || defined(__HPUX__) +#if !wxUSE_GUI || defined(__AIX__) || defined(__HPUX__) || defined( __VMS__ ) || defined(__WXPM__) #define IMPLEMENT_WXWIN_MAIN \ extern int wxEntry( int argc, char *argv[] ); \ int main(int argc, char *argv[]) { return wxEntry(argc, argv); }