Modula-2 || Compiler & Tools || Library || Search Engine
TYPE Screen; TYPE CursorVisibility = (normal, invisible, morevisible);
VAR Done: BOOLEAN;
PROCEDURE OpenScreen(VAR scr: Screen; outfp: FILE; baudrate: CARDINAL; terminal: ARRAY OF CHAR) : BOOLEAN; PROCEDURE OpenScreenTI(VAR scr: Screen; outfp: FILE; baudrate: CARDINAL; tinfo: Term); PROCEDURE InitScreen(scr: Screen); PROCEDURE CloseScreen(VAR scr: Screen); PROCEDURE Lines(scr: Screen) : CARDINAL; PROCEDURE Columns(scr: Screen) : CARDINAL; PROCEDURE ClearScreen(scr: Screen); PROCEDURE SetCursor(scr: Screen; line, column: CARDINAL); PROCEDURE MoveCursor(scr: Screen; (* from *) line1, column1, (* to *) line2, column2: CARDINAL); PROCEDURE Scroll(scr: Screen; down: BOOLEAN; line, column: CARDINAL; lines, columns: CARDINAL); PROCEDURE SetCursorVisibility(scr: Screen; visibility: CursorVisibility);
CloseScreen deallocates the space used for scr but does not close the output file-pointer outfp which has been given to OpenScreen or OpenScreenTI.
Lines and Columns return the number of lines and columns of the given screen. If the associated capability is not set 1 is returned. ClearScreen clears the screen. SetCursor moves the cursor to the given position. Some optimizations (e.g. home position and last line) are done. MoveCursor takes line1 and column1 as the current position of the cursor and outputs an optimized sequence to move to line2 and column2.
Scroll scrolls a given window of a screen one line downward (down set to TRUE) or upward (forward). The window is defined by the upper left corner given by line and column and the number of lines and columns. The cursor position is undefined if successful.
The cursor visibility can be modified by calling SetCursorVisibility. Supported are normal, invisible, and morevisible.
TermInfo | interface to the terminfo database |
Windows | high-level interface |
Modula-2 || Compiler & Tools || Library || Search Engine