common drawing code for osx-cocoa and osx-carbon, also since 10.5 HIShapeRef is in ApplicationServices, so this can be used for all osx-cocoa builds as native wxRegion implementation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2009-02-09 09:01:19 +00:00
parent abdb8c1806
commit 5398a2e050
9 changed files with 242 additions and 194 deletions

View File

@ -4995,7 +4995,6 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS = \
monodll_notebmac.o \
monodll_carbon_printdlg.o \
monodll_carbon_radiobut.o \
monodll_carbon_region.o \
monodll_carbon_scrolbar.o \
monodll_carbon_slider.o \
monodll_carbon_spinbutt.o \
@ -5061,7 +5060,6 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS = \
monodll_fontpickerg.o \
monodll_generic_listctrl.o \
monodll_prntdlgg.o \
monodll_regiong.o \
monodll_generic_statusbr.o
@COND_TOOLKIT_OSX_COCOA@__GUI_SRC_OBJECTS = $(COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS)
COND_TOOLKIT_PM___GUI_SRC_OBJECTS = \
@ -6809,7 +6807,6 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS_1 = \
monolib_notebmac.o \
monolib_carbon_printdlg.o \
monolib_carbon_radiobut.o \
monolib_carbon_region.o \
monolib_carbon_scrolbar.o \
monolib_carbon_slider.o \
monolib_carbon_spinbutt.o \
@ -6875,7 +6872,6 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_1 = \
monolib_fontpickerg.o \
monolib_generic_listctrl.o \
monolib_prntdlgg.o \
monolib_regiong.o \
monolib_generic_statusbr.o
@COND_TOOLKIT_OSX_COCOA@__GUI_SRC_OBJECTS_1 = $(COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_1)
COND_TOOLKIT_PM___GUI_SRC_OBJECTS_1 = \
@ -8769,7 +8765,6 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS_2 = \
coredll_notebmac.o \
coredll_carbon_printdlg.o \
coredll_carbon_radiobut.o \
coredll_carbon_region.o \
coredll_carbon_scrolbar.o \
coredll_carbon_slider.o \
coredll_carbon_spinbutt.o \
@ -8835,7 +8830,6 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_2 = \
coredll_fontpickerg.o \
coredll_generic_listctrl.o \
coredll_prntdlgg.o \
coredll_regiong.o \
coredll_generic_statusbr.o
@COND_TOOLKIT_OSX_COCOA@__GUI_SRC_OBJECTS_2 = $(COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_2)
COND_TOOLKIT_PM___GUI_SRC_OBJECTS_2 = \
@ -10279,7 +10273,6 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS_3 = \
corelib_notebmac.o \
corelib_carbon_printdlg.o \
corelib_carbon_radiobut.o \
corelib_carbon_region.o \
corelib_carbon_scrolbar.o \
corelib_carbon_slider.o \
corelib_carbon_spinbutt.o \
@ -10345,7 +10338,6 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_3 = \
corelib_fontpickerg.o \
corelib_generic_listctrl.o \
corelib_prntdlgg.o \
corelib_regiong.o \
corelib_generic_statusbr.o
@COND_TOOLKIT_OSX_COCOA@__GUI_SRC_OBJECTS_3 = $(COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_3)
COND_TOOLKIT_PM___GUI_SRC_OBJECTS_3 = \
@ -11821,6 +11813,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS = \
monodll_carbon_renderer.o \
monodll_carbon_settings.o \
monodll_statbrma.o \
monodll_carbon_region.o \
monodll_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__OSX_CARBON_COCOA_SRC_OBJECTS = $(COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS)
COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS = \
@ -11980,6 +11973,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_0 = \
monolib_carbon_renderer.o \
monolib_carbon_settings.o \
monolib_statbrma.o \
monolib_carbon_region.o \
monolib_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__OSX_CARBON_COCOA_SRC_OBJECTS_0 = $(COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_0)
COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS_17 = \
@ -12139,6 +12133,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_8 = \
coredll_carbon_renderer.o \
coredll_carbon_settings.o \
coredll_statbrma.o \
coredll_carbon_region.o \
coredll_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__OSX_CARBON_COCOA_SRC_OBJECTS_8 = $(COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_8)
COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS_1_1 = \
@ -12218,6 +12213,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_9 = \
corelib_carbon_renderer.o \
corelib_carbon_settings.o \
corelib_statbrma.o \
corelib_carbon_region.o \
corelib_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__OSX_CARBON_COCOA_SRC_OBJECTS_9 = $(COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_9)
COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS_1_4 = \
@ -14869,9 +14865,6 @@ monodll_carbon_printdlg.o: $(srcdir)/src/osx/carbon/printdlg.cpp $(MONODLL_ODEP)
monodll_carbon_radiobut.o: $(srcdir)/src/osx/carbon/radiobut.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/radiobut.cpp
monodll_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
monodll_carbon_scrolbar.o: $(srcdir)/src/osx/carbon/scrolbar.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/scrolbar.cpp
@ -15226,6 +15219,9 @@ monodll_cocoa_utilsexc.o: $(srcdir)/src/cocoa/utilsexc.mm $(MONODLL_ODEP)
monodll_src_cocoa_window.o: $(srcdir)/src/cocoa/window.mm $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/cocoa/window.mm
monodll_regiong.o: $(srcdir)/src/generic/regiong.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
monodll_os2_accel.o: $(srcdir)/src/os2/accel.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/os2/accel.cpp
@ -17917,18 +17913,18 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_statbrma.o: $(srcdir)/src/osx/carbon/statbrma.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/statbrma.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monodll_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monodll_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_regiong.o: $(srcdir)/src/generic/regiong.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_regiong.o: $(srcdir)/src/generic/regiong.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_USE_GUI_1@monodll_accelcmn.o: $(srcdir)/src/common/accelcmn.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/accelcmn.cpp
@ -19546,9 +19542,6 @@ monolib_carbon_printdlg.o: $(srcdir)/src/osx/carbon/printdlg.cpp $(MONOLIB_ODEP)
monolib_carbon_radiobut.o: $(srcdir)/src/osx/carbon/radiobut.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/carbon/radiobut.cpp
monolib_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
monolib_carbon_scrolbar.o: $(srcdir)/src/osx/carbon/scrolbar.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/carbon/scrolbar.cpp
@ -19903,6 +19896,9 @@ monolib_cocoa_utilsexc.o: $(srcdir)/src/cocoa/utilsexc.mm $(MONOLIB_ODEP)
monolib_src_cocoa_window.o: $(srcdir)/src/cocoa/window.mm $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/cocoa/window.mm
monolib_regiong.o: $(srcdir)/src/generic/regiong.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
monolib_os2_accel.o: $(srcdir)/src/os2/accel.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/os2/accel.cpp
@ -22594,18 +22590,18 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monolib_statbrma.o: $(srcdir)/src/osx/carbon/statbrma.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/carbon/statbrma.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monolib_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monolib_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monolib_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monolib_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monolib_regiong.o: $(srcdir)/src/generic/regiong.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_regiong.o: $(srcdir)/src/generic/regiong.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_USE_GUI_1@monolib_accelcmn.o: $(srcdir)/src/common/accelcmn.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/accelcmn.cpp
@ -24883,9 +24879,6 @@ coredll_carbon_printdlg.o: $(srcdir)/src/osx/carbon/printdlg.cpp $(COREDLL_ODEP)
coredll_carbon_radiobut.o: $(srcdir)/src/osx/carbon/radiobut.cpp $(COREDLL_ODEP)
$(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/radiobut.cpp
coredll_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(COREDLL_ODEP)
$(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
coredll_carbon_scrolbar.o: $(srcdir)/src/osx/carbon/scrolbar.cpp $(COREDLL_ODEP)
$(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/scrolbar.cpp
@ -25240,6 +25233,9 @@ coredll_utilsexc.o: $(srcdir)/src/cocoa/utilsexc.mm $(COREDLL_ODEP)
coredll_src_cocoa_window.o: $(srcdir)/src/cocoa/window.mm $(COREDLL_ODEP)
$(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/cocoa/window.mm
coredll_regiong.o: $(srcdir)/src/generic/regiong.cpp $(COREDLL_ODEP)
$(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
coredll_os2_accel.o: $(srcdir)/src/os2/accel.cpp $(COREDLL_ODEP)
$(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/os2/accel.cpp
@ -27454,18 +27450,18 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_statbrma.o: $(srcdir)/src/osx/carbon/statbrma.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/statbrma.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_regiong.o: $(srcdir)/src/generic/regiong.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_regiong.o: $(srcdir)/src/generic/regiong.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_USE_GUI_1@coredll_accelcmn.o: $(srcdir)/src/common/accelcmn.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/accelcmn.cpp
@ -28387,9 +28383,6 @@ corelib_carbon_printdlg.o: $(srcdir)/src/osx/carbon/printdlg.cpp $(CORELIB_ODEP)
corelib_carbon_radiobut.o: $(srcdir)/src/osx/carbon/radiobut.cpp $(CORELIB_ODEP)
$(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/radiobut.cpp
corelib_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(CORELIB_ODEP)
$(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
corelib_carbon_scrolbar.o: $(srcdir)/src/osx/carbon/scrolbar.cpp $(CORELIB_ODEP)
$(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/scrolbar.cpp
@ -28744,6 +28737,9 @@ corelib_utilsexc.o: $(srcdir)/src/cocoa/utilsexc.mm $(CORELIB_ODEP)
corelib_src_cocoa_window.o: $(srcdir)/src/cocoa/window.mm $(CORELIB_ODEP)
$(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/cocoa/window.mm
corelib_regiong.o: $(srcdir)/src/generic/regiong.cpp $(CORELIB_ODEP)
$(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
corelib_os2_accel.o: $(srcdir)/src/os2/accel.cpp $(CORELIB_ODEP)
$(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/os2/accel.cpp
@ -30958,18 +30954,18 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_statbrma.o: $(srcdir)/src/osx/carbon/statbrma.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/statbrma.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_carbon_region.o: $(srcdir)/src/osx/carbon/region.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/region.cpp
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_utilscocoa.o: $(srcdir)/src/osx/carbon/utilscocoa.mm $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/carbon/utilscocoa.mm
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_regiong.o: $(srcdir)/src/generic/regiong.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_regiong.o: $(srcdir)/src/generic/regiong.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/regiong.cpp
@COND_USE_GUI_1@corelib_accelcmn.o: $(srcdir)/src/common/accelcmn.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/accelcmn.cpp

View File

@ -2254,6 +2254,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/carbon/renderer.cpp
src/osx/carbon/settings.cpp
src/osx/carbon/statbrma.cpp
src/osx/carbon/region.cpp
<!-- cocoa bridge -->
src/osx/carbon/utilscocoa.mm
</if>
@ -2281,7 +2282,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/carbon/notebmac.cpp
src/osx/carbon/printdlg.cpp
src/osx/carbon/radiobut.cpp
src/osx/carbon/region.cpp
src/osx/carbon/scrolbar.cpp
src/osx/carbon/slider.cpp
src/osx/carbon/spinbutt.cpp
@ -2462,7 +2462,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/fontpickerg.cpp
src/generic/listctrl.cpp
src/generic/prntdlgg.cpp
src/generic/regiong.cpp
src/generic/statusbr.cpp
</set>
<set var="OSX_COCOA_HDR" hints="files">

View File

@ -56,6 +56,7 @@ WXDLLIMPEXP_BASE wxString wxMacFindFolder(short vRefNum,
Boolean createFolder);
template<typename T> EventParamType wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ); return 0; }
template<> inline EventParamType wxMacGetEventParamType<HIShapeRef>() { return typeHIShapeRef; }
template<> inline EventParamType wxMacGetEventParamType<RgnHandle>() { return typeQDRgnHandle; }
template<> inline EventParamType wxMacGetEventParamType<ControlRef>() { return typeControlRef; }
template<> inline EventParamType wxMacGetEventParamType<WindowRef>() { return typeWindowRef; }

View File

@ -1,4 +1,4 @@
#if wxOSX_USE_CARBON
#if wxOSX_USE_COCOA_OR_CARBON
#include "wx/osx/carbon/region.h"
#else
#define wxRegionGeneric wxRegion

View File

@ -163,11 +163,12 @@ public:
wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
virtual void TriggerScrollEvent( wxEventType scrollEvent ) ;
virtual bool MacDoRedraw( void* updatergn , long time ) ;
// this should not be overriden in classes above wxWindowMac
// because it is called from its destructor via DeleteChildren
virtual void RemoveChild( wxWindowBase *child );
virtual bool MacDoRedraw( long time ) ;
virtual void MacPaintChildrenBorders();
virtual void MacPaintBorders( int left , int top ) ;
void MacPaintGrowBox();

View File

@ -183,7 +183,7 @@ protected:
// ports with Combine() in this class
#if defined(__WXPALMOS__) || \
defined(__WXMSW__) || \
( defined(__WXMAC__) && wxOSX_USE_CARBON ) || \
( defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON ) || \
defined(__WXPM__)
#define wxHAS_REGION_COMBINE

View File

@ -16,7 +16,7 @@
#include "wx/gdicmn.h"
#endif
#include "wx/osx/uma.h"
#include "wx/osx/private.h"
IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject)
@ -101,9 +101,9 @@ wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode WXUNUSED(f
wxUnusedVar(n);
wxUnusedVar(points);
#ifndef __LP64__
// TODO : any APIs ?
#if 0
// no non-QD APIs available
// TODO : remove ?
// OS X somehow does not collect the region invisibly as before, so sometimes things
// get drawn on screen instead of just being combined into a region, therefore we allocate a temp gworld now
@ -405,7 +405,15 @@ wxRegionIterator::wxRegionIterator(const wxRegion& region)
* Reset iterator for a new /e region.
*/
#ifndef __LP64__
class RegionToRectsCallbackData
{
public :
wxRect* m_rects ;
long m_current ;
};
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
OSStatus wxMacRegionToRectsCounterCallback(
UInt16 message, RgnHandle WXUNUSED(region), const Rect *WXUNUSED(rect), void *data )
{
@ -422,13 +430,6 @@ OSStatus wxMacRegionToRectsCounterCallback(
return noErr;
}
class RegionToRectsCallbackData
{
public :
wxRect* m_rects ;
long m_current ;
};
OSStatus wxMacRegionToRectsSetterCallback(
UInt16 message, RgnHandle WXUNUSED(region), const Rect *rect, void *data )
{
@ -440,6 +441,39 @@ OSStatus wxMacRegionToRectsSetterCallback(
return noErr;
}
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
OSStatus wxOSXRegionToRectsCounterCallback(
int message, HIShapeRef WXUNUSED(region), const CGRect *WXUNUSED(rect), void *data )
{
long *m_numRects = (long*) data ;
if ( message == kHIShapeEnumerateInit )
{
(*m_numRects) = 0 ;
}
else if (message == kHIShapeEnumerateRect)
{
(*m_numRects) += 1 ;
}
return noErr;
}
OSStatus wxOSXRegionToRectsSetterCallback(
int message, HIShapeRef WXUNUSED(region), const CGRect *rect, void *data )
{
if (message == kHIShapeEnumerateRect)
{
RegionToRectsCallbackData *cb = (RegionToRectsCallbackData*) data ;
cb->m_rects[cb->m_current++] = wxRect( rect->origin.x , rect->origin.y , rect->size.width , rect->size.height ) ;
}
return noErr;
}
#endif
void wxRegionIterator::Reset(const wxRegion& region)
@ -459,35 +493,59 @@ void wxRegionIterator::Reset(const wxRegion& region)
}
else
{
#ifdef __LP64__
#if 0
// fallback code in case we ever need it again
// copying this to a path and dissecting the path would be an option
m_numRects = 1;
m_rects = new wxRect[m_numRects];
m_rects[0] = m_region.GetBox();
#endif
#else
RegionToRectsUPP proc = (RegionToRectsUPP) wxMacRegionToRectsCounterCallback;
OSStatus err = noErr;
RgnHandle rgn = NewRgn();
HIShapeGetAsQDRgn(OTHER_M_REGION(region), rgn);
err = QDRegionToRects (rgn, kQDParseRegionFromTopLeft, proc, (void*)&m_numRects);
if (err == noErr)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if ( HIShapeEnumerate != NULL )
{
proc = (RegionToRectsUPP) wxMacRegionToRectsSetterCallback;
m_rects = new wxRect[m_numRects];
RegionToRectsCallbackData data ;
data.m_rects = m_rects ;
data.m_current = 0 ;
QDRegionToRects( rgn , kQDParseRegionFromTopLeft, proc, (void*)&data );
OSStatus err = HIShapeEnumerate (OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsCounterCallback,
(void*)&m_numRects);
if (err == noErr)
{
m_rects = new wxRect[m_numRects];
RegionToRectsCallbackData data ;
data.m_rects = m_rects ;
data.m_current = 0 ;
HIShapeEnumerate( OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsSetterCallback,
(void*)&data );
}
else
{
m_numRects = 0;
}
}
else
{
m_numRects = 0;
}
DisposeRgn( rgn );
#endif
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
OSStatus err = noErr;
RgnHandle rgn = NewRgn();
HIShapeGetAsQDRgn(OTHER_M_REGION(region), rgn);
err = QDRegionToRects (rgn, kQDParseRegionFromTopLeft, wxMacRegionToRectsCounterCallback
, (void*)&m_numRects);
if (err == noErr)
{
m_rects = new wxRect[m_numRects];
RegionToRectsCallbackData data ;
data.m_rects = m_rects ;
data.m_current = 0 ;
QDRegionToRects( rgn , kQDParseRegionFromTopLeft, wxMacRegionToRectsSetterCallback,
(void*)&data );
}
else
{
m_numRects = 0;
}
DisposeRgn( rgn );
#endif
}
}
}

View File

@ -131,24 +131,23 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
{
case kEventControlDraw :
{
RgnHandle updateRgn = NULL ;
RgnHandle allocatedRgn = NULL ;
HIShapeRef updateRgn = NULL ;
HIMutableShapeRef allocatedRgn = NULL ;
wxRegion visRegion = thisWindow->MacGetVisibleRegion() ;
if ( cEvent.GetParameter<RgnHandle>(kEventParamRgnHandle, &updateRgn) != noErr )
// according to the docs: redraw entire control if param not present
if ( cEvent.GetParameter<HIShapeRef>(kEventParamShape, &updateRgn) != noErr )
{
HIShapeGetAsQDRgn( visRegion.GetWXHRGN(), updateRgn );
updateRgn = visRegion.GetWXHRGN();
}
else
{
if ( thisWindow->MacGetLeftBorderSize() != 0 || thisWindow->MacGetTopBorderSize() != 0 )
{
// as this update region is in native window locals we must adapt it to wx window local
allocatedRgn = NewRgn() ;
CopyRgn( updateRgn , allocatedRgn ) ;
allocatedRgn = HIShapeCreateMutableCopy(updateRgn);
HIShapeOffset(allocatedRgn, thisWindow->MacGetLeftBorderSize() , thisWindow->MacGetTopBorderSize());
// hide the given region by the new region that must be shifted
OffsetRgn( allocatedRgn , thisWindow->MacGetLeftBorderSize() , thisWindow->MacGetTopBorderSize() ) ;
updateRgn = allocatedRgn ;
}
}
@ -210,9 +209,23 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
CGContextClearRect( cgContext, bounds );
}
if ( thisWindow->MacDoRedraw( updateRgn , cEvent.GetTicks() ) )
result = noErr ;
if ( !HIShapeIsEmpty(updateRgn) )
{
// refcount increase because wxRegion constructor takes ownership of the native region
CFRetain(updateRgn);
thisWindow->GetUpdateRegion() = wxRegion(updateRgn);
if ( !thisWindow->MacDoRedraw( cEvent.GetTicks() ) )
{
// for native controls: call their native paint method
if ( !thisWindow->MacIsUserPane() ||
( thisWindow->IsTopLevel() && thisWindow->GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
{
if ( thisWindow->GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
CallNextEventHandler( handler ,event ) ;
}
}
thisWindow->MacPaintChildrenBorders();
}
thisWindow->MacSetCGContextRef( NULL ) ;
}
@ -221,7 +234,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
}
if ( allocatedRgn )
DisposeRgn( allocatedRgn ) ;
CFRelease( allocatedRgn ) ;
}
break ;

View File

@ -1818,116 +1818,96 @@ void wxWindowMac::MacUpdateClippedRects() const
/*
This function must not change the updatergn !
*/
bool wxWindowMac::MacDoRedraw( void* updatergnr , long time )
bool wxWindowMac::MacDoRedraw( long time )
{
bool handled = false ;
#if wxOSX_USE_CARBON
Rect updatebounds ;
RgnHandle updatergn = (RgnHandle) updatergnr ;
GetRegionBounds( updatergn , &updatebounds ) ;
wxRegion formerUpdateRgn = m_updateRegion;
wxRegion clientUpdateRgn = formerUpdateRgn;
// wxLogDebug(wxT("update for %s bounds %d, %d, %d, %d"), wxString(GetClassInfo()->GetClassName()).c_str(), updatebounds.left, updatebounds.top , updatebounds.right , updatebounds.bottom ) ;
if ( !EmptyRgn(updatergn) )
wxSize sz = GetClientSize() ;
wxPoint origin = GetClientAreaOrigin() ;
clientUpdateRgn.Intersect(origin.x , origin.y , origin.x + sz.x , origin.y + sz.y);
// first send an erase event to the entire update area
{
RgnHandle newupdate = NewRgn() ;
wxSize point = GetClientSize() ;
wxPoint origin = GetClientAreaOrigin() ;
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y + point.y ) ;
SectRgn( newupdate , updatergn , newupdate ) ;
// for the toplevel window this really is the entire area
// for all the others only their client area, otherwise they
// might be drawing with full alpha and eg put blue into
// the grow-box area of a scrolled window (scroll sample)
wxDC* dc = new wxWindowDC(this);
if ( IsTopLevel() )
dc->SetDeviceClippingRegion(formerUpdateRgn);
else
dc->SetDeviceClippingRegion(clientUpdateRgn);
// first send an erase event to the entire update area
wxEraseEvent eevent( GetId(), dc );
eevent.SetEventObject( this );
HandleWindowEvent( eevent );
delete dc ;
}
MacPaintGrowBox();
// calculate a client-origin version of the update rgn and set m_updateRegion to that
clientUpdateRgn.Offset( -origin.x , -origin.y );
m_updateRegion = clientUpdateRgn ;
if ( !m_updateRegion.Empty() )
{
// paint the window itself
wxPaintEvent event;
event.SetTimestamp(time);
event.SetEventObject(this);
handled = HandleWindowEvent(event);
}
m_updateRegion = formerUpdateRgn;
return handled;
}
void wxWindowMac::MacPaintChildrenBorders()
{
// now we cannot rely on having its borders drawn by a window itself, as it does not
// get the updateRgn wide enough to always do so, so we do it from the parent
// this would also be the place to draw any custom backgrounds for native controls
// in Composited windowing
wxPoint clientOrigin = GetClientAreaOrigin() ;
wxWindowMac *child;
int x, y, w, h;
for (wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext())
{
child = node->GetData();
if (child == NULL)
continue;
if (child == m_vScrollBar)
continue;
if (child == m_hScrollBar)
continue;
if (child->IsTopLevel())
continue;
if (!child->IsShown())
continue;
// only draw those in the update region (add a safety margin of 10 pixels for shadow effects
child->GetPosition( &x, &y );
child->GetSize( &w, &h );
if ( m_updateRegion.Contains(clientOrigin.x+x-10, clientOrigin.y+y-10, w+20, h+20) )
{
// for the toplevel window this really is the entire area
// for all the others only their client area, otherwise they
// might be drawing with full alpha and eg put blue into
// the grow-box area of a scrolled window (scroll sample)
wxDC* dc = new wxWindowDC(this);
if ( IsTopLevel() )
dc->SetDeviceClippingRegion(wxRegion(HIShapeCreateWithQDRgn(updatergn)));
else
dc->SetDeviceClippingRegion(wxRegion(HIShapeCreateWithQDRgn(newupdate)));
wxEraseEvent eevent( GetId(), dc );
eevent.SetEventObject( this );
HandleWindowEvent( eevent );
delete dc ;
}
MacPaintGrowBox();
// calculate a client-origin version of the update rgn and set m_updateRegion to that
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
m_updateRegion = wxRegion(HIShapeCreateWithQDRgn(newupdate)) ;
DisposeRgn( newupdate ) ;
if ( !m_updateRegion.Empty() )
{
// paint the window itself
wxPaintEvent event;
event.SetTimestamp(time);
event.SetEventObject(this);
if ( !HandleWindowEvent(event) )
// paint custom borders
wxNcPaintEvent eventNc( child->GetId() );
eventNc.SetEventObject( child );
if ( !child->HandleWindowEvent( eventNc ) )
{
// for native controls: call their native paint method
if ( !MacIsUserPane() || ( IsTopLevel() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
{
if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
&& GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
CallNextEventHandler(
(EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() ,
(EventRef) wxTheApp->MacGetCurrentEvent() ) ;
}
}
handled = true ;
}
// now we cannot rely on having its borders drawn by a window itself, as it does not
// get the updateRgn wide enough to always do so, so we do it from the parent
// this would also be the place to draw any custom backgrounds for native controls
// in Composited windowing
wxPoint clientOrigin = GetClientAreaOrigin() ;
wxWindowMac *child;
int x, y, w, h;
for (wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext())
{
child = node->GetData();
if (child == NULL)
continue;
if (child == m_vScrollBar)
continue;
if (child == m_hScrollBar)
continue;
if (child->IsTopLevel())
continue;
if (!child->IsShown())
continue;
// only draw those in the update region (add a safety margin of 10 pixels for shadow effects
child->GetPosition( &x, &y );
child->GetSize( &w, &h );
Rect childRect = { y , x , y + h , x + w } ;
OffsetRect( &childRect , clientOrigin.x , clientOrigin.y ) ;
InsetRect( &childRect , -10 , -10) ;
if ( RectInRgn( &childRect , updatergn ) )
{
// paint custom borders
wxNcPaintEvent eventNc( child->GetId() );
eventNc.SetEventObject( child );
if ( !child->HandleWindowEvent( eventNc ) )
{
child->MacPaintBorders(0, 0) ;
}
child->MacPaintBorders(0, 0) ;
}
}
}
#endif
return handled ;
}