📄 def_tui.h
字号:
/***************************************************************************
** File name : def_tui.h
** Author :
** Create date :
**
** Comment:
** tui 的 local 头文件
**
** Revisions:
** $Log: def_tui.h,v $
** Revision 1.2 2005/07/27 07:12:10 x.cheng
** structure ts_Console has changed, two more member added.
**
** Revision 1.1.1.1 2005/07/27 06:53:15 x.cheng
** add into repositories
**
**
***************************************************************************/
#ifndef __DEF_TUI_H__
#define __DEF_TUI_H__
#define TOTAL_VIRTUAL_CONSOLE_NB 10 //总共支持的虚拟终端数目
#define VIDEO_BUFFER_SIZE \
(iVgaGetCrtColumns() * iVgaGetCrtRows() * sizeof(unsigned short))
#define KEYB_BUFFER_SIZE 32 // size of the console keyboard buffer
/************************************************
* structure.
* Virtual Consoles
* struct to manage virtual text-based consoles.
************************************************/
typedef struct console {
// --- VIDEO --- //
unsigned short *puiVideoBuffer; // video buffer
unsigned short uiCurrentPos; // current cursor position
unsigned char ucCurrentColor; // current text color.
// --- KEYBOARD --- //
unsigned char ucLedState; // 0 bit - scroll lock
// 1 bit - num lock
// 2 bit - caps lock
unsigned short uiKeybBufferRead, // The first character to read from the buffer.
uiKeybBufferWrite, // The last character insered into the buffer.
uiKeybBufferCount; // How many characters are present into the buffer.
unsigned short auiKeybBuffer[KEYB_BUFFER_SIZE];
} ts_Console;
/*******************************************
* function prototype
*******************************************/
void vTu1InitBootConsole();
void vTu1InitMainConsole();
void vTu1CreateVirtualConsole();
ts_Console *pstTu2GetConsoleAddress(int iIndex);
int iTu2SetCurrentConsole(int iIndex);
int iTu2GetCurrentConsole();
int iTu2SwitchToConsole(int iIndex);
int iTu3PutChar( const char ch );
/*
int iTuiPrintf(const char *szFormat, ...);
int kprintf(const char *fmt, ...);
*/
void vTu3GotoXy(int iX, int iY);
void vTu3ScrollUp();
void vTu3SetColor(unsigned char ucColor);
void vTu3ClearScr();
#endif /* end of __DEF_TUI_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -