906edf7002
- Implements the default application behavior and handoff mechanisms between console and terminal. The inbox portion is done already. This adds the ability for our OpenConsole.exe to accept the incoming server connection from the Windows OS, stand up a PTY session, start the Windows Terminal as a listener for an incoming connection, and then send it the incoming PTY connection for it to launch a tab. - The tab is launched with default settings at the moment. - You must configure the default application using the `conhost.exe` propsheet or with the registry keys. Finishing the setting inside Windows Terminal will be a todo after this is complete. The OS Settings panel work to surface this setting is a dependency delivered by another team and you will not see it here. ## Validation Steps Performed - [x] Manual adjust of registry keys to the delegation conhost/terminal behavior - [x] Adjustment of the delegation options with the propsheet - [x] Launching things from the run box manually and watching them show in Terminal - [x] Launching things from shortcuts and watching them show in the Terminal Documentation on how it works will be a TODO post completion in #9462 References #7414 - Default Terminal spec Closes #492
85 lines
2 KiB
C++
85 lines
2 KiB
C++
/*++
|
|
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 "../server/ConDrvDeviceComm.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();
|
|
|
|
IDeviceComm* pDeviceComm;
|
|
|
|
wil::unique_event_nothrow hInputEvent;
|
|
|
|
SHORT sVerticalScrollSize;
|
|
SHORT sHorizontalScrollSize;
|
|
|
|
int dpi = USER_DEFAULT_SCREEN_DPI;
|
|
ULONG cursorPixelWidth = 1;
|
|
|
|
NTSTATUS ntstatusConsoleInputInitStatus;
|
|
wil::unique_event_nothrow hConsoleInputInitEvent;
|
|
DWORD dwInputThreadId;
|
|
|
|
std::vector<wchar_t> WordDelimiters;
|
|
|
|
Microsoft::Console::Render::IRenderer* pRender;
|
|
|
|
Microsoft::Console::Render::IFontDefaultList* pFontDefaultList;
|
|
|
|
bool IsHeadless() const;
|
|
|
|
ApiRoutines api;
|
|
|
|
bool handoffTarget = false;
|
|
|
|
std::optional<CLSID> handoffConsoleClsid;
|
|
std::optional<CLSID> handoffTerminalClsid;
|
|
|
|
#ifdef UNIT_TESTING
|
|
void EnableConptyModeForTests(std::unique_ptr<Microsoft::Console::Render::VtEngine> vtRenderEngine);
|
|
#endif
|
|
|
|
private:
|
|
CONSOLE_INFORMATION ciConsoleInformation;
|
|
};
|