home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / graphics / tcxl.arc / TCXLVID.H < prev    next >
C/C++ Source or Header  |  1988-04-09  |  4KB  |  118 lines

  1.  
  2. /*
  3.    ┌──────────────────────────────────────────────────────────────────────────┐
  4.    │                                                                          │
  5.    │  TCXLVID.H - TCXL (c) 1987, 1988 by Mike Smedley.                        │
  6.    │                                                                          │
  7.    │  This header file contains function prototypes and definitions for       │
  8.    │  screen/video functions.  Windowing functions are defined in TCXLWIN.H   │
  9.    │                                                                          │
  10.    └──────────────────────────────────────────────────────────────────────────┘
  11. */
  12.  
  13.  
  14. #if __STDC__
  15. #define _Cdecl
  16. #else
  17. #define _Cdecl cdecl
  18. #endif
  19.  
  20.  
  21. /*---------------------------[ Function Prototypes ]-------------------------*/
  22.  
  23. void     _Cdecl box(int srow,int scol,int erow,int ecol,int btype,int atr);
  24. void     _Cdecl boxd(int srow,int scol,int erow,int ecol,int btype,int atr);
  25. void     _Cdecl clreol_(void);
  26. void     _Cdecl clrscrn(void);
  27. int      _Cdecl disktoscrn(char *fname);
  28. void     _Cdecl fill(int srow,int scol,int erow,int ecol,int ch,int atr);
  29. void     _Cdecl filld(int srow,int scol,int erow,int ecol,int ch,int atr);
  30. void     _Cdecl gotoxy_(int row,int col);
  31. void     _Cdecl mode(int mode_code);
  32. void     _Cdecl printc(int row,int col,int attr,int ch,int count);
  33. void     _Cdecl printcd(int row,int col,int attr,int ch);
  34. void     _Cdecl prints(int row,int col,int attr,char *str);
  35. void     _Cdecl printsd(int row,int col,int attr,char *str);
  36. unsigned _Cdecl readchat(void);
  37. void     _Cdecl readcur(int *row,int *col);
  38. void     _Cdecl revattr(int count);
  39. int      _Cdecl scrntodisk(char *fname);
  40. void     _Cdecl setattr(int attr,int count);
  41. void     _Cdecl setcursz(int sline,int eline);
  42. int      _Cdecl setlines(int numlines);
  43. void     _Cdecl spc(int num);
  44. void     _Cdecl srestore(int *sbuf);
  45. int     *_Cdecl ssave(void);
  46. void     _Cdecl videoinit(void);
  47. int      _Cdecl vidtype(void);
  48.  
  49.  
  50. /*-------------[ display adapter types returned from vidtype() ]-------------*/
  51.  
  52. #define MDA         0
  53. #define HGC         1
  54. #define HGCPLUS     2
  55. #define INCOLOR     3
  56. #define CGA         4
  57. #define EGA         5
  58. #define VGA         6
  59.  
  60.  
  61. /*-----------------------[ video RAM segment address ]-----------------------*/
  62.  
  63. extern unsigned _videoseg;
  64.  
  65.  
  66. /*--------------[ attribute codes for functions that use them ]--------------*/
  67.  
  68.     /*  attribute codes are created by ORing the codes for foreground
  69.         color, background color, and optionally blink, together.  For
  70.         example, to create an attribute code for light blue on green,
  71.         you would use LBLUE|_GREEN and to make the foreground blink,
  72.         you would add |BLINK onto the end of that.                      */
  73.  
  74. #ifndef BLACK                           /*  foreground colors  */
  75. #define BLACK       0                   
  76. #define BLUE        1
  77. #define GREEN       2
  78. #define CYAN        3
  79. #define RED         4
  80. #define MAGENTA     5
  81. #define BROWN       6
  82. #define YELLOW      14
  83. #define WHITE       15
  84. #endif
  85. #ifndef LGREY
  86. #define LGREY       7                   /*  TCXL abbreviates LIGHT as L    */
  87. #define DGREY       8                   /*  and DARK as D for ease of use  */
  88. #define LBLUE       9
  89. #define LGREEN      10
  90. #define LCYAN       11
  91. #define LRED        12
  92. #define LMAGENTA    13
  93.  
  94. #define _BLACK      0                   /*  background colors  */
  95. #define _BLUE       16
  96. #define _GREEN      32
  97. #define _CYAN       48
  98. #define _RED        64
  99. #define _MAGENTA    80
  100. #define _BROWN      96
  101. #define _LGREY      112
  102.  
  103. #define BLINK       128                 /*  blink attribute  */
  104. #endif
  105.  
  106.  
  107. /*-----------------------[ Macro-Function Definitions ]----------------------*/
  108.  
  109. #ifndef attrib
  110. #define attrib(f,b,i,bl)    ((b<<4)|(f)|(i<<3)|(bl<<7))
  111. #endif
  112. #ifndef clrwin
  113. #define clrwin(a,b,c,d)     gotoxy_(a,b);fill(a,b,c,d,' ',(readchat()>>8))
  114. #endif
  115. #define cls()               clrscrn()
  116. #define home()              gotoxy_(0,0)
  117.  
  118.