/* prevent double includes */ #ifndef FasTAlpHa #define FasTAlpHa struct fa_coordinate { int x, y; }; /* * A fa_rectangle includes the point denoted by [origin] but * does not include [corner]. */ struct fa_rectangle { struct fa_coordinate origin; struct fa_coordinate corner; }; /* * fainfo structure is used by the fa[get|set]info() routines to * determine and/or change display parameters. It is extensible * at the end of the current structure. All fields are of type * 'int' to allow languages other than C to access the structure. */ struct fainfo { struct fa_rectangle size; int capabilities; int enhancements; int defaultenhancements; int cursor; int fontcellheight; int fontcellwidth; int foregroundplanes; int backgroundplanes; /* * use up this variable when adding new fields. Until this * expansion space is gone, old object code will not need to be * re-compiled. When the structure actually requires more * storage space, source code must be re-compiled. */ int ___expansion[20]; }; /* * Enhancements can all be packed into an 8-bit quantity. FastAlpha * sometimes passes them as integers (for ease in interfacing to * languages other than C) but defines the type, ENH, for use by * fawrite(); */ typedef char ENH; /* * These constants define the contents of the 'capabilities' field in * the fainfo structure. The field is assumed to contain at least 16 bits. */ /*************BITS******************/ /* * Device is driven serially as via RS232. */ #define FASERIAL 0x1 /* * Display is actually a window */ #define FAWINDOW 0x2 /* * Display is implemented on a built-in alpha plane aka 9836A */ #define FAPLANE 0x4 /* * Enhancement bit definitions. They are pushed into the printable * ASCII character set by adding the '@' symbol. */ #define FAOFF '@'+0x0 #define FABLINK '@'+0x1 #define FAINVERSE '@'+0x2 #define FAUNDERLINE '@'+0x4 #define FAHALFBRIGHT '@'+0x8 /* * Color bit definitions for multiple-plane systems */ #define FARED 0x1 #define FAGREEN 0x2 #define FABLUE 0x4 /* * Roll directions */ #define FAROLLUP 'u' #define FAROLLDOWN 'd' #define FAROLLLEFT 'l' #define FAROLLRIGHT 'r' /* * Random */ /* * Invalid cursor coordinate */ #define FACURSORNOMOVE -1 #ifndef TRUE #define TRUE 1 #endif TRUE #ifndef FALSE #define FALSE 0 #endif FALSE #ifndef NULL #define NULL 0 #endif NULL #define FAENHANCE(fd,enhancement,rp) farectwrite(fd,' ',enhancement,rp)