X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61478ea03f87607cc9060e67a8f2656b83448636..b04237742c51e022af8ca8fe8933437734f392a3:/include/wx/msw/evtloop.h?ds=sidebyside diff --git a/include/wx/msw/evtloop.h b/include/wx/msw/evtloop.h index fd548b87f2..2c2c524b65 100644 --- a/include/wx/msw/evtloop.h +++ b/include/wx/msw/evtloop.h @@ -13,6 +13,8 @@ #define _WX_MSW_EVTLOOP_H_ #if wxUSE_GUI +#include "wx/dynarray.h" +#include "wx/msw/wrapwin.h" #include "wx/window.h" #endif @@ -32,10 +34,16 @@ protected: // get the next message from queue and return true or return false if we // got WM_QUIT or an error occurred bool GetNextMessage(WXMSG *msg); + + // same as above but with a timeout and return value can be -1 meaning that + // time out expired in addition to + int GetNextMessageTimeout(WXMSG *msg, unsigned long timeout); }; #if wxUSE_GUI +WX_DECLARE_OBJARRAY(MSG, wxMSGArray); + class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxMSWEventLoopBase { public: @@ -66,7 +74,9 @@ public: // override/implement base class virtuals virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); virtual void WakeUp(); + virtual bool YieldFor(long eventsToProcess); protected: virtual void OnNextIteration(); @@ -76,6 +86,8 @@ private: // non NULL) static bool IsChildOfCriticalWindow(wxWindowMSW *win); + // array of messages used for temporary storage by YieldFor() + wxMSGArray m_arrMSG; // critical window or NULL static wxWindowMSW *ms_winCritical; @@ -92,10 +104,12 @@ public: // override/implement base class virtuals virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); virtual void WakeUp(); + virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; } -protected: - virtual void OnNextIteration(); + // MSW-specific function to process a single message + virtual void ProcessMessage(WXMSG *msg); }; #endif // wxUSE_CONSOLE_EVENTLOOP