|
XenevaOS
|
#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 <signal.h>#include <sys/time.h>#include <unistd.h>#include <time.h>
Macros | |
| #define | TERMINAL_BLACK 0xFF373434 |
| #define | TERMINAL_KEY_RIGHT 0x2E |
| #define | TERMINAL_KEY_LEFT 0x33 |
Variables | |
| ChWindow * | win |
| ChitralekhaApp * | app |
| ChFont * | consolas |
| int | master_fd |
| int | slave_fd |
| Terminal | term |
| bool | dirty = false |
| bool | _escape_seq = false |
| bool | _seq_csi = false |
| bool | _seq_osc = false |
| bool | _cursor_blink = 0 |
| bool | _update_terminal_ = false |
| bool | _first_time = false |
| uint32_t | backColor |
| uint32_t | fgColor |
| char * | escBuf |
| char | oscBuf [64] |
| int | oscLen |
| int | shell_id |
| #define TERMINAL_BLACK 0xFF373434 |
| #define TERMINAL_KEY_LEFT 0x33 |
| #define TERMINAL_KEY_RIGHT 0x2E |
| int main | ( | int | argc, |
| char * | arv[] | ||
| ) |
setup periodic timer for cursor
| void ProcessControlSequence | ( | Terminal * | term_, |
| char | ch | ||
| ) |
| void ProcessOSCSequence | ( | Terminal * | t, |
| const char * | payload | ||
| ) |
| void TerminalClearLine | ( | Terminal * | t | ) |
| void TerminalClearLineFromCursor | ( | Terminal * | t | ) |
| void TerminalClearLineToCursor | ( | Terminal * | t | ) |
| void TerminalClearScreen | ( | Terminal * | t | ) |
| void TerminalDrawAllCells | ( | ) |
| void TerminalDrawArrayFont | ( | ChCanvas * | canv, |
| unsigned | x, | ||
| unsigned | y, | ||
| unsigned char | c, | ||
| uint32_t | color | ||
| ) |
| void TerminalDrawCell | ( | Terminal * | t, |
| int | col, | ||
| int | row | ||
| ) |
| void TerminalDrawCursor | ( | ) |
| void TerminalFlush | ( | Terminal * | t | ) |
| void TerminalHandleMessage | ( | PostEvent * | e | ) |
check from extended key code map
chec from extended key code map
handle CTRL + combined keys
| void TerminalHandleMouseClick | ( | Terminal * | t, |
| int | mouseX, | ||
| int | mouseY, | ||
| int | button | ||
| ) |
skip the titlebar
| void TerminalHistoryDown | ( | Terminal * | t | ) |
| void TerminalHistoryPush | ( | Terminal * | t, |
| const char * | cmd | ||
| ) |
| void TerminalHistoryUp | ( | Terminal * | t | ) |
| void TerminalProcessLine | ( | Terminal * | t, |
| char | ch | ||
| ) |
| void TerminalReplaceInput | ( | Terminal * | t, |
| const char * | newText | ||
| ) |
drain the last character passed to slave buffer
| void TerminalScroll | ( | Terminal * | t, |
| int | lines | ||
| ) |
| void TerminalThread | ( | ) |
| bool _cursor_blink = 0 |
| ChitralekhaApp* app |
| uint32_t backColor |
| ChFont* consolas |
| char* escBuf |
| uint32_t fgColor |
| int master_fd |
| char oscBuf[64] |
| int oscLen |
| int shell_id |
| int slave_fd |
| Terminal term |
| 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:
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.