Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

216 lines
7.1 KiB

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