/* Platform-independent portion of hourglass implementation. */
+#ifdef HAVE_WINDOW_SYSTEM
+
/* Non-zero means an hourglass cursor is currently shown. */
int hourglass_shown_p;
an hourglass cursor on all frames. */
struct atimer *hourglass_atimer;
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Name of the face used to display glyphless characters. */
Lisp_Object Qglyphless_char;
/* Method symbols for Vglyphless_char_display. */
static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width;
-/* Default pixel width of `thin-space' display method. */
-#define THIN_SPACE_WIDTH 1
-
/* Default number of seconds to wait before displaying an hourglass
cursor. */
#define DEFAULT_HOURGLASS_DELAY 1
-\f
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* Default pixel width of `thin-space' display method. */
+#define THIN_SPACE_WIDTH 1
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Function prototypes. */
static void setup_for_ellipsis (struct it *, int);
}
}
+#ifdef HAVE_WINDOW_SYSTEM
/* Get the bounding box of the display area AREA of window W, without
mode lines and both fringes of the window. Return in *TOP_LEFT_X
*bottom_right_y += *top_left_y;
}
+#endif /* HAVE_WINDOW_SYSTEM */
-\f
/***********************************************************************
Utilities
***********************************************************************/
doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */);
Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
+#ifdef HAVE_WINDOW_SYSTEM
hourglass_atimer = NULL;
hourglass_shown_p = 0;
+#endif /* HAVE_WINDOW_SYSTEM */
DEFSYM (Qglyphless_char, "glyphless-char");
DEFSYM (Qhex_code, "hex-code");
help_echo_showing_p = 0;
}
+#ifdef HAVE_WINDOW_SYSTEM
+
/* Platform-independent portion of hourglass implementation. */
/* Cancel a currently active hourglass timer, and start a new one. */
void
start_hourglass (void)
{
-#if defined (HAVE_WINDOW_SYSTEM)
struct timespec delay;
cancel_hourglass ();
hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
show_hourglass, NULL);
-#endif
}
void
cancel_hourglass (void)
{
-#if defined (HAVE_WINDOW_SYSTEM)
if (hourglass_atimer)
{
cancel_atimer (hourglass_atimer);
if (hourglass_shown_p)
hide_hourglass ();
-#endif
}
+
+#endif /* HAVE_WINDOW_SYSTEM */