/* Interface definitions for display code.
-Copyright (C) 1985, 1993-1994, 1997-2011 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1994, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
typedef XImagePtr XImagePtr_or_DC;
#endif
+#ifdef HAVE_WINDOW_SYSTEM
+# include "systime.h"
+#endif
+
#ifndef HAVE_WINDOW_SYSTEM
typedef int Cursor;
#define No_Cursor (0)
#define GLYPH_DEBUG 0
#endif
-/* If XASSERTS is non-zero, additional consistency checks are activated.
- Turn it off by defining the macro XASSERTS to zero. */
-
-#ifndef XASSERTS
-#define XASSERTS 0
-#endif
-
/* Macros to include code only if GLYPH_DEBUG != 0. */
#if GLYPH_DEBUG
#define IF_DEBUG(X) (void) 0
#endif
-#if XASSERTS
-#define xassert(X) do {if (!(X)) abort ();} while (0)
-#else
-#define xassert(X) (void) 0
-#endif
-
/* Macro for displaying traces of redisplay. If Emacs was compiled
with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to
a non-zero value in debugging sessions to activate traces. */
{
/* Metrics of a partial glyph of an image (type == IMAGE_GLYPH). */
struct glyph_slice img;
- /* Start and end indices of glyphs of a graphme cluster of a
+ /* Start and end indices of glyphs of a grapheme cluster of a
composition (type == COMPOSITE_GLYPH). */
struct { int from, to; } cmp;
/* Pixel offsets for upper and lower part of the acronym. */
/* Length of acronym or hexadecimal code string (at most 8). */
unsigned len : 4;
/* Character to display. Actually we need only 22 bits. */
- unsigned ch : 26;
+ unsigned ch : 25;
} glyphless;
/* Used to compare all bit-fields above in one step. */
FACE_SUNKEN_BOX
};
+/* Underline type. */
+
+enum face_underline_type
+{
+ FACE_UNDER_LINE,
+ FACE_UNDER_WAVE
+};
/* Structure describing a realized face.
drawing shadows. */
unsigned use_box_color_for_shadows_p : 1;
+ /* Style of underlining. */
+ enum face_underline_type underline_type;
+
/* Non-zero if text in this face should be underlined, overlined,
strike-through or have a box drawn around it. */
unsigned underline_p : 1;
unsigned strike_through_color_defaulted_p : 1;
unsigned box_color_defaulted_p : 1;
- /* TTY appearances. Blinking is not yet implemented. Colors are
- found in `lface' with empty color string meaning the default
- color of the TTY. */
+ /* TTY appearances. Colors are found in `lface' with empty color
+ string meaning the default color of the TTY. */
unsigned tty_bold_p : 1;
- unsigned tty_dim_p : 1;
+ unsigned tty_italic_p : 1;
unsigned tty_underline_p : 1;
- unsigned tty_alt_charset_p : 1;
unsigned tty_reverse_p : 1;
- unsigned tty_blinking_p : 1;
/* 1 means that colors of this face may not be freed because they
have been copied bitwise from a base face (see
struct bidi_saved_info next_for_neutral; /* surrounding characters for... */
struct bidi_saved_info prev_for_neutral; /* ...resolving neutrals */
struct bidi_saved_info next_for_ws; /* character after sequence of ws */
- ptrdiff_t next_en_pos; /* position of next EN char for ET */
+ ptrdiff_t next_en_pos; /* pos. of next char for determining ET type */
+ bidi_type_t next_en_type; /* type of char at next_en_pos */
ptrdiff_t ignore_bn_limit; /* position until which to ignore BNs */
bidi_dir_t sor; /* direction of start-of-run in effect */
int scan_dir; /* direction of text scan, 1: forw, -1: back */
Don't handle some `display' properties in these strings. */
unsigned string_from_display_prop_p : 1;
+ /* 1 means `string' comes from a `line-prefix' or `wrap-prefix'
+ property. */
+ unsigned string_from_prefix_prop_p : 1;
+
/* 1 means we are iterating an object that came from a value of a
`display' property. */
unsigned from_disp_prop_p : 1;
struct display_pos current;
/* Total number of overlay strings to process. This can be >
- OVERLAY_STRING_CHUNK_SIZE. */
+ OVERLAY_STRING_CHUNK_SIZE. Value is dependable only when
+ current.overlay_string_index >= 0. Use the latter to determine
+ whether an overlay string is being iterated over, because
+ n_overlay_strings can be positive even when we are not rendering
+ an overlay string. */
ptrdiff_t n_overlay_strings;
/* The charpos where n_overlay_strings was calculated. This should
/* If non-nil, a Lisp string being processed. If
current.overlay_string_index >= 0, this is an overlay string from
- pos. */
+ pos. Use STRINGP (it.string) to test whether we are rendering a
+ string or something else; do NOT use BUFFERP (it.object). */
Lisp_Object string;
/* If non-nil, we are processing a string that came
bidi_dir_t paragraph_embedding;
unsigned multibyte_p : 1;
unsigned string_from_display_prop_p : 1;
+ unsigned string_from_prefix_prop_p : 1;
unsigned display_ellipsis_p : 1;
unsigned avoid_cursor_p : 1;
unsigned bidi_p:1;
and continuation glyphs, or blanks that extend each line to the
edge of the window on a TTY.
+ Do NOT use !BUFFERP (it.object) as a test whether we are
+ iterating over a string; use STRINGP (it.string) instead.
+
Position is the current iterator position in object. */
Lisp_Object object;
struct text_pos position;
void (*flush_display) (struct frame *f);
/* Flush the display of frame F if non-NULL. This is called
- during redisplay, and should be NULL on systems which flushes
+ during redisplay, and should be NULL on systems which flush
automatically before reading input. */
void (*flush_display_optional) (struct frame *f);
- /* Clear the mouse hightlight in window W, if there is any. */
+ /* Clear the mouse highlight in window W, if there is any. */
void (*clear_window_mouse_face) (struct window *w);
/* Set *LEFT and *RIGHT to the left and right overhang of GLYPH on
{
/* The time in seconds at which the image was last displayed. Set
in prepare_image_for_display. */
- time_t timestamp;
+ EMACS_TIME timestamp;
/* Pixmaps of the image. */
Pixmap pixmap, mask;
#define TTY_CAP_UNDERLINE 0x02
#define TTY_CAP_BOLD 0x04
#define TTY_CAP_DIM 0x08
-#define TTY_CAP_BLINK 0x10
-#define TTY_CAP_ALT_CHARSET 0x20
+#define TTY_CAP_ITALIC 0x10
\f
/***********************************************************************
void w32_init_fringe (struct redisplay_interface *);
void w32_reset_fringes (void);
#endif
+
+extern unsigned row_hash (struct glyph_row *);
+
/* Defined in image.c */
#ifdef HAVE_WINDOW_SYSTEM
char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
int *);
void prepare_face_for_display (struct frame *, struct face *);
+#ifdef HAVE_STRCASECMP
+#define xstrcasecmp(x,y) strcasecmp ((x), (y))
+#else
int xstrcasecmp (const char *, const char *);
+#endif
int lookup_named_face (struct frame *, Lisp_Object, int);
int lookup_basic_face (struct frame *, int);
int smaller_face (struct frame *, int, int);
EXFUN (Fx_hide_tip, 0);
extern void start_hourglass (void);
extern void cancel_hourglass (void);
-extern int hourglass_started (void);
extern int hourglass_shown_p;
struct atimer; /* Defined in atimer.h. */
/* If non-null, an asynchronous timer that, when it expires, displays
extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
extern struct terminal *get_named_tty (const char *);
EXFUN (Ftty_type, 1);
+EXFUN (Fcontrolling_tty_p, 1);
extern void create_tty_output (struct frame *);
extern struct terminal *init_tty (const char *, const char *, int);
extern void tty_append_glyph (struct it *);