Skip to content
Permalink
7c65d5344b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
58 lines (45 sloc) 1 KB
#ifndef TERMINAL_H
#define TERMINAL_H
#include <iostream>
namespace Terminal
{
enum Color
{
FG_BLACK = 30,
FG_RED = 31,
FG_GREEN = 32,
FG_YELLOW = 33,
FG_BLUE = 34,
FG_MAGENTA = 35,
FG_CYAN = 36,
FG_WHITE = 37,
FG_DEFAULT = 39,
BG_BLACK = 40,
BG_RED = 41,
BG_GREEN = 42,
BG_YELLOW = 43,
BG_BLUE = 44,
BG_MAGENTA = 45,
BG_CYAN = 46,
BG_WHITE = 47,
BG_DEFAULT = 49
};
std::ostream& operator<<( std::ostream& os, const Color& c );
class Position
{
private:
int x, y;
public:
Position( int _x, int _y );
friend std::ostream& operator<<( std::ostream& os, const Position& p );
};
std::ostream& operator<<( std::ostream& os, const Position& p );
const std::string Default = "\033[39m\033[49m";
const std::string Clear = "\033[2J\033[1;1H";
const std::string CursorOff = "\e[?25l";
const std::string CursorOn = "\e[?25h";
void cursor( bool onoff );
void defaults();
void clear();
}
#endif