18#ifndef __TERMINAL_TERMINAL_H
19#define __TERMINAL_TERMINAL_H
21#include <FreeNOS/Config.h>
39 "FreeNOS " RELEASE " [" ARCH "/" SYSTEM "] (" BUILDUSER "@" BUILDHOST ") (" COMPILER_VERSION ") " DATETIME "\r\n"
Abstract device class interface.
Abstract Input/Output buffer.
A Terminal enables user to interact with the system.
void setCursor(const teken_pos_t *pos)
Sets the new position of the cursor.
virtual FileSystem::Result write(IOBuffer &buffer, Size &size, const Size offset)
Write bytes to the Terminal.
teken_t state
Terminal state.
FileSystem::Result writeTerminal(const u8 *bytes, const Size size)
Write bytes to the output device.
void hideCursor()
Hides the cursor from the VGA screen.
teken_pos_t cursorPos
Saved cursor position.
u16 * buffer
Buffer for local Terminal updates.
u16 * getCursorValue()
Saved byte and attribute value at cursor position.
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read bytes from the Terminal.
const char * inputFile
Path to the input and output files.
virtual FileSystem::Result initialize()
Initialize the Terminal.
teken_funcs_t funcs
Terminal function handlers.
int input
Input and output file descriptors.
int getInput()
Retrieve file descriptor of the input source.
const Size width
Width and height of the Terminal.
Size getWidth()
Retrieve the width of the Terminal.
u16 cursorValue
Saved value at cursor position.
Size getHeight()
Retrieve the height of the Terminal.
void showCursor()
Show the VGA cursor.
u16 * getBuffer()
Retrieve a pointer to the local buffer.
virtual ~Terminal()
Class destructor.
int getOutput()
Retrieve file descriptor of the output source.
unsigned int u32
Unsigned 32-bit number.
unsigned short u16
Unsigned 16-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
unsigned char u8
Unsigned 8-bit number.
void respond(Terminal *ctx, const void *buf, size_t size)
Unused.
void param(Terminal *ctx, int key, int value)
Set terminal parameters.
void bell(Terminal *term)
Makes a sound (bell).
void cursor(Terminal *term, const teken_pos_t *pos)
Sets the Terminal cursor.
void copy(Terminal *ctx, const teken_rect_t *rect, const teken_pos_t *pos)
Copy bytes to the terminal.
void putchar(Terminal *term, const teken_pos_t *pos, teken_char_t ch, const teken_attr_t *attr)
Output a new character.
void fill(Terminal *ctx, const teken_rect_t *rect, teken_char_t ch, const teken_attr_t *attr)
Fills the Terminal buffer with a character.
Result
Result code for filesystem Actions.
unsigned char teken_char_t