home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / AEWIN101 / VIDEO.H < prev    next >
C/C++ Source or Header  |  1990-12-24  |  2KB  |  90 lines

  1. /**********************************************************************
  2.  *  
  3.  *  NAME:           video.h
  4.  *  
  5.  *  DESCRIPTION:    video interface to Turbo C video library
  6.  *  
  7.  *  copyright (c) 1990 J. Alan Eldridge
  8.  * 
  9.  *  M O D I F I C A T I O N   H I S T O R Y
  10.  *
  11.  *  when        who                 what
  12.  *  -------------------------------------------------------------------
  13.  *  08/01/90    J. Alan Eldridge    created
  14.  *
  15.  *  08/12/90    JAE                 removed some error checking,
  16.  *                                  made some functions void
  17.  *  
  18.  *  12/21/90    JAE                 un-object-oriented it, because
  19.  *                                  it just didn't seem to fit
  20.  *
  21.  *********************************************************************/
  22.  
  23. #ifndef __VIDEO_H
  24. #define __VIDEO_H
  25.  
  26. //  return current mode
  27. int  vid_currmode();
  28.  
  29. //  attribute handling
  30. inline int  vid_mkatt(int f, int b) 
  31.     { return (f&(15|BLINK))+((b&15)<<4); }
  32.  
  33. //  default video attribute
  34. extern uchar    vid_defaultatt;
  35.  
  36. //  size of physical display
  37. int     vid_rows();
  38. int     vid_cols();
  39.  
  40. //  status info
  41. int     vid_isopen();
  42. int     vid_iscolor();
  43.  
  44. //  globals to avoid function call overhead...
  45. //  the video driver does NOT use these, it simply
  46. //  provides them for the application to use...
  47. //  if the app changes them, it has no effect ...
  48. extern int  vid_ROWS,
  49.             vid_COLS,
  50.             vid_ISCOLOR;
  51.  
  52. //  device i/o
  53. int     vid_write(
  54.     uchar   atRow,
  55.     uchar   atCol,
  56.     vidchr  *pBuf,
  57.     uchar   nChrs);
  58. int     vid_read(
  59.     uchar   atRow,
  60.     uchar   atCol,
  61.     vidchr  *pBuf,
  62.     uchar   nChrs);
  63. void    vid_clear(uchar att);
  64.  
  65. //  cursor control
  66. int vid_setcpos(
  67.     uchar   atRow,
  68.     uchar   atCol);
  69. void    vid_getcpos(uchar *pRC);
  70.  
  71. //  startup, shutdown
  72. void    vid_open(
  73.     int     mode,
  74.     char    *evar=0);
  75. void    vid_close();
  76. int     vid_envmode(
  77.     int     mode,
  78.     char    *varName);
  79.  
  80. //  control text cursor display
  81. void    vid_hidecursor(int newcnt = 0); //  hide if not hidden
  82. void    vid_showcursor();           //  increment hide counter, ?show
  83. void    vid_forcecursor(int &oldcnt);   //  must show cursor, return old count
  84. int     vid_cursortype(int type);   //  set & return old value
  85. int     vid_cursortype();           //  return current value
  86.  
  87. #endif
  88.  
  89.  
  90.