#pragma region CPL License /* Nuclex Native Framework Copyright (C) 2002-2023 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion // CPL License #ifndef NUCLEX_PLATFORM_PLATFORM_WINDOWSCONSOLEAPI_H #define NUCLEX_PLATFORM_PLATFORM_WINDOWSCONSOLEAPI_H #include "Nuclex/Platform/Config.h" #if defined(NUCLEX_PLATFORM_WINDOWS) #include "WindowsApi.h" namespace Nuclex { namespace Platform { namespace Platform { // ------------------------------------------------------------------------------------------- // /// Wraps console functions from the Windows desktop API class WindowsConsoleApi { /// Retrieves the window handle of the process' active console /// /// The window handle of the console window or NULL if the process does not have a console /// public: static ::HWND GetConsoleWindow(); /// Retrieves informations about the console buffer of the process /// /// Handle of the console screen buffer for which informations will be returned /// /// /// Screen buffer information structure that will receive the requested informations /// public: static void GetConsoleScreenBufferInfo( ::HANDLE consoleScreenBufferHandle, ::CONSOLE_SCREEN_BUFFER_INFO &consoleScreenBufferInfo ); /// Retrieves informations about the console buffer of the process /// /// Handle of the console screen buffer for which informations will be returned /// /// A structure describing the console used by he current process public: static ::CONSOLE_SCREEN_BUFFER_INFO GetConsoleScreenBufferInfo( ::HANDLE consoleScreenBufferHandle ); }; // ------------------------------------------------------------------------------------------- // }}} // namespace Nuclex::Platform::Platform #endif // defined(NUCLEX_PLATFORM_WINDOWS) #endif // NUCLEX_PLATFORM_PLATFORM_WINDOWSCONSOLEAPI_H