aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorDmitry Antipov2014-07-25 10:01:39 +0400
committerDmitry Antipov2014-07-25 10:01:39 +0400
commit88cd403ca7cc46d9ffcf9ec3564f5526d931e113 (patch)
tree3e88a28a35b16e38891eebd40b791d434af125ff /src/w32term.c
parent934eeab5ff5d3dbe233f8fd1acd698b401aee44c (diff)
downloademacs-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/w32term.c')
-rw-r--r--src/w32term.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 479744073cd..fd902ee7cd5 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6180,8 +6180,40 @@ x_check_font (struct frame *f, struct font *font)
6180 6180
6181#endif /* GLYPH_DEBUG */ 6181#endif /* GLYPH_DEBUG */
6182 6182
6183/* Show hourglass cursor on frame F. */
6184
6185static void
6186w32_show_hourglass (struct frame *f)
6187{
6188 if (!menubar_in_use && !current_popup_menu)
6189 {
6190 struct w32_output *w32 = FRAME_X_OUTPUT (f);
6191
6192 w32->hourglass_p = 1;
6193 SetCursor (w32->hourglass_cursor);
6194 }
6195}
6196
6197/* Hide hourglass cursor on frame F. */
6198
6199static void
6200w32_hide_hourglass (struct frame *f)
6201{
6202 struct w32_output *w32 = FRAME_X_OUTPUT (f);
6203
6204 w32->hourglass_p = 0;
6205 SetCursor (w32->current_cursor);
6206}
6207
6208/* FIXME: old code did that, but I don't know why. Anyway,
6209 this is used for non-GUI frames (see cancel_hourglass). */
6210
6211void
6212w32_arrow_cursor (void)
6213{
6214 SetCursor (w32_load_cursor (IDC_ARROW));
6215}
6183 6216
6184
6185/*********************************************************************** 6217/***********************************************************************
6186 Initialization 6218 Initialization
6187 ***********************************************************************/ 6219 ***********************************************************************/
@@ -6297,7 +6329,9 @@ static struct redisplay_interface w32_redisplay_interface =
6297 w32_draw_window_cursor, 6329 w32_draw_window_cursor,
6298 w32_draw_vertical_window_border, 6330 w32_draw_vertical_window_border,
6299 w32_draw_window_divider, 6331 w32_draw_window_divider,
6300 w32_shift_glyphs_for_insert 6332 w32_shift_glyphs_for_insert,
6333 w32_show_hourglass,
6334 w32_hide_hourglass
6301}; 6335};
6302 6336
6303static void x_delete_terminal (struct terminal *term); 6337static void x_delete_terminal (struct terminal *term);