mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
* FindMyMouse: switch animations on/off based on global windows settings * Fancy Zones: enable/disable animations based on global Windows settings * Shortcut Guide: enabling/disabling animations based on global Windows settings * spell checker * Making MouseUtils settings dependent on global windows settings, AnimationEffects. If the global settings is disabled the MouseUtils animation settings is disabled too, description shows the reason. * Adding error detection, log on SystemParametersInfo call. * Adding infobar instead of changing description of the settingsbar. * spell checker * moving native constant into NativeMethods class
33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Microsoft.PowerToys.Settings.Utilities
|
|
{
|
|
internal static class NativeMethods
|
|
{
|
|
[DllImport("user32.dll")]
|
|
public static extern bool AllowSetForegroundWindow(int dwProcessId);
|
|
|
|
public const int SWRESTORE = 9;
|
|
|
|
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
|
public static extern bool SetForegroundWindow(IntPtr handle);
|
|
|
|
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
|
public static extern bool ShowWindow(IntPtr handle, int nCmdShow);
|
|
|
|
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
|
public static extern bool IsIconic(IntPtr handle);
|
|
|
|
[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")]
|
|
internal static extern bool SystemParametersInfo(int uiAction, int uiParam, ref int pvParam, int fWinIni);
|
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "Interop object")]
|
|
public const int SPI_GETCLIENTAREAANIMATION = 0x1042;
|
|
}
|
|
}
|