Mouse Utils - Mouse Pointer Crosshair (#15633)

* Apply PowerToys template

* Add CppWinRt package

* Add Settings reference

* Use proper output dir

* Proper WindowsTargetPlatformVersion

* Add filters to vcxproj

* Proper resource file generation

* Remove boilerplate code

* Initial implementation of the mouse crosshair

* Add enable module to settings page

* Change hotkey in settings

* Add color, opacity, thickness settings

* Add telemetry

* Add Oobe entry

* Add installer instructions

* Add dll to pipelines

* Add crosshair borders

* Fix settings case

* Tweak defaults to make it look like the specs

* fix spellchecker

* Fix resources and binary info

* Correct composition tree comment typo

* Reduce argument copy

* Start disabled by default

* Add maximum to crosshair thickness and border size

* Set minimum border size of 0

* Fix comment

* Add maximum to radius

* Add comment for non-localizable strings

* Rename "Inclusive Mouse"-"Mouse Pointer Crosshair"
This commit is contained in:
Jaime Bernardo
2022-01-24 13:29:16 +00:00
committed by GitHub
parent 453bb613af
commit 2e8dfa73d2
27 changed files with 1622 additions and 4 deletions

View File

@@ -0,0 +1,40 @@
#include "pch.h"
#include "trace.h"
TRACELOGGING_DEFINE_PROVIDER(
g_hProvider,
"Microsoft.PowerToys",
// {38e8889b-9731-53f5-e901-e8a7c1753074}
(0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74),
TraceLoggingOptionProjectTelemetry());
void Trace::RegisterProvider() noexcept
{
TraceLoggingRegister(g_hProvider);
}
void Trace::UnregisterProvider() noexcept
{
TraceLoggingUnregister(g_hProvider);
}
// Log if the user has MousePointerCrosshair enabled or disabled
void Trace::EnableMousePointerCrosshair(const bool enabled) noexcept
{
TraceLoggingWrite(
g_hProvider,
"MousePointerCrosshair_EnableMousePointerCrosshair",
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
TraceLoggingBoolean(enabled, "Enabled"));
}
// Log that the user activated the module by having the crosshair be drawn
void Trace::StartDrawingCrosshair() noexcept
{
TraceLoggingWrite(
g_hProvider,
"MousePointerCrosshair_StartDrawingCrosshair",
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE));
}