X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3754265e328a7cc7f67a46a9beea105cf1d49a14..48e5284db6d6f1dab46a81a4ae0d0438ea37bd6e:/include/wx/evtloop.h diff --git a/include/wx/evtloop.h b/include/wx/evtloop.h index f3155ab6eb..2612ac024c 100644 --- a/include/wx/evtloop.h +++ b/include/wx/evtloop.h @@ -12,10 +12,6 @@ #ifndef _WX_EVTLOOP_H_ #define _WX_EVTLOOP_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "evtloop.h" -#endif - #include "wx/utils.h" class WXDLLEXPORT wxEventLoop; @@ -39,10 +35,10 @@ public: // exit from the loop with the given exit code virtual void Exit(int rc = 0) = 0; - // return TRUE if any events are available + // return true if any events are available virtual bool Pending() const = 0; - // dispatch a single event, return FALSE if we should exit from the loop + // dispatch a single event, return false if we should exit from the loop virtual bool Dispatch() = 0; // is the event loop running now? @@ -72,7 +68,9 @@ protected: // can sometimes be very useful (e.g. under MSW this is necessary for // integration with MFC) but currently this is done for MSW only, other ports // should follow a.s.a.p. -#ifdef __WXMSW__ +#if defined(__WXPALMOS__) + #include "wx/palmos/evtloop.h" +#elif defined(__WXMSW__) #include "wx/msw/evtloop.h" #else @@ -82,19 +80,20 @@ class WXDLLEXPORT wxEventLoop : public wxEventLoopBase { public: wxEventLoop() { m_impl = NULL; } + virtual ~wxEventLoop(); virtual int Run(); virtual void Exit(int rc = 0); virtual bool Pending() const; virtual bool Dispatch(); - virtual bool IsRunning() const { return m_impl != NULL; } + virtual bool IsRunning() const { return GetActive() == this; } protected: // the pointer to the port specific implementation class wxEventLoopImpl *m_impl; DECLARE_NO_COPY_CLASS(wxEventLoop) -} + }; #endif // __WXMSW__/!__WXMSW__