All Manuals > CAPI User Guide and Reference Manual > 3 General Properties of CAPI Panes

NextPrevUpTopContentsIndex

3.13 Screens

A screen object (of class screen or a subclass) represents what CAPI thinks is the screen that the user sees. In principle it can be a mono-screen, but these days it is always color-screen. screen is subclass of capi-object, but not simple-pane.

You get a screen object by one of:

convert-to-screen can take screen specification in various forms. On X GUI systems (GTK+ and Motif) this can be used to select which display to use. On Microsoft Windows on any pane that is displayed inside MDI returns the MDI document-container, but otherwise there is only one screen. On Cocoa there is always only one screen. convert-to-screen initializes the screen if needed.

From a displayed element you can find the screen by element-screen. Note that this returns the actual screen, even for a pane inside MDI.

The function screens returns a list of the currently active screens. This list is always of length 1 on Cocoa and Microsoft Windows, not including MDI.

A screen specification that convert-to-screen accepts can also be used to specify the screen on which to display an interface in a call to display.

You can find the geometry of the screen by the readers screen-width and screen-height, and its depth by screen-depth. Some physical properties can be found by the readers screen-width-in-millimeters, screen-height-in-millimeters and the function screen-logical-resolution. screen-number returns the screen number for X11 interface (GTK+ and Motif).

The area that is actually used for display may be restricted by some parts of the screen being dedicated to global features, for example menubar on Cocoa. The area that can be used for displaying by the application is called "internal geometry", which can be found by screen-internal-geometry.

A screen may correspond to several monitors. In this case it has a "virtual geometry", which is a rectangle containing all the physical screens, which can be found by virtual-screen-geometry. The coordinates of top-level windows are with respect to this rectangle. With multiple screens, screen-internal-geometry returns the internal geometry of the first (main) monitor. You can use screen-internal-geometries to find the internal geometries of all the monitors, and screen-monitor-geometries to find all the full geometries. You can use pane-screen-internal-geometry to find the internal geometry of the monitor on which the pane is displayed.

On the X interface the screen "dies" when the X connection gets broken for whatever reason. You can check for that by calling screen-active-p, which returns true for "live" screens and false otherwise.

You can find the CAPI interfaces that are displayed on a specific screen by screen-interfaces, and the active interface (as far as CAPI is concerned) by calling screen-active-interface. Note that this interface may be obscured by windows of another application.

On Microsoft Windows using MDI, the CAPI interface are children of a document-container, which is a "screen-like" object. In particular, it can be used as the screen argument of display, the internal geometry functions return the correct values, and screen-interfaces returns the interfaces.

 


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex