Next: , Up: Frames and Terminals   [Index]


G.4.1 Frame and Terminal Functions

Function: framep object

This predicate returns a non-‘nil’ value if OBJECT is a frame, and ‘nil’ otherwise. For a frame, the value indicates which kind of display the frame uses:

t

text terminal

x

x graphical terminal

w32

MS-Windows graphical terminal

ns

GNUstep or Macintosh Cocoa graphical terminal

pc

MS-DOS terminal

Function: frame-terminal &optional frame

This function returns the terminal object that displays ‘FRAME’. If ‘FRAME’ is ‘nil’ or unspecified, it defaults to the selected frame.

Function: terminal-live-p object

This predicate returns a non-‘nil’ value if ‘OBJECT’ is a terminal that is live (i.e., not deleted), and ‘nil’ otherwise. For live terminals, the return value indicates what kind of frames are displayed on that terminal; the list of possible values is the same as for ‘framep’ above.

Function: terminal-name &optional terminal

This function returns the file name of the device used by TERMINAL.

TERMINAL

If ‘TERMINAL’ is omitted or ‘nil’, it defaults to the selected frame’s terminal.

TERMINAL’ can also be a frame, meaning that frame’s terminal.

Function: terminal-list

This function returns a list of all live terminal objects.

Function: get-device-terminal device

This function returns a terminal whose device name is given by ‘DEVICE’.

DEVICE

If DEVICE is a string, it can be either the file name of a terminal device, or the name of an X display of the form ‘HOST:SERVER.SCREEN’.

If DEVICE is a frame, this function returns that frame’s terminal;

‘nil’ means the selected frame.

Finally, if DEVICE is a terminal object that represents a live terminal, that terminal is returned.

Function: delete-terminal &optional terminal force
TERMINAL

This function deletes all frames on ‘TERMINAL’ and frees the resources used by it. It runs the abnormal hook delete-terminal-functions, passing ‘TERMINAL’ as the argument to each function. If TERMINAL is omitted or ‘nil’, it defaults to the selected frame’s terminal. TERMINAL can also be a frame, meaning that frame’s terminal.

FORCE

Normally, this function signals an error if you attempt to delete the sole active terminal, but if ‘FORCE’ is non-‘nil’, you are allowed to do so.


Next: Creating Frames, Up: Frames and Terminals   [Index]