Files
terminal/src/interactivity/win32/SystemConfigurationProvider.hpp
Mike Griese 7e47f6aab9 Wire up passing LNK/EXE data from OpenCon to ITerminalHandoff (#13570)
This PR by itself doesn't _really_ change much. Technically, now the Terminal will respect the Title of a `.lnk` when started for defterm, but we don't do anything else yet. Primarily, the goal of this PR is to just wire up startup info in OpenConsole to the connected Terminal. 
* This required a bit of changes in `srvinit.cpp:ConsoleEstablishHandoff` to replicate other bits of startup, where we crack open the connect message to get the relevant bits of info.
* We pack that all into a `TERMINAL_STARTUP_INFO`, which we pass along to the registered terminal application.
* `ConptyConnection` accepts the handoff, and gathers that information out of the `TERMINAL_STARTUP_INFO`
* Some other updates to the scratch sln were made to make it build again (related, but unimportant).
* This is a precursor to:
  * #13111
  * #12154
* Closes #9458
* Tested manually
* I work here
2022-08-26 06:16:29 -05:00

47 lines
1.3 KiB
C++

/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- SystemConfigurationProvider.hpp
Abstract:
- Win32 implementation of the ISystemConfigurationProvider interface.
Author(s):
- Hernan Gatta (HeGatta) 29-Mar-2017
--*/
#pragma once
#include "precomp.h"
#include "../inc/ISystemConfigurationProvider.hpp"
namespace Microsoft::Console::Interactivity::Win32
{
class SystemConfigurationProvider final : public ISystemConfigurationProvider
{
public:
~SystemConfigurationProvider() = default;
bool IsCaretBlinkingEnabled();
UINT GetCaretBlinkTime();
int GetNumberOfMouseButtons();
ULONG GetCursorWidth() override;
ULONG GetNumberOfWheelScrollLines();
ULONG GetNumberOfWheelScrollCharacters();
void GetSettingsFromLink(_Inout_ Settings* pLinkSettings,
_Inout_updates_bytes_(*pdwTitleLength) LPWSTR pwszTitle,
_Inout_ PDWORD pdwTitleLength,
_In_ PCWSTR pwszCurrDir,
_In_ PCWSTR pwszAppName,
_Inout_opt_ IconInfo* iconInfo);
private:
static const ULONG s_DefaultCursorWidth = 1;
};
}