-
Notifications
You must be signed in to change notification settings - Fork 0
/
conio.h
161 lines (126 loc) · 2.81 KB
/
conio.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/* A conio implementation for Mingw/Dev-C++.
*
* Written by:
* Hongli Lai <[email protected]>
* tkorrovi <[email protected]> on 2002/02/26.
* Andrew Westcott <[email protected]>
*
* Offered for use in the public domain without any warranty.
*/
#ifndef _CONIO_H_
#define _CONIO_H_
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#define BLINK 0
typedef enum
{
BLACK,
BLUE,
GREEN,
CYAN,
RED,
MAGENTA,
BROWN,
LIGHTGRAY,
DARKGRAY,
LIGHTBLUE,
LIGHTGREEN,
LIGHTCYAN,
LIGHTRED,
LIGHTMAGENTA,
YELLOW,
WHITE
} COLORS;
#define cgets _cgets
#define cprintf _cprintf
#define cputs _cputs
#define cscanf _cscanf
#define ScreenClear clrscr
/* blinkvideo */
void clreol (void);
void clrscr (void);
int _conio_gettext (int left, int top, int right, int bottom,
char *str);
/* _conio_kbhit */
void delline (void);
/* gettextinfo */
void gotoxy(int x, int y);
/*
highvideo
insline
intensevideo
lowvideo
movetext
normvideo
*/
void gotoxy(int x, int y);
void puttext (int left, int top, int right, int bottom, char *str);
// Screen Variables
/* ScreenCols
ScreenGetChar
ScreenGetCursor
ScreenMode
ScreenPutChar
ScreenPutString
ScreenRetrieve
ScreenRows
ScreenSetCursor
ScreenUpdate
ScreenUpdateLine
ScreenVisualBell
_set_screen_lines */
void _setcursortype (int type);
void textattr (int _attr);
void textbackground (int color);
void textcolor (int color);
/* textmode */
int wherex (void);
int wherey (void);
/* window */
/* The code below was part of Mingw's conio.h */
/*
* conio.h
*
* Low level console I/O functions. Pretty please try to use the ANSI
* standard ones if you are writing new code.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Colin Peters <[email protected]>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author: hongli $
* $Date: 2002/04/26 19:31:25 $
*
*/
char* _cgets (char*);
int _cprintf (const char*, ...);
int _cputs (const char*);
int _cscanf (char*, ...);
int _getch (void);
int _getche (void);
int _kbhit (void);
int _putch (int);
int _ungetch (int);
int getch (void);
int getche (void);
int kbhit (void);
int putch (int);
int ungetch (int);
#ifdef __cplusplus
}
#endif
#endif /* _CONIO_H_ */