home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJDEV200.ZIP / include / conio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-06  |  2.8 KB  |  110 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_conio_h_
  3. #define __dj_include_conio_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  10.  
  11. #ifndef __STRICT_ANSI__
  12.  
  13. #ifndef _POSIX_SOURCE
  14.  
  15.  
  16. extern int directvideo; /* ignored by gppconio */
  17. extern int _wscroll;
  18.  
  19. #define _NOCURSOR      0
  20. #define _SOLIDCURSOR   1
  21. #define _NORMALCURSOR  2
  22.  
  23. struct text_info {
  24.     unsigned char winleft;
  25.     unsigned char wintop;
  26.     unsigned char winright;
  27.     unsigned char winbottom;
  28.     unsigned char attribute;
  29.     unsigned char normattr;
  30.     unsigned char currmode;
  31.     unsigned char screenheight;
  32.     unsigned char screenwidth;
  33.     unsigned char curx;
  34.     unsigned char cury;
  35. };
  36.  
  37. enum text_modes { LASTMODE=-1, BW40=0, C40, BW80, C80, MONO=7, C4350=64 };
  38.  
  39. enum COLORS {
  40.     /*  dark colors     */
  41.     BLACK,          
  42.     BLUE,
  43.     GREEN,
  44.     CYAN,
  45.     RED,
  46.     MAGENTA,
  47.     BROWN,
  48.     LIGHTGRAY,
  49.     /*  light colors    */
  50.     DARKGRAY,
  51.     LIGHTBLUE,
  52.     LIGHTGREEN,
  53.     LIGHTCYAN,
  54.     LIGHTRED,
  55.     LIGHTMAGENTA,
  56.     YELLOW,
  57.     WHITE
  58. };
  59.  
  60. #define BLINK   0x80    /*  blink bit   */
  61.  
  62. char *  cgets(char *_str); 
  63. void    clreol(void);
  64. void    clrscr(void);
  65. int     _conio_kbhit(void); /* checks for ungetch char */
  66. int     cprintf(const char *_format, ...) __attribute__((format(printf,1,2)));
  67. int     cputs(const char *_str);
  68. int     cscanf(const char *_format, ...) __attribute__((format(scanf,1,2)));
  69. void    delline(void);
  70. int     getch(void);
  71. int     getche(void);
  72. int     gettext(int _left, int _top, int _right, int _bottom, void *_destin);
  73. void    gettextinfo(struct text_info *_r);
  74. void    gotoxy(int _x, int _y);
  75. void    gppconio_init(void);
  76. void    highvideo(void);
  77. void    insline(void);
  78. void    lowvideo(void);
  79. int     movetext(int _left, int _top, int _right, int _bottom, int _destleft, int _desttop);
  80. void    normvideo(void);
  81. int     putch(int _c);
  82. int     puttext(int _left, int _top, int _right, int _bottom, void *_source);
  83. void    _setcursortype(int _type);
  84. void    _set_screen_lines(int _nlines);
  85. void    textattr(int _attr);
  86. void    textbackground(int _color);
  87. void    textcolor(int _color);
  88. void    textmode(int _mode);
  89. int     ungetch(int); 
  90. int     wherex(void);
  91. int     wherey(void);
  92. void    window(int _left, int _top, int _right, int _bottom);
  93.  
  94. #define kbhit _conio_kbhit /* Who ever includes gppconio.h probably
  95.                               also wants _conio_kbhit and not kbhit
  96.                               from libc */
  97.  
  98. #endif /* !_POSIX_SOURCE */
  99. #endif /* !__STRICT_ANSI__ */
  100. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  101.  
  102. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  103. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  104.  
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108.  
  109. #endif /* !__dj_include_conio_h_ */
  110.