1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/evtloop.h
3 // Purpose: wxGTK event loop implementation
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GTK_EVTLOOP_H_
12 #define _WX_GTK_EVTLOOP_H_
14 // ----------------------------------------------------------------------------
15 // wxGUIEventLoop for wxGTK
16 // ----------------------------------------------------------------------------
18 typedef union _GdkEvent GdkEvent
;
20 class WXDLLIMPEXP_CORE wxGUIEventLoop
: public wxEventLoopBase
25 virtual void Exit(int rc
= 0);
26 virtual bool Pending() const;
27 virtual bool Dispatch();
28 virtual int DispatchTimeout(unsigned long timeout
);
29 virtual void WakeUp();
30 virtual bool YieldFor(long eventsToProcess
);
32 #if wxUSE_EVENTLOOP_SOURCE
33 virtual wxEventLoopSource
*
34 AddSourceForFD(int fd
, wxEventLoopSourceHandler
*handler
, int flags
);
35 #endif // wxUSE_EVENTLOOP_SOURCE
37 void StoreGdkEventForLaterProcessing(GdkEvent
* ev
)
38 { m_arrGdkEvents
.Add(ev
); }
44 // the exit code of this event loop
47 // used to temporarily store events in DoYield()
48 wxArrayPtrVoid m_arrGdkEvents
;
50 wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop
);
53 #endif // _WX_GTK_EVTLOOP_H_