mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
common: refactor common library pt2 (#8588)
- remove common lib - split settings, remove common-md - move ipc interop/kb_layout to interop - rename core -> settings, settings -> old_settings - os-detect header-only; interop -> PowerToysInterop - split notifications, move single-use headers where they're used - winstore lib - rename com utils - rename Updating and Telemetry projects - rename core -> settings-ui and remove examples folder - rename settings-ui folder + consisent common/version include
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
#include "pch.h"
|
||||
#include "Helpers.h"
|
||||
#include <sstream>
|
||||
#include "../common/shared_constants.h"
|
||||
|
||||
#include <common/interop/keyboard_layout.h>
|
||||
#include <common/interop/shared_constants.h>
|
||||
#include <common/utils/process_path.h>
|
||||
#include <common/utils/resources.h>
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include "../../common/common.h"
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
#include "../common/keyboard_layout.h"
|
||||
#include <common/interop/keyboard_layout.h>
|
||||
#include "KeyboardManagerConstants.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
using namespace winrt::Windows::Foundation;
|
||||
|
||||
@@ -196,7 +199,7 @@ namespace KeyboardManagerHelper
|
||||
}
|
||||
keyEventArray[index].ki.dwExtraInfo = extraInfo;
|
||||
|
||||
// Set wScan to the value from MapVirtualKey as some applications may use the scan code for handling input, for instance, Windows Terminal ignores non-character input which has scancode set to 0.
|
||||
// Set wScan to the value from MapVirtualKey as some applications may use the scan code for handling input, for instance, Windows Terminal ignores non-character input which has scancode set to 0.
|
||||
// MapVirtualKey returns 0 if the key code does not correspond to a physical key (such as unassigned/reserved keys). More details at https://github.com/microsoft/PowerToys/pull/7143#issue-498877747
|
||||
keyEventArray[index].ki.wScan = (WORD)MapVirtualKey(keyCode, MAPVK_VK_TO_VSC);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <queue>
|
||||
#include <mutex>
|
||||
|
||||
#include <LowlevelKeyboardEvent.h>
|
||||
#include <common/hooks/LowlevelKeyboardEvent.h>
|
||||
// Available states for the KeyDelay state machine.
|
||||
enum class KeyDelayState
|
||||
{
|
||||
|
||||
@@ -31,20 +31,20 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\;..\..\..\common;..\..\..\common\telemetry;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\;..\..\..\;..\..\..\common\telemetry;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4002</DisableSpecificWarnings>
|
||||
<AdditionalOptions>%(AdditionalOptions) /Zm200</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\common\interop\keyboard_layout.cpp" />
|
||||
<ClCompile Include="Helpers.cpp" />
|
||||
<ClCompile Include="KeyboardManagerState.cpp" />
|
||||
<ClCompile Include="KeyDelay.cpp" />
|
||||
@@ -68,8 +68,11 @@
|
||||
<ClInclude Include="trace.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\common\common.vcxproj">
|
||||
<Project>{74485049-c722-400f-abe5-86ac52d929b3}</Project>
|
||||
<ProjectReference Include="..\..\..\common\COMUtils\COMUtils.vcxproj">
|
||||
<Project>{7319089e-46d6-4400-bc65-e39bdf1416ee}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\common\Display\Display.vcxproj">
|
||||
<Project>{caba8dfb-823b-4bf2-93ac-3f31984150d9}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
<ClCompile Include="Trace.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\common\interop\keyboard_layout.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="KeyboardManagerState.h">
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <winrt/base.h>
|
||||
#include "../../common/common.h"
|
||||
#include <common/utils/resources.h>
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
namespace KeyboardManagerConstants
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "KeyboardManagerState.h"
|
||||
#include "Shortcut.h"
|
||||
#include "RemapShortcut.h"
|
||||
#include <../common/settings_helpers.h>
|
||||
#include <common/SettingsAPI/settings_helpers.h>
|
||||
#include "KeyDelay.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include <mutex>
|
||||
#include "KeyboardManagerConstants.h"
|
||||
#include "../common/keyboard_layout.h"
|
||||
#include "../common/LowlevelKeyboardEvent.h"
|
||||
#include <common/interop/keyboard_layout.h>
|
||||
#include "../common/hooks/LowlevelKeyboardEvent.h"
|
||||
#include <functional>
|
||||
#include <variant>
|
||||
#include "Shortcut.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "Shortcut.h"
|
||||
#include "../common/keyboard_layout.h"
|
||||
#include "../common/shared_constants.h"
|
||||
#include <common/interop/keyboard_layout.h>
|
||||
#include <common/interop/shared_constants.h>
|
||||
#include "Helpers.h"
|
||||
#include "InputInterface.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user