diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-26 05:38:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-26 05:38:18 +0200 |
commit | 0eda7ac7f897433c9d346743bf38fcd291673070 (patch) | |
tree | 90a05f07c0c73e33b1097fab8f73d57a019027df /src/gui.c | |
parent | 51f53dfe17617792a0275b19f27b50f98b0db764 (diff) | |
download | vim-0eda7ac7f897433c9d346743bf38fcd291673070.zip |
Change remaining HAVE_GTK2 to FEAT_GUI_GTK.
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -13,14 +13,14 @@ /* Structure containing all the GUI information */ 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)); #endif static void gui_check_pos __ARGS((void)); static void gui_position_components __ARGS((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)); -#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)); #endif static void gui_delete_lines __ARGS((int row, int count)); @@ -250,7 +250,7 @@ gui_init_check() gui.border_width = 0; gui.norm_font = NOFONT; -#ifndef HAVE_GTK2 +#ifndef FEAT_GUI_GTK gui.bold_font = NOFONT; gui.ital_font = NOFONT; gui.boldital_font = NOFONT; @@ -260,7 +260,7 @@ gui_init_check() #endif #ifdef FEAT_MENU -# ifndef HAVE_GTK2 +# ifndef FEAT_GUI_GTK # ifdef FONTSET_ALWAYS gui.menu_fontset = NOFONTSET; # else @@ -709,7 +709,7 @@ gui_init_font(font_list, fontset) * longer be used! */ 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 * similar double-width font. */ if ((p_guifontwide == NULL || *p_guifontwide == NUL) @@ -736,7 +736,7 @@ gui_init_font(font_list, fontset) if (ret == OK) { -#ifndef HAVE_GTK2 +#ifndef FEAT_GUI_GTK /* Set normal font as current font */ # ifdef FEAT_XFONTSET if (gui.fontset != NOFONTSET) @@ -758,7 +758,7 @@ gui_init_font(font_list, fontset) } #if defined(FEAT_MBYTE) || defined(PROTO) -# ifndef HAVE_GTK2 +# ifndef FEAT_GUI_GTK /* * 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'. @@ -837,7 +837,7 @@ gui_get_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'. */ if (font != NOFONT && gui.norm_font != NOFONT && pango_font_description_equal(font, gui.norm_font)) @@ -954,7 +954,7 @@ gui_update_cursor(force, clear_selection) guicolor_T fg, bg; if ( -# if defined(HAVE_GTK2) && !defined(FEAT_HANGULIN) +# if defined(FEAT_GUI_GTK) && !defined(FEAT_HANGULIN) preedit_get_status() # else im_get_status() @@ -1183,7 +1183,7 @@ gui_position_components(total_width) text_area_y, text_area_width, text_area_height -#if defined(FEAT_XIM) && !defined(HAVE_GTK2) +#if defined(FEAT_XIM) && !defined(FEAT_GUI_GTK) + xim_get_status_area_height() #endif ); @@ -1314,7 +1314,7 @@ again: gui_update_scrollbars(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(); #endif @@ -1381,7 +1381,7 @@ gui_set_shellsize(mustset, fit_to_display, direction) int min_height; int screen_w; int screen_h; -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK int un_maximize = mustset; int did_adjust = 0; #endif @@ -1429,7 +1429,7 @@ gui_set_shellsize(mustset, fit_to_display, direction) if (Columns < MIN_COLUMNS) Columns = MIN_COLUMNS; width = Columns * gui.char_width + base_width; -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK ++did_adjust; #endif } @@ -1438,11 +1438,11 @@ gui_set_shellsize(mustset, fit_to_display, direction) Rows = (screen_h - base_height) / gui.char_height; check_shellsize(); height = Rows * gui.char_height + base_height; -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK ++did_adjust; #endif } -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK if (did_adjust == 2 || (width + gui.char_width >= screen_w && height + gui.char_height >= screen_h)) /* 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; #endif -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK if (un_maximize) { /* If the window size is smaller than the screen unmaximize the @@ -1918,7 +1918,7 @@ gui_screenchar(off, flags, fg, bg, back) #endif } -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK /* * Output the string at the given screen position. This is used in place * 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); } } -#endif /* HAVE_GTK2 */ +#endif /* FEAT_GUI_GTK */ /* * 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 bg_color; guicolor_T sp_color; -#if !defined(MSWIN16_FASTTEXT) && !defined(HAVE_GTK2) +#if !defined(MSWIN16_FASTTEXT) && !defined(FEAT_GUI_GTK) GuiFont font = NOFONT; # ifdef FEAT_XFONTSET GuiFontset fontset = NOFONTSET; @@ -2074,7 +2074,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) highlight_mask = gui.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 */ if (aep != NULL && aep->ae_u.gui.font != NOFONT) 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))) return FAIL; -#if defined(RISCOS) || defined(HAVE_GTK2) +#if defined(RISCOS) || defined(FEAT_GUI_GTK) /* If there's no italic font, then fake it. * For GTK2, we don't need a different font for italic style. */ if (hl_mask_todo & HL_ITALIC) @@ -2217,7 +2217,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) /* * Draw the text. */ -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK /* The value returned is the length in display cells */ len = gui_gtk2_draw_string(gui.row, col, s, len, draw_flags); #else @@ -2340,7 +2340,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) } # endif } -#endif /* !HAVE_GTK2 */ +#endif /* !FEAT_GUI_GTK */ if (!(flags & (GUI_MON_IS_CURSOR | GUI_MON_TRS_CURSOR))) gui.col = col + len; @@ -2499,7 +2499,7 @@ gui_redraw_block(row1, col1, row2, col2, flags) { if (ScreenLines[off + col1] == 0) --col1; -# ifdef HAVE_GTK2 +# ifdef FEAT_GUI_GTK if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0) ++col2; # endif @@ -2524,7 +2524,7 @@ gui_redraw_block(row1, col1, row2, col2, flags) { first_attr = ScreenAttrs[off]; 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) { /* output multi-byte character separately */ @@ -2545,7 +2545,7 @@ gui_redraw_block(row1, col1, row2, col2, flags) else #endif { -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK for (idx = 0; idx < len; ++idx) { 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 * 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; #endif } @@ -3739,7 +3739,7 @@ gui_drag_scrollbar(sb, value, still_dragging) else { gui.dragged_sb = SBAR_NONE; -#ifdef HAVE_GTK2 +#ifdef FEAT_GUI_GTK /* Keep the "dragged_wp" value until after the scrolling, for when the * moust button is released. GTK2 doesn't send the button-up event. */ gui.dragged_wp = NULL; @@ -4832,7 +4832,7 @@ gui_find_bitmap(name, buffer, ext) 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 * icon. If it is an absolute path name, use it as it is. Otherwise append |