]> git.saurik.com Git - wxWidgets.git/blob - include/wx/unix/private/epolldispatcher.h
porting reordering of controls back from 2.8
[wxWidgets.git] / include / wx / unix / private / epolldispatcher.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/private/epolldispatcher.h
3 // Purpose: wxEpollDispatcher class
4 // Authors: Lukasz Michalski
5 // Created: April 2007
6 // Copyright: (c) Lukasz Michalski
7 // RCS-ID: $Id$
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_PRIVATE_EPOLLDISPATCHER_H_
12 #define _WX_PRIVATE_EPOLLDISPATCHER_H_
13
14 #include "wx/defs.h"
15
16 #ifdef wxUSE_EPOLL_DISPATCHER
17
18 #include "wx/private/fdiodispatcher.h"
19
20 class WXDLLIMPEXP_CORE wxEpollDispatcher : public wxFDIODispatcher
21 {
22 public:
23 // create a new instance of this class, can return NULL if
24 // epoll() is not supported on this system
25 //
26 // the caller should delete the returned pointer
27 static wxEpollDispatcher *Create();
28
29 virtual ~wxEpollDispatcher();
30
31 // implement base class pure virtual methods
32 virtual bool RegisterFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL);
33 virtual bool ModifyFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL);
34 virtual bool UnregisterFD(int fd);
35 virtual void Dispatch(int timeout = TIMEOUT_INFINITE);
36
37 private:
38 // ctor is private, use Create()
39 wxEpollDispatcher(int epollDescriptor);
40
41 int m_epollDescriptor;
42 };
43
44 #endif // wxUSE_EPOLL_DISPATCHER
45
46 #endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_