Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
996 B

  1. //======= Copyright � 1996-2006, Valve Corporation, All rights reserved. ======
  2. //
  3. // Purpose: Win32 Console API helpers
  4. //
  5. //=============================================================================
  6. #ifndef WIN32_CONSOLE_IO_H
  7. #define WIN32_CONSOLE_IO_H
  8. #if defined( COMPILER_MSVC )
  9. #pragma once
  10. #endif
  11. // Function to attach a console for I/O to a Win32 GUI application in a reasonably smart fashion.
  12. PLATFORM_INTERFACE bool SetupWin32ConsoleIO();
  13. // Win32 Console Color API Helpers, originally from cmdlib.
  14. struct Win32ConsoleColorContext_t
  15. {
  16. int m_InitialColor;
  17. uint16 m_LastColor;
  18. uint16 m_BadColor;
  19. uint16 m_BackgroundFlags;
  20. };
  21. PLATFORM_INTERFACE void InitWin32ConsoleColorContext( Win32ConsoleColorContext_t *pContext );
  22. PLATFORM_INTERFACE uint16 SetWin32ConsoleColor( Win32ConsoleColorContext_t *pContext, int nRed, int nGreen, int nBlue, int nIntensity );
  23. PLATFORM_INTERFACE void RestoreWin32ConsoleColor( Win32ConsoleColorContext_t *pContext, uint16 prevColor );
  24. #endif