quest/display.h

46 lines
1.0 KiB
C
Raw Normal View History

2021-09-17 05:21:45 +10:00
#ifndef DISPLAY_H
#define DISPLAY_H
2021-08-28 01:43:33 +10:00
#include <stdio.h>
#include <string.h>
2021-09-05 02:50:19 +10:00
#include <termios.h>
2021-09-17 05:21:45 +10:00
#include <limits.h>
2021-09-05 02:50:19 +10:00
extern const char *millitime;
extern const char *secondstime;
extern const char *minutestime;
extern const char *hourstime;
extern const char *fulltime;
extern const char *sfulltime;
2021-09-17 05:21:45 +10:00
extern int maxrows;
extern int maxcols;
extern int colwidth;
2021-08-28 01:43:33 +10:00
struct color {
int r;
int g;
int b;
};
void setBGColor(struct color);
void setFGColor(struct color);
void clrScreen();
void disableCursor();
void enableCursor();
void altBuffer();
void stdBuffer();
void initScreen(struct color, struct color);
void resetScreen();
void cntrPrint(int row, int col, int maxlen, char *text);
void leftPrint(int row, int maxlen, char *text);
void rghtPrint(int row, int maxlem, char *text);
2021-09-05 02:50:19 +10:00
void drawHLine(int row, int maxlen);
2021-09-17 05:21:45 +10:00
void drawColumn(char **data, int count, int column);
void drawRow(char **data, int count, int row);
void drawCell(char *data, int column, int row);
void setMaxRows(int rows);
void setMaxCols(int cols);
#endif
2021-09-05 02:50:19 +10:00