]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/evtloop.h
Fix wxGrid editors background painting.
[wxWidgets.git] / include / wx / gtk / evtloop.h
CommitLineData
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
18typedef union _GdkEvent GdkEvent;
19
5cd99866 20class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase
564c7fc4
VZ
21{
22public:
23 wxGUIEventLoop();
24
25 virtual int Run();
26 virtual void Exit(int rc = 0);
27 virtual bool Pending() const;
28 virtual bool Dispatch();
29 virtual int DispatchTimeout(unsigned long timeout);
30 virtual void WakeUp();
dde19c21 31 virtual bool YieldFor(long eventsToProcess);
564c7fc4 32
6b8ef0b3 33#if wxUSE_EVENTLOOP_SOURCE
5cd99866
VZ
34 virtual wxEventLoopSource *
35 AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
36#endif // wxUSE_EVENTLOOP_SOURCE
6b8ef0b3 37
5cd99866
VZ
38 void StoreGdkEventForLaterProcessing(GdkEvent* ev)
39 { m_arrGdkEvents.Add(ev); }
dde19c21 40
5cd99866 41private:
564c7fc4
VZ
42 // the exit code of this event loop
43 int m_exitcode;
44
dde19c21
FM
45 // used to temporarily store events in DoYield()
46 wxArrayPtrVoid m_arrGdkEvents;
47
c0c133e1 48 wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop);
564c7fc4
VZ
49};
50
51#endif // _WX_GTK_EVTLOOP_H_