home *** CD-ROM | disk | FTP | other *** search
- /*
- Interface definition for the machine-dependent routines called by
- the portable CORE graphics routines. These variables and functions
- must be provided for each machine or graphics mode to be supported,
- for example in gz.c for the Z-100 or in gpc.c for the IBM PC.
- */
-
-
- /* variables */
-
- extern char *machine;
-
- extern int
- max_color, /* color numbers range from 0 to max_color */
- pixels_wide, /* x values range from 0 (left) to pixels_wide-1 (right) */
- pixels_high; /* y values range from 0 (top) to pixels_high-1 (bottom) */
- extern double
- best_width,
- best_height; /* screen height/width (proportional to actual display
- area dimensions in inches, but one of these *must*
- be 1, and the other must be in the range 0 to 1).
- For example, if the screen is twice as wide as it
- is high, best_height would be 0.5 and best_width
- would be 1. */
-
-
- /* text display parameters */
-
- extern int char_rows; /* number of text rows */
- extern int char_columns; /* number of text columns */
- extern int char_height; /* y displacement from one text row to next */
- extern int char_width; /* x displacement from one char column to next */
- extern int x_offset; /* fudge factors for */
- extern int y_offset; /* equations below */
-
- /* an 'A' on row r, column c has lower left corner on raster (y value)
- y = r*char_height + y_offset
- at pixel
- x = c*char_width + x_offset */
-
- /* keyboard codes */
-
- extern int left_arrow;
- extern int right_arrow;
- extern int up_arrow;
- extern int down_arrow;
- extern int escaped_arrows; /* nonzero if arrow key codes are preceded
- by an escape code (as on IBM PC) */
- extern int escape_char; /* the character (if any) preceding key codes */
-
-
- /* pointers to line drawing and erasing functions */
-
- extern int (*draw_line)(); /* (*draw_line)(x1,y1,x2,y2) int x1,y1,x2,y2;
- draws line from (x1,y1) to (x2,y2) */
- extern int (*erase_line)(); /* (*erase_line)(x1,y1,x2,y2) int x1,y1,x2,y2;
- erases line from (x1,y1) to (x2,y2) */
-
-
- /* functions */
-
- extern int clear_graphics(); /* clears screen */
- extern int init_graphics(); /* initializes graphics mode */
- extern int finish_graphics(); /* terminates graphics mode */
- extern int inquire_color(); /* returns current color number */
- extern double inquire_intensity(); /* returns current intensity */