home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / CONIO.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  5KB  |  204 lines

  1. /*  conio.h
  2.  
  3.     Direct MSDOS console input/output.
  4. */
  5.  
  6. /*
  7.  *      C/C++ Run Time Library - Version 1.5
  8.  *
  9.  *      Copyright (c) 1987, 1994 by Borland International
  10.  *      All Rights Reserved.
  11.  *
  12.  */
  13.  
  14. #if !defined(__CONIO_H)
  15. #define __CONIO_H
  16.  
  17. #if !defined(___DEFS_H)
  18. #include <_defs.h>
  19. #endif
  20.  
  21.  
  22. #if !defined(RC_INVOKED)
  23.  
  24. #if defined(__STDC__)
  25. #pragma warn -nak
  26. #endif
  27.  
  28. #pragma option -a-
  29.  
  30. #endif  /* !RC_INVOKED */
  31.  
  32.  
  33. #define _NOCURSOR      0
  34. #define _SOLIDCURSOR   1
  35. #define _NORMALCURSOR  2
  36.  
  37. struct text_info {
  38.     unsigned char winleft;
  39.     unsigned char wintop;
  40.     unsigned char winright;
  41.     unsigned char winbottom;
  42.     unsigned char attribute;
  43.     unsigned char normattr;
  44.     unsigned char currmode;
  45.     unsigned char screenheight;
  46.     unsigned char screenwidth;
  47.     unsigned char curx;
  48.     unsigned char cury;
  49. };
  50.  
  51. #if !defined(__COLORS)
  52. #define __COLORS
  53.  
  54. enum COLORS {
  55.     BLACK,          /* dark colors */
  56.     BLUE,
  57.     GREEN,
  58.     CYAN,
  59.     RED,
  60.     MAGENTA,
  61.     BROWN,
  62.     LIGHTGRAY,
  63.     DARKGRAY,       /* light colors */
  64.     LIGHTBLUE,
  65.     LIGHTGREEN,
  66.     LIGHTCYAN,
  67.     LIGHTRED,
  68.     LIGHTMAGENTA,
  69.     YELLOW,
  70.     WHITE
  71. };
  72. #endif
  73.  
  74. #define BLINK       128 /* blink bit */
  75.  
  76.  
  77. enum text_modes
  78. {
  79.     /* DOS-compatible modes */
  80.  
  81.     LASTMODE = -1,
  82.     BW40     = 0,
  83.     C40,
  84.     BW80,
  85.     C80,
  86.     MONO     = 7,
  87.     C4350    = 64,
  88.  
  89.     /* New Color modes */
  90.  
  91.     C40X14   = 8,
  92.     C40X21,
  93.     C40X28,
  94.     C40X43,
  95.     C40X50,
  96.     C40X60,
  97.  
  98.     C80X14,
  99.     C80X21,
  100.     C80X28,
  101.     C80X43,
  102.     C80X50,
  103.     C80X60,
  104.  
  105.     /* New Black & White modes */
  106.  
  107.     BW40X14,
  108.     BW40X21,
  109.     BW40X28,
  110.     BW40X43,
  111.     BW40X50,
  112.     BW40X60,
  113.  
  114.     BW80X14,
  115.     BW80X21,
  116.     BW80X28,
  117.     BW80X43,
  118.     BW80X50,
  119.     BW80X60,
  120.  
  121.     /* New Monochrome modes */
  122.  
  123.     MONO14,             /* Invalid VGA mode */
  124.     MONO21,
  125.     MONO28,
  126.     MONO43,
  127.     MONO50,
  128.     MONO60,
  129.  
  130.     _ORIGMODE = 65      /* original mode at program startup */
  131. };
  132.  
  133.  
  134. #define PASS_MAX    8   /* max. no. of chars returned by getpass */
  135.  
  136. #if !defined(__STDC__)  /*  NON-ANSI  */
  137. #define directvideo  _directvideo
  138. #endif
  139.  
  140. extern   int _RTLENTRY _EXPDATA _directvideo;
  141.  
  142. extern   int _RTLENTRY _EXPDATA _wscroll;
  143.  
  144. #ifdef __cplusplus
  145. extern "C" {
  146. #endif
  147.  
  148. void        _RTLENTRY _EXPFUNC clreol( void );
  149. void        _RTLENTRY _EXPFUNC clrscr( void );
  150. void        _RTLENTRY _EXPFUNC delline( void );
  151. int         _RTLENTRY _EXPFUNC gettext( int __left, int __top,
  152.                             int __right, int __bottom,
  153.                             void *__destin);
  154. void        _RTLENTRY _EXPFUNC gettextinfo (struct text_info *__r );
  155. void        _RTLENTRY _EXPFUNC gotoxy( int __x, int __y );
  156. void        _RTLENTRY _EXPFUNC highvideo( void );
  157. void        _RTLENTRY _EXPFUNC insline( void );
  158. void        _RTLENTRY _EXPFUNC lowvideo( void );
  159. int         _RTLENTRY _EXPFUNC movetext( int __left, int __top,
  160.                              int __right, int __bottom,
  161.                              int __destleft, int __desttop );
  162. void        _RTLENTRY _EXPFUNC normvideo( void );
  163. int         _RTLENTRY _EXPFUNC puttext( int __left, int __top,
  164.                             int __right, int __bottom,
  165.                             void *__source );
  166. void        _RTLENTRY _EXPFUNC textattr( int __newattr );
  167. void        _RTLENTRY _EXPFUNC textbackground( int __newcolor );
  168. void        _RTLENTRY _EXPFUNC textcolor( int __newcolor );
  169. void        _RTLENTRY _EXPFUNC textmode( int __newmode );
  170. void        _RTLENTRY _EXPFUNC window( int __left, int __top, int __right, int __bottom);
  171.  
  172. void        _RTLENTRY _EXPFUNC _setcursortype( int __cur_t );
  173. char *      _RTLENTRY _EXPFUNC cgets( char *__str );
  174. int         _RTLENTRY _EXPFUNC cprintf( const char *__format, ... );
  175. int         _RTLENTRY _EXPFUNC cputs( const char *__str );
  176. int         _RTLENTRY _EXPFUNC cscanf( const char *__format, ... );
  177. int         _RTLENTRY _EXPFUNC getch( void );
  178. int         _RTLENTRY _EXPFUNC getche( void );
  179. char *      _RTLENTRY _EXPFUNC getpass( const char *__prompt );
  180. int         _RTLENTRY _EXPFUNC kbhit( void );
  181. int         _RTLENTRY _EXPFUNC putch( int __c );
  182. int         _RTLENTRY _EXPFUNC ungetch( int __ch );
  183. int         _RTLENTRY _EXPFUNC wherex( void );
  184. int         _RTLENTRY _EXPFUNC wherey( void );
  185.  
  186. #ifdef __cplusplus
  187. }
  188. #endif
  189.  
  190.  
  191.  
  192. #if !defined(RC_INVOKED)
  193.  
  194. #pragma option -a.
  195.  
  196. #if defined(__STDC__)
  197. #pragma warn .nak
  198. #endif
  199.  
  200. #endif  /* !RC_INVOKED */
  201.  
  202.  
  203. #endif  /* __CONIO_H */
  204.