home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / graphics / gl.pak / GL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  3.5 KB  |  129 lines

  1. /*    @(#) gl.h 5.1 89/02/20    */
  2. /*
  3.  *    Copyright (c) David T. Lewis 1988
  4.  *    All rights reserved.
  5.  *
  6.  *    Permission is granted to use this for any personal noncommercial use.
  7.  *    You may not distribute source or executable code for profit, nor
  8.  *    may you distribute it with a commercial product without the written
  9.  *    consent of the author.  Please send modifications to the author for
  10.  *    inclusion in updates to the program.  Thanks.
  11.  */
  12.  
  13. /*    This file defines the interface to the graphics library, and should
  14.  *    be included in user programs.
  15.  */
  16.  
  17. /* Definition of programming interface to gl library.    */
  18.  
  19. extern int g_clear();
  20. extern int g_init();
  21. extern int g_finish();
  22. extern int g_pix_mode();
  23. extern int g_pix_color();
  24. extern int g_fontctl();
  25. extern long g_style();
  26. extern int g_weight();
  27. extern int p_wr_pix();
  28. extern int c_cellchar();
  29. extern int c_cellstr();
  30. extern int c_cursor();
  31. extern int n_movepen();
  32. extern int n_box();
  33. extern int n_line();
  34. extern int n_draw();
  35. extern int n_grafchar();
  36. extern int n_grafstr();
  37. extern int n_arc();
  38. extern int n_ellipse();
  39. extern int n_point();
  40.  
  41. /* Everything that follows should be identical to gf_types.h and modes.h. */
  42.  
  43. /*    @(#) gf_types.h 1.4 88/12/26    */
  44.  
  45. /* Define pixel setting modes.             */
  46.  
  47. #define CLEAR 0
  48. #define AND 1
  49. #define OR 2
  50. #define XOR 3
  51.  
  52. /* Define colors.                 */
  53.  
  54. #define BLACK        0
  55. #define BLUE         1
  56. #define GREEN        2
  57. #define CYAN         3
  58. #define RED          4
  59. #define MAGENTA      5
  60. #define BROWN        6
  61. #define WHITE        7
  62. #define GREY         8
  63. #define LT_BLUE      9
  64. #define LT_GREEN    10
  65. #define LT_CYAN     11
  66. #define LT_RED      12
  67. #define LT_MAGENTA  13
  68. #define YELLOW      14
  69. #define LT_WHITE    15
  70.  
  71. /* Define line styles.    */
  72.  
  73. #define SOLID 0xffffffffL    /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  */
  74. #define DOTTED 0x66666666L    /* XX..XX..XX..XX..XX..XX..XX..XX..  */
  75. #define DASHED 0xffe0ffe0L    /* XXXXXXXXXXX.....XXXXXXXXXXX.....  */
  76. #define SHORTDASHED 0xf8f8f8f8L    /* XXXXX...XXXXX...XXXXX...XXXXX...  */
  77. #define LONGDASHED 0xffffff00L    /* XXXXXXXXXXXXXXXXXXXXXXXX........  */
  78. #define DOTDASHED 0xfc30fc30L    /* XXXXXX....XX....XXXXXX....XX....  */
  79.  
  80. /* Define line weights (not yet implemented).    */
  81.  
  82. #define LIGHT 1
  83. #define MEDIUM 2
  84. #define HEAVY 4
  85.  
  86. /*    @(#) modes.h 1.4 89/01/10    */
  87.  
  88. /*
  89.  *    Mode definitions.  These will be used by init(), and by the mode
  90.  *    program or shell script.  As much as possible, the numeric mode
  91.  *    values should correspond to those used by the uPort screen driver
  92.  *    and by DOS.  The values given for hercules and for printers are
  93.  *    arbitrary, but should not conflict with other "standard" assignments.
  94.  */
  95.  
  96. /* ENV_MODE means take the mode setting from an environment variable. */
  97. #define ENV_MODE 0
  98.  
  99. /* CGA text modes */
  100. #define MONO_TEXT 0x02
  101. #define COLOR_TEXT 0x03
  102.  
  103. /* CGA modes (for CGA or EGA) */
  104. #define CGA_COLOR_MODE 0x04
  105. #define CGA_HI_RES_MODE 0x06
  106.  
  107. /* Monochrome text mode */
  108. #define MDA_TEXT 0x07
  109.  
  110. /* Hercules mono graphics, page 0 and page 1 */
  111. /* Note:  Modes 8 and 9 were used by the IBM PC Junior.  I trust that     */
  112. /* they will not be found on your machine.                */
  113. #define HERC_P0_MODE 0x08
  114. #define HERC_P1_MODE 0x09
  115.  
  116. /* EGA 640 x 350 color mode */
  117. #define EGA_COLOR_MODE 0x010
  118.  
  119. /* Anything beyond MAXVIDEO is not a video board.  Printers and other    */
  120. /* hardcopy would fall in this category.                */
  121.  
  122. #define MAXVIDEO 0x0FF
  123.  
  124. /* Non-video modes follow.                        */
  125.  
  126. #define IBM_PRINTER 0x100
  127.  
  128.  
  129.