2020-04-21 10:25:14 -07:00
|
|
|
#pragma once
|
2020-12-15 15:16:09 +03:00
|
|
|
|
|
|
|
#include <cstdint>
|
2020-04-21 10:25:14 -07:00
|
|
|
|
|
|
|
namespace CommonSharedConstants
|
|
|
|
{
|
|
|
|
// Flag that can be set on an input event so that it is ignored by Keyboard Manager
|
2020-12-15 15:16:09 +03:00
|
|
|
const uintptr_t KEYBOARDMANAGER_INJECTED_FLAG = 0x1;
|
2020-04-23 08:37:52 -07:00
|
|
|
|
|
|
|
// Fake key code to represent VK_WIN.
|
2021-06-01 19:15:16 +03:00
|
|
|
inline const DWORD VK_WIN_BOTH = 0x104;
|
2020-09-21 12:44:16 +02:00
|
|
|
|
2021-03-22 17:23:39 +02:00
|
|
|
const wchar_t APPDATA_PATH[] = L"Microsoft\\PowerToys";
|
|
|
|
|
2020-09-21 12:44:16 +02:00
|
|
|
// Path to the event used by PowerLauncher
|
|
|
|
const wchar_t POWER_LAUNCHER_SHARED_EVENT[] = L"Local\\PowerToysRunInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab";
|
2020-10-02 15:36:36 +03:00
|
|
|
|
2021-10-01 14:59:52 +01:00
|
|
|
const wchar_t POWER_LAUNCHER_CENTRALIZED_HOOK_SHARED_EVENT[] = L"Local\\PowerToysRunCentralizedHookInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab";
|
|
|
|
|
2021-03-19 19:03:12 +02:00
|
|
|
const wchar_t RUN_SEND_SETTINGS_TELEMETRY_EVENT[] = L"Local\\PowerToysRunInvokeEvent-638ec522-0018-4b96-837d-6bd88e06f0d6";
|
|
|
|
|
2021-05-24 12:05:17 +03:00
|
|
|
const wchar_t RUN_EXIT_EVENT[] = L"Local\\PowerToysRunExitEvent-3e38e49d-a762-4ef1-88f2-fd4bc7481516";
|
2021-07-26 17:02:44 +03:00
|
|
|
|
|
|
|
const wchar_t FZE_EXIT_EVENT[] = L"Local\\PowerToys-FZE-ExitEvent-ca8c73de-a52c-4274-b691-46e9592d3b43";
|
2021-05-24 12:05:17 +03:00
|
|
|
|
2021-03-25 16:04:56 +02:00
|
|
|
const wchar_t COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT[] = L"Local\\ColorPickerSettingsTelemetryEvent-6c7071d8-4014-46ec-b687-913bd8a422f1";
|
|
|
|
|
2021-03-02 20:56:37 +03:00
|
|
|
// Path to the event used to show Color Picker
|
|
|
|
const wchar_t SHOW_COLOR_PICKER_SHARED_EVENT[] = L"Local\\ShowColorPickerEvent-8c46be2a-3e05-4186-b56b-4ae986ef2525";
|
|
|
|
|
2023-01-31 00:00:11 +01:00
|
|
|
const wchar_t SHORTCUT_GUIDE_TRIGGER_EVENT[] = L"Local\\ShortcutGuide-TriggerEvent-d4275ad3-2531-4d19-9252-c0becbd9b496";
|
|
|
|
|
2021-05-20 15:07:34 +03:00
|
|
|
const wchar_t SHORTCUT_GUIDE_EXIT_EVENT[] = L"Local\\ShortcutGuide-ExitEvent-35697cdd-a3d2-47d6-a246-34efcc73eac0";
|
2021-03-02 20:56:37 +03:00
|
|
|
|
2021-06-23 15:48:54 +03:00
|
|
|
const wchar_t FANCY_ZONES_EDITOR_TOGGLE_EVENT[] = L"Local\\FancyZones-ToggleEditorEvent-1e174338-06a3-472b-874d-073b21c62f14";
|
|
|
|
|
2023-05-02 13:10:54 +02:00
|
|
|
const wchar_t SHOW_HOSTS_EVENT[] = L"Local\\Hosts-ShowHostsEvent-5a0c0aae-5ff5-40f5-95c2-20e37ed671f0";
|
|
|
|
|
|
|
|
const wchar_t SHOW_HOSTS_ADMIN_EVENT[] = L"Local\\Hosts-ShowHostsAdminEvent-60ff44e2-efd3-43bf-928a-f4d269f98bec";
|
|
|
|
|
2021-07-13 10:39:46 -07:00
|
|
|
// Path to the event used by Awake
|
|
|
|
const wchar_t AWAKE_EXIT_EVENT[] = L"Local\\PowerToysAwakeExitEvent-c0d5e305-35fc-4fb5-83ec-f6070cfaf7fe";
|
2022-06-23 16:29:53 +02:00
|
|
|
|
|
|
|
// Path to the event used by AlwaysOnTop
|
|
|
|
const wchar_t ALWAYS_ON_TOP_PIN_EVENT[] = L"Local\\AlwaysOnTopPinEvent-892e0aa2-cfa8-4cc4-b196-ddeb32314ce8";
|
2021-07-13 10:39:46 -07:00
|
|
|
|
2022-08-26 18:01:50 +02:00
|
|
|
// Path to the event used by PowerAccent
|
|
|
|
const wchar_t POWERACCENT_EXIT_EVENT[] = L"Local\\PowerToysPowerAccentExitEvent-53e93389-d19a-4fbb-9b36-1981c8965e17";
|
|
|
|
|
2022-08-25 05:25:52 -05:00
|
|
|
// Path to the event used by PowerOCR
|
|
|
|
const wchar_t SHOW_POWEROCR_SHARED_EVENT[] = L"Local\\PowerOCREvent-dc864e06-e1af-4ecc-9078-f98bee745e3a";
|
|
|
|
|
Registry Preview: complete feature with integration with Settings and the Launcher UX (#23709)
* Initial src for Registry Preview
Initial collection of files
* Update MainWindow.Utilities.cs
fixing a few spelling items
* Update expect.txt
* Update App.xaml.cs
* Update MainWindow.Events.cs
* Update MainWindow.Utilities.cs
* Update MainWindow.xaml.cs
* Update expect.txt
* Update MainWindow.Events.cs
* Rename AddPreviewtoRegfile.reg to AddPreviewToRegfile.reg
* Rename RemovePreviewtoRegfile.reg to RemovePreviewToRegfile.reg
* Update Resources.resw
* Update MainWindow.xaml
* Turns on self-contained mode
Updates the csproj file to compile the app as self-contained .
Includes fixes for code that expected the app to be in an ApplicationContainer.
Updates WindowsAppSDK from 1.1.5 to 1.2.230118.102.
* Updated to align with StyleCop errors
Multiple changes across the codebase that now aligns with StyleCop guidelines.
Tested again after the changes, to make sure no new bugs crept in.
* Added comments for spell-checker
Unclear if this side step should be done or not, but the kxz comes from a GUID and the other three names are constants.
* Adding code-custom.dic
Comments didn't work; trying a dic file
* Added four new terms to expects.txt file
Cleaning up attempt to update the spell-checker with dic file and moved it to expects.txt file
* Adding one more string
Adding one more string for Spell-Check
* Adding back egfile
Seems this is needed.
* Correcting a variable name
Seems one of the variable names that changed globally got missed in a XAML file.
* Update project to be more PowerToys friendly
Tweaking names and output file name to fit better with PowerToys.
* First pass at integration into Settings and Launcher
This PR is not as large as it seems:
- RegistryPreview's source moved around to a "better" directory that makes it look like the whole app changed. It didn't. In fact, I opened it in Beyond Compare and there's not much difference in the RegistryPreview app.
- Added RegistryPreviewExt that produces a DLL that the Launcher can run the EXE
- Changes to Runner calls the Ext DLL rather than the app
- Settings UI got a bunch of changes to enable the Settings page for enable/disable across ViewModels, Views, and string tables.
Still todo:
- Add "Preview" to .REG files, when the app is enable (and remove it when disabled)
- Update the thumbnail-screenshot in the Settings page
- Add support for OOBE
* Update expect.txt
Added REGISTRYPREVIEWEXT for recent changes and corrected an alphabetic sorting error.
* Updating project file for Release mode
Build failed due to a bad Includes path in Release mode.
* Adds REG registration but breaks settings
This update will update the HKCU branch of the Registry for REG files: if the app in PowerToys is enabled, it adds a Preview item to the context menu of REG files and disabling in PowerToys removes the menu item.
While working on this, I noticed that the application settings were broken, after moving to a self-contained EXE: there must have been old settings from past builds, when it was still using containers and family names.
Added TODO's to add a new way to save settings, likely as JSON.
* Re-enabled app settings
Moved from using ApplicationDataContainer for app settings and now use simple JSON.
Also cleaned up handling the scenario where the Launcher send in the PID from PowerToys' main thread.
Fixed past spelling errors as well.
* Update RegistryPreview.png
Captured new screenshot.
* Integration into OOBE
Integrates new page for Registry Preview into OOBE process.
* Removing old comment and unneeded calls
Two bits of source removed as they aren't needed any longer
Removing a chunk of old commented out code that doesn't make sense anymore.
* Merging file from upstream
Updating some files due to three merge conflicts from upstream changes and a couple of other changes to keep up.
* Update .gitignore
Adding two vcxproj files that have local updates for atls.lib locations.
* Update Resources.resw
Fixing a typo that involved a missing closing tag.
* Fix analyzer warnings
* Fix CI build
* Fix ARM64 build
Project file cleanup
* Add to installer
* expect.txt
* Remove unneeded dll
* Update MainWindow.xaml.cs
Added check for current Theme and adjust TextBox Foreground accordingly.
* Update expect.txt
Cleaning up merge cruft.
* Revert wrong .gitignore changes
* Fix ARM installer
* Update Brushes for textBox to use Theme based versions
Finally figured out how to use the built-in, Theme-aware Brushes for the font colors in the onscreen textBox. Also have it aligning the font color for the hover state.
* Align configuration in PowerToys.sln
* [installer] Add missing files
* Fix bad merge
* Fixes for stefansjfw's review
Includes:
- two new strings for UX localization
- adds compatibility section for Windows 10
- fix to only track successful activations
- Removes two REG files that were there for examples
* Fixes from review from htcfreek
Updates:
- Fixed an issue where TextBox_TextChanged was firing when you simply opened a file.
- Added clamp to prevent files larger than 10MB from being opened.
- Added support in the UX to show Keys and Values that are deleted via the file
- Added support to specially handle Keys that start with - and Values that have =- in them (delete scenario)
- Changed AppBarButton icon for Edit from Rename to NewWindow
* Create deleted-folder32.png
* Added Registry Preview to GPO
* Update expect.txt
Updating spellchecker works
* Updating Size/Move code for better results
- Moved the size/move to the MainWindow layer
- Cleaned up the JSON settings handling to avoid an access denied on first run
* Improving text handling
Changed how special characters are parse, which helps with live entry.
* Updates to parsing and other fixes
- Renamed the value PNG for parity
- Added new error image
- Added check that values have " at start and finish.
- Added support for a new "ERROR" type for Values
- Fixed support for @ versus "@" in values
- Fixed bug where Save wasn't activating in all scernarios
* Fix signing and versioning
* Update src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
* Apply suggestions from code review
Adds Launch button to the settings page.
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
* Update Resources.resw
Adding strings for new launch button
* Adding new version for GPO
Moving to 0.69.0
* More parsing bug fixes
- Changes to look for [- instead of -[ for syntax deleting keys (fix for developer's mental hiccup)
- Moved [- to top of the decision making stack, as it needs to come before [
- Added new StripEscapedCharacters function for both sides of a Value line
- Fixed crashing bug for scenario where no Keys are parsed before a Value
* Bug fixes from most recent review.
- Dictionary will now be case insensitive when searching for keys
- Added tool tips (and strings) to the images of the Keys and Values
- Updated delete handling for Keys, so that only the leaf-most node gets marked as deleted; also stops the top most roots from being marked deleted.
* Tweaking for @=-
Forces the UX to take @=- and treat it as @="" since that's what Registry Editor would do.
* Removing unused usings
* Updates app description
* Update src/gpo/assets/PowerToys.admx
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
* cleanup proj file
launch process only if module is enabled
add process to bugreport process list
* Add context menu icon
* Update src/modules/registrypreview/RegistryPreviewUI/MainWindow.Utilities.cs
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
* Use modulesRegistry.h to apply/unapply registry changes
* Tweaked window settings
Moved the loading of the settings a little later in the initialization code, which gives more time for things to initialize.
* Update registry.h
Moving the definition out of the detail namespace to the registry name space to fix a compilation issue in RegistryPreviewExt.
* Unapply on creation
If module is disabled in settings.json, on startup reg entries should be unnaplied.
TODO: read m_enabled from settings file on creation
* Removing size/move main window
Added a TODO comment that responds to the size/position settings that are being saved out in the JSON blob on close as it doesn't always work on every PC, as the MainWindow initializes at different times.
* Change to always keep Save As active
No reason for this to be disabled, honestly.
---------
Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2023-03-27 06:21:46 -07:00
|
|
|
// Path to the event used by RegistryPreview
|
|
|
|
const wchar_t REGISTRY_PREVIEW_TRIGGER_EVENT[] = L"Local\\RegistryPreviewEvent-4C559468-F75A-4E7F-BC4F-9C9688316687";
|
|
|
|
|
2023-01-31 00:00:11 +01:00
|
|
|
// Path to the event used by MeasureTool
|
|
|
|
const wchar_t MEASURE_TOOL_TRIGGER_EVENT[] = L"Local\\MeasureToolEvent-3d46745f-09b3-4671-a577-236be7abd199";
|
2023-02-23 06:59:49 -08:00
|
|
|
|
2022-12-14 13:37:23 +01:00
|
|
|
// Path to the event used by GcodePreviewHandler
|
|
|
|
const wchar_t GCODE_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysGcodePreviewResizeEvent-6ff1f9bd-ccbd-4b24-a79f-40a34fb0317d";
|
|
|
|
|
|
|
|
// Path to the event used by DevFilesPreviewHandler
|
|
|
|
const wchar_t DEV_FILES_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysDevFilesPreviewResizeEvent-5707a22c-2cac-4ea2-82f0-27c03ef0b5f3";
|
|
|
|
|
|
|
|
// Path to the event used by MarkdownPreviewHandler
|
|
|
|
const wchar_t MARKDOWN_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysMarkdownPreviewResizeEvent-54c9ab69-11f3-49e9-a98f-53221cfef3ec";
|
|
|
|
|
|
|
|
// Path to the event used by MarkdownPreviewHandler
|
|
|
|
const wchar_t PDF_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysPdfPreviewResizeEvent-5a2f162a-f728-45fe-8bda-ef3d5e434ce7";
|
|
|
|
|
|
|
|
// Path to the event used by MarkdownPreviewHandler
|
|
|
|
const wchar_t SVG_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysSvgPreviewResizeEvent-0701a4fc-d5a1-4ee7-b885-f83982c62a0d";
|
|
|
|
|
2020-10-02 15:36:36 +03:00
|
|
|
// Max DWORD for key code to disable keys.
|
2021-06-01 19:15:16 +03:00
|
|
|
const DWORD VK_DISABLED = 0x100;
|
2021-04-08 19:42:46 +02:00
|
|
|
}
|