Next: , Previous: , Up: Top   [Contents][Index]

40 Consoles and Devices

A console is an object representing a single input connection to SXEmacs, such as an X display or a TTY connection. It is possible for SXEmacs to have frames on multiple consoles at once (even on heterogeneous types—you can simultaneously have a frame on an X display and a TTY connection, or two completely different X displays, etc.). Normally, there is only one console in existence.

A device is an object representing a single output device, such as a particular screen on an X display. (Usually there is exactly one device per X console connection, but there may be more than one if you have a multi-headed X display. For TTY connections, there is always exactly one device per console.)

Each device has one or more frames in which text can be displayed. For X displays and the like, a frame corresponds to the normal window-system concept of a window. Frames can overlap, be displayed at various locations within the display, be resized, etc. For TTY, only one frame can be displayed at a time, and it occupies the entire TTY display area.

However, you can still define multiple frames and switch between them. Their contents are entirely separate from each other. These sorts of frames resemble the “virtual console” capability provided under Linux or the multiple screens provided by the multiplexing program ‘screen’ under Unix.

When you start up SXEmacs, an initial console and device are created to receive input and display frames on. This will either be an X display or a TTY connection, depending on what mode you started SXEmacs in (this is determined by the ‘DISPLAY’ environment variable, the ‘-nw’, ‘-t’ and ‘-display’ command-line options, etc.).

You can connect to other X displays and TTY connections by creating new console objects, and to other X screens on an existing display by creating new device objects, as described below. Many functions (for example the frame-creation functions) take an optional device argument specifying which device the function pertains to. If the argument is omitted, it defaults to the selected device (see below).

Function: consolep object

This returns non-nil if object is a console.

Function: devicep object

This returns non-nil if object is a device.

Next: , Previous: , Up: Top   [Contents][Index]