1
0
forked from aniani/vim

patch 8.2.4677: the Athena GUI support is outdated

Problem:    The Athena GUI support is outdated.
Solution:   Remove the Athena GUI code.
This commit is contained in:
Bram Moolenaar
2022-04-03 18:02:37 +01:00
parent 292e1b9f68
commit 0b962e5685
33 changed files with 102 additions and 6823 deletions

View File

@@ -446,10 +446,6 @@ SRC_UNIX = \
src/create_cmdidxs.vim \
src/create_nvcmdidxs.c \
src/create_nvcmdidxs.vim \
src/gui_at_fs.c \
src/gui_at_sb.c \
src/gui_at_sb.h \
src/gui_athena.c \
src/gui_gtk.c \
src/gui_gtk_f.c \
src/gui_gtk_f.h \
@@ -474,7 +470,6 @@ SRC_UNIX = \
src/osdef1.h.in \
src/osdef2.h.in \
src/pathdef.sh \
src/proto/gui_athena.pro \
src/proto/gui_gtk.pro \
src/proto/gui_gtk_x11.pro \
src/proto/gui_gtk_gresources.pro \

View File

@@ -25,7 +25,7 @@ Other GUI documentation:
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it says "with xxx
GUI", where "xxx" is X11-Motif, X11-Athena, Photon, GTK2, GTK3, etc., or
GUI", where "xxx" is X11-Motif, Photon, GTK2, GTK3, etc., or
"MS-Windows 32 bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
@@ -108,7 +108,7 @@ There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
documented in |options.txt| with all the other options.
If using the Motif or Athena version of the GUI (but not for the GTK+ or
If using the Motif version of the GUI (but not for the GTK+ or
Win32 version), a number of X resources are available. See |gui-resources|.
Another way to set the colors for different occasions is with highlight
@@ -236,7 +236,7 @@ takes too much time or you don't like the cursor jumping to another line,
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
text of the current cursor line.
*athena-intellimouse*
*motif-intellimouse*
If you have an Intellimouse and an X server that supports using the wheel,
then you can use the wheel to scroll the text up and down in gvim. This works
with XFree86 4.0 and later, and with some older versions when you add patches.
@@ -746,7 +746,7 @@ because the item will never be selected. Use a single colon to keep it
simple.
*gui-toolbar*
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
The toolbar is currently available in the Win32, Motif, GTK+ (X11),
and Photon GUI. It should turn up in other GUIs in due course. The
default toolbar is setup in menu.vim.
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
@@ -862,7 +862,7 @@ The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
When splitting the window the window toolbar is not copied to the new window.
*popup-menu*
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the
In the Win32, GTK+, Motif and Photon GUI, you can define the
special menu "PopUp". This is the menu that is displayed when the right mouse
button is pressed, if 'mousemodel' is set to popup or popup_setpos.
Example: >

View File

@@ -1,11 +1,11 @@
*gui_x11.txt* For Vim version 8.2. Last change: 2020 Jun 05
*gui_x11.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar
Vim's Graphical User Interface *gui-x11* *GUI-X11*
*Athena* *Motif*
*Motif*
1. Starting the X11 GUI |gui-x11-start|
2. GUI Resources |gui-resources|
3. Shell Commands |gui-pty|
@@ -64,7 +64,7 @@ flag in 'guioptions'. |-f|.
==============================================================================
2. GUI Resources *gui-resources* *.Xdefaults*
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
If using the Motif version of the GUI (not for the KDE, GTK+ or Win32
version), a number of X resources are available. You should use Vim's class
"Vim" when setting these. They are as follows:
@@ -96,7 +96,6 @@ version), a number of X resources are available. You should use Vim's class
is same size as terminal that started it).
scrollbarWidth Thickness of scrollbars.
borderWidth Thickness of border around text area.
menuHeight Height of the menu bar (only for Athena).
A special font for italic, bold, and italic-bold text will only be used if
the user has specified one via a resource. No attempt is made to guess what
@@ -135,12 +134,9 @@ which make Motif applications look even better, highly recommended!
The "Vim*fontList" is to set the menu font for Motif. Example: >
Vim*menuBar*fontList: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
With Athena: >
Vim*menuBar*SmeBSB*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
NOTE: A more portable, and indeed more correct, way to specify the menu font
in either Motif or Athena is through the resource: >
in Motif is through the resource: >
Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
Or, when compiled with the |+xfontset| feature: >
Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
@@ -255,7 +251,7 @@ For example: >
:10vmenu File.Print :w !lpr -Php3
<
*X11-icon*
Vim uses a black&white icon by default when compiled with Motif or Athena. A
Vim uses a black&white icon by default when compiled with Motif. A
colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm. For GTK+, this is
the builtin icon used. Unfortunately, how you should install it depends on
your window manager. When you use this, remove the 'i' flag from
@@ -594,8 +590,7 @@ GTK+ files on your system. When both GTK+ 2 and GTK+ 3 are available, GTK+ 2
will be chosen unless --enable-gui=gtk3 is passed explicitly to configure.
If the GTK+ files cannot be found, then the Motif files will be searched for.
Finally, if this fails, the Athena files will be searched for. If all three
fail, the GUI will be disabled.
If both fail, the GUI will be disabled.
For GTK+, Vim's configuration process uses pkg-config(1) to check if the
GTK+ required for a specified build is properly installed and usable.
@@ -621,10 +616,10 @@ explicitly to configure, and avoid passing --enable-gnome-check to that, as
the functionality of the GNOME 2 support has already been consolidated in
GTK+ 3.
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
files in a directory where configure doesn't look, edit the Makefile to enter
the names of the directories. Search for "GUI_INC_LOC" for an example to set
the Motif directories, "CONF_OPT_X" for Athena.
Otherwise, if you are using Motif, when you have the Motif files in a
directory where configure doesn't look, edit the Makefile to enter the names
of the directories. Search for "GUI_INC_LOC" for an example to set
the Motif directories.
*gui-x11-gtk*
Currently, Vim supports both GTK+ 2 and GTK+ 3.
@@ -643,18 +638,11 @@ few problems, but you might make it compile and run with a bit of work, please
send me the patches if you do). The newest releases of LessTif have been
reported to work fine too.
*gui-x11-athena*
The Athena version uses the Xaw widget set by default. If you have the 3D
version, you might want to link with Xaw3d instead. This will make the
menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
scrollbars will remain the same, because Vim has its own, which are already
3D (in fact, they look more like Motif).
*gui-x11-neXtaw*
The neXtaw version is mostly like Athena, but uses different widgets.
*gui-x11-athena* *gui-x11-neXtaw*
Support for the Athena GUI and neXtaw was removed in patch 8.2.4677.
*gui-x11-misc*
In general, do not try to mix files from different GTK+, Motif, Athena and X11
In general, do not try to mix files from different GTK+, Motif and X11
versions. This will cause problems. For example, using header files for
X11R5 with a library for X11R6 probably doesn't work (although the linking
won't give an error message, Vim will crash later).

View File

@@ -182,10 +182,7 @@
#Irix 6.5 cc ? 6.0 (S) David Harrison
#Irix 64 bit 4.5 (K) Jon Wright
#Linux 2.0 gcc-2.7.2 Infomagic Motif 4.3 (3) Ronald Rietman
#Linux 2.0.31 gcc +X11 +GUI Athena 5.0w (U) Darren Hiebert
#LynxOS 3.0.1 2.9-gnupro-98r2 +X11 +GUI Athena 5.7.1(O) Lorenz Hahn
#LynxOS 3.1.0 2.9-gnupro-98r2 +X11 +GUI Athena 5.7.1(O) Lorenz Hahn
#NEC UP4800 UNIX_SV 4.2MP cc +X11R6 Motif,Athena4.6b (Q) Lennart Schultz
#NEC UP4800 UNIX_SV 4.2MP cc +X11R6 Motif 4.6b (Q) Lennart Schultz
#NetBSD 1.0A gcc-2.4.5 -X11 -GUI 3.21 (X) Juergen Weigert
#QNX 4.2 wcc386-10.6 -X11 4.2 (D) G.F. Desrochers
#QNX 4.23 Watcom -X11 4.2 (F) John Oleynick
@@ -199,14 +196,12 @@
#Solaris 2.4 (Sparc) cc +X11 +GUI 3.29 (9) Glauber
#Solaris 2.4/2.5 clcc +X11 -GUI openwin 3.20 (7) Robert Colon
#Solaris 2.5 (sun4m) cc (SC4.0) +X11R6 +GUI (CDE) 4.6b (E) Andrew Large
#Solaris 2.5 cc +X11 +GUI Athena 4.2 (9) Sonia Heimann
#Solaris 2.5 gcc 2.5.6 +X11 Motif 5.0m (R) Ant. Colombo
#Solaris 2.6 gcc 2.8.1 ncurses 5.3 (G) Larry W. Virden
#Solaris with -lthread 5.5 (W) K. Nagano
#Solaris gcc (b) Riccardo
#SunOS 4.1.x +X11 -GUI 5.1b (J) Bram Moolenaar
#SunOS 4.1.3_U1 (sun4c) gcc +X11 +GUI Athena 5.0w (J) Darren Hiebert
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif,Athena4.6b (P) Lennart Schultz
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif 4.6b (P) Lennart Schultz
#Tandem/NSK (c) Matthew Woehlke
#Unisys 6035 cc +X11 Motif 5.3 (8) Glauber Ribeiro
#ESIX V4.2 cc +X11 6.0 (a) Reinhard Wobst
@@ -1342,8 +1337,8 @@ HAIKUGUI_TESTTARGET = gui
HAIKUGUI_BUNDLE =
# All GUI files
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c gui_haiku.cc
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_gtk_x11.c gui_x11.c gui_haiku.cc
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro
# }}}
@@ -3245,15 +3240,6 @@ objects/help.o: help.c
objects/gui.o: gui.c
$(CCC) -o $@ gui.c
objects/gui_at_fs.o: gui_at_fs.c
$(CCC) -o $@ gui_at_fs.c
objects/gui_at_sb.o: gui_at_sb.c
$(CCC) -o $@ gui_at_sb.c
objects/gui_athena.o: gui_athena.c
$(CCC) -o $@ gui_athena.c
objects/beval.o: beval.c
$(CCC) -o $@ beval.c
@@ -4182,25 +4168,6 @@ objects/gui_xmebw.o: gui_xmebw.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_xmebwp.h gui_xmebw.h
objects/gui_athena.o: gui_athena.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_at_sb.h gui_x11_pm.h \
../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
../pixmaps/tb_find_next.xpm ../pixmaps/tb_find_prev.xpm \
../pixmaps/tb_find_help.xpm ../pixmaps/tb_exit.xpm \
../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm ../pixmaps/tb_help.xpm \
../pixmaps/tb_macro.xpm ../pixmaps/tb_make.xpm \
../pixmaps/tb_save_all.xpm ../pixmaps/tb_jump.xpm \
../pixmaps/tb_ctags.xpm ../pixmaps/tb_load_session.xpm \
../pixmaps/tb_save_session.xpm ../pixmaps/tb_new_session.xpm \
../pixmaps/tb_blank.xpm ../pixmaps/tb_maximize.xpm \
../pixmaps/tb_split.xpm ../pixmaps/tb_minimize.xpm \
../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
../pixmaps/tb_minwidth.xpm
objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@@ -4211,14 +4178,6 @@ objects/gui_x11.o: gui_x11.c vim.h protodef.h auto/config.h feature.h os_unix.h
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h ../runtime/vim32x32.xpm \
../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
objects/gui_at_sb.o: gui_at_sb.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_at_sb.h
objects/gui_at_fs.o: gui_at_fs.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_at_sb.h
objects/gui_haiku.o: gui_haiku.cc vim.h protodef.h auto/config.h feature.h \
os_unix.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@@ -1354,7 +1354,7 @@ check_clipboard_option(void)
/*
* Open the application context (if it hasn't been opened yet).
* Used for Motif and Athena GUI and the xterm clipboard.
* Used for Motif GUI and the xterm clipboard.
*/
void
open_app_context(void)

View File

@@ -5619,20 +5619,8 @@ f_has(typval_T *argvars, typval_T *rettv)
0
#endif
},
{"gui_neXtaw",
#if defined(FEAT_GUI_ATHENA) && defined(FEAT_GUI_NEXTAW)
1
#else
0
#endif
},
{"gui_athena",
#if defined(FEAT_GUI_ATHENA) && !defined(FEAT_GUI_NEXTAW)
1
#else
0
#endif
},
{"gui_neXtaw", 0 },
{"gui_athena", 0 },
{"gui_gtk",
#ifdef FEAT_GUI_GTK
1

View File

@@ -583,8 +583,7 @@
#if defined(FEAT_NORMAL) && defined(FEAT_MENU) \
&& (defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MSWIN) \
|| ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
&& defined(HAVE_XPM)) \
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XPM)) \
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU))
@@ -620,7 +619,7 @@
*/
#if defined(FEAT_NORMAL)
# 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_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON)
# define FEAT_BROWSE
# endif
@@ -641,8 +640,7 @@
* When none of these defined there is no dialog support.
*/
#ifdef FEAT_NORMAL
# if ((defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) \
&& defined(HAVE_X11_XPM_H)) \
# if (defined(FEAT_GUI_MOTIF) && defined(HAVE_X11_XPM_H)) \
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU) \
@@ -654,13 +652,13 @@
# endif
#endif
#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MSWIN))
// need a dialog to show error messages when starting from the desktop
# define FEAT_GUI_DIALOG
#endif
#if defined(FEAT_GUI_DIALOG) && \
(defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
(defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU))
@@ -881,7 +879,7 @@
* +X11 Unix only. Include code for xterm title saving and X
* clipboard. Only works if HAVE_X11 is also defined.
*/
#if (defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
#if defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF)
# define WANT_X11
#endif
@@ -1047,7 +1045,7 @@
# define MCH_CURSOR_SHAPE
# endif
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON)
# define FEAT_MOUSESHAPE
# endif
@@ -1064,7 +1062,7 @@
#endif
#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
|| defined(FEAT_GUI_MOTIF))
# define MZSCHEME_GUI_THREADS
#endif
@@ -1090,7 +1088,6 @@
* +tcl TCL interface: "--enable-tclinterp"
* +netbeans_intg Netbeans integration
* +channel Inter process communication
* +GUI_Athena Athena GUI
* +GUI_Motif Motif GUI
*/
@@ -1154,8 +1151,7 @@
*/
#if defined(FEAT_BIG) || defined(FEAT_NETBEANS_INTG) || defined(FEAT_PROP_POPUP)
# define FEAT_SIGNS
# if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
&& defined(HAVE_X11_XPM_H)) \
# if (defined(FEAT_GUI_MOTIF) && defined(HAVE_X11_XPM_H)) \
|| defined(FEAT_GUI_GTK) \
|| (defined(MSWIN) && defined(FEAT_GUI))
# define FEAT_SIGN_ICONS
@@ -1167,7 +1163,7 @@
* debugger and for tooltips.
* Only for GUIs where it was implemented.
*/
#if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
#if (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) \
&& ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
&& !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)) \
@@ -1179,7 +1175,7 @@
# endif
#endif
#if defined(FEAT_BEVAL_GUI) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
#if defined(FEAT_BEVAL_GUI) && defined(FEAT_GUI_MOTIF)
# define FEAT_BEVAL_TIP // balloon eval used for toolbar tooltip
#endif
@@ -1196,8 +1192,8 @@
# define FEAT_BEVAL
#endif
// both Motif and Athena are X11 and share some code
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
// Motif is X11
#if defined(FEAT_GUI_MOTIF)
# define FEAT_GUI_X11
#endif

View File

@@ -52,15 +52,6 @@ static void gui_attempt_start(void);
static int can_update_cursor = TRUE; // can display the cursor
static int disable_flush = 0; // If > 0, gui_mch_flush() is disabled.
/*
* The Athena scrollbars can move the thumb to after the end of the scrollbar,
* this makes the thumb indicate the part of the text that is shown. Motif
* can't do this.
*/
#if defined(FEAT_GUI_ATHENA)
# define SCROLL_PAST_END
#endif
/*
* gui_start -- Called when user wants to start the GUI.
*
@@ -445,8 +436,7 @@ gui_init_check(void)
gui.menu_width = 0;
# endif
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_HAIKU))
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU))
gui.toolbar_height = 0;
#endif
#if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF)
@@ -789,7 +779,7 @@ gui_init(void)
balloonEval = gui_mch_create_beval_area(gui.drawarea, NULL,
&general_beval_cb, NULL);
# else
# if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# if defined(FEAT_GUI_MOTIF)
{
extern Widget textArea;
balloonEval = gui_mch_create_beval_area(textArea, NULL,
@@ -1441,11 +1431,11 @@ gui_position_components(int total_width UNUSED)
text_area_y += gui.tabline_height;
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_MSWIN))
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
{
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)
# if defined(FEAT_GUI_HAIKU)
gui_mch_set_toolbar_pos(0, text_area_y,
gui.menu_width, gui.toolbar_height);
# endif
@@ -2043,10 +2033,10 @@ gui_write(
old_curwin = curwin;
/*
* We need to make sure this is cleared since Athena doesn't tell us when
* he is done dragging. Do the same for GTK.
* We need to make sure this is cleared since GTK doesn't tell us when
* the user is done dragging.
*/
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_GTK)
gui.dragged_sb = SBAR_NONE;
#endif
@@ -3410,10 +3400,10 @@ button_set:
prev_col = col;
/*
* We need to make sure this is cleared since Athena doesn't tell us when
* he is done dragging. Neither does GTK+ 2 -- at least for now.
* We need to make sure this is cleared since GTK doesn't tell us when
* the user is done dragging.
*/
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_GTK)
gui.dragged_sb = SBAR_NONE;
#endif
}
@@ -3952,9 +3942,6 @@ gui_create_scrollbar(scrollbar_T *sb, int type, win_T *wp)
sb->wp = wp;
sb->type = type;
sb->value = 0;
#ifdef FEAT_GUI_ATHENA
sb->pixval = 0;
#endif
sb->size = 1;
sb->max = 1;
sb->top = 0;
@@ -4336,7 +4323,7 @@ gui_update_scrollbars(
y += gui.menu_height;
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA) \
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_HAIKU))
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
y += gui.toolbar_height;
@@ -4369,25 +4356,10 @@ gui_update_scrollbars(
}
}
// Reduce the number of calls to gui_mch_set_scrollbar_thumb() by
// checking if the thumb moved at least a pixel. Only do this for
// Athena, most other GUIs require the update anyway to make the
// arrows work.
#ifdef FEAT_GUI_ATHENA
if (max == 0)
y = 0;
else
y = (val * (sb->height + 2) * gui.char_height + max / 2) / max;
if (force || sb->pixval != y || sb->size != size || sb->max != max)
#else
if (force || sb->value != val || sb->size != size || sb->max != max)
#endif
{
// Thumb of scrollbar has moved
sb->value = val;
#ifdef FEAT_GUI_ATHENA
sb->pixval = y;
#endif
sb->size = size;
sb->max = max;
if (gui.which_scrollbars[SBAR_LEFT]
@@ -5122,7 +5094,7 @@ ex_gui(exarg_T *eap)
|| defined(FEAT_GUI_HAIKU)) \
&& defined(FEAT_TOOLBAR)) || defined(PROTO)
/*
* This is shared between Athena, Haiku, Motif, and GTK.
* This is shared between Haiku, Motif, and GTK.
*/
/*

View File

@@ -11,11 +11,6 @@
# include <Xm/Xm.h>
#endif
#ifdef FEAT_GUI_ATHENA
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
#endif
#ifdef FEAT_GUI_GTK
# ifdef VMS // undef MIN and MAX because Intrinsic.h redefines them anyway
# ifdef MAX
@@ -36,7 +31,7 @@
// Needed when generating prototypes, since FEAT_GUI is always defined then.
#if defined(FEAT_XCLIPBOARD) && !defined(FEAT_GUI_MOTIF) \
&& !defined(FEAT_GUI_ATHENA) && !defined(FEAT_GUI_GTK)
&& !defined(FEAT_GUI_GTK)
# include <X11/Intrinsic.h>
#endif
@@ -160,9 +155,6 @@ typedef struct GuiScrollbar
win_T *wp; // Scrollbar's window, NULL for bottom
int type; // one of SBAR_{LEFT,RIGHT,BOTTOM}
long value; // Represents top line number visible
#ifdef FEAT_GUI_ATHENA
int pixval; // pixel count of value
#endif
long size; // Size of scrollbar thumb
long max; // Number of lines in buffer
@@ -277,9 +269,6 @@ typedef struct Gui
int menu_width; // Width of the menu bar
# endif
char menu_is_active; // TRUE if menu is present
# ifdef FEAT_GUI_ATHENA
char menu_height_fixed; // TRUE if menu height fixed
# endif
#endif
scrollbar_T bottom_sbar; // Bottom scrollbar
@@ -418,7 +407,7 @@ typedef struct Gui
#endif
#if defined(FEAT_TOOLBAR) \
&& (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_MSWIN))
&& (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_MSWIN))
int toolbar_height; // height of the toolbar
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,161 +0,0 @@
// vi:set ts=8 sts=4 sw=4 noet:
// MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL)
// Modifications Copyright 1992 by Mitch Trachtenberg
// Rights, permissions, and disclaimer of warranty are as in the
// DEC and MIT notice below. See usage warning in .c file.
/*
* $XConsortium: ScrollbarP.h,v 1.3 94/04/17 20:12:42 jim Exp $
*/
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _Scrollbar_h
#define _Scrollbar_h
/****************************************************************
*
* Scrollbar Widget
*
****************************************************************/
#include <X11/IntrinsicP.h>
#include <X11/Xaw/SimpleP.h>
#include <X11/Xmu/Converters.h>
/*
* Most things we need are in StringDefs.h
*/
#define XtCMinimumThumb "MinimumThumb"
#define XtCShown "Shown"
#define XtCTopOfThumb "TopOfThumb"
#define XtCMaxOfThumb "MaxOfThumb"
#define XtCShadowWidth "ShadowWidth"
#define XtCTopShadowPixel "TopShadowPixel"
#define XtCBottomShadowPixel "BottomShadowPixel"
#define XtCLimitThumb "LimitThumb"
#define XtNminimumThumb "minimumThumb"
#define XtNtopOfThumb "topOfThumb"
#define XtNmaxOfThumb "maxOfThumb"
#define XtNshadowWidth "shadowWidth"
#define XtNtopShadowPixel "topShadowPixel"
#define XtNbottomShadowPixel "bottomShadowPixel"
#define XtNlimitThumb "limitThumb"
typedef struct _ScrollbarRec *ScrollbarWidget;
typedef struct _ScrollbarClassRec *ScrollbarWidgetClass;
extern WidgetClass vim_scrollbarWidgetClass;
extern void vim_XawScrollbarSetThumb(Widget, double, double, double);
typedef struct
{
// public
Pixel foreground; // thumb foreground color
XtOrientation orientation; // horizontal or vertical
XtCallbackList scrollProc; // proportional scroll
XtCallbackList thumbProc; // jump (to position) scroll
XtCallbackList jumpProc; // same as thumbProc but pass data by ref
Pixmap thumb; // thumb color
float top; // What percent is above the win's top
float shown; // What percent is shown in the win
float max; // Maximum value for top
Dimension length; // either height or width
Dimension thickness; // either width or height
Dimension min_thumb; // minimum size for the thumb.
// private
XtIntervalId timer_id; // autorepeat timer; remove on destruction
char scroll_mode; // see below
float scroll_off; // offset from event to top of thumb
GC gc; // a (shared) gc
Position topLoc; // Pixel that corresponds to top
Dimension shownLength; // Num pixels corresponding to shown
// From 3d widget
Dimension shadow_width;
Pixel top_shadow_pixel;
Pixel bot_shadow_pixel;
Bool limit_thumb; // limit thumb to inside scrollbar
int top_shadow_contrast;
int bot_shadow_contrast;
GC top_shadow_GC;
GC bot_shadow_GC;
} ScrollbarPart;
#define SMODE_NONE 0
#define SMODE_CONT 1
#define SMODE_PAGE_UP 2
#define SMODE_PAGE_DOWN 3
#define SMODE_LINE_UP 4
#define SMODE_LINE_DOWN 5
#define ONE_LINE_DATA 1
#define ONE_PAGE_DATA 10
#define END_PAGE_DATA 9999
typedef struct _ScrollbarRec {
CorePart core;
SimplePart simple;
ScrollbarPart scrollbar;
} ScrollbarRec;
typedef struct {int empty;} ScrollbarClassPart;
typedef struct _ScrollbarClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
ScrollbarClassPart scrollbar_class;
} ScrollbarClassRec;
extern ScrollbarClassRec vim_scrollbarClassRec;
#endif // _Scrollbar_h

File diff suppressed because it is too large Load Diff

View File

@@ -24,22 +24,12 @@
# include <gtk/gtk.h>
#else
# include <X11/keysym.h>
# ifdef FEAT_GUI_MOTIF
# include <Xm/PushB.h>
# include <Xm/Separator.h>
# include <Xm/List.h>
# include <Xm/Label.h>
# include <Xm/AtomMgr.h>
# include <Xm/Protocols.h>
# else
// Assume Athena
# include <X11/Shell.h>
# ifdef FEAT_GUI_NEXTAW
# include <X11/neXtaw/Label.h>
# else
# include <X11/Xaw/Label.h>
# endif
# endif
#endif
#ifndef FEAT_GUI_GTK
@@ -618,7 +608,7 @@ pointerEvent(BalloonEval *beval, XEvent *event)
break;
/*
* Motif and Athena version: Keystrokes will be caught by the
* Motif version: Keystrokes will be caught by the
* "textArea" widget, and handled in gui_x11_key_hit_cb().
*/
case KeyPress:
@@ -1072,11 +1062,10 @@ drawBalloon(BalloonEval *beval)
if (beval->msg != NULL)
{
XmString s;
// Show the Balloon
// Calculate the label's width and height
#ifdef FEAT_GUI_MOTIF
XmString s;
// For the callback function we parse NL characters to create a
// multi-line label. This doesn't work for all languages, but
@@ -1101,21 +1090,6 @@ drawBalloon(BalloonEval *beval)
h += gui.border_offset << 1;
XtVaSetValues(beval->balloonLabel, XmNlabelString, s, NULL);
XmStringFree(s);
#else // Athena
// Assume XtNinternational == True
XFontSet fset;
XFontSetExtents *ext;
XtVaGetValues(beval->balloonLabel, XtNfontSet, &fset, NULL);
ext = XExtentsOfFontSet(fset);
h = ext->max_ink_extent.height;
w = XmbTextEscapement(fset,
(char *)beval->msg,
(int)STRLEN(beval->msg));
w += gui.border_offset << 1;
h += gui.border_offset << 1;
XtVaSetValues(beval->balloonLabel, XtNlabel, beval->msg, NULL);
#endif
// Compute position of the balloon area
tx = beval->x_root + EVAL_OFFSET_X;
@@ -1124,33 +1098,18 @@ drawBalloon(BalloonEval *beval)
tx = beval->screen_width - w;
if ((ty + h) > beval->screen_height)
ty = beval->screen_height - h;
#ifdef FEAT_GUI_MOTIF
XtVaSetValues(beval->balloonShell,
XmNx, tx,
XmNy, ty,
NULL);
#else
// Athena
XtVaSetValues(beval->balloonShell,
XtNx, tx,
XtNy, ty,
NULL);
#endif
// Set tooltip colors
{
Arg args[2];
#ifdef FEAT_GUI_MOTIF
args[0].name = XmNbackground;
args[0].value = gui.tooltip_bg_pixel;
args[1].name = XmNforeground;
args[1].value = gui.tooltip_fg_pixel;
#else // Athena
args[0].name = XtNbackground;
args[0].value = gui.tooltip_bg_pixel;
args[1].name = XtNforeground;
args[1].value = gui.tooltip_fg_pixel;
#endif
XtSetValues(beval->balloonLabel, &args[0], XtNumber(args));
}
@@ -1198,22 +1157,14 @@ createBalloonEvalWindow(BalloonEval *beval)
int n;
n = 0;
#ifdef FEAT_GUI_MOTIF
XtSetArg(args[n], XmNallowShellResize, True); n++;
beval->balloonShell = XtAppCreateShell("balloonEval", "BalloonEval",
overrideShellWidgetClass, gui.dpy, args, n);
#else
// Athena
XtSetArg(args[n], XtNallowShellResize, True); n++;
beval->balloonShell = XtAppCreateShell("balloonEval", "BalloonEval",
overrideShellWidgetClass, gui.dpy, args, n);
#endif
n = 0;
#ifdef FEAT_GUI_MOTIF
{
XmFontList fl;
n = 0;
fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset);
XtSetArg(args[n], XmNforeground, gui.tooltip_fg_pixel); n++;
XtSetArg(args[n], XmNbackground, gui.tooltip_bg_pixel); n++;
@@ -1222,14 +1173,6 @@ createBalloonEvalWindow(BalloonEval *beval)
beval->balloonLabel = XtCreateManagedWidget("balloonLabel",
xmLabelWidgetClass, beval->balloonShell, args, n);
}
#else // FEAT_GUI_ATHENA
XtSetArg(args[n], XtNforeground, gui.tooltip_fg_pixel); n++;
XtSetArg(args[n], XtNbackground, gui.tooltip_bg_pixel); n++;
XtSetArg(args[n], XtNinternational, True); n++;
XtSetArg(args[n], XtNfontSet, gui.tooltip_fontset); n++;
beval->balloonLabel = XtCreateManagedWidget("balloonLabel",
labelWidgetClass, beval->balloonShell, args, n);
#endif
}
#endif // !FEAT_GUI_GTK

View File

@@ -641,8 +641,7 @@ gui_x11_set_back_color(void)
}
/*
* Manage dialog centered on pointer. This could be used by the Athena code as
* well.
* Manage dialog centered on pointer.
*/
void
manage_centered(Widget dialog_child)
@@ -1596,9 +1595,6 @@ gui_mch_destroy_menu(vimmenu_T *menu)
// Please be sure to destroy the parent widget first (i.e. menu->id).
// On the other hand, problems have been reported that the submenu must be
// deleted first...
//
// This code should be basically identical to that in the file gui_athena.c
// because they are both Xt based.
if (menu->submenu_id != (Widget)0)
{
XtDestroyWidget(menu->submenu_id);

View File

@@ -8,7 +8,7 @@
* See README.txt for an overview of the Vim source code.
*/
/*
* Common code for the Motif and Athena GUI.
* Code for the Motif GUI.
* Not used for GTK.
*/
@@ -66,22 +66,13 @@
#endif
#define DFLT_TOOLTIP_FONT XtDefaultFontSet
#ifdef FEAT_GUI_ATHENA
# define DFLT_MENU_BG_COLOR "gray77"
# define DFLT_MENU_FG_COLOR "black"
# define DFLT_SCROLL_BG_COLOR "gray60"
# define DFLT_SCROLL_FG_COLOR "gray77"
# define DFLT_TOOLTIP_BG_COLOR "#ffff91"
# define DFLT_TOOLTIP_FG_COLOR "#000000"
#else
// use the default (CDE) colors
# define DFLT_MENU_BG_COLOR ""
# define DFLT_MENU_FG_COLOR ""
# define DFLT_SCROLL_BG_COLOR ""
# define DFLT_SCROLL_FG_COLOR ""
# define DFLT_TOOLTIP_BG_COLOR "#ffff91"
# define DFLT_TOOLTIP_FG_COLOR "#000000"
#endif
#define DFLT_MENU_BG_COLOR ""
#define DFLT_MENU_FG_COLOR ""
#define DFLT_SCROLL_BG_COLOR ""
#define DFLT_SCROLL_FG_COLOR ""
#define DFLT_TOOLTIP_BG_COLOR "#ffff91"
#define DFLT_TOOLTIP_FG_COLOR "#000000"
Widget vimShell = (Widget)0;
@@ -385,17 +376,6 @@ static XtResource vim_resources[] =
(XtPointer)SB_DEFAULT_WIDTH
},
#ifdef FEAT_MENU
# ifdef FEAT_GUI_ATHENA // with Motif the height is always computed
{
XtNmenuHeight,
XtCMenuHeight,
XtRInt,
sizeof(int),
XtOffsetOf(gui_T, menu_height),
XtRImmediate,
(XtPointer)MENU_DEFAULT_HEIGHT // Should figure out at run time
},
# endif
{
# ifdef FONTSET_ALWAYS
XtNmenuFontSet,
@@ -1275,8 +1255,6 @@ gui_mch_init(void)
* Get the colors ourselves. Using the automatic conversion doesn't
* handle looking for approximate colors.
*/
// NOTE: These next few lines are an exact duplicate of gui_athena.c's
// gui_mch_def_colors(). Why?
gui.menu_fg_pixel = gui_get_color((char_u *)gui.rsrc_menu_fg_name);
gui.menu_bg_pixel = gui_get_color((char_u *)gui.rsrc_menu_bg_name);
gui.scroll_fg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_fg_name);
@@ -1286,12 +1264,6 @@ gui_mch_init(void)
gui.tooltip_bg_pixel = gui_get_color((char_u *)gui.rsrc_tooltip_bg_name);
#endif
#if defined(FEAT_MENU) && defined(FEAT_GUI_ATHENA)
// If the menu height was set, don't change it at runtime
if (gui.menu_height != MENU_DEFAULT_HEIGHT)
gui.menu_height_fixed = TRUE;
#endif
// Set default foreground and background colours
gui.norm_pixel = gui.def_norm_pixel;
gui.back_pixel = gui.def_back_pixel;
@@ -1454,11 +1426,7 @@ gui_mch_init(void)
XpmFreeAttributes(&attr);
}
# ifdef FEAT_GUI_ATHENA
XtVaSetValues(vimShell, XtNiconPixmap, icon, XtNiconMask, icon_mask, NULL);
# else
XtVaSetValues(vimShell, XmNiconPixmap, icon, XmNiconMask, icon_mask, NULL);
# endif
#endif
}
@@ -1578,16 +1546,6 @@ gui_mch_open(void)
gui_x11_send_event_handler, NULL);
#endif
#if defined(FEAT_MENU) && defined(FEAT_GUI_ATHENA)
// The Athena GUI needs this again after opening the window
gui_position_menu();
# ifdef FEAT_TOOLBAR
gui_mch_set_toolbar_pos(0, gui.menu_height, gui.menu_width,
gui.toolbar_height);
# endif
#endif
// Get the colors for the highlight groups (gui_check_colors() might have
// changed them)
highlight_gui_started(); // re-init colors and fonts
@@ -2154,22 +2112,6 @@ fontset_height(
return extents->max_logical_extent.height;
}
#if (defined(FONTSET_ALWAYS) && defined(FEAT_GUI_ATHENA) \
&& defined(FEAT_MENU)) || defined(PROTO)
/*
* Returns the bounding box height around the actual glyph image of all
* characters in all fonts of the fontset.
*/
int
fontset_height2(XFontSet fs)
{
XFontSetExtents *extents;
extents = XExtentsOfFontSet(fs);
return extents->max_ink_extent.height;
}
#endif
#if 0
// NOT USED YET
static int

View File

@@ -809,7 +809,7 @@ static UINT timer_id = 0;
#elif defined(FEAT_GUI_GTK)
static gboolean timer_proc(gpointer);
static guint timer_id = 0;
#elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
#elif defined(FEAT_GUI_MOTIF)
static void timer_proc(XtPointer, XtIntervalId *);
static XtIntervalId timer_id = (XtIntervalId)0;
#endif
@@ -845,7 +845,7 @@ timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT_PTR idEvent UNUSED, DWORD dw
# elif defined(FEAT_GUI_GTK)
static gboolean
timer_proc(gpointer data UNUSED)
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# elif defined(FEAT_GUI_MOTIF)
static void
timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED)
# endif
@@ -853,7 +853,7 @@ timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED)
scheme_check_threads();
# if defined(FEAT_GUI_GTK)
return TRUE; // continue receiving notifications
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# elif defined(FEAT_GUI_MOTIF)
// renew timeout
if (mz_threads_allow && p_mzq > 0)
timer_id = XtAppAddTimeOut(app_context, p_mzq,
@@ -868,7 +868,7 @@ setup_timer(void)
timer_id = SetTimer(NULL, 0, p_mzq, timer_proc);
# elif defined(FEAT_GUI_GTK)
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)
timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL);
# endif
}
@@ -880,7 +880,7 @@ remove_timer(void)
KillTimer(NULL, timer_id);
# elif defined(FEAT_GUI_GTK)
g_source_remove(timer_id);
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# elif defined(FEAT_GUI_MOTIF)
XtRemoveTimeOut(timer_id);
# endif
timer_id = 0;

View File

@@ -3541,14 +3541,6 @@ usage(void)
#ifdef FEAT_GUI_X11
# ifdef FEAT_GUI_MOTIF
mch_msg(_("\nArguments recognised by gvim (Motif version):\n"));
# else
# ifdef FEAT_GUI_ATHENA
# ifdef FEAT_GUI_NEXTAW
mch_msg(_("\nArguments recognised by gvim (neXtaw version):\n"));
# else
mch_msg(_("\nArguments recognised by gvim (Athena version):\n"));
# endif
# endif
# endif
main_msg(_("-display <display>\tRun Vim on <display>"));
main_msg(_("-iconic\t\tStart Vim iconified"));
@@ -3560,9 +3552,6 @@ usage(void)
main_msg(_("-geometry <geom>\tUse <geom> for initial geometry (also: -geom)"));
main_msg(_("-borderwidth <width>\tUse a border width of <width> (also: -bw)"));
main_msg(_("-scrollbarwidth <width> Use a scrollbar width of <width> (also: -sw)"));
# ifdef FEAT_GUI_ATHENA
main_msg(_("-menuheight <height>\tUse a menu bar height of <height> (also: -mh)"));
# endif
main_msg(_("-reverse\t\tUse reverse video (also: -rv)"));
main_msg(_("+reverse\t\tDon't use reverse video (also: +rv)"));
main_msg(_("-xrm <resource>\tSet the specified resource"));

View File

@@ -609,10 +609,6 @@ add_menu_path(
#ifdef FEAT_BEVAL_TIP
menu->tip = NULL;
#endif
#ifdef FEAT_GUI_ATHENA
menu->image = None; // X-Windows definition for NULL
#endif
/*
* Add after menu that has lower priority.
*/
@@ -2072,10 +2068,7 @@ gui_update_menus_recurse(vimmenu_T *menu, int mode)
grey = FALSE;
else
grey = TRUE;
# ifdef FEAT_GUI_ATHENA
// Hiding menus doesn't work for Athena, it can cause a crash.
gui_mch_menu_grey(menu, grey);
# else
// Never hide a toplevel menu, it may make the menubar resize or
// disappear. Same problem for ToolBar items.
if (vim_strchr(p_go, GO_GREY) != NULL || menu->parent == NULL
@@ -2086,7 +2079,6 @@ gui_update_menus_recurse(vimmenu_T *menu, int mode)
gui_mch_menu_grey(menu, grey);
else
gui_mch_menu_hidden(menu, grey);
# endif
gui_update_menus_recurse(menu->children, mode);
menu = menu->next;
}

View File

@@ -115,7 +115,7 @@ find_end_of_word(pos_T *pos)
}
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_TERM_POPUP_MENU)
# define USE_POPUP_SETPOS
@@ -539,7 +539,7 @@ do_mouse(
// menu on the button down event.
return FALSE;
# endif
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
if (is_click || is_drag)
// Ignore right button down and drag mouse events. Windows
// only shows the popup menu on the button up event.

View File

@@ -293,12 +293,6 @@ extern char_u *vimpty_getenv(const char_u *string); // in misc2.c
# include "gui_motif.pro"
# include "gui_xmdlg.pro"
# endif
# ifdef FEAT_GUI_ATHENA
# include "gui_athena.pro"
# ifdef FEAT_BROWSE
extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*show_entry)(), int x, int y, guicolor_T fg, guicolor_T bg, guicolor_T scroll_fg, guicolor_T scroll_bg);
# endif
# endif
# ifdef FEAT_GUI_HAIKU
# include "gui_haiku.pro"
# endif

View File

@@ -1,33 +0,0 @@
/* gui_athena.c */
void gui_x11_create_widgets(void);
void gui_x11_destroy_widgets(void);
void gui_mch_set_toolbar_pos(int x, int y, int w, int h);
void gui_mch_set_text_area_pos(int x, int y, int w, int h);
void gui_x11_set_back_color(void);
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, int idx);
void gui_mch_new_menu_font(void);
void gui_mch_new_tooltip_font(void);
void gui_mch_new_tooltip_colors(void);
void gui_mch_add_menu_item(vimmenu_T *menu, int idx);
void gui_mch_show_toolbar(int showit);
int gui_mch_compute_toolbar_height(void);
void gui_mch_get_toolbar_colors(Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp);
void gui_mch_toggle_tearoffs(int enable);
void gui_mch_new_menu_colors(void);
void gui_mch_destroy_menu(vimmenu_T *menu);
void gui_mch_show_popupmenu(vimmenu_T *menu);
void gui_mch_def_colors(void);
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_enable_scrollbar(scrollbar_T *sb, int flag);
void gui_mch_create_scrollbar(scrollbar_T *sb, int orient);
void gui_mch_destroy_scrollbar(scrollbar_T *sb);
void gui_mch_set_scrollbar_colors(scrollbar_T *sb);
Window gui_x11_get_wid(void);
char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
int gui_mch_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
/* vim: set ft=c : */

View File

@@ -4003,9 +4003,6 @@ struct VimMenu
char **xpm; // pixmap data
char *xpm_fname; // file with pixmap data
#endif
#ifdef FEAT_GUI_ATHENA
Pixmap image; // Toolbar image
#endif
#ifdef FEAT_BEVAL_TIP
BalloonEval *tip; // tooltip for this menu item
#endif

View File

@@ -1,6 +1,6 @@
" gvimrc for test_gui_init.vim
if has('gui_athena') || has('gui_motif') || has('gui_gtk2') || has('gui_gtk3')
if has('gui_motif') || has('gui_gtk2') || has('gui_gtk3')
set guiheadroom=0
set guioptions+=p
endif

View File

@@ -1,6 +1,6 @@
" Common preparations for running GUI tests.
let g:x11_based_gui = has('gui_athena') || has('gui_motif')
let g:x11_based_gui = has('gui_motif')
\ || has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3')
" Reasons for 'skipped'.

View File

@@ -63,8 +63,8 @@ func Test_client_server()
" the GUI and check that the remote command still works.
" Need to wait for the GUI to start up, otherwise the send hangs in trying
" to send to the terminal window.
if has('gui_athena') || has('gui_motif')
" For those GUIs, ignore the 'failed to create input context' error.
if has('gui_motif')
" For this GUI ignore the 'failed to create input context' error.
call remote_send(name, ":call test_ignore_error('E285') | gui -f\<CR>")
else
call remote_send(name, ":gui -f\<CR>")

View File

@@ -2094,7 +2094,7 @@ endfunc
func Test_edit_CTRL_hat()
CheckFeature xim
" FIXME: test fails with Athena and Motif GUI.
" FIXME: test fails with Motif GUI.
" test also fails when running in the GUI.
CheckFeature gui_gtk
CheckNotGui

View File

@@ -63,7 +63,7 @@ endfunc
func Test_getfontname_with_arg()
CheckX11BasedGui
if has('gui_athena') || has('gui_motif')
if has('gui_motif')
" Invalid font name. The result should be an empty string.
call assert_equal('', getfontname('notexist'))
@@ -90,7 +90,7 @@ func Test_getfontname_without_arg()
if has('gui_kde')
" 'expected' is the value specified by SetUp() above.
call assert_equal('Courier 10 Pitch/8/-1/5/50/0/0/0/0/0', fname)
elseif has('gui_athena') || has('gui_motif')
elseif has('gui_motif')
" 'expected' is DFLT_FONT of gui_x11.c or its real name.
let pat = '\(7x13\)\|\(\c-Misc-Fixed-Medium-R-Normal--13-120-75-75-C-70-ISO8859-1\)'
call assert_match(pat, fname)
@@ -376,7 +376,7 @@ func Test_set_guifont()
set guifontset=
endif
if has('gui_athena') || has('gui_motif')
if has('gui_motif')
" Non-empty font list with invalid font names.
"
" This test is twofold: (1) It checks if the command fails as expected
@@ -514,7 +514,7 @@ func Test_set_guifontwide()
let &guifontwide = guifontwide_saved
let &guifont = guifont_saved
elseif has('gui_athena') || has('gui_motif')
elseif has('gui_motif')
" guifontwide is premised upon the xfontset feature.
if !has('xfontset')
let skipped = g:not_supported . 'xfontset'
@@ -1280,8 +1280,6 @@ func TestGuiTabToolTip()
endfunc
func Test_gui_tablabel_tooltip()
CheckNotFeature gui_athena
%bw!
" Removing the tabline at the end of this test, reduces the window height by
" one. Save and restore it after the test.
@@ -1436,10 +1434,6 @@ endfunc
" Test for generating a GUI tabline event to select a tab page
func Test_gui_tabline_event()
if has('gui_athena')
throw 'Skipped: tabline is not supported in Athena GUI'
endif
%bw!
edit Xfile1
tabedit Xfile2
@@ -1467,9 +1461,6 @@ endfunc
" Test for generating a GUI tabline menu event to execute an action
func Test_gui_tabmenu_event()
if has('gui_athena')
throw 'Skipped: tabmenu is not supported in Athena GUI'
endif
%bw!
" Try to close the last tab page

View File

@@ -759,7 +759,7 @@ func Test_1_highlight_Normalgroup_exists()
elseif has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3')
" expect is DEFAULT_FONT of gui_gtk_x11.c
call assert_match('hi Normal\s*font=Monospace 10', hlNormal)
elseif has('gui_motif') || has('gui_athena')
elseif has('gui_motif')
" expect is DEFAULT_FONT of gui_x11.c
call assert_match('hi Normal\s*font=7x13', hlNormal)
elseif has('win32')

View File

@@ -98,7 +98,7 @@ func Do_test_quotestar_for_x11()
" Running in a terminal and the GUI is available: Tell the server to open
" the GUI and check that the remote command still works.
if has('gui_athena') || has('gui_motif')
if has('gui_motif')
" For those GUIs, ignore the 'failed to create input context' error.
call remote_send(name, ":call test_ignore_error('E285') | gui -f\<CR>")
else

View File

@@ -441,7 +441,7 @@ endfunction
" Test the -reverse and +reverse arguments (for GUI only).
func Test_reverse()
CheckCanRunGui
CheckAnyOf Feature:gui_gtk Feature:gui_motif Feature:gui_athena
CheckAnyOf Feature:gui_gtk Feature:gui_motif
let after =<< trim [CODE]
call writefile([&background], "Xtest_reverse")
@@ -462,7 +462,7 @@ endfunc
" Test the -background and -foreground arguments (for GUI only).
func Test_background_foreground()
CheckCanRunGui
CheckAnyOf Feature:gui_gtk Feature:gui_motif Feature:gui_athena
CheckAnyOf Feature:gui_gtk Feature:gui_motif
" Is there a better way to check the effect of -background & -foreground
" other than merely looking at &background (dark or light)?
@@ -489,7 +489,7 @@ func Test_font()
if has('gui_gtk')
let font = 'Courier 14'
elseif has('gui_motif') || has('gui_athena')
elseif has('gui_motif')
let font = '-misc-fixed-bold-*'
else
throw 'Skipped: test does not set a valid font for this GUI'
@@ -511,10 +511,10 @@ endfunc
" Test the -geometry argument (for GUI only).
func Test_geometry()
CheckCanRunGui
CheckAnyOf Feature:gui_gtk Feature:gui_motif Feature:gui_athena
CheckAnyOf Feature:gui_gtk Feature:gui_motif
if has('gui_motif') || has('gui_athena')
" FIXME: With GUI Athena or Motif, the value of getwinposx(),
if has('gui_motif')
" FIXME: With GUI Motif the value of getwinposx(),
" getwinposy() and getwinpos() do not match exactly the
" value given in -geometry. Why?
" So only check &columns and &lines for those GUIs.
@@ -550,7 +550,7 @@ endfunc
" Test the -iconic argument (for GUI only).
func Test_iconic()
CheckCanRunGui
CheckAnyOf Feature:gui_gtk Feature:gui_motif Feature:gui_athena
CheckAnyOf Feature:gui_gtk Feature:gui_motif
call RunVim([], [], '-f -g -iconic -cq')

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4677,
/**/
4676,
/**/
@@ -10454,13 +10456,6 @@ list_version(void)
# ifdef FEAT_GUI_MOTIF
msg_puts(_("with X11-Motif GUI."));
# else
# ifdef FEAT_GUI_ATHENA
# ifdef FEAT_GUI_NEXTAW
msg_puts(_("with X11-neXtaw GUI."));
# else
msg_puts(_("with X11-Athena GUI."));
# endif
# else
# ifdef FEAT_GUI_HAIKU
msg_puts(_("with Haiku GUI."));
# else
@@ -10474,7 +10469,6 @@ list_version(void)
# endif
# endif
# endif
# endif
#endif
version_msg(_(" Features included (+) or not (-):\n"));

View File

@@ -116,7 +116,6 @@
#if defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_HAIKU) \
|| defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON)
@@ -190,9 +189,6 @@
# ifdef FEAT_GUI_MOTIF
# undef FEAT_GUI_MOTIF
# endif
# ifdef FEAT_GUI_ATHENA
# undef FEAT_GUI_ATHENA
# endif
# ifdef FEAT_GUI_GTK
# undef FEAT_GUI_GTK
# endif