improved wxMac event loop implementation and refactored the code to share it with wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4d90072c22
commit
c8026dea6c
20
Makefile.in
20
Makefile.in
@ -3065,6 +3065,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS = \
|
||||
monodll_dpycmn.o \
|
||||
monodll_dseldlg.o \
|
||||
monodll_effects.o \
|
||||
monodll_evtloopcmn.o \
|
||||
monodll_fddlgcmn.o \
|
||||
monodll_fldlgcmn.o \
|
||||
monodll_fontcmn.o \
|
||||
@ -3214,6 +3215,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS = \
|
||||
monodll_dpycmn.o \
|
||||
monodll_dseldlg.o \
|
||||
monodll_effects.o \
|
||||
monodll_evtloopcmn.o \
|
||||
monodll_fddlgcmn.o \
|
||||
monodll_fldlgcmn.o \
|
||||
monodll_fontcmn.o \
|
||||
@ -4550,6 +4552,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_1 = \
|
||||
monolib_dpycmn.o \
|
||||
monolib_dseldlg.o \
|
||||
monolib_effects.o \
|
||||
monolib_evtloopcmn.o \
|
||||
monolib_fddlgcmn.o \
|
||||
monolib_fldlgcmn.o \
|
||||
monolib_fontcmn.o \
|
||||
@ -4699,6 +4702,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 = \
|
||||
monolib_dpycmn.o \
|
||||
monolib_dseldlg.o \
|
||||
monolib_effects.o \
|
||||
monolib_evtloopcmn.o \
|
||||
monolib_fddlgcmn.o \
|
||||
monolib_fldlgcmn.o \
|
||||
monolib_fontcmn.o \
|
||||
@ -6261,6 +6265,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_2 = \
|
||||
coredll_dpycmn.o \
|
||||
coredll_dseldlg.o \
|
||||
coredll_effects.o \
|
||||
coredll_evtloopcmn.o \
|
||||
coredll_fddlgcmn.o \
|
||||
coredll_fldlgcmn.o \
|
||||
coredll_fontcmn.o \
|
||||
@ -6410,6 +6415,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 = \
|
||||
coredll_dpycmn.o \
|
||||
coredll_dseldlg.o \
|
||||
coredll_effects.o \
|
||||
coredll_evtloopcmn.o \
|
||||
coredll_fddlgcmn.o \
|
||||
coredll_fldlgcmn.o \
|
||||
coredll_fontcmn.o \
|
||||
@ -7460,6 +7466,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_3 = \
|
||||
corelib_dpycmn.o \
|
||||
corelib_dseldlg.o \
|
||||
corelib_effects.o \
|
||||
corelib_evtloopcmn.o \
|
||||
corelib_fddlgcmn.o \
|
||||
corelib_fldlgcmn.o \
|
||||
corelib_fontcmn.o \
|
||||
@ -7609,6 +7616,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 = \
|
||||
corelib_dpycmn.o \
|
||||
corelib_dseldlg.o \
|
||||
corelib_effects.o \
|
||||
corelib_evtloopcmn.o \
|
||||
corelib_fddlgcmn.o \
|
||||
corelib_fldlgcmn.o \
|
||||
corelib_fontcmn.o \
|
||||
@ -13552,6 +13560,9 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
|
||||
@COND_USE_GUI_1@monodll_effects.o: $(srcdir)/src/common/effects.cpp $(MONODLL_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/effects.cpp
|
||||
|
||||
@COND_USE_GUI_1@monodll_evtloopcmn.o: $(srcdir)/src/common/evtloopcmn.cpp $(MONODLL_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/evtloopcmn.cpp
|
||||
|
||||
@COND_USE_GUI_1@monodll_fddlgcmn.o: $(srcdir)/src/common/fddlgcmn.cpp $(MONODLL_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/fddlgcmn.cpp
|
||||
|
||||
@ -17056,6 +17067,9 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
|
||||
@COND_USE_GUI_1@monolib_effects.o: $(srcdir)/src/common/effects.cpp $(MONOLIB_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/effects.cpp
|
||||
|
||||
@COND_USE_GUI_1@monolib_evtloopcmn.o: $(srcdir)/src/common/evtloopcmn.cpp $(MONOLIB_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/evtloopcmn.cpp
|
||||
|
||||
@COND_USE_GUI_1@monolib_fddlgcmn.o: $(srcdir)/src/common/fddlgcmn.cpp $(MONOLIB_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/fddlgcmn.cpp
|
||||
|
||||
@ -20947,6 +20961,9 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
|
||||
@COND_USE_GUI_1@coredll_effects.o: $(srcdir)/src/common/effects.cpp $(COREDLL_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/effects.cpp
|
||||
|
||||
@COND_USE_GUI_1@coredll_evtloopcmn.o: $(srcdir)/src/common/evtloopcmn.cpp $(COREDLL_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/evtloopcmn.cpp
|
||||
|
||||
@COND_USE_GUI_1@coredll_fddlgcmn.o: $(srcdir)/src/common/fddlgcmn.cpp $(COREDLL_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/fddlgcmn.cpp
|
||||
|
||||
@ -23464,6 +23481,9 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
|
||||
@COND_USE_GUI_1@corelib_effects.o: $(srcdir)/src/common/effects.cpp $(CORELIB_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/effects.cpp
|
||||
|
||||
@COND_USE_GUI_1@corelib_evtloopcmn.o: $(srcdir)/src/common/evtloopcmn.cpp $(CORELIB_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/evtloopcmn.cpp
|
||||
|
||||
@COND_USE_GUI_1@corelib_fddlgcmn.o: $(srcdir)/src/common/fddlgcmn.cpp $(CORELIB_ODEP)
|
||||
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/fddlgcmn.cpp
|
||||
|
||||
|
@ -559,6 +559,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/common/dpycmn.cpp
|
||||
src/common/dseldlg.cpp
|
||||
src/common/effects.cpp
|
||||
src/common/evtloopcmn.cpp
|
||||
src/common/fddlgcmn.cpp
|
||||
src/common/fldlgcmn.cpp
|
||||
src/common/fontcmn.cpp
|
||||
|
@ -1260,6 +1260,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_dpycmn.obj \
|
||||
$(OBJS)\monodll_dseldlg.obj \
|
||||
$(OBJS)\monodll_effects.obj \
|
||||
$(OBJS)\monodll_evtloopcmn.obj \
|
||||
$(OBJS)\monodll_fddlgcmn.obj \
|
||||
$(OBJS)\monodll_fldlgcmn.obj \
|
||||
$(OBJS)\monodll_fontcmn.obj \
|
||||
@ -1457,6 +1458,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_dpycmn.obj \
|
||||
$(OBJS)\monodll_dseldlg.obj \
|
||||
$(OBJS)\monodll_effects.obj \
|
||||
$(OBJS)\monodll_evtloopcmn.obj \
|
||||
$(OBJS)\monodll_fddlgcmn.obj \
|
||||
$(OBJS)\monodll_fldlgcmn.obj \
|
||||
$(OBJS)\monodll_fontcmn.obj \
|
||||
@ -1788,6 +1790,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_dpycmn.obj \
|
||||
$(OBJS)\monolib_dseldlg.obj \
|
||||
$(OBJS)\monolib_effects.obj \
|
||||
$(OBJS)\monolib_evtloopcmn.obj \
|
||||
$(OBJS)\monolib_fddlgcmn.obj \
|
||||
$(OBJS)\monolib_fldlgcmn.obj \
|
||||
$(OBJS)\monolib_fontcmn.obj \
|
||||
@ -1985,6 +1988,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_dpycmn.obj \
|
||||
$(OBJS)\monolib_dseldlg.obj \
|
||||
$(OBJS)\monolib_effects.obj \
|
||||
$(OBJS)\monolib_evtloopcmn.obj \
|
||||
$(OBJS)\monolib_fddlgcmn.obj \
|
||||
$(OBJS)\monolib_fldlgcmn.obj \
|
||||
$(OBJS)\monolib_fontcmn.obj \
|
||||
@ -2250,6 +2254,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_dpycmn.obj \
|
||||
$(OBJS)\coredll_dseldlg.obj \
|
||||
$(OBJS)\coredll_effects.obj \
|
||||
$(OBJS)\coredll_evtloopcmn.obj \
|
||||
$(OBJS)\coredll_fddlgcmn.obj \
|
||||
$(OBJS)\coredll_fldlgcmn.obj \
|
||||
$(OBJS)\coredll_fontcmn.obj \
|
||||
@ -2447,6 +2452,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_dpycmn.obj \
|
||||
$(OBJS)\coredll_dseldlg.obj \
|
||||
$(OBJS)\coredll_effects.obj \
|
||||
$(OBJS)\coredll_evtloopcmn.obj \
|
||||
$(OBJS)\coredll_fddlgcmn.obj \
|
||||
$(OBJS)\coredll_fldlgcmn.obj \
|
||||
$(OBJS)\coredll_fontcmn.obj \
|
||||
@ -2647,6 +2653,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_dpycmn.obj \
|
||||
$(OBJS)\corelib_dseldlg.obj \
|
||||
$(OBJS)\corelib_effects.obj \
|
||||
$(OBJS)\corelib_evtloopcmn.obj \
|
||||
$(OBJS)\corelib_fddlgcmn.obj \
|
||||
$(OBJS)\corelib_fldlgcmn.obj \
|
||||
$(OBJS)\corelib_fontcmn.obj \
|
||||
@ -2844,6 +2851,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_dpycmn.obj \
|
||||
$(OBJS)\corelib_dseldlg.obj \
|
||||
$(OBJS)\corelib_effects.obj \
|
||||
$(OBJS)\corelib_evtloopcmn.obj \
|
||||
$(OBJS)\corelib_fddlgcmn.obj \
|
||||
$(OBJS)\corelib_fldlgcmn.obj \
|
||||
$(OBJS)\corelib_fontcmn.obj \
|
||||
@ -5261,6 +5269,11 @@ $(OBJS)\monodll_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
@ -6991,6 +7004,11 @@ $(OBJS)\monolib_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
@ -8790,6 +8808,11 @@ $(OBJS)\coredll_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
|
||||
@ -9929,6 +9952,11 @@ $(OBJS)\corelib_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
|
||||
|
@ -1270,6 +1270,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_dpycmn.o \
|
||||
$(OBJS)\monodll_dseldlg.o \
|
||||
$(OBJS)\monodll_effects.o \
|
||||
$(OBJS)\monodll_evtloopcmn.o \
|
||||
$(OBJS)\monodll_fddlgcmn.o \
|
||||
$(OBJS)\monodll_fldlgcmn.o \
|
||||
$(OBJS)\monodll_fontcmn.o \
|
||||
@ -1469,6 +1470,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_dpycmn.o \
|
||||
$(OBJS)\monodll_dseldlg.o \
|
||||
$(OBJS)\monodll_effects.o \
|
||||
$(OBJS)\monodll_evtloopcmn.o \
|
||||
$(OBJS)\monodll_fddlgcmn.o \
|
||||
$(OBJS)\monodll_fldlgcmn.o \
|
||||
$(OBJS)\monodll_fontcmn.o \
|
||||
@ -1804,6 +1806,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_dpycmn.o \
|
||||
$(OBJS)\monolib_dseldlg.o \
|
||||
$(OBJS)\monolib_effects.o \
|
||||
$(OBJS)\monolib_evtloopcmn.o \
|
||||
$(OBJS)\monolib_fddlgcmn.o \
|
||||
$(OBJS)\monolib_fldlgcmn.o \
|
||||
$(OBJS)\monolib_fontcmn.o \
|
||||
@ -2003,6 +2006,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_dpycmn.o \
|
||||
$(OBJS)\monolib_dseldlg.o \
|
||||
$(OBJS)\monolib_effects.o \
|
||||
$(OBJS)\monolib_evtloopcmn.o \
|
||||
$(OBJS)\monolib_fddlgcmn.o \
|
||||
$(OBJS)\monolib_fldlgcmn.o \
|
||||
$(OBJS)\monolib_fontcmn.o \
|
||||
@ -2282,6 +2286,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_dpycmn.o \
|
||||
$(OBJS)\coredll_dseldlg.o \
|
||||
$(OBJS)\coredll_effects.o \
|
||||
$(OBJS)\coredll_evtloopcmn.o \
|
||||
$(OBJS)\coredll_fddlgcmn.o \
|
||||
$(OBJS)\coredll_fldlgcmn.o \
|
||||
$(OBJS)\coredll_fontcmn.o \
|
||||
@ -2481,6 +2486,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_dpycmn.o \
|
||||
$(OBJS)\coredll_dseldlg.o \
|
||||
$(OBJS)\coredll_effects.o \
|
||||
$(OBJS)\coredll_evtloopcmn.o \
|
||||
$(OBJS)\coredll_fddlgcmn.o \
|
||||
$(OBJS)\coredll_fldlgcmn.o \
|
||||
$(OBJS)\coredll_fontcmn.o \
|
||||
@ -2687,6 +2693,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_dpycmn.o \
|
||||
$(OBJS)\corelib_dseldlg.o \
|
||||
$(OBJS)\corelib_effects.o \
|
||||
$(OBJS)\corelib_evtloopcmn.o \
|
||||
$(OBJS)\corelib_fddlgcmn.o \
|
||||
$(OBJS)\corelib_fldlgcmn.o \
|
||||
$(OBJS)\corelib_fontcmn.o \
|
||||
@ -2886,6 +2893,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_dpycmn.o \
|
||||
$(OBJS)\corelib_dseldlg.o \
|
||||
$(OBJS)\corelib_effects.o \
|
||||
$(OBJS)\corelib_evtloopcmn.o \
|
||||
$(OBJS)\corelib_fddlgcmn.o \
|
||||
$(OBJS)\corelib_fldlgcmn.o \
|
||||
$(OBJS)\corelib_fontcmn.o \
|
||||
@ -5456,6 +5464,11 @@ $(OBJS)\monodll_effects.o: ../../src/common/effects.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monodll_evtloopcmn.o: ../../src/common/evtloopcmn.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monodll_fddlgcmn.o: ../../src/common/fddlgcmn.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
@ -7286,6 +7299,11 @@ $(OBJS)\monolib_effects.o: ../../src/common/effects.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monolib_evtloopcmn.o: ../../src/common/evtloopcmn.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monolib_fddlgcmn.o: ../../src/common/fddlgcmn.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
@ -9185,6 +9203,11 @@ $(OBJS)\coredll_effects.o: ../../src/common/effects.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\coredll_evtloopcmn.o: ../../src/common/evtloopcmn.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\coredll_fddlgcmn.o: ../../src/common/fddlgcmn.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
@ -10424,6 +10447,11 @@ $(OBJS)\corelib_effects.o: ../../src/common/effects.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\corelib_evtloopcmn.o: ../../src/common/evtloopcmn.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\corelib_fddlgcmn.o: ../../src/common/fddlgcmn.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
@ -1418,6 +1418,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_dpycmn.obj \
|
||||
$(OBJS)\monodll_dseldlg.obj \
|
||||
$(OBJS)\monodll_effects.obj \
|
||||
$(OBJS)\monodll_evtloopcmn.obj \
|
||||
$(OBJS)\monodll_fddlgcmn.obj \
|
||||
$(OBJS)\monodll_fldlgcmn.obj \
|
||||
$(OBJS)\monodll_fontcmn.obj \
|
||||
@ -1615,6 +1616,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_dpycmn.obj \
|
||||
$(OBJS)\monodll_dseldlg.obj \
|
||||
$(OBJS)\monodll_effects.obj \
|
||||
$(OBJS)\monodll_evtloopcmn.obj \
|
||||
$(OBJS)\monodll_fddlgcmn.obj \
|
||||
$(OBJS)\monodll_fldlgcmn.obj \
|
||||
$(OBJS)\monodll_fontcmn.obj \
|
||||
@ -1952,6 +1954,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_dpycmn.obj \
|
||||
$(OBJS)\monolib_dseldlg.obj \
|
||||
$(OBJS)\monolib_effects.obj \
|
||||
$(OBJS)\monolib_evtloopcmn.obj \
|
||||
$(OBJS)\monolib_fddlgcmn.obj \
|
||||
$(OBJS)\monolib_fldlgcmn.obj \
|
||||
$(OBJS)\monolib_fontcmn.obj \
|
||||
@ -2149,6 +2152,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_dpycmn.obj \
|
||||
$(OBJS)\monolib_dseldlg.obj \
|
||||
$(OBJS)\monolib_effects.obj \
|
||||
$(OBJS)\monolib_evtloopcmn.obj \
|
||||
$(OBJS)\monolib_fddlgcmn.obj \
|
||||
$(OBJS)\monolib_fldlgcmn.obj \
|
||||
$(OBJS)\monolib_fontcmn.obj \
|
||||
@ -2444,6 +2448,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_dpycmn.obj \
|
||||
$(OBJS)\coredll_dseldlg.obj \
|
||||
$(OBJS)\coredll_effects.obj \
|
||||
$(OBJS)\coredll_evtloopcmn.obj \
|
||||
$(OBJS)\coredll_fddlgcmn.obj \
|
||||
$(OBJS)\coredll_fldlgcmn.obj \
|
||||
$(OBJS)\coredll_fontcmn.obj \
|
||||
@ -2641,6 +2646,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_dpycmn.obj \
|
||||
$(OBJS)\coredll_dseldlg.obj \
|
||||
$(OBJS)\coredll_effects.obj \
|
||||
$(OBJS)\coredll_evtloopcmn.obj \
|
||||
$(OBJS)\coredll_fddlgcmn.obj \
|
||||
$(OBJS)\coredll_fldlgcmn.obj \
|
||||
$(OBJS)\coredll_fontcmn.obj \
|
||||
@ -2847,6 +2853,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_dpycmn.obj \
|
||||
$(OBJS)\corelib_dseldlg.obj \
|
||||
$(OBJS)\corelib_effects.obj \
|
||||
$(OBJS)\corelib_evtloopcmn.obj \
|
||||
$(OBJS)\corelib_fddlgcmn.obj \
|
||||
$(OBJS)\corelib_fldlgcmn.obj \
|
||||
$(OBJS)\corelib_fontcmn.obj \
|
||||
@ -3044,6 +3051,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_dpycmn.obj \
|
||||
$(OBJS)\corelib_dseldlg.obj \
|
||||
$(OBJS)\corelib_effects.obj \
|
||||
$(OBJS)\corelib_evtloopcmn.obj \
|
||||
$(OBJS)\corelib_fddlgcmn.obj \
|
||||
$(OBJS)\corelib_fldlgcmn.obj \
|
||||
$(OBJS)\corelib_fontcmn.obj \
|
||||
@ -5569,6 +5577,11 @@ $(OBJS)\monodll_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
@ -7299,6 +7312,11 @@ $(OBJS)\monolib_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
@ -9098,6 +9116,11 @@ $(OBJS)\coredll_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
|
||||
@ -10237,6 +10260,11 @@ $(OBJS)\corelib_effects.obj: ..\..\src\common\effects.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -552,6 +552,10 @@ SOURCE=..\..\src\common\event.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\common\evtloopcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\common\fddlgcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -66,6 +66,44 @@ protected:
|
||||
DECLARE_NO_COPY_CLASS(wxEventLoopBase)
|
||||
};
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
|
||||
// this class can be used to implement a standard event loop logic using
|
||||
// Pending() and Dispatch()
|
||||
//
|
||||
// it also handles idle processing automatically
|
||||
class WXDLLEXPORT wxEventLoopManual : public wxEventLoopBase
|
||||
{
|
||||
public:
|
||||
wxEventLoopManual();
|
||||
|
||||
// enters a loop calling OnNextIteration(), Pending() and Dispatch() and
|
||||
// terminating when Exit() is called
|
||||
virtual int Run();
|
||||
|
||||
// sets the "should exit" flag and wakes up the loop so that it terminates
|
||||
// soon
|
||||
virtual void Exit(int rc);
|
||||
|
||||
protected:
|
||||
// implement this to wake up the loop: usually done by posting a dummy event
|
||||
// to it (called from Exit())
|
||||
virtual void WakeUp() = 0;
|
||||
|
||||
// may be overridden to perform some action at the start of each new event
|
||||
// loop iteration
|
||||
virtual void OnNextIteration() { }
|
||||
|
||||
|
||||
// the loop exit code
|
||||
int m_exitcode;
|
||||
|
||||
// should we exit the loop?
|
||||
bool m_shouldExit;
|
||||
};
|
||||
|
||||
#endif // platforms using "manual" loop
|
||||
|
||||
// we're moving away from old m_impl wxEventLoop model as otherwise the user
|
||||
// code doesn't have access to platform-specific wxEventLoop methods and this
|
||||
// can sometimes be very useful (e.g. under MSW this is necessary for
|
||||
|
@ -27,10 +27,12 @@
|
||||
// wxEventLoop
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
|
||||
class WXDLLEXPORT wxEventLoop : public wxEventLoopBase
|
||||
{
|
||||
public:
|
||||
wxEventLoop();
|
||||
wxEventLoop() { m_exitcode = 0; }
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int Run();
|
||||
@ -39,14 +41,25 @@ public:
|
||||
virtual bool Dispatch();
|
||||
|
||||
private:
|
||||
// the loop exit code
|
||||
int m_exitcode;
|
||||
|
||||
#if !wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
// should we exit the loop?
|
||||
bool m_shouldExit;
|
||||
#endif // !wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
};
|
||||
|
||||
#else // manual event loop
|
||||
|
||||
class WXDLLEXPORT wxEventLoop : public wxEventLoopManual
|
||||
{
|
||||
public:
|
||||
wxEventLoop() { }
|
||||
|
||||
virtual bool Pending() const;
|
||||
virtual bool Dispatch();
|
||||
|
||||
protected:
|
||||
// implement base class pure virtual
|
||||
virtual void WakeUp();
|
||||
};
|
||||
|
||||
#endif // auto/manual event loop
|
||||
|
||||
#endif // _WX_MAC_CARBON_EVTLOOP_H_
|
||||
|
||||
|
@ -16,13 +16,12 @@
|
||||
// wxEventLoop
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxEventLoop : public wxEventLoopBase
|
||||
class WXDLLEXPORT wxEventLoop : public wxEventLoopManual
|
||||
{
|
||||
public:
|
||||
wxEventLoop();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int Run();
|
||||
virtual void Exit(int rc = 0);
|
||||
virtual bool Pending() const;
|
||||
virtual bool Dispatch();
|
||||
@ -60,12 +59,6 @@ protected:
|
||||
|
||||
// critical window or NULL
|
||||
static wxWindowMSW *ms_winCritical;
|
||||
|
||||
// the loop exit code
|
||||
int m_exitcode;
|
||||
|
||||
// should we exit the loop?
|
||||
bool m_shouldExit;
|
||||
};
|
||||
|
||||
#endif // _WX_MSW_EVTLOOP_H_
|
||||
|
147
src/common/evtloopcmn.cpp
Normal file
147
src/common/evtloopcmn.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/common/evtloopcmn.cpp
|
||||
// Purpose: common wxEventLoop-related stuff
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 2006-01-12
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// for compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL;
|
||||
|
||||
// ============================================================================
|
||||
// wxEventLoopManual implementation
|
||||
// ============================================================================
|
||||
|
||||
wxEventLoopManual::wxEventLoopManual()
|
||||
{
|
||||
m_exitcode = 0;
|
||||
m_shouldExit = false;
|
||||
}
|
||||
|
||||
int wxEventLoopManual::Run()
|
||||
{
|
||||
// event loops are not recursive, you need to create another loop!
|
||||
wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") );
|
||||
|
||||
// ProcessIdle() and Dispatch() below may throw so the code here should
|
||||
// be exception-safe, hence we must use local objects for all actions we
|
||||
// should undo
|
||||
wxEventLoopActivator activate(wx_static_cast(wxEventLoop *, this));
|
||||
|
||||
// we must ensure that OnExit() is called even if an exception is thrown
|
||||
// from inside Dispatch() but we must call it from Exit() in normal
|
||||
// situations because it is supposed to be called synchronously,
|
||||
// wxModalEventLoop depends on this (so we can't just use ON_BLOCK_EXIT or
|
||||
// something similar here)
|
||||
#if wxUSE_EXCEPTIONS
|
||||
for ( ;; )
|
||||
{
|
||||
try
|
||||
{
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
// this is the event loop itself
|
||||
for ( ;; )
|
||||
{
|
||||
// give them the possibility to do whatever they want
|
||||
OnNextIteration();
|
||||
|
||||
// generate and process idle events for as long as we don't
|
||||
// have anything else to do
|
||||
while ( !Pending() && (wxTheApp && wxTheApp->ProcessIdle()) )
|
||||
;
|
||||
|
||||
// if the "should exit" flag is set, the loop should terminate
|
||||
// but not before processing any remaining messages so while
|
||||
// Pending() returns true, do process them
|
||||
if ( m_shouldExit )
|
||||
{
|
||||
while ( Pending() )
|
||||
Dispatch();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// a message came or no more idle processing to do, sit in
|
||||
// Dispatch() waiting for the next message
|
||||
if ( !Dispatch() )
|
||||
{
|
||||
// we got WM_QUIT
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_EXCEPTIONS
|
||||
// exit the outer loop as well
|
||||
break;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( !wxTheApp || !wxTheApp->OnExceptionInMainLoop() )
|
||||
{
|
||||
OnExit();
|
||||
break;
|
||||
}
|
||||
//else: continue running the event loop
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
// OnException() throwed, possibly rethrowing the same
|
||||
// exception again: very good, but we still need OnExit() to
|
||||
// be called
|
||||
OnExit();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
return m_exitcode;
|
||||
}
|
||||
|
||||
void wxEventLoopManual::Exit(int rc)
|
||||
{
|
||||
wxCHECK_RET( IsRunning(), _T("can't call Exit() if not running") );
|
||||
|
||||
m_exitcode = rc;
|
||||
m_shouldExit = true;
|
||||
|
||||
OnExit();
|
||||
|
||||
// all we have to do to exit from the loop is to (maybe) wake it up so that
|
||||
// it can notice that Exit() had been called
|
||||
//
|
||||
// in particular, do *not* use here calls such as PostQuitMessage() (under
|
||||
// MSW) which terminate the current event loop here because we're not sure
|
||||
// that it is going to be processed by the correct event loop: it would be
|
||||
// possible that another one is started and terminated by mistake if we do
|
||||
// this
|
||||
WakeUp();
|
||||
}
|
||||
|
@ -29,29 +29,20 @@
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// wxEventLoop implementation
|
||||
// ============================================================================
|
||||
|
||||
wxEventLoop::wxEventLoop()
|
||||
{
|
||||
m_exitcode = 0;
|
||||
#if !wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
m_shouldExit = false;
|
||||
#endif
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
// high level functions for RunApplicationEventLoop() case
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
|
||||
int wxEventLoop::Run()
|
||||
{
|
||||
wxEventLoopActivator activate(this);
|
||||
|
||||
#if wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
RunApplicationEventLoop();
|
||||
#else // manual event loop
|
||||
while ( !m_shouldExit )
|
||||
{
|
||||
Dispatch();
|
||||
}
|
||||
#endif // auto/manual event loop
|
||||
|
||||
return m_exitcode;
|
||||
}
|
||||
@ -60,13 +51,30 @@ void wxEventLoop::Exit(int rc)
|
||||
{
|
||||
m_exitcode = rc;
|
||||
|
||||
#if wxMAC_USE_RUN_APP_EVENT_LOOP
|
||||
QuitApplicationEventLoop();
|
||||
#else // manual event loop
|
||||
m_shouldExit = true;
|
||||
#endif // auto/manual event loop
|
||||
|
||||
OnExit();
|
||||
}
|
||||
|
||||
#else // manual event loop
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// functions only used by wxEventLoopManual-based implementation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxEventLoop::WakeUp()
|
||||
{
|
||||
extern void wxMacWakeUp();
|
||||
|
||||
wxMacWakeUp();
|
||||
}
|
||||
|
||||
#endif // high/low-level event loop
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// low level functions used in both cases
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool wxEventLoop::Pending() const
|
||||
{
|
||||
EventRef theEvent;
|
||||
|
@ -178,7 +178,7 @@ bool wxEventLoop::PreProcessMessage(WXMSG *msg)
|
||||
if ( wnd->MSWProcessMessage((WXMSG *)msg) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Stop at first top level window (as per comment above).
|
||||
// If we don't do this, pressing ESC on a modal dialog shown as child of a modal
|
||||
// dialog with wxID_CANCEL will cause the parent dialog to be closed, for example
|
||||
@ -194,106 +194,19 @@ bool wxEventLoop::PreProcessMessage(WXMSG *msg)
|
||||
// wxEventLoop running and exiting
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int wxEventLoop::Run()
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEventLoopManual customization
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxEventLoop::OnNextIteration()
|
||||
{
|
||||
// event loops are not recursive, you need to create another loop!
|
||||
wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") );
|
||||
|
||||
// ProcessIdle() and Dispatch() below may throw so the code here should
|
||||
// be exception-safe, hence we must use local objects for all actions we
|
||||
// should undo
|
||||
wxEventLoopActivator activate(this);
|
||||
|
||||
// we must ensure that OnExit() is called even if an exception is thrown
|
||||
// from inside Dispatch() but we must call it from Exit() in normal
|
||||
// situations because it is supposed to be called synchronously,
|
||||
// wxModalEventLoop depends on this (so we can't just use ON_BLOCK_EXIT or
|
||||
// something similar here)
|
||||
#if wxUSE_EXCEPTIONS
|
||||
for ( ;; )
|
||||
{
|
||||
try
|
||||
{
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
// this is the event loop itself
|
||||
for ( ;; )
|
||||
{
|
||||
#if wxUSE_THREADS
|
||||
wxMutexGuiLeaveOrEnter();
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
// generate and process idle events for as long as we don't
|
||||
// have anything else to do
|
||||
while ( !Pending() && (wxTheApp && wxTheApp->ProcessIdle()) )
|
||||
;
|
||||
|
||||
// if the "should exit" flag is set, the loop should terminate
|
||||
// but not before processing any remaining messages so while
|
||||
// Pending() returns true, do process them
|
||||
if ( m_shouldExit )
|
||||
{
|
||||
while ( Pending() )
|
||||
Dispatch();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// a message came or no more idle processing to do, sit in
|
||||
// Dispatch() waiting for the next message
|
||||
if ( !Dispatch() )
|
||||
{
|
||||
// we got WM_QUIT
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_EXCEPTIONS
|
||||
// exit the outer loop as well
|
||||
break;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( !wxTheApp || !wxTheApp->OnExceptionInMainLoop() )
|
||||
{
|
||||
OnExit();
|
||||
break;
|
||||
}
|
||||
//else: continue running the event loop
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
// OnException() throwed, possibly rethrowing the same
|
||||
// exception again: very good, but we still need OnExit() to
|
||||
// be called
|
||||
OnExit();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
return m_exitcode;
|
||||
#if wxUSE_THREADS
|
||||
wxMutexGuiLeaveOrEnter();
|
||||
#endif // wxUSE_THREADS
|
||||
}
|
||||
|
||||
void wxEventLoop::Exit(int rc)
|
||||
void wxEventLoop::WakeUp()
|
||||
{
|
||||
wxCHECK_RET( IsRunning(), _T("can't call Exit() if not running") );
|
||||
|
||||
m_exitcode = rc;
|
||||
m_shouldExit = true;
|
||||
|
||||
OnExit();
|
||||
|
||||
// all we have to do to exit from the loop is to (maybe) wake it up so that
|
||||
// it can notice that Exit() had been called
|
||||
//
|
||||
// in particular, we do *not* use PostQuitMessage() here because we're not
|
||||
// sure that WM_QUIT is going to be processed by the correct event loop: it
|
||||
// is possible that another one is started before this one has a chance to
|
||||
// process WM_QUIT
|
||||
::PostMessage(NULL, WM_NULL, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -461,6 +461,10 @@ SOURCE=.\common\event.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\evtloopcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\extended.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
@ -1070,10 +1074,18 @@ SOURCE=.\html\helpdata.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\html\helpdlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\html\helpfrm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\html\helpwnd.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\html\htmlcell.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1651,6 +1663,10 @@ SOURCE=.\richtext\richtextctrl.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\richtext\richtexthtml.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\richtext\richtextstyles.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -3919,10 +3935,18 @@ SOURCE=..\include\wx\html\helpdata.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\html\helpdlg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\html\helpfrm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\html\helpwnd.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\html\htmlcell.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
Loading…
Reference in New Issue
Block a user