]> git.saurik.com Git - wxWidgets.git/blame - include/wx/unix/evtloopsrc.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / unix / evtloopsrc.h
CommitLineData
5cd99866
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/unix/evtloopsrc.h
3// Purpose: wxUnixEventLoopSource class
4// Author: Vadim Zeitlin
5// Created: 2009-10-21
5cd99866
VZ
6// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_UNIX_EVTLOOPSRC_H_
11#define _WX_UNIX_EVTLOOPSRC_H_
12
13class wxFDIODispatcher;
14class wxFDIOHandler;
15
16// ----------------------------------------------------------------------------
17// wxUnixEventLoopSource: wxEventLoopSource for Unix-like toolkits using fds
18// ----------------------------------------------------------------------------
19
20class wxUnixEventLoopSource : public wxEventLoopSource
21{
22public:
23 // dispatcher and fdioHandler are only used here to allow us to unregister
24 // from the event loop when we're destroyed
25 wxUnixEventLoopSource(wxFDIODispatcher *dispatcher,
26 wxFDIOHandler *fdioHandler,
27 int fd,
28 wxEventLoopSourceHandler *handler,
29 int flags)
30 : wxEventLoopSource(handler, flags),
31 m_dispatcher(dispatcher),
32 m_fdioHandler(fdioHandler),
33 m_fd(fd)
34 {
35 }
36
37 virtual ~wxUnixEventLoopSource();
38
39private:
40 wxFDIODispatcher * const m_dispatcher;
41 wxFDIOHandler * const m_fdioHandler;
42 const int m_fd;
43
44 wxDECLARE_NO_COPY_CLASS(wxUnixEventLoopSource);
45};
46
47#endif // _WX_UNIX_EVTLOOPSRC_H_
48