]>
Commit | Line | Data |
---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/dfb/evtloop.h | |
3 | // Purpose: declares wxEventLoop class | |
4 | // Author: Vaclav Slavik | |
5 | // Created: 2006-08-16 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2006 REA Elektronik GmbH | |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_DFB_EVTLOOP_H_ | |
12 | #define _WX_DFB_EVTLOOP_H_ | |
13 | ||
14 | #include "wx/dfb/dfbptr.h" | |
15 | #include "wx/unix/evtloop.h" | |
16 | ||
17 | wxDFB_DECLARE_INTERFACE(IDirectFBEventBuffer); | |
18 | ||
19 | // ---------------------------------------------------------------------------- | |
20 | // wxEventLoop | |
21 | // ---------------------------------------------------------------------------- | |
22 | ||
23 | class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxConsoleEventLoop | |
24 | { | |
25 | public: | |
26 | wxGUIEventLoop(); | |
27 | ||
28 | // returns DirectFB event buffer used by wx | |
29 | static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer(); | |
30 | ||
31 | private: | |
32 | // wxYield implementation: iterate the loop as long as there are any | |
33 | // pending events | |
34 | void Yield(); | |
35 | ||
36 | static void InitBuffer(); | |
37 | static void CleanUp(); | |
38 | ||
39 | friend class wxApp; // calls CleanUp() | |
40 | ||
41 | private: | |
42 | static wxIDirectFBEventBufferPtr ms_buffer; | |
43 | static int ms_bufferFd; | |
44 | ||
45 | wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); | |
46 | }; | |
47 | ||
48 | #endif // _WX_DFB_EVTLOOP_H_ |