/* Interface definitions for display code.
-Copyright (C) 1985, 1993-1994, 1997-2012 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1994, 1997-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Lisp string, this is a position in that string. If it is a
buffer, this is a position in that buffer. A value of -1
together with a null object means glyph is a truncation glyph at
- the start of a row. */
+ the start of a row. Right truncation and continuation glyphs at
+ the right edge of a row have their position set to the next
+ buffer position that is not shown on this row. Glyphs inserted
+ by redisplay, such as the empty space after the end of a line on
+ TTYs, or the overlay-arrow on a TTY, have this set to -1. */
ptrdiff_t charpos;
- /* Lisp object source of this glyph. Currently either a buffer or
- a string, if the glyph was produced from characters which came from
+ /* Lisp object source of this glyph. Currently either a buffer or a
+ string, if the glyph was produced from characters which came from
a buffer or a string; or 0 if the glyph was inserted by redisplay
- for its own purposes such as padding. */
+ for its own purposes, such as padding or truncation/continuation
+ glyphs, or the overlay-arrow glyphs on TTYs. */
Lisp_Object object;
/* Width in pixels. */
2. Window glyph matrices on frames having frame glyph matrices.
Such matrices are sub-matrices of their corresponding frame matrix,
- i.e. frame glyph matrices and window glyph matrices share the same
- glyph memory which is allocated in form of a glyph_pool structure.
+ i.e., frame glyph matrices and window glyph matrices share the same
+ glyph memory, which is allocated in the form of a glyph_pool structure.
Glyph rows in such a window matrix are slices of frame matrix rows.
2. Free-standing window glyph matrices managing their own glyph
? current_mode_line_height \
: (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME (W->frame), \
+ : estimate_mode_line_height (XFRAME ((W)->frame), \
CURRENT_MODE_LINE_FACE_ID (W))))
/* Return the current height of the header line of window W. If not
? current_header_line_height \
: (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME (W->frame),\
+ : estimate_mode_line_height (XFRAME ((W)->frame), \
HEADER_LINE_FACE_ID)))
/* Return the height of the desired mode line of window W. */
/* Value is non-zero if window W wants a mode line. */
-#define WINDOW_WANTS_MODELINE_P(W) \
- (!MINI_WINDOW_P ((W)) \
- && !(W)->pseudo_window_p \
- && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
- && BUFFERP (W->buffer) \
- && !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)) \
- && WINDOW_TOTAL_LINES (W) > 1)
+#define WINDOW_WANTS_MODELINE_P(W) \
+ (!MINI_WINDOW_P ((W)) \
+ && !(W)->pseudo_window_p \
+ && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
+ && BUFFERP ((W)->contents) \
+ && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
+ && WINDOW_TOTAL_LINES (W) > 1)
/* Value is true if window W wants a header line. */
#define WINDOW_WANTS_HEADER_LINE_P(W) \
- (!MINI_WINDOW_P ((W)) \
+ (BUFFERP ((W)->contents) \
+ ? (!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
- && BUFFERP (W->buffer) \
- && !NILP (BVAR (XBUFFER (W->buffer), header_line_format)) \
- && WINDOW_TOTAL_LINES (W) > 1 \
- + !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)))
-
+ && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \
+ && WINDOW_TOTAL_LINES (W) > \
+ (1 + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))) \
+ : 0)
/* Return proper value to be used as baseline offset of font that has
ASCENT and DESCENT to draw characters by the font at the vertical
shadow colors derived from the background color of the face. */
enum face_box_type box;
+ /* Style of underlining. */
+ enum face_underline_type underline_type;
+
/* If `box' above specifies a 3D type, 1 means use box_color for
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;
void prepare_image_for_display (struct frame *, struct image *);
ptrdiff_t lookup_image (struct frame *, Lisp_Object);
-unsigned long image_background (struct image *, struct frame *,
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
+#define RGB_PIXEL_COLOR unsigned long
+#endif
+
+#ifdef HAVE_NTGUI
+#define RGB_PIXEL_COLOR COLORREF
+#endif
+
+RGB_PIXEL_COLOR image_background (struct image *, struct frame *,
XImagePtr_or_DC ximg);
int image_background_transparent (struct image *, struct frame *,
XImagePtr_or_DC mask);