[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

E.6.2 Window Internals

Windows have the following accessible fields:

frame

The frame that this window is on.

mini_p

Non-nil if this window is a minibuffer window.

parent

Internally, Emacs arranges windows in a tree; each group of siblings has a parent window whose area includes all the siblings. This field points to a window's parent.

Parent windows do not display buffers, and play little role in display except to shape their child windows. Emacs Lisp programs usually have no access to the parent windows; they operate on the windows at the leaves of the tree, which actually display buffers.

The following four fields also describe the window tree structure.

hchild

In a window subdivided horizontally by child windows, the leftmost child. Otherwise, nil.

vchild

In a window subdivided vertically by child windows, the topmost child. Otherwise, nil.

next

The next sibling of this window. It is nil in a window that is the rightmost or bottommost of a group of siblings.

prev

The previous sibling of this window. It is nil in a window that is the leftmost or topmost of a group of siblings.

left

This is the left-hand edge of the window, measured in columns. (The leftmost column on the screen is column 0.)

top

This is the top edge of the window, measured in lines. (The top line on the screen is line 0.)

height

The height of the window, measured in lines.

width

The width of the window, measured in columns. This width includes the scroll bar and fringes, and/or the separator line on the right of the window (if any).

buffer

The buffer that the window is displaying. This may change often during the life of the window.

start

The position in the buffer that is the first character to be displayed in the window.

pointm

This is the value of point in the current buffer when this window is selected; when it is not selected, it retains its previous value.

force_start

If this flag is non-nil, it says that the window has been scrolled explicitly by the Lisp program. This affects what the next redisplay does if point is off the screen: instead of scrolling the window to show the text around point, it moves point to a location that is on the screen.

frozen_window_start_p

This field is set temporarily to 1 to indicate to redisplay that start of this window should not be changed, even if point gets invisible.

start_at_line_beg

Non-nil means current value of start was the beginning of a line when it was chosen.

too_small_ok

Non-nil means don't delete this window for becoming “too small.”

height_fixed_p

This field is temporarily set to 1 to fix the height of the selected window when the echo area is resized.

use_time

This is the last time that the window was selected. The function get-lru-window uses this field.

sequence_number

A unique number assigned to this window when it was created.

last_modified

The modiff field of the window's buffer, as of the last time a redisplay completed in this window.

last_overlay_modified

The overlay_modiff field of the window's buffer, as of the last time a redisplay completed in this window.

last_point

The buffer's value of point, as of the last time a redisplay completed in this window.

last_had_star

A non-nil value means the window's buffer was “modified” when the window was last updated.

vertical_scroll_bar

This window's vertical scroll bar.

left_margin_width

The width of the left margin in this window, or nil not to specify it (in which case the buffer's value of left-margin-width is used.

right_margin_width

Likewise for the right margin.

window_end_pos

This is computed as z minus the buffer position of the last glyph in the current matrix of the window. The value is only valid if window_end_valid is not nil.

window_end_bytepos

The byte position corresponding to window_end_pos.

window_end_vpos

The window-relative vertical position of the line containing window_end_pos.

window_end_valid

This field is set to a non-nil value if window_end_pos is truly valid. This is nil if nontrivial redisplay is preempted since in that case the display that window_end_pos was computed for did not get onto the screen.

redisplay_end_trigger

If redisplay in this window goes beyond this buffer position, it runs the redisplay-end-trigger-hook.

cursor

A structure describing where the cursor is in this window.

last_cursor

The value of cursor as of the last redisplay that finished.

phys_cursor

A structure describing where the cursor of this window physically is.

phys_cursor_type

The type of cursor that was last displayed on this window.

phys_cursor_on_p

This field is non-zero if the cursor is physically on.

cursor_off_p

Non-zero means the cursor in this window is logically on.

last_cursor_off_p

This field contains the value of cursor_off_p as of the time of the last redisplay.

must_be_updated_p

This is set to 1 during redisplay when this window must be updated.

hscroll

This is the number of columns that the display in the window is scrolled horizontally to the left. Normally, this is 0.

vscroll

Vertical scroll amount, in pixels. Normally, this is 0.

dedicated

Non-nil if this window is dedicated to its buffer.

display_table

The window's display table, or nil if none is specified for it.

update_mode_line

Non-nil means this window's mode line needs to be updated.

base_line_number

The line number of a certain position in the buffer, or nil. This is used for displaying the line number of point in the mode line.

base_line_pos

The position in the buffer for which the line number is known, or nil meaning none is known.

region_showing

If the region (or part of it) is highlighted in this window, this field holds the mark position that made one end of that region. Otherwise, this field is nil.

column_number_displayed

The column number currently displayed in this window's mode line, or nil if column numbers are not being displayed.

current_matrix

A glyph matrix describing the current display of this window.

desired_matrix

A glyph matrix describing the desired display of this window.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.