]>
Commit | Line | Data |
---|---|---|
564c7fc4 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/gtk/evtloop.h | |
3 | // Purpose: wxGTK event loop implementation | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2008-12-27 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> | |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_GTK_EVTLOOP_H_ | |
12 | #define _WX_GTK_EVTLOOP_H_ | |
13 | ||
14 | // ---------------------------------------------------------------------------- | |
15 | // wxGUIEventLoop for wxGTK | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
387e72ba FM |
18 | typedef union _GdkEvent GdkEvent; |
19 | ||
5cd99866 | 20 | class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase |
564c7fc4 VZ |
21 | { |
22 | public: | |
23 | wxGUIEventLoop(); | |
24 | ||
d3ad22bd | 25 | virtual void ScheduleExit(int rc = 0); |
564c7fc4 VZ |
26 | virtual bool Pending() const; |
27 | virtual bool Dispatch(); | |
28 | virtual int DispatchTimeout(unsigned long timeout); | |
29 | virtual void WakeUp(); | |
dde19c21 | 30 | virtual bool YieldFor(long eventsToProcess); |
564c7fc4 | 31 | |
5cd99866 VZ |
32 | void StoreGdkEventForLaterProcessing(GdkEvent* ev) |
33 | { m_arrGdkEvents.Add(ev); } | |
dde19c21 | 34 | |
c738d187 VZ |
35 | protected: |
36 | virtual int DoRun(); | |
37 | ||
5cd99866 | 38 | private: |
564c7fc4 VZ |
39 | // the exit code of this event loop |
40 | int m_exitcode; | |
41 | ||
dde19c21 FM |
42 | // used to temporarily store events in DoYield() |
43 | wxArrayPtrVoid m_arrGdkEvents; | |
44 | ||
c0c133e1 | 45 | wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); |
564c7fc4 VZ |
46 | }; |
47 | ||
48 | #endif // _WX_GTK_EVTLOOP_H_ |