diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/wintheme.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Winamp/wintheme.h')
-rw-r--r-- | Src/Winamp/wintheme.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Src/Winamp/wintheme.h b/Src/Winamp/wintheme.h new file mode 100644 index 00000000..a399fd81 --- /dev/null +++ b/Src/Winamp/wintheme.h @@ -0,0 +1,59 @@ +#ifndef NULLOSFT_WINAMP_WINTHEME_HEADER +#define NULLOSFT_WINAMP_WINTHEME_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include <wtypes.h> + +#define E_LIBRARY_NOTLOADED MAKE_HRESULT(0, FACILITY_ITF, 0x0201) // library not loaded (you just need to call MlDwm_LoadLibrary) +#define E_LIBRARY_LOADFAILED MAKE_HRESULT(1, FACILITY_ITF, 0x0202) // library load failed (probably not vista?) +#define E_LIBRARY_BADFUNCTION MAKE_HRESULT(1, FACILITY_ITF, 0x0203) // function was not loaded + +// XP UxTheme +HRESULT UxTheme_LoadLibrary(void); +HRESULT UxTheme_GetLoadResult(void); + +HRESULT SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName, LPCWSTR pszSubIdList); +BOOL IsAppThemed(void); + +// Vista DWM + +HRESULT Dwm_LoadLibrary(void); +HRESULT Dwm_GetLoadResult(void); + +#ifndef WM_DWMCOMPOSITIONCHANGED +#define WM_DWMCOMPOSITIONCHANGED 0x031E +#define WM_DWMNCRENDERINGCHANGED 0x031F +#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320 +#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321 +#endif // !WM_DWMCOMPOSITIONCHANGED + +typedef enum _DWMWINDOWATTRIBUTE { + DWMWA_NCRENDERING_ENABLED = 1, + DWMWA_NCRENDERING_POLICY, + DWMWA_TRANSITIONS_FORCEDISABLED, + DWMWA_ALLOW_NCPAINT, + DWMWA_CAPTION_BUTTON_BOUNDS, + DWMWA_NONCLIENT_RTL_LAYOUT, + DWMWA_FORCE_ICONIC_REPRESENTATION, + DWMWA_FLIP3D_POLICY, + DWMWA_EXTENDED_FRAME_BOUNDS, + DWMWA_HAS_ICONIC_BITMAP, // [set] Indicates an available bitmap when there is no better thumbnail representation. + DWMWA_DISALLOW_PEEK, // [set] Don't invoke Peek on the window. + DWMWA_EXCLUDED_FROM_PEEK, + DWMWA_LAST +} DWMWINDOWATTRIBUTE; + +typedef enum _DWMNCRENDERINGPOLICY { + DWMNCRP_USEWINDOWSTYLE, + DWMNCRP_DISABLED, + DWMNCRP_ENABLED, + DWMNCRP_LAST +} DWMNCRENDERINGPOLICY; + +HRESULT DwmSetWindowAttribute(HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute); +HRESULT DwmIsCompositionEnabled(BOOL *pfEnabled); + +#endif //NULLOSFT_WINAMP_WINTHEME_HEADER
\ No newline at end of file |