Commit 496e208e authored by Martin Rudalics's avatar Martin Rudalics

Add some new members to window structure in window.h.

* window.h (window): Add some new members to window structure -
normal_lines, normal_cols, new_total, new_normal, clone_number,
splits, nest, prev_buffers, next_buffers.
(WINDOW_TOTAL_SIZE): Move here from window.c.
(MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define.

* window.c (WINDOW_TOTAL_SIZE): Move to window.h.
(make_dummy_parent): Set new members of windows structure.
(make_window): Move down in code.  Handle new members of window
structure.
(Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
(Fwindow_nest, Fset_window_nest, Fwindow_new_total)
(Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
(Fset_window_prev_buffers, Fwindow_next_buffers)
(Fset_window_next_buffers, Fset_window_clone_number): New
functions.
(Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
(Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
Doc-string fixes.
(Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
Argument WINDOW can be now internal window too.
(Fwindow_use_time): Move up in code.
(Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
Rewrite doc-string.
(Fset_window_configuration, saved_window)
(Fcurrent_window_configuration, save_window_save): Handle new
members of window structure.
parent 2c587104
2011-06-08 Martin Rudalics <rudalics@gmx.at>
* window.h (window): Add some new members to window structure -
normal_lines, normal_cols, new_total, new_normal, clone_number,
splits, nest, prev_buffers, next_buffers.
(WINDOW_TOTAL_SIZE): Move here from window.c.
(MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define.
* window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
Remove.
(make_dummy_parent): Set new members of windows structure.
(make_window): Move down in code. Handle new members of window
structure.
(Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
(Fwindow_nest, Fset_window_nest, Fwindow_new_total)
(Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
(Fset_window_prev_buffers, Fwindow_next_buffers)
(Fset_window_next_buffers, Fset_window_clone_number): New
functions.
(Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
(Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
Doc-string fixes.
(Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
Argument WINDOW can be now internal window too.
(Fwindow_use_time): Move up in code.
(Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
Rewrite doc-string.
(Fset_window_configuration, saved_window)
(Fcurrent_window_configuration, save_window_save): Handle new
members of window structure.
(WINDOW_TOTAL_SIZE): Move to window.h.
2011-06-07 Martin Rudalics <rudalics@gmx.at>
......
This diff is collapsed.
......@@ -93,38 +93,57 @@ struct window
/* The frame this window is on. */
Lisp_Object frame;
/* t if this window is a minibuffer window. */
Lisp_Object mini_p;
/* Following child (to right or down) at same level of tree */
Lisp_Object next;
/* Preceding child (to left or up) at same level of tree */
Lisp_Object prev;
/* First child of this window. */
/* vchild is used if this is a vertical combination,
hchild if this is a horizontal combination. */
/* Following (to right or down) and preceding (to left or up) child
at same level of tree. */
Lisp_Object next, prev;
/* First child of this window: vchild is used if this is a vertical
combination, hchild if this is a horizontal combination. Of the
fields vchild, hchild and buffer, one and only one is non-nil
unless the window is dead. */
Lisp_Object hchild, vchild;
/* The window this one is a child of. */
/* The window this one is a child of. */
Lisp_Object parent;
/* The upper left corner coordinates of this window,
as integers relative to upper left corner of frame = 0, 0 */
/* The upper left corner coordinates of this window, as integers
relative to upper left corner of frame = 0, 0. */
Lisp_Object left_col;
Lisp_Object top_line;
/* The size of the window */
/* The size of the window. */
Lisp_Object total_lines;
Lisp_Object total_cols;
/* The buffer displayed in this window */
/* Of the fields vchild, hchild and buffer, only one is non-nil. */
/* The normal size of the window. */
Lisp_Object normal_lines;
Lisp_Object normal_cols;
/* New sizes of the window. */
Lisp_Object new_total;
Lisp_Object new_normal;
/* The buffer displayed in this window. Of the fields vchild,
hchild and buffer, one and only one is non-nil unless the window
is dead. */
Lisp_Object buffer;
/* A marker pointing to where in the text to start displaying.
BIDI Note: This is the _logical-order_ start, i.e. the smallest
buffer position visible in the window, not necessarily the
character displayed in the top left corner of the window. */
Lisp_Object start;
/* A marker pointing to where in the text point is in this window,
used only when the window is not selected.
This exists so that when multiple windows show one buffer
each one can have its own value of point. */
Lisp_Object pointm;
/* Non-nil means next redisplay must use the value of start
set up for it in advance. Set by scrolling commands. */
Lisp_Object force_start;
......@@ -133,26 +152,38 @@ struct window
This is used in Fdelete_other_windows to force a call to
Vwindow_scroll_functions; also by Frecenter with argument. */
Lisp_Object optional_new_start;
/* Number of columns display within the window is scrolled to the left. */
Lisp_Object hscroll;
/* Minimum hscroll for automatic hscrolling. This is the value
the user has set, by set-window-hscroll for example. */
Lisp_Object min_hscroll;
/* Number saying how recently window was selected */
/* Number saying how recently window was selected. */
Lisp_Object use_time;
/* Unique number of window assigned when it was created */
/* Unique number of window assigned when it was created. */
Lisp_Object sequence_number;
/* No permanent meaning; used by save-window-excursion's bookkeeping */
/* Sequence number of window this window was cloned from. Identic
to sequence number if window was not cloned. */
Lisp_Object clone_number;
/* No permanent meaning; used by save-window-excursion's
bookkeeping. */
Lisp_Object temslot;
/* text.modified of displayed buffer as of last time display completed */
/* text.modified of displayed buffer as of last time display
completed. */
Lisp_Object last_modified;
/* BUF_OVERLAY_MODIFIED of displayed buffer as of last complete update. */
Lisp_Object last_overlay_modified;
/* Value of point at that time */
/* Value of point at that time. */
Lisp_Object last_point;
/* Non-nil if the buffer was "modified" when the window
was last updated. */
Lisp_Object last_had_star;
/* This window's vertical scroll bar. This field is only for use
by the window-system-dependent code which implements the
scroll bars; it can store anything it likes here. If this
......@@ -167,14 +198,14 @@ struct window
/* Width of left and right fringes.
A value of nil or t means use frame values. */
Lisp_Object left_fringe_width, right_fringe_width;
/* Non-nil means fringes are drawn outside display margins;
othersize draw them between margin areas and text. */
/* Non-nil means fringes are drawn outside display margins;
othersize draw them between margin areas and text. */
Lisp_Object fringes_outside_margins;
/* Pixel width of scroll bars.
A value of nil or t means use frame values. */
Lisp_Object scroll_bar_width;
/* Type of vertical scroll bar. A value of nil means
no scroll bar. A value of t means use frame value. */
Lisp_Object vertical_scroll_bar_type;
......@@ -183,6 +214,7 @@ struct window
/* May be nil if mark does not exist or was not on frame */
Lisp_Object last_mark_x;
Lisp_Object last_mark_y;
/* Z - the buffer position of the last glyph in the current matrix
of W. Only valid if WINDOW_END_VALID is not nil. */
Lisp_Object window_end_pos;
......@@ -194,30 +226,38 @@ struct window
since in that case the frame image that window_end_pos
did not get onto the frame. */
Lisp_Object window_end_valid;
/* Non-nil means must regenerate mode line of this window */
Lisp_Object update_mode_line;
/* Non-nil means current value of `start'
was the beginning of a line when it was chosen. */
Lisp_Object start_at_line_beg;
/* Display-table to use for displaying chars in this window.
Nil means use the buffer's own display-table. */
Lisp_Object display_table;
/* Non-nil means window is marked as dedicated. */
Lisp_Object dedicated;
/* Line number and position of a line somewhere above the
top of the screen. */
/* If this field is nil, it means we don't have a base line. */
/* Line number and position of a line somewhere above the top of the
screen. If this field is nil, it means we don't have a base
line. */
Lisp_Object base_line_number;
/* If this field is nil, it means we don't have a base line.
If it is a buffer, it means don't display the line number
as long as the window shows that buffer. */
Lisp_Object base_line_pos;
/* If we have highlighted the region (or any part of it),
this is the mark position that we used, as an integer. */
Lisp_Object region_showing;
/* The column number currently displayed in this window's mode line,
or nil if column numbers are not being displayed. */
Lisp_Object column_number_displayed;
/* If redisplay in this window goes beyond this buffer position,
must run the redisplay-end-trigger-hook. */
Lisp_Object redisplay_end_trigger;
......@@ -228,6 +268,21 @@ struct window
/* Original window height and top before mini-window was enlarged. */
Lisp_Object orig_total_lines, orig_top_line;
/* Non-nil means deleting or resizing this window distributes
space among all windows in the same combination. */
Lisp_Object splits;
/* Non-nil means this window's child windows are never
(re-)combined. */
Lisp_Object nest;
/* Alist of <buffer, window-start, window-point> triples listing
buffers previously shown in this window. */
Lisp_Object prev_buffers;
/* List of buffers re-shown in this window. */
Lisp_Object next_buffers;
/* An alist with parameteres. */
Lisp_Object window_parameters;
......@@ -361,6 +416,17 @@ struct window
#define WINDOW_TOTAL_HEIGHT(W) \
(WINDOW_TOTAL_LINES (W) * WINDOW_FRAME_LINE_HEIGHT (W))
/* For HORFLAG non-zero the total number of columns of window W. Otherwise
the total number of lines of W. */
#define WINDOW_TOTAL_SIZE(w, horflag) \
(horflag ? WINDOW_TOTAL_COLS (w) : WINDOW_TOTAL_LINES (w))
/* The smallest acceptable dimensions for a window. Anything smaller
might crash Emacs. */
#define MIN_SAFE_WINDOW_WIDTH (2)
#define MIN_SAFE_WINDOW_HEIGHT (1)
/* Return the canonical frame column at which window W starts.
This includes a left-hand scroll bar, if any. */
......@@ -859,6 +925,7 @@ extern int compare_window_configurations (Lisp_Object, Lisp_Object, int);
EXFUN (Fpos_visible_in_window_p, 3);
extern void mark_window_cursors_off (struct window *);
extern int window_internal_height (struct window *);
extern int window_body_cols (struct window *w);
EXFUN (Frecenter, 1);
extern void temp_output_buffer_show (Lisp_Object);
extern void replace_buffer_in_all_windows (Lisp_Object);
......@@ -867,6 +934,4 @@ extern void init_window (void);
extern void syms_of_window (void);
extern void keys_of_window (void);
extern int window_body_cols (struct window *w);
#endif /* not WINDOW_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment