comparison src/w32fns.c @ 40656:cdfd4d09b79a

Update usage of CHECK_ macros (remove unused second argument).
author Pavel Janík <Pavel@Janik.cz>
date Fri, 02 Nov 2001 20:46:55 +0000
parents 7fb50bbb61ad
children f288d1d604a7
comparison
equal deleted inserted replaced
40655:45453187feeb 40656:cdfd4d09b79a
340 { 340 {
341 FRAME_PTR f; 341 FRAME_PTR f;
342 342
343 if (NILP (frame)) 343 if (NILP (frame))
344 frame = selected_frame; 344 frame = selected_frame;
345 CHECK_LIVE_FRAME (frame, 0); 345 CHECK_LIVE_FRAME (frame);
346 f = XFRAME (frame); 346 f = XFRAME (frame);
347 if (! FRAME_W32_P (f)) 347 if (! FRAME_W32_P (f))
348 error ("non-w32 frame used"); 348 error ("non-w32 frame used");
349 return f; 349 return f;
350 } 350 }
370 return x_display_info_for_name (frame); 370 return x_display_info_for_name (frame);
371 else 371 else
372 { 372 {
373 FRAME_PTR f; 373 FRAME_PTR f;
374 374
375 CHECK_LIVE_FRAME (frame, 0); 375 CHECK_LIVE_FRAME (frame);
376 f = XFRAME (frame); 376 f = XFRAME (frame);
377 if (! FRAME_W32_P (f)) 377 if (! FRAME_W32_P (f))
378 error ("non-w32 frame used"); 378 error ("non-w32 frame used");
379 return FRAME_W32_DISPLAY_INFO (f); 379 return FRAME_W32_DISPLAY_INFO (f);
380 } 380 }
1077 { 1077 {
1078 Lisp_Object rgb; 1078 Lisp_Object rgb;
1079 Lisp_Object oldrgb = Qnil; 1079 Lisp_Object oldrgb = Qnil;
1080 Lisp_Object entry; 1080 Lisp_Object entry;
1081 1081
1082 CHECK_NUMBER (red, 0); 1082 CHECK_NUMBER (red);
1083 CHECK_NUMBER (green, 0); 1083 CHECK_NUMBER (green);
1084 CHECK_NUMBER (blue, 0); 1084 CHECK_NUMBER (blue);
1085 CHECK_STRING (name, 0); 1085 CHECK_STRING (name);
1086 1086
1087 XSET (rgb, Lisp_Int, RGB(XUINT (red), XUINT (green), XUINT (blue))); 1087 XSET (rgb, Lisp_Int, RGB(XUINT (red), XUINT (green), XUINT (blue)));
1088 1088
1089 BLOCK_INPUT; 1089 BLOCK_INPUT;
1090 1090
1118 { 1118 {
1119 FILE *fp; 1119 FILE *fp;
1120 Lisp_Object cmap = Qnil; 1120 Lisp_Object cmap = Qnil;
1121 Lisp_Object abspath; 1121 Lisp_Object abspath;
1122 1122
1123 CHECK_STRING (filename, 0); 1123 CHECK_STRING (filename);
1124 abspath = Fexpand_file_name (filename, Qnil); 1124 abspath = Fexpand_file_name (filename, Qnil);
1125 1125
1126 fp = fopen (XSTRING (filename)->data, "rt"); 1126 fp = fopen (XSTRING (filename)->data, "rt");
1127 if (fp) 1127 if (fp)
1128 { 1128 {
1430 w32_to_x_color (rgb) 1430 w32_to_x_color (rgb)
1431 Lisp_Object rgb; 1431 Lisp_Object rgb;
1432 { 1432 {
1433 Lisp_Object color; 1433 Lisp_Object color;
1434 1434
1435 CHECK_NUMBER (rgb, 0); 1435 CHECK_NUMBER (rgb);
1436 1436
1437 BLOCK_INPUT; 1437 BLOCK_INPUT;
1438 1438
1439 color = Frassq (rgb, Vw32_color_map); 1439 color = Frassq (rgb, Vw32_color_map);
1440 1440
1889 Lisp_Object arg; 1889 Lisp_Object arg;
1890 int def; 1890 int def;
1891 { 1891 {
1892 XColor cdef; 1892 XColor cdef;
1893 1893
1894 CHECK_STRING (arg, 0); 1894 CHECK_STRING (arg);
1895 1895
1896 if (strcmp (XSTRING (arg)->data, "black") == 0) 1896 if (strcmp (XSTRING (arg)->data, "black") == 0)
1897 return BLACK_PIX_DEFAULT (f); 1897 return BLACK_PIX_DEFAULT (f);
1898 else if (strcmp (XSTRING (arg)->data, "white") == 0) 1898 else if (strcmp (XSTRING (arg)->data, "white") == 0)
1899 return WHITE_PIX_DEFAULT (f); 1899 return WHITE_PIX_DEFAULT (f);
2027 /* It's not okay to crash if the user selects a screwy cursor. */ 2027 /* It's not okay to crash if the user selects a screwy cursor. */
2028 count = x_catch_errors (FRAME_W32_DISPLAY (f)); 2028 count = x_catch_errors (FRAME_W32_DISPLAY (f));
2029 2029
2030 if (!EQ (Qnil, Vx_pointer_shape)) 2030 if (!EQ (Qnil, Vx_pointer_shape))
2031 { 2031 {
2032 CHECK_NUMBER (Vx_pointer_shape, 0); 2032 CHECK_NUMBER (Vx_pointer_shape);
2033 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape)); 2033 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape));
2034 } 2034 }
2035 else 2035 else
2036 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm); 2036 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm);
2037 x_check_errors (FRAME_W32_DISPLAY (f), "bad text pointer cursor: %s"); 2037 x_check_errors (FRAME_W32_DISPLAY (f), "bad text pointer cursor: %s");
2038 2038
2039 if (!EQ (Qnil, Vx_nontext_pointer_shape)) 2039 if (!EQ (Qnil, Vx_nontext_pointer_shape))
2040 { 2040 {
2041 CHECK_NUMBER (Vx_nontext_pointer_shape, 0); 2041 CHECK_NUMBER (Vx_nontext_pointer_shape);
2042 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2042 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2043 XINT (Vx_nontext_pointer_shape)); 2043 XINT (Vx_nontext_pointer_shape));
2044 } 2044 }
2045 else 2045 else
2046 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_left_ptr); 2046 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_left_ptr);
2047 x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s"); 2047 x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s");
2048 2048
2049 if (!EQ (Qnil, Vx_hourglass_pointer_shape)) 2049 if (!EQ (Qnil, Vx_hourglass_pointer_shape))
2050 { 2050 {
2051 CHECK_NUMBER (Vx_hourglass_pointer_shape, 0); 2051 CHECK_NUMBER (Vx_hourglass_pointer_shape);
2052 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2052 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2053 XINT (Vx_hourglass_pointer_shape)); 2053 XINT (Vx_hourglass_pointer_shape));
2054 } 2054 }
2055 else 2055 else
2056 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_watch); 2056 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_watch);
2057 x_check_errors (FRAME_W32_DISPLAY (f), "bad busy pointer cursor: %s"); 2057 x_check_errors (FRAME_W32_DISPLAY (f), "bad busy pointer cursor: %s");
2058 2058
2059 x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s"); 2059 x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s");
2060 if (!EQ (Qnil, Vx_mode_pointer_shape)) 2060 if (!EQ (Qnil, Vx_mode_pointer_shape))
2061 { 2061 {
2062 CHECK_NUMBER (Vx_mode_pointer_shape, 0); 2062 CHECK_NUMBER (Vx_mode_pointer_shape);
2063 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2063 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2064 XINT (Vx_mode_pointer_shape)); 2064 XINT (Vx_mode_pointer_shape));
2065 } 2065 }
2066 else 2066 else
2067 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm); 2067 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm);
2068 x_check_errors (FRAME_W32_DISPLAY (f), "bad modeline pointer cursor: %s"); 2068 x_check_errors (FRAME_W32_DISPLAY (f), "bad modeline pointer cursor: %s");
2069 2069
2070 if (!EQ (Qnil, Vx_sensitive_text_pointer_shape)) 2070 if (!EQ (Qnil, Vx_sensitive_text_pointer_shape))
2071 { 2071 {
2072 CHECK_NUMBER (Vx_sensitive_text_pointer_shape, 0); 2072 CHECK_NUMBER (Vx_sensitive_text_pointer_shape);
2073 cross_cursor 2073 cross_cursor
2074 = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2074 = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2075 XINT (Vx_sensitive_text_pointer_shape)); 2075 XINT (Vx_sensitive_text_pointer_shape));
2076 } 2076 }
2077 else 2077 else
2078 cross_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair); 2078 cross_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair);
2079 2079
2080 if (!NILP (Vx_window_horizontal_drag_shape)) 2080 if (!NILP (Vx_window_horizontal_drag_shape))
2081 { 2081 {
2082 CHECK_NUMBER (Vx_window_horizontal_drag_shape, 0); 2082 CHECK_NUMBER (Vx_window_horizontal_drag_shape);
2083 horizontal_drag_cursor 2083 horizontal_drag_cursor
2084 = XCreateFontCursor (FRAME_X_DISPLAY (f), 2084 = XCreateFontCursor (FRAME_X_DISPLAY (f),
2085 XINT (Vx_window_horizontal_drag_shape)); 2085 XINT (Vx_window_horizontal_drag_shape));
2086 } 2086 }
2087 else 2087 else
2220 struct frame *f; 2220 struct frame *f;
2221 Lisp_Object arg, oldval; 2221 Lisp_Object arg, oldval;
2222 { 2222 {
2223 int pix; 2223 int pix;
2224 2224
2225 CHECK_STRING (arg, 0); 2225 CHECK_STRING (arg);
2226 pix = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 2226 pix = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
2227 x_set_border_pixel (f, pix); 2227 x_set_border_pixel (f, pix);
2228 update_face_from_frame_parameter (f, Qborder_color, arg); 2228 update_face_from_frame_parameter (f, Qborder_color, arg);
2229 } 2229 }
2230 2230
2382 Lisp_Object result; 2382 Lisp_Object result;
2383 Lisp_Object fontset_name; 2383 Lisp_Object fontset_name;
2384 Lisp_Object frame; 2384 Lisp_Object frame;
2385 int old_fontset = FRAME_FONTSET(f); 2385 int old_fontset = FRAME_FONTSET(f);
2386 2386
2387 CHECK_STRING (arg, 1); 2387 CHECK_STRING (arg);
2388 2388
2389 fontset_name = Fquery_fontset (arg, Qnil); 2389 fontset_name = Fquery_fontset (arg, Qnil);
2390 2390
2391 BLOCK_INPUT; 2391 BLOCK_INPUT;
2392 result = (STRINGP (fontset_name) 2392 result = (STRINGP (fontset_name)
2433 void 2433 void
2434 x_set_border_width (f, arg, oldval) 2434 x_set_border_width (f, arg, oldval)
2435 struct frame *f; 2435 struct frame *f;
2436 Lisp_Object arg, oldval; 2436 Lisp_Object arg, oldval;
2437 { 2437 {
2438 CHECK_NUMBER (arg, 0); 2438 CHECK_NUMBER (arg);
2439 2439
2440 if (XINT (arg) == f->output_data.w32->border_width) 2440 if (XINT (arg) == f->output_data.w32->border_width)
2441 return; 2441 return;
2442 2442
2443 if (FRAME_W32_WINDOW (f) != 0) 2443 if (FRAME_W32_WINDOW (f) != 0)
2451 struct frame *f; 2451 struct frame *f;
2452 Lisp_Object arg, oldval; 2452 Lisp_Object arg, oldval;
2453 { 2453 {
2454 int old = f->output_data.w32->internal_border_width; 2454 int old = f->output_data.w32->internal_border_width;
2455 2455
2456 CHECK_NUMBER (arg, 0); 2456 CHECK_NUMBER (arg);
2457 f->output_data.w32->internal_border_width = XINT (arg); 2457 f->output_data.w32->internal_border_width = XINT (arg);
2458 if (f->output_data.w32->internal_border_width < 0) 2458 if (f->output_data.w32->internal_border_width < 0)
2459 f->output_data.w32->internal_border_width = 0; 2459 f->output_data.w32->internal_border_width = 0;
2460 2460
2461 if (f->output_data.w32->internal_border_width == old) 2461 if (f->output_data.w32->internal_border_width == old)
2673 XSTRING (f->name)->data)) 2673 XSTRING (f->name)->data))
2674 return; 2674 return;
2675 name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name); 2675 name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name);
2676 } 2676 }
2677 else 2677 else
2678 CHECK_STRING (name, 0); 2678 CHECK_STRING (name);
2679 2679
2680 /* Don't change the name if it's already NAME. */ 2680 /* Don't change the name if it's already NAME. */
2681 if (! NILP (Fstring_equal (name, f->name))) 2681 if (! NILP (Fstring_equal (name, f->name)))
2682 return; 2682 return;
2683 2683
2929 { 2929 {
2930 register char *value; 2930 register char *value;
2931 char *name_key; 2931 char *name_key;
2932 char *class_key; 2932 char *class_key;
2933 2933
2934 CHECK_STRING (attribute, 0); 2934 CHECK_STRING (attribute);
2935 CHECK_STRING (class, 0); 2935 CHECK_STRING (class);
2936 2936
2937 if (!NILP (component)) 2937 if (!NILP (component))
2938 CHECK_STRING (component, 1); 2938 CHECK_STRING (component);
2939 if (!NILP (subclass)) 2939 if (!NILP (subclass))
2940 CHECK_STRING (subclass, 2); 2940 CHECK_STRING (subclass);
2941 if (NILP (component) != NILP (subclass)) 2941 if (NILP (component) != NILP (subclass))
2942 error ("x-get-resource: must specify both COMPONENT and SUBCLASS or neither"); 2942 error ("x-get-resource: must specify both COMPONENT and SUBCLASS or neither");
2943 2943
2944 validate_x_resource_name (); 2944 validate_x_resource_name ();
2945 2945
3138 { 3138 {
3139 int geometry, x, y; 3139 int geometry, x, y;
3140 unsigned int width, height; 3140 unsigned int width, height;
3141 Lisp_Object result; 3141 Lisp_Object result;
3142 3142
3143 CHECK_STRING (string, 0); 3143 CHECK_STRING (string);
3144 3144
3145 geometry = XParseGeometry ((char *) XSTRING (string)->data, 3145 geometry = XParseGeometry ((char *) XSTRING (string)->data,
3146 &x, &y, &width, &height); 3146 &x, &y, &width, &height);
3147 3147
3148 result = Qnil; 3148 result = Qnil;
3216 tem2 = w32_get_arg (parms, Quser_size, 0, 0, RES_TYPE_NUMBER); 3216 tem2 = w32_get_arg (parms, Quser_size, 0, 0, RES_TYPE_NUMBER);
3217 if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound)) 3217 if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound))
3218 { 3218 {
3219 if (!EQ (tem0, Qunbound)) 3219 if (!EQ (tem0, Qunbound))
3220 { 3220 {
3221 CHECK_NUMBER (tem0, 0); 3221 CHECK_NUMBER (tem0);
3222 f->height = XINT (tem0); 3222 f->height = XINT (tem0);
3223 } 3223 }
3224 if (!EQ (tem1, Qunbound)) 3224 if (!EQ (tem1, Qunbound))
3225 { 3225 {
3226 CHECK_NUMBER (tem1, 0); 3226 CHECK_NUMBER (tem1);
3227 SET_FRAME_WIDTH (f, XINT (tem1)); 3227 SET_FRAME_WIDTH (f, XINT (tem1));
3228 } 3228 }
3229 if (!NILP (tem2) && !EQ (tem2, Qunbound)) 3229 if (!NILP (tem2) && !EQ (tem2, Qunbound))
3230 window_prompting |= USSize; 3230 window_prompting |= USSize;
3231 else 3231 else
3268 } 3268 }
3269 else if (EQ (tem0, Qunbound)) 3269 else if (EQ (tem0, Qunbound))
3270 f->output_data.w32->top_pos = 0; 3270 f->output_data.w32->top_pos = 0;
3271 else 3271 else
3272 { 3272 {
3273 CHECK_NUMBER (tem0, 0); 3273 CHECK_NUMBER (tem0);
3274 f->output_data.w32->top_pos = XINT (tem0); 3274 f->output_data.w32->top_pos = XINT (tem0);
3275 if (f->output_data.w32->top_pos < 0) 3275 if (f->output_data.w32->top_pos < 0)
3276 window_prompting |= YNegative; 3276 window_prompting |= YNegative;
3277 } 3277 }
3278 3278
3296 } 3296 }
3297 else if (EQ (tem1, Qunbound)) 3297 else if (EQ (tem1, Qunbound))
3298 f->output_data.w32->left_pos = 0; 3298 f->output_data.w32->left_pos = 0;
3299 else 3299 else
3300 { 3300 {
3301 CHECK_NUMBER (tem1, 0); 3301 CHECK_NUMBER (tem1);
3302 f->output_data.w32->left_pos = XINT (tem1); 3302 f->output_data.w32->left_pos = XINT (tem1);
3303 if (f->output_data.w32->left_pos < 0) 3303 if (f->output_data.w32->left_pos < 0)
3304 window_prompting |= XNegative; 3304 window_prompting |= XNegative;
3305 } 3305 }
3306 3306
5093 icons in the tray. */ 5093 icons in the tray. */
5094 icon_x = w32_get_arg (parms, Qicon_left, 0, 0, RES_TYPE_NUMBER); 5094 icon_x = w32_get_arg (parms, Qicon_left, 0, 0, RES_TYPE_NUMBER);
5095 icon_y = w32_get_arg (parms, Qicon_top, 0, 0, RES_TYPE_NUMBER); 5095 icon_y = w32_get_arg (parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
5096 if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound)) 5096 if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
5097 { 5097 {
5098 CHECK_NUMBER (icon_x, 0); 5098 CHECK_NUMBER (icon_x);
5099 CHECK_NUMBER (icon_y, 0); 5099 CHECK_NUMBER (icon_y);
5100 } 5100 }
5101 else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) 5101 else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
5102 error ("Both left and top icon corners of icon must be specified"); 5102 error ("Both left and top icon corners of icon must be specified");
5103 5103
5104 BLOCK_INPUT; 5104 BLOCK_INPUT;
5237 /* See if parent window is specified. */ 5237 /* See if parent window is specified. */
5238 parent = w32_get_arg (parms, Qparent_id, NULL, NULL, RES_TYPE_NUMBER); 5238 parent = w32_get_arg (parms, Qparent_id, NULL, NULL, RES_TYPE_NUMBER);
5239 if (EQ (parent, Qunbound)) 5239 if (EQ (parent, Qunbound))
5240 parent = Qnil; 5240 parent = Qnil;
5241 if (! NILP (parent)) 5241 if (! NILP (parent))
5242 CHECK_NUMBER (parent, 0); 5242 CHECK_NUMBER (parent);
5243 5243
5244 /* make_frame_without_minibuffer can run Lisp code and garbage collect. */ 5244 /* make_frame_without_minibuffer can run Lisp code and garbage collect. */
5245 /* No need to protect DISPLAY because that's not used after passing 5245 /* No need to protect DISPLAY because that's not used after passing
5246 it to make_frame_without_minibuffer. */ 5246 it to make_frame_without_minibuffer. */
5247 frame = Qnil; 5247 frame = Qnil;
7206 Lisp_Object color, frame; 7206 Lisp_Object color, frame;
7207 { 7207 {
7208 XColor foo; 7208 XColor foo;
7209 FRAME_PTR f = check_x_frame (frame); 7209 FRAME_PTR f = check_x_frame (frame);
7210 7210
7211 CHECK_STRING (color, 1); 7211 CHECK_STRING (color);
7212 7212
7213 if (w32_defined_color (f, XSTRING (color)->data, &foo, 0)) 7213 if (w32_defined_color (f, XSTRING (color)->data, &foo, 0))
7214 return Qt; 7214 return Qt;
7215 else 7215 else
7216 return Qnil; 7216 return Qnil;
7222 Lisp_Object color, frame; 7222 Lisp_Object color, frame;
7223 { 7223 {
7224 XColor foo; 7224 XColor foo;
7225 FRAME_PTR f = check_x_frame (frame); 7225 FRAME_PTR f = check_x_frame (frame);
7226 7226
7227 CHECK_STRING (color, 1); 7227 CHECK_STRING (color);
7228 7228
7229 if (w32_defined_color (f, XSTRING (color)->data, &foo, 0)) 7229 if (w32_defined_color (f, XSTRING (color)->data, &foo, 0))
7230 { 7230 {
7231 Lisp_Object rgb[3]; 7231 Lisp_Object rgb[3];
7232 7232
7532 Lisp_Object name; 7532 Lisp_Object name;
7533 { 7533 {
7534 Lisp_Object names; 7534 Lisp_Object names;
7535 struct w32_display_info *dpyinfo; 7535 struct w32_display_info *dpyinfo;
7536 7536
7537 CHECK_STRING (name, 0); 7537 CHECK_STRING (name);
7538 7538
7539 for (dpyinfo = &one_w32_display_info, names = w32_display_name_list; 7539 for (dpyinfo = &one_w32_display_info, names = w32_display_name_list;
7540 dpyinfo; 7540 dpyinfo;
7541 dpyinfo = dpyinfo->next, names = XCDR (names)) 7541 dpyinfo = dpyinfo->next, names = XCDR (names))
7542 { 7542 {
7573 Lisp_Object display, xrm_string, must_succeed; 7573 Lisp_Object display, xrm_string, must_succeed;
7574 { 7574 {
7575 unsigned char *xrm_option; 7575 unsigned char *xrm_option;
7576 struct w32_display_info *dpyinfo; 7576 struct w32_display_info *dpyinfo;
7577 7577
7578 CHECK_STRING (display, 0); 7578 CHECK_STRING (display);
7579 if (! NILP (xrm_string)) 7579 if (! NILP (xrm_string))
7580 CHECK_STRING (xrm_string, 1); 7580 CHECK_STRING (xrm_string);
7581 7581
7582 if (! EQ (Vwindow_system, intern ("w32"))) 7582 if (! EQ (Vwindow_system, intern ("w32")))
7583 error ("Not using Microsoft Windows"); 7583 error ("Not using Microsoft Windows");
7584 7584
7585 /* Allow color mapping to be defined externally; first look in user's 7585 /* Allow color mapping to be defined externally; first look in user's
12463 { 12463 {
12464 #if 0 /* TODO : port window properties to W32 */ 12464 #if 0 /* TODO : port window properties to W32 */
12465 struct frame *f = check_x_frame (frame); 12465 struct frame *f = check_x_frame (frame);
12466 Atom prop_atom; 12466 Atom prop_atom;
12467 12467
12468 CHECK_STRING (prop, 1); 12468 CHECK_STRING (prop);
12469 CHECK_STRING (value, 2); 12469 CHECK_STRING (value);
12470 12470
12471 BLOCK_INPUT; 12471 BLOCK_INPUT;
12472 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False); 12472 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False);
12473 XChangeProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), 12473 XChangeProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f),
12474 prop_atom, XA_STRING, 8, PropModeReplace, 12474 prop_atom, XA_STRING, 8, PropModeReplace,
12494 #if 0 /* TODO : port window properties to W32 */ 12494 #if 0 /* TODO : port window properties to W32 */
12495 12495
12496 struct frame *f = check_x_frame (frame); 12496 struct frame *f = check_x_frame (frame);
12497 Atom prop_atom; 12497 Atom prop_atom;
12498 12498
12499 CHECK_STRING (prop, 1); 12499 CHECK_STRING (prop);
12500 BLOCK_INPUT; 12500 BLOCK_INPUT;
12501 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False); 12501 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False);
12502 XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom); 12502 XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom);
12503 12503
12504 /* Make sure the property is removed when we return. */ 12504 /* Make sure the property is removed when we return. */
12528 char *tmp_data = NULL; 12528 char *tmp_data = NULL;
12529 Atom actual_type; 12529 Atom actual_type;
12530 int actual_format; 12530 int actual_format;
12531 unsigned long actual_size, bytes_remaining; 12531 unsigned long actual_size, bytes_remaining;
12532 12532
12533 CHECK_STRING (prop, 1); 12533 CHECK_STRING (prop);
12534 BLOCK_INPUT; 12534 BLOCK_INPUT;
12535 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False); 12535 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False);
12536 rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), 12536 rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f),
12537 prop_atom, 0, 0, False, XA_STRING, 12537 prop_atom, 0, 0, False, XA_STRING,
12538 &actual_type, &actual_format, &actual_size, 12538 &actual_type, &actual_format, &actual_size,
13175 13175
13176 specbind (Qinhibit_redisplay, Qt); 13176 specbind (Qinhibit_redisplay, Qt);
13177 13177
13178 GCPRO4 (string, parms, frame, timeout); 13178 GCPRO4 (string, parms, frame, timeout);
13179 13179
13180 CHECK_STRING (string, 0); 13180 CHECK_STRING (string);
13181 f = check_x_frame (frame); 13181 f = check_x_frame (frame);
13182 if (NILP (timeout)) 13182 if (NILP (timeout))
13183 timeout = make_number (5); 13183 timeout = make_number (5);
13184 else 13184 else
13185 CHECK_NATNUM (timeout, 2); 13185 CHECK_NATNUM (timeout);
13186 13186
13187 if (NILP (dx)) 13187 if (NILP (dx))
13188 dx = make_number (5); 13188 dx = make_number (5);
13189 else 13189 else
13190 CHECK_NUMBER (dx, 5); 13190 CHECK_NUMBER (dx);
13191 13191
13192 if (NILP (dy)) 13192 if (NILP (dy))
13193 dy = make_number (-10); 13193 dy = make_number (-10);
13194 else 13194 else
13195 CHECK_NUMBER (dy, 6); 13195 CHECK_NUMBER (dy);
13196 13196
13197 if (NILP (last_show_tip_args)) 13197 if (NILP (last_show_tip_args))
13198 last_show_tip_args = Fmake_vector (make_number (3), Qnil); 13198 last_show_tip_args = Fmake_vector (make_number (3), Qnil);
13199 13199
13200 if (!NILP (tip_frame)) 13200 if (!NILP (tip_frame))
13404 char filename[MAX_PATH + 1]; 13404 char filename[MAX_PATH + 1];
13405 char init_dir[MAX_PATH + 1]; 13405 char init_dir[MAX_PATH + 1];
13406 int use_dialog_p = 1; 13406 int use_dialog_p = 1;
13407 13407
13408 GCPRO5 (prompt, dir, default_filename, mustmatch, file); 13408 GCPRO5 (prompt, dir, default_filename, mustmatch, file);
13409 CHECK_STRING (prompt, 0); 13409 CHECK_STRING (prompt);
13410 CHECK_STRING (dir, 1); 13410 CHECK_STRING (dir);
13411 13411
13412 /* Create the dialog with PROMPT as title, using DIR as initial 13412 /* Create the dialog with PROMPT as title, using DIR as initial
13413 directory and using "*" as pattern. */ 13413 directory and using "*" as pattern. */
13414 dir = Fexpand_file_name (dir, Qnil); 13414 dir = Fexpand_file_name (dir, Qnil);
13415 strncpy (init_dir, XSTRING (dir)->data, MAX_PATH); 13415 strncpy (init_dir, XSTRING (dir)->data, MAX_PATH);
13587 (command, frame) 13587 (command, frame)
13588 Lisp_Object command, frame; 13588 Lisp_Object command, frame;
13589 { 13589 {
13590 FRAME_PTR f = check_x_frame (frame); 13590 FRAME_PTR f = check_x_frame (frame);
13591 13591
13592 CHECK_NUMBER (command, 0); 13592 CHECK_NUMBER (command);
13593 13593
13594 PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0); 13594 PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0);
13595 13595
13596 return Qnil; 13596 return Qnil;
13597 } 13597 }
13619 (operation, document, parameters, show_flag) 13619 (operation, document, parameters, show_flag)
13620 Lisp_Object operation, document, parameters, show_flag; 13620 Lisp_Object operation, document, parameters, show_flag;
13621 { 13621 {
13622 Lisp_Object current_dir; 13622 Lisp_Object current_dir;
13623 13623
13624 CHECK_STRING (document, 0); 13624 CHECK_STRING (document);
13625 13625
13626 /* Encode filename and current directory. */ 13626 /* Encode filename and current directory. */
13627 current_dir = ENCODE_FILE (current_buffer->directory); 13627 current_dir = ENCODE_FILE (current_buffer->directory);
13628 document = ENCODE_FILE (document); 13628 document = ENCODE_FILE (document);
13629 if ((int) ShellExecute (NULL, 13629 if ((int) ShellExecute (NULL,
13667 int vk_code; 13667 int vk_code;
13668 int lisp_modifiers; 13668 int lisp_modifiers;
13669 int w32_modifiers; 13669 int w32_modifiers;
13670 struct gcpro gcpro1; 13670 struct gcpro gcpro1;
13671 13671
13672 CHECK_VECTOR (key, 0); 13672 CHECK_VECTOR (key);
13673 13673
13674 if (XFASTINT (Flength (key)) != 1) 13674 if (XFASTINT (Flength (key)) != 1)
13675 return Qnil; 13675 return Qnil;
13676 13676
13677 GCPRO1 (key); 13677 GCPRO1 (key);
13805 Lisp_Object hotkeyid; 13805 Lisp_Object hotkeyid;
13806 { 13806 {
13807 int vk_code, w32_modifiers; 13807 int vk_code, w32_modifiers;
13808 Lisp_Object key; 13808 Lisp_Object key;
13809 13809
13810 CHECK_NUMBER (hotkeyid, 0); 13810 CHECK_NUMBER (hotkeyid);
13811 13811
13812 vk_code = HOTKEY_VK_CODE (hotkeyid); 13812 vk_code = HOTKEY_VK_CODE (hotkeyid);
13813 w32_modifiers = HOTKEY_MODIFIERS (hotkeyid); 13813 w32_modifiers = HOTKEY_MODIFIERS (hotkeyid);
13814 13814
13815 if (lispy_function_keys[vk_code]) 13815 if (lispy_function_keys[vk_code])
13871 (filename) 13871 (filename)
13872 Lisp_Object filename; 13872 Lisp_Object filename;
13873 { 13873 {
13874 Lisp_Object encoded, value; 13874 Lisp_Object encoded, value;
13875 13875
13876 CHECK_STRING (filename, 0); 13876 CHECK_STRING (filename);
13877 filename = Fexpand_file_name (filename, Qnil); 13877 filename = Fexpand_file_name (filename, Qnil);
13878 encoded = ENCODE_FILE (filename); 13878 encoded = ENCODE_FILE (filename);
13879 13879
13880 value = Qnil; 13880 value = Qnil;
13881 13881