From 6b3ded37e4a4825be2df3612bdcbb7dfc00a1800 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 4 Mar 2014 20:41:13 +0000 Subject: HistoryStats sources git-svn-id: http://svn.miranda-ng.org/main/trunk@8397 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/!NotAdopted/HistoryStats/themeapi.h | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plugins/!NotAdopted/HistoryStats/themeapi.h (limited to 'plugins/!NotAdopted/HistoryStats/themeapi.h') diff --git a/plugins/!NotAdopted/HistoryStats/themeapi.h b/plugins/!NotAdopted/HistoryStats/themeapi.h new file mode 100644 index 0000000000..fe3444a604 --- /dev/null +++ b/plugins/!NotAdopted/HistoryStats/themeapi.h @@ -0,0 +1,50 @@ +#if !defined(HISTORYSTATS_GUARD_THEMEAPI_H) +#define HISTORYSTATS_GUARD_THEMEAPI_H + +#include "_globals.h" +#include "_consts.h" + +#include +#include + +#define HISTORYSTATS_THEMEAPI_MINIMAL + +class ThemeAPI + : private pattern::NotInstantiable +{ +public: + typedef HRESULT (WINAPI *fnCloseThemeData )(HTHEME hTheme); + typedef HRESULT (WINAPI *fnDrawThemeBackground )(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect); + typedef BOOL (WINAPI *fnIsAppThemed )(VOID); + typedef BOOL (WINAPI *fnIsThemeActive )(VOID); + typedef HTHEME (WINAPI *fnOpenThemeData )(HWND hwnd, LPCWSTR pszClassList); +#if !defined(HISTORYSTATS_THEMEAPI_MINIMAL) + typedef HRESULT (WINAPI *fnDrawThemeIcon )(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex); + typedef HRESULT (WINAPI *fnEnableThemeDialogTexture)(HWND hwnd, DWORD dwFlags); + typedef HRESULT (WINAPI *fnGetThemePartSize )(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz); +#endif + +public: + static fnCloseThemeData CloseThemeData; + static fnDrawThemeBackground DrawThemeBackground; + static fnIsAppThemed IsAppThemed; + static fnIsThemeActive IsThemeActive; + static fnOpenThemeData OpenThemeData; +#if !defined(HISTORYSTATS_THEMEAPI_MINIMAL) + static fnDrawThemeIcon DrawThemeIcon; + static fnEnableThemeDialogTexture EnableThemeDialogTexture; + static fnGetThemePartSize GetThemePartSize; +#endif + +private: + static const mu_text* m_szThemesDll; + static HMODULE m_hThemesDll; + static bool m_bUseTheme; + +public: + static void init(); + static void uninit(); + static bool useTheme() { return m_bUseTheme && IsThemeActive() && IsAppThemed(); } +}; + +#endif // HISTORYSTATS_GUARD_THEMEAPI_H \ No newline at end of file -- cgit v1.2.3