Mercurial > vim
comparison src/os_mswin.c @ 11:4424b47a0797
updated for version 7.0003
author | vimboss |
---|---|
date | Wed, 30 Jun 2004 16:16:41 +0000 |
parents | 3fc0f57ecb91 |
children | db5102f7e29f |
comparison
equal
deleted
inserted
replaced
10:4e2284e71352 | 11:4424b47a0797 |
---|---|
153 #endif | 153 #endif |
154 | 154 |
155 #ifdef FEAT_GUI | 155 #ifdef FEAT_GUI |
156 extern HWND s_hwnd; | 156 extern HWND s_hwnd; |
157 #else | 157 #else |
158 # if (defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT)) \ | |
159 || defined(FEAT_CLIENTSERVER) \ | |
160 || (defined(FEAT_EVAL) && !defined(FEAT_GUI)) | |
161 # define HAVE_GETCONSOLEHWND | |
162 static HWND s_hwnd = 0; /* console window handle, set by GetConsoleHwnd() */ | 158 static HWND s_hwnd = 0; /* console window handle, set by GetConsoleHwnd() */ |
163 # endif | |
164 #endif | 159 #endif |
165 | 160 |
166 extern int WSInitialized; | 161 extern int WSInitialized; |
167 | 162 |
168 /* Don't generate prototypes here, because some systems do have these | 163 /* Don't generate prototypes here, because some systems do have these |
1535 OutputDebugString(szBuff); | 1530 OutputDebugString(szBuff); |
1536 } | 1531 } |
1537 | 1532 |
1538 #endif //_DEBUG | 1533 #endif //_DEBUG |
1539 | 1534 |
1540 #ifdef HAVE_GETCONSOLEHWND | 1535 #if !defined(FEAT_GUI) || defined(PROTO) |
1541 # if defined(FEAT_TITLE) && defined(WIN3264) | 1536 # if defined(FEAT_TITLE) && defined(WIN3264) |
1542 extern HWND g_hWnd; /* This is in os_win32.c. */ | 1537 extern HWND g_hWnd; /* This is in os_win32.c. */ |
1543 # endif | 1538 # endif |
1544 | 1539 |
1545 /* | 1540 /* |
1577 SetConsoleTitle(pszNewWindowTitle); | 1572 SetConsoleTitle(pszNewWindowTitle); |
1578 Sleep(40); | 1573 Sleep(40); |
1579 s_hwnd = FindWindow(NULL, pszNewWindowTitle); | 1574 s_hwnd = FindWindow(NULL, pszNewWindowTitle); |
1580 | 1575 |
1581 SetConsoleTitle(pszOldWindowTitle); | 1576 SetConsoleTitle(pszOldWindowTitle); |
1577 } | |
1578 | |
1579 /* | |
1580 * Console implementation of ":winpos". | |
1581 */ | |
1582 int | |
1583 mch_get_winpos(int *x, int *y) | |
1584 { | |
1585 RECT rect; | |
1586 | |
1587 GetConsoleHwnd(); | |
1588 GetWindowRect(s_hwnd, &rect); | |
1589 *x = rect.left; | |
1590 *y = rect.top; | |
1591 return OK; | |
1592 } | |
1593 | |
1594 /* | |
1595 * Console implementation of ":winpos x y". | |
1596 */ | |
1597 void | |
1598 mch_set_winpos(int x, int y) | |
1599 { | |
1600 GetConsoleHwnd(); | |
1601 SetWindowPos(s_hwnd, NULL, x, y, 0, 0, | |
1602 SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); | |
1582 } | 1603 } |
1583 #endif | 1604 #endif |
1584 | 1605 |
1585 #if (defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT)) || defined(PROTO) | 1606 #if (defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT)) || defined(PROTO) |
1586 | 1607 |