]> git.saurik.com Git - wxWidgets.git/commit - src/osx/cocoa/evtloop.mm
Refactor wxEventLoopSource-related code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 11:36:35 +0000 (11:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 11:36:35 +0000 (11:36 +0000)
commit5cd99866132366b74289e5a08e963723732bae01
treedc72ae57c8108468a99f50e2437561e80107e50c
parent6b8ef0b35d674bc262eb2005ac1321762c831d31
Refactor wxEventLoopSource-related code.

Currently wxEventLoopSource can't be created directly and can only be used to
monitor file descriptors so reduce the API to just wxEventLoop::AddSourceForFD()
and remove AddSource(), RemoveSource() and RemoveAllSources() which couldn't
be implemented for all ports. This makes the code much simpler without any
loss of functionality.

Make wxEventLoopSource responsible for removing itself from the event loop
when it is deleted. This allows to remove IsOk() and Invalidate() methods
making the code simpler and gets rid of various sets/maps which were used
before.

This also allows to support event loop sources in Carbon as well: wxOSX/Carbon
now compiles and works with wxUSE_FSWATCHER==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
25 files changed:
Makefile.in
build/bakefiles/files.bkl
include/wx/evtloop.h
include/wx/evtloopsrc.h [new file with mode: 0644]
include/wx/gtk/evtloop.h
include/wx/gtk/evtloopsrc.h [new file with mode: 0644]
include/wx/osx/carbon/evtloop.h
include/wx/osx/cocoa/evtloop.h
include/wx/osx/core/cfref.h
include/wx/osx/evtloop.h
include/wx/osx/evtloopsrc.h [new file with mode: 0644]
include/wx/private/fswatcher.h
include/wx/unix/evtloop.h
include/wx/unix/evtloopsrc.h [new file with mode: 0644]
include/wx/unix/private/fswatcher_inotify.h
include/wx/unix/private/fswatcher_kqueue.h
samples/fswatcher/fswatcher.cpp
src/common/evtloopcmn.cpp
src/gtk/evtloop.cpp
src/osx/carbon/evtloop.cpp
src/osx/cocoa/evtloop.mm
src/osx/core/evtloop_cf.cpp [new file with mode: 0644]
src/unix/evtloopunix.cpp
src/unix/fswatcher_inotify.cpp
src/unix/fswatcher_kqueue.cpp