/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/settings-ui/Settings.UI/Utilities/NativeMethods.cs
32 строки
1 KB
Laszlo Nemeth
[Accessibility]Turn animations off based on Windows settings (#28128)
05 сен 2023, 16:25
Не верифицирован
05 сен 2023, 16:25
83bb573
Код
Авторство
О чём код?
// 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; } }