/* Physical screen interface. Author: Stuart D. Gathman Copyright 1988-1997 Business Management Systems, Inc. Loosely based on a book by Marc Rochind FIXME: convert to C++ abstract class */ #include "display.h" #if 0 #include void PStrace(FILE *); /* enable debugging output to file */ #endif void PSbegin(void); void PSend(void); void PSsync(void); /* flush changes to terminal */ extern int PSrows, PScols; /* physical screen size */ /* write string with constant attribute */ void PSwrite(int row, int col, int cnt, const char *s, CHTYPE a); /* write array of different attributes */ void PSwrtattr(int row, int col, int cnt, const CHTYPE far *buf); /* fill rectangle with same char + attribute */ void PSfill(const RECT *, CHTYPE); /* slide rectangle */ bool PSslide(const RECT *r, enum dir d, int cnt); void PScurpos(int row, int col);/* position cursor */ /* set cursor type 0 = invisible >0 varies with terminfo but visible */ int PScurtype(int type); void PSrefresh(void); /* redraw screen */ /* argument is program to pipe ascii screen data into */ int PSprtscr(const char *prog); /* print screen */ int PSquit(void); /* argument says what kind of noise/flash to make, 0 is "standard", other values terminfo dependent but do something */ void PSbeep(int type); /* load font for a character if terminal supports it */ int PSfont(CHTYPE , unsigned char [16]); /* send characters to attached printer if any */ bool PSprint(const char *buf, int cnt); /* convert CHTYPEs from old (AT&T) format */ void PSconv(CHTYPE *a,int n,CHTYPE mod); /* dropscrn() Temporarily return terminal to roll mode (i.e. shell mode). Should be called before running interactive programs. restscrn() restore full screen mode and screen contents */ void dropscrn(void), restscrn(void); /* (internal) convert screen character to printable form */ int toprt(CHTYPE);