`top-line' and `top_line' to `header-line' and `header_line'.
Likewise for similar spellings.
/* real setup is done in loaddefs.el */
buffer_defaults.mode_line_format = build_string ("%-");
- buffer_defaults.top_line_format = Qnil;
+ buffer_defaults.header_line_format = Qnil;
buffer_defaults.abbrev_mode = Qnil;
buffer_defaults.overwrite_mode = Qnil;
buffer_defaults.case_fold_search = Qt;
XSETFASTINT (buffer_local_flags.indicate_empty_lines, 0x400000);
XSETFASTINT (buffer_local_flags.scroll_up_aggressively, 0x800000);
XSETFASTINT (buffer_local_flags.scroll_down_aggressively, 0x1000000);
- XSETFASTINT (buffer_local_flags.top_line_format, 0x2000000);
+ XSETFASTINT (buffer_local_flags.header_line_format, 0x2000000);
Vbuffer_alist = Qnil;
current_buffer = 0;
"Default value of `mode-line-format' for buffers that don't override it.\n\
This is the same as (default-value 'mode-line-format).");
- DEFVAR_LISP_NOPRO ("default-top-line-format",
- &buffer_defaults.top_line_format,
- "Default value of `top-line-format' for buffers that don't override it.\n\
-This is the same as (default-value 'top-line-format).");
+ DEFVAR_LISP_NOPRO ("default-header-line-format",
+ &buffer_defaults.header_line_format,
+ "Default value of `header-line-format' for buffers that don't override it.\n\
+This is the same as (default-value 'header-line-format).");
DEFVAR_LISP_NOPRO ("default-abbrev-mode",
&buffer_defaults.abbrev_mode,
don't override it. This is the same as (default-value\n\
'scroll-down-aggressively).");
- DEFVAR_PER_BUFFER ("top-line-format", ¤t_buffer->top_line_format,
+ DEFVAR_PER_BUFFER ("header-line-format",
+ ¤t_buffer->header_line_format,
Qnil,
"Analogous to `mode-line-format', but for a mode line displayed\n\
at the top of windows.");
/* Analogous to mode_line_format for the line displayed at the top
of windows. Nil means don't display that line. */
- Lisp_Object top_line_format;
+ Lisp_Object header_line_format;
/* Keys that are bound local to this buffer. */
Lisp_Object keymap;
/* Non-zero means window displayed in this matrix has a top mode
line. */
- unsigned top_line_p : 1;
+ unsigned header_line_p : 1;
#ifdef GLYPH_DEBUG
/* A string identifying the method used to display the matrix. */
This is always the first row in MATRIX because that's the only
way that works in frame-based redisplay. */
-#define MATRIX_TOP_LINE_ROW(MATRIX) (MATRIX)->rows
+#define MATRIX_HEADER_LINE_ROW(MATRIX) (MATRIX)->rows
/* Return a pointer to first row in MATRIX used for text display. */
#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \
(MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \
- && (ROW)->y < WINDOW_DISPLAY_TOP_LINE_HEIGHT ((W)))
+ && (ROW)->y < WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))
/* Non-zero if ROW is partially visible at the bottom of window W. */
if not known. This macro is called under circumstances where
MATRIX might not have been allocated yet. */
-#define MATRIX_TOP_LINE_HEIGHT(MATRIX) \
+#define MATRIX_HEADER_LINE_HEIGHT(MATRIX) \
((MATRIX) && (MATRIX)->rows \
- ? MATRIX_TOP_LINE_ROW (MATRIX)->height \
+ ? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
: 0)
/* Return the current height of the mode line of window W. If not
known from W's current glyph matrix, return an estimation based on
the height of the font of the face `top-line'. */
-#define CURRENT_TOP_LINE_HEIGHT(W) \
- (MATRIX_TOP_LINE_HEIGHT ((W)->current_matrix) \
- ? MATRIX_TOP_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME ((W)->frame), TOP_LINE_FACE_ID))
+#define CURRENT_HEADER_LINE_HEIGHT(W) \
+ (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
+ ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
+ : estimate_mode_line_height (XFRAME ((W)->frame), HEADER_LINE_FACE_ID))
/* Return the height of the desired mode line of window W. */
/* Return the height of the desired top line of window W. */
-#define DESIRED_TOP_LINE_HEIGHT(W) \
- MATRIX_TOP_LINE_HEIGHT ((W)->desired_matrix)
+#define DESIRED_HEADER_LINE_HEIGHT(W) \
+ MATRIX_HEADER_LINE_HEIGHT ((W)->desired_matrix)
/* Like FRAME_INTERNAL_BORDER_WIDTH but checks whether frame F is a
window-system frame. */
/* Height in pixels of the top line. Zero if W doesn't have a top
line. */
-#define WINDOW_DISPLAY_TOP_LINE_HEIGHT(W) \
- (WINDOW_WANTS_TOP_LINE_P ((W)) \
- ? CURRENT_TOP_LINE_HEIGHT (W) \
+#define WINDOW_DISPLAY_HEADER_LINE_HEIGHT(W) \
+ (WINDOW_WANTS_HEADER_LINE_P ((W)) \
+ ? CURRENT_HEADER_LINE_HEIGHT (W) \
: 0)
/* Pixel height of window W without mode line. */
#define WINDOW_DISPLAY_TEXT_HEIGHT(W) \
(WINDOW_DISPLAY_PIXEL_HEIGHT ((W)) \
- WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W)) \
- - WINDOW_DISPLAY_TOP_LINE_HEIGHT ((W)))
+ - WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))
/* Left edge of W in pixels relative to its frame. */
/* Value is non-zero if window W wants a top line. */
-#define WINDOW_WANTS_TOP_LINE_P(W) \
+#define WINDOW_WANTS_HEADER_LINE_P(W) \
(!MINI_WINDOW_P (W) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W))) \
- && !NILP (XBUFFER ((W)->buffer)->top_line_format))
+ && !NILP (XBUFFER ((W)->buffer)->header_line_format))
\f
/***********************************************************************
MODE_LINE_FACE_ID,
TOOL_BAR_FACE_ID,
BITMAP_AREA_FACE_ID,
- TOP_LINE_FACE_ID,
+ HEADER_LINE_FACE_ID,
BASIC_FACE_ID_SENTINEL
};
unsigned multibyte_p : 1;
/* 1 means window has a mode line at its top. */
- unsigned top_line_p : 1;
+ unsigned header_line_p : 1;
/* 1 means `string' is the value of a `display' property.
Don't handle some `display' properties in these strings. */
int i;
int new_rows;
int marginal_areas_changed_p = 0;
- int top_line_changed_p = 0;
- int top_line_p = 0;
+ int header_line_changed_p = 0;
+ int header_line_p = 0;
int left = -1, right = -1;
int window_x, window_y, window_width, window_height;
/* See if W had a top line that has disappeared now, or vice versa. */
if (w)
{
- top_line_p = WINDOW_WANTS_TOP_LINE_P (w);
- top_line_changed_p = top_line_p != matrix->top_line_p;
+ header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
+ header_line_changed_p = header_line_p != matrix->header_line_p;
}
- matrix->top_line_p = top_line_p;
+ matrix->header_line_p = header_line_p;
/* Do nothing if MATRIX' size, position, vscroll, and marginal areas
haven't changed. This optimization is important because preserving
if (!marginal_areas_changed_p
&& !fonts_changed_p
- && !top_line_changed_p
+ && !header_line_changed_p
&& matrix->window_top_y == XFASTINT (w->top)
&& matrix->window_height == window_height
&& matrix->window_vscroll == w->vscroll
if (w == NULL
|| row == matrix->rows + dim.height - 1
- || (row == matrix->rows && matrix->top_line_p))
+ || (row == matrix->rows && matrix->header_line_p))
{
row->glyphs[TEXT_AREA]
= row->glyphs[LEFT_MARGIN_AREA];
its own memory. Allocate glyph memory from the heap. */
if (dim.width > matrix->matrix_w
|| new_rows
- || top_line_changed_p
+ || header_line_changed_p
|| marginal_areas_changed_p)
{
struct glyph_row *row = matrix->rows;
/* The mode line never has marginal areas. */
if (row == matrix->rows + dim.height - 1
- || (row == matrix->rows && matrix->top_line_p))
+ || (row == matrix->rows && matrix->header_line_p))
{
row->glyphs[TEXT_AREA]
= row->glyphs[LEFT_MARGIN_AREA];
xassert (start >= 0 && start < matrix->nrows);
xassert (end >= 0 && end <= matrix->nrows);
- min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w);
for (; start < end; ++start)
{
int min_y, max_y;
- min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w);
clear_glyph_row (row);
{
struct glyph_row *row, *end;
struct glyph_row *mode_line_row;
- struct glyph_row *top_line_row = NULL;
+ struct glyph_row *header_line_row = NULL;
int yb, changed_p = 0;
rif->update_window_begin_hook (w);
row = desired_matrix->rows;
end = row + desired_matrix->nrows - 1;
if (row->mode_line_p)
- top_line_row = row++;
+ header_line_row = row++;
/* Update the mode line, if necessary. */
mode_line_row = MATRIX_MODE_LINE_ROW (desired_matrix);
/* Try reusing part of the display by inserting/deleting lines. */
if (row < end && !desired_matrix->no_scrolling_p)
{
- int rc = scrolling_window (w, top_line_row != NULL);
+ int rc = scrolling_window (w, header_line_row != NULL);
if (rc < 0)
{
/* All rows were found to be equal. */
/* Update the top mode line after scrolling because a new top
line would otherwise overwrite lines at the top of the window
that can be scrolled. */
- if (top_line_row && top_line_row->enabled_p)
+ if (header_line_row && header_line_row->enabled_p)
{
- top_line_row->y = 0;
+ header_line_row->y = 0;
update_window_line (w, 0);
changed_p = 1;
}
/* Try to reuse part of the current display of W by scrolling lines.
- TOP_LINE_P non-zero means W has a top mode line.
+ HEADER_LINE_P non-zero means W has a top mode line.
The algorithm is taken from Communications of the ACM, Apr78 "A
Technique for Isolating Differences Between Files." It should take
1 if we did scroll. */
static int
-scrolling_window (w, top_line_p)
+scrolling_window (w, header_line_p)
struct window *w;
- int top_line_p;
+ int header_line_p;
{
struct symbol
{
int yb = window_text_bottom_y (w);
/* Skip over rows equal at the start. */
- i = top_line_p ? 1 : 0;
+ i = header_line_p ? 1 : 0;
while (i < current_matrix->nrows - 1
&& MATRIX_ROW_ENABLED_P (current_matrix, i)
&& MATRIX_ROW_ENABLED_P (desired_matrix, i)
if (mode_line_p)
row = MATRIX_MODE_LINE_ROW (w->current_matrix);
else
- row = MATRIX_TOP_LINE_ROW (w->current_matrix);
+ row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
if (row->mode_line_p && row->enabled_p)
{
Lisp_Object string;
int charpos;
- posn = part == 1 ? Qmode_line : Qtop_line;
+ posn = part == 1 ? Qmode_line : Qheader_line;
string = mode_line_string (w, wx, wy, part == 1, &charpos);
if (STRINGP (string))
string_info = Fcons (string, make_number (charpos));
else if (part == 2)
posn = Qvertical_line;
else if (part == 3)
- posn = Qtop_line;
+ posn = Qheader_line;
else
XSETINT (posn,
buffer_posn_from_coords (XWINDOW (window),
else if (part == 2)
posn = Qvertical_line;
else if (part == 3)
- posn = Qtop_line;
+ posn = Qheader_line;
else
XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy));
}
else if (area == 2)
posn = Qvertical_line;
else if (area == 3)
- posn = Qtop_line;
+ posn = Qheader_line;
else
XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy));
}
(Fget ((event_head), Qevent_kind))
/* Symbols to use for non-text mouse positions. */
-extern Lisp_Object Qmode_line, Qvertical_line, Qtop_line;
+extern Lisp_Object Qmode_line, Qvertical_line, Qheader_line;
/* Forward declaration for prototypes. */
struct input_event;
&& *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
/* On the mode line. */
return 2;
- else if (WINDOW_WANTS_TOP_LINE_P (w)
- && *y < top_y + CURRENT_TOP_LINE_HEIGHT (w))
+ else if (WINDOW_WANTS_HEADER_LINE_P (w)
+ && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
/* On the top line. */
return 4;
else if (*x < left_x || *x >= right_x)
If COORDINATES are in the text portion of WINDOW,\n\
the coordinates relative to the window are returned.\n\
If they are in the mode line of WINDOW, `mode-line' is returned.\n\
-If they are in the top mode line of WINDOW, `top-line' is returned.\n\
+If they are in the top mode line of WINDOW, `header-line' is returned.\n\
If they are in the bitmap-area to the left of the window,\n\
`left-bitmap-area' is returned, if they are in the area on the right of\n\
the window, `right-bitmap-area' is returned.\n\
return Qvertical_line;
case 4:
- return Qtop_line;
+ return Qheader_line;
case 5:
return Qleft_bitmap_area;
{
if (MINI_WINDOW_P (w)
|| (!WINDOW_WANTS_MODELINE_P (w)
- && !WINDOW_WANTS_TOP_LINE_P (w)))
+ && !WINDOW_WANTS_HEADER_LINE_P (w)))
size = 1;
else
size = window_min_height;
if (WINDOW_WANTS_MODELINE_P (w))
height -= CURRENT_MODE_LINE_HEIGHT (w);
- if (WINDOW_WANTS_TOP_LINE_P (w))
- height -= CURRENT_TOP_LINE_HEIGHT (w);
+ if (WINDOW_WANTS_HEADER_LINE_P (w))
+ height -= CURRENT_HEADER_LINE_HEIGHT (w);
return height;
}
*box_x = window_box_left (w, area);
*box_y = (FRAME_INTERNAL_BORDER_WIDTH_SAFE (f)
+ XFASTINT (w->top) * CANON_Y_UNIT (f));
- if (WINDOW_WANTS_TOP_LINE_P (w))
- *box_y += CURRENT_TOP_LINE_HEIGHT (w);
+ if (WINDOW_WANTS_HEADER_LINE_P (w))
+ *box_y += CURRENT_HEADER_LINE_HEIGHT (w);
}
BASE_FACE_ID is the id of a base face to use. It must be one of
DEFAULT_FACE_ID for normal text, MODE_LINE_FACE_ID or
- TOP_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for
+ HEADER_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for
displaying the tool-bar.
If ROW is null and BASE_FACE_ID is equal to MODE_LINE_FACE_ID or
- TOP_LINE_FACE_ID, the iterator will be initialized to use the
+ HEADER_LINE_FACE_ID, the iterator will be initialized to use the
corresponding mode line glyph row of the desired matrix of W. */
void
{
if (base_face_id == MODE_LINE_FACE_ID)
row = MATRIX_MODE_LINE_ROW (w->desired_matrix);
- else if (base_face_id == TOP_LINE_FACE_ID)
- row = MATRIX_TOP_LINE_ROW (w->desired_matrix);
+ else if (base_face_id == HEADER_LINE_FACE_ID)
+ row = MATRIX_HEADER_LINE_ROW (w->desired_matrix);
}
/* Clear IT. */
it->last_visible_x -= it->continuation_pixel_width;
}
- it->top_line_p = WINDOW_WANTS_TOP_LINE_P (w);
- it->current_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w) + w->vscroll;
+ it->header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
+ it->current_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w) + w->vscroll;
}
/* Leave room for a border glyph. */
{
int start_at_line_beg_p;
struct glyph_row *row;
- int first_vpos = WINDOW_WANTS_TOP_LINE_P (w) ? 1 : 0;
+ int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
int first_y;
row = w->desired_matrix->rows + first_vpos;
{
struct glyph_matrix *matrix;
struct glyph_row *row;
- int top_line_height;
+ int header_line_height;
/* It's not always possible to find the cursor, e.g, when a window
is full of overlay strings. Don't do anything in that case. */
/* If row->y == top y of window display area, the window isn't tall
enough to display a single line. There is nothing we can do
about it. */
- top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
- if (row->y == top_line_height)
+ header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
+ if (row->y == header_line_height)
return;
if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
{
aggressive = current_buffer->scroll_down_aggressively;
height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w)
- - WINDOW_DISPLAY_TOP_LINE_HEIGHT (w));
+ - WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w));
if (NUMBERP (aggressive))
amount_to_scroll = XFLOATINT (aggressive) * height;
}
{
aggressive = current_buffer->scroll_up_aggressively;
height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w)
- - WINDOW_DISPLAY_TOP_LINE_HEIGHT (w));
+ - WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w));
if (NUMBERP (aggressive))
amount_to_scroll = XFLOATINT (aggressive) * height;
}
/* Find the start of the continued line. This should be fast
because scan_buffer is fast (newline cache). */
- row = w->desired_matrix->rows + (WINDOW_WANTS_TOP_LINE_P (w) ? 1 : 0);
+ row = w->desired_matrix->rows + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0);
init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos),
row, DEFAULT_FACE_ID);
reseat_at_previous_visible_line_start (&it);
&& XFASTINT (w->column_number_displayed) != current_column ()))
/* This means that the window has a mode line. */
&& (WINDOW_WANTS_MODELINE_P (w)
- || WINDOW_WANTS_TOP_LINE_P (w)))
+ || WINDOW_WANTS_HEADER_LINE_P (w)))
{
display_mode_lines (w);
/* If top line height has changed, arrange for a thorough
immediate redisplay using the correct mode line height. */
- if (WINDOW_WANTS_TOP_LINE_P (w)
- && CURRENT_TOP_LINE_HEIGHT (w) != DESIRED_TOP_LINE_HEIGHT (w))
+ if (WINDOW_WANTS_HEADER_LINE_P (w)
+ && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w))
{
fonts_changed_p = 1;
- MATRIX_TOP_LINE_ROW (w->current_matrix)->height
- = DESIRED_TOP_LINE_HEIGHT (w);
+ MATRIX_HEADER_LINE_ROW (w->current_matrix)->height
+ = DESIRED_HEADER_LINE_HEIGHT (w);
}
if (fonts_changed_p)
return 0;
/* If top-line visibility has changed, give up. */
- if (WINDOW_WANTS_TOP_LINE_P (w)
- != MATRIX_TOP_LINE_ROW (w->current_matrix)->mode_line_p)
+ if (WINDOW_WANTS_HEADER_LINE_P (w)
+ != MATRIX_HEADER_LINE_ROW (w->current_matrix)->mode_line_p)
return 0;
/* Give up if old or new display is scrolled vertically. We could
/* Re-compute Y positions. */
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix) + nrows_scrolled;
- min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
max_y = it.last_visible_y;
while (row < bottom_row)
{
/* Scroll the display. */
run.current_y = first_reusable_row->y;
- run.desired_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ run.desired_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
run.height = it.last_visible_y - run.current_y;
if (run.height)
{
bottom_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
row = first_reusable_row;
dy = first_reusable_row->y;
- min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
max_y = it.last_visible_y;
while (row < first_row_to_display)
{
/* Displayed to end of window, but no line containing text was
displayed. Lines were deleted at the end of the window. */
int vpos;
- int top_line_p = WINDOW_WANTS_TOP_LINE_P (w) ? 1 : 0;
+ int header_line_p = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
for (vpos = XFASTINT (w->window_end_vpos); vpos > 0; --vpos)
- if ((w->desired_matrix->rows[vpos + top_line_p].enabled_p
- && w->desired_matrix->rows[vpos + top_line_p].displays_text_p)
- || (!w->desired_matrix->rows[vpos + top_line_p].enabled_p
- && w->current_matrix->rows[vpos + top_line_p].displays_text_p))
+ if ((w->desired_matrix->rows[vpos + header_line_p].enabled_p
+ && w->desired_matrix->rows[vpos + header_line_p].displays_text_p)
+ || (!w->desired_matrix->rows[vpos + header_line_p].enabled_p
+ && w->current_matrix->rows[vpos + header_line_p].displays_text_p))
break;
w->window_end_vpos = make_number (vpos);
if (FRAME_WINDOW_P (it->f))
{
- int i, top_line_height;
+ int i, header_line_height;
/* The line may consist of one space only, that was added to
place the cursor on it. If so, the row's height hasn't been
/* Compute how much of the line is visible. */
row->visible_height = row->height;
- top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (it->w);
- if (row->y < top_line_height)
- row->visible_height -= top_line_height - row->y;
+ header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (it->w);
+ if (row->y < header_line_height)
+ row->visible_height -= header_line_height - row->y;
else
{
int max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (it->w);
w->column_number_displayed = Qnil;
if (WINDOW_WANTS_MODELINE_P (w))
- display_mode_line (w, MODE_LINE_FACE_ID, current_buffer->mode_line_format);
+ display_mode_line (w, MODE_LINE_FACE_ID,
+ current_buffer->mode_line_format);
- if (WINDOW_WANTS_TOP_LINE_P (w))
- display_mode_line (w, TOP_LINE_FACE_ID, current_buffer->top_line_format);
+ if (WINDOW_WANTS_HEADER_LINE_P (w))
+ display_mode_line (w, HEADER_LINE_FACE_ID,
+ current_buffer->header_line_format);
}
/* Display mode or top line of window W. FACE_ID specifies which line
- to display; it is either MODE_LINE_FACE_ID or TOP_LINE_FACE_ID.
+ to display; it is either MODE_LINE_FACE_ID or HEADER_LINE_FACE_ID.
FORMAT is the mode line format to display. */
static void
/* Names of basic faces. */
Lisp_Object Qdefault, Qmodeline, Qtool_bar, Qregion, Qmargin;
-Lisp_Object Qtop_line;
+Lisp_Object Qheader_line;
/* Default stipple pattern used on monochrome displays. This stipple
pattern is used on monochrome displays instead of shades of gray
realize_named_face (f, Qmodeline, MODE_LINE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qmargin, BITMAP_AREA_FACE_ID);
- realize_named_face (f, Qtop_line, TOP_LINE_FACE_ID);
+ realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
success_p = 1;
}
REGION_BEG and REGION_END give the start and end positions of the
region; both are -1 if no region is visible. BASE_FACE_ID is the
id of the basic face to merge with. It is usually equal to
- DEFAULT_FACE_ID but can be MODE_LINE_FACE_ID or TOP_LINE_FACE_ID
+ DEFAULT_FACE_ID but can be MODE_LINE_FACE_ID or HEADER_LINE_FACE_ID
for strings displayed in the mode or top line.
Set *ENDPTR to the next position where to check for faces in
staticpro (&Qregion);
Qmargin = intern ("margin");
staticpro (&Qmargin);
- Qtop_line = intern ("top-line");
- staticpro (&Qtop_line);
+ Qheader_line = intern ("header-line");
+ staticpro (&Qheader_line);
defsubr (&Sinternal_make_lisp_face);
defsubr (&Sinternal_lisp_face_p);
struct frame *f = XFRAME (w->frame);
enum bitmap_type bitmap;
struct face *face;
- int top_line_height = -1;
+ int header_line_height = -1;
xassert (interrupt_input_blocked);
? 1 : 0);
int left = window_box_left (w, -1);
- if (top_line_height < 0)
- top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ if (header_line_height < 0)
+ header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
/* In case the same realized face is used for bitmap areas and
for something displayed in the text (e.g. face `region' on
(left
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
+ border),
- WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height,
+ WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border,
row->visible_height);
{
int right = window_box_right (w, -1);
- if (top_line_height < 0)
- top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ if (header_line_height < 0)
+ header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
/* In case the same realized face is used for bitmap areas and
for something displayed in the text (e.g. face `region' on
XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
face->gc,
right,
- WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height,
+ WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f),
row->visible_height);
partially visible lines at the top of a window. */
if (!s->row->full_width_p
&& MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
- r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w);
+ r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
else
r->y = max (0, s->row->y);
intentionally draws over other lines. */
if (s->for_overlaps_p)
{
- r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w);
+ r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
r->height = window_text_bottom_y (s->w) - r->y;
}
to_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, to_x);
}
- min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y));
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y);
if (mode_line_p)
row = MATRIX_MODE_LINE_ROW (w->current_matrix);
else
- row = MATRIX_TOP_LINE_ROW (w->current_matrix);
+ row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
if (row->enabled_p)
{
if (w->phys_cursor_type == HOLLOW_BOX_CURSOR)
{
int x;
- int top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w);
+ int header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
cursor_glyph = get_phys_cursor_glyph (w);
if (cursor_glyph == NULL)
XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
x,
- WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height,
+ WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
cursor_row->y)),
cursor_glyph->pixel_width,
cursor_row->visible_height,