X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b59cdbfaf7df79499424c92ff6177736429ff8a..794bcc2dea743ac907b839f54e451847c9ea4b72:/include/wx/app.h diff --git a/include/wx/app.h b/include/wx/app.h index 7d408278bb..dc7b862ec7 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -215,6 +215,10 @@ public: void SetWantDebugOutput( bool flag ) { m_wantDebugOutput = flag; } bool GetWantDebugOutput() const { return m_wantDebugOutput; } + // set use of best visual flag (see below) + void SetUseBestVisual( bool flag ) { m_useBestVisual = flag; } + bool GetUseBestVisual() const { return m_useBestVisual; } + // set/get printing mode: see wxPRINT_XXX constants. // // default behaviour is the normal one for Unix: always use PostScript @@ -254,6 +258,10 @@ protected: // TRUE if the application wants to get debug output bool m_wantDebugOutput; + + // TRUE if the apps whats to use the best visual on systems where + // more than one are available (Sun, SGI, XFree86 4.0 ?) + bool m_useBestVisual; #if wxUSE_GUI // the main top level window - may be NULL @@ -314,18 +322,18 @@ 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) { wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") ); +#if wxUSE_GUI dest->AddPendingEvent(event); -} - +#else + dest->ProcessEvent(event); #endif // wxUSE_GUI +} // console applications may avoid using DECLARE_APP and IMPLEMENT_APP macros // and call these functions instead at the program startup and termination @@ -369,7 +377,7 @@ public: #elif defined(__WXMSW__) && defined(WXUSINGDLL) // NT defines APIENTRY, 3.x not #if !defined(WXAPIENTRY) - #define WXAPIENTRY FAR wxSTDCALL + #define WXAPIENTRY WXFAR wxSTDCALL #endif #define IMPLEMENT_WXWIN_MAIN \