Advertisement
Guest User

conio2.h

a guest
Oct 17th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.62 KB | None | 0 0
  1. #ifndef _CONIO2_H
  2. #define _CONIO2_H
  3.  
  4. #define BLACK       0
  5. #define BLUE        1
  6. #define GREEN       2
  7. #define CYAN        3
  8. #define RED         4
  9. #define MAGENTA     5
  10. #define BROWN       6
  11. #define LIGHTGRAY   7
  12. #define DARKGRAY    8
  13. #define LIGHTBLUE   9
  14. #define LIGHTGREEN  10
  15. #define LIGHTCYAN   11
  16. #define LIGHTRED    12
  17. #define LIGHTMAGENTA    13
  18. #define YELLOW      14
  19. #define WHITE       15
  20.  
  21. #define _NOCURSOR   0
  22. #define _SOLIDCURSOR    1
  23. #define _NORMALCURSOR   2
  24.  
  25. #ifndef EOF
  26. #define EOF     -1
  27. #endif
  28.  
  29. #define LASTMODE    -1
  30. #define C80     3
  31. #define C4350       8
  32. #define FULLSCREEN  0x8000
  33.  
  34. extern int _wscroll;        // 1 = enable scroll
  35.                 // 0 = disable scroll
  36.  
  37. struct text_info {
  38.     unsigned char curx;
  39.     unsigned char cury;
  40.     unsigned short attribute;
  41.     unsigned short normattr;
  42.     unsigned char screenwidth;
  43.     unsigned char screenheight;
  44.     };
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49. void gotoxy(int x, int y);
  50. int wherex(void);
  51. int wherey(void);
  52. void _setcursortype(int cur_t);
  53.  
  54. void textattr(int newattr);
  55. void textbackground(int newcolor);
  56. void textcolor(int newcolor);
  57.  
  58. void clreol(void);
  59. void clrscr(void);
  60. void delline(void);
  61. void insline(void);
  62.  
  63. int getch(void);
  64. int getche(void);
  65. int kbhit(void);
  66. int ungetch(int ch);
  67.  
  68. int cputs(const char *str);
  69. int putch(int c);
  70.  
  71. int gettext(int left, int top, int right, int bottom, void *dest);
  72. int movetext(int left, int top, int right, int bottom, int destleft, int desttop);
  73. int puttext(int left, int top, int right, int bottom, void *source);
  74.  
  75. void gettextinfo(struct text_info *info);
  76.  
  77. void textmode(int mode);
  78.  
  79. // bonus functions
  80. void settitle(const char *title);
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84.  
  85. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement