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
2bb581b9
Commit
2bb581b9
authored
Jul 02, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Partial implementation of DrawThemeTextEx.
parent
d86f2af3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
10 deletions
+76
-10
draw.c
dlls/uxtheme/draw.c
+35
-10
uxtheme.spec
dlls/uxtheme/uxtheme.spec
+1
-0
uxtheme.h
include/uxtheme.h
+40
-0
No files found.
dlls/uxtheme/draw.c
View file @
2bb581b9
...
...
@@ -1633,8 +1633,29 @@ HRESULT WINAPI DrawThemeIcon(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
* DrawThemeText (UXTHEME.@)
*/
HRESULT
WINAPI
DrawThemeText
(
HTHEME
hTheme
,
HDC
hdc
,
int
iPartId
,
int
iStateId
,
LPCWSTR
pszText
,
int
iCharCount
,
DWORD
dwTextFlags
,
DWORD
dwTextFlags2
,
const
RECT
*
pRect
)
LPCWSTR
pszText
,
int
iCharCount
,
DWORD
flags
,
DWORD
flags2
,
const
RECT
*
pRect
)
{
DTTOPTS
opts
;
RECT
rt
;
TRACE
(
"%d %d
\n
"
,
iPartId
,
iStateId
);
CopyRect
(
&
rt
,
pRect
);
opts
.
dwSize
=
sizeof
(
opts
);
if
(
flags2
&
DTT_GRAYED
)
{
opts
.
dwFlags
=
DTT_TEXTCOLOR
;
opts
.
crText
=
GetSysColor
(
COLOR_GRAYTEXT
);
}
return
DrawThemeTextEx
(
hTheme
,
hdc
,
iPartId
,
iStateId
,
pszText
,
iCharCount
,
flags
,
&
rt
,
&
opts
);
}
/***********************************************************************
* DrawThemeTextEx (UXTHEME.@)
*/
HRESULT
WINAPI
DrawThemeTextEx
(
HTHEME
hTheme
,
HDC
hdc
,
int
iPartId
,
int
iStateId
,
LPCWSTR
pszText
,
int
iCharCount
,
DWORD
flags
,
RECT
*
rect
,
const
DTTOPTS
*
options
)
{
HRESULT
hr
;
HFONT
hFont
=
NULL
;
...
...
@@ -1643,11 +1664,15 @@ HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
COLORREF
textColor
;
COLORREF
oldTextColor
;
int
oldBkMode
;
RECT
rt
;
TRACE
(
"%d %d: stub
\n
"
,
iPartId
,
iStateId
);
TRACE
(
"%p %p %d %d %s:%d 0x%08x %p %p
\n
"
,
hTheme
,
hdc
,
iPartId
,
iStateId
,
debugstr_wn
(
pszText
,
iCharCount
),
iCharCount
,
flags
,
rect
,
options
);
if
(
!
hTheme
)
return
E_HANDLE
;
if
(
options
->
dwFlags
&
~
DTT_TEXTCOLOR
)
FIXME
(
"unsupported flags 0x%08x
\n
"
,
options
->
dwFlags
);
hr
=
GetThemeFont
(
hTheme
,
hdc
,
iPartId
,
iStateId
,
TMT_FONT
,
&
logfont
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -1655,19 +1680,19 @@ HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
if
(
!
hFont
)
TRACE
(
"Failed to create font
\n
"
);
}
CopyRect
(
&
rt
,
pRect
);
if
(
hFont
)
oldFont
=
SelectObject
(
hdc
,
hFont
);
if
(
dwTextFlags2
&
DTT_GRAYED
)
textColor
=
GetSysColor
(
COLOR_GRAYTEXT
)
;
if
(
options
->
dwFlags
&
DTT_TEXTCOLOR
)
textColor
=
options
->
crText
;
else
{
if
(
FAILED
(
GetThemeColor
(
hTheme
,
iPartId
,
iStateId
,
TMT_TEXTCOLOR
,
&
textColor
)))
textColor
=
GetTextColor
(
hdc
);
}
oldTextColor
=
SetTextColor
(
hdc
,
textColor
);
oldBkMode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
DrawTextW
(
hdc
,
pszText
,
iCharCount
,
&
rt
,
dwTextF
lags
);
DrawTextW
(
hdc
,
pszText
,
iCharCount
,
rect
,
f
lags
);
SetBkMode
(
hdc
,
oldBkMode
);
SetTextColor
(
hdc
,
oldTextColor
);
...
...
dlls/uxtheme/uxtheme.spec
View file @
2bb581b9
...
...
@@ -58,6 +58,7 @@
@ stdcall DrawThemeIcon(ptr ptr long long ptr ptr long)
@ stdcall DrawThemeParentBackground(ptr ptr ptr)
@ stdcall DrawThemeText(ptr ptr long long wstr long long long ptr)
@ stdcall DrawThemeTextEx(ptr ptr long long wstr long long ptr ptr)
@ stdcall EnableThemeDialogTexture(ptr long)
@ stdcall EnableTheming(long)
@ stdcall EndBufferedAnimation(ptr long)
...
...
include/uxtheme.h
View file @
2bb581b9
...
...
@@ -53,6 +53,46 @@ HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
HRESULT
WINAPI
DrawThemeText
(
HTHEME
,
HDC
,
int
,
int
,
LPCWSTR
,
int
,
DWORD
,
DWORD
,
const
RECT
*
);
/* DTTOPTS.dwFlags bits */
#define DTT_TEXTCOLOR 0x00000001
#define DTT_BORDERCOLOR 0x00000002
#define DTT_SHADOWCOLOR 0x00000004
#define DTT_SHADOWTYPE 0x00000008
#define DTT_SHADOWOFFSET 0x00000010
#define DTT_BORDERSIZE 0x00000020
#define DTT_FONTPROP 0x00000040
#define DTT_COLORPROP 0x00000080
#define DTT_STATEID 0x00000100
#define DTT_CALCRECT 0x00000200
#define DTT_APPLYOVERLAY 0x00000400
#define DTT_GLOWSIZE 0x00000800
#define DTT_CALLBACK 0x00001000
#define DTT_COMPOSITED 0x00002000
#define DTT_VALIDBITS 0x00003fff
typedef
int
(
WINAPI
*
DTT_CALLBACK_PROC
)(
HDC
,
LPWSTR
,
int
,
RECT
*
,
UINT
,
LPARAM
);
typedef
struct
_DTTOPTS
{
DWORD
dwSize
;
DWORD
dwFlags
;
COLORREF
crText
;
COLORREF
crBorder
;
COLORREF
crShadow
;
int
iTextShadowType
;
POINT
ptShadowOffset
;
int
iBorderSize
;
int
iFontPropId
;
int
iColorPropId
;
int
iStateId
;
BOOL
fApplyOverlay
;
int
iGlowSize
;
DTT_CALLBACK_PROC
pfnDrawTextCallback
;
LPARAM
lParam
;
}
DTTOPTS
,
*
PDTTOPTS
;
HRESULT
WINAPI
DrawThemeTextEx
(
HTHEME
,
HDC
,
int
,
int
,
LPCWSTR
,
int
,
DWORD
,
RECT
*
,
const
DTTOPTS
*
);
#define ETDT_DISABLE 0x00000001
#define ETDT_ENABLE 0x00000002
#define ETDT_USETABTEXTURE 0x00000004
...
...
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