Atlas - GRAPH.H

Home / ext / JunkDrawer / DOS / BuildTools / v4.0 / BLD / INC Lines: 1 | Size: 7264 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
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 */ 17struct 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. */ 32struct xycoord { 33 short xcoord; 34 short ycoord; 35}; 36 37/* structure for text position */ 38struct rccoord { 39 short row; 40 short col; 41}; 42 43#define _GRAPH_T_DEFINED 44 45#endif 46 47 48/* SETUP AND CONFIGURATION */ 49 50short 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 71short far cdecl _setactivepage(short); 72short 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 92struct videoconfig far * far cdecl _getvideoconfig(struct videoconfig far *); 93 94 95/* COORDINATE SYSTEMS */ 96 97struct xycoord far cdecl _setlogorg(short, short); 98struct xycoord far cdecl _getlogcoord(short, short); 99struct xycoord far cdecl _getphyscoord(short, short); 100 101void far cdecl _setcliprgn(short, short, short, short); 102void 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 115void far cdecl _clearscreen(short); 116 117struct xycoord far cdecl _moveto(short, short); 118struct xycoord far cdecl _getcurrentposition(void); 119 120short far cdecl _lineto(short, short); 121short far cdecl _rectangle(short, short, short, short, short); 122short far cdecl _ellipse(short, short, short, short, short); 123short far cdecl _arc(short, short, short, short, short, short, short, short); 124short far cdecl _pie(short, short, short, short, short, short, short, short, short); 125 126short far cdecl _setpixel(short, short); 127short far cdecl _getpixel(short, short); 128short far cdecl _floodfill(short, short, short); 129 130 131/* PEN COLOR, LINE STYLE, FILL PATTERN */ 132 133short far cdecl _setcolor(short); 134short far cdecl _getcolor(void); 135 136void far cdecl _setlinestyle(unsigned short); 137unsigned short far cdecl _getlinestyle(void); 138 139void far cdecl _setfillmask(unsigned char far *); 140unsigned char far * far cdecl _getfillmask(unsigned char far *); 141 142/* COLOR SELECTION */ 143 144long far cdecl _setbkcolor(long); 145long far cdecl _getbkcolor(void); 146 147long far cdecl _remappalette(short, long); 148short far cdecl _remapallpalette(long far *); 149short 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 159void far cdecl _settextwindow(short, short, short, short); 160void far cdecl _outtext(char far *); 161short far cdecl _wrapon(short); 162short far cdecl _displaycursor(short); 163 164struct rccoord far cdecl _settextposition(short, short); 165struct rccoord far cdecl _gettextposition(void); 166 167short far cdecl _settextcolor(short); 168short far cdecl _gettextcolor(void); 169 170 171/* SCREEN IMAGES */ 172 173void far cdecl _getimage(short, short, short, short, char far *); 174void far cdecl _putimage(short, short, char far *, short); 175long 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 217
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.