Next: , Previous: , Up: Miscellaneous Functions   [Contents][Index]


20.3 Display Functions

Function: screen-width

Return the width of the root window.

Function: screen-height

Return the height of the root window.

Function: screen-dimensions

Return the screen dimensions in pixels as a cons cell (width . height).

Function: draw-window-outline mode x y width height

Draw an outline of a window of dimensions (width, height) at position (x, y) relative to the root window.

mode is a symbol defining the type of outline drawn, currently it may only be box for a 3x3 grid.

Use the erase-window-outline to erase the grid. Also note that since these functions draw directly on the root window the server should be grabbed until the outline is erased.

Function: erase-window-outline mode x y width height

Erase a previously drawn outline of a window of dimensions (width, height) at position (x, y) relative to the root window.

mode is a symbol defining the type of outline drawn, currently it may only be box for a 3x3 grid.

Function: display-message #!optional text attributes

Display the string text in a window on the screen. If text is nil then any string previously displayed is removed. Returns the numeric id of the window displaying the message, or nil if no message is displayed.

The window is placed on top of X client windows, and basically at the center of the screen. The window remains until another call of this function, or the user clicks on it.

attributes is an alist specifying how the string should be displayed; each element of the list is a cons cell (attr . value) associating an attribute attr (a symbol) with it’s value.

Possible attributes currently include:

font

The font to use

foreground

The color (or color name) to draw the text with

background

The color (or color name) to draw the background with

x-justify

The justification method for multi-line strings. One of the symbols left, right, or center

spacing

The number of extra pixels of vertical spacing to leave between text lines.

position

A cons cell defining the coordinates at which to display the message window. The cell is (x . y). x and y are integers or nil (for centered display). If negative they count in from the left and bottom edges respectively.

head

The head on which to center the message when a position is not specified or given as nil. If not provided defaults to the head containing the window that has the input focus.

Tip: Don’t call this function during initialization. Instead, use after-initialization-hook to defer. Otherwise the message window is covered by X client windows.


Next: , Previous: , Up: Miscellaneous Functions   [Contents][Index]