#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 wxEventLoop : public wxEventLoopManual
+class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxConsoleEventLoop
{
public:
- wxEventLoop();
-
- virtual bool Pending() const;
- virtual bool Dispatch();
+ wxGUIEventLoop();
// returns DirectFB event buffer used by wx
static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer();
-protected:
- virtual void WakeUp();
- virtual void OnNextIteration();
-
- virtual void HandleDFBEvent(const wxDFBEvent& event);
-
private:
+ // wxYield implementation: iterate the loop as long as there are any
+ // pending events
+ void Yield();
+
static void InitBuffer();
+ static void CleanUp();
+
+ friend class wxApp; // calls CleanUp()
private:
static wxIDirectFBEventBufferPtr ms_buffer;
+ static int ms_bufferFd;
- friend class wxApp; // calls WakeUp()
-
- DECLARE_NO_COPY_CLASS(wxEventLoop)
+ wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop);
};
#endif // _WX_DFB_EVTLOOP_H_