// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. namespace autoShell.Services; /// /// Abstracts Windows Registry operations for testability. /// internal interface IRegistryService { /// /// Gets a value from the registry under HKEY_CURRENT_USER. /// /// The registry subkey path. /// The name of the value to retrieve. /// The value to return if the key or value does not exist. object GetValue(string keyPath, string valueName, object defaultValue = null); /// /// Sets a value in the registry under HKEY_CURRENT_USER. /// /// The registry subkey path (created if it does not exist). /// The name of the value to set. /// The data to store. /// The registry data type. void SetValue(string keyPath, string valueName, object value, Microsoft.Win32.RegistryValueKind valueKind); /// /// Sets a value in the registry under HKEY_LOCAL_MACHINE. /// /// The registry subkey path (created if it does not exist). /// The name of the value to set. /// The data to store. /// The registry data type. void SetValueLocalMachine(string keyPath, string valueName, object value, Microsoft.Win32.RegistryValueKind valueKind); /// /// Broadcasts a WM_SETTINGCHANGE message to notify the system of a setting change. /// /// The setting name to broadcast (e.g., "ImmersiveColorSet"), or null for a generic notification. void BroadcastSettingChange(string setting = null); /// /// Notifies the shell that file associations or Explorer settings have changed, /// causing open Explorer windows to refresh immediately. /// void NotifyShellChange(); /// /// Notifies the taskbar to update its auto-hide state immediately. /// /// True to enable auto-hide, false to disable. void SetTaskbarAutoHideState(bool autoHide); }