cleaned up a bit

This commit is contained in:
2021-09-17 09:25:36 +10:00
parent 88524eea4c
commit ad7b81f448
11 changed files with 155 additions and 146 deletions

45
src/display.h Normal file
View File

@ -0,0 +1,45 @@
#ifndef DISPLAY_H
#define DISPLAY_H
#include <stdio.h>
#include <string.h>
#include <termios.h>
#include <limits.h>
extern const char *millitime;
extern const char *secondstime;
extern const char *minutestime;
extern const char *hourstime;
extern const char *fulltime;
extern const char *sfulltime;
extern int maxrows;
extern int maxcols;
extern int colwidth;
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);
void drawHLine(int row, int maxlen);
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