mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
* Introduce Command Not Found module * rewrite module to depend on WinGet PowerShell module * address Dongbo's feedback * try and implement settings UI * fix SUI build; try and store PowerShell object * add and use object pool * apply Dongbo's feedback * add warm up; implement IPooledObjectPolicy * Add module interface * WIP trying to import module from settings * Add EnableModule.ps1 * spellcheck * spellcheck again * Installer. Add DisableModule.ps1 * Fix styling * Give the user some output from installing * Prettify the Settings controls * Add button to check PowerShell 7's version * Fix Settings Assets paths * Fix PowerShell 7 output * Make module enable and disable scripts give better information * Fix spellcheck * Fix image files and placeholders * Don't remove CmdNotFound on upgrade and don't fail on uninstall of CmdNotFound * Consistent install module scripts location on debug and installed * installer: Avoid messageboxes and hide powershell on uninstalling CmdNotFound * Fix psd1 file resolution when installed * Fix spellcheck * Add telemetry events * Fix gpo files * If GPO is set, enable/disable module on PT start depending on gpo value * Cleanup module interface * Cleanup settings code * If GPO is set, disable Settings page logic * Adding icons * Update settings UI and strings * Add telemetry for suggestions and feedbacks * Fix sln file * Fix build * minor fixes * Updating icon * Remove global.json * Remove unused PowerShell dependency * Don't use preview version of Automation and fix NOTICE * Fix signing * Fix NOTICE.md * Fix version checking for getfilesiginforedist.dll * Fix spellchecker * Fix README.md * Fix false positives section in expect.txt * Add logs to module interface --------- Co-authored-by: Stefan Markovic <stefan@janeasystems.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
168 lines
7.6 KiB
C++
168 lines
7.6 KiB
C++
#include "pch.h"
|
|
#include "GPOWrapper.h"
|
|
#include "GPOWrapper.g.cpp"
|
|
|
|
namespace winrt::PowerToys::GPOWrapper::implementation
|
|
{
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredAlwaysOnTopEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredAlwaysOnTopEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredAwakeEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredAwakeEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredCmdNotFoundEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredCmdNotFoundEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredColorPickerEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredColorPickerEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredCropAndLockEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredCropAndLockEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredFancyZonesEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredFancyZonesEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredFileLocksmithEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredFileLocksmithEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredSvgPreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredSvgPreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredMarkdownPreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMarkdownPreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredMonacoPreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMonacoPreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredPdfPreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPdfPreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredGcodePreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredGcodePreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredSvgThumbnailsEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredSvgThumbnailsEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredPdfThumbnailsEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPdfThumbnailsEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredGcodeThumbnailsEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredGcodeThumbnailsEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredStlThumbnailsEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredStlThumbnailsEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredHostsFileEditorEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredHostsFileEditorEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredImageResizerEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredImageResizerEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredKeyboardManagerEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredKeyboardManagerEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredFindMyMouseEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredFindMyMouseEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredMouseHighlighterEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMouseHighlighterEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredMouseJumpEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMouseJumpEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredMousePointerCrosshairsEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMousePointerCrosshairsEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredPowerRenameEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPowerRenameEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredPowerLauncherEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPowerLauncherEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredQuickAccentEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredQuickAccentEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredRegistryPreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredRegistryPreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredScreenRulerEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredScreenRulerEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredShortcutGuideEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredShortcutGuideEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredTextExtractorEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredTextExtractorEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredPastePlainEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPastePlainEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredVideoConferenceMuteEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredMouseWithoutBordersEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMouseWithoutBordersEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredPeekEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPeekEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetDisableAutomaticUpdateDownloadValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getDisableAutomaticUpdateDownloadValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetAllowExperimentationValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getAllowExperimentationValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetRunPluginEnabledValue(winrt::hstring const& pluginID)
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getRunPluginEnabledValue(winrt::to_string(pluginID)));
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredEnvironmentVariablesEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredEnvironmentVariablesEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredQoiPreviewEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredQoiPreviewEnabledValue());
|
|
}
|
|
GpoRuleConfigured GPOWrapper::GetConfiguredQoiThumbnailsEnabledValue()
|
|
{
|
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue());
|
|
}
|
|
}
|