Copyright (C) 2000-2012 |
GNU Info (elisp)Cyclic Window OrderingCyclic Ordering of Windows ========================== When you use the command `C-x o' (`other-window') to select the next window, it moves through all the windows on the screen in a specific cyclic order. For any given configuration of windows, this order never varies. It is called the "cyclic ordering of windows". This ordering generally goes from top to bottom, and from left to right. But it may go down first or go right first, depending on the order in which the windows were split. If the first split was vertical (into windows one above each other), and then the subwindows were split horizontally, then the ordering is left to right in the top of the frame, and then left to right in the next lower part of the frame, and so on. If the first split was horizontal, the ordering is top to bottom in the left part, and so on. In general, within each set of siblings at any level in the window tree, the order is left to right, or top to bottom. - Function: next-window &optional window minibuf all-frames This function returns the window following WINDOW in the cyclic ordering of windows. This is the window that `C-x o' would select if typed when WINDOW is selected. If WINDOW is the only window visible, then this function returns WINDOW. If omitted, WINDOW defaults to the selected window. The value of the argument MINIBUF determines whether the minibuffer is included in the window order. Normally, when MINIBUF is `nil', the minibuffer is included if it is currently active; this is the behavior of `C-x o'. (The minibuffer window is active while the minibuffer is in use. Note: Minibuffers.) If MINIBUF is `t', then the cyclic ordering includes the minibuffer window even if it is not active. If MINIBUF is neither `t' nor `nil', then the minibuffer window is not included even if it is active. The argument ALL-FRAMES specifies which frames to consider. Here are the possible values and their meanings: `nil' Consider all the windows in WINDOW's frame, plus the minibuffer used by that frame even if it lies in some other frame. `t' Consider all windows in all existing frames. `visible' Consider all windows in all visible frames. (To get useful results, you must ensure WINDOW is in a visible frame.) 0 Consider all windows in all visible or iconified frames. anything else Consider precisely the windows in WINDOW's frame, and no others. This example assumes there are two windows, both displaying the buffer `windows.texi': (selected-window) => #<window 56 on windows.texi> (next-window (selected-window)) => #<window 52 on windows.texi> (next-window (next-window (selected-window))) => #<window 56 on windows.texi> - Function: previous-window &optional window minibuf all-frames This function returns the window preceding WINDOW in the cyclic ordering of windows. The other arguments specify which windows to include in the cycle, as in `next-window'. - Command: other-window count &optional all-frames This function selects the COUNTth following window in the cyclic order. If count is negative, then it moves back -COUNT windows in the cycle, rather than forward. It returns `nil'. The argument ALL-FRAMES has the same meaning as in `next-window', but the MINIBUF argument of `next-window' is always effectively `nil'. In an interactive call, COUNT is the numeric prefix argument. - Function: walk-windows proc &optional minibuf all-frames This function cycles through all windows, calling `proc' once for each window with the window as its sole argument. The optional arguments MINIBUF and ALL-FRAMES specify the set of windows to include in the scan. See `next-window', above, for details. - Function: window-list &optional frame minibuf window This function returns a list of the windows on FRAME, starting with WINDOW. If FRAME is `nil' or omitted, the selected frame is used instead; if WINDOW is `nil' or omitted, the selected window is used instead. The value of MINIBUF determines if the minibuffer window will be included in the result list. If MINIBUF is `t', the minibuffer window will be included, even if it isn't active. If MINIBUF is `nil' or omitted, the minibuffer window will only be included in the list if it is active. If MINIBUF is neither `nil' nor `t', the minibuffer window is not included, whether or not it is active. |