Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
28022e80
Commit
28022e80
authored
Aug 30, 2005
by
Frank Richter
Committed by
Alexandre Julliard
Aug 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EnumThemeColors() and EnumThemeSizes() actually do not return a single
string with the color/size name, but rather a struct containing three strings - name, display name and tooltip.
parent
9a88d25b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
14 deletions
+37
-14
system.c
dlls/uxtheme/system.c
+24
-10
uxtheme.spec
dlls/uxtheme/uxtheme.spec
+2
-2
uxthemedll.h
dlls/uxtheme/uxthemedll.h
+11
-2
No files found.
dlls/uxtheme/system.c
View file @
28022e80
...
...
@@ -898,7 +898,7 @@ HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, EnumThemeProc callback,
* pszSizeName Theme size to enumerate available colors
* If NULL the default theme size is used
* dwColorNum Color index to retrieve, increment from 0
* pszColorName
Output color name
* pszColorName
s Output color names
*
* RETURNS
* S_OK on success
...
...
@@ -906,19 +906,20 @@ HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, EnumThemeProc callback,
* or when pszSizeName does not refer to a valid size
*
* NOTES
* XP fails with E_POINTER when pszColorName
points to a buffer smaller then 605
*
characters
* XP fails with E_POINTER when pszColorName
s points to a buffer smaller than
*
sizeof(THEMENAMES).
*
* Not very efficient that I'm opening & validating the theme every call, but
* this is undocumented and almost never called..
* (and this is how windows works too)
*/
HRESULT
WINAPI
EnumThemeColors
(
LPWSTR
pszThemeFileName
,
LPWSTR
pszSizeName
,
DWORD
dwColorNum
,
LPWSTR
pszColorName
)
DWORD
dwColorNum
,
PTHEMENAMES
pszColorNames
)
{
PTHEME_FILE
pt
;
HRESULT
hr
;
LPWSTR
tmp
;
UINT
resourceId
=
dwColorNum
+
1000
;
TRACE
(
"(%s,%s,%ld)
\n
"
,
debugstr_w
(
pszThemeFileName
),
debugstr_w
(
pszSizeName
),
dwColorNum
);
...
...
@@ -932,7 +933,13 @@ HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName,
}
if
(
!
dwColorNum
&&
*
tmp
)
{
TRACE
(
"%s
\n
"
,
debugstr_w
(
tmp
));
lstrcpyW
(
pszColorName
,
tmp
);
lstrcpyW
(
pszColorNames
->
szName
,
tmp
);
LoadStringW
(
pt
->
hTheme
,
resourceId
,
pszColorNames
->
szDisplayName
,
sizeof
(
pszColorNames
->
szDisplayName
)
/
sizeof
(
WCHAR
));
LoadStringW
(
pt
->
hTheme
,
resourceId
+
1000
,
pszColorNames
->
szTooltip
,
sizeof
(
pszColorNames
->
szTooltip
)
/
sizeof
(
WCHAR
));
}
else
hr
=
E_PROP_ID_UNSUPPORTED
;
...
...
@@ -951,7 +958,7 @@ HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName,
* pszColorName Theme color to enumerate available sizes
* If NULL the default theme color is used
* dwSizeNum Size index to retrieve, increment from 0
* pszSizeName
Output size name
* pszSizeName
s Output size names
*
* RETURNS
* S_OK on success
...
...
@@ -959,19 +966,20 @@ HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName,
* or when pszColorName does not refer to a valid color
*
* NOTES
* XP fails with E_POINTER when pszSizeName
points to a buffer smaller then 605
*
characters
* XP fails with E_POINTER when pszSizeName
s points to a buffer smaller than
*
sizeof(THEMENAMES).
*
* Not very efficient that I'm opening & validating the theme every call, but
* this is undocumented and almost never called..
* (and this is how windows works too)
*/
HRESULT
WINAPI
EnumThemeSizes
(
LPWSTR
pszThemeFileName
,
LPWSTR
pszColorName
,
DWORD
dwSizeNum
,
LPWSTR
pszSizeName
)
DWORD
dwSizeNum
,
PTHEMENAMES
pszSizeNames
)
{
PTHEME_FILE
pt
;
HRESULT
hr
;
LPWSTR
tmp
;
UINT
resourceId
=
dwSizeNum
+
3000
;
TRACE
(
"(%s,%s,%ld)
\n
"
,
debugstr_w
(
pszThemeFileName
),
debugstr_w
(
pszColorName
),
dwSizeNum
);
...
...
@@ -985,7 +993,13 @@ HRESULT WINAPI EnumThemeSizes(LPWSTR pszThemeFileName, LPWSTR pszColorName,
}
if
(
!
dwSizeNum
&&
*
tmp
)
{
TRACE
(
"%s
\n
"
,
debugstr_w
(
tmp
));
lstrcpyW
(
pszSizeName
,
tmp
);
lstrcpyW
(
pszSizeNames
->
szName
,
tmp
);
LoadStringW
(
pt
->
hTheme
,
resourceId
,
pszSizeNames
->
szDisplayName
,
sizeof
(
pszSizeNames
->
szDisplayName
)
/
sizeof
(
WCHAR
));
LoadStringW
(
pt
->
hTheme
,
resourceId
+
1000
,
pszSizeNames
->
szTooltip
,
sizeof
(
pszSizeNames
->
szTooltip
)
/
sizeof
(
WCHAR
));
}
else
hr
=
E_PROP_ID_UNSUPPORTED
;
...
...
dlls/uxtheme/uxtheme.spec
View file @
28022e80
...
...
@@ -5,8 +5,8 @@
4 stdcall -noname ApplyTheme(ptr ptr ptr)
7 stdcall -noname GetThemeDefaults(wstr wstr long wstr long)
8 stdcall -noname EnumThemes(wstr ptr ptr)
9 stdcall -noname EnumThemeColors(wstr wstr long
ws
tr)
10 stdcall -noname EnumThemeSizes(wstr wstr long
ws
tr)
9 stdcall -noname EnumThemeColors(wstr wstr long
p
tr)
10 stdcall -noname EnumThemeSizes(wstr wstr long
p
tr)
11 stdcall -noname ParseThemeIniFile(wstr wstr ptr ptr)
13 stub -noname DrawNCPreview
14 stub -noname RegisterDefaultTheme
...
...
dlls/uxtheme/uxthemedll.h
View file @
28022e80
...
...
@@ -66,6 +66,15 @@ typedef BOOL (CALLBACK*ParseThemeIniFileProc)(DWORD dwType, LPWSTR pszParam1,
LPWSTR
pszParam2
,
LPWSTR
pszParam3
,
DWORD
dwParam
,
LPVOID
lpData
);
/* Structure filled in by EnumThemeColors() and EnumeThemeSizes() with the
* various strings for a theme color or size. */
typedef
struct
tagTHEMENAMES
{
WCHAR
szName
[
MAX_PATH
+
1
];
WCHAR
szDisplayName
[
MAX_PATH
+
1
];
WCHAR
szTooltip
[
MAX_PATH
+
1
];
}
THEMENAMES
,
*
PTHEMENAMES
;
/* Declarations for undocumented functions for use internally */
DWORD
WINAPI
QueryThemeServices
(
void
);
HRESULT
WINAPI
OpenThemeFile
(
LPCWSTR
pszThemeFileName
,
LPCWSTR
pszColorName
,
...
...
@@ -79,9 +88,9 @@ HRESULT WINAPI GetThemeDefaults(LPCWSTR pszThemeFileName, LPWSTR pszColorName,
HRESULT
WINAPI
EnumThemes
(
LPCWSTR
pszThemePath
,
EnumThemeProc
callback
,
LPVOID
lpData
);
HRESULT
WINAPI
EnumThemeColors
(
LPWSTR
pszThemeFileName
,
LPWSTR
pszSizeName
,
DWORD
dwColorNum
,
LPWSTR
pszColorName
);
DWORD
dwColorNum
,
PTHEMENAMES
pszColorNames
);
HRESULT
WINAPI
EnumThemeSizes
(
LPWSTR
pszThemeFileName
,
LPWSTR
pszColorName
,
DWORD
dwSizeNum
,
LPWSTR
pszSizeName
);
DWORD
dwSizeNum
,
PTHEMENAMES
pszColorNames
);
HRESULT
WINAPI
ParseThemeIniFile
(
LPCWSTR
pszIniFileName
,
LPWSTR
pszUnknown
,
ParseThemeIniFileProc
callback
,
LPVOID
lpData
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment