/********************************************************************* * file: h/scrn/disp.h * part #: * internal sequence #: * * ************************************************************ * * " c Copyright Hewlett-Packard Company, 1984.* All * * * rights are reserved. Copying or other reproduction * * * of this program except for archival purposes is * * * prohibited without the prior written consent of * * * Hewlett-Packard Company." * * ************************************************************ * * * The file contains the defines and externals relating to the display * driver. These are the external definitions of the display driver. * * Pisces Q-DOS project * Karen Helt PCD * ---------------------------------------------------- * initial 2/24/83 * add font changing 3/11/83 * add comments 6/15/83 * changed stat_data and * changed to short and * byte_t to save space 9/1/83 * split into two files 10/21/83 * change font stratgy 3/12/84 * */ #define DISP_DISVIDEO (('G'<<8)|0) /* ioctl commands for the display */ #define DISP_ENVIDEO (('G'<<8)|1) #define DISP_DISCURSOR (('G'<<8)|2) #define DISP_ENCURSOR (('G'<<8)|3) #define DISP_DISSPRITE (('G'<<8)|4) #define DISP_ENSPRITE (('G'<<8)|5) #define DISP_FRAME (('G'<<8)|6) #define DISP_FILL (('G'<<8)|7) #define DISP_COPY (('G'<<8)|8) #define DISP_RDWIN (('G'<<8)|9) #define DISP_WRWIN (('G'<<8)|10) #define DISP_SCROLL (('G'<<8)|11) #define DISP_MOVESPRITE (('G'<<8)|12) #define DISP_IMOVESPRITE (('G'<<8)|13) #define DISP_RDSPRITE (('G'<<8)|14) #define DISP_MOVE (('G'<<8)|15) #define DISP_IMOVE (('G'<<8)|16) #define DISP_DRAW (('G'<<8)|17) #define DISP_IDRAW (('G'<<8)|18) #define DISP_RDPEN (('G'<<8)|19) #define DISP_DRAWPIX (('G'<<8)|20) #define DISP_WRUDL (('G'<<8)|21) #define DISP_WRRR (('G'<<8)|22) #define DISP_CR_RASTER (('G'<<8)|23) #define DISP_RM_RASTER (('G'<<8)|24) #define DISP_CR_FONT (('G'<<8)|25) #define DISP_RM_FONT (('G'<<8)|26) #define DISP_GETSTAT (('G'<<8)|27) #define DISP_INITWIN (('G'<<8)|28) #define DISP_ACT_FONT (('G'<<8)|29) #define DISP_ACT_RASTER (('G'<<8)|30) #define DISP_ACT_SCREEN (('G'<<8)|31) #define DISP_RS_COPY (('G'<<8)|32) #define DISP_CONF (('G'<<8)|33) #define DISP_RDWINPARM (('G'<<8)|34) #define DISP_FAST (('G'<<8)|35) #define DISP_SLOW (('G'<<8)|36) #define DISP_SETSTAT (('G'<<8)|37) #define DISP_FONT_ID (('G'<<8)|38) #define DISP_RDBLOCK (('G'<<8)|39) #define DISP_WRBLOCK (('G'<<8)|40) #define DISP_SR_COPY (('G'<<8)|41) #define DISP_FONT_STR (('G'<<8)|42) #define DISP_INC_FONT (('G'<<8)|43) #define DISP_ALPHA_CURS (('G'<<8)|44) #define DISP_TURNON (('G'<<8)|45) #define DISP_DIS_TURNOFF (('G'<<8)|46) #define DISP_EN_TURNOFF (('G'<<8)|47) #define DISP_LEAVE_CURS (('G'<<8)|48) #define SCROLL_UP 0 /* scrolling directions */ #define SCROLL_DOWN 1 #define SCROLL_RIGHT 2 #define SCROLL_LEFT 3 #define FORCE_ZERO 0 /* replacement rules */ #define AND 1 #define AND_NOT_OLD 2 #define NEW 3 #define AND_NOT_NEW 4 #define OLD 5 #define EXOR 6 #define OR 7 #define NOR 8 #define EXNOR 9 #define NOT_OLD 10 #define OR_NOT_OLD 11 #define NOT_NEW 12 #define OR_NOT_NEW 13 #define NAND 14 #define FORCE_ONE 15 #define BLACK_LINE 00 /* user defined line types */ #define WHITE_LINE 0x0FFFF #define BLACK 0 /* background fill colors */ #define WHITE 1 #define SPACE 32 /* characters */ #define ULINE 95 #define BLINK 0x01 /* display attributes */ #define INV_VID 0x02 #define U_LINE 0x04 #define HALF_BRIGHT 0x08 #define ENHANCEMENT 0x0F #define SVEF 0x10 #define FONT 0xE0 #define FONT_HEIGHT 8 /* default font height */ #define FONT_WIDTH 6 /* default font width */ #define PATTERNSIZE 32 /* number of bytes in pattern */ #define FILENAME_SIZE 40 /* number of characters in file name */ #define FONT_ID_MAX 7 /* max font id number (bottom byte) */ struct scroll_data { /* data for scroll command */ char dir; int amount; }; struct sprite_data { /* data for enable sprite cmd */ char s_width; char s_height; char * s_pattern; }; struct fake_curs { /* data for leave fake cursor cmd */ char width; /* cursor width (16) */ char height; /* cursor height (16) */ int x; /* x of upper left corner location */ int y; /* y of upper left corner location */ char pattern[PATTERNSIZE]; /* cursor pattern */ }; struct curs_data { /* data for enable cursor cmd */ char curs_width; char curs_height; char curs_xoffset; char curs_yoffset; char * curs_pattern; }; struct alpha_curs_data { /* data for enable cursor cmd */ long font_id; /* font id to take cursor from */ char cursval; /* cursor value */ char curs_top; /* cursor top */ char curs_bot; /* cursor bottom */ char pattern[PATTERNSIZE]; /* bit pattern is returned */ }; struct xy_coord { /* data for movement commands */ int x; int y; }; struct xmit_data { /* data for transmit data cmds */ char offset; char sysflag; unsigned char * data; int count; }; struct win_data { /* data for window parameters */ int width; int height; int x; int y; }; struct stat_data { /* display status structure */ int rule; /* replacement rule */ int bckgnd; /* background fill color */ unsigned short line; /* user defined line pattern */ int penx; /* pen x coordinate */ int peny; /* pen y coordinate */ char cursoron; /* cursor enabled flag */ char * cursor; /* pointer to active cursor */ int screenh; /* screen height in dots */ int screenw; /* screen width in dots */ int actraster; /* active raster, -1 = screen */ int font_width; /* font width in dots */ int font_height; /* font height in dots */ int winx; /* window origin x */ int winy; /* window origin y */ int win_width; /* window width in dots */ int win_height; /* window height in dots */ }; struct copy_data { /* data for a block copy */ int xs; int ys; int xd; int yd; int height; int width; }; struct font_data { /* data for getting font id */ int esc_num; /* number used in escape sequence for font */ unsigned char esc_char; /* character used in escape sequence for font */ unsigned char width; /* width of character */ unsigned char height; /* height of character */ unsigned char cursval; /* cursor value */ unsigned char curs_top; /* top of cursor */ unsigned char curs_bot; /* bottom of cursor */ long id; /* unique id associated with this font */ unsigned char filenm[FILENAME_SIZE]; /* font file path name */ }; struct raster { short r_width; short r_height; char r_id; /* raster id */ }; struct fill_data { int x; int y; int width; int height; char pattern[PATTERNSIZE]; }; struct block_data { int x; int y; int height; int width; int offset; char sysflag; char * ptr; }; extern disp_write(); extern disp_ioctl(); extern disp_timeout(); extern char disp_on; extern char disp_activity; extern char disp_count; extern char white[]; extern char gray[]; extern char black[];