⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hardware.h

📁 一个类似与Windows环境下的softice的源代码
💻 H
字号:
/****************************************************************************** * * Copyright (c) 2003 Gerhard W. Gruber * * PROJECT: pICE * $Source: /cvsroot/pice/pice/module/hardware.h,v $ * $Revision: 1.5 $ * $Date: 2004/02/17 23:07:36 $ * $Author: lightweave $ * $Name:  $ * * $Log: hardware.h,v $ * Revision 1.5  2004/02/17 23:07:36  lightweave * * Improved the DEBUG facillity and replaced the configuration handler with a * new code which now can read MS Windows INI style files. See CHANGES.txt for * more details. * Also added a macro which prevents compiling for kernels before 2.4.19. * * Revision 1.4  2003/06/18 22:00:22  lightweave * DEBUG and DEBUG_SERIAL added * * *****************************************************************************//*++Copyright (c) 1998-2001 Klaus P. GerlicherModule Name:    hardware.hAbstract:    HEADER for hardware.cEnvironment:    LINUX 2.2.X    Kernel mode onlyAuthor:     Klaus P. GerlicherRevision History:    15-Nov-2000:    general cleanup of source filesCopyright notice:  This file may be distributed under the terms of the GNU Public License.--*/#ifndef _HARDWARE_H#define _HARDWARE_H#define FRAMEBUFFER_SIZE (0x8000)#define LINES_IN_BUFFER (2048)typedef struct tagWindow{	USHORT y, cy;	USHORT usCurX, usCurY;	BOOLEAN bScrollDisabled;} WINDOW, *PWINDOW;// pointer indirection table for output functionstypedef struct _OUTPUT_HANDLERS{    void    (*CopyLineTo)               (USHORT dest, USHORT src);    void    (*PrintGraf)                (ULONG x, ULONG y, UCHAR c);    void    (*Flush)                    (void);    void    (*ClrLine)                  (ULONG line);    void    (*ClrLines)                 (ULONG line, ULONG count);    void    (*InvertLine)               (ULONG line);    void    (*HatchLine)                (ULONG line);    void    (*PrintLogo)                (BOOLEAN bShow);    void    (*PrintCursor)              (BOOLEAN bForce);    void    (*SaveGraphicsState)        (void);    void    (*RestoreGraphicsState)     (void);    void    (*ShowCursor)               (void);    void    (*HideCursor)               (void);    void    (*SetForegroundColor)       (ECOLORS);    void    (*SetBackgroundColor)       (ECOLORS);} OUTPUT_HANDLERS, *POUTPUT_HANDLERS;// pointer indirection table for input functionstypedef struct _INPUT_HANDLERS{    UCHAR   (*GetKeyPolled)             (void);    void    (*FlushKeyboardQueue)       (void);} INPUT_HANDLERS, *PINPUT_HANDLERS;extern OUTPUT_HANDLERS ohandlers;extern INPUT_HANDLERS ihandlers;enum{    REGISTER_WINDOW = 0,    DATA_WINDOW,    SOURCE_WINDOW,    OUTPUT_WINDOW,    OUTPUT_WINDOW_UNBUFFERED};typedef enum _ETERMINALMODE{    TERMINAL_MODE_HERCULES_GRAPHICS = 0,    TERMINAL_MODE_HERCULES_TEXT,    TERMINAL_MODE_VGA_TEXT,    TERMINAL_MODE_SERIAL,    TERMINAL_MODE_NONE}ETERMINALMODE;extern ETERMINALMODE eTerminalMode;extern WINDOW wWindow[];extern BOOLEAN bRev;extern BOOLEAN bGrayed;extern BOOLEAN bCursorEnabled;// install and remove handlerBOOLEAN ConsoleInit(void); void ConsoleShutdown(void);// OUTPUT handlervoid Print(USHORT Window, LPSTR p);void SetBackgroundColor(ECOLORS c);void SetForegroundColor(ECOLORS c);void Clear(USHORT window);void PutChar(LPSTR p, ULONG x, ULONG y);void ClrLine(ULONG line);void ClrLines(ULONG line, ULONG count);void ShowCursor(void);void HideCursor(void);void EnableScroll(USHORT Window);void DisableScroll(USHORT Window);void CopyLineTo(USHORT dest, USHORT src);void PrintLogo(BOOLEAN bShow);void PrintCursor(BOOLEAN bForce);void PrintGraf(ULONG x, ULONG y, UCHAR c);void ScrollUp(USHORT Window);void Home(USHORT Window);void InvertLine(ULONG line);void FillLine(ULONG line, UCHAR c);void PrintTemplate(void);void PrintCaption(void);void ClrLineToEnd(USHORT Window, ULONG line, ULONG x);void SuspendPrintRingBuffer(BOOLEAN bSuspend);void HatchLine(ULONG line);void SaveGraphicsState(void);void RestoreGraphicsState(void);void SetWindowGeometry(PVOID pWindow);// INPUT handlerUCHAR GetKeyPolled(void);void FlushKeyboardQueue(void);// ring buffer BOOLEAN PrintRingBufferOffset(ULONG ulLines, ULONG ulOffset);BOOLEAN PrintRingBufferHome(ULONG ulLines);void PrintRingBuffer(ULONG ulLines);ULONG LinesInRingBuffer(void);void ReplaceRingBufferCurrent(LPSTR s);void EmptyRingBuffer(void);void CheckRingBuffer(void);BOOLEAN AddToRingBuffer(LPSTR p);void ResetColor(void);extern ULONG GLOBAL_SCREEN_WIDTH;extern ULONG GLOBAL_SCREEN_HEIGHT;#define NOT_IMPLEMENTED()extern USHORT usCaptionColor;#define COLOR_CAPTION usCaptionColorextern USHORT usCaptionText;#define COLOR_TEXT usCaptionTextextern USHORT usForegroundColor;#define COLOR_FOREGROUND usForegroundColorextern USHORT usBackgroundColor;#define COLOR_BACKGROUND usBackgroundColorextern USHORT usHiLiteColor;#define COLOR_HILITE usHiLiteColor#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -