2019-05-03 00:29:04 +02:00
|
|
|
/*++
|
|
|
|
Copyright (c) Microsoft Corporation
|
|
|
|
Licensed under the MIT license.
|
|
|
|
|
|
|
|
Module Name:
|
|
|
|
- globals.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
- This module contains the global variables used by the console server DLL.
|
|
|
|
|
|
|
|
Author:
|
|
|
|
- Jerry Shea (jerrysh) 21-Sep-1993
|
|
|
|
|
|
|
|
Revision History:
|
|
|
|
- Modified to reduce globals over Console V2 project (MiNiksa/PaulCam, 2014)
|
|
|
|
--*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "selection.hpp"
|
|
|
|
#include "server.h"
|
|
|
|
#include "ConsoleArguments.hpp"
|
|
|
|
#include "ApiRoutines.h"
|
|
|
|
|
|
|
|
#include "..\renderer\inc\IRenderData.hpp"
|
|
|
|
#include "..\renderer\inc\IRenderEngine.hpp"
|
|
|
|
#include "..\renderer\inc\IRenderer.hpp"
|
|
|
|
#include "..\renderer\inc\IFontDefaultList.hpp"
|
|
|
|
|
|
|
|
#include "..\server\DeviceComm.h"
|
|
|
|
|
|
|
|
#include <TraceLoggingProvider.h>
|
|
|
|
#include <winmeta.h>
|
|
|
|
TRACELOGGING_DECLARE_PROVIDER(g_hConhostV2EventTraceProvider);
|
|
|
|
|
|
|
|
class Globals
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UINT uiOEMCP = GetOEMCP();
|
|
|
|
UINT uiWindowsCP = GetACP();
|
|
|
|
HINSTANCE hInstance;
|
|
|
|
UINT uiDialogBoxCount;
|
|
|
|
|
|
|
|
ConsoleArguments launchArgs;
|
|
|
|
|
|
|
|
CONSOLE_INFORMATION& getConsoleInformation();
|
|
|
|
|
|
|
|
DeviceComm* pDeviceComm;
|
|
|
|
|
|
|
|
wil::unique_event_nothrow hInputEvent;
|
|
|
|
|
|
|
|
SHORT sVerticalScrollSize;
|
|
|
|
SHORT sHorizontalScrollSize;
|
|
|
|
|
|
|
|
int dpi = USER_DEFAULT_SCREEN_DPI;
|
|
|
|
ULONG cursorPixelWidth = 1;
|
|
|
|
|
|
|
|
NTSTATUS ntstatusConsoleInputInitStatus;
|
2019-11-08 22:44:52 +01:00
|
|
|
wil::unique_event_nothrow hConsoleInputInitEvent;
|
2019-05-03 00:29:04 +02:00
|
|
|
DWORD dwInputThreadId;
|
|
|
|
|
|
|
|
std::vector<wchar_t> WordDelimiters;
|
|
|
|
|
2019-05-30 20:14:21 +02:00
|
|
|
Microsoft::Console::Render::IRenderer* pRender;
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2019-05-30 20:14:21 +02:00
|
|
|
Microsoft::Console::Render::IFontDefaultList* pFontDefaultList;
|
2019-05-03 00:29:04 +02:00
|
|
|
|
|
|
|
bool IsHeadless() const;
|
|
|
|
|
|
|
|
ApiRoutines api;
|
|
|
|
|
2020-01-29 17:33:06 +01:00
|
|
|
#ifdef UNIT_TESTING
|
|
|
|
void EnableConptyModeForTests();
|
|
|
|
#endif
|
|
|
|
|
2019-05-03 00:29:04 +02:00
|
|
|
private:
|
|
|
|
CONSOLE_INFORMATION ciConsoleInformation;
|
|
|
|
};
|