Go to the documentation of this file.
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"
void copy(Terminal *ctx, const teken_rect_t *rect, const teken_pos_t *pos)
Copy bytes to the terminal.
FileSystem::Result writeTerminal(const u8 *bytes, const Size size)
Write bytes to the output device.
teken_pos_t cursorPos
Saved cursor position.
const char * inputFile
Path to the input and output files.
int getInput()
Retrieve file descriptor of the input source.
void setCursor(const teken_pos_t *pos)
Sets the new position of the cursor.
u16 * buffer
Buffer for local Terminal updates.
u16 * getCursorValue()
Saved byte and attribute value at cursor position.
virtual ~Terminal()
Class destructor.
Abstract device class interface.
teken_t state
Terminal state.
void param(Terminal *ctx, int key, int value)
Set terminal parameters.
void showCursor()
Show the VGA cursor.
u16 cursorValue
Saved value at cursor position.
virtual FileSystem::Result initialize()
Initialize the Terminal.
teken_funcs_t funcs
Terminal function handlers.
Size getWidth()
Retrieve the width of the Terminal.
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read bytes from the Terminal.
unsigned short u16
Unsigned 16-bit number.
Abstract Input/Output buffer.
void cursor(Terminal *term, const teken_pos_t *pos)
Sets the Terminal cursor.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
void bell(Terminal *term)
Makes a sound (bell).
unsigned char teken_char_t
Terminal(const u32 inode, const char *inputFile, const char *outputFile, const Size width=80, const Size height=25)
Class constructor.
Result
Result code for filesystem Actions.
unsigned char u8
Unsigned 8-bit number.
void hideCursor()
Hides the cursor from the VGA screen.
u16 * getBuffer()
Retrieve a pointer to the local buffer.
Size getHeight()
Retrieve the height of the Terminal.
const Size width
Width and height of the Terminal.
int getOutput()
Retrieve file descriptor of the output source.
void respond(Terminal *ctx, const void *buf, size_t size)
Unused.
int input
Input and output file descriptors.
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.
void putchar(Terminal *term, const teken_pos_t *pos, teken_char_t ch, const teken_attr_t *attr)
Output a new character.
A Terminal enables user to interact with the system.
virtual FileSystem::Result write(IOBuffer &buffer, Size &size, const Size offset)
Write bytes to the Terminal.