1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/evtloopsrc.h
3 // Purpose: wxCFEventLoopSource class
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_OSX_EVTLOOPSRC_H_
12 #define _WX_OSX_EVTLOOPSRC_H_
14 typedef struct __CFSocket
* CFSocketRef
;
16 // ----------------------------------------------------------------------------
17 // wxCFEventLoopSource: CoreFoundation-based wxEventLoopSource for OS X
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_BASE wxCFEventLoopSource
: public wxEventLoopSource
23 // Create a new source in uninitialized state, call InitSocketRef() later
24 // to associate it with the socket it is going to use.
25 wxCFEventLoopSource(wxEventLoopSourceHandler
*handler
, int flags
)
26 : wxEventLoopSource(handler
, flags
)
31 // Finish initialization of the event loop source by providing the
32 // associated socket. This object takes ownership of it and will release it.
33 void InitSourceSocket(CFSocketRef cfSocket
);
35 // Destructor deletes the associated socket.
36 virtual ~wxCFEventLoopSource();
39 CFSocketRef m_cfSocket
;
41 wxDECLARE_NO_COPY_CLASS(wxCFEventLoopSource
);
44 #endif // _WX_OSX_EVTLOOPSRC_H_