home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / famapi.zip / INCLUDE.ZIP / CONIO.H < prev    next >
C/C++ Source or Header  |  1993-06-13  |  3KB  |  96 lines

  1. //
  2. //      **************************************************************
  3. //       JdeBP C++ Library Routines      General Public Licence v1.00
  4. //          Copyright (c) 1991,1992  Jonathan de Boyne Pollard
  5. //      **************************************************************
  6. //
  7. // CONSOLE I/O (MS-DOS) and BORLAND VIDEO FUNCTIONS
  8. //
  9.  
  10. #if !defined(___STDDEF_H_INCLUDED)
  11. #include <_stddef.h>
  12. #endif
  13. #if !defined(___PORTINT_H_INCLUDED)
  14. #include <_portint.h>       // PORT and INTERRUPT FUNCTIONS
  15. #endif
  16.  
  17. #if !defined(__CONIO_H_INCLUDED)
  18.  
  19. #define NULL    _NULL
  20.  
  21. #define _NOCURSOR      0
  22. #define _SOLIDCURSOR   1
  23. #define _NORMALCURSOR  2
  24.  
  25. #define BLINK       128 /* blink bit */
  26.  
  27. #ifndef _CONIO_H_COLORS
  28. enum COLORS {
  29.     BLACK,      BLUE,           GREEN,      CYAN,
  30.     RED,        MAGENTA,        BROWN,      LIGHTGRAY,
  31.     DARKGRAY,   LIGHTBLUE,      LIGHTGREEN, LIGHTCYAN,
  32.     LIGHTRED,   LIGHTMAGENTA,   YELLOW,     WHITE
  33. };
  34. #define _CONIO_H_COLORS
  35. #endif
  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. enum text_modes { LASTMODE=-1, BW40=0, C40, BW80, C80, MONO=7, C4350=64 };
  52.  
  53. extern "C" {
  54.  
  55. char *      _CDECL  cgets   (char *);
  56. int         _CDECL  cprintf (const char *, ...);
  57. int         _CDECL  cputs   (const char *);
  58. int         _CDECL  cscanf  (const char *, ...);
  59. int         _CDECL  getch   (void);
  60. int         _CDECL  getche  (void);
  61. int         _CDECL  putch   (int);
  62. int         _CDECL  ungetch (int);
  63.  
  64. int         _CDECL  kbhit   (void);
  65.  
  66. void        _CDECL  clreol  (void);
  67. void        _CDECL  clrscr  (void);
  68. void        _CDECL  gotoxy  (int, int);
  69. int         _CDECL  wherex  (void);
  70. int         _CDECL  wherey  (void);
  71. void        _CDECL  delline (void);
  72. int         _CDECL  gettext (int, int, int, int, void *);
  73. void        _CDECL  gettextinfo (struct text_info *);
  74. void        _CDECL  highvideo   (void);
  75. void        _CDECL  insline (void);
  76. void        _CDECL  lowvideo(void);
  77. int         _CDECL  movetext(int, int, int, int, int, int);
  78. void        _CDECL  normvideo(void);
  79. int         _CDECL  puttext (int, int, int, int, void *);
  80. void        _CDECL  textattr(int);
  81. void        _CDECL  textbackground (int);
  82. void        _CDECL  textcolor(int);
  83. void        _CDECL  textmode(int);
  84. void        _CDECL  window  (int, int, int, int);
  85.  
  86. void        _CDECL  _setcursortype(int);
  87. char *      _CDECL  getpass (const char *);
  88.  
  89. extern  int _CDECL  directvideo;
  90. extern  int _CDECL  _wscroll;
  91.  
  92. }
  93.  
  94. #define __CONIO_H_INCLUDED
  95. #endif
  96.