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
c2c30013
Commit
c2c30013
authored
Mar 15, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Allow to query for IDWriteTextFormat1 from layout.
parent
bd3069c0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
layout.c
dlls/dwrite/layout.c
+0
-0
layout.c
dlls/dwrite/tests/layout.c
+25
-5
No files found.
dlls/dwrite/layout.c
View file @
c2c30013
This diff is collapsed.
Click to expand it.
dlls/dwrite/tests/layout.c
View file @
c2c30013
...
...
@@ -342,30 +342,50 @@ static void test_CreateTextLayout(void)
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
,
enusW
,
&
format
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
format
,
1
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
format
,
1000
.
0
,
1000
.
0
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
format
,
1
);
hr
=
IDWriteTextLayout_QueryInterface
(
layout
,
&
IID_IDWriteTextLayout2
,
(
void
**
)
&
layout2
);
if
(
hr
==
S_OK
)
{
IDWriteTextLayout1
*
layout1
;
IDWriteTextFormat1
*
format1
;
IDWriteTextFormat
*
format
;
hr
=
IDWriteTextLayout2_QueryInterface
(
layout2
,
&
IID_IDWriteTextLayout1
,
(
void
**
)
&
layout1
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteTextLayout1_Release
(
layout1
);
EXPECT_REF
(
layout2
,
2
);
hr
=
IDWriteTextLayout2_QueryInterface
(
layout2
,
&
IID_IDWriteTextFormat1
,
(
void
**
)
&
format1
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
EXPECT_REF
(
layout2
,
3
);
hr
=
IDWriteTextLayout2_QueryInterface
(
layout2
,
&
IID_IDWriteTextFormat
,
(
void
**
)
&
format
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
format
==
(
IDWriteTextFormat
*
)
format1
,
"got %p, %p
\n
"
,
format
,
format1
);
ok
(
format
!=
(
IDWriteTextFormat
*
)
layout2
,
"got %p, %p
\n
"
,
format
,
layout2
);
EXPECT_REF
(
layout2
,
4
);
hr
=
IDWriteTextFormat_QueryInterface
(
format
,
&
IID_IDWriteTextLayout1
,
(
void
**
)
&
layout1
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteTextLayout1_Release
(
layout1
);
IDWriteTextFormat1_Release
(
format1
);
IDWriteTextFormat_Release
(
format
);
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
);
EXPECT_REF
(
layout2
,
3
);
hr
=
IDWriteTextLayout_QueryInterface
(
layout
,
&
IID_IDWriteTextFormat
,
(
void
**
)
&
format
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
format
==
(
IDWriteTextFormat
*
)
format1
,
"got %p, %p
\n
"
,
format
,
format1
);
EXPECT_REF
(
layout2
,
4
);
IDWriteTextFormat1_Release
(
format1
);
IDWriteTextFormat_Release
(
format
);
IDWriteTextLayout2_Release
(
layout2
);
}
else
...
...
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