diff options
author | patthoyts <patthoyts@noemail.net> | 2007-02-02 10:58:34 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2007-02-02 10:58:34 (GMT) |
commit | f194489cf9326aef98826bc2f71b82c947275852 (patch) | |
tree | 7705abf240a4d15b4d307090341d86603a26f1b6 | |
parent | 0e865e8c73b4b3130eb6faede2ff8ded523a7d32 (diff) | |
download | tk-f194489cf9326aef98826bc2f71b82c947275852.zip tk-f194489cf9326aef98826bc2f71b82c947275852.tar.gz tk-f194489cf9326aef98826bc2f71b82c947275852.tar.bz2 |
Support IsAppThemed() call. This is what is used when theming is
turned off just for an individual application.
FossilOrigin-Name: 2753e9f1b9475efec76e7286276069e0b2fe2e98
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win/ttkWinXPTheme.c | 11 |
2 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2007-02-02 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/ttkWinXPTheme.c: Support IsAppThemed() call. This is what + is used when theming is turned off just for an individual application. + 2007-01-28 Daniel Steffen <das@users.sourceforge.net> * macosx/Wish.xcodeproj/project.pbxproj: extract build settings that diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 9df6d2f..5dbf553 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -1,5 +1,5 @@ /* - * $Id: ttkWinXPTheme.c,v 1.6 2007/01/11 19:59:26 jenglish Exp $ + * $Id: ttkWinXPTheme.c,v 1.7 2007/02/02 10:58:35 patthoyts Exp $ * * Tk theme engine which uses the Windows XP "Visual Styles" API * Adapted from Georgios Petasis' XP theme patch. @@ -51,6 +51,7 @@ typedef HRESULT (STDAPICALLTYPE DrawThemeTextProc)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect); typedef BOOL (STDAPICALLTYPE IsThemeActiveProc)(VOID); +typedef BOOL (STDAPICALLTYPE IsAppThemedProc)(VOID); typedef struct { @@ -60,7 +61,8 @@ typedef struct DrawThemeBackgroundProc *DrawThemeBackground; DrawThemeTextProc *DrawThemeText; GetThemeTextExtentProc *GetThemeTextExtent; - IsThemeActiveProc *IsThemeActive; + IsThemeActiveProc *IsThemeActive; + IsAppThemedProc *IsAppThemed; HWND stubWindow; } XPThemeProcs; @@ -124,6 +126,7 @@ LoadXPThemeProcs(HINSTANCE *phlib) && LOADPROC(GetThemeTextExtent) && LOADPROC(DrawThemeText) && LOADPROC(IsThemeActive) + && LOADPROC(IsAppThemed) ) { return procs; @@ -153,7 +156,9 @@ static int XPThemeEnabled(Ttk_Theme theme, void *clientData) { XPThemeData *themeData = clientData; - return themeData->procs->IsThemeActive(); + int active = themeData->procs->IsThemeActive(); + int themed = themeData->procs->IsAppThemed(); + return (active && themed); } /* |