improved wxMac event loop implementation and refactored the code to share it with wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-01-12 23:06:26 +00:00
parent 4d90072c22
commit c8026dea6c
14 changed files with 2300 additions and 2027 deletions

View File

@@ -27,10 +27,12 @@
// wxEventLoop
// ----------------------------------------------------------------------------
#if wxMAC_USE_RUN_APP_EVENT_LOOP
class WXDLLEXPORT wxEventLoop : public wxEventLoopBase
{
public:
wxEventLoop();
wxEventLoop() { m_exitcode = 0; }
// implement base class pure virtuals
virtual int Run();
@@ -39,14 +41,25 @@ public:
virtual bool Dispatch();
private:
// the loop exit code
int m_exitcode;
#if !wxMAC_USE_RUN_APP_EVENT_LOOP
// should we exit the loop?
bool m_shouldExit;
#endif // !wxMAC_USE_RUN_APP_EVENT_LOOP
};
#else // manual event loop
class WXDLLEXPORT wxEventLoop : public wxEventLoopManual
{
public:
wxEventLoop() { }
virtual bool Pending() const;
virtual bool Dispatch();
protected:
// implement base class pure virtual
virtual void WakeUp();
};
#endif // auto/manual event loop
#endif // _WX_MAC_CARBON_EVTLOOP_H_