NativeMethods.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Runtime.InteropServices; 6 using System.Security; 7 8 namespace Microsoft.CmdPal.UI.Helpers; 9 10 [SuppressUnmanagedCodeSecurity] 11 internal static class NativeMethods 12 { 13 [DllImport("shell32.dll")] 14 public static extern int SHQueryUserNotificationState(out UserNotificationState state); 15 } 16 17 internal enum UserNotificationState : int 18 { 19 QUNS_NOT_PRESENT = 1, 20 QUNS_BUSY, 21 QUNS_RUNNING_D3D_FULL_SCREEN, 22 QUNS_PRESENTATION_MODE, 23 QUNS_ACCEPTS_NOTIFICATIONS, 24 QUNS_QUIET_TIME, 25 QUNS_APP, 26 }