XenevaOS
Loading...
Searching...
No Matches
Functions | Variables
term.cpp File Reference
#include <_xeneva.h>
#include <sys\_keproc.h>
#include <sys\_kefile.h>
#include <sys\iocodes.h>
#include <ctype.h>
#include <chitralekha.h>
#include <widgets\window.h>
#include <keycode.h>
#include "term.h"
#include "arrayfont.h"
#include <sys\mman.h>
#include "esccode.h"
#include <sys\_ketty.h>
Include dependency graph for term.cpp:

Functions

void TerminalDrawArrayFont (ChCanvas *canv, unsigned x, unsigned y, unsigned char c, uint32_t color)
 
void TerminalSetCellData (int x, int y, uint8_t c, uint32_t bg, uint32_t fg)
 
void TerminalDrawCell (int x, int y, bool dirty)
 
void TerminalDrawAllCells ()
 
void TerminalDrawCursor ()
 
void TerminalScroll ()
 
void TerminalClearScreen ()
 
void TerminalPrintChar (char c, uint32_t fgcolor, uint32_t bgcolor)
 
void TerminalPrintString (char *string, uint32_t fgcolor, uint32_t bgcolor)
 
void ProcessControlSequence (char ch)
 
void TerminalProcessLine (char ch)
 
void TerminalHandleMessage (PostEvent *e)
 
void TerminalThread ()
 
int main (int argc, char *arv[])
 

Variables

ChWindowwin
 
ChitralekhaAppapp
 
ChFontconsolas
 
int master_fd
 
int slave_fd
 
int x
 
int ws_col
 
int ws_row
 
int cell_width
 
int cell_height
 
TermCellterm_buffer
 
uint8_tpsffont
 
int cursor_x
 
int cursor_y
 
int last_cursor_y
 
int last_cursor_x
 
bool dirty = false
 
bool _escape_seq = false
 
bool _seq_csi = false
 
bool _cursor_blink = 0
 
bool _update_terminal_ = false
 
bool _first_time = false
 
char * escBuf
 
int shell_id
 
uint32_t backColor
 
uint32_t fgColor
 

Function Documentation

◆ main()

int main ( int  argc,
char *  arv[] 
)

◆ ProcessControlSequence()

void ProcessControlSequence ( char  ch)

◆ TerminalClearScreen()

void TerminalClearScreen ( )

◆ TerminalDrawAllCells()

void TerminalDrawAllCells ( )

◆ TerminalDrawArrayFont()

void TerminalDrawArrayFont ( ChCanvas canv,
unsigned  x,
unsigned  y,
unsigned char  c,
uint32_t  color 
)

◆ TerminalDrawCell()

void TerminalDrawCell ( int  x,
int  y,
bool  dirty 
)

◆ TerminalDrawCursor()

void TerminalDrawCursor ( )

◆ TerminalHandleMessage()

void TerminalHandleMessage ( PostEvent e)

◆ TerminalPrintChar()

void TerminalPrintChar ( char  c,
uint32_t  fgcolor,
uint32_t  bgcolor 
)

◆ TerminalPrintString()

void TerminalPrintString ( char *  string,
uint32_t  fgcolor,
uint32_t  bgcolor 
)

◆ TerminalProcessLine()

void TerminalProcessLine ( char  ch)

◆ TerminalScroll()

void TerminalScroll ( )

◆ TerminalSetCellData()

void TerminalSetCellData ( int  x,
int  y,
uint8_t  c,
uint32_t  bg,
uint32_t  fg 
)

◆ TerminalThread()

void TerminalThread ( )

Variable Documentation

◆ _cursor_blink

bool _cursor_blink = 0

◆ _escape_seq

bool _escape_seq = false

◆ _first_time

bool _first_time = false

◆ _seq_csi

bool _seq_csi = false

◆ _update_terminal_

bool _update_terminal_ = false

◆ app

◆ backColor

uint32_t backColor

◆ cell_height

int cell_height

◆ cell_width

int cell_width

◆ consolas

ChFont* consolas

◆ cursor_x

int cursor_x

◆ cursor_y

int cursor_y

◆ dirty

bool dirty = false

◆ escBuf

char* escBuf

◆ fgColor

uint32_t fgColor

◆ last_cursor_x

int last_cursor_x

◆ last_cursor_y

int last_cursor_y

◆ master_fd

int master_fd

◆ psffont

uint8_t* psffont

◆ shell_id

int shell_id

◆ slave_fd

int slave_fd

◆ term_buffer

TermCell* term_buffer

◆ win

ChWindow* win

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ ws_col

int ws_col

◆ ws_row

int ws_row

◆ x

int x