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
c8ec6918
Commit
c8ec6918
authored
Aug 15, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement layout getters derived from text format.
parent
baedef72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
29 deletions
+47
-29
layout.c
dlls/dwrite/layout.c
+47
-27
layout.c
dlls/dwrite/tests/layout.c
+0
-2
No files found.
dlls/dwrite/layout.c
View file @
c8ec6918
...
...
@@ -560,36 +560,36 @@ static HRESULT WINAPI dwritetextlayout_SetLineSpacing(IDWriteTextLayout *iface,
static
DWRITE_TEXT_ALIGNMENT
WINAPI
dwritetextlayout_GetTextAlignment
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_TEXT_ALIGNMENT_LEADING
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
textalignment
;
}
static
DWRITE_PARAGRAPH_ALIGNMENT
WINAPI
dwritetextlayout_GetParagraphAlignment
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_PARAGRAPH_ALIGNMENT_NEAR
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
paralign
;
}
static
DWRITE_WORD_WRAPPING
WINAPI
dwritetextlayout_GetWordWrapping
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_WORD_WRAPPING_NO_WRAP
;
return
This
->
format
.
wrapping
;
}
static
DWRITE_READING_DIRECTION
WINAPI
dwritetextlayout_GetReadingDirection
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_READING_DIRECTION_LEFT_TO_RIGHT
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
readingdir
;
}
static
DWRITE_FLOW_DIRECTION
WINAPI
dwritetextlayout_GetFlowDirection
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
flow
;
}
static
FLOAT
WINAPI
dwritetextlayout_GetIncrementalTabStop
(
IDWriteTextLayout
*
iface
)
...
...
@@ -603,65 +603,85 @@ static HRESULT WINAPI dwritetextlayout_GetTrimming(IDWriteTextLayout *iface, DWR
IDWriteInlineObject
**
trimming_sign
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p)->(%p %p): stub
\n
"
,
This
,
options
,
trimming_sign
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
options
,
trimming_sign
);
*
options
=
This
->
format
.
trimming
;
*
trimming_sign
=
This
->
format
.
trimmingsign
;
if
(
*
trimming_sign
)
IDWriteInlineObject_AddRef
(
*
trimming_sign
);
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextlayout_GetLineSpacing
(
IDWriteTextLayout
*
iface
,
DWRITE_LINE_SPACING_METHOD
*
method
,
FLOAT
*
spacing
,
FLOAT
*
baseline
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p)->(%p %p %p): stub
\n
"
,
This
,
method
,
spacing
,
baseline
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p %p %p)
\n
"
,
This
,
method
,
spacing
,
baseline
);
*
method
=
This
->
format
.
spacingmethod
;
*
spacing
=
This
->
format
.
spacing
;
*
baseline
=
This
->
format
.
baseline
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextlayout_GetFontCollection
(
IDWriteTextLayout
*
iface
,
IDWriteFontCollection
**
collection
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
collection
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
collection
);
*
collection
=
This
->
format
.
collection
;
if
(
*
collection
)
IDWriteFontCollection_AddRef
(
*
collection
);
return
S_OK
;
}
static
UINT32
WINAPI
dwritetextlayout_GetFontFamilyNameLength
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
0
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
family_len
;
}
static
HRESULT
WINAPI
dwritetextlayout_GetFontFamilyName
(
IDWriteTextLayout
*
iface
,
WCHAR
*
name
,
UINT32
size
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p)->(%p %u): stub
\n
"
,
This
,
name
,
size
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p %u)
\n
"
,
This
,
name
,
size
);
if
(
size
<=
This
->
format
.
family_len
)
return
E_NOT_SUFFICIENT_BUFFER
;
strcpyW
(
name
,
This
->
format
.
family_name
);
return
S_OK
;
}
static
DWRITE_FONT_WEIGHT
WINAPI
dwritetextlayout_GetFontWeight
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_FONT_WEIGHT_NORMAL
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
weight
;
}
static
DWRITE_FONT_STYLE
WINAPI
dwritetextlayout_GetFontStyle
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_FONT_STYLE_NORMAL
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
style
;
}
static
DWRITE_FONT_STRETCH
WINAPI
dwritetextlayout_GetFontStretch
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_FONT_STRETCH_NORMAL
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
stretch
;
}
static
FLOAT
WINAPI
dwritetextlayout_GetFontSize
(
IDWriteTextLayout
*
iface
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
0
.
0
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
format
.
size
;
}
static
UINT32
WINAPI
dwritetextlayout_GetLocaleNameLength
(
IDWriteTextLayout
*
iface
)
...
...
dlls/dwrite/tests/layout.c
View file @
c8ec6918
...
...
@@ -558,7 +558,6 @@ static void test_fontweight(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
weight
=
IDWriteTextFormat_GetFontWeight
(
fmt2
);
todo_wine
ok
(
weight
==
DWRITE_FONT_WEIGHT_BOLD
,
"got %u
\n
"
,
weight
);
range
.
startPosition
=
0
;
...
...
@@ -568,7 +567,6 @@ todo_wine
/* IDWriteTextFormat methods output doesn't reflect layout changes */
weight
=
IDWriteTextFormat_GetFontWeight
(
fmt2
);
todo_wine
ok
(
weight
==
DWRITE_FONT_WEIGHT_BOLD
,
"got %u
\n
"
,
weight
);
range
.
length
=
0
;
...
...
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