theme.h

Go to the documentation of this file.
00001 
00007 /*
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with this library; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022     Copyright (C) 2005 Robin McNeill
00023 */
00024 
00025 #ifndef OMGUI_WIN32_THEME_H
00026 #define OMGUI_WIN32_THEME_H
00027 
00028 // we want windows xp features
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 // Winapi function pointer typedefs
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     } // win32
00069 } // omgui
00070 
00071 #endif // OMGUI_WIN32_THEME_H

doxygen SourceForge.net Logo