diff options
Diffstat (limited to 'v4.0/src/TOOLS/BLD/INC/GRAPH.H')
| -rw-r--r-- | v4.0/src/TOOLS/BLD/INC/GRAPH.H | 216 |
1 files changed, 216 insertions, 0 deletions
diff --git a/v4.0/src/TOOLS/BLD/INC/GRAPH.H b/v4.0/src/TOOLS/BLD/INC/GRAPH.H new file mode 100644 index 0000000..7b69c51 --- /dev/null +++ b/v4.0/src/TOOLS/BLD/INC/GRAPH.H | |||
| @@ -0,0 +1,216 @@ | |||
| 1 | /*** | ||
| 2 | *graph.h - declare constants and functions for graphics library | ||
| 3 | * | ||
| 4 | * Copyright (c) 1987-1988, Microsoft Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | *Purpose: | ||
| 7 | * This file declares the graphics library functions and | ||
| 8 | * the manifest constants that are used with them. | ||
| 9 | * | ||
| 10 | *******************************************************************************/ | ||
| 11 | |||
| 12 | /* user-visible declarations for Quick-C Graphics Library */ | ||
| 13 | |||
| 14 | #ifndef _GRAPH_T_DEFINED | ||
| 15 | |||
| 16 | /* structure for _getvideoconfig() as visible to user */ | ||
| 17 | struct videoconfig { | ||
| 18 | short numxpixels; /* number of pixels on X axis */ | ||
| 19 | short numypixels; /* number of pixels on Y axis */ | ||
| 20 | short numtextcols; /* number of text columns available */ | ||
| 21 | short numtextrows; /* number of text rows available */ | ||
| 22 | short numcolors; /* number of actual colors */ | ||
| 23 | short bitsperpixel; /* number of bits per pixel */ | ||
| 24 | short numvideopages; /* number of available video pages */ | ||
| 25 | short mode; /* current video mode */ | ||
| 26 | short adapter; /* active display adapter */ | ||
| 27 | short monitor; /* active display monitor */ | ||
| 28 | short memory; /* adapter video memory in K bytes */ | ||
| 29 | }; | ||
| 30 | |||
| 31 | /* return value of _setlogorg(), etc. */ | ||
| 32 | struct xycoord { | ||
| 33 | short xcoord; | ||
| 34 | short ycoord; | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* structure for text position */ | ||
| 38 | struct rccoord { | ||
| 39 | short row; | ||
| 40 | short col; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #define _GRAPH_T_DEFINED | ||
| 44 | |||
| 45 | #endif | ||
| 46 | |||
| 47 | |||
| 48 | /* SETUP AND CONFIGURATION */ | ||
| 49 | |||
| 50 | short far cdecl _setvideomode(short); | ||
| 51 | |||
| 52 | /* arguments to _setvideomode() */ | ||
| 53 | #define _DEFAULTMODE -1 /* restore screen to original mode */ | ||
| 54 | #define _TEXTBW40 0 /* 40 x 25 text, 16 grey */ | ||
| 55 | #define _TEXTC40 1 /* 40 x 25 text, 16/8 color */ | ||
| 56 | #define _TEXTBW80 2 /* 80 x 25 text, 16 grey */ | ||
| 57 | #define _TEXTC80 3 /* 80 x 25 text, 16/8 color */ | ||
| 58 | #define _MRES4COLOR 4 /* 320 x 200, 4 color */ | ||
| 59 | #define _MRESNOCOLOR 5 /* 320 x 200, 4 grey */ | ||
| 60 | #define _HRESBW 6 /* 640 x 200, BW */ | ||
| 61 | #define _TEXTMONO 7 /* 80 x 25 text, BW */ | ||
| 62 | #define _HERCMONO 8 /* 720 x 348, BW for HGC */ | ||
| 63 | #define _MRES16COLOR 13 /* 320 x 200, 16 color */ | ||
| 64 | #define _HRES16COLOR 14 /* 640 x 200, 16 color */ | ||
| 65 | #define _ERESNOCOLOR 15 /* 640 x 350, BW */ | ||
| 66 | #define _ERESCOLOR 16 /* 640 x 350, 4 or 16 color */ | ||
| 67 | #define _VRES2COLOR 17 /* 640 x 480, BW */ | ||
| 68 | #define _VRES16COLOR 18 /* 640 x 480, 16 color */ | ||
| 69 | #define _MRES256COLOR 19 /* 320 x 200, 256 color */ | ||
| 70 | |||
| 71 | short far cdecl _setactivepage(short); | ||
| 72 | short far cdecl _setvisualpage(short); | ||
| 73 | |||
| 74 | /* videoconfig adapter values */ | ||
| 75 | /* these manifest constants can be used to determine the type of monitor in */ | ||
| 76 | /* use, using either simple comparisons or the bitwise-AND operator (&) */ | ||
| 77 | #define _MDPA 0x0001 /* Monochrome Display Adapter (MDPA) */ | ||
| 78 | #define _CGA 0x0002 /* Color Graphics Adapter (CGA) */ | ||
| 79 | #define _EGA 0x0004 /* Enhanced Graphics Adapter (EGA) */ | ||
| 80 | #define _VGA 0x0008 /* Video Graphics Array (VGA) */ | ||
| 81 | #define _MCGA 0x0010 /* MultiColor Graphics Array (MCGA) */ | ||
| 82 | #define _HGC 0x0020 /* Hercules Graphics Card (HGC) */ | ||
| 83 | |||
| 84 | /* videoconfig monitor values */ | ||
| 85 | /* these manifest constants can be used to determine the type of the active */ | ||
| 86 | /* adapter, using either simple comparisons or the bitwise-AND operator (&) */ | ||
| 87 | #define _MONO 0x0001 /* Monochrome */ | ||
| 88 | #define _COLOR 0x0002 /* Color (or Enhanced emulating color) */ | ||
| 89 | #define _ENHCOLOR 0x0004 /* Enhanced Color */ | ||
| 90 | #define _ANALOG 0x0018 /* Analog */ | ||
| 91 | |||
| 92 | struct videoconfig far * far cdecl _getvideoconfig(struct videoconfig far *); | ||
| 93 | |||
| 94 | |||
| 95 | /* COORDINATE SYSTEMS */ | ||
| 96 | |||
| 97 | struct xycoord far cdecl _setlogorg(short, short); | ||
| 98 | struct xycoord far cdecl _getlogcoord(short, short); | ||
| 99 | struct xycoord far cdecl _getphyscoord(short, short); | ||
| 100 | |||
| 101 | void far cdecl _setcliprgn(short, short, short, short); | ||
| 102 | void far cdecl _setviewport(short, short, short, short); | ||
| 103 | |||
| 104 | |||
| 105 | /* OUTPUT ROUTINES */ | ||
| 106 | |||
| 107 | /* control parameters for Rectangle, Ellipse and Pie */ | ||
| 108 | #define _GBORDER 2 /* draw outline only */ | ||
| 109 | #define _GFILLINTERIOR 3 /* fill using current fill mask */ | ||
| 110 | |||
| 111 | #define _GCLEARSCREEN 0 | ||
| 112 | #define _GVIEWPORT 1 | ||
| 113 | #define _GWINDOW 2 | ||
| 114 | |||
| 115 | void far cdecl _clearscreen(short); | ||
| 116 | |||
| 117 | struct xycoord far cdecl _moveto(short, short); | ||
| 118 | struct xycoord far cdecl _getcurrentposition(void); | ||
| 119 | |||
| 120 | short far cdecl _lineto(short, short); | ||
| 121 | short far cdecl _rectangle(short, short, short, short, short); | ||
| 122 | short far cdecl _ellipse(short, short, short, short, short); | ||
| 123 | short far cdecl _arc(short, short, short, short, short, short, short, short); | ||
| 124 | short far cdecl _pie(short, short, short, short, short, short, short, short, short); | ||
| 125 | |||
| 126 | short far cdecl _setpixel(short, short); | ||
| 127 | short far cdecl _getpixel(short, short); | ||
| 128 | short far cdecl _floodfill(short, short, short); | ||
| 129 | |||
| 130 | |||
| 131 | /* PEN COLOR, LINE STYLE, FILL PATTERN */ | ||
| 132 | |||
| 133 | short far cdecl _setcolor(short); | ||
| 134 | short far cdecl _getcolor(void); | ||
| 135 | |||
| 136 | void far cdecl _setlinestyle(unsigned short); | ||
| 137 | unsigned short far cdecl _getlinestyle(void); | ||
| 138 | |||
| 139 | void far cdecl _setfillmask(unsigned char far *); | ||
| 140 | unsigned char far * far cdecl _getfillmask(unsigned char far *); | ||
| 141 | |||
| 142 | /* COLOR SELECTION */ | ||
| 143 | |||
| 144 | long far cdecl _setbkcolor(long); | ||
| 145 | long far cdecl _getbkcolor(void); | ||
| 146 | |||
| 147 | long far cdecl _remappalette(short, long); | ||
| 148 | short far cdecl _remapallpalette(long far *); | ||
| 149 | short far cdecl _selectpalette(short); | ||
| 150 | |||
| 151 | |||
| 152 | /* TEXT */ | ||
| 153 | #define _GCURSOROFF 0 | ||
| 154 | #define _GCURSORON 1 | ||
| 155 | |||
| 156 | #define _GWRAPOFF 0 | ||
| 157 | #define _GWRAPON 1 | ||
| 158 | |||
| 159 | void far cdecl _settextwindow(short, short, short, short); | ||
| 160 | void far cdecl _outtext(char far *); | ||
| 161 | short far cdecl _wrapon(short); | ||
| 162 | short far cdecl _displaycursor(short); | ||
| 163 | |||
| 164 | struct rccoord far cdecl _settextposition(short, short); | ||
| 165 | struct rccoord far cdecl _gettextposition(void); | ||
| 166 | |||
| 167 | short far cdecl _settextcolor(short); | ||
| 168 | short far cdecl _gettextcolor(void); | ||
| 169 | |||
| 170 | |||
| 171 | /* SCREEN IMAGES */ | ||
| 172 | |||
| 173 | void far cdecl _getimage(short, short, short, short, char far *); | ||
| 174 | void far cdecl _putimage(short, short, char far *, short); | ||
| 175 | long far cdecl _imagesize(short, short, short, short); | ||
| 176 | |||
| 177 | /* "action verbs" for _putimage() */ | ||
| 178 | #define _GPSET 3 | ||
| 179 | #define _GPRESET 2 | ||
| 180 | #define _GAND 1 | ||
| 181 | #define _GOR 0 | ||
| 182 | #define _GXOR 4 | ||
| 183 | |||
| 184 | /* universal color values: */ | ||
| 185 | #define _BLACK 0x000000L | ||
| 186 | #define _BLUE 0x2a0000L | ||
| 187 | #define _GREEN 0x002a00L | ||
| 188 | #define _CYAN 0x2a2a00L | ||
| 189 | #define _RED 0x00002aL | ||
| 190 | #define _MAGENTA 0x2a002aL | ||
| 191 | #define _BROWN 0x00152aL | ||
| 192 | #define _WHITE 0x2a2a2aL | ||
| 193 | #define _GRAY 0x151515L | ||
| 194 | #define _LIGHTBLUE 0x3F1515L | ||
| 195 | #define _LIGHTGREEN 0x153f15L | ||
| 196 | #define _LIGHTCYAN 0x3f3f15L | ||
| 197 | #define _LIGHTRED 0x15153fL | ||
| 198 | #define _LIGHTMAGENTA 0x3f153fL | ||
| 199 | #define _LIGHTYELLOW 0x153f3fL | ||
| 200 | #define _BRIGHTWHITE 0x3f3f3fL | ||
| 201 | |||
| 202 | /* mono mode F color values: */ | ||
| 203 | #define _MODEFOFF 0L | ||
| 204 | #define _MODEFOFFTOON 1L | ||
| 205 | #define _MODEFOFFTOHI 2L | ||
| 206 | #define _MODEFONTOOFF 3L | ||
| 207 | #define _MODEFON 4L | ||
| 208 | #define _MODEFONTOHI 5L | ||
| 209 | #define _MODEFHITOOFF 6L | ||
| 210 | #define _MODEFHITOON 7L | ||
| 211 | #define _MODEFHI 8L | ||
| 212 | |||
| 213 | /* mono mode 7 color values: */ | ||
| 214 | #define _MODE7OFF 0L | ||
| 215 | #define _MODE7ON 1L | ||
| 216 | #define _MODE7HI 2L | ||