forked from aniani/vim
updated for version 7.0f01
This commit is contained in:
@@ -1046,8 +1046,16 @@ proto.h: \
|
||||
proto/window.pro \
|
||||
$(NETBEANS_PRO)
|
||||
|
||||
.cod.c:
|
||||
$(CC) $(CFLAGS) /FAc $<
|
||||
.SUFFIXES: .cod
|
||||
|
||||
# Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
|
||||
# foo.cod"
|
||||
.c.cod:
|
||||
$(CC) $(CFLAGS) /FAcs $<
|
||||
|
||||
# Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
|
||||
.c.i:
|
||||
$(CC) $(CFLAGS) /P /C $<
|
||||
|
||||
|
||||
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
|
||||
|
||||
@@ -1160,7 +1160,7 @@ gui_position_components(total_width)
|
||||
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MOTIF))
|
||||
if (gui_has_tabline())
|
||||
text_area_y += TABLINE_HEIGHT;
|
||||
text_area_y += gui.tabline_height;
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
|
||||
@@ -1247,7 +1247,7 @@ gui_get_base_height()
|
||||
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MOTIF))
|
||||
if (gui_has_tabline())
|
||||
base_height += TABLINE_HEIGHT;
|
||||
base_height += gui.tabline_height;
|
||||
# endif
|
||||
# ifdef FEAT_FOOTER
|
||||
if (vim_strchr(p_go, GO_FOOTER) != NULL)
|
||||
@@ -3992,7 +3992,7 @@ gui_update_scrollbars(force)
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN)
|
||||
if (gui_has_tabline())
|
||||
y += TABLINE_HEIGHT;
|
||||
y += gui.tabline_height;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
|
||||
@@ -412,6 +412,11 @@ typedef struct Gui
|
||||
char_u *browse_fname; /* file name from filedlg */
|
||||
#endif /* FEAT_GUI_GTK */
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) \
|
||||
&& (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF))
|
||||
int tabline_height;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_FOOTER
|
||||
int footer_height; /* height of the message footer */
|
||||
#endif
|
||||
|
||||
@@ -493,6 +493,8 @@ gui_x11_create_widgets()
|
||||
XtAddEventHandler(tabLine, ButtonPressMask, False,
|
||||
(XtEventHandler)tabline_menu_cb, NULL);
|
||||
|
||||
gui.tabline_height = TABLINE_HEIGHT;
|
||||
|
||||
/*
|
||||
* Set the size of the minor next/prev scrollers to zero, so
|
||||
* that they are not displayed. Due to a bug in OpenMotif 2.3,
|
||||
|
||||
115
src/gui_w32.c
115
src/gui_w32.c
@@ -181,7 +181,9 @@
|
||||
# define ID_BEVAL_TOOLTIP 200
|
||||
# define BEVAL_TEXT_LEN MAXPATHL
|
||||
|
||||
#ifndef UINT_PTR
|
||||
#if _MSC_VER < 1300
|
||||
/* Work around old versions of basetsd.h which wrongly declare
|
||||
* UINT_PTR as unsigned long */
|
||||
# define UINT_PTR UINT
|
||||
#endif
|
||||
|
||||
@@ -195,7 +197,7 @@ static DWORD LastActivity = 0;
|
||||
|
||||
/*
|
||||
* excerpts from headers since this may not be presented
|
||||
* in the extremelly old compilers
|
||||
* in the extremely old compilers
|
||||
*/
|
||||
#include <pshpack1.h>
|
||||
|
||||
@@ -568,6 +570,70 @@ _OnMouseWheel(
|
||||
_OnScroll(hwnd, hwndCtl, zDelta >= 0 ? SB_PAGEUP : SB_PAGEDOWN, 0);
|
||||
}
|
||||
|
||||
#ifdef USE_SYSMENU_FONT
|
||||
/*
|
||||
* Get Menu Font.
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
gui_w32_get_menu_font(LOGFONT *lf)
|
||||
{
|
||||
NONCLIENTMETRICS nm;
|
||||
|
||||
nm.cbSize = sizeof(NONCLIENTMETRICS);
|
||||
if (!SystemParametersInfo(
|
||||
SPI_GETNONCLIENTMETRICS,
|
||||
sizeof(NONCLIENTMETRICS),
|
||||
&nm,
|
||||
0))
|
||||
return FAIL;
|
||||
*lf = nm.lfMenuFont;
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) && defined(USE_SYSMENU_FONT)
|
||||
/*
|
||||
* Set the GUI tabline font to the system menu font
|
||||
*/
|
||||
static void
|
||||
set_tabline_font(void)
|
||||
{
|
||||
LOGFONT lfSysmenu;
|
||||
HFONT font;
|
||||
HWND hwnd;
|
||||
HDC hdc;
|
||||
HFONT hfntOld;
|
||||
TEXTMETRIC tm;
|
||||
|
||||
if (gui_w32_get_menu_font(&lfSysmenu) != OK)
|
||||
return;
|
||||
|
||||
font = CreateFontIndirect(&lfSysmenu);
|
||||
|
||||
SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM)font, TRUE);
|
||||
|
||||
/*
|
||||
* Compute the height of the font used for the tab text
|
||||
*/
|
||||
hwnd = GetDesktopWindow();
|
||||
hdc = GetWindowDC(hwnd);
|
||||
hfntOld = SelectFont(hdc, font);
|
||||
|
||||
GetTextMetrics(hdc, &tm);
|
||||
|
||||
SelectFont(hdc, hfntOld);
|
||||
ReleaseDC(hwnd, hdc);
|
||||
|
||||
/*
|
||||
* The space used by the tab border and the space between the tab label
|
||||
* and the tab border is included as 7.
|
||||
*/
|
||||
gui.tabline_height = tm.tmHeight + tm.tmInternalLeading + 7;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Invoked when a setting was changed.
|
||||
*/
|
||||
@@ -577,6 +643,10 @@ _OnSettingChange(UINT n)
|
||||
if (n == SPI_SETWHEELSCROLLLINES)
|
||||
SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0,
|
||||
&mouse_scroll_lines, 0);
|
||||
#if defined(FEAT_GUI_TABLINE) && defined(USE_SYSMENU_FONT)
|
||||
if (n == SPI_SETNONCLIENTMETRICS)
|
||||
set_tabline_font();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -873,7 +943,7 @@ _WndProc(
|
||||
{
|
||||
int wlen;
|
||||
|
||||
wlen = (wcslen(wstr) + 1)
|
||||
wlen = ((int)wcslen(wstr) + 1)
|
||||
* sizeof(WCHAR);
|
||||
if (tt_text_len < wlen)
|
||||
{
|
||||
@@ -893,7 +963,7 @@ _WndProc(
|
||||
{
|
||||
int len;
|
||||
|
||||
len = STRLEN(NameBuff) + 1;
|
||||
len = (int)STRLEN(NameBuff) + 1;
|
||||
if (tt_text_len < len)
|
||||
{
|
||||
tt_text = vim_realloc(tt_text, len);
|
||||
@@ -2870,28 +2940,6 @@ static const char_u *dlg_icons[] = /* must match names in resource file */
|
||||
"IDR_VIM_QUESTION"
|
||||
};
|
||||
|
||||
#ifdef USE_SYSMENU_FONT
|
||||
/*
|
||||
* Get Menu Font.
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
gui_w32_get_menu_font(LOGFONT *lf)
|
||||
{
|
||||
NONCLIENTMETRICS nm;
|
||||
|
||||
nm.cbSize = sizeof(NONCLIENTMETRICS);
|
||||
if (!SystemParametersInfo(
|
||||
SPI_GETNONCLIENTMETRICS,
|
||||
sizeof(NONCLIENTMETRICS),
|
||||
&nm,
|
||||
0))
|
||||
return FAIL;
|
||||
*lf = nm.lfMenuFont;
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
gui_mch_dialog(
|
||||
int type,
|
||||
@@ -4070,10 +4118,6 @@ get_toolbar_bitmap(vimmenu_T *menu)
|
||||
static void
|
||||
initialise_tabline(void)
|
||||
{
|
||||
# ifdef USE_SYSMENU_FONT
|
||||
LOGFONT lfSysmenu;
|
||||
# endif
|
||||
|
||||
InitCommonControls();
|
||||
|
||||
s_tabhwnd = CreateWindow(WC_TABCONTROL, "Vim tabline",
|
||||
@@ -4081,12 +4125,10 @@ initialise_tabline(void)
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, s_hwnd, NULL, s_hinst, NULL);
|
||||
|
||||
gui.tabline_height = TABLINE_HEIGHT;
|
||||
|
||||
# ifdef USE_SYSMENU_FONT
|
||||
if (gui_w32_get_menu_font(&lfSysmenu) == OK)
|
||||
{
|
||||
HFONT font = CreateFontIndirect(&lfSysmenu);
|
||||
SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM) font, TRUE);
|
||||
}
|
||||
set_tabline_font();
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
@@ -4559,8 +4601,7 @@ gui_mch_enable_beval_area(beval)
|
||||
if (beval == NULL)
|
||||
return;
|
||||
// TRACE0("gui_mch_enable_beval_area {{{");
|
||||
BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2,
|
||||
(TIMERPROC)BevalTimerProc);
|
||||
BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2, BevalTimerProc);
|
||||
// TRACE0("gui_mch_enable_beval_area }}}");
|
||||
}
|
||||
|
||||
|
||||
@@ -1122,12 +1122,12 @@ gui_mch_set_text_area_pos(int x, int y, int w, int h)
|
||||
int top = 0;
|
||||
RECT rect;
|
||||
|
||||
#ifdef FEAT_TOOLBAR
|
||||
# ifdef FEAT_TOOLBAR
|
||||
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
|
||||
top = TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
|
||||
#endif
|
||||
# endif
|
||||
GetClientRect(s_hwnd, &rect);
|
||||
MoveWindow(s_tabhwnd, 0, top, rect.right, TABLINE_HEIGHT, TRUE);
|
||||
MoveWindow(s_tabhwnd, 0, top, rect.right, gui.tabline_height, TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2379,8 +2379,8 @@ gui_mch_set_curtab(nr)
|
||||
if (s_tabhwnd == NULL)
|
||||
return;
|
||||
|
||||
if (TabCtrl_GetCurSel(s_tabhwnd) != nr)
|
||||
TabCtrl_SetCurSel(s_tabhwnd, nr);
|
||||
if (TabCtrl_GetCurSel(s_tabhwnd) != nr -1)
|
||||
TabCtrl_SetCurSel(s_tabhwnd, nr -1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
* void mch_print_set_font(int Bold, int Italic, int Underline);
|
||||
* Called whenever the font style changes.
|
||||
*
|
||||
* void mch_print_set_bg(long bgcol);
|
||||
* void mch_print_set_bg(long_u bgcol);
|
||||
* Called to set the background color for the following text. Parameter is an
|
||||
* RGB value.
|
||||
*
|
||||
* void mch_print_set_fg(long fgcol);
|
||||
* void mch_print_set_fg(long_u fgcol);
|
||||
* Called to set the foreground color for the following text. Parameter is an
|
||||
* RGB value.
|
||||
*
|
||||
|
||||
@@ -2323,9 +2323,10 @@ mch_print_set_font(int iBold, int iItalic, int iUnderline)
|
||||
}
|
||||
|
||||
void
|
||||
mch_print_set_bg(unsigned long bgcol)
|
||||
mch_print_set_bg(long_u bgcol)
|
||||
{
|
||||
SetBkColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC, swap_me(bgcol)));
|
||||
SetBkColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC,
|
||||
swap_me((COLORREF)bgcol)));
|
||||
/*
|
||||
* With a white background we can draw characters transparent, which is
|
||||
* good for italic characters that overlap to the next char cell.
|
||||
@@ -2337,9 +2338,10 @@ mch_print_set_bg(unsigned long bgcol)
|
||||
}
|
||||
|
||||
void
|
||||
mch_print_set_fg(unsigned long fgcol)
|
||||
mch_print_set_fg(long_u fgcol)
|
||||
{
|
||||
SetTextColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC, swap_me(fgcol)));
|
||||
SetTextColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC,
|
||||
swap_me((COLORREF)fgcol)));
|
||||
}
|
||||
|
||||
#endif /*FEAT_PRINTER && !FEAT_POSTSCRIPT*/
|
||||
|
||||
@@ -46,8 +46,8 @@ extern int mch_print_blank_page __ARGS((void));
|
||||
extern void mch_print_start_line __ARGS((int margin, int page_line));
|
||||
extern int mch_print_text_out __ARGS((char_u *p, int len));
|
||||
extern void mch_print_set_font __ARGS((int iBold, int iItalic, int iUnderline));
|
||||
extern void mch_print_set_bg __ARGS((unsigned long bgcol));
|
||||
extern void mch_print_set_fg __ARGS((unsigned long fgcol));
|
||||
extern void mch_print_set_bg __ARGS((long_u bgcol));
|
||||
extern void mch_print_set_fg __ARGS((long_u fgcol));
|
||||
extern char_u *mch_resolve_shortcut __ARGS((char_u *fname));
|
||||
extern void win32_set_foreground __ARGS((void));
|
||||
extern void serverInitMessaging __ARGS((void));
|
||||
|
||||
@@ -35,6 +35,6 @@
|
||||
*/
|
||||
#define VIM_VERSION_NODOT "vim70f"
|
||||
#define VIM_VERSION_SHORT "7.0f"
|
||||
#define VIM_VERSION_MEDIUM "7.0f BETA"
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0f BETA (2006 Apr 24)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0f BETA (2006 Apr 24, compiled "
|
||||
#define VIM_VERSION_MEDIUM "7.0f01 BETA"
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0f01 BETA (2006 Apr 25)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0f01 BETA (2006 Apr 25, compiled "
|
||||
|
||||
Reference in New Issue
Block a user