"Fossies" - the Fresh Open Source Software Archive

Member "src/Boot/Windows/BootConsoleIo.h" (10 Oct 2018, 2089 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "BootConsoleIo.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  Derived from source code of TrueCrypt 7.1a, which is
    3  Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
    4  by the TrueCrypt License 3.0.
    5 
    6  Modifications and additions to the original source code (contained in this file)
    7  and all other portions of this file are Copyright (c) 2013-2017 IDRIX
    8  and are governed by the Apache License 2.0 the full text of which is
    9  contained in the file License.txt included in VeraCrypt binary and source
   10  code distribution packages.
   11 */
   12 
   13 #ifndef TC_HEADER_Boot_BootConsoleIo
   14 #define TC_HEADER_Boot_BootConsoleIo
   15 
   16 #include "Platform.h"
   17 
   18 #define TC_DEBUG_PORT 0
   19 
   20 #define TC_BIOS_KEY_ESC 1
   21 #define TC_BIOS_KEY_BACKSPACE 14
   22 #define TC_BIOS_KEY_ENTER 28
   23 #define TC_BIOS_KEY_F1 0x3b
   24 #define TC_BIOS_KEY_F2 0x3c
   25 #define TC_BIOS_KEY_F3 0x3d
   26 #define TC_BIOS_KEY_F4 0x3e
   27 #define TC_BIOS_KEY_F5 0x3f
   28 #define TC_BIOS_KEY_F6 0x40
   29 #define TC_BIOS_KEY_F7 0x41
   30 #define TC_BIOS_KEY_F8 0x42
   31 #define TC_BIOS_KEY_F9 0x43
   32 #define TC_BIOS_KEY_F10 0x44
   33 
   34 #define TC_BIOS_SHIFTMASK_CAPSLOCK  (1 << 6)
   35 #define TC_BIOS_SHIFTMASK_LSHIFT    (1 << 1)
   36 #define TC_BIOS_SHIFTMASK_RSHIFT    (1 << 0)
   37 
   38 #define TC_BIOS_CHAR_BACKSPACE      8
   39 
   40 #define TC_BIOS_MAX_CHARS_PER_LINE  80
   41 
   42 void Beep ();
   43 void ClearBiosKeystrokeBuffer ();
   44 void ClearScreen ();
   45 void DisableScreenOutput ();
   46 void EnableScreenOutput ();
   47 bool EscKeyPressed ();
   48 byte GetKeyboardChar ();
   49 byte GetKeyboardChar (byte *scanCode);
   50 byte GetShiftFlags ();
   51 int GetString (char *buffer, size_t bufferSize);
   52 void InitVideoMode ();
   53 bool IsKeyboardCharAvailable ();
   54 bool IsPrintable (char c);
   55 bool IsDigit (char c);
   56 void Print (const char *str);
   57 void Print (uint32 number);
   58 void Print (const uint64 &number);
   59 void PrintBackspace ();
   60 void PrintChar (char c);
   61 void PrintCharAtCursor (char c);
   62 void PrintEndl ();
   63 void PrintEndl (int cnt);
   64 void PrintRepeatedChar (char c, int n);
   65 void PrintError (const char *message);
   66 void PrintErrorNoEndl (const char *message);
   67 void PrintHex (byte b);
   68 void PrintHex (uint16 data);
   69 void PrintHex (uint32 data);
   70 void PrintHex (const uint64 &data);
   71 
   72 #endif // TC_HEADER_Boot_BootConsoleIo