home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / TemaCD / devc / _SETUP.5 / Group3 / conio.h < prev    next >
C/C++ Source or Header  |  2000-07-20  |  3KB  |  90 lines

  1. #ifndef _CONIO_H_
  2. #define _CONIO_H_
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. struct text_info {
  9.     unsigned char winleft;
  10.     unsigned char wintop;
  11.     unsigned char winright;
  12.     unsigned char winbottom;
  13.     unsigned char attribute;
  14.     unsigned char normattr;
  15.     unsigned char currmode;
  16.     unsigned char screenheight;
  17.     unsigned char screenwidth;
  18.     unsigned char curx;
  19.     unsigned char cury;
  20. };
  21.  
  22. enum COLORS {
  23.     /*  dark colors     */
  24.     BLACK,          
  25.     BLUE,
  26.     GREEN,
  27.     CYAN,
  28.     RED,
  29.     MAGENTA,
  30.     BROWN,
  31.     LIGHTGRAY,
  32.     /*  light colors    */
  33.     DARKGRAY, /* "light black" */
  34.     LIGHTBLUE,
  35.     LIGHTGREEN,
  36.     LIGHTCYAN,
  37.     LIGHTRED,
  38.     LIGHTMAGENTA,
  39.     YELLOW,
  40.     WHITE
  41. };
  42. #define BLINK   0x80    /*  blink bit; doesn't work yet  */
  43.  
  44. #define _NOCURSOR      0
  45. #define _SOLIDCURSOR   1
  46. #define _NORMALCURSOR  2
  47.  
  48. /* 19 of 31 functions implemented, 62% */
  49.  
  50. int _conio_kbhit();
  51. void _set_screen_lines(int nlines);
  52. void _setcursortype(int _type);                                                 /* done */
  53. void blinkvideo();
  54. char *cgets(char *_str);                                 /* how does it work? */
  55. void clreol();                                           /* what does it do? */
  56. void clrscr();                                                                  /* done */
  57. #define cprintf printf                                                          /* done */
  58. int cputs(const char *_str);                                                    /* done */
  59. #define cscanf scanf                                                            /* done */
  60. void delline();
  61. #define getch getchar                                                           /* done */
  62. int getche();                                                                   /* done */
  63. int gettext(int _left, int _top, int _right, int _bottom, void *_destin);
  64. void gettextinfo(struct text_info *_r);                                         /* done */
  65. void gotoxy(int x, int y);                                                      /* done */
  66. void gppconio_init();                                                           /* done; does nothing */
  67. void highvideo();                                                               /* maybe */
  68. void insline();                                                                 /* done */
  69. void intensevideo();
  70. void lowvideo();
  71. int movetext(int _left, int _top, int _right, int _bottom,
  72.              int _destleft, int _desttop);
  73. void normvideo();
  74. int putch(int _c);                                                              /* done */
  75. int puttext(int _left, int _top, int _right, int _bottom, void *_source);
  76. void textattr(int _attr);                                                       /* done */
  77. void textbackground(int _color);                                                /* done */
  78. void textcolor(int _color);                                                     /* done */
  79. void textmode(int _mode);
  80. int ungetch(int);
  81. int wherex();                                                                   /* done */
  82. int wherey();                                                                   /* done */
  83. void window(int _left, int _top, int _right, int _bottom);                      /* done */
  84.  
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88.  
  89. #endif _CONIO_H_
  90.