using System;
using System.Runtime.InteropServices;
namespace MicaSetup.Natives;
public static class UxTheme
{
[DllImport(Lib.UxTheme, SetLastError = false, ExactSpelling = true)]
public static extern int SetWindowThemeAttribute(nint hwnd, WINDOWTHEMEATTRIBUTETYPE eAttribute, in WTA_OPTIONS pvAttribute, uint cbAttribute);
public enum WINDOWTHEMEATTRIBUTETYPE
{
WTA_NONCLIENT = 1,
}
[Flags]
public enum ThemeDialogTextureFlags
{
/// Disables background texturing.
ETDT_DISABLE = 0x00000001,
/// Enables dialog window background texturing. The texturing is defined by a visual style.
ETDT_ENABLE = 0x00000002,
/// Uses the Tab control texture for the background texture of a dialog window.
ETDT_USETABTEXTURE = 0x00000004,
///
/// Enables dialog window background texturing. The texture is the Tab control texture defined by the visual style. This flag is
/// equivalent to (ETDT_ENABLE | ETDT_USETABTEXTURE).
///
ETDT_ENABLETAB = (ETDT_ENABLE | ETDT_USETABTEXTURE),
/// Uses the Aero wizard texture for the background texture of a dialog window.
ETDT_USEAEROWIZARDTABTEXTURE = 0x00000008,
/// ETDT_ENABLE | ETDT_USEAEROWIZARDTABTEXTURE.
ETDT_ENABLEAEROWIZARDTAB = (ETDT_ENABLE | ETDT_USEAEROWIZARDTABTEXTURE),
/// ETDT_DISABLE | ETDT_ENABLE | ETDT_USETABTEXTURE | ETDT_USEAEROWIZARDTABTEXTURE.
ETDT_VALIDBITS = (ETDT_DISABLE | ETDT_ENABLE | ETDT_USETABTEXTURE | ETDT_USEAEROWIZARDTABTEXTURE),
}
[Flags]
public enum WTNCA
{
/// Prevents the window caption from being drawn.
WTNCA_NODRAWCAPTION = 0x00000001,
/// Prevents the system icon from being drawn.
WTNCA_NODRAWICON = 0x00000002,
/// Prevents the system icon menu from appearing.
WTNCA_NOSYSMENU = 0x00000004,
/// Prevents mirroring of the question mark, even in right-to-left (RTL) layout.
WTNCA_NOMIRRORHELP = 0x00000008
}
public struct WTA_OPTIONS
{
public WTNCA Flags;
public uint Mask;
}
}