-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtermfuncs.h
44 lines (36 loc) · 1015 Bytes
/
termfuncs.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
#ifndef TERMFUNCS_H
#define TERMFUNCS_H
//
// termfuncs2.h -- some simple functions for using the terminal nicely
//
// char getachar() -- returns next char with no echo and no Enter needed
// char getacharnow(n) -- like getachar but times out at n/10 sec
// -- if timeout, return '\0'
// void screen_clear() -- clears the screen
// void screen_home() -- moves cursor to top of screen
//
//
#include<string>
char getachar();
char getacharnow(int);
void screen_clear();
void screen_home();
//
// colors can be "black", "red", "green", "yellow", "blue"
// "magneta", "cyan", "white"
//
// attributes can be "reset", "bright", "dim", "underscore",
// "blink", "reverse", "hidden"
//
void screen_fg(std::string);
void screen_bg(std::string);
void screen_attr(std::string);
void screen_bright();
void screen_reset();
void place_cursor(int, int);
void place_char(char, int, int);
void hide_cursor();
void show_cursor();
int random_int(int, int);
void seed_random(int);
#endif