diff --git a/configure b/configure index 47c8f35d81..1ed8fbfe28 100755 --- a/configure +++ b/configure @@ -1082,7 +1082,6 @@ with_carbon with_cocoa with_iphone with_mac -with_old_cocoa with_wine with_msw with_directfb @@ -2305,7 +2304,6 @@ Optional Packages: --with-cocoa same as --with-osx_cocoa --with-iphone same as --with-osx_iphone --with-mac same as --with-osx - --with-old_cocoa use old, deprecated, Cocoa port --with-wine use Wine --with-msw use MS-Windows --with-directfb use DirectFB @@ -3832,7 +3830,6 @@ NEEDS_D_REENTRANT_FOR_R_FUNCS=0 ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA OSX_IPHONE MICROWIN MOTIF MSW X11 DFB" -DEFAULT_wxUSE_OLD_COCOA=0 DEFAULT_wxUSE_GTK=0 DEFAULT_wxUSE_OSX_CARBON=0 DEFAULT_wxUSE_OSX_COCOA=0 @@ -3843,7 +3840,6 @@ DEFAULT_wxUSE_MSW=0 DEFAULT_wxUSE_X11=0 DEFAULT_wxUSE_DFB=0 -DEFAULT_DEFAULT_wxUSE_OLD_COCOA=0 DEFAULT_DEFAULT_wxUSE_GTK=0 DEFAULT_DEFAULT_wxUSE_OSX_CARBON=0 DEFAULT_DEFAULT_wxUSE_OSX_COCOA=0 @@ -4503,12 +4499,6 @@ if test "${with_mac+set}" = set; then : fi -# Check whether --with-old_cocoa was given. -if test "${with_old_cocoa+set}" = set; then : - withval=$with_old_cocoa; wxUSE_OLD_COCOA="$withval" CACHE_OLD_COCOA=1 TOOLKIT_GIVEN=1 -fi - - # Check whether --with-wine was given. if test "${with_wine+set}" = set; then : withval=$with_wine; wxUSE_WINE="$withval" CACHE_WINE=1 @@ -4671,7 +4661,7 @@ if test "$wxUSE_GUI" = "yes"; then done fi - NUM_TOOLKITS=`expr ${wxUSE_OLD_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \ + NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \ + ${wxUSE_OSX_COCOA:-0} + ${wxUSE_OSX_IPHONE:-0} + ${wxUSE_DFB:-0} \ + ${wxUSE_MICROWIN:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}` @@ -22939,24 +22929,6 @@ if test "$wxUSE_GUI" = "yes"; then WXGTK3= WXGPE= - if test "$wxUSE_OLD_COCOA" = 1 ; then - if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Printing not supported under wxCocoa yet, disabled" >&5 -$as_echo "$as_me: WARNING: Printing not supported under wxCocoa yet, disabled" >&2;} - wxUSE_PRINTING_ARCHITECTURE=no - fi - if test "$wxUSE_DRAG_AND_DROP" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Drag and Drop not supported under wxCocoa yet, disabled" >&5 -$as_echo "$as_me: WARNING: Drag and Drop not supported under wxCocoa yet, disabled" >&2;} - wxUSE_DRAG_AND_DROP=no - fi - if test "$wxUSE_DRAGIMAGE" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxDragImage not supported under wxCocoa yet, disabled" >&5 -$as_echo "$as_me: WARNING: wxDragImage not supported under wxCocoa yet, disabled" >&2;} - wxUSE_DRAGIMAGE=no - fi - fi - if test "$wxUSE_MSW" = 1 ; then TOOLKIT=MSW GUIDIST=MSW_DIST @@ -26112,11 +26084,6 @@ $as_echo "none" >&6; } TOOLKIT=OSX_IPHONE fi - if test "$wxUSE_OLD_COCOA" = 1; then - TOOLKIT=COCOA - GUIDIST=COCOA_DIST - fi - TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[A-Z]' '[a-z]'` if test "$wxUSE_UNIVERSAL" = "yes"; then @@ -26925,7 +26892,7 @@ done fi if test "$wxUSE_DETECT_SM" = "yes"; then - if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then + if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1; then ac_find_libraries= @@ -27302,7 +27269,7 @@ USE_OPENGL=0 if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then - if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then + if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then OPENGL_LIBS="-framework OpenGL -framework AGL" elif test "$wxUSE_MSW" = 1; then OPENGL_LIBS="-lopengl32 -lglu32" @@ -28934,7 +28901,7 @@ TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffi TOOLCHAIN_FULLNAME="${HOST_PREFIX}${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}-${WX_CHARTYPE}${config_linkage_component}-${WX_RELEASE}${WX_FLAVOUR}" -if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then +if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then WX_LIBRARY_BASENAME_NOGUI="wx_base${lib_unicode_suffix}${WX_LIB_FLAVOUR}" else WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${WX_LIB_FLAVOUR}" @@ -28943,78 +28910,6 @@ WX_LIBRARY_BASENAME_GUI="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_u -if test "$wxUSE_OLD_COCOA" = 1; then - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=m - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if AppKit/NSEvent.h conflicts with CoreFoundation" >&5 -$as_echo_n "checking if AppKit/NSEvent.h conflicts with CoreFoundation... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if defining __Point__ will fix it" >&5 -$as_echo_n "checking if defining __Point__ will fix it... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __Point__ 1 -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define __Point__ 1" >>confdefs.h - - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no -See \`config.log' for more details" "$LINENO" 5; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : @@ -35954,17 +35849,9 @@ if test "$wxUSE_TIMEPICKCTRL" = "yes"; then fi if test "$wxUSE_TOGGLEBTN" = "yes"; then - if test "$wxUSE_OLD_COCOA" = 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Toggle button not yet supported under Mac OS X... disabled" >&5 -$as_echo "$as_me: WARNING: Toggle button not yet supported under Mac OS X... disabled" >&2;} - wxUSE_TOGGLEBTN=no - fi + $as_echo "#define wxUSE_TOGGLEBTN 1" >>confdefs.h - if test "$wxUSE_TOGGLEBTN" = "yes"; then - $as_echo "#define wxUSE_TOGGLEBTN 1" >>confdefs.h - - USES_CONTROLS=1 - fi + USES_CONTROLS=1 fi if test "$wxUSE_TOOLBAR" = "yes"; then @@ -36030,16 +35917,11 @@ if test "$wxUSE_TREELISTCTRL" = "yes"; then fi if test "$wxUSE_POPUPWIN" = "yes"; then - if test "$wxUSE_OLD_COCOA" = 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Popup window not yet supported under Mac OS X... disabled" >&5 -$as_echo "$as_me: WARNING: Popup window not yet supported under Mac OS X... disabled" >&2;} - else - $as_echo "#define wxUSE_POPUPWIN 1" >>confdefs.h + $as_echo "#define wxUSE_POPUPWIN 1" >>confdefs.h - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup" + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup" - USES_CONTROLS=1 - fi + USES_CONTROLS=1 fi if test "$wxUSE_PREFERENCES_EDITOR" = "yes"; then @@ -36049,7 +35931,7 @@ if test "$wxUSE_PREFERENCES_EDITOR" = "yes"; then fi if test "$wxUSE_DIALUP_MANAGER" = "yes"; then - if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1; then + if test "$wxUSE_MAC" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Dialup manager not supported on this platform... disabled" >&5 $as_echo "$as_me: WARNING: Dialup manager not supported on this platform... disabled" >&2;} else @@ -36145,9 +36027,6 @@ fi CPPFLAGS="$old_CPPFLAGS" - elif test "$wxUSE_OLD_COCOA" = 1; then - $as_echo "#define wxUSE_WEBKIT 1" >>confdefs.h - else wxUSE_WEBKIT=no fi @@ -37125,13 +37004,7 @@ $as_echo "$wx_cv_target_x86_64" >&6; } fi fi fi -if test "$wxUSE_OLD_COCOA" = 1 ; then - EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa" - if test "$wxUSE_MEDIACTRL" = "yes"; then - EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime" - fi -fi -if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1 ; then +if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1; then EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices" fi @@ -40076,7 +39949,7 @@ if test "$wxUSE_MSW" = 1 ; then RESCOMP="$WINDRES" fi -if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1; then +if test "$wxUSE_MAC" = 1; then WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r" WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc" diff --git a/configure.in b/configure.in index eb883bc206..c6581c3613 100644 --- a/configure.in +++ b/configure.in @@ -103,7 +103,6 @@ ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA OSX_IPHONE MICROWIN MOTIF MSW X11 D dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones dnl which are either yes or no -DEFAULT_wxUSE_OLD_COCOA=0 DEFAULT_wxUSE_GTK=0 DEFAULT_wxUSE_OSX_CARBON=0 DEFAULT_wxUSE_OSX_COCOA=0 @@ -117,7 +116,6 @@ DEFAULT_wxUSE_DFB=0 dnl these are the values which are really default for the given platform: dnl they're used if no --with- options were given to detect the dnl toolkit to use by default for the target platform -DEFAULT_DEFAULT_wxUSE_OLD_COCOA=0 DEFAULT_DEFAULT_wxUSE_GTK=0 DEFAULT_DEFAULT_wxUSE_OSX_CARBON=0 DEFAULT_DEFAULT_wxUSE_OSX_COCOA=0 @@ -436,7 +434,6 @@ AC_ARG_WITH(carbon, [ --with-carbon same as --with-osx_carbon] AC_ARG_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(iphone, [ --with-iphone same as --with-osx_iphone], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(mac, [ --with-mac same as --with-osx], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) -AC_ARG_WITH(old_cocoa, [ --with-old_cocoa use old, deprecated, Cocoa port], [wxUSE_OLD_COCOA="$withval" CACHE_OLD_COCOA=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1]) AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(directfb, [ --with-directfb use DirectFB], [wxUSE_DFB="$withval" wxUSE_UNIVERSAL="yes" CACHE_DFB=1 TOOLKIT_GIVEN=1]) @@ -494,7 +491,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl we suppose that expr is available (maybe there is a better way to do dnl this? what about using ALL_TOOLKITS? TODO) - NUM_TOOLKITS=`expr ${wxUSE_OLD_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \ + NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \ + ${wxUSE_OSX_COCOA:-0} + ${wxUSE_OSX_IPHONE:-0} + ${wxUSE_DFB:-0} \ + ${wxUSE_MICROWIN:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}` @@ -2664,21 +2661,6 @@ if test "$wxUSE_GUI" = "yes"; then WXGTK3= WXGPE= - if test "$wxUSE_OLD_COCOA" = 1 ; then - if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then - AC_MSG_WARN([Printing not supported under wxCocoa yet, disabled]) - wxUSE_PRINTING_ARCHITECTURE=no - fi - if test "$wxUSE_DRAG_AND_DROP" = "yes"; then - AC_MSG_WARN([Drag and Drop not supported under wxCocoa yet, disabled]) - wxUSE_DRAG_AND_DROP=no - fi - if test "$wxUSE_DRAGIMAGE" = "yes"; then - AC_MSG_WARN([wxDragImage not supported under wxCocoa yet, disabled]) - wxUSE_DRAGIMAGE=no - fi - fi - if test "$wxUSE_MSW" = 1 ; then TOOLKIT=MSW GUIDIST=MSW_DIST @@ -3302,11 +3284,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config TOOLKIT=OSX_IPHONE fi - if test "$wxUSE_OLD_COCOA" = 1; then - TOOLKIT=COCOA - GUIDIST=COCOA_DIST - fi - dnl the name of the directory where the files for this toolkit live TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[[A-Z]]' '[[a-z]]'` @@ -3408,7 +3385,7 @@ dnl --------------------------------------------------------------------------- dnl X11 session management dnl --------------------------------------------------------------------------- if test "$wxUSE_DETECT_SM" = "yes"; then - if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then + if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1; then WX_FIND_LIB(SM, SmcOpenConnection) if test "$ac_find_libraries" != "" ; then if test "$ac_find_libraries" != "std" ; then @@ -3437,7 +3414,7 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then dnl look in glcanvas.h for the list of platforms supported by wxGlCanvas: - if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then + if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then OPENGL_LIBS="-framework OpenGL -framework AGL" elif test "$wxUSE_MSW" = 1; then OPENGL_LIBS="-lopengl32 -lglu32" @@ -3694,7 +3671,7 @@ dnl library link name dnl These just save us from exporting lib_{unicode,flavour}_suffix. dnl If we ever need to do that, we won't need to keep these. -if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then +if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then WX_LIBRARY_BASENAME_NOGUI="wx_base${lib_unicode_suffix}${WX_LIB_FLAVOUR}" else WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${WX_LIB_FLAVOUR}" @@ -3703,35 +3680,6 @@ WX_LIBRARY_BASENAME_GUI="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_u -if test "$wxUSE_OLD_COCOA" = 1; then - AC_LANG_SAVE - AC_WX_LANG_OBJECTIVEC -dnl Recent AppKit/NSEvent.h include parts of IOKit which eventually -dnl gets IOKit/graphics/IOGraphicsTypes.h included which typedefs -dnl Point but only if MacTypes.h was not included first. Of course, -dnl if MacTypes.h is included later then you're screwed when it -dnl tries to typedef Point. Defining __Point__ will cause IOGraphicsTypes.h -dnl to not typedef Point and thus fix the problem. - AC_MSG_CHECKING([if AppKit/NSEvent.h conflicts with CoreFoundation]) - AC_TRY_COMPILE([#include -#include - ],[], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([if defining __Point__ will fix it]) - AC_TRY_COMPILE([#define __Point__ 1 -#include -#include - ],[], - [AC_MSG_RESULT([yes]) - AC_DEFINE(__Point__) - ], - [AC_MSG_FAILURE([no])] - )] - ) - AC_LANG_RESTORE -fi - dnl --------------------------------------------------------------------------- dnl Checks for typedefs dnl --------------------------------------------------------------------------- @@ -6749,15 +6697,8 @@ if test "$wxUSE_TIMEPICKCTRL" = "yes"; then fi if test "$wxUSE_TOGGLEBTN" = "yes"; then - if test "$wxUSE_OLD_COCOA" = 1 ; then - AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled]) - wxUSE_TOGGLEBTN=no - fi - - if test "$wxUSE_TOGGLEBTN" = "yes"; then - AC_DEFINE(wxUSE_TOGGLEBTN) - USES_CONTROLS=1 - fi + AC_DEFINE(wxUSE_TOGGLEBTN) + USES_CONTROLS=1 fi if test "$wxUSE_TOOLBAR" = "yes"; then @@ -6813,14 +6754,10 @@ if test "$wxUSE_TREELISTCTRL" = "yes"; then fi if test "$wxUSE_POPUPWIN" = "yes"; then - if test "$wxUSE_OLD_COCOA" = 1 ; then - AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled]) - else - AC_DEFINE(wxUSE_POPUPWIN) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup" + AC_DEFINE(wxUSE_POPUPWIN) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup" - USES_CONTROLS=1 - fi + USES_CONTROLS=1 fi if test "$wxUSE_PREFERENCES_EDITOR" = "yes"; then @@ -6829,7 +6766,7 @@ if test "$wxUSE_PREFERENCES_EDITOR" = "yes"; then fi if test "$wxUSE_DIALUP_MANAGER" = "yes"; then - if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1; then + if test "$wxUSE_MAC" = 1; then AC_MSG_WARN([Dialup manager not supported on this platform... disabled]) else AC_DEFINE(wxUSE_DIALUP_MANAGER) @@ -6914,8 +6851,6 @@ if test "$wxUSE_WEBKIT" = "yes"; then #include ]) CPPFLAGS="$old_CPPFLAGS" - elif test "$wxUSE_OLD_COCOA" = 1; then - AC_DEFINE(wxUSE_WEBKIT) else wxUSE_WEBKIT=no fi @@ -7537,13 +7472,7 @@ if test "$wxUSE_MAC" = 1 ; then fi fi fi -if test "$wxUSE_OLD_COCOA" = 1 ; then - EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa" - if test "$wxUSE_MEDIACTRL" = "yes"; then - EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime" - fi -fi -if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1 ; then +if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1; then EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices" fi @@ -7910,7 +7839,7 @@ if test "$wxUSE_MSW" = 1 ; then RESCOMP="$WINDRES" fi -if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1; then +if test "$wxUSE_MAC" = 1; then dnl base name of the resource file for wxMac must be the same dnl as library installation base name (-install_name) WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r" diff --git a/docs/cocoa/coding_patterns.txt b/docs/cocoa/coding_patterns.txt deleted file mode 100644 index 456c7b3532..0000000000 --- a/docs/cocoa/coding_patterns.txt +++ /dev/null @@ -1,102 +0,0 @@ -=== wxCocoa coding patterns === - -Any language or library tends to have a particular set of coding patterns that serve to make the code easier to read -by making it look consistent across the project. Objective-C makes particularly heavy use of patterns as does wxWidgets. -It is not the intention of this document to repeat Cocoa or wxWidgets documentation except for clarity. - ---- Class design --- - -wxCocoa takes a rather unique approach by decoupling interaction between C++ and Objective-C from the wxWidgets classes. -For any given Objective-C class you wish to override messages from or receive action messages from (e.g. as a delegate -or notification observer) you should implement a C++ wxCocoa##ObjcClass class and one or more Objective-C classes. - -The C++ class goes in a file include/wx/cocoa/ObjcClass.h (where ObjcClass is the Objective-C class name) and the -Objective-C classes can either be declared in the implementation file (src/cocoa/ObjcClass.h) or separated into an -include/wx/cocoa/objc/ObjcClass.h file. - -Take NSButton as an example. The include/wx/cocoa/NSButton.h declares a wxCocoaNSButton class. Classes such as -wxButton, wxCheckBox, and wxRadioButton all multiply inherit from this (protected). These classes can almost -be thought of as an interface whereby the inheriting class is essentially declaring that it is able to respond -to the various Cocoa_ methods that will be called. It is not quite a pure interface as it actually contains the -logic for this as well, but it can be thought of from a design perspective as such. - -Because we do not wish to subclass Objective-C classes except when absolutely necessary we use a hash map so -that the wxCocoaObjcClass instance can be retrieved knowing only the ObjcClass instance. This is acheived by -the sm_cocoaHash static member and the GetFromCocoa method. These are provided by the HASHMAP series of macros -in the include/wx/cocoa/ObjcAssociate.h header. - -In addition to the GetFromCocoa method, the pattern also provides for a pair of Associate##ObjcClass and -Disassociate##ObjcClass methods. These non-virtual methods if implemented by the macro merely insert and -remove the Objective-C/C++ pair from the hash map. More often than not they require more than just associating -using the hash map but also require setTarget: and setAction: to be called. This is a leftover of the original -design where it was expected that the classes would be subclasses already containing the code to call the -C++ virtual methods. Later design decisions changed this to use target/action and delegates whenever possible -which is more often the case than not. - -To implement a response to an action message, one should simply create a singleton instance of a controller class -that can be used for all instances of the given Objective-C class. For NSButton there is the wxNSButtonTarget -class which implements the (arbitrarily named) wxNSButtonAction: method. The wxCocoaNSButton::AssociateNSButton -method is implemented to setTarget:sm_cocoaTarget (the singleton wxNSButtonTarget) and -setAction:@selector(wxNSButtonAction:). When the button is clicked, the NSButton will send a wxNSButtonAction: -message to its target (the singleton wxNSButtonTarget) with itself as the sender. The implementation of -that message simply looks up the wxCocoaNSButton in the hash map and calls the Cocoa_wxNSButtonAction method. - -The wxWidgets class (e.g. wxButton or wxCheckBox) implements that method as it sees fit. For example, to -simply send the corresponding wxWidgets wxEvent. - -It should be noted that a better design might have used a generic target/action handler since target/action isn't -actually specific to buttons. This might be a future design change. - -Of note, wxCocoaNSButton does not inherit from anything, particularly from wxCocoaNSControl. This is because -of the C++ non-virtual base class problem. Instead, wxControl inherits from wxControlBase and wxCocoaNSControl. -wxButtonBase in turn inherits from wxControl and wxButton in turn inherits from wxButtonBase and wxCocoaNSButton. - -One may be wondering how NSControl events (if any) make their way to the wxControl. The answer is in the way -the Associate* methods are called. This is where the Set* methods come in. - -Within the wxWidgets class (e.g. wxButton) there is a SetNSButton(NSButton*) method. This method calls -AssociateNSButton and DisassociateNSButton appropriately and also calls the base class SetNSControl implemented -by the wxControl class (note: not the wxCocoaNSControl class). SetNSControl does a similar thing but then -calls its base class SetNSView method. All of these are implemented using the same macro except for SetNSView -which is implemented to do proper retain/release and set the m_cocoaNSView instance variable in wxWindow. - -In addition to the Set* set of methods, there is also a Get* set. These are implemented (inline) to cast -the root class pointer type to the desired type. For instance, GetNSButton merely returns -(NSButton*)m_cocoaNSView. These are a convenience for coding the library itself and are also public such that -users of wxCocoa wishing to make Cocoa-specific calls can easily get at a properly-typed instance. - -This works well for the common case like a button or checkbox where one Cocoa class clearly represents one -wxWidgets class. For more complex cases involving a Cocoa view hierarchy one may need to implement these -methods in a different manner. - - ---- The view hierarchy --- - -Because the Cocoa view hierarchy isn't a perfect match with the wxWidgets hierarchy, there are some conventions -used to resolve this conflict. The first is that m_cocoaNSView is defined to be the view which most-closely -represents the wxWidgets view. For instance, a wxButton has an NSButton instance and a wxStaticBox has an NSBox -instance. Unfortunately, wxWidgets defines some behaviour that Cocoa cannot directly implement. This is primarily -window scrolling (e.g. without using a wxScrolledWindow) and window hiding. - -Scrolling is implemented in a separate class known as wxWindowCocoaScrollView. This class does not fit into -the wxWidgets class hierarchy but instead implements the wxCocoaNSView interface itself, including listening for -the Cocoa_FrameChanged notification. This is a good example of why the Objective-C to C++ shim code is -unrelated to the wxWidgets class hierarchy. As you can clearly see, it allows the shim code to be used for -classes that aren't part of the wxWidgets hierarchy. - -Hiding is implemented in another class known as wxWindowCocoaHider in a similar manner to wxWindowCocoaScrollView. -This is an artifact of the pre-Panther days of Cocoa where there was no method for hiding a view. - -What these classes do is provide a Cocoa view that sits between the wxWidget's parent window's view and the -m_cocoaNSView provided by the window. The wxWindow class has a GetNSViewForSuperview() method that returns either -the m_cocoaNSView (if the window does not need scrolling behaviour and is not hidden) or returns the scroll view -for the case of scrolling or the dummy view in the case of hiding. As the name suggests, the method is used -from the parent wxWindow (the superview) when it sends something like an addSubview: message. The method is under -no circumstances intended to be used as the receiver of an addSubview message. In fact, not even the GetNSView() -method should be used for this as in [m_parent->GetNSView() addSubview:GetNSViewForSuperView()] because this -functionality is provided by the CocoaAddChild method. - -Note that there is a small hole in the API here because classes other than wxWindow wishing to implement a view -hierarchy will not be able to correctly do this since CocoaAddChild is not virtual and there is no virtual -GetNSViewForSubviews() method. - diff --git a/docs/cocoa/install.txt b/docs/cocoa/install.txt deleted file mode 100644 index a7a5cb3f66..0000000000 --- a/docs/cocoa/install.txt +++ /dev/null @@ -1,38 +0,0 @@ ----------------------------------------------------------------------------- -NB: This is the old wxCocoa port, you almost certainly want to read - docs/osx/install.txt for instructions about building wxOSX/Cocoa instead. ----------------------------------------------------------------------------- - -wxCocoa is still a work in progress. - -To compile it, you will need Apple's Developer Tools. However, please -note that any work to make it suitable for GNUstep (which will require -a GCC release with Objective-C++) will be much appreciated. - -Like most UNIX ports, the standard configure/make method works. You should -be able to build the library as static or shared. I usually build static. - -On my system I have the following: - -Checked out CVS source is in: -/Users/dfe/devel/wxHEADcommit/wxWidgets -Debug build directory is: -/Users/dfe/devel/wxHEADcommit/BUILD_COCOAd - -From the debug build directory: -$ ../wxWidgets/configure --with-cocoa --enable-debug --disable-shared -$ make -$ cd samples/minimal -$ make -$ ./minimal.app/Contents/MacOS/minimal - -Like wxMac applications, wxCocoa applications are "bundled". For development -purposes all this means is that an executable named "foo" needs to be -inside a "foo.app/Contents/MacOS" directory. For deployment you will need -an appropriate Info.plist and PkgInfo inside the foo.app/Contents directory. - -wxCocoa (and Cocoa in general) has no need for Mac OS resources. It -certainly has no need for resource forks as no Mach-O applications should -_ever_ have resource forks (note: Bakefile violates this right now). -Please see the wxWiki and/or discuss this with wx-users before shipping -any wxCocoa apps if you are new to the OS X platform. diff --git a/docs/cocoa/readme.txt b/docs/cocoa/readme.txt deleted file mode 100644 index 4021dbef06..0000000000 --- a/docs/cocoa/readme.txt +++ /dev/null @@ -1,25 +0,0 @@ ----------------------------------------------------------------------------- -NB: This is the old wxCocoa port, you almost certainly want to read - docs/osx/readme.txt for information about wxOSX/Cocoa instead. ----------------------------------------------------------------------------- - -Welcome to wxCocoa - -wxCocoa is still very much a work in progress. At this point quite a bit -of functionality is working, but quite a bit is left to do. wxCocoa is not -yet suitable for a direct port of most wxWidgets applications. Fortunately, -wxMac is available for those looking to move to Mac today. - -If you're still reading then I assume you're interested in helping with -the wxCocoa port. Please join the wx-dev@lists.wxwindows.org mailing list -so we can talk! There is plenty of work that can be done independently. -For example, many of the controls (listboxes, sliders, gauges, steppers, -etc.) can be easily worked on and the implementation should be pretty -straightforward (see how wxButton is wired up for an example of how to -handle events). - -I welcome any help, but please shoot a message to wx-dev or to me -privately, dfe@cox.net, so there is no needless duplication of work. - -Thanks a bunch! -David Elliott diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 3c815edadd..8b1446c414 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -24,7 +24,6 @@ using @ifdef_ and not @if_. @beginDefList @itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI == 0)} -@itemdef{__WXCOCOA__, OS X using wxCocoa Port} @itemdef{__WXDFB__, wxUniversal using DirectFB} @itemdef{__WXWINCE__, Windows CE} @itemdef{__WXGTK__, GTK+} @@ -45,8 +44,6 @@ while @c __WINDOWS__ should be used for the platform tests.} @itemdef{__WXOSX_CARBON__, Mac OS X using Carbon} @itemdef{__WXOSX_COCOA__, Mac OS X using Cocoa (AppKit)} @itemdef{__WXOSX_MAC__, Mac OS X (Carbon or Cocoa)} -@itemdef{__WXOSX_OR_COCOA__, Any Mac OS X port (wxOSX-Carbon, wxOSX-Cocoa or - wxCocoa)} @itemdef{__WXPM__, OS/2 native Presentation Manager (not used any longer).} @itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)} @itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x} @@ -66,8 +63,8 @@ which has not been updated very actively since beginning 2008. To summarize: @c __WXOSX_MAC__. @li If you want to test for wxOSX on the iPhone, use @c __WXOSX_IPHONE__. -@li If you want to test for any GUI Mac port under OS X, use - @c __WXOSX_OR_COCOA__. +@li If you want to test for a particular GUI Mac port under OS X, use + @c __WXOSX_CARBON__ or @c __WXOSX_COCOA__. @li If you want to test for any port under Mac OS X, including, for example, wxGTK and also wxBase, use @c __DARWIN__ (see below). diff --git a/include/wx/accel.h b/include/wx/accel.h index 3314be908e..afe27ef4f3 100644 --- a/include/wx/accel.h +++ b/include/wx/accel.h @@ -32,7 +32,7 @@ enum wxAcceleratorEntryFlags wxACCEL_ALT = 0x0001, // hold Alt key down wxACCEL_CTRL = 0x0002, // hold Ctrl key down wxACCEL_SHIFT = 0x0004, // hold Shift key down -#if defined(__WXMAC__) || defined(__WXCOCOA__) +#if defined(__WXMAC__) wxACCEL_RAW_CTRL= 0x0008, // #else wxACCEL_RAW_CTRL= wxACCEL_CTRL, @@ -164,8 +164,6 @@ private: #include "wx/gtk1/accel.h" #elif defined(__WXMAC__) #include "wx/osx/accel.h" -#elif defined(__WXCOCOA__) - #include "wx/generic/accel.h" #endif extern WXDLLIMPEXP_DATA_CORE(wxAcceleratorTable) wxNullAcceleratorTable; diff --git a/include/wx/bitmap.h b/include/wx/bitmap.h index acd4edf897..92b205c620 100644 --- a/include/wx/bitmap.h +++ b/include/wx/bitmap.h @@ -71,7 +71,6 @@ protected: #if defined(__WXDFB__) || \ defined(__WXMAC__) || \ defined(__WXGTK__) || \ - defined(__WXCOCOA__) || \ defined(__WXMOTIF__) || \ defined(__WXX11__) #define wxUSE_BITMAP_BASE 1 diff --git a/include/wx/colour.h b/include/wx/colour.h index 88bcd5997d..f164209c16 100644 --- a/include/wx/colour.h +++ b/include/wx/colour.h @@ -65,7 +65,7 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLIMPEXP_CORE) not need the wxGDIObject machinery to handle colors, please add it to the list of ports which do not need it. */ -#if defined( __WXMAC__ ) || defined( __WXMSW__ ) || defined( __WXCOCOA__ ) +#if defined( __WXMAC__ ) || defined( __WXMSW__ ) #define wxCOLOUR_IS_GDIOBJECT 0 #else #define wxCOLOUR_IS_GDIOBJECT 1 diff --git a/include/wx/defs.h b/include/wx/defs.h index af282b8eed..1f5b091184 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -29,7 +29,6 @@ !defined(__WXOSX_CARBON__) && \ !defined(__WXOSX_COCOA__) && \ !defined(__WXOSX_IPHONE__) && \ - !defined(__WXCOCOA__) && \ !defined(__X__) && \ !defined(__WXDFB__) && \ !defined(__WXX11__) && \ @@ -2642,7 +2641,7 @@ enum wxKeyModifier wxMOD_SHIFT = 0x0004, wxMOD_META = 0x0008, wxMOD_WIN = wxMOD_META, -#if defined(__WXMAC__) || defined(__WXCOCOA__) +#if defined(__WXMAC__) wxMOD_RAW_CONTROL = 0x0010, #else wxMOD_RAW_CONTROL = wxMOD_CONTROL, @@ -2963,7 +2962,7 @@ typedef MenuRef WXHMENU; #endif -#if defined( __WXCOCOA__ ) || defined(__WXMAC__) +#if defined(__WXMAC__) /* Definitions of 32-bit/64-bit types * These are typedef'd exactly the same way in newer OS X headers so @@ -3064,10 +3063,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSView); DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLContext); DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLPixelFormat); DECLARE_WXCOCOA_OBJC_CLASS( NSPrintInfo ); -#ifndef __WXMAC__ -typedef WX_NSView WXWidget; /* wxWidgets BASE definition */ -#endif -#endif /* __WXCOCOA__ || ( __WXMAC__ &__DARWIN__)*/ +#endif /* __WXMAC__ &__DARWIN__ */ #ifdef __WXMAC__ diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index 35651e2f01..bf16a50916 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -104,8 +104,7 @@ protected: #elif defined(__WXMAC__) #include "wx/osx/dirdlg.h" // Native Mac #elif defined(__WXMOTIF__) || \ - defined(__WXX11__) || \ - defined(__WXCOCOA__) + defined(__WXX11__) #include "wx/generic/dirdlgg.h" // Other ports use generic implementation #define wxDirDialog wxGenericDirDialog #endif diff --git a/include/wx/encinfo.h b/include/wx/encinfo.h index 46cfb7dfc1..f3a158982c 100644 --- a/include/wx/encinfo.h +++ b/include/wx/encinfo.h @@ -37,8 +37,7 @@ struct WXDLLIMPEXP_CORE wxNativeEncodingInfo wxFontEncoding encoding; // so that we know what this struct represents #if defined(__WXMSW__) || \ - defined(__WXMAC__) || \ - defined(__WXCOCOA__) // FIXME: __WXCOCOA__ + defined(__WXMAC__) wxNativeEncodingInfo() : facename() diff --git a/include/wx/features.h b/include/wx/features.h index 75498b5733..439bd84544 100644 --- a/include/wx/features.h +++ b/include/wx/features.h @@ -32,9 +32,9 @@ #endif /* taskbar is implemented in the major ports */ -#if defined(__WXMSW__) || defined(__WXCOCOA__) \ +#if defined(__WXMSW__) \ || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \ - || defined(__WXOSX_MAC__) || defined(__WXCOCOA__) + || defined(__WXOSX_MAC__) #define wxHAS_TASK_BAR_ICON #else #undef wxUSE_TASKBARICON diff --git a/include/wx/fontdlg.h b/include/wx/fontdlg.h index 53b3f20b86..882b54ff85 100644 --- a/include/wx/fontdlg.h +++ b/include/wx/fontdlg.h @@ -65,7 +65,6 @@ protected: #if defined(__WXUNIVERSAL__) || \ defined(__WXMOTIF__) || \ - defined(__WXCOCOA__) || \ defined(__WXWINCE__) || \ defined(__WXGPE__) diff --git a/include/wx/gauge.h b/include/wx/gauge.h index 361779db90..2da064052d 100644 --- a/include/wx/gauge.h +++ b/include/wx/gauge.h @@ -29,7 +29,7 @@ // GTK and Mac always have native implementation of the indeterminate mode // wxMSW has native implementation only if comctl32.dll >= 6.00 -#if !defined(__WXGTK20__) && !defined(__WXMAC__) && !defined(__WXCOCOA__) +#if !defined(__WXGTK20__) && !defined(__WXMAC__) #define wxGAUGE_EMULATE_INDETERMINATE_MODE 1 #else #define wxGAUGE_EMULATE_INDETERMINATE_MODE 0 diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index cdbaae2698..e94485b5c5 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -206,8 +206,7 @@ enum wxStockCursor defined(__WXMOTIF__) || \ defined(__WXX11__) || \ defined(__WXMAC__) || \ - defined(__WXDFB__) || \ - defined(__WXCOCOA__) + defined(__WXDFB__) // Initialize from an included XPM #define wxBITMAP(name) wxBitmap(name##_xpm) #else // other platforms diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index f8050996e4..66f8ae5ce5 100644 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -13,7 +13,7 @@ #if wxUSE_WEBKIT -#if !defined(__WXMAC__) && !defined(__WXCOCOA__) +#if !defined(__WXMAC__) #error "wxWebKitCtrl not implemented for this platform" #endif diff --git a/include/wx/mdi.h b/include/wx/mdi.h index 9f8e7d8399..7bc310effd 100644 --- a/include/wx/mdi.h +++ b/include/wx/mdi.h @@ -348,8 +348,7 @@ public: // wxUniv always uses the generic MDI implementation and so do the ports // without native version (although wxCocoa seems to have one -- but it's // probably not functional?) - #if defined(__WXCOCOA__) || \ - defined(__WXMOTIF__) || \ + #if defined(__WXMOTIF__) || \ defined(__WXUNIVERSAL__) #define wxUSE_GENERIC_MDI_AS_NATIVE 1 #else diff --git a/include/wx/mediactrl.h b/include/wx/mediactrl.h index 1d32cd2664..144812a9e0 100644 --- a/include/wx/mediactrl.h +++ b/include/wx/mediactrl.h @@ -222,8 +222,7 @@ protected: //inheritance issues #if defined(__WXOSX_CARBON__) virtual void MacVisibilityChanged(); -#endif -#if defined(__WXOSX_CARBON__) || defined(__WXCOCOA__) + friend class wxQTMediaBackend; #endif class wxMediaBackend* m_imp; diff --git a/include/wx/palette.h b/include/wx/palette.h index d3d675c3bf..7bd91ffd56 100644 --- a/include/wx/palette.h +++ b/include/wx/palette.h @@ -31,7 +31,7 @@ public: #include "wx/msw/palette.h" #elif defined(__WXX11__) || defined(__WXMOTIF__) #include "wx/x11/palette.h" -#elif defined(__WXGTK__) || defined(__WXCOCOA__) +#elif defined(__WXGTK__) #include "wx/generic/paletteg.h" #elif defined(__WXMAC__) #include "wx/osx/palette.h" diff --git a/include/wx/platform.h b/include/wx/platform.h index 2f264ad303..2f65117d4c 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -533,25 +533,9 @@ #endif /* - __WXOSX_OR_COCOA__ is a common define to wxOSX (Carbon or Cocoa) and wxCocoa ports under OS X. - - DO NOT use this define in base library code. Although wxMac has its own - private base library (and thus __WXOSX_OR_COCOA__,__WXMAC__ and related defines are - valid there), wxCocoa shares its library with other ports like wxGTK and wxX11. - - To keep wx authors from screwing this up, only enable __WXOSX_OR_COCOA__ for wxCocoa when - not compiling the base library. We determine this by first checking if - wxUSE_BASE is not defined. If it is not defined, then we're not buildling - the base library, and possibly not building wx at all (but actually building - user code that's using wx). If it is defined then we must check to make sure - it is not true. If it is true, we're building base. - - If you want it in the common darwin base library then use __DARWIN__. You - can use any Darwin-available libraries like CoreFoundation but please avoid - using OS X libraries like Carbon or CoreServices. - + This is obsolete and kept for backwards compatibility only. */ -#if defined(__WXOSX__) || (defined(__WXCOCOA__) && (!defined(wxUSE_BASE) || !wxUSE_BASE)) +#if defined(__WXOSX__) # define __WXOSX_OR_COCOA__ 1 #endif diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index ec12c77ae1..c2b778a07f 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -159,11 +159,6 @@ typedef wxPixelFormat wxImagePixelFormat; typedef wxPixelFormat wxNativePixelFormat; #define wxPIXEL_FORMAT_ALPHA 0 -#elif defined(__WXCOCOA__) - // Cocoa is standard RGB or RGBA (normally it is RGBA) - typedef wxPixelFormat wxNativePixelFormat; - - #define wxPIXEL_FORMAT_ALPHA 3 #elif defined(__WXGTK__) // Under GTK+ 2.X we use GdkPixbuf, which is standard RGB or RGBA typedef wxPixelFormat wxNativePixelFormat; diff --git a/include/wx/ribbon/art.h b/include/wx/ribbon/art.h index d076ec4e97..9deb195d6a 100644 --- a/include/wx/ribbon/art.h +++ b/include/wx/ribbon/art.h @@ -928,8 +928,7 @@ protected: typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider; #elif defined(__WXOSX_CARBON__) || \ defined(__WXOSX_COCOA__) || \ - defined(__WXOSX_IPHONE__) || \ - defined(__WXCOCOA__) + defined(__WXOSX_IPHONE__) // TODO: Once implemented, change typedef to OSX // typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider; typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider; diff --git a/include/wx/strconv.h b/include/wx/strconv.h index c9cd3ffb22..6b92a08384 100644 --- a/include/wx/strconv.h +++ b/include/wx/strconv.h @@ -627,7 +627,7 @@ extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI; #define wxFNCONV(name) wxConvFileName->cWX2MB(name) #define wxFNSTRINGCAST wxMBSTRINGCAST #else -#if defined( __WXOSX_OR_COCOA__ ) && wxMBFILES +#if defined(__WXOSX__) && wxMBFILES #define wxFNCONV(name) wxConvFileName->cWC2MB( wxConvLocal.cWX2WC(name) ) #else #define wxFNCONV(name) name diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index c54a1582d2..05069c278a 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -466,8 +466,6 @@ private: #include "wx/generic/treectlg.h" #elif defined(__WXMAC__) #include "wx/generic/treectlg.h" -#elif defined(__WXCOCOA__) - #include "wx/generic/treectlg.h" #endif #endif // wxUSE_TREECTRL diff --git a/include/wx/unix/apptrait.h b/include/wx/unix/apptrait.h index 8b3d2479ab..6d6144a13b 100644 --- a/include/wx/unix/apptrait.h +++ b/include/wx/unix/apptrait.h @@ -58,7 +58,7 @@ public: virtual void MutexGuiLeave(); #endif -#if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS +#if defined(__WXMAC__) && wxUSE_STDPATHS virtual wxStandardPaths& GetStandardPaths(); #endif virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const wxOVERRIDE; diff --git a/samples/opengl/isosurf/isosurf.cpp b/samples/opengl/isosurf/isosurf.cpp index 7acc4a7f27..9cad6b0d35 100644 --- a/samples/opengl/isosurf/isosurf.cpp +++ b/samples/opengl/isosurf/isosurf.cpp @@ -118,7 +118,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, { WX_GL_RGBA, WX_GL_MIN_RED, 1, WX_GL_MIN_GREEN, 1, WX_GL_MIN_BLUE, 1, WX_GL_DEPTH_SIZE, 1, WX_GL_DOUBLEBUFFER, -# if defined(__WXMAC__) || defined(__WXCOCOA__) +# if defined(__WXMAC__) GL_NONE }; # else None }; diff --git a/samples/opengl/isosurf/isosurf.h b/samples/opengl/isosurf/isosurf.h index 4f3dec593b..db13b21674 100644 --- a/samples/opengl/isosurf/isosurf.h +++ b/samples/opengl/isosurf/isosurf.h @@ -12,7 +12,7 @@ #define _WX_ISOSURF_H_ // we need OpenGL headers for GLfloat/GLint types used below -#if defined(__WXMAC__) || defined(__WXCOCOA__) +#if defined(__WXMAC__) # ifdef __DARWIN__ # include # include diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index 8a3195a5af..40fcb37fef 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -148,9 +148,6 @@ MyDialog::MyDialog(const wxString& title) MyDialog::~MyDialog() { delete m_taskBarIcon; -#if defined(__WXCOCOA__) - delete m_dockIcon; -#endif } void MyDialog::OnAbout(wxCommandEvent& WXUNUSED(event)) diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index 0453aff3a7..bd918ed23c 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -501,8 +501,7 @@ WidgetsFrame::WidgetsFrame(const wxString& title) SetClientSize(sizeMin); SetMinClientSize(sizeMin); -#if USE_LOG && !defined(__WXCOCOA__) - // wxCocoa's listbox is too flakey to use for logging right now +#if USE_LOG // now that everything is created we can redirect the log messages to the // listbox m_logTarget = new LboxLogger(m_lboxLog, wxLog::GetActiveTarget()); diff --git a/src/aui/tabart.cpp b/src/aui/tabart.cpp index 668b4d103d..bc9342b900 100644 --- a/src/aui/tabart.cpp +++ b/src/aui/tabart.cpp @@ -379,7 +379,7 @@ void wxAuiGenericTabArt::DrawTab(wxDC& dc, clip_points[5] = wxPoint(tab_x+clip_width+1, tab_y+tab_height-3); // FIXME: these ports don't provide wxRegion ctor from array of points -#if !defined(__WXDFB__) && !defined(__WXCOCOA__) +#if !defined(__WXDFB__) // set the clipping region for the tab -- wxRegion clipping_region(WXSIZEOF(clip_points), clip_points); dc.SetClippingRegion(clipping_region); diff --git a/src/common/accelcmn.cpp b/src/common/accelcmn.cpp index 003ecbc514..e6040195cc 100644 --- a/src/common/accelcmn.cpp +++ b/src/common/accelcmn.cpp @@ -322,7 +322,7 @@ wxString wxAcceleratorEntry::AsPossiblyLocalizedString(bool localized) const text += PossiblyLocalize(wxTRANSLATE("Ctrl+"), localized); if ( flags & wxACCEL_SHIFT ) text += PossiblyLocalize(wxTRANSLATE("Shift+"), localized); -#if defined(__WXMAC__) || defined(__WXCOCOA__) +#if defined(__WXMAC__) if ( flags & wxACCEL_RAW_CTRL ) text += PossiblyLocalize(wxTRANSLATE("RawCtrl+"), localized); #endif diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index c5667a2851..c679ab80c7 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -63,12 +63,6 @@ #include "wx/osx/dcscreen.h" #endif -#ifdef __WXCOCOA__ - #include "wx/cocoa/dcclient.h" - #include "wx/cocoa/dcmemory.h" - #include "wx/cocoa/dcscreen.h" -#endif - #ifdef __WXMOTIF__ #include "wx/motif/dcclient.h" #include "wx/motif/dcmemory.h" diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index a7b32cbe8c..fa53b4f6a9 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1052,7 +1052,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) wxDoCopyFile(fileIn, fbuf, file2, overwrite); -#if defined(__WXMAC__) || defined(__WXCOCOA__) +#if defined(__WXMAC__) // copy the resource fork of the file too if it's present wxString pathRsrcOut; wxFile fileRsrcIn; @@ -1092,7 +1092,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) if ( !wxDoCopyFile(fileRsrcIn, fbuf, pathRsrcOut, overwrite) ) return false; } -#endif // wxMac || wxCocoa +#endif // wxMac if ( chmod(file2.fn_str(), fbuf.st_mode) != 0 ) { diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 514094537a..b93666e318 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -382,10 +382,6 @@ bool wxPlatform::Is(int platform) if (platform == wxOS_UNIX) return true; #endif -#ifdef __WXCOCOA__ - if (platform == wxPORT_MAC) - return true; -#endif if (sm_customPlatforms && sm_customPlatforms->Index(platform) != wxNOT_FOUND) return true; @@ -1000,8 +996,7 @@ bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) ) // implemented in a port-specific utils source file: bool wxDoLaunchDefaultBrowser(const wxString& url, const wxString& scheme, int flags); -#elif defined(__WXX11__) || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || \ - (defined(__WXOSX__) ) +#elif defined(__WXX11__) || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXOSX__) // implemented in a port-specific utils source file: bool wxDoLaunchDefaultBrowser(const wxString& url, int flags); diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm index b6d6155bf6..07bcb7f716 100644 --- a/src/html/htmlctrl/webkit/webkit.mm +++ b/src/html/htmlctrl/webkit/webkit.mm @@ -18,15 +18,11 @@ #if wxUSE_WEBKIT -#ifdef __WXCOCOA__ -#include "wx/cocoa/autorelease.h" -#else #include "wx/osx/private.h" #include #include #include -#endif #include "wx/html/webkit.h" @@ -431,24 +427,6 @@ bool wxWebKitCtrl::Create(wxWindow *parent, */ // now create and attach WebKit view... DontCreatePeer(); -#ifdef __WXCOCOA__ - wxControl::Create(parent, m_windowID, pos, sizeInstance, style , validator , name); - SetSize(pos.x, pos.y, sizeInstance.x, sizeInstance.y); - - wxTopLevelWindowCocoa *topWin = wxDynamicCast(this, wxTopLevelWindowCocoa); - NSWindow* nsWin = topWin->GetNSWindow(); - NSRect rect; - rect.origin.x = pos.x; - rect.origin.y = pos.y; - rect.size.width = sizeInstance.x; - rect.size.height = sizeInstance.y; - m_webView = (WebView*)[[WebView alloc] initWithFrame:rect frameName:@"webkitFrame" groupName:@"webkitGroup"]; - SetNSView(m_webView); - [m_cocoaNSView release]; - - if(m_parent) m_parent->CocoaAddChild(this); - SetInitialFrameRect(pos,sizeInstance); -#else DontCreatePeer(); wxControl::Create(parent, winID, pos, size, style , validator , name); #if wxOSX_USE_CARBON @@ -476,7 +454,6 @@ bool wxWebKitCtrl::Create(wxWindow *parent, #endif [m_webView setHidden:false]; -#endif // Register event listener interfaces MyFrameLoadMonitor* myFrameLoadMonitor = [[MyFrameLoadMonitor alloc] initWithWxWindow: this]; diff --git a/src/osx/carbon/fontdlgosx.mm b/src/osx/carbon/fontdlgosx.mm index 683cfd556a..4bfa0fcb3b 100644 --- a/src/osx/carbon/fontdlgosx.mm +++ b/src/osx/carbon/fontdlgosx.mm @@ -34,11 +34,6 @@ // ============================================================================ -#if defined( __WXCOCOA__ ) -#include "wx/cocoa/autorelease.h" -#include "wx/cocoa/string.h" -#endif - #if wxOSX_USE_EXPERIMENTAL_FONTDIALOG #import diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index c55522f265..912064d4ef 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -46,28 +46,6 @@ #include "wx/cocoa/dcclient.h" #endif -#ifdef __WXCOCOA__ - -CGColorSpaceRef wxMacGetGenericRGBColorSpace() -{ - static wxCFRef genericRGBColorSpace; - - if (genericRGBColorSpace == NULL) - { - genericRGBColorSpace.reset( CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ) ); - } - - return genericRGBColorSpace; -} - -int UMAGetSystemVersion() -{ - return 0x1050; -} - - -#endif - #if wxOSX_USE_COCOA_OR_IPHONE extern CGContextRef wxOSXGetContextFromCurrentContext() ; #if wxOSX_USE_COCOA diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index 77daa4a639..1ec5dd8e67 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -27,10 +27,6 @@ #include "wx/fontutil.h" -#if defined( __WXCOCOA__ ) -#include "wx/cocoa/string.h" -#endif - #ifdef __WXMAC__ #if wxOSX_USE_CARBON diff --git a/src/osx/cocoa/mediactrl.mm b/src/osx/cocoa/mediactrl.mm index 90cd08dfa2..beacdc2577 100644 --- a/src/osx/cocoa/mediactrl.mm +++ b/src/osx/cocoa/mediactrl.mm @@ -56,11 +56,6 @@ //--------------------------------------------------------------------------- #include -#if defined( __WXCOCOA__ ) -#include "wx/cocoa/autorelease.h" -#include "wx/cocoa/string.h" -#endif - class WXDLLIMPEXP_FWD_MEDIA wxQTMediaBackend; @interface wxQTMovie : QTMovie { diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index e6544ebb3b..9f018ff58b 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -23,9 +23,6 @@ #endif #include "wx/osx/private.h" -#if defined( __WXCOCOA__ ) -#include "wx/cocoa/string.h" -#endif #include "wx/hashmap.h" #include "wx/filesys.h" diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 9536f6b729..b43fae652c 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -91,7 +91,7 @@ public: IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowMSW) #elif defined(__WXGTK__) IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowGTK) -#elif defined(__WXOSX_OR_COCOA__) +#elif defined(__WXOSX__) IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowMac) #elif defined(__WXDFB__) IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowDFB) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 97a6c47190..6d797cbd13 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -577,7 +577,7 @@ long wxExecute(char **argv, int flags, wxProcess *process, wxT("wxExecute() can be called only from the main thread") ); #endif // wxUSE_THREADS -#if defined(__WXCOCOA__) || ( defined(__WXOSX_MAC__) && wxOSX_USE_COCOA_OR_CARBON ) +#ifdef __DARWIN__ // wxMacLaunch() only executes app bundles and only does it asynchronously. // It returns false if the target is not an app bundle, thus falling // through to the regular code for non app bundles.