Merge SOC2009_FSWATCHER branch into trunk.
Merges everything from the branch with only some minor changes, mostly renamed wxUSE_FSWATCHER_{INOTIFY,KQUEUE} to wxHAS_{INOTIFY,KQUEUE}. Add wxFileSystemWatcher and related classes. Also introduces wxEventLoopSource. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,9 +11,11 @@
|
||||
#ifndef _WX_OSX_COCOA_EVTLOOP_H_
|
||||
#define _WX_OSX_COCOA_EVTLOOP_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopManual
|
||||
class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxEventLoopManual
|
||||
{
|
||||
public:
|
||||
typedef wxMacEventLoopSource Source;
|
||||
|
||||
wxGUIEventLoop();
|
||||
|
||||
// implement/override base class pure virtual
|
||||
@@ -24,6 +26,31 @@ public:
|
||||
virtual void WakeUp();
|
||||
virtual bool YieldFor(long eventsToProcess);
|
||||
|
||||
#if wxUSE_EVENTLOOP_SOURCE
|
||||
virtual wxMacEventLoopSource* CreateSource() const
|
||||
{
|
||||
return new wxMacEventLoopSource();
|
||||
}
|
||||
|
||||
virtual wxMacEventLoopSource* CreateSource(int res,
|
||||
wxEventLoopSourceHandler* handler,
|
||||
int flags) const;
|
||||
|
||||
virtual wxMacEventLoopSource* CreateSource(CFRunLoopSourceRef res,
|
||||
wxEventLoopSourceHandler* handler,
|
||||
int flags) const
|
||||
{
|
||||
return new wxMacEventLoopSource(res, handler, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
#if wxUSE_EVENTLOOP_SOURCE
|
||||
// adding/removing sources
|
||||
virtual bool DoAddSource(wxAbstractEventLoopSource* source);
|
||||
virtual bool DoRemoveSource(wxAbstractEventLoopSource* source);
|
||||
#endif
|
||||
|
||||
private:
|
||||
double m_sleepTime;
|
||||
};
|
||||
|
Reference in New Issue
Block a user