0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

Change remaining HAVE_GTK2 to FEAT_GUI_GTK.

This commit is contained in:
Bram Moolenaar 2010-06-26 05:38:18 +02:00
parent 51f53dfe17
commit 0eda7ac7f8
13 changed files with 53 additions and 59 deletions

2
src/auto/configure vendored
View File

@ -7397,8 +7397,6 @@ $as_echo "no" >&6; }
fi fi
fi fi
if test "x$GUITYPE" = "xGTK"; then if test "x$GUITYPE" = "xGTK"; then
$as_echo "#define HAVE_GTK2 1" >>confdefs.h
if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
|| test "0$gtk_minor_version" -ge 2; then || test "0$gtk_minor_version" -ge 2; then
$as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h $as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h

View File

@ -366,9 +366,6 @@
/* Define if you use KDE and want KDE Toolbar support. */ /* Define if you use KDE and want KDE Toolbar support. */
#undef FEAT_KDETOOLBAR #undef FEAT_KDETOOLBAR
/* Define if GTK+ 2 is available. */
#undef HAVE_GTK2
/* Define if GTK+ multihead support is available (requires GTK+ >= 2.1.1). */ /* Define if GTK+ multihead support is available (requires GTK+ >= 2.1.1). */
#undef HAVE_GTK_MULTIHEAD #undef HAVE_GTK_MULTIHEAD

View File

@ -1671,7 +1671,6 @@ if test -z "$SKIP_GTK2"; then
fi fi
fi fi
if test "x$GUITYPE" = "xGTK"; then if test "x$GUITYPE" = "xGTK"; then
AC_DEFINE(HAVE_GTK2)
if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
|| test "0$gtk_minor_version" -ge 2; then || test "0$gtk_minor_version" -ge 2; then
AC_DEFINE(HAVE_GTK_MULTIHEAD) AC_DEFINE(HAVE_GTK_MULTIHEAD)

View File

@ -640,7 +640,7 @@
* Disabled for EBCDIC: * Disabled for EBCDIC:
* Multibyte support doesn't work on z/OS Unix currently. * Multibyte support doesn't work on z/OS Unix currently.
*/ */
#if (defined(FEAT_BIG) || defined(HAVE_GTK2) || defined(FEAT_ARABIC)) \ #if (defined(FEAT_BIG) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC)) \
&& !defined(FEAT_MBYTE) && !defined(WIN16) \ && !defined(FEAT_MBYTE) && !defined(WIN16) \
&& SIZEOF_INT >= 4 && !defined(EBCDIC) && SIZEOF_INT >= 4 && !defined(EBCDIC)
# define FEAT_MBYTE # define FEAT_MBYTE
@ -693,7 +693,7 @@
# define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed, # define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed,
* turn to english mode * turn to english mode
*/ */
# if !defined(FEAT_XFONTSET) && defined(HAVE_X11) && !defined(HAVE_GTK2) # if !defined(FEAT_XFONTSET) && defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
# define FEAT_XFONTSET /* Hangul input requires xfontset */ # define FEAT_XFONTSET /* Hangul input requires xfontset */
# endif # endif
# if defined(FEAT_XIM) && !defined(LINT) # if defined(FEAT_XIM) && !defined(LINT)
@ -710,7 +710,7 @@
* +xfontset X fontset support. For outputting wide characters. * +xfontset X fontset support. For outputting wide characters.
*/ */
#ifndef FEAT_XFONTSET #ifndef FEAT_XFONTSET
# if defined(FEAT_MBYTE) && defined(HAVE_X11) && !defined(HAVE_GTK2) # if defined(FEAT_MBYTE) && defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
# define FEAT_XFONTSET # define FEAT_XFONTSET
# else # else
/* # define FEAT_XFONTSET */ /* # define FEAT_XFONTSET */

View File

@ -1605,7 +1605,7 @@ vgetc()
continue; continue;
} }
#endif #endif
#if defined(FEAT_GUI) && defined(HAVE_GTK2) && defined(FEAT_MENU) #if defined(FEAT_GUI) && defined(FEAT_GUI_GTK) && defined(FEAT_MENU)
/* GTK: <F10> normally selects the menu, but it's passed until /* GTK: <F10> normally selects the menu, but it's passed until
* here to allow mapping it. Intercept and invoke the GTK * here to allow mapping it. Intercept and invoke the GTK
* behavior if it's not mapped. */ * behavior if it's not mapped. */

View File

@ -1396,7 +1396,7 @@ EXTERN char_u e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN)
EXTERN char_u e_font[] INIT(= N_("E235: Unknown font: %s")); EXTERN char_u e_font[] INIT(= N_("E235: Unknown font: %s"));
#endif #endif
#if defined(FEAT_GUI_X11) && !defined(HAVE_GTK2) #if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK)
EXTERN char_u e_fontwidth[] INIT(= N_("E236: Font \"%s\" is not fixed-width")); EXTERN char_u e_fontwidth[] INIT(= N_("E236: Font \"%s\" is not fixed-width"));
#endif #endif
EXTERN char_u e_internal[] INIT(= N_("E473: Internal error")); EXTERN char_u e_internal[] INIT(= N_("E473: Internal error"));
@ -1508,7 +1508,7 @@ EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"
#endif #endif
EXTERN char_u e_scroll[] INIT(= N_("E49: Invalid scroll size")); EXTERN char_u e_scroll[] INIT(= N_("E49: Invalid scroll size"));
EXTERN char_u e_shellempty[] INIT(= N_("E91: 'shell' option is empty")); EXTERN char_u e_shellempty[] INIT(= N_("E91: 'shell' option is empty"));
#if defined(FEAT_SIGN_ICONS) && !defined(HAVE_GTK2) #if defined(FEAT_SIGN_ICONS) && !defined(FEAT_GUI_GTK)
EXTERN char_u e_signdata[] INIT(= N_("E255: Couldn't read in sign data!")); EXTERN char_u e_signdata[] INIT(= N_("E255: Couldn't read in sign data!"));
#endif #endif
EXTERN char_u e_swapclose[] INIT(= N_("E72: Close error on swap file")); EXTERN char_u e_swapclose[] INIT(= N_("E72: Close error on swap file"));

View File

@ -13,14 +13,14 @@
/* Structure containing all the GUI information */ /* Structure containing all the GUI information */
gui_T gui; gui_T gui;
#if defined(FEAT_MBYTE) && !defined(HAVE_GTK2) #if defined(FEAT_MBYTE) && !defined(FEAT_GUI_GTK)
static void set_guifontwide __ARGS((char_u *font_name)); static void set_guifontwide __ARGS((char_u *font_name));
#endif #endif
static void gui_check_pos __ARGS((void)); static void gui_check_pos __ARGS((void));
static void gui_position_components __ARGS((int)); static void gui_position_components __ARGS((int));
static void gui_outstr __ARGS((char_u *, int)); static void gui_outstr __ARGS((char_u *, int));
static int gui_screenchar __ARGS((int off, int flags, guicolor_T fg, guicolor_T bg, int back)); static int gui_screenchar __ARGS((int off, int flags, guicolor_T fg, guicolor_T bg, int back));
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
static int gui_screenstr __ARGS((int off, int len, int flags, guicolor_T fg, guicolor_T bg, int back)); static int gui_screenstr __ARGS((int off, int len, int flags, guicolor_T fg, guicolor_T bg, int back));
#endif #endif
static void gui_delete_lines __ARGS((int row, int count)); static void gui_delete_lines __ARGS((int row, int count));
@ -250,7 +250,7 @@ gui_init_check()
gui.border_width = 0; gui.border_width = 0;
gui.norm_font = NOFONT; gui.norm_font = NOFONT;
#ifndef HAVE_GTK2 #ifndef FEAT_GUI_GTK
gui.bold_font = NOFONT; gui.bold_font = NOFONT;
gui.ital_font = NOFONT; gui.ital_font = NOFONT;
gui.boldital_font = NOFONT; gui.boldital_font = NOFONT;
@ -260,7 +260,7 @@ gui_init_check()
#endif #endif
#ifdef FEAT_MENU #ifdef FEAT_MENU
# ifndef HAVE_GTK2 # ifndef FEAT_GUI_GTK
# ifdef FONTSET_ALWAYS # ifdef FONTSET_ALWAYS
gui.menu_fontset = NOFONTSET; gui.menu_fontset = NOFONTSET;
# else # else
@ -709,7 +709,7 @@ gui_init_font(font_list, fontset)
* longer be used! */ * longer be used! */
if (gui_mch_init_font(font_name, FALSE) == OK) if (gui_mch_init_font(font_name, FALSE) == OK)
{ {
#if defined(FEAT_MBYTE) && !defined(HAVE_GTK2) #if defined(FEAT_MBYTE) && !defined(FEAT_GUI_GTK)
/* If it's a Unicode font, try setting 'guifontwide' to a /* If it's a Unicode font, try setting 'guifontwide' to a
* similar double-width font. */ * similar double-width font. */
if ((p_guifontwide == NULL || *p_guifontwide == NUL) if ((p_guifontwide == NULL || *p_guifontwide == NUL)
@ -736,7 +736,7 @@ gui_init_font(font_list, fontset)
if (ret == OK) if (ret == OK)
{ {
#ifndef HAVE_GTK2 #ifndef FEAT_GUI_GTK
/* Set normal font as current font */ /* Set normal font as current font */
# ifdef FEAT_XFONTSET # ifdef FEAT_XFONTSET
if (gui.fontset != NOFONTSET) if (gui.fontset != NOFONTSET)
@ -758,7 +758,7 @@ gui_init_font(font_list, fontset)
} }
#if defined(FEAT_MBYTE) || defined(PROTO) #if defined(FEAT_MBYTE) || defined(PROTO)
# ifndef HAVE_GTK2 # ifndef FEAT_GUI_GTK
/* /*
* Try setting 'guifontwide' to a font twice as wide as "name". * Try setting 'guifontwide' to a font twice as wide as "name".
*/ */
@ -806,7 +806,7 @@ set_guifontwide(name)
} }
} }
} }
# endif /* !HAVE_GTK2 */ # endif /* !FEAT_GUI_GTK */
/* /*
* Get the font for 'guifontwide'. * Get the font for 'guifontwide'.
@ -837,7 +837,7 @@ gui_get_wide_font()
} }
gui_mch_free_font(gui.wide_font); gui_mch_free_font(gui.wide_font);
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
/* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */ /* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */
if (font != NOFONT && gui.norm_font != NOFONT if (font != NOFONT && gui.norm_font != NOFONT
&& pango_font_description_equal(font, gui.norm_font)) && pango_font_description_equal(font, gui.norm_font))
@ -954,7 +954,7 @@ gui_update_cursor(force, clear_selection)
guicolor_T fg, bg; guicolor_T fg, bg;
if ( if (
# if defined(HAVE_GTK2) && !defined(FEAT_HANGULIN) # if defined(FEAT_GUI_GTK) && !defined(FEAT_HANGULIN)
preedit_get_status() preedit_get_status()
# else # else
im_get_status() im_get_status()
@ -1183,7 +1183,7 @@ gui_position_components(total_width)
text_area_y, text_area_y,
text_area_width, text_area_width,
text_area_height text_area_height
#if defined(FEAT_XIM) && !defined(HAVE_GTK2) #if defined(FEAT_XIM) && !defined(FEAT_GUI_GTK)
+ xim_get_status_area_height() + xim_get_status_area_height()
#endif #endif
); );
@ -1314,7 +1314,7 @@ again:
gui_update_scrollbars(TRUE); gui_update_scrollbars(TRUE);
gui_update_cursor(FALSE, TRUE); gui_update_cursor(FALSE, TRUE);
#if defined(FEAT_XIM) && !defined(HAVE_GTK2) #if defined(FEAT_XIM) && !defined(FEAT_GUI_GTK)
xim_set_status_area(); xim_set_status_area();
#endif #endif
@ -1381,7 +1381,7 @@ gui_set_shellsize(mustset, fit_to_display, direction)
int min_height; int min_height;
int screen_w; int screen_w;
int screen_h; int screen_h;
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
int un_maximize = mustset; int un_maximize = mustset;
int did_adjust = 0; int did_adjust = 0;
#endif #endif
@ -1429,7 +1429,7 @@ gui_set_shellsize(mustset, fit_to_display, direction)
if (Columns < MIN_COLUMNS) if (Columns < MIN_COLUMNS)
Columns = MIN_COLUMNS; Columns = MIN_COLUMNS;
width = Columns * gui.char_width + base_width; width = Columns * gui.char_width + base_width;
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
++did_adjust; ++did_adjust;
#endif #endif
} }
@ -1438,11 +1438,11 @@ gui_set_shellsize(mustset, fit_to_display, direction)
Rows = (screen_h - base_height) / gui.char_height; Rows = (screen_h - base_height) / gui.char_height;
check_shellsize(); check_shellsize();
height = Rows * gui.char_height + base_height; height = Rows * gui.char_height + base_height;
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
++did_adjust; ++did_adjust;
#endif #endif
} }
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
if (did_adjust == 2 || (width + gui.char_width >= screen_w if (did_adjust == 2 || (width + gui.char_width >= screen_w
&& height + gui.char_height >= screen_h)) && height + gui.char_height >= screen_h))
/* don't unmaximize if at maximum size */ /* don't unmaximize if at maximum size */
@ -1458,7 +1458,7 @@ gui_set_shellsize(mustset, fit_to_display, direction)
min_height += tabline_height() * gui.char_height; min_height += tabline_height() * gui.char_height;
#endif #endif
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
if (un_maximize) if (un_maximize)
{ {
/* If the window size is smaller than the screen unmaximize the /* If the window size is smaller than the screen unmaximize the
@ -1918,7 +1918,7 @@ gui_screenchar(off, flags, fg, bg, back)
#endif #endif
} }
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
/* /*
* Output the string at the given screen position. This is used in place * Output the string at the given screen position. This is used in place
* of gui_screenchar() where possible because Pango needs as much context * of gui_screenchar() where possible because Pango needs as much context
@ -1992,7 +1992,7 @@ gui_screenstr(off, len, flags, fg, bg, back)
flags, fg, bg, back); flags, fg, bg, back);
} }
} }
#endif /* HAVE_GTK2 */ #endif /* FEAT_GUI_GTK */
/* /*
* Output the given string at the current cursor position. If the string is * Output the given string at the current cursor position. If the string is
@ -2020,7 +2020,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
guicolor_T fg_color; guicolor_T fg_color;
guicolor_T bg_color; guicolor_T bg_color;
guicolor_T sp_color; guicolor_T sp_color;
#if !defined(MSWIN16_FASTTEXT) && !defined(HAVE_GTK2) #if !defined(MSWIN16_FASTTEXT) && !defined(FEAT_GUI_GTK)
GuiFont font = NOFONT; GuiFont font = NOFONT;
# ifdef FEAT_XFONTSET # ifdef FEAT_XFONTSET
GuiFontset fontset = NOFONTSET; GuiFontset fontset = NOFONTSET;
@ -2074,7 +2074,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
highlight_mask = gui.highlight_mask; highlight_mask = gui.highlight_mask;
hl_mask_todo = highlight_mask; hl_mask_todo = highlight_mask;
#if !defined(MSWIN16_FASTTEXT) && !defined(HAVE_GTK2) #if !defined(MSWIN16_FASTTEXT) && !defined(FEAT_GUI_GTK)
/* Set the font */ /* Set the font */
if (aep != NULL && aep->ae_u.gui.font != NOFONT) if (aep != NULL && aep->ae_u.gui.font != NOFONT)
font = aep->ae_u.gui.font; font = aep->ae_u.gui.font;
@ -2188,7 +2188,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC)))
return FAIL; return FAIL;
#if defined(RISCOS) || defined(HAVE_GTK2) #if defined(RISCOS) || defined(FEAT_GUI_GTK)
/* If there's no italic font, then fake it. /* If there's no italic font, then fake it.
* For GTK2, we don't need a different font for italic style. */ * For GTK2, we don't need a different font for italic style. */
if (hl_mask_todo & HL_ITALIC) if (hl_mask_todo & HL_ITALIC)
@ -2217,7 +2217,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
/* /*
* Draw the text. * Draw the text.
*/ */
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
/* The value returned is the length in display cells */ /* The value returned is the length in display cells */
len = gui_gtk2_draw_string(gui.row, col, s, len, draw_flags); len = gui_gtk2_draw_string(gui.row, col, s, len, draw_flags);
#else #else
@ -2340,7 +2340,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
} }
# endif # endif
} }
#endif /* !HAVE_GTK2 */ #endif /* !FEAT_GUI_GTK */
if (!(flags & (GUI_MON_IS_CURSOR | GUI_MON_TRS_CURSOR))) if (!(flags & (GUI_MON_IS_CURSOR | GUI_MON_TRS_CURSOR)))
gui.col = col + len; gui.col = col + len;
@ -2499,7 +2499,7 @@ gui_redraw_block(row1, col1, row2, col2, flags)
{ {
if (ScreenLines[off + col1] == 0) if (ScreenLines[off + col1] == 0)
--col1; --col1;
# ifdef HAVE_GTK2 # ifdef FEAT_GUI_GTK
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0) if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
++col2; ++col2;
# endif # endif
@ -2524,7 +2524,7 @@ gui_redraw_block(row1, col1, row2, col2, flags)
{ {
first_attr = ScreenAttrs[off]; first_attr = ScreenAttrs[off];
gui.highlight_mask = first_attr; gui.highlight_mask = first_attr;
#if defined(FEAT_MBYTE) && !defined(HAVE_GTK2) #if defined(FEAT_MBYTE) && !defined(FEAT_GUI_GTK)
if (enc_utf8 && ScreenLinesUC[off] != 0) if (enc_utf8 && ScreenLinesUC[off] != 0)
{ {
/* output multi-byte character separately */ /* output multi-byte character separately */
@ -2545,7 +2545,7 @@ gui_redraw_block(row1, col1, row2, col2, flags)
else else
#endif #endif
{ {
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
for (idx = 0; idx < len; ++idx) for (idx = 0; idx < len; ++idx)
{ {
if (enc_utf8 && ScreenLines[off + idx] == 0) if (enc_utf8 && ScreenLines[off + idx] == 0)
@ -3089,7 +3089,7 @@ button_set:
* We need to make sure this is cleared since Athena doesn't tell us when * 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. * he is done dragging. Neither does GTK+ 2 -- at least for now.
*/ */
#if defined(FEAT_GUI_ATHENA) || defined(HAVE_GTK2) #if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK)
gui.dragged_sb = SBAR_NONE; gui.dragged_sb = SBAR_NONE;
#endif #endif
} }
@ -3739,7 +3739,7 @@ gui_drag_scrollbar(sb, value, still_dragging)
else else
{ {
gui.dragged_sb = SBAR_NONE; gui.dragged_sb = SBAR_NONE;
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
/* Keep the "dragged_wp" value until after the scrolling, for when the /* Keep the "dragged_wp" value until after the scrolling, for when the
* moust button is released. GTK2 doesn't send the button-up event. */ * moust button is released. GTK2 doesn't send the button-up event. */
gui.dragged_wp = NULL; gui.dragged_wp = NULL;
@ -4832,7 +4832,7 @@ gui_find_bitmap(name, buffer, ext)
return OK; return OK;
} }
# if !defined(HAVE_GTK2) || defined(PROTO) # if !defined(FEAT_GUI_GTK) || defined(PROTO)
/* /*
* Given the name of the "icon=" argument, try finding the bitmap file for the * Given the name of the "icon=" argument, try finding the bitmap file for the
* icon. If it is an absolute path name, use it as it is. Otherwise append * icon. If it is an absolute path name, use it as it is. Otherwise append

View File

@ -75,7 +75,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(HAVE_GTK2) #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK)
# define USE_ON_FLY_SCROLL # define USE_ON_FLY_SCROLL
#endif #endif
@ -151,7 +151,7 @@
#define DRAW_BOLD 0x02 /* draw bold text */ #define DRAW_BOLD 0x02 /* draw bold text */
#define DRAW_UNDERL 0x04 /* draw underline text */ #define DRAW_UNDERL 0x04 /* draw underline text */
#define DRAW_UNDERC 0x08 /* draw undercurl text */ #define DRAW_UNDERC 0x08 /* draw undercurl text */
#if defined(RISCOS) || defined(HAVE_GTK2) #if defined(RISCOS) || defined(FEAT_GUI_GTK)
# define DRAW_ITALIC 0x10 /* draw italic text */ # define DRAW_ITALIC 0x10 /* draw italic text */
#endif #endif
#define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */
@ -310,7 +310,7 @@ typedef struct Gui
int border_offset; /* Total pixel offset for all borders */ int border_offset; /* Total pixel offset for all borders */
GuiFont norm_font; /* Normal font */ GuiFont norm_font; /* Normal font */
#ifndef HAVE_GTK2 #ifndef FEAT_GUI_GTK
GuiFont bold_font; /* Bold font */ GuiFont bold_font; /* Bold font */
GuiFont ital_font; /* Italic font */ GuiFont ital_font; /* Italic font */
GuiFont boldital_font; /* Bold-Italic font */ GuiFont boldital_font; /* Bold-Italic font */
@ -319,7 +319,7 @@ typedef struct Gui
* The styled font variants are not used. */ * The styled font variants are not used. */
#endif #endif
#if defined(FEAT_MENU) && !defined(HAVE_GTK2) #if defined(FEAT_MENU) && !defined(FEAT_GUI_GTK)
# ifdef FONTSET_ALWAYS # ifdef FONTSET_ALWAYS
GuiFontset menu_fontset; /* set of fonts for multi-byte chars */ GuiFontset menu_fontset; /* set of fonts for multi-byte chars */
# else # else
@ -508,7 +508,7 @@ typedef enum
# define FRD_MATCH_CASE 0x10 /* match case */ # define FRD_MATCH_CASE 0x10 /* match case */
#endif #endif
#ifdef HAVE_GTK2 #ifdef FEAT_GUI_GTK
/* /*
* Convenience macros to convert from 'encoding' to 'termencoding' and * Convenience macros to convert from 'encoding' to 'termencoding' and
* vice versa. If no conversion is necessary the passed-in pointer is * vice versa. If no conversion is necessary the passed-in pointer is
@ -549,4 +549,4 @@ typedef enum
# define CONVERT_TO_UTF8_FREE(String) ((String) = (char_u *)NULL) # define CONVERT_TO_UTF8_FREE(String) ((String) = (char_u *)NULL)
# define CONVERT_FROM_UTF8(String) (String) # define CONVERT_FROM_UTF8(String) (String)
# define CONVERT_FROM_UTF8_FREE(String) ((String) = (char_u *)NULL) # define CONVERT_FROM_UTF8_FREE(String) ((String) = (char_u *)NULL)
#endif /* HAVE_GTK2 */ #endif /* FEAT_GUI_GTK */

View File

@ -3482,7 +3482,7 @@ theend:
convert_setup(&vimconv, NULL, NULL); convert_setup(&vimconv, NULL, NULL);
} }
#if defined(HAVE_GTK2) || defined(PROTO) #if defined(FEAT_GUI_GTK) || defined(PROTO)
/* /*
* Return TRUE if string "s" is a valid utf-8 string. * Return TRUE if string "s" is a valid utf-8 string.
* When "end" is NULL stop at the first NUL. * When "end" is NULL stop at the first NUL.
@ -4223,7 +4223,7 @@ init_preedit_start_col(void)
} }
# endif # endif
# if defined(HAVE_GTK2) && !defined(PROTO) # if defined(FEAT_GUI_GTK) && !defined(PROTO)
static int im_is_active = FALSE; /* IM is enabled for current mode */ static int im_is_active = FALSE; /* IM is enabled for current mode */
static int preedit_is_active = FALSE; static int preedit_is_active = FALSE;
@ -5058,7 +5058,7 @@ im_get_status(void)
return im_is_active; return im_is_active;
} }
# else /* !HAVE_GTK2 */ # else /* !FEAT_GUI_GTK */
static int xim_is_active = FALSE; /* XIM should be active in the current static int xim_is_active = FALSE; /* XIM should be active in the current
mode */ mode */
@ -5627,9 +5627,9 @@ im_get_status()
return xim_has_focus; return xim_has_focus;
} }
# endif /* !HAVE_GTK2 */ # endif /* !FEAT_GUI_GTK */
# if defined(HAVE_GTK2) || defined(PROTO) # if defined(FEAT_GUI_GTK) || defined(PROTO)
int int
preedit_get_status(void) preedit_get_status(void)
{ {

View File

@ -3778,7 +3778,7 @@ do_browse(flags, title, dflt, ext, initdir, filter, buf)
filter = BROWSE_FILTER_DEFAULT; filter = BROWSE_FILTER_DEFAULT;
if (flags & BROWSE_DIR) if (flags & BROWSE_DIR)
{ {
# if defined(HAVE_GTK2) || defined(WIN3264) # if defined(FEAT_GUI_GTK) || defined(WIN3264)
/* For systems that have a directory dialog. */ /* For systems that have a directory dialog. */
fname = gui_mch_browsedir(title, initdir); fname = gui_mch_browsedir(title, initdir);
# else # else
@ -3786,7 +3786,7 @@ do_browse(flags, title, dflt, ext, initdir, filter, buf)
* remove the file name. */ * remove the file name. */
fname = gui_mch_browse(0, title, dflt, ext, initdir, (char_u *)""); fname = gui_mch_browse(0, title, dflt, ext, initdir, (char_u *)"");
# endif # endif
# if !defined(HAVE_GTK2) # if !defined(FEAT_GUI_GTK)
/* Win32 adds a dummy file name, others return an arbitrary file /* Win32 adds a dummy file name, others return an arbitrary file
* name. GTK+ 2 returns only the directory, */ * name. GTK+ 2 returns only the directory, */
if (fname != NULL && *fname != NUL && !mch_isdir(fname)) if (fname != NULL && *fname != NUL && !mch_isdir(fname))

View File

@ -2991,7 +2991,7 @@ mch_free_mem()
} }
# endif # endif
# endif # endif
# if defined(FEAT_X11) && (!defined(FEAT_GUI_GTK) || defined(HAVE_GTK2)) # if defined(FEAT_X11)
if (x11_display != NULL if (x11_display != NULL
# ifdef FEAT_XCLIPBOARD # ifdef FEAT_XCLIPBOARD
&& x11_display != xterm_dpy && x11_display != xterm_dpy

View File

@ -9298,14 +9298,14 @@ showmode()
&& curbuf->b_p_iminsert == B_IMODE_IM) && curbuf->b_p_iminsert == B_IMODE_IM)
# else # else
if ( if (
# ifdef HAVE_GTK2 # ifdef FEAT_GUI_GTK
preedit_get_status() preedit_get_status()
# else # else
im_get_status() im_get_status()
# endif # endif
) )
# endif # endif
# ifdef HAVE_GTK2 /* most of the time, it's not XIM being used */ # ifdef FEAT_GUI_GTK /* most of the time, it's not XIM being used */
MSG_PUTS_ATTR(" IM", attr); MSG_PUTS_ATTR(" IM", attr);
# else # else
MSG_PUTS_ATTR(" XIM", attr); MSG_PUTS_ATTR(" XIM", attr);

View File

@ -9430,7 +9430,7 @@ free_highlight_fonts()
# ifdef FEAT_XFONTSET # ifdef FEAT_XFONTSET
gui_mch_free_fontset(gui.fontset); gui_mch_free_fontset(gui.fontset);
# endif # endif
# ifndef HAVE_GTK2 # ifndef FEAT_GUI_GTK
gui_mch_free_font(gui.bold_font); gui_mch_free_font(gui.bold_font);
gui_mch_free_font(gui.ital_font); gui_mch_free_font(gui.ital_font);
gui_mch_free_font(gui.boldital_font); gui_mch_free_font(gui.boldital_font);