-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconio2.h
93 lines (75 loc) · 1.79 KB
/
conio2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* kod szablonu z przedmiotu Podstawy Programowania
* do wykorzystania jedynie w ramach tego przedmiotu
* autor: K.M. Ocetkiewicz
*/
#ifndef CONIO2_H
#define CONIO2_H
#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define LIGHTGRAY 7
#define DARKGRAY 8
#define LIGHTBLUE 9
#define LIGHTGREEN 10
#define LIGHTCYAN 11
#define LIGHTRED 12
#define LIGHTMAGENTA 13
#define YELLOW 14
#define WHITE 15
#define _NOCURSOR 0
#define _SOLIDCURSOR 1
#define _NORMALCURSOR 2
#ifndef EOF
#define EOF -1
#endif
#define LASTMODE -1
#define C80 3
#define C4350 8
#define FULLSCREEN 0x8000
extern int _wscroll; // 1 = enable scroll
// 0 = disable scroll
struct text_info {
unsigned char curx;
unsigned char cury;
unsigned short attribute;
unsigned short normattr;
unsigned char screenwidth;
unsigned char screenheight;
};
#ifdef __cplusplus
extern "C" {
#endif
void gotoxy(int x, int y);
int wherex(void);
int wherey(void);
void _setcursortype(int cur_t);
void textattr(int newattr);
void textbackground(int newcolor);
void textcolor(int newcolor);
void clreol(void);
void clrscr(void);
void delline(void);
void insline(void);
int getch(void);
int getche(void);
int kbhit(void);
int ungetch(int ch);
int cputs(const char *str);
int putch(int c);
int gettext(int left, int top, int right, int bottom, void *dest);
int movetext(int left, int top, int right, int bottom, int destleft, int desttop);
int puttext(int left, int top, int right, int bottom, void *source);
void gettextinfo(struct text_info *info);
void textmode(int mode);
// bonus functions
void settitle(const char *title);
int Conio2_Init(void);
#ifdef __cplusplus
}
#endif
#endif