{   Computer Systems Research Institute
    University of Toronto

    TI PRO Curses Simulation Module Interface  V3.00
    Author: James R. Cordy
    Date:   March 1984  (Rev Nov 1985)

    Copyright (C) 1984, 1985  The University of Toronto

    This module is the interface to the TI PRO simulation
    of the UNIX Curses package.
}


{ Character Colour Codes }
pervasive const C_BLACK := 0
pervasive const C_BLUE := 1
pervasive const C_RED := 2
pervasive const C_PURPLE := 3
pervasive const C_GREEN := 4
pervasive const C_CYAN := 5
pervasive const C_YELLOW := 6
pervasive const C_WHITE := 7


var Curses : external module
    exports (refresh, clear, cursoroff, cursoron, clrtobot, clrtoeol,
	    addch, addstr, printw, move, scrollup, scrolldown,
	    standout, standend, underline, underend, blink, blinkend,
	    colour, colourend, getch, noecho, echo, crmode, nocrmode,
	    raw, noraw, nl, nonl, hasch, getyx, endwin, lines, columns)
    const lines := 25	{ 0..24; 0 is top of screen }
    const columns := 80	{ 0..79; 0 is left of screen }
    procedure refresh = external
    procedure clear = external
    procedure cursoroff = external	{ make cursor invisible }
    procedure cursoron = external	{ make cursor visible }
    procedure clrtobot = external
    procedure clrtoeol = external
    procedure addch (c : Char) = external	{ display a character }
    procedure addstr (s : packed array 1 .. parameter of Char) = external
    procedure printw (s : packed array 1 .. parameter of Char,
	i : SignedInt) = external
    procedure move (l : SignedInt, c : SignedInt) = external
    procedure scrollup (l1 : SignedInt, lm : SignedInt,
	n : SignedInt) = external
    procedure scrolldown (l1 : SignedInt, lm : SignedInt,
	n : SignedInt) = external
    procedure standout = external	{ reverse video }
    procedure standend = external
    procedure underline = external
    procedure underend = external
    procedure blink = external
    procedure blinkend = external
    procedure colour (c : ShortInt) = external
    procedure colourend = external
    procedure getch (var c : Char) = external
    procedure noecho = external
    procedure echo = external
    procedure crmode = external
    procedure nocrmode = external
    procedure raw = external
    procedure noraw = external
    procedure nl = external
    procedure nonl = external
    function hasch returns result : boolean = external
    procedure getyx (var l : SignedInt, var c : SignedInt) = external
    procedure endwin = external		{ return to standard configuration }
end module
