home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prof_c / include / local / video.h < prev   
Encoding:
C/C++ Source or Header  |  1988-08-11  |  3.1 KB  |  155 lines

  1. /*
  2.  *    video.h
  3.  */
  4.  
  5. /* current video state/mode information */
  6. extern short Vmode;
  7. extern short Vwidth;
  8. extern short Vpage;
  9.  
  10. #define MAXVMODE  16
  11.  
  12. /* video limit tables */
  13. extern short Maxrow[MAXVMODE];
  14. extern short Maxcol[MAXVMODE];
  15. extern short Maxpage[MAXVMODE];
  16.  
  17. /* active display */
  18. #define MONO    1
  19. #define COLOR    2
  20.  
  21. /* cursor modes */
  22. #define CURSOR_OFF    0
  23. #define CURSOR_ON    1
  24.  
  25. /* installed display adapters */
  26. #define MDA    1
  27. #define CGA    2
  28. #define EGA    4
  29.  
  30. /* --- video modes --- */
  31. /* CGA modes */
  32. #define CGA_M40        0
  33. #define CGA_C40        1
  34. #define CGA_M80        2
  35. #define CGA_C80        3
  36. #define CGA_CMRES    4
  37. #define CGA_MMRES    5
  38. #define CGA_MHRES    6
  39. /* MDA mode */
  40. #define MDA_M80        7
  41. /* PCjr modes */
  42. #define PCJR_CLRES    8    
  43. #define PCJR_CMRES    9
  44. #define PCJR_CHRES    10
  45. /* modes 11 and 12 are not currently used */
  46. /* EGA modes */
  47. #define EGA_CMRES    13
  48. #define EGA_CHRES    14
  49. #define EGA_MHRES    15
  50. #define EGA_EHRES    16
  51.  
  52. /* miscellaneous video masks */
  53.   /* character mask */
  54. #define CMASK    0x00FF
  55.   /* attribute mask */
  56. #define AMASK    0xFF00
  57.  
  58. /* attribute modifiers */
  59. #define BRIGHT    8
  60. #define BLINK    128
  61.  
  62. /* primary video attributes */
  63. #define BLU    1
  64. #define GRN    2
  65. #define RED    4
  66.  
  67. /* composite video attributes */
  68. #define BLK    0
  69. #define CYAN    (BLU | GRN)        /* 3 */
  70. #define MAGENTA    (BLU | RED)        /* 5 */
  71. #define BRN    (GRN | RED)        /* 6 */
  72. #define WHT    (BLU | GRN | RED)    /* 7 */
  73. #define GRAY    (BLK | BRIGHT)
  74. #define LBLU    (BLU | BRIGHT)
  75. #define LGRN    (GRN | BRIGHT)
  76. #define LCYAN    (CYAN | BRIGHT)
  77. #define LRED    (RED | BRIGHT)
  78. #define LMAG    (MAG | BRIGHT)
  79. #define YEL    (BRN | BRIGHT)
  80. #define BWHT    (WHT | BRIGHT)
  81. #define NORMAL    WHT
  82. #define REVERSE    112
  83.  
  84. /*
  85.  *    drawing characters -- items having two numbers use
  86.  *    the first number as the horizontal specifier
  87.  */
  88.  
  89. /* single-line boxes */
  90. #define VBAR1    179
  91. #define VLINE    179    /* alias */
  92. #define HBAR1    196
  93. #define HLINE    196    /* alias */
  94. #define    ULC11    218
  95. #define    URC11    191
  96. #define    LLC11    192
  97. #define    LRC11    217
  98. #define    TL11    195
  99. #define    TR11    180
  100. #define    TT11    194
  101. #define    TB11    193
  102. #define X11    197
  103.  
  104. /* double-line boxes */
  105. #define VBAR2    186
  106. #define HBAR2    205
  107. #define    ULC22    201
  108. #define    URC22    187
  109. #define LLC22    200
  110. #define LRC22    188
  111. #define    TL22    204
  112. #define    TR22    185
  113. #define    TT22    203
  114. #define    TB22    202
  115. #define X22    206
  116.  
  117. /* single-line horizontal & double-line vertical boxes */
  118. #define    ULC12    214
  119. #define    URC12    183
  120. #define LLC12    211
  121. #define LRC12    189
  122. #define    TL12    199
  123. #define    TR12    182
  124. #define    TT12    210
  125. #define    TB12    208
  126. #define X12    215
  127.  
  128. /* double-line horizontal & single-line vertical boxes */
  129. #define    ULC21    213
  130. #define    URC21    184
  131. #define LLC21    212
  132. #define LRC21    190
  133. #define    TL21    198
  134. #define    TR21    181
  135. #define    TT21    209
  136. #define    TB21    207
  137. #define X21    216
  138.  
  139. /* full and partial blocks */
  140. #define BLOCK    219
  141. #define VBAR    219    /* alias */
  142. #define VBARL    221
  143. #define VBARR    222
  144. #define HBART    223
  145. #define HBARB    220
  146.  
  147. /* special character-graphic symbols */
  148. #define BLANK        32
  149. #define DIAMOND        4
  150. #define UPARROW        24
  151. #define DOWNARROW    25
  152. #define RIGHTARROW    26
  153. #define LEFTARROW    27
  154. #define SLASH        47
  155.