using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace VRCX
{
//Based off DWMWA_USE_IMMERSIVE_DARK_MODE, documentation: https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
//dwAttribute was 19 before Windows 20H1, 20 after Windows 20H1
internal static class WinformThemer
{
///
/// Flash both the window caption and taskbar button.
/// This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags.
///
public const uint FLASHW_ALL = 3;
///
/// Flash continuously until the window comes to the foreground.
///
public const uint FLASHW_TIMERNOFG = 12;
///
/// Private holder of current theme
///
private static int currentTheme;
///
/// Sets the global theme of the app
/// Light = 0
/// Dark = 1
///
public static void SetGlobalTheme(int theme)
{
currentTheme = theme;
//Make a seperate list for all current forms (causes issues otherwise)
var forms = new List