1
0
forked from aniani/vim

patch 8.2.1422: the Mac GUI implementation is outdated

Problem:    The Mac GUI implementation is outdated and probably doesn't even
            work.
Solution:   Remove the Mac GUI code.  The MacVim project provides the
            supported Vim GUI version.
This commit is contained in:
Bram Moolenaar 2020-08-11 21:58:20 +02:00
parent 4301a729ea
commit 097148e849
26 changed files with 48 additions and 7264 deletions

View File

@ -642,13 +642,11 @@ SRC_HAIKU = \
SRC_MAC = \ SRC_MAC = \
src/INSTALLmac.txt \ src/INSTALLmac.txt \
src/dehqx.py \ src/dehqx.py \
src/gui_mac.c \
src/os_mac_rsrc/*.icns \ src/os_mac_rsrc/*.icns \
src/os_mac.h \ src/os_mac.h \
src/os_mac.rsr.hqx \ src/os_mac.rsr.hqx \
src/os_mac_conv.c \ src/os_mac_conv.c \
src/os_macosx.m \ src/os_macosx.m \
src/proto/gui_mac.pro \
src/proto/os_mac_conv.pro \ src/proto/os_mac_conv.pro \
# source files for VMS (in the extra archive) # source files for VMS (in the extra archive)

View File

@ -16,7 +16,7 @@ Summary
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
1 MacOS X 1 MacOS X
1.1. Carbon interface 1.1. Terminal version
1.2. X (Athena, GTK, Motif) or plain text. 1.2. X (Athena, GTK, Motif) or plain text.
MacOS Classic is no longer supported. If you really want it use Vim 6.4. MacOS Classic is no longer supported. If you really want it use Vim 6.4.
@ -27,9 +27,9 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
1.0 Considerations 1.0 Considerations
Only '/' supported as path separator. Only '/' is supported as path separator.
1.1 Carbon interface (default) 1.1 Terminal version (default)
You can compile vim with the standard Unix routine: You can compile vim with the standard Unix routine:
cd .../src cd .../src
@ -37,14 +37,7 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
make test make test
sudo make install sudo make install
"make" will create a working Vim.app application bundle in the src You need at least Xcode 1.5.
directory. You can move this bundle (the Vim.app directory) anywhere
you want. Or use "make install" to move it to /Applications.
You need at least Xcode 1.5 to compile Vim 7.0.
Configure will create a universal binary if possible. This requires
installing the universal SDK (currently for 10.4).
To overrule the architecture do this before running make: To overrule the architecture do this before running make:
@ -53,17 +46,16 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
./configure --with-mac-arch=ppc ./configure --with-mac-arch=ppc
1.2 X-Windows or Plain Text 1.2 X-Windows
If you do not want the Carbon interface, you must explicitly tell You must explicitly tell configure to use a GUI.
configure to use a different GUI.
cd .../src cd .../src
./configure --disable-darwin --enable-gui=gtk2 ./configure --disable-darwin --enable-gui=gtk2
make; make install make; make install
NOTE: The following GUI options are supported: NOTE: The following GUI options are possible (but might not work):
no (for text), motif, athena, nextaw no (for terminal only), motif, athena, nextaw
gtk, gtk2, gnome, gnome2, gtk, gtk2, gnome, gnome2,
NOTE: You need to first install XFree86 and XDarwin. NOTE: You need to first install XFree86 and XDarwin.

View File

@ -1373,24 +1373,6 @@ PHOTONGUI_MAN_TARGETS = yes
PHOTONGUI_TESTTARGET = gui PHOTONGUI_TESTTARGET = gui
PHOTONGUI_BUNDLE = PHOTONGUI_BUNDLE =
# CARBON GUI
CARBONGUI_SRC = gui.c gui_mac.c
CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o
CARBONGUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \
-Wall -Wno-unknown-pragmas \
-mdynamic-no-pic -pipe
CARBONGUI_IPATH = -I. -Iproto
CARBONGUI_LIBS_DIR =
CARBONGUI_LIBS1 = -framework Carbon
CARBONGUI_LIBS2 =
CARBONGUI_INSTALL = install_macosx
CARBONGUI_TARGETS =
CARBONGUI_MAN_TARGETS =
CARBONGUI_TESTTARGET = gui
CARBONGUI_BUNDLE = gui_bundle
APPDIR = $(VIMNAME).app
CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET)
### Haiku GUI ### Haiku GUI
HAIKUGUI_SRC = gui.c gui_haiku.cc HAIKUGUI_SRC = gui.c gui_haiku.cc
HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o

118
src/auto/configure vendored
View File

@ -829,7 +829,6 @@ enable_gtk3_check
enable_motif_check enable_motif_check
enable_athena_check enable_athena_check
enable_nextaw_check enable_nextaw_check
enable_carbon_check
enable_gtktest enable_gtktest
with_gnome_includes with_gnome_includes
with_gnome_libs with_gnome_libs
@ -1509,7 +1508,6 @@ Optional Features:
--enable-motif-check If auto-select GUI, check for Motif default=yes --enable-motif-check If auto-select GUI, check for Motif default=yes
--enable-athena-check If auto-select GUI, check for Athena default=yes --enable-athena-check If auto-select GUI, check for Athena default=yes
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes --enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
--enable-carbon-check If auto-select GUI, check for Carbon default=yes
--disable-gtktest Do not try to compile and run a test GTK program --disable-gtktest Do not try to compile and run a test GTK program
--disable-icon-cache-update update disabled --disable-icon-cache-update update disabled
--disable-desktop-database-update update disabled --disable-desktop-database-update update disabled
@ -4746,8 +4744,18 @@ rm -f core conftest.err conftest.$ac_objext \
OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN" CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting. if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h inttypes.h stdint.h unistd.h
do : do :
@ -4764,28 +4772,6 @@ fi
done done
ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
CARBON=yes
fi
if test "x$CARBON" = "xyes"; then
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
with_x=no
fi
fi
fi
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
for ac_header in AvailabilityMacros.h for ac_header in AvailabilityMacros.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
@ -9212,7 +9198,6 @@ SKIP_ATHENA=YES
SKIP_NEXTAW=YES SKIP_NEXTAW=YES
SKIP_PHOTON=YES SKIP_PHOTON=YES
SKIP_HAIKU=YES SKIP_HAIKU=YES
SKIP_CARBON=YES
GUITYPE=NONE GUITYPE=NONE
if test "x$HAIKU" = "xyes"; then if test "x$HAIKU" = "xyes"; then
@ -9247,25 +9232,6 @@ $as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
SKIP_PHOTON=YES ;; SKIP_PHOTON=YES ;;
esac esac
elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
SKIP_CARBON=
case "$enable_gui_canon" in
no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
$as_echo "no GUI support" >&6; }
SKIP_CARBON=YES ;;
yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
$as_echo "yes - automatic GUI support" >&6; }
gui_auto=yes ;;
auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
$as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
SKIP_CARBON=YES ;;
carbon) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Carbon GUI support" >&5
$as_echo "Carbon GUI support" >&6; } ;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
SKIP_CARBON=YES ;;
esac
else else
case "$enable_gui_canon" in case "$enable_gui_canon" in
@ -9278,8 +9244,7 @@ $as_echo "yes/auto - automatic GUI support" >&6; }
SKIP_GNOME= SKIP_GNOME=
SKIP_MOTIF= SKIP_MOTIF=
SKIP_ATHENA= SKIP_ATHENA=
SKIP_NEXTAW= SKIP_NEXTAW=;;
SKIP_CARBON=;;
gtk2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5 gtk2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
$as_echo "GTK+ 2.x GUI support" >&6; } $as_echo "GTK+ 2.x GUI support" >&6; }
SKIP_GTK2=;; SKIP_GTK2=;;
@ -9409,56 +9374,6 @@ $as_echo "$enable_nextaw_check" >&6; };
fi fi
fi fi
if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Carbon" >&5
$as_echo_n "checking whether or not to look for Carbon... " >&6; }
# Check whether --enable-carbon-check was given.
if test "${enable_carbon_check+set}" = set; then :
enableval=$enable_carbon_check;
else
enable_carbon_check="yes"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_carbon_check" >&5
$as_echo "$enable_carbon_check" >&6; };
if test "x$enable_carbon_check" = "xno"; then
SKIP_CARBON=YES
fi
fi
if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
$as_echo_n "checking for Carbon GUI... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
GUITYPE=CARBONGUI
if test "$VIMNAME" = "vim"; then
VIMNAME=Vim
fi
if test "x$MACARCH" = "xboth"; then
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
fi
if test x$prefix = xNONE; then
prefix=/Applications
fi
datadir='${prefix}/Vim.app/Contents/Resources'
SKIP_GTK2=YES;
SKIP_GNOME=YES;
SKIP_MOTIF=YES;
SKIP_ATHENA=YES;
SKIP_NEXTAW=YES;
SKIP_PHOTON=YES;
SKIP_HAIKU=YES;
SKIP_CARBON=YES
fi
@ -14860,11 +14775,7 @@ fi
if test "$MACOS_X" = "yes"; then if test "$MACOS_X" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
$as_echo_n "checking whether we need macOS frameworks... " >&6; } $as_echo_n "checking whether we need macOS frameworks... " >&6; }
if test "$GUITYPE" = "CARBONGUI"; then if test "$MACOS_X_DARWIN" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need Carbon" >&5
$as_echo "yes, we need Carbon" >&6; }
LIBS="$LIBS -framework Carbon"
elif test "$MACOS_X_DARWIN" = "yes"; then
if test "$features" = "tiny"; then if test "$features" = "tiny"; then
OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'` OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'` OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
@ -14881,9 +14792,6 @@ $as_echo "yes, we need AppKit" >&6; }
$as_echo "no" >&6; } $as_echo "no" >&6; }
fi fi
fi fi
if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
DEPEND_CFLAGS_FILTER= DEPEND_CFLAGS_FILTER=
if test "$GCC" = yes; then if test "$GCC" = yes; then

View File

@ -262,16 +262,6 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
dnl TODO: use -arch i386 on Intel machines dnl TODO: use -arch i386 on Intel machines
dnl Removed -no-cpp-precomp, only for very old compilers. dnl Removed -no-cpp-precomp, only for very old compilers.
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN" CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
dnl If Carbon is found, assume we don't want X11
dnl unless it was specifically asked for (--with-x)
dnl or Motif, Athena or GTK GUI is used.
AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes)
if test "x$CARBON" = "xyes"; then
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
with_x=no
fi
fi
fi fi
dnl Avoid a bug with -O2 with gcc 4.0.1. Symptom: malloc() reports double dnl Avoid a bug with -O2 with gcc 4.0.1. Symptom: malloc() reports double
@ -2406,7 +2396,6 @@ SKIP_ATHENA=YES
SKIP_NEXTAW=YES SKIP_NEXTAW=YES
SKIP_PHOTON=YES SKIP_PHOTON=YES
SKIP_HAIKU=YES SKIP_HAIKU=YES
SKIP_CARBON=YES
GUITYPE=NONE GUITYPE=NONE
if test "x$HAIKU" = "xyes"; then if test "x$HAIKU" = "xyes"; then
@ -2432,20 +2421,6 @@ elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
SKIP_PHOTON=YES ;; SKIP_PHOTON=YES ;;
esac esac
elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
SKIP_CARBON=
case "$enable_gui_canon" in
no) AC_MSG_RESULT(no GUI support)
SKIP_CARBON=YES ;;
yes|"") AC_MSG_RESULT(yes - automatic GUI support)
gui_auto=yes ;;
auto) AC_MSG_RESULT(auto - Carbon GUI is outdated - disable GUI support)
SKIP_CARBON=YES ;;
carbon) AC_MSG_RESULT(Carbon GUI support) ;;
*) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
SKIP_CARBON=YES ;;
esac
else else
case "$enable_gui_canon" in case "$enable_gui_canon" in
@ -2456,8 +2431,7 @@ else
SKIP_GNOME= SKIP_GNOME=
SKIP_MOTIF= SKIP_MOTIF=
SKIP_ATHENA= SKIP_ATHENA=
SKIP_NEXTAW= SKIP_NEXTAW=;;
SKIP_CARBON=;;
gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support) gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support)
SKIP_GTK2=;; SKIP_GTK2=;;
gnome2) AC_MSG_RESULT(GNOME 2.x GUI support) gnome2) AC_MSG_RESULT(GNOME 2.x GUI support)
@ -2544,52 +2518,6 @@ if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
fi fi
fi fi
if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
AC_MSG_CHECKING(whether or not to look for Carbon)
AC_ARG_ENABLE(carbon-check,
[ --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]],
, enable_carbon_check="yes")
AC_MSG_RESULT($enable_carbon_check);
if test "x$enable_carbon_check" = "xno"; then
SKIP_CARBON=YES
fi
fi
if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
AC_MSG_CHECKING(for Carbon GUI)
dnl already did the check, just give the message
AC_MSG_RESULT(yes);
GUITYPE=CARBONGUI
if test "$VIMNAME" = "vim"; then
VIMNAME=Vim
fi
if test "x$MACARCH" = "xboth"; then
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
fi
dnl Default install directory is not /usr/local
if test x$prefix = xNONE; then
prefix=/Applications
fi
dnl Sorry for the hard coded default
datadir='${prefix}/Vim.app/Contents/Resources'
dnl skip everything else
SKIP_GTK2=YES;
SKIP_GNOME=YES;
SKIP_MOTIF=YES;
SKIP_ATHENA=YES;
SKIP_NEXTAW=YES;
SKIP_PHOTON=YES;
SKIP_HAIKU=YES;
SKIP_CARBON=YES
fi
dnl define an autoconf function to check for a specified version of GTK, and dnl define an autoconf function to check for a specified version of GTK, and
dnl try to compile/link a GTK program. dnl try to compile/link a GTK program.
dnl dnl
@ -4454,10 +4382,7 @@ fi
if test "$MACOS_X" = "yes"; then if test "$MACOS_X" = "yes"; then
AC_MSG_CHECKING([whether we need macOS frameworks]) AC_MSG_CHECKING([whether we need macOS frameworks])
if test "$GUITYPE" = "CARBONGUI"; then if test "$MACOS_X_DARWIN" = "yes"; then
AC_MSG_RESULT([yes, we need Carbon])
LIBS="$LIBS -framework Carbon"
elif test "$MACOS_X_DARWIN" = "yes"; then
if test "$features" = "tiny"; then if test "$features" = "tiny"; then
dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m. dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m.
OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'` OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
@ -4472,9 +4397,6 @@ if test "$MACOS_X" = "yes"; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
fi fi
if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to
dnl use "-isystem" instead of "-I" for all non-Vim include dirs. dnl use "-isystem" instead of "-I" for all non-Vim include dirs.

View File

@ -3920,13 +3920,7 @@ f_has(typval_T *argvars, typval_T *rettv)
0 0
#endif #endif
}, },
{"gui_mac", {"gui_mac", 0},
#ifdef FEAT_GUI_MAC
1
#else
0
#endif
},
{"gui_motif", {"gui_motif",
#ifdef FEAT_GUI_MOTIF #ifdef FEAT_GUI_MOTIF
1 1

View File

@ -632,7 +632,6 @@
#if defined(FEAT_NORMAL) \ #if defined(FEAT_NORMAL) \
&& (defined(FEAT_GUI_GTK) \ && (defined(FEAT_GUI_GTK) \
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \ || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
|| defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_HAIKU) \ || defined(FEAT_GUI_HAIKU) \
|| (defined(FEAT_GUI_MSWIN) \ || (defined(FEAT_GUI_MSWIN) \
&& (!defined(_MSC_VER) || _MSC_VER > 1020))) && (!defined(_MSC_VER) || _MSC_VER > 1020)))
@ -646,8 +645,7 @@
#if defined(FEAT_NORMAL) #if defined(FEAT_NORMAL)
# define FEAT_BROWSE_CMD # define FEAT_BROWSE_CMD
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON) \ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON)
|| defined(FEAT_GUI_MAC)
# define FEAT_BROWSE # define FEAT_BROWSE
# endif # endif
#endif #endif
@ -657,8 +655,7 @@
* there is no terminal version, and on Windows we can't figure out how to * there is no terminal version, and on Windows we can't figure out how to
* fork one off with :gui. * fork one off with :gui.
*/ */
#if (defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)) \ #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
|| (defined(FEAT_GUI_MAC) && !defined(MACOS_X_DARWIN))
# define ALWAYS_USE_GUI # define ALWAYS_USE_GUI
#endif #endif
@ -673,8 +670,7 @@
|| defined(FEAT_GUI_GTK) \ || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) \ || defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU) \ || defined(FEAT_GUI_HAIKU) \
|| defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MSWIN)
|| defined(FEAT_GUI_MAC)
# define FEAT_CON_DIALOG # define FEAT_CON_DIALOG
# define FEAT_GUI_DIALOG # define FEAT_GUI_DIALOG
# else # else
@ -690,7 +686,7 @@
#if defined(FEAT_GUI_DIALOG) && \ #if defined(FEAT_GUI_DIALOG) && \
(defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \ || defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU)) || defined(FEAT_GUI_HAIKU))
# define FEAT_GUI_TEXTDIALOG # define FEAT_GUI_TEXTDIALOG
# ifndef ALWAYS_USE_GUI # ifndef ALWAYS_USE_GUI
@ -705,11 +701,6 @@
# define FEAT_TERMGUICOLORS # define FEAT_TERMGUICOLORS
#endif #endif
// Mac specific thing: Codewarrior interface.
#ifdef FEAT_GUI_MAC
# define FEAT_CW_EDITOR
#endif
/* /*
* +vartabs 'vartabstop' and 'varsofttabstop' options. * +vartabs 'vartabstop' and 'varsofttabstop' options.
*/ */
@ -1091,8 +1082,7 @@
#endif #endif
#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \ #if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
|| defined(FEAT_GUI_MAC))
# define MZSCHEME_GUI_THREADS # define MZSCHEME_GUI_THREADS
#endif #endif

View File

@ -403,11 +403,6 @@ readfile(
*/ */
swap_mode = (st.st_mode & 0644) | 0600; swap_mode = (st.st_mode & 0644) | 0600;
#endif #endif
#ifdef FEAT_CW_EDITOR
// Get the FSSpec on MacOS
// TODO: Update it properly when the buffer name changes
(void)GetFSSpecFromPath(curbuf->b_ffname, &curbuf->b_FSSpec);
#endif
#ifdef VMS #ifdef VMS
curbuf->b_fab_rfm = st.st_fab_rfm; curbuf->b_fab_rfm = st.st_fab_rfm;
curbuf->b_fab_rat = st.st_fab_rat; curbuf->b_fab_rat = st.st_fab_rat;
@ -3389,7 +3384,6 @@ shorten_fnames(int force)
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \ #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|| defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_HAIKU) \ || defined(FEAT_GUI_HAIKU) \
|| defined(PROTO) || defined(PROTO)
/* /*

View File

@ -1569,7 +1569,7 @@ EXTERN char e_failed[] INIT(= N_("E472: Command failed"));
#if defined(FEAT_GUI) && defined(FEAT_XFONTSET) #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s")); EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
#endif #endif
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \ #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
EXTERN char e_font[] INIT(= N_("E235: Unknown font: %s")); EXTERN char e_font[] INIT(= N_("E235: Unknown font: %s"));
#endif #endif
@ -1806,10 +1806,6 @@ EXTERN char e_colon_required[] INIT(= N_("E1050: Colon required before a range")
EXTERN char e_alloc_color[] INIT(= N_("E254: Cannot allocate color %s")); EXTERN char e_alloc_color[] INIT(= N_("E254: Cannot allocate color %s"));
#endif #endif
#ifdef FEAT_GUI_MAC
EXTERN short disallow_gui INIT(= FALSE);
#endif
EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM")); EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM"));
EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP")); EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP"));

View File

@ -56,7 +56,7 @@ static int disable_flush = 0; // If > 0, gui_mch_flush() is disabled.
* this makes the thumb indicate the part of the text that is shown. Motif * this makes the thumb indicate the part of the text that is shown. Motif
* can't do this. * can't do this.
*/ */
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MAC) #if defined(FEAT_GUI_ATHENA)
# define SCROLL_PAST_END # define SCROLL_PAST_END
#endif #endif
@ -846,7 +846,7 @@ gui_exit(int rc)
} }
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO) || defined(FEAT_GUI_PHOTON) || defined(PROTO)
# define NEED_GUI_UPDATE_SCREEN 1 # define NEED_GUI_UPDATE_SCREEN 1
/* /*
* Called when the GUI shell is closed by the user. If there are no changed * Called when the GUI shell is closed by the user. If there are no changed
@ -1377,7 +1377,7 @@ gui_position_components(int total_width UNUSED)
#endif #endif
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \ # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_MAC)) || defined(FEAT_GUI_MOTIF))
if (gui_has_tabline()) if (gui_has_tabline())
text_area_y += gui.tabline_height; text_area_y += gui.tabline_height;
#endif #endif

View File

@ -39,25 +39,6 @@
# include <X11/Intrinsic.h> # include <X11/Intrinsic.h>
#endif #endif
#ifdef FEAT_GUI_MAC
# include <Types.h>
/*# include <Memory.h>*/
# include <Quickdraw.h>
# include <Fonts.h>
# include <Events.h>
# include <Menus.h>
# if !(defined (TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON))
# include <Windows.h>
# endif
# include <Controls.h>
/*# include <TextEdit.h>*/
# include <Dialogs.h>
# include <OSUtils.h>
/*
# include <ToolUtils.h>
# include <SegLoad.h>*/
#endif
#ifdef FEAT_GUI_PHOTON #ifdef FEAT_GUI_PHOTON
# include <Ph.h> # include <Ph.h>
# include <Pt.h> # include <Pt.h>
@ -68,7 +49,7 @@
* On some systems scrolling needs to be done right away instead of in the * On some systems scrolling needs to be done right away instead of in the
* main loop. * main loop.
*/ */
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK) #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)
# define USE_ON_FLY_SCROLL # define USE_ON_FLY_SCROLL
#endif #endif
@ -77,7 +58,6 @@
*/ */
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \ #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|| defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_HAIKU)
# define HAVE_DROP_FILE # define HAVE_DROP_FILE
#endif #endif
@ -209,9 +189,6 @@ typedef struct GuiScrollbar
#if FEAT_GUI_HAIKU #if FEAT_GUI_HAIKU
VimScrollBar *id; // Pointer to real scroll bar VimScrollBar *id; // Pointer to real scroll bar
#endif #endif
#ifdef FEAT_GUI_MAC
ControlHandle id; // A handle to the scrollbar
#endif
#ifdef FEAT_GUI_PHOTON #ifdef FEAT_GUI_PHOTON
PtWidget_t *id; PtWidget_t *id;
#endif #endif
@ -435,7 +412,7 @@ typedef struct Gui
#if defined(FEAT_GUI_TABLINE) \ #if defined(FEAT_GUI_TABLINE) \
&& (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \ && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_MAC) || defined(FEAT_GUI_HAIKU)) || defined(FEAT_GUI_HAIKU))
int tabline_height; int tabline_height;
#endif #endif
@ -473,14 +450,6 @@ typedef struct Gui
int vdcmp; // Vim Direct Communication Message Port int vdcmp; // Vim Direct Communication Message Port
#endif #endif
#ifdef FEAT_GUI_MAC
WindowPtr VimWindow;
MenuHandle MacOSHelpMenu; // Help menu provided by the MacOS
int MacOSHelpItems; // Nr of help-items supplied by MacOS
WindowPtr wid; // Window id of text area
int visibility; // Is window partially/fully obscured?
#endif
#ifdef FEAT_GUI_PHOTON #ifdef FEAT_GUI_PHOTON
PtWidget_t *vimWindow; // PtWindow PtWidget_t *vimWindow; // PtWindow
PtWidget_t *vimTextArea; // PtRaw PtWidget_t *vimTextArea; // PtRaw
@ -599,6 +568,6 @@ typedef enum
# endif # endif
#endif // FEAT_GUI_GTK #endif // FEAT_GUI_GTK
#if defined(UNIX) && !defined(FEAT_GUI_MAC) #if defined(UNIX)
# define GUI_MAY_FORK # define GUI_MAY_FORK
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -812,10 +812,6 @@ static guint timer_id = 0;
#elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) #elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
static void timer_proc(XtPointer, XtIntervalId *); static void timer_proc(XtPointer, XtIntervalId *);
static XtIntervalId timer_id = (XtIntervalId)0; static XtIntervalId timer_id = (XtIntervalId)0;
#elif defined(FEAT_GUI_MAC)
pascal void timer_proc(EventLoopTimerRef, void *);
static EventLoopTimerRef timer_id = NULL;
static EventLoopTimerUPP timerUPP;
#endif #endif
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) // Win32 console and Unix #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) // Win32 console and Unix
@ -852,9 +848,6 @@ timer_proc(gpointer data UNUSED)
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
static void static void
timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED) timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED)
# elif defined(FEAT_GUI_MAC)
pascal void
timer_proc(EventLoopTimerRef theTimer UNUSED, void *userData UNUSED)
# endif # endif
{ {
scheme_check_threads(); scheme_check_threads();
@ -877,10 +870,6 @@ setup_timer(void)
timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL); timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL); timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL);
# elif defined(FEAT_GUI_MAC)
timerUPP = NewEventLoopTimerUPP(timer_proc);
InstallEventLoopTimer(GetMainEventLoop(), p_mzq * kEventDurationMillisecond,
p_mzq * kEventDurationMillisecond, timerUPP, NULL, &timer_id);
# endif # endif
} }
@ -893,9 +882,6 @@ remove_timer(void)
g_source_remove(timer_id); g_source_remove(timer_id);
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
XtRemoveTimeOut(timer_id); XtRemoveTimeOut(timer_id);
# elif defined(FEAT_GUI_MAC)
RemoveEventLoopTimer(timer_id);
DisposeEventLoopTimerUPP(timerUPP);
# endif # endif
timer_id = 0; timer_id = 0;
} }

View File

@ -298,33 +298,6 @@ main
params.want_full_screen = FALSE; params.want_full_screen = FALSE;
#endif #endif
#if defined(FEAT_GUI_MAC) && defined(MACOS_X_DARWIN)
// When the GUI is started from Finder, need to display messages in a
// message box. isatty(2) returns TRUE anyway, thus we need to check the
// name to know we're not started from a terminal.
if (gui.starting && (!isatty(2) || strcmp("/dev/console", ttyname(2)) == 0))
{
params.want_full_screen = FALSE;
// Avoid always using "/" as the current directory. Note that when
// started from Finder the arglist will be filled later in
// HandleODocAE() and "fname" will be NULL.
if (getcwd((char *)NameBuff, MAXPATHL) != NULL
&& STRCMP(NameBuff, "/") == 0)
{
if (params.fname != NULL)
(void)vim_chdirfile(params.fname, "drop");
else
{
expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
vim_chdir(NameBuff);
}
if (start_dir != NULL)
mch_dirname(start_dir, MAXPATHL);
}
}
#endif
/* /*
* mch_init() sets up the terminal (window) for use. This must be * mch_init() sets up the terminal (window) for use. This must be
* done after resetting full_screen, otherwise it may move the cursor. * done after resetting full_screen, otherwise it may move the cursor.
@ -1843,18 +1816,6 @@ parse_command_name(mparm_T *parmp)
initstr = gettail((char_u *)parmp->argv[0]); initstr = gettail((char_u *)parmp->argv[0]);
#ifdef FEAT_GUI_MAC
// An issue has been seen when launching Vim in such a way that
// $PWD/$ARGV[0] or $ARGV[0] is not the absolute path to the
// executable or a symbolic link of it. Until this issue is resolved
// we prohibit the GUI from being used.
if (STRCMP(initstr, parmp->argv[0]) == 0)
disallow_gui = TRUE;
// TODO: On MacOS X default to gui if argv[0] ends in:
// /Vim.app/Contents/MacOS/Vim
#endif
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
set_vim_var_string(VV_PROGNAME, initstr, -1); set_vim_var_string(VV_PROGNAME, initstr, -1);
set_progpath((char_u *)parmp->argv[0]); set_progpath((char_u *)parmp->argv[0]);

View File

@ -3341,7 +3341,7 @@ same_directory(char_u *f1, char_u *f2)
} }
#if defined(FEAT_SESSION) || defined(FEAT_AUTOCHDIR) \ #if defined(FEAT_SESSION) || defined(FEAT_AUTOCHDIR) \
|| defined(MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK) \ || defined(MSWIN) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_NETBEANS_INTG) \ || defined(FEAT_NETBEANS_INTG) \
|| defined(PROTO) || defined(PROTO)
/* /*

View File

@ -116,7 +116,7 @@ find_end_of_word(pos_T *pos)
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \ #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MAC) || defined(FEAT_GUI_PHOTON) \ || defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_TERM_POPUP_MENU) || defined(FEAT_TERM_POPUP_MENU)
# define USE_POPUP_SETPOS # define USE_POPUP_SETPOS
# define NEED_VCOL2COL # define NEED_VCOL2COL
@ -532,7 +532,7 @@ do_mouse(
if (gui.in_use) if (gui.in_use)
{ {
# if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \ # if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_PHOTON)
if (!is_click) if (!is_click)
// Ignore right button release events, only shows the popup // Ignore right button release events, only shows the popup
// menu on the button down event. // menu on the button down event.

View File

@ -701,9 +701,6 @@ EXTERN int p_lpl; // 'loadplugins'
#if defined(DYNAMIC_LUA) #if defined(DYNAMIC_LUA)
EXTERN char_u *p_luadll; // 'luadll' EXTERN char_u *p_luadll; // 'luadll'
#endif #endif
#ifdef FEAT_GUI_MAC
EXTERN int p_macatsui; // 'macatsui'
#endif
EXTERN int p_magic; // 'magic' EXTERN int p_magic; // 'magic'
EXTERN char_u *p_menc; // 'makeencoding' EXTERN char_u *p_menc; // 'makeencoding'
#ifdef FEAT_QUICKFIX #ifdef FEAT_QUICKFIX

View File

@ -331,13 +331,8 @@ static struct vimoption options[] =
#endif #endif
(char_u *)0L} SCTX_INIT}, (char_u *)0L} SCTX_INIT},
{"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
#if defined(FEAT_GUI_MAC)
(char_u *)&p_antialias, PV_NONE,
{(char_u *)FALSE, (char_u *)FALSE}
#else
(char_u *)NULL, PV_NONE, (char_u *)NULL, PV_NONE,
{(char_u *)FALSE, (char_u *)FALSE} {(char_u *)FALSE, (char_u *)FALSE}
#endif
SCTX_INIT}, SCTX_INIT},
{"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT, {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
#ifdef FEAT_ARABIC #ifdef FEAT_ARABIC
@ -1209,7 +1204,7 @@ static struct vimoption options[] =
{"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST, {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
#if defined(FEAT_GUI) #if defined(FEAT_GUI)
(char_u *)&p_go, PV_NONE, (char_u *)&p_go, PV_NONE,
# if defined(UNIX) && !defined(FEAT_GUI_MAC) # if defined(UNIX)
{(char_u *)"aegimrLtT", (char_u *)0L} {(char_u *)"aegimrLtT", (char_u *)0L}
# else # else
{(char_u *)"egmrLtT", (char_u *)0L} {(char_u *)"egmrLtT", (char_u *)0L}
@ -1618,13 +1613,8 @@ static struct vimoption options[] =
#endif #endif
SCTX_INIT}, SCTX_INIT},
{"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR, {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
#ifdef FEAT_GUI_MAC
(char_u *)&p_macatsui, PV_NONE,
{(char_u *)TRUE, (char_u *)0L}
#else
(char_u *)NULL, PV_NONE, (char_u *)NULL, PV_NONE,
{(char_u *)"", (char_u *)0L} {(char_u *)"", (char_u *)0L}
#endif
SCTX_INIT}, SCTX_INIT},
{"magic", NULL, P_BOOL|P_VI_DEF, {"magic", NULL, P_BOOL|P_VI_DEF,
(char_u *)&p_magic, PV_NONE, (char_u *)&p_magic, PV_NONE,

View File

@ -20,25 +20,6 @@
# include <AvailabilityMacros.h> # include <AvailabilityMacros.h>
#endif #endif
/*
* Macintosh machine-dependent things.
*
* Include the Mac header files, unless also compiling with X11 (the header
* files have many conflicts).
*/
#ifdef FEAT_GUI_MAC
# include <Quickdraw.h> // Apple calls it QuickDraw.h...
# include <ToolUtils.h>
# include <LowMem.h>
# include <Scrap.h>
# include <Sound.h>
# include <TextUtils.h>
# include <Memory.h>
# include <OSUtils.h>
# include <Files.h>
# include <Script.h>
#endif
/* /*
* Unix interface * Unix interface
*/ */

View File

@ -17,7 +17,7 @@
#include "vim.h" #include "vim.h"
#if !defined(FEAT_GUI_MAC) && !defined(PROTO) #if !defined(PROTO)
# include <CoreServices/CoreServices.h> # include <CoreServices/CoreServices.h>
#endif #endif

View File

@ -2194,7 +2194,7 @@ mch_settitle(char_u *title, char_u *icon)
if (get_x11_windis() == OK) if (get_x11_windis() == OK)
type = 1; type = 1;
#else #else
# if defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \ # if defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU)
if (gui.in_use) if (gui.in_use)
type = 1; type = 1;
@ -2229,7 +2229,7 @@ mch_settitle(char_u *title, char_u *icon)
set_x11_title(title); // x11 set_x11_title(title); // x11
#endif #endif
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) \ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_PHOTON)
else else
gui_mch_settitle(title, icon); gui_mch_settitle(title, icon);
#endif #endif

View File

@ -323,9 +323,6 @@ extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*s
# ifdef FEAT_GUI_HAIKU # ifdef FEAT_GUI_HAIKU
# include "gui_haiku.pro" # include "gui_haiku.pro"
# endif # endif
# ifdef FEAT_GUI_MAC
# include "gui_mac.pro"
# endif
# ifdef FEAT_GUI_X11 # ifdef FEAT_GUI_X11
# include "gui_x11.pro" # include "gui_x11.pro"
# endif # endif

View File

@ -1,153 +0,0 @@
/* gui_mac.c */
/*
* Mac specific prototypes
*/
pascal Boolean WaitNextEventWrp(EventMask eventMask, EventRecord *theEvent, UInt32 sleep, RgnHandle mouseRgn);
pascal void gui_mac_scroll_action(ControlHandle theControl, short partCode);
pascal void gui_mac_drag_thumb (ControlHandle theControl, short partCode);
void gui_mac_handle_event(EventRecord *event);
void gui_mac_doMouseDown(EventRecord *theEvent);
void gui_mac_do_key(EventRecord *theEvent);
void gui_mac_handle_menu(long menuChoice);
void gui_mac_focus_change(EventRecord *event);
void gui_mac_update(EventRecord *event);
short gui_mch_get_mac_menu_item_index(vimmenu_T *menu, vimmenu_T *parent);
int gui_mch_is_blinking(void);
int gui_mch_is_blink_off(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_stop_blink(int may_call_gui_update_cursor);
void gui_mch_start_blink(void);
void gui_mch_getmouse(int *x, int *y);
void gui_mch_setmouse(int x, int y);
void gui_mch_prepare(int *argc, char **argv);
int gui_mch_init_check(void);
int gui_mch_init(void);
void gui_mch_new_colors(void);
int gui_mch_open(void);
void gui_mch_exit(int);
void gui_mch_set_winsize(int width, int height, int min_width, int min_height, int base_width, int base_height);
int gui_mch_get_winpos(int *x, int *y);
void gui_mch_set_winpos(int x, int y);
void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h);
void gui_mch_set_text_area_pos(int x, int y, int w, int h);
void gui_mch_enable_scrollbar(scrollbar_T *sb, int flag);
void gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max);
void gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h);
int gui_mch_get_scrollbar_xpadding(void);
int gui_mch_get_scrollbar_ypadding(void);
void gui_mch_create_scrollbar(scrollbar_T *sb, int orient);
void gui_mch_destroy_scrollbar(scrollbar_T *sb);
int gui_mch_adjust_charheight(void);
int gui_mch_init_font(char_u *font_name, int fontset);
GuiFont gui_mch_get_font(char_u *name, int giveErrorIfMissing);
char_u *gui_mch_get_fontname(GuiFont font, char_u *name);
GuiFont gui_mac_find_font(char_u *font_name);
void gui_mch_set_font(GuiFont font);
int gui_mch_same_font(GuiFont f1, GuiFont f2);
void gui_mch_free_font(GuiFont font);
guicolor_T gui_mch_get_color(char_u *name);
guicolor_T gui_mch_get_rgb_color(int r, int g, int b);
void gui_mch_set_fg_color(guicolor_T color);
void gui_mch_set_bg_color(guicolor_T color);
void gui_mch_set_sp_color(guicolor_T color);
void gui_mch_draw_string(int row, int col, char_u *s, int len, int flags);
int gui_mch_haskey(char_u *name);
void gui_mch_beep(void);
void gui_mch_flash(int msec);
void gui_mch_invert_rectangle(int r, int c, int nr, int nc);
void gui_mch_iconify(void);
void gui_mch_settitle(char_u *title, char_u *icon);
void gui_mch_draw_hollow_cursor(guicolor_T color);
void gui_mch_draw_part_cursor(int w, int h, guicolor_T color);
void gui_mch_update(void);
int gui_mch_wait_for_chars(int wtime);
void gui_mch_flush(void);
void gui_mch_clear_block(int row1, int col1, int row2, int col2);
void gui_mch_clear_all(void);
void gui_mch_delete_lines(int row, int num_lines);
void gui_mch_insert_lines(int row, int num_lines);
void gui_mch_enable_menu(int flag);
void gui_mch_set_menu_pos(int x, int y, int w, int h);
/*void gui_mch_add_menu(vimmenu_T *menu, vimmenu_T *parent, int idx);*/
void gui_mch_add_menu(vimmenu_T *menu, int pos);
/*void gui_mch_add_menu_item(vimmenu_T *menu, vimmenu_T *parent, int idx);*/
void gui_mch_add_menu_item(vimmenu_T *menu, int idx);
void gui_mch_show_popupmenu(vimmenu_T *menu);
void gui_mch_destroy_menu(vimmenu_T *menu);
void gui_mch_menu_grey(vimmenu_T *menu, int grey);
void gui_mch_menu_hidden(vimmenu_T *menu, int hidden);
void gui_mch_draw_menubar(void);
int gui_mch_get_lightness(guicolor_T pixel);
guicolor_T gui_mch_get_rgb(guicolor_T pixel);
int gui_mch_get_mouse_x(void);
int gui_mch_get_mouse_y(void);
void gui_mch_setmouse(int x, int y);
void gui_mch_show_popupmenu(vimmenu_T *menu);
int gui_mch_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
void gui_mch_set_foreground(void);
void gui_mch_show_tabline(int showit);
int gui_mch_showing_tabline(void);
void gui_mch_update_tabline(void);
void gui_mch_set_curtab(int nr);
char_u *C2Pascal_save(char_u *Cstring);
char_u *C2Pascal_save_and_remove_backslash(char_u *Cstring);
int_u EventModifiers2VimMouseModifiers(EventModifiers macModifiers);
char_u **new_fnames_from_AEDesc(AEDesc *theList, long *numFiles, OSErr *error);
void gui_request_selection(void);
void gui_mch_lose_selection(void);
int gui_mch_own_selection(void);
void gui_mch_clear_selection(void);
void gui_win_new_height(win_T *wp);
void gui_win_comp_pos(void);
void gui_win_free(win_T *wp);
void gui_win_alloc(win_T *wp);
void mch_post_buffer_write (buf_T *buf);
void mch_errmsg(char *str);
void mch_display_error(void);
void clip_mch_lose_selection(Clipboard_T *cbd);
void clip_mch_request_selection(Clipboard_T *cbd);
void clip_mch_set_selection(Clipboard_T *cbd);
int clip_mch_own_selection(Clipboard_T *cbd);
pascal OSErr FindProcessBySignature( const OSType targetType,
const OSType targetCreator, ProcessSerialNumberPtr psnPtr );
OSErr InstallAEHandlers (void);
pascal OSErr HandleODocAE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
pascal OSErr Handle_aevt_oapp_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
pascal OSErr Handle_aevt_quit_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
pascal OSErr Handle_aevt_pdoc_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
pascal OSErr Handle_unknown_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
/* Shoulde we return MenuItemIndex? IMO yes, I did that for 5.7 ak*/
short gui_mac_get_menu_item_index (vimmenu_T *pMenu);
pascal OSErr Handle_KAHL_SRCH_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
pascal OSErr Handle_KAHL_MOD_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
pascal OSErr Handle_KAHL_GTTX_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
void Send_KAHL_MOD_AE (buf_T *buf);
void gui_mac_doInContentClick(EventRecord *theEvent, WindowPtr whichWindow);
void gui_mac_doInDragClick(Point where, WindowPtr whichWindow);
void gui_mac_doInGrowClick(Point where, WindowPtr whichWindow);
void gui_mac_doUpdateEvent(EventRecord *event);
void gui_mac_doActivateEvent(EventRecord *event);
void gui_mac_doSuspendEvent(EventRecord *event);
void gui_mac_doKeyEvent(EventRecord *theEvent);
void gui_mac_doMouseDownEvent(EventRecord *theEvent);
void gui_mac_doMouseMovedEvent(EventRecord *event);
void gui_mac_doMouseUpEvent(EventRecord *theEvent);
void gui_mch_mousehide(int hide);
int C2PascalString (char_u *CString, Str255 *PascalString);
int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec);
char_u *FullPathFromFSSpec_save (FSSpec file);
/* vim: set ft=c : */

View File

@ -2530,9 +2530,6 @@ struct file_buffer
dev_t b_dev; // device number dev_t b_dev; // device number
ino_t b_ino; // inode number ino_t b_ino; // inode number
#endif #endif
#ifdef FEAT_CW_EDITOR
FSSpec b_FSSpec; // MacOS File Identification
#endif
#ifdef VMS #ifdef VMS
char b_fab_rfm; // Record format char b_fab_rfm; // Record format
char b_fab_rat; // Record attribute char b_fab_rat; // Record attribute
@ -3790,15 +3787,6 @@ struct VimMenu
BPictureButton *button; BPictureButton *button;
# endif # endif
#endif #endif
#ifdef FEAT_GUI_MAC
// MenuHandle id;
// short index; // the item index within the father menu
short menu_id; // the menu id to which this item belongs
short submenu_id; // the menu id of the children (could be
// get through some tricks)
MenuHandle menu_handle;
MenuHandle submenu_handle;
#endif
#ifdef FEAT_GUI_PHOTON #ifdef FEAT_GUI_PHOTON
PtWidget_t *id; PtWidget_t *id;
PtWidget_t *submenu_id; PtWidget_t *submenu_id;

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1422,
/**/ /**/
1421, 1421,
/**/ /**/

View File

@ -97,14 +97,12 @@
// Unless made through the Makefile enforce GUI on Mac // Unless made through the Makefile enforce GUI on Mac
#if defined(MACOS_X) && !defined(HAVE_CONFIG_H) #if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
# define UNIX # define UNIX
# define FEAT_GUI_MAC
#endif #endif
#if defined(FEAT_GUI_MOTIF) \ #if defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_GTK) \ || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_ATHENA) \ || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_HAIKU) \ || defined(FEAT_GUI_HAIKU) \
|| defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_PHOTON)
# define FEAT_GUI_ENABLED // also defined with NO_X11_INCLUDES # define FEAT_GUI_ENABLED // also defined with NO_X11_INCLUDES
@ -2144,7 +2142,7 @@ typedef enum {
// been seen at that stage. But it must be before globals.h, where error_ga // been seen at that stage. But it must be before globals.h, where error_ga
// is declared. // is declared.
#if !defined(MSWIN) && !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_HAIKU) \ #if !defined(MSWIN) && !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_HAIKU) \
&& !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC) && !defined(PROTO) && !defined(FEAT_GUI_GTK) && !defined(PROTO)
# define mch_errmsg(str) fprintf(stderr, "%s", (str)) # define mch_errmsg(str) fprintf(stderr, "%s", (str))
# define display_errors() fflush(stderr) # define display_errors() fflush(stderr)
# define mch_msg(str) printf("%s", (str)) # define mch_msg(str) printf("%s", (str))
@ -2154,8 +2152,7 @@ typedef enum {
# if defined(FEAT_EVAL) \ # if defined(FEAT_EVAL) \
&& (!defined(FEAT_GUI_MSWIN) \ && (!defined(FEAT_GUI_MSWIN) \
|| !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \ || !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)))
&& !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
// Whether IME is supported by im_get_status() defined in mbyte.c. // Whether IME is supported by im_get_status() defined in mbyte.c.
// For Win32 GUI it's in gui_w32.c when FEAT_MBYTE_IME or GLOBAL_IME is defined. // For Win32 GUI it's in gui_w32.c when FEAT_MBYTE_IME or GLOBAL_IME is defined.
// for Mac it is in gui_mac.c for the GUI or in os_mac_conv.c when // for Mac it is in gui_mac.c for the GUI or in os_mac_conv.c when
@ -2166,8 +2163,7 @@ typedef enum {
#if defined(FEAT_XIM) \ #if defined(FEAT_XIM) \
|| defined(IME_WITHOUT_XIM) \ || defined(IME_WITHOUT_XIM) \
|| (defined(FEAT_GUI_MSWIN) \ || (defined(FEAT_GUI_MSWIN) \
&& (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \ && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)))
|| defined(FEAT_GUI_MAC)
// im_set_active() is available // im_set_active() is available
# define HAVE_INPUT_METHOD # define HAVE_INPUT_METHOD
#endif #endif