dolphin/Externals/wxWidgets3/include/wx/unix/evtloop.h
Soren Jorvang d14efe561b Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the
last 2.9 release before the 3.0 stable release.

Since the full wxWidgets distribution is rather large, I have
imported only the parts that we use, on a subdirectory basis:

art
include/wx/*.*
include/wx/aui
include/wx/cocoa
include/wx/generic
include/wx/gtk
include/wx/meta
include/wx/msw
include/wx/osx
include/wx/persist
include/wx/private
include/wx/protocol
include/wx/unix
src/aui
src/common
src/generic
src/gtk
src/msw
src/osx
src/unix


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-20 18:05:19 +00:00

69 lines
2 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: wx/unix/evtloop.h
// Purpose: declares wxEventLoop class
// Author: Lukasz Michalski (lm@zork.pl)
// Created: 2007-05-07
// RCS-ID: $Id: evtloop.h 65680 2010-09-30 11:44:45Z VZ $
// Copyright: (c) 2007 Lukasz Michalski
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_UNIX_EVTLOOP_H_
#define _WX_UNIX_EVTLOOP_H_
#if wxUSE_CONSOLE_EVENTLOOP
// ----------------------------------------------------------------------------
// wxConsoleEventLoop
// ----------------------------------------------------------------------------
class wxFDIODispatcher;
class wxUnixEventLoopSource;
namespace wxPrivate
{
class PipeIOHandler;
}
class WXDLLIMPEXP_BASE wxConsoleEventLoop
#ifdef __WXOSX__
: public wxCFEventLoop
#else
: public wxEventLoopManual
#endif
{
public:
// initialize the event loop, use IsOk() to check if we were successful
wxConsoleEventLoop();
virtual ~wxConsoleEventLoop();
// implement base class pure virtuals
virtual bool Pending() const;
virtual bool Dispatch();
virtual int DispatchTimeout(unsigned long timeout);
virtual void WakeUp();
virtual bool IsOk() const { return m_dispatcher != NULL; }
virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; }
#if wxUSE_EVENTLOOP_SOURCE
virtual wxEventLoopSource *
AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
#endif // wxUSE_EVENTLOOP_SOURCE
protected:
virtual void OnNextIteration();
private:
// pipe used for wake up messages: when a child thread wants to wake up
// the event loop in the main thread it writes to this pipe
wxPrivate::PipeIOHandler *m_wakeupPipe;
// either wxSelectDispatcher or wxEpollDispatcher
wxFDIODispatcher *m_dispatcher;
wxDECLARE_NO_COPY_CLASS(wxConsoleEventLoop);
};
#endif // wxUSE_CONSOLE_EVENTLOOP
#endif // _WX_UNIX_EVTLOOP_H_