]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/osx/evtloopsrc.h
More German translations updates from Sebastian Walderich.
[wxWidgets.git] / include / wx / osx / evtloopsrc.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/osx/evtloopsrc.h
3// Purpose: wxCFEventLoopSource class
4// Author: Vadim Zeitlin
5// Created: 2009-10-21
6// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_OSX_EVTLOOPSRC_H_
11#define _WX_OSX_EVTLOOPSRC_H_
12
13typedef struct __CFSocket* CFSocketRef;
14
15// ----------------------------------------------------------------------------
16// wxCFEventLoopSource: CoreFoundation-based wxEventLoopSource for OS X
17// ----------------------------------------------------------------------------
18
19class WXDLLIMPEXP_BASE wxCFEventLoopSource : public wxEventLoopSource
20{
21public:
22 // Create a new source in uninitialized state, call InitSocketRef() later
23 // to associate it with the socket it is going to use.
24 wxCFEventLoopSource(wxEventLoopSourceHandler *handler, int flags)
25 : wxEventLoopSource(handler, flags)
26 {
27 m_cfSocket = NULL;
28 }
29
30 // Finish initialization of the event loop source by providing the
31 // associated socket. This object takes ownership of it and will release it.
32 void InitSourceSocket(CFSocketRef cfSocket);
33
34 // Destructor deletes the associated socket.
35 virtual ~wxCFEventLoopSource();
36
37private:
38 CFSocketRef m_cfSocket;
39
40 wxDECLARE_NO_COPY_CLASS(wxCFEventLoopSource);
41};
42
43#endif // _WX_OSX_EVTLOOPSRC_H_
44