00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef OMGUI_WIN32_THEME_H
00026 #define OMGUI_WIN32_THEME_H
00027
00028
00029 #define _WIN32_WINNT 0x501
00030
00031 #define NOMINMAX
00032 #include <windows.h>
00033 #include <uxtheme.h>
00034 #include <tmschema.h>
00035
00036 namespace omgui {
00037 namespace win32 {
00038
00039
00040 typedef HTHEME (__stdcall *OpenThemeDataPtr)(HWND hwnd, LPCWSTR pszClassList);
00041 typedef HRESULT (__stdcall *CloseThemeDataPtr)(HTHEME hTheme);
00042 typedef HRESULT (__stdcall *DrawThemeBackgroundPtr)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect);
00043 typedef BOOL (__stdcall *IsAppThemedPtr)();
00044 typedef HRESULT (__stdcall *EnableThemeDialogTexture)(HWND hwnd, DWORD dwFlags);
00045 typedef HRESULT (__stdcall *DrawThemeParentBackground)(HWND hwnd, HDC hdc, const RECT *prc);
00046 typedef HRESULT (__stdcall *GetThemeMargins)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins);
00047 typedef HRESULT (__stdcall *GetThemeBackgroundContentRect)(HTHEME hTheme, OPTIONAL HDC hdc, int iPartId, int iStateId, const RECT *pBoundingRect, OUT RECT *pContentRect);
00048
00049 extern OpenThemeDataPtr open_theme_data;
00050 extern CloseThemeDataPtr close_theme_data;
00051 extern DrawThemeBackgroundPtr draw_theme_background;
00052 extern IsAppThemedPtr is_app_themed;
00053 extern EnableThemeDialogTexture enable_theme_dialog_texture;
00054 extern DrawThemeParentBackground draw_theme_parent_background;
00055 extern GetThemeMargins get_theme_margins;
00056 extern GetThemeBackgroundContentRect get_theme_background_content_rect;
00057
00061 void initialize();
00062
00066 bool theme_support();
00067
00068 }
00069 }
00070
00071 #endif // OMGUI_WIN32_THEME_H