comparison src/os_mswin.c @ 323:03b3684919e3 v7.0084

updated for version 7.0084
author vimboss
date Mon, 13 Jun 2005 22:28:56 +0000
parents 2463194c8cdd
children 8f41fe56e2fc
comparison
equal deleted inserted replaced
322:a18bd33b8ea9 323:03b3684919e3
330 * which is one of: 330 * which is one of:
331 * 1: Just restore title 331 * 1: Just restore title
332 * 2: Just restore icon (which we don't have) 332 * 2: Just restore icon (which we don't have)
333 * 3: Restore title and icon (which we don't have) 333 * 3: Restore title and icon (which we don't have)
334 */ 334 */
335 /*ARGSUSED*/
335 void 336 void
336 mch_restore_title( 337 mch_restore_title(
337 int which) 338 int which)
338 { 339 {
339 #ifndef FEAT_GUI_MSWIN 340 #ifndef FEAT_GUI_MSWIN
368 * turning all '/'s into '\\'s and getting the correct case of each component 369 * turning all '/'s into '\\'s and getting the correct case of each component
369 * of the file name. Append a (back)slash to a directory name. 370 * of the file name. Append a (back)slash to a directory name.
370 * When 'shellslash' set do it the other way around. 371 * When 'shellslash' set do it the other way around.
371 * Return OK or FAIL. 372 * Return OK or FAIL.
372 */ 373 */
374 /*ARGSUSED*/
373 int 375 int
374 mch_FullName( 376 mch_FullName(
375 char_u *fname, 377 char_u *fname,
376 char_u *buf, 378 char_u *buf,
377 int len, 379 int len,
523 #endif 525 #endif
524 return stat(buf, stp); 526 return stat(buf, stp);
525 } 527 }
526 528
527 #if defined(FEAT_GUI_MSWIN) || defined(PROTO) 529 #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
530 /*ARGSUSED*/
528 void 531 void
529 mch_settmode(int tmode) 532 mch_settmode(int tmode)
530 { 533 {
531 /* nothing to do */ 534 /* nothing to do */
532 } 535 }
699 702
700 /* 703 /*
701 * Switching off termcap mode is only allowed when Columns is 80, otherwise a 704 * Switching off termcap mode is only allowed when Columns is 80, otherwise a
702 * crash may result. It's always allowed on NT or when running the GUI. 705 * crash may result. It's always allowed on NT or when running the GUI.
703 */ 706 */
707 /*ARGSUSED*/
704 int 708 int
705 can_end_termcap_mode( 709 can_end_termcap_mode(
706 int give_msg) 710 int give_msg)
707 { 711 {
708 #ifdef FEAT_GUI_MSWIN 712 #ifdef FEAT_GUI_MSWIN
730 734
731 735
732 /* 736 /*
733 * set screen mode, always fails. 737 * set screen mode, always fails.
734 */ 738 */
739 /*ARGSUSED*/
735 int 740 int
736 mch_screenmode( 741 mch_screenmode(
737 char_u *arg) 742 char_u *arg)
738 { 743 {
739 EMSG(_(e_screenmode)); 744 EMSG(_(e_screenmode));
1026 } VimClipType_t; 1031 } VimClipType_t;
1027 1032
1028 /* 1033 /*
1029 * Make vim the owner of the current selection. Return OK upon success. 1034 * Make vim the owner of the current selection. Return OK upon success.
1030 */ 1035 */
1036 /*ARGSUSED*/
1031 int 1037 int
1032 clip_mch_own_selection(VimClipboard *cbd) 1038 clip_mch_own_selection(VimClipboard *cbd)
1033 { 1039 {
1034 /* 1040 /*
1035 * Never actually own the clipboard. If another application sets the 1041 * Never actually own the clipboard. If another application sets the
1039 } 1045 }
1040 1046
1041 /* 1047 /*
1042 * Make vim NOT the owner of the current selection. 1048 * Make vim NOT the owner of the current selection.
1043 */ 1049 */
1050 /*ARGSUSED*/
1044 void 1051 void
1045 clip_mch_lose_selection(VimClipboard *cbd) 1052 clip_mch_lose_selection(VimClipboard *cbd)
1046 { 1053 {
1047 /* Nothing needs to be done here */ 1054 /* Nothing needs to be done here */
1048 } 1055 }
1226 char_u *to_free = NULL; 1233 char_u *to_free = NULL;
1227 #endif 1234 #endif
1228 #ifdef FEAT_MBYTE 1235 #ifdef FEAT_MBYTE
1229 HGLOBAL rawh = NULL; 1236 HGLOBAL rawh = NULL;
1230 #endif 1237 #endif
1231 char_u *hMemStr = NULL;
1232 int str_size = 0; 1238 int str_size = 0;
1233 int maxlen; 1239 int maxlen;
1234 size_t n; 1240 size_t n;
1235 1241
1236 /* 1242 /*
1325 /* Get the clipboard in the Active codepage. */ 1331 /* Get the clipboard in the Active codepage. */
1326 if (IsClipboardFormatAvailable(CF_TEXT)) 1332 if (IsClipboardFormatAvailable(CF_TEXT))
1327 { 1333 {
1328 if ((hMem = GetClipboardData(CF_TEXT)) != NULL) 1334 if ((hMem = GetClipboardData(CF_TEXT)) != NULL)
1329 { 1335 {
1330 str = hMemStr = (char_u *)GlobalLock(hMem); 1336 str = (char_u *)GlobalLock(hMem);
1331 1337
1332 /* The length is either what our metadata says or the strlen(). 1338 /* The length is either what our metadata says or the strlen().
1333 * But limit it to the GlobalSize() for safety. */ 1339 * But limit it to the GlobalSize() for safety. */
1334 maxlen = GlobalSize(hMem); 1340 maxlen = GlobalSize(hMem);
1335 if (metadata.txtlen >= 0) 1341 if (metadata.txtlen >= 0)
1585 1591
1586 1592
1587 /* 1593 /*
1588 * Debugging helper: expose the MCH_WRITE_DUMP stuff to other modules 1594 * Debugging helper: expose the MCH_WRITE_DUMP stuff to other modules
1589 */ 1595 */
1596 /*ARGSUSED*/
1590 void 1597 void
1591 DumpPutS( 1598 DumpPutS(
1592 const char *psz) 1599 const char *psz)
1593 { 1600 {
1594 # ifdef MCH_WRITE_DUMP 1601 # ifdef MCH_WRITE_DUMP
1734 *(ptr ) = *(ptr + 2); 1741 *(ptr ) = *(ptr + 2);
1735 *(ptr + 2) = temp; 1742 *(ptr + 2) = temp;
1736 return colorref; 1743 return colorref;
1737 } 1744 }
1738 1745
1746 /*ARGSUSED*/
1739 static BOOL CALLBACK 1747 static BOOL CALLBACK
1740 PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 1748 PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
1741 { 1749 {
1742 #ifdef FEAT_GETTEXT 1750 #ifdef FEAT_GETTEXT
1743 NONCLIENTMETRICS nm; 1751 NONCLIENTMETRICS nm;
1796 return TRUE; 1804 return TRUE;
1797 } 1805 }
1798 return FALSE; 1806 return FALSE;
1799 } 1807 }
1800 1808
1809 /*ARGSUSED*/
1801 static BOOL CALLBACK 1810 static BOOL CALLBACK
1802 AbortProc(HDC hdcPrn, int iCode) 1811 AbortProc(HDC hdcPrn, int iCode)
1803 { 1812 {
1804 MSG msg; 1813 MSG msg;
1805 1814
2245 #endif 2254 #endif
2246 2255
2247 return (ret > 0); 2256 return (ret > 0);
2248 } 2257 }
2249 2258
2259 /*ARGSUSED*/
2250 void 2260 void
2251 mch_print_end(prt_settings_T *psettings) 2261 mch_print_end(prt_settings_T *psettings)
2252 { 2262 {
2253 EndDoc(prt_dlg.hDC); 2263 EndDoc(prt_dlg.hDC);
2254 if (!*bUserAbort) 2264 if (!*bUserAbort)
2933 typedef struct 2943 typedef struct
2934 { 2944 {
2935 HWND server; /* server window */ 2945 HWND server; /* server window */
2936 char_u *reply; /* reply string */ 2946 char_u *reply; /* reply string */
2937 int expr_result; /* 0 for REPLY, 1 for RESULT 2 for error */ 2947 int expr_result; /* 0 for REPLY, 1 for RESULT 2 for error */
2938 } 2948 } reply_T;
2939 reply_T;
2940 2949
2941 static garray_T reply_list = {0, 0, sizeof(reply_T), 5, 0}; 2950 static garray_T reply_list = {0, 0, sizeof(reply_T), 5, 0};
2942 2951
2943 #define REPLY_ITEM(i) ((reply_T *)(reply_list.ga_data) + (i)) 2952 #define REPLY_ITEM(i) ((reply_T *)(reply_list.ga_data) + (i))
2944 #define REPLY_COUNT (reply_list.ga_len) 2953 #define REPLY_COUNT (reply_list.ga_len)
3184 3193
3185 *end = str; 3194 *end = str;
3186 return pixels; 3195 return pixels;
3187 } 3196 }
3188 3197
3198 /*ARGSUSED*/
3189 static int CALLBACK 3199 static int CALLBACK
3190 font_enumproc( 3200 font_enumproc(
3191 ENUMLOGFONT *elf, 3201 ENUMLOGFONT *elf,
3192 NEWTEXTMETRIC *ntm, 3202 NEWTEXTMETRIC *ntm,
3193 int type, 3203 int type,