2006-08-27 05:42:42 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/dfb/evtloop.h
|
|
|
|
// Purpose: declares wxEventLoop class
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2006-08-16
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2006 REA Elektronik GmbH
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DFB_EVTLOOP_H_
|
|
|
|
#define _WX_DFB_EVTLOOP_H_
|
|
|
|
|
2006-09-06 05:40:31 -04:00
|
|
|
#include "wx/dfb/dfbptr.h"
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
wxDFB_DECLARE_INTERFACE(IDirectFBEventBuffer);
|
|
|
|
struct wxDFBEvent;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxEventLoop
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxEventLoop : public wxEventLoopManual
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxEventLoop();
|
|
|
|
|
|
|
|
virtual bool Pending() const;
|
|
|
|
virtual bool Dispatch();
|
|
|
|
|
|
|
|
// returns DirectFB event buffer used by wx
|
2006-09-06 05:40:31 -04:00
|
|
|
static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer();
|
2006-08-27 05:42:42 -04:00
|
|
|
|
2006-12-18 12:24:06 -05:00
|
|
|
// wxYield implementation: iterate the loop as long as there are any
|
|
|
|
// pending events
|
|
|
|
void Yield();
|
|
|
|
|
2006-08-27 05:42:42 -04:00
|
|
|
protected:
|
|
|
|
virtual void WakeUp();
|
|
|
|
virtual void OnNextIteration();
|
|
|
|
|
|
|
|
virtual void HandleDFBEvent(const wxDFBEvent& event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void InitBuffer();
|
2006-09-30 15:22:40 -04:00
|
|
|
static void CleanUp();
|
|
|
|
|
|
|
|
friend class wxApp; // calls CleanUp() and WakeUp()
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
private:
|
2006-09-06 05:40:31 -04:00
|
|
|
static wxIDirectFBEventBufferPtr ms_buffer;
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
DECLARE_NO_COPY_CLASS(wxEventLoop)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_DFB_EVTLOOP_H_
|