comparison src/w32fns.c @ 110091:66a2fac996a4

merge emacs-23
author Kenichi Handa <handa@m17n.org>
date Fri, 27 Aug 2010 23:05:43 +0900
parents 269057771f8c
children 051595eb9b58 2cf388f16cae
comparison
equal deleted inserted replaced
107913:4a06b9752df5 110091:66a2fac996a4
45 #include "ccl.h" 45 #include "ccl.h"
46 #include "fontset.h" 46 #include "fontset.h"
47 #include "systime.h" 47 #include "systime.h"
48 #include "termhooks.h" 48 #include "termhooks.h"
49 #include "w32heap.h" 49 #include "w32heap.h"
50 #include "w32.h"
50 51
51 #include "bitmaps/gray.xbm" 52 #include "bitmaps/gray.xbm"
52 53
53 #include <commctrl.h> 54 #include <commctrl.h>
54 #include <commdlg.h> 55 #include <commdlg.h>
285 /* The delay (milliseconds) before a menu is freed after WM_EXITMENULOOP 286 /* The delay (milliseconds) before a menu is freed after WM_EXITMENULOOP
286 is received. */ 287 is received. */
287 #define MENU_FREE_DELAY 1000 288 #define MENU_FREE_DELAY 1000
288 static unsigned menu_free_timer = 0; 289 static unsigned menu_free_timer = 0;
289 290
291 /* In dispnew.c */
292
293 extern Lisp_Object Vwindow_system_version;
294
290 /* The below are defined in frame.c. */ 295 /* The below are defined in frame.c. */
291 296
292 extern Lisp_Object Vwindow_system_version; 297 extern Lisp_Object Qtooltip;
293 298
294 #ifdef GLYPH_DEBUG 299 #ifdef GLYPH_DEBUG
295 int image_cache_refcount, dpyinfo_refcount; 300 int image_cache_refcount, dpyinfo_refcount;
296 #endif 301 #endif
297 302
1346 FRAME_FOREGROUND_PIXEL (f) = fg; 1351 FRAME_FOREGROUND_PIXEL (f) = fg;
1347 1352
1348 if (FRAME_W32_WINDOW (f) != 0) 1353 if (FRAME_W32_WINDOW (f) != 0)
1349 { 1354 {
1350 if (x->cursor_pixel == old_fg) 1355 if (x->cursor_pixel == old_fg)
1351 x->cursor_pixel = fg; 1356 {
1357 x->cursor_pixel = fg;
1358 x->cursor_gc->background = fg;
1359 }
1352 1360
1353 update_face_from_frame_parameter (f, Qforeground_color, arg); 1361 update_face_from_frame_parameter (f, Qforeground_color, arg);
1354 if (FRAME_VISIBLE_P (f)) 1362 if (FRAME_VISIBLE_P (f))
1355 redraw_frame (f); 1363 redraw_frame (f);
1356 } 1364 }
5581 FRAME_LINES (f) = 0; 5589 FRAME_LINES (f) = 0;
5582 SET_FRAME_COLS (f, 0); 5590 SET_FRAME_COLS (f, 0);
5583 change_frame_size (f, height, width, 1, 0, 0); 5591 change_frame_size (f, height, width, 1, 0, 0);
5584 5592
5585 /* Add `tooltip' frame parameter's default value. */ 5593 /* Add `tooltip' frame parameter's default value. */
5586 if (NILP (Fframe_parameter (frame, intern ("tooltip")))) 5594 if (NILP (Fframe_parameter (frame, Qtooltip)))
5587 Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), 5595 Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil));
5588 Qnil));
5589 5596
5590 /* Set up faces after all frame parameters are known. This call 5597 /* Set up faces after all frame parameters are known. This call
5591 also merges in face attributes specified for new frames. 5598 also merges in face attributes specified for new frames.
5592 5599
5593 Frame parameters may be changed if .Xdefaults contains 5600 Frame parameters may be changed if .Xdefaults contains
6331 6 - start minimized */) 6338 6 - start minimized */)
6332 (operation, document, parameters, show_flag) 6339 (operation, document, parameters, show_flag)
6333 Lisp_Object operation, document, parameters, show_flag; 6340 Lisp_Object operation, document, parameters, show_flag;
6334 { 6341 {
6335 Lisp_Object current_dir; 6342 Lisp_Object current_dir;
6343 char *errstr;
6336 6344
6337 CHECK_STRING (document); 6345 CHECK_STRING (document);
6338 6346
6339 /* Encode filename, current directory and parameters. */ 6347 /* Encode filename, current directory and parameters. */
6340 current_dir = ENCODE_FILE (current_buffer->directory); 6348 current_dir = ENCODE_FILE (current_buffer->directory);
6351 SDATA (current_dir), 6359 SDATA (current_dir),
6352 (INTEGERP (show_flag) ? 6360 (INTEGERP (show_flag) ?
6353 XINT (show_flag) : SW_SHOWDEFAULT)) 6361 XINT (show_flag) : SW_SHOWDEFAULT))
6354 > 32) 6362 > 32)
6355 return Qt; 6363 return Qt;
6356 error ("ShellExecute failed: %s", w32_strerror (0)); 6364 errstr = w32_strerror (0);
6365 /* The error string might be encoded in the locale's encoding. */
6366 if (!NILP (Vlocale_coding_system))
6367 {
6368 Lisp_Object decoded =
6369 code_convert_string_norecord (make_unibyte_string (errstr,
6370 strlen (errstr)),
6371 Vlocale_coding_system, 0);
6372 errstr = (char *)SDATA (decoded);
6373 }
6374 error ("ShellExecute failed: %s", errstr);
6357 } 6375 }
6358 6376
6359 /* Lookup virtual keycode from string representing the name of a 6377 /* Lookup virtual keycode from string representing the name of a
6360 non-ascii keystroke into the corresponding virtual key, using 6378 non-ascii keystroke into the corresponding virtual key, using
6361 lispy_function_keys. */ 6379 lispy_function_keys. */