Function: tty-top-frame
tty-top-frame is a function defined in term.c.
Signature
(tty-top-frame &optional TERMINAL)
Documentation
Return the topmost terminal frame on TERMINAL.
TERMINAL can be a terminal object, a frame or nil (meaning the selected frame's terminal). This function returns nil if TERMINAL does not refer to a text terminal. Otherwise, it returns the top-most frame on the text terminal.
Probably introduced at or before Emacs version 24.3.
Source Code
// Defined in /usr/src/emacs/src/term.c
{
struct terminal *t = decode_live_terminal (terminal);
if (t->type == output_termcap)
return t->display_info.tty->top_frame;
return Qnil;
}