-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathVisualEffects.cs
45 lines (40 loc) · 1.33 KB
/
VisualEffects.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Runtime.InteropServices;
namespace VirtualSpace.Helpers
{
public static class VisualEffects
{
public enum AccentState
{
ACCENT_DISABLED = 0,
ACCENT_ENABLE_GRADIENT = 1,
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
ACCENT_ENABLE_BLURBEHIND = 3,
ACCENT_ENABLE_ACRYLICBLURBEHIND = 4,
ACCENT_INVALID_STATE = 5
}
public enum WindowCompositionAttribute
{
// ...
WCA_ACCENT_POLICY = 19
// ...
}
[DllImport( "user32.dll" )]
public static extern int SetWindowCompositionAttribute( IntPtr hWnd, ref WindowCompositionAttributeData data );
[StructLayout( LayoutKind.Sequential )]
public struct AccentPolicy
{
public AccentState AccentState;
public uint AccentFlags;
public uint GradientColor;
public uint AnimationId;
}
[StructLayout( LayoutKind.Sequential )]
public struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}
}
}