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
533a999a
Commit
533a999a
authored
Feb 16, 2004
by
Kevin Koltzau
Committed by
Alexandre Julliard
Feb 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement DrawThemeBackgroundEx, DrawThemeText, GetThemeTextExtent.
parent
d496eb08
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
4 deletions
+92
-4
Makefile.in
dlls/uxtheme/Makefile.in
+1
-0
draw.c
dlls/uxtheme/draw.c
+0
-0
msstyles.c
dlls/uxtheme/msstyles.c
+14
-0
msstyles.h
dlls/uxtheme/msstyles.h
+1
-0
property.c
dlls/uxtheme/property.c
+76
-4
No files found.
dlls/uxtheme/Makefile.in
View file @
533a999a
...
...
@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
uxtheme.dll
IMPORTS
=
shlwapi user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS
=
msimg32
EXTRALIBS
=
$(LIBUNICODE)
C_SRCS
=
\
...
...
dlls/uxtheme/draw.c
View file @
533a999a
This diff is collapsed.
Click to expand it.
dlls/uxtheme/msstyles.c
View file @
533a999a
...
...
@@ -765,3 +765,17 @@ PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId
return
tp
;
return
NULL
;
}
HBITMAP
MSSTYLES_LoadBitmap
(
HDC
hdc
,
PTHEME_CLASS
tc
,
LPCWSTR
lpFilename
)
{
WCHAR
szFile
[
MAX_PATH
];
LPWSTR
tmp
;
lstrcpynW
(
szFile
,
lpFilename
,
sizeof
(
szFile
)
/
sizeof
(
szFile
[
0
]));
tmp
=
szFile
;
do
{
if
(
*
tmp
==
'\\'
)
*
tmp
=
'_'
;
if
(
*
tmp
==
'/'
)
*
tmp
=
'_'
;
if
(
*
tmp
==
'.'
)
*
tmp
=
'_'
;
}
while
(
*
tmp
++
);
return
LoadImageW
(
tc
->
hTheme
,
szFile
,
IMAGE_BITMAP
,
0
,
0
,
LR_SHARED
|
LR_CREATEDIBSECTION
);
}
dlls/uxtheme/msstyles.h
View file @
533a999a
...
...
@@ -82,6 +82,7 @@ PUXINI_FILE MSSTYLES_GetThemeIni(PTHEME_FILE tf);
PTHEME_PARTSTATE
MSSTYLES_FindPartState
(
PTHEME_CLASS
tc
,
int
iPartId
,
int
iStateId
,
PTHEME_CLASS
*
tcNext
);
PTHEME_CLASS
MSSTYLES_FindClass
(
PTHEME_FILE
tf
,
LPCWSTR
pszAppName
,
LPCWSTR
pszClassName
);
PTHEME_PROPERTY
MSSTYLES_FindProperty
(
PTHEME_CLASS
tc
,
int
iPartId
,
int
iStateId
,
int
iPropertyPrimitive
,
int
iPropertyId
);
HBITMAP
MSSTYLES_LoadBitmap
(
HDC
hdc
,
PTHEME_CLASS
tc
,
LPCWSTR
lpFilename
);
PUXINI_FILE
UXINI_LoadINI
(
HMODULE
hTheme
,
LPCWSTR
lpName
);
void
UXINI_CloseINI
(
PUXINI_FILE
uf
);
...
...
dlls/uxtheme/property.c
View file @
533a999a
...
...
@@ -60,6 +60,26 @@ BOOL UXTHEME_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
return
TRUE
;
}
BOOL
UXTHEME_GetNextToken
(
LPCWSTR
lpStringStart
,
LPCWSTR
lpStringEnd
,
LPCWSTR
*
lpValEnd
,
LPWSTR
lpBuff
,
DWORD
buffSize
)
{
LPCWSTR
cur
=
lpStringStart
;
LPCWSTR
start
;
LPCWSTR
end
;
while
(
cur
<
lpStringEnd
&&
(
isspace
(
*
cur
)
||
*
cur
==
','
))
cur
++
;
if
(
cur
>=
lpStringEnd
)
{
return
FALSE
;
}
start
=
cur
;
while
(
cur
<
lpStringEnd
&&
*
cur
!=
','
)
cur
++
;
end
=
cur
;
while
(
isspace
(
*
end
))
end
--
;
lstrcpynW
(
lpBuff
,
start
,
min
(
buffSize
,
end
-
start
+
1
));
if
(
lpValEnd
)
*
lpValEnd
=
cur
;
return
TRUE
;
}
/***********************************************************************
* GetThemeBool (UXTHEME.@)
*/
...
...
@@ -156,10 +176,46 @@ HRESULT WINAPI GetThemeFilename(HTHEME hTheme, int iPartId, int iStateId,
HRESULT
WINAPI
GetThemeFont
(
HTHEME
hTheme
,
HDC
hdc
,
int
iPartId
,
int
iStateId
,
int
iPropId
,
LOGFONTW
*
pFont
)
{
FIXME
(
"%d %d %d: stub
\n
"
,
iPartId
,
iStateId
,
iPropId
);
LPCWSTR
lpCur
;
LPCWSTR
lpEnd
;
PTHEME_PROPERTY
tp
;
int
pointSize
;
WCHAR
attr
[
32
];
const
WCHAR
szBold
[]
=
{
'b'
,
'o'
,
'l'
,
'd'
,
'\0'
};
const
WCHAR
szItalic
[]
=
{
'i'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
'\0'
};
const
WCHAR
szUnderline
[]
=
{
'u'
,
'n'
,
'd'
,
'e'
,
'r'
,
'l'
,
'i'
,
'n'
,
'e'
,
'\0'
};
const
WCHAR
szStrikeOut
[]
=
{
's'
,
't'
,
'r'
,
'i'
,
'k'
,
'e'
,
'o'
,
'u'
,
't'
,
'\0'
};
TRACE
(
"(%d, %d, %d)
\n
"
,
iPartId
,
iStateId
,
iPropId
);
if
(
!
hTheme
)
return
E_HANDLE
;
return
ERROR_CALL_NOT_IMPLEMENTED
;
if
(
!
(
tp
=
MSSTYLES_FindProperty
(
hTheme
,
iPartId
,
iStateId
,
TMT_FONT
,
iPropId
)))
return
E_PROP_ID_UNSUPPORTED
;
lpCur
=
tp
->
lpValue
;
lpEnd
=
tp
->
lpValue
+
tp
->
dwValueLen
;
ZeroMemory
(
pFont
,
sizeof
(
LOGFONTW
));
if
(
!
UXTHEME_GetNextToken
(
lpCur
,
lpEnd
,
&
lpCur
,
pFont
->
lfFaceName
,
LF_FACESIZE
))
{
TRACE
(
"Property is there, but failed to get face name
\n
"
);
return
E_PROP_ID_UNSUPPORTED
;
}
if
(
!
UXTHEME_GetNextInteger
(
lpCur
,
lpEnd
,
&
lpCur
,
&
pointSize
))
{
TRACE
(
"Property is there, but failed to get point size
\n
"
);
return
E_PROP_ID_UNSUPPORTED
;
}
pFont
->
lfHeight
=
-
MulDiv
(
pointSize
,
GetDeviceCaps
(
hdc
,
LOGPIXELSY
),
72
);
pFont
->
lfWeight
=
FW_REGULAR
;
pFont
->
lfCharSet
=
DEFAULT_CHARSET
;
while
(
UXTHEME_GetNextToken
(
lpCur
,
lpEnd
,
&
lpCur
,
attr
,
sizeof
(
attr
)
/
sizeof
(
attr
[
0
])))
{
if
(
!
lstrcmpiW
(
szBold
,
attr
))
pFont
->
lfWeight
=
FW_BOLD
;
else
if
(
!!
lstrcmpiW
(
szItalic
,
attr
))
pFont
->
lfItalic
=
TRUE
;
else
if
(
!!
lstrcmpiW
(
szUnderline
,
attr
))
pFont
->
lfUnderline
=
TRUE
;
else
if
(
!!
lstrcmpiW
(
szStrikeOut
,
attr
))
pFont
->
lfStrikeOut
=
TRUE
;
}
return
S_OK
;
}
/***********************************************************************
...
...
@@ -189,10 +245,26 @@ HRESULT WINAPI GetThemeInt(HTHEME hTheme, int iPartId, int iStateId,
HRESULT
WINAPI
GetThemeIntList
(
HTHEME
hTheme
,
int
iPartId
,
int
iStateId
,
int
iPropId
,
INTLIST
*
pIntList
)
{
FIXME
(
"%d %d %d: stub
\n
"
,
iPartId
,
iStateId
,
iPropId
);
LPCWSTR
lpCur
;
LPCWSTR
lpEnd
;
int
i
;
PTHEME_PROPERTY
tp
;
TRACE
(
"(%d, %d, %d)
\n
"
,
iPartId
,
iStateId
,
iPropId
);
if
(
!
hTheme
)
return
E_HANDLE
;
return
ERROR_CALL_NOT_IMPLEMENTED
;
if
(
!
(
tp
=
MSSTYLES_FindProperty
(
hTheme
,
iPartId
,
iStateId
,
TMT_INTLIST
,
iPropId
)))
return
E_PROP_ID_UNSUPPORTED
;
lpCur
=
tp
->
lpValue
;
lpEnd
=
tp
->
lpValue
+
tp
->
dwValueLen
;
for
(
i
=
0
;
i
<
MAX_INTLIST_COUNT
;
i
++
)
{
if
(
!
UXTHEME_GetNextInteger
(
lpCur
,
lpEnd
,
&
lpCur
,
&
pIntList
->
iValues
[
i
]))
break
;
}
pIntList
->
iValueCount
=
i
;
return
S_OK
;
}
/***********************************************************************
...
...
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