aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorGlenn Morris2014-08-10 17:59:34 -0700
committerGlenn Morris2014-08-10 17:59:34 -0700
commitc7367d2de3343e56171c4fe6d439a3ed5f40d06c (patch)
tree54fe9166f6b4320d9518bbac11e2d575a9fda7c2 /src/window.c
parent6b7d077506304f440d311fa7b29d210b7a3e121c (diff)
parentf314e84fce8b394da20aa1d69121c74fb34f9a1e (diff)
downloademacs-c7367d2de3343e56171c4fe6d439a3ed5f40d06c.tar.gz
emacs-c7367d2de3343e56171c4fe6d439a3ed5f40d06c.zip
Merge from emacs-24; up to 2014-06-28T23:35:17Z!rgm@gnu.org
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c64
1 files changed, 56 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c
index 049c0d122a3..ac685f6867f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -329,7 +329,7 @@ DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
329DEFUN ("window-valid-p", Fwindow_valid_p, Swindow_valid_p, 1, 1, 0, 329DEFUN ("window-valid-p", Fwindow_valid_p, Swindow_valid_p, 1, 1, 0,
330 doc: /* Return t if OBJECT is a valid window and nil otherwise. 330 doc: /* Return t if OBJECT is a valid window and nil otherwise.
331A valid window is either a window that displays a buffer or an internal 331A valid window is either a window that displays a buffer or an internal
332window. Deleted windows are not live. */) 332window. Windows that have been deleted are not valid. */)
333 (Lisp_Object object) 333 (Lisp_Object object)
334{ 334{
335 return WINDOW_VALID_P (object) ? Qt : Qnil; 335 return WINDOW_VALID_P (object) ? Qt : Qnil;
@@ -810,7 +810,12 @@ total width of WINDOW. */)
810 810
811DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, 811DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0,
812 doc: /* Return the new total size of window WINDOW. 812 doc: /* Return the new total size of window WINDOW.
813WINDOW must be a valid window and defaults to the selected one. */) 813WINDOW must be a valid window and defaults to the selected one.
814
815The new total size of WINDOW is the value set by the last call of
816`set-window-new-total' for WINDOW. If it is valid, it will be shortly
817installed as WINDOW's total height (see `window-total-height') or total
818width (see `window-total-width'). */)
814 (Lisp_Object window) 819 (Lisp_Object window)
815{ 820{
816 return decode_valid_window (window)->new_total; 821 return decode_valid_window (window)->new_total;
@@ -819,7 +824,25 @@ WINDOW must be a valid window and defaults to the selected one. */)
819DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0, 824DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0,
820 doc: /* Return the normal height of window WINDOW. 825 doc: /* Return the normal height of window WINDOW.
821WINDOW must be a valid window and defaults to the selected one. 826WINDOW must be a valid window and defaults to the selected one.
822If HORIZONTAL is non-nil, return the normal width of WINDOW. */) 827If HORIZONTAL is non-nil, return the normal width of WINDOW.
828
829The normal height of a frame's root window or a window that is
830horizontally combined (a window that has a left or right sibling) is
8311.0. The normal height of a window that is vertically combined (has a
832sibling above or below) is the fraction of the window's height with
833respect to its parent. The sum of the normal heights of all windows in a
834vertical combination equals 1.0.
835
836Similarly, the normal width of a frame's root window or a window that is
837vertically combined equals 1.0. The normal width of a window that is
838horizontally combined is the fraction of the window's width with respect
839to its parent. The sum of the normal widths of all windows in a
840horizontal combination equals 1.0.
841
842The normal sizes of windows are used to restore the proportional sizes
843of windows after they have been shrunk to their minimum sizes; for
844example when a frame is temporarily made very small and afterwards gets
845re-enlarged to its previous size. */)
823 (Lisp_Object window, Lisp_Object horizontal) 846 (Lisp_Object window, Lisp_Object horizontal)
824{ 847{
825 struct window *w = decode_valid_window (window); 848 struct window *w = decode_valid_window (window);
@@ -829,7 +852,11 @@ If HORIZONTAL is non-nil, return the normal width of WINDOW. */)
829 852
830DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, 853DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0,
831 doc: /* Return new normal size of window WINDOW. 854 doc: /* Return new normal size of window WINDOW.
832WINDOW must be a valid window and defaults to the selected one. */) 855WINDOW must be a valid window and defaults to the selected one.
856
857The new normal size of WINDOW is the value set by the last call of
858`set-window-new-normal' for WINDOW. If valid, it will be shortly
859installed as WINDOW's normal size (see `window-normal-size'). */)
833 (Lisp_Object window) 860 (Lisp_Object window)
834{ 861{
835 return decode_valid_window (window)->new_normal; 862 return decode_valid_window (window)->new_normal;
@@ -837,7 +864,12 @@ WINDOW must be a valid window and defaults to the selected one. */)
837 864
838DEFUN ("window-new-pixel", Fwindow_new_pixel, Swindow_new_pixel, 0, 1, 0, 865DEFUN ("window-new-pixel", Fwindow_new_pixel, Swindow_new_pixel, 0, 1, 0,
839 doc: /* Return new pixel size of window WINDOW. 866 doc: /* Return new pixel size of window WINDOW.
840WINDOW must be a valid window and defaults to the selected one. */) 867WINDOW must be a valid window and defaults to the selected one.
868
869The new pixel size of WINDOW is the value set by the last call of
870`set-window-new-pixel' for WINDOW. If it is valid, it will be shortly
871installed as WINDOW's pixel height (see `window-pixel-height') or pixel
872width (see `window-pixel-width'). */)
841 (Lisp_Object window) 873 (Lisp_Object window)
842{ 874{
843 return decode_valid_window (window)->new_pixel; 875 return decode_valid_window (window)->new_pixel;
@@ -3705,6 +3737,10 @@ Return SIZE.
3705Optional argument ADD non-nil means add SIZE to the new pixel size of 3737Optional argument ADD non-nil means add SIZE to the new pixel size of
3706WINDOW and return the sum. 3738WINDOW and return the sum.
3707 3739
3740The new pixel size of WINDOW, if valid, will be shortly installed as
3741WINDOW's pixel height (see `window-pixel-height') or pixel width (see
3742`window-pixel-width').
3743
3708Note: This function does not operate on any child windows of WINDOW. */) 3744Note: This function does not operate on any child windows of WINDOW. */)
3709 (Lisp_Object window, Lisp_Object size, Lisp_Object add) 3745 (Lisp_Object window, Lisp_Object size, Lisp_Object add)
3710{ 3746{
@@ -3729,6 +3765,10 @@ Return SIZE.
3729Optional argument ADD non-nil means add SIZE to the new total size of 3765Optional argument ADD non-nil means add SIZE to the new total size of
3730WINDOW and return the sum. 3766WINDOW and return the sum.
3731 3767
3768The new total size of WINDOW, if valid, will be shortly installed as
3769WINDOW's total height (see `window-total-height') or total width (see
3770`window-total-width').
3771
3732Note: This function does not operate on any child windows of WINDOW. */) 3772Note: This function does not operate on any child windows of WINDOW. */)
3733 (Lisp_Object window, Lisp_Object size, Lisp_Object add) 3773 (Lisp_Object window, Lisp_Object size, Lisp_Object add)
3734{ 3774{
@@ -3748,6 +3788,9 @@ DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal,
3748WINDOW must be a valid window and defaults to the selected one. 3788WINDOW must be a valid window and defaults to the selected one.
3749Return SIZE. 3789Return SIZE.
3750 3790
3791The new normal size of WINDOW, if valid, will be shortly installed as
3792WINDOW's normal size (see `window-normal-size').
3793
3751Note: This function does not operate on any child windows of WINDOW. */) 3794Note: This function does not operate on any child windows of WINDOW. */)
3752 (Lisp_Object window, Lisp_Object size) 3795 (Lisp_Object window, Lisp_Object size)
3753{ 3796{
@@ -4012,9 +4055,14 @@ If FRAME is omitted or nil, it defaults to the selected frame.
4012Optional argument HORIZONTAL omitted or nil means apply requested 4055Optional argument HORIZONTAL omitted or nil means apply requested
4013height values. HORIZONTAL non-nil means apply requested width values. 4056height values. HORIZONTAL non-nil means apply requested width values.
4014 4057
4015This function checks whether the requested values sum up to a valid 4058The requested size values are those set by `set-window-new-pixel' and
4016window layout, recursively assigns the new sizes of all child windows 4059`set-window-new-normal'. This function checks whether the requested
4017and calculates and assigns the new start positions of these windows. 4060values sum up to a valid window layout, recursively assigns the new
4061sizes of all child windows and calculates and assigns the new start
4062positions of these windows.
4063
4064Return t if the requested values have been applied correctly, nil
4065otherwise.
4018 4066
4019Note: This function does not check any of `window-fixed-size-p', 4067Note: This function does not check any of `window-fixed-size-p',
4020`window-min-height' or `window-min-width'. All these checks have to 4068`window-min-height' or `window-min-width'. All these checks have to