Each window is part of one and only one frame; you can get the frame
This returns the root window of frame frame. frame defaults to the selected frame if not specified.
This function returns the frame that window is on. window defaults to the selected window if omitted.
All the non-minibuffer windows in a frame are arranged in a cyclic order. The order runs from the frame’s top window, which is at the upper left corner, down and to the right, until it reaches the window at the lower right corner (always the minibuffer window, if the frame has one), and then it moves back to the top.
This function returns the topmost, leftmost window of frame frame at position position.
If omitted, frame defaults to the currently selected frame.
position is used to distinguish between multiple windows that abut
the top of the frame: 0 means the leftmost window abutting the top of
the frame, 1 the next-leftmost, etc. position can also be less
than zero: -1 means the rightmost window abutting the top of the frame,
-2 the next-rightmost, etc. If omitted, position defaults to 0,
i.e. the leftmost highest window. If there is no window at the given
nil is returned.
The following three functions work similarly.
This function returns the lowest window on frame which is at position.
This function returns the leftmost window on frame which is at position.
This function returns the rightmost window on frame which is at position.
At any time, exactly one window on any frame is selected within the
frame. The significance of this designation is that selecting the
frame also selects this window. You can get the frame’s current
selected window with
This function returns the window on frame that is selected within frame. frame defaults to the selected frame if not specified.
Conversely, selecting a window for XEmacs with
makes that window selected within its frame. See Selecting Windows.
Another function that (usually) returns one of the windows in a frame is
minibuffer-window. See Minibuffer Misc.