diff options
| author | Dmitry Antipov | 2014-07-25 10:01:39 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-07-25 10:01:39 +0400 |
| commit | 88cd403ca7cc46d9ffcf9ec3564f5526d931e113 (patch) | |
| tree | 3e88a28a35b16e38891eebd40b791d434af125ff /src/w32fns.c | |
| parent | 934eeab5ff5d3dbe233f8fd1acd698b401aee44c (diff) | |
| download | emacs-88cd403ca7cc46d9ffcf9ec3564f5526d931e113.tar.gz emacs-88cd403ca7cc46d9ffcf9ec3564f5526d931e113.zip | |
Move hourglass machinery to RIF.
* dispextern.h (struct redisplay_interface): New members
show_hourglass and hide_hourglass. Indent comments.
(show_hourglass, hide_hourglass): Remove prototypes.
* nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
(ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
(ns_redisplay_interface): Add them.
* w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
* w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
(w32_arrow_cursor): New function to hack around non-GUI frames.
(w32_redisplay_interface): Add new functions.
* w32term.h (w32_arror_cursor): Add prototype.
* xdisp.c (show_hourglass): New function, refactored out from
platform-dependend code.
(cancel_hourglass): Now call to RIF function.
* xfns.c (show_hourglass, hide_hourglass): Refactor to ...
* xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
(x_redisplay_interface): Add new functions.
Diffstat (limited to 'src/w32fns.c')
| -rw-r--r-- | src/w32fns.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index b76c81fdf1f..dbd83444c99 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -5488,67 +5488,6 @@ no value of TYPE (always string in the MS Windows case). */) | |||
| 5488 | 5488 | ||
| 5489 | #endif /* TODO */ | 5489 | #endif /* TODO */ |
| 5490 | 5490 | ||
| 5491 | |||
| 5492 | /*********************************************************************** | ||
| 5493 | Busy cursor | ||
| 5494 | ***********************************************************************/ | ||
| 5495 | |||
| 5496 | /* Display an hourglass cursor. Set the hourglass_p flag in display info | ||
| 5497 | to indicate that an hourglass cursor is shown. */ | ||
| 5498 | |||
| 5499 | void | ||
| 5500 | show_hourglass (struct atimer *timer) | ||
| 5501 | { | ||
| 5502 | hourglass_atimer = NULL; | ||
| 5503 | |||
| 5504 | if (!hourglass_shown_p) | ||
| 5505 | { | ||
| 5506 | Lisp_Object tail, frame; | ||
| 5507 | |||
| 5508 | block_input (); | ||
| 5509 | FOR_EACH_FRAME (tail, frame) | ||
| 5510 | { | ||
| 5511 | struct frame *f = XFRAME (frame); | ||
| 5512 | |||
| 5513 | if (FRAME_W32_P (f) && !menubar_in_use && !current_popup_menu) | ||
| 5514 | { | ||
| 5515 | f->output_data.w32->hourglass_p = 1; | ||
| 5516 | SetCursor (f->output_data.w32->hourglass_cursor); | ||
| 5517 | } | ||
| 5518 | } | ||
| 5519 | unblock_input (); | ||
| 5520 | hourglass_shown_p = 1; | ||
| 5521 | } | ||
| 5522 | } | ||
| 5523 | |||
| 5524 | /* Hide the hourglass cursor on all frames, if it is currently shown. */ | ||
| 5525 | |||
| 5526 | void | ||
| 5527 | hide_hourglass (void) | ||
| 5528 | { | ||
| 5529 | if (hourglass_shown_p) | ||
| 5530 | { | ||
| 5531 | Lisp_Object tail, frame; | ||
| 5532 | |||
| 5533 | block_input (); | ||
| 5534 | FOR_EACH_FRAME (tail, frame) | ||
| 5535 | { | ||
| 5536 | struct frame *f = XFRAME (frame); | ||
| 5537 | |||
| 5538 | if (FRAME_W32_P (f)) | ||
| 5539 | { | ||
| 5540 | f->output_data.w32->hourglass_p = 0; | ||
| 5541 | SetCursor (f->output_data.w32->current_cursor); | ||
| 5542 | } | ||
| 5543 | else | ||
| 5544 | /* No cursors on non GUI frames - restore to stock arrow cursor. */ | ||
| 5545 | SetCursor (w32_load_cursor (IDC_ARROW)); | ||
| 5546 | } | ||
| 5547 | unblock_input (); | ||
| 5548 | hourglass_shown_p = 0; | ||
| 5549 | } | ||
| 5550 | } | ||
| 5551 | |||
| 5552 | /*********************************************************************** | 5491 | /*********************************************************************** |
| 5553 | Tool tips | 5492 | Tool tips |
| 5554 | ***********************************************************************/ | 5493 | ***********************************************************************/ |