home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / cwin / c.exe / $INSTDIR / include / conio.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-12-15  |  2.8 KB  |  162 lines

  1. /* A conio implementation for Mingw/Dev-C++.
  2.  *
  3.  * Written by:
  4.  * Hongli Lai <hongli@telekabel.nl>
  5.  * tkorrovi <tkorrovi@altavista.net> on 2002/02/26. 
  6.  * Andrew Westcott <ajwestco@users.sourceforge.net>
  7.  *
  8.  * Offered for use in the public domain without any warranty.
  9.  */
  10.  
  11. #ifndef _CONIO_H_
  12. #define _CONIO_H_
  13.  
  14.  
  15. #include <stdio.h>
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. #define BLINK 0
  22.  
  23. typedef enum
  24. {
  25.     BLACK,
  26.     BLUE,
  27.     GREEN,
  28.     CYAN,
  29.     RED,
  30.     MAGENTA,
  31.     BROWN,
  32.     LIGHTGRAY,
  33.     DARKGRAY,
  34.     LIGHTBLUE,
  35.     LIGHTGREEN,
  36.     LIGHTCYAN,
  37.     LIGHTRED,
  38.     LIGHTMAGENTA,
  39.     YELLOW,
  40.     WHITE
  41. } COLORS;
  42.  
  43.  
  44. #define cgets    _cgets
  45. #define cprintf    _cprintf
  46. #define cputs    _cputs
  47. #define cscanf    _cscanf
  48. #define ScreenClear clrscr
  49.  
  50. /* blinkvideo */
  51.  
  52. void clreol (void);
  53. void clrscr (void);
  54.  
  55. int _conio_gettext (int left, int top, int right, int bottom,
  56.                     char *str);
  57. /* _conio_kbhit */
  58.  
  59. void delline (void);
  60.  
  61. /* gettextinfo */
  62. void gotoxy(int x, int y);
  63. /*
  64. highvideo
  65. insline
  66. intensevideo
  67. lowvideo
  68. movetext
  69. normvideo
  70. */
  71.  
  72. void gotoxy(int x, int y);
  73.  
  74. void puttext (int left, int top, int right, int bottom, char *str);
  75.  
  76. // Screen Variables
  77.  
  78. /* ScreenCols
  79. ScreenGetChar
  80. ScreenGetCursor
  81. ScreenMode
  82. ScreenPutChar
  83. ScreenPutString
  84. ScreenRetrieve
  85. ScreenRows
  86. ScreenSetCursor
  87. ScreenUpdate
  88. ScreenUpdateLine
  89. ScreenVisualBell
  90. _set_screen_lines */
  91.  
  92. void _setcursortype (int type);
  93.  
  94. void textattr (int _attr);
  95.  
  96. void textbackground (int color);
  97.  
  98. void textcolor (int color);
  99.  
  100. /* textmode */
  101.  
  102. int wherex (void);
  103.  
  104. int wherey (void);
  105.  
  106. /* window */
  107.  
  108.  
  109.  
  110. /*  The code below was part of Mingw's conio.h  */
  111. /*
  112.  * conio.h
  113.  *
  114.  * Low level console I/O functions. Pretty please try to use the ANSI
  115.  * standard ones if you are writing new code.
  116.  *
  117.  * This file is part of the Mingw32 package.
  118.  *
  119.  * Contributors:
  120.  *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
  121.  *
  122.  *  THIS SOFTWARE IS NOT COPYRIGHTED
  123.  *
  124.  *  This source code is offered for use in the public domain. You may
  125.  *  use, modify or distribute it freely.
  126.  *
  127.  *  This code is distributed in the hope that it will be useful but
  128.  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  129.  *  DISCLAMED. This includes but is not limited to warranties of
  130.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  131.  *
  132.  * $Revision: 1.4 $
  133.  * $Author: hongli $
  134.  * $Date: 2002/04/26 19:31:25 $
  135.  *
  136.  */
  137.  
  138. char*    _cgets (char*);
  139. int    _cprintf (const char*, ...);
  140. int    _cputs (const char*);
  141. int    _cscanf (char*, ...);
  142.  
  143. int    _getch (void);
  144. int    _getche (void);
  145. int    _kbhit (void);
  146. int    _putch (int);
  147. int    _ungetch (int);
  148.  
  149.  
  150. int    getch (void);
  151. int    getche (void);
  152. int    kbhit (void);
  153. int    putch (int);
  154. int    ungetch (int);
  155.  
  156.  
  157. #ifdef __cplusplus
  158. }
  159. #endif
  160.  
  161. #endif /* _CONIO_H_ */
  162.