]>
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 | ||
16 | wxDFB_DECLARE_INTERFACE(IDirectFBEventBuffer); | |
17 | struct wxDFBEvent; | |
18 | ||
19 | // ---------------------------------------------------------------------------- | |
20 | // wxEventLoop | |
21 | // ---------------------------------------------------------------------------- | |
22 | ||
23 | class WXDLLIMPEXP_CORE wxEventLoop : public wxEventLoopManual | |
24 | { | |
25 | public: | |
26 | wxEventLoop(); | |
27 | ||
28 | virtual bool Pending() const; | |
29 | virtual bool Dispatch(); | |
30 | ||
31 | // returns DirectFB event buffer used by wx | |
32 | static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer(); | |
33 | ||
34 | protected: | |
35 | virtual void WakeUp(); | |
36 | virtual void OnNextIteration(); | |
37 | ||
38 | virtual void HandleDFBEvent(const wxDFBEvent& event); | |
39 | ||
40 | private: | |
41 | static void InitBuffer(); | |
42 | static void CleanUp(); | |
43 | ||
44 | friend class wxApp; // calls CleanUp() and WakeUp() | |
45 | ||
46 | private: | |
47 | static wxIDirectFBEventBufferPtr ms_buffer; | |
48 | ||
49 | DECLARE_NO_COPY_CLASS(wxEventLoop) | |
50 | }; | |
51 | ||
52 | #endif // _WX_DFB_EVTLOOP_H_ |