comparison src/w32fns.c @ 47097:398a8f34fb26

(x_set_cursor_type): Set FRAME_BLINK_OFF_CURSOR and FRAME_BLINK_OFF_CURSOR_WIDTH using defaults and Vblink_cursor_alist. (Vblink_cursor_alist): New variable. (syms_of_w32fns): Initialize and defvar it. (x_specified_cursor_type): Recognize Qbox for filled box. Exceptions are hollow boxes. (Qbox, Qhollow): New variables. (syms_of_w32fns): Initialize and staticpro them.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 Aug 2002 14:37:33 +0000
parents ebc447bb0250
children 9ef4bf7492cb
comparison
equal deleted inserted replaced
47096:f0b41fba2995 47097:398a8f34fb26
200 /* VIETNAMESE_CHARSET is not defined in some versions of MSVC. */ 200 /* VIETNAMESE_CHARSET is not defined in some versions of MSVC. */
201 #ifndef VIETNAMESE_CHARSET 201 #ifndef VIETNAMESE_CHARSET
202 #define VIETNAMESE_CHARSET 163 202 #define VIETNAMESE_CHARSET 163
203 #endif 203 #endif
204 204
205 /* How to blink the cursor off. */
206 Lisp_Object Vblink_cursor_alist;
207
205 Lisp_Object Qauto_raise; 208 Lisp_Object Qauto_raise;
206 Lisp_Object Qauto_lower; 209 Lisp_Object Qauto_lower;
207 Lisp_Object Qbar, Qhbar; 210 Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
208 Lisp_Object Qborder_color; 211 Lisp_Object Qborder_color;
209 Lisp_Object Qborder_width; 212 Lisp_Object Qborder_width;
210 Lisp_Object Qbox; 213 Lisp_Object Qbox;
211 Lisp_Object Qcursor_color; 214 Lisp_Object Qcursor_color;
212 Lisp_Object Qcursor_type; 215 Lisp_Object Qcursor_type;
2384 type = HBAR_CURSOR; 2387 type = HBAR_CURSOR;
2385 *width = XINT (XCDR (arg)); 2388 *width = XINT (XCDR (arg));
2386 } 2389 }
2387 else if (NILP (arg)) 2390 else if (NILP (arg))
2388 type = NO_CURSOR; 2391 type = NO_CURSOR;
2392 else if (EQ (arg, Qbox))
2393 type = FILLED_BOX_CURSOR;
2389 else 2394 else
2390 /* Treat anything unknown as "box cursor". 2395 /* Treat anything unknown as "hollow box cursor".
2391 It was bad to signal an error; people have trouble fixing 2396 It was bad to signal an error; people have trouble fixing
2392 .Xdefaults with Emacs, when it has something bad in it. */ 2397 .Xdefaults with Emacs, when it has something bad in it. */
2393 type = FILLED_BOX_CURSOR; 2398 type = HOLLOW_BOX_CURSOR;
2394 2399
2395 return type; 2400 return type;
2396 } 2401 }
2397 2402
2398 void 2403 void
2399 x_set_cursor_type (f, arg, oldval) 2404 x_set_cursor_type (f, arg, oldval)
2400 FRAME_PTR f; 2405 FRAME_PTR f;
2401 Lisp_Object arg, oldval; 2406 Lisp_Object arg, oldval;
2402 { 2407 {
2403 int width; 2408 int width;
2404 2409 Lisp_Object tem;
2410
2405 FRAME_DESIRED_CURSOR (f) = x_specified_cursor_type (arg, &width); 2411 FRAME_DESIRED_CURSOR (f) = x_specified_cursor_type (arg, &width);
2406 f->output_data.w32->cursor_width = width; 2412 f->output_data.w32->cursor_width = width;
2407 2413
2408 /* Make sure the cursor gets redrawn. This is overkill, but how 2414 /* Make sure the cursor gets redrawn. This is overkill, but how
2409 often do people change cursor types? */ 2415 often do people change cursor types? */
2410 update_mode_lines++; 2416 update_mode_lines++;
2417
2418 /* By default, set up the blink-off state depending on the on-state. */
2419
2420 if (FRAME_DESIRED_CURSOR (f) == FILLED_BOX_CURSOR)
2421 FRAME_BLINK_OFF_CURSOR (f) = HOLLOW_BOX_CURSOR;
2422 else if (FRAME_DESIRED_CURSOR (f) == BAR_CURSOR && FRAME_CURSOR_WIDTH (f) > 1)
2423 {
2424 FRAME_BLINK_OFF_CURSOR (f) = BAR_CURSOR;
2425 FRAME_BLINK_OFF_CURSOR_WIDTH (f) = 1;
2426 }
2427 else
2428 FRAME_BLINK_OFF_CURSOR (f) = NO_CURSOR;
2429
2430 tem = Fassoc (arg, Vblink_cursor_alist);
2431 if (!NILP (tem))
2432 {
2433 FRAME_BLINK_OFF_CURSOR (f)
2434 = x_specified_cursor_type (XCDR (tem), &width);
2435 f->output_data.w32->blink_off_cursor_width = width;
2436 }
2411 } 2437 }
2412 2438
2413 void 2439 void
2414 x_set_icon_type (f, arg, oldval) 2440 x_set_icon_type (f, arg, oldval)
2415 struct frame *f; 2441 struct frame *f;
14868 staticpro (&Qauto_lower); 14894 staticpro (&Qauto_lower);
14869 Qbar = intern ("bar"); 14895 Qbar = intern ("bar");
14870 staticpro (&Qbar); 14896 staticpro (&Qbar);
14871 Qhbar = intern ("hbar"); 14897 Qhbar = intern ("hbar");
14872 staticpro (&Qhbar); 14898 staticpro (&Qhbar);
14899 Qbox = intern ("box");
14900 staticpro (&Qbox);
14901 Qhollow = intern ("hollow");
14902 staticpro (&Qhollow);
14873 Qborder_color = intern ("border-color"); 14903 Qborder_color = intern ("border-color");
14874 staticpro (&Qborder_color); 14904 staticpro (&Qborder_color);
14875 Qborder_width = intern ("border-width"); 14905 Qborder_width = intern ("border-width");
14876 staticpro (&Qborder_width); 14906 staticpro (&Qborder_width);
14877 Qbox = intern ("box"); 14907 Qbox = intern ("box");
15108 system to handle them. */); 15138 system to handle them. */);
15109 w32_pass_extra_mouse_buttons_to_system = 0; 15139 w32_pass_extra_mouse_buttons_to_system = 0;
15110 15140
15111 init_x_parm_symbols (); 15141 init_x_parm_symbols ();
15112 15142
15143 DEFVAR_LISP ("blink-cursor-alist", &Vblink_cursor_alist,
15144 doc: /* Alist specifying how to blink the cursor off.
15145 Each element has the form (ON-STATE . OFF-STATE). Whenever the
15146 `cursor-type' frame-parameter or variable equals ON-STATE,
15147 comparing using `equal', Emacs uses OFF-STATE to specify
15148 how to blink it off. */);
15149 Vblink_cursor_alist = Qnil;
15150
15113 DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, 15151 DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path,
15114 doc: /* List of directories to search for bitmap files for w32. */); 15152 doc: /* List of directories to search for bitmap files for w32. */);
15115 Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); 15153 Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH");
15116 15154
15117 DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, 15155 DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape,