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
49c8e98f
Commit
49c8e98f
authored
Nov 07, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Respond to IID_IDWriteTextLayout1 too.
parent
a714f0fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
layout.c
dlls/dwrite/layout.c
+1
-0
layout.c
dlls/dwrite/tests/layout.c
+39
-1
No files found.
dlls/dwrite/layout.c
View file @
49c8e98f
...
...
@@ -525,6 +525,7 @@ static HRESULT WINAPI dwritetextlayout_QueryInterface(IDWriteTextLayout2 *iface,
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IDWriteTextLayout2
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteTextLayout1
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteTextLayout
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteTextFormat
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
...
...
dlls/dwrite/tests/layout.c
View file @
49c8e98f
/*
* Text layout/format tests
*
* Copyright 2012 Nikolay Sivov for CodeWeavers
* Copyright 2012
, 2014
Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -309,7 +309,9 @@ static IDWriteTextRenderer testrenderer = { &testrenderervtbl };
static
void
test_CreateTextLayout
(
void
)
{
static
const
WCHAR
strW
[]
=
{
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
IDWriteTextLayout2
*
layout2
;
IDWriteTextLayout
*
layout
;
IDWriteTextFormat
*
format
;
HRESULT
hr
;
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
NULL
,
0
,
NULL
,
0
.
0
,
0
.
0
,
&
layout
);
...
...
@@ -326,6 +328,42 @@ static void test_CreateTextLayout(void)
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
NULL
,
1000
.
0
,
1000
.
0
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextFormat
(
factory
,
tahomaW
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
,
enusW
,
&
format
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
format
,
1000
.
0
,
1000
.
0
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextLayout_QueryInterface
(
layout
,
&
IID_IDWriteTextLayout2
,
(
void
**
)
&
layout2
);
if
(
hr
==
S_OK
)
{
IDWriteTextLayout1
*
layout1
;
IDWriteTextFormat1
*
format1
;
hr
=
IDWriteTextLayout2_QueryInterface
(
layout2
,
&
IID_IDWriteTextLayout1
,
(
void
**
)
&
layout1
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteTextLayout1_Release
(
layout1
);
hr
=
IDWriteTextLayout2_QueryInterface
(
layout2
,
&
IID_IDWriteTextFormat1
,
(
void
**
)
&
format1
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IDWriteTextFormat1_Release
(
format1
);
hr
=
IDWriteTextLayout_QueryInterface
(
layout
,
&
IID_IDWriteTextFormat1
,
(
void
**
)
&
format1
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IDWriteTextFormat1_Release
(
format1
);
IDWriteTextLayout2_Release
(
layout2
);
}
else
win_skip
(
"IDWriteTextLayout2 is not supported.
\n
"
);
IDWriteTextLayout_Release
(
layout
);
IDWriteTextFormat_Release
(
format
);
}
static
void
test_CreateGdiCompatibleTextLayout
(
void
)
...
...
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