wxDFB: use Unix event loop and timers (fixes #10408)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-01-30 15:21:47 +00:00
parent 3143722d5a
commit 86e9b8f28f
9 changed files with 158 additions and 192 deletions

View File

@@ -12,44 +12,35 @@
#define _WX_DFB_EVTLOOP_H_
#include "wx/dfb/dfbptr.h"
#include "wx/unix/evtloop.h"
wxDFB_DECLARE_INTERFACE(IDirectFBEventBuffer);
struct wxDFBEvent;
// ----------------------------------------------------------------------------
// wxEventLoop
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopManual
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxConsoleEventLoop
{
public:
wxGUIEventLoop();
virtual bool Pending() const;
virtual bool Dispatch();
virtual int DispatchTimeout(unsigned long timeout);
// returns DirectFB event buffer used by wx
static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer();
private:
// wxYield implementation: iterate the loop as long as there are any
// pending events
void Yield();
protected:
virtual void WakeUp();
virtual void OnNextIteration();
virtual void HandleDFBEvent(const wxDFBEvent& event);
private:
static void InitBuffer();
static void CleanUp();
friend class wxApp; // calls CleanUp() and WakeUp()
friend class wxApp; // calls CleanUp()
private:
static wxIDirectFBEventBufferPtr ms_buffer;
static int ms_bufferFd;
DECLARE_NO_COPY_CLASS(wxGUIEventLoop)
};