diff options
| author | Kim F. Storm | 2002-08-30 12:01:27 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-08-30 12:01:27 +0000 |
| commit | 154372ef09c228e9b8a3fd1596216776d95f273f (patch) | |
| tree | 2a089f3e0a153b3b1eaebc7e7ce3fa561cf387d4 /src | |
| parent | e4764db0dd6baf9e8d1152463610d811d36f2ef5 (diff) | |
| download | emacs-154372ef09c228e9b8a3fd1596216776d95f273f.tar.gz emacs-154372ef09c228e9b8a3fd1596216776d95f273f.zip | |
(x_specified_cursor_type): Removed.
(x_set_cursor_type): Use set_frame_cursor_types.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macfns.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/macfns.c b/src/macfns.c index d37beb9d158..8ec44b18f15 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -2389,50 +2389,12 @@ x_set_border_color (f, arg, oldval) | |||
| 2389 | update_face_from_frame_parameter (f, Qborder_color, arg); | 2389 | update_face_from_frame_parameter (f, Qborder_color, arg); |
| 2390 | } | 2390 | } |
| 2391 | 2391 | ||
| 2392 | /* Value is the internal representation of the specified cursor type | ||
| 2393 | ARG. If type is BAR_CURSOR, return in *WIDTH the specified width | ||
| 2394 | of the bar cursor. */ | ||
| 2395 | |||
| 2396 | enum text_cursor_kinds | ||
| 2397 | x_specified_cursor_type (arg, width) | ||
| 2398 | Lisp_Object arg; | ||
| 2399 | int *width; | ||
| 2400 | { | ||
| 2401 | enum text_cursor_kinds type; | ||
| 2402 | |||
| 2403 | if (EQ (arg, Qbar)) | ||
| 2404 | { | ||
| 2405 | type = BAR_CURSOR; | ||
| 2406 | *width = 2; | ||
| 2407 | } | ||
| 2408 | else if (CONSP (arg) | ||
| 2409 | && EQ (XCAR (arg), Qbar) | ||
| 2410 | && INTEGERP (XCDR (arg)) | ||
| 2411 | && XINT (XCDR (arg)) >= 0) | ||
| 2412 | { | ||
| 2413 | type = BAR_CURSOR; | ||
| 2414 | *width = XINT (XCDR (arg)); | ||
| 2415 | } | ||
| 2416 | else if (NILP (arg)) | ||
| 2417 | type = NO_CURSOR; | ||
| 2418 | else | ||
| 2419 | /* Treat anything unknown as "box cursor". | ||
| 2420 | It was bad to signal an error; people have trouble fixing | ||
| 2421 | .Xdefaults with Emacs, when it has something bad in it. */ | ||
| 2422 | type = FILLED_BOX_CURSOR; | ||
| 2423 | |||
| 2424 | return type; | ||
| 2425 | } | ||
| 2426 | |||
| 2427 | void | 2392 | void |
| 2428 | x_set_cursor_type (f, arg, oldval) | 2393 | x_set_cursor_type (f, arg, oldval) |
| 2429 | FRAME_PTR f; | 2394 | FRAME_PTR f; |
| 2430 | Lisp_Object arg, oldval; | 2395 | Lisp_Object arg, oldval; |
| 2431 | { | 2396 | { |
| 2432 | int width; | 2397 | set_frame_cursor_types (f, arg); |
| 2433 | |||
| 2434 | FRAME_DESIRED_CURSOR (f) = x_specified_cursor_type (arg, &width); | ||
| 2435 | f->output_data.mac->cursor_width = width; | ||
| 2436 | 2398 | ||
| 2437 | /* Make sure the cursor gets redrawn. This is overkill, but how | 2399 | /* Make sure the cursor gets redrawn. This is overkill, but how |
| 2438 | often do people change cursor types? */ | 2400 | often do people change cursor types? */ |