Skip to content

Instantly share code, notes, and snippets.

@SealtielFreak
Created June 28, 2022 02:36
Show Gist options
  • Save SealtielFreak/8020590127d9cefe5177af5c0eae3f2d to your computer and use it in GitHub Desktop.
Save SealtielFreak/8020590127d9cefe5177af5c0eae3f2d to your computer and use it in GitHub Desktop.
#ifndef CONIO_H
#define CONIO_H
struct text_info {
unsigned char curx, cury;
unsigned short attribute, normattr;
unsigned char screenwidth, screenheight;
};
struct char_info {
char letter;
unsigned short attr;
};
enum COLORS {
BLACK, BLUE, GREEN, CYAN,
RED, MAGENTA, BROWN, LIGHTGRAY,
DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN,
LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE
}
void gettextinfo(struct text_info *info);
void inittextinfo(void);
void clreol(void);
void clrscr(void);
void delline(void);
void insline(void);
void _conio_gettext(int left, int top, int right, int bottom, struct char_info *buf);
void puttext(int left, int top, int right, int bottom, struct char_info *buf);
void movetext(int left, int top, int right, int bottom, int destleft, int desttop);
void gotoxy(int x, int y);
void cputsxy(int x, int y, char *str);
void putchxy(int x, int y, char ch);
void _setcursortype(int type);
void textattr(int _attr);
void normvideo(void);
void textbackground(int color);
void textcolor(int color);
int wherex(void);
int wherey(void);
char *getpass(const char *prompt, char *str);
void highvideo(void);
void lowvideo(void);
void delay(int ms);
void switchbackground(int color);
void flashbackground(int color, int ms);
void clearkeybuf(void);
#endif //CONIO_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment