#ifndef CONSOLEBUFFER_H_
#define CONSOLEBUFFER_H_
#endif
#include <idl4glue.h>
#include "libc/stdint.h"
#include <config.h>
#include <if/types.h>
#include <stdio.h>
#include <stdlib.h>
class ConsoleBuffer {
char* buffer;
unsigned int bufferSize;
unsigned int screenStart;
unsigned int cursorPosition;
unsigned int savedCursorPos;
uint8_t colorCode;
uint8_t cursorColor;
char* videoMemStart;
int* hasFocus;
public:
ConsoleBuffer(unsigned int size, char* videoMemStart, int* focus);
~ConsoleBuffer();
void CursorUp(int n);
void CursorDown(int n);
void CursorRight(int n);
void CursorLeft(int n);
void SetCursor(int z, int s);
void SetCursor(int pos);
void SaveCursor();
void LoadCursor();
void ClearScreen();
void ClearLine(uint8_t n);
void DeleteLast();
void Delete();
void NewLine();
void appendChar(char c);
void appendString(buffer_t *string);
void ScreenUp(int n);
void ScreenDown(int n);
void SetColor(uint8_t c);
void update();
void PageUp();
void PageDown();
void SetGraphic(int n);
};