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
f9e25741
Commit
f9e25741
authored
Apr 19, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Update to IDWriteGdiInterop1.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
897c1d03
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
32 deletions
+101
-32
dwrite_private.h
dlls/dwrite/dwrite_private.h
+2
-2
gdiinterop.c
dlls/dwrite/gdiinterop.c
+72
-28
main.c
dlls/dwrite/main.c
+2
-2
dwrite_3.idl
include/dwrite_3.idl
+25
-0
No files found.
dlls/dwrite/dwrite_private.h
View file @
f9e25741
...
...
@@ -120,8 +120,8 @@ extern HRESULT create_gdicompat_textlayout(IDWriteFactory3*,const WCHAR*,UINT32,
const
DWRITE_MATRIX
*
,
BOOL
,
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_trimmingsign
(
IDWriteFactory3
*
,
IDWriteTextFormat
*
,
IDWriteInlineObject
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_typography
(
IDWriteTypography
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteFactory3
*
,
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
void
release_gdiinterop
(
IDWriteGdiInterop
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteFactory3
*
,
IDWriteGdiInterop
1
**
)
DECLSPEC_HIDDEN
;
extern
void
release_gdiinterop
(
IDWriteGdiInterop
1
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localizedstrings
(
IDWriteLocalizedStrings
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
add_localizedstring
(
IDWriteLocalizedStrings
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
clone_localizedstring
(
IDWriteLocalizedStrings
*
iface
,
IDWriteLocalizedStrings
**
strings
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/gdiinterop.c
View file @
f9e25741
...
...
@@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dwrite
);
struct
gdiinterop
{
IDWriteGdiInterop
IDWriteGdiInterop
_iface
;
IDWriteGdiInterop
1
IDWriteGdiInterop1
_iface
;
IDWriteFactory3
*
factory
;
};
...
...
@@ -105,9 +105,9 @@ static inline struct rendertarget *impl_from_ID2D1SimplifiedGeometrySink(ID2D1Si
return
CONTAINING_RECORD
(
iface
,
struct
rendertarget
,
ID2D1SimplifiedGeometrySink_iface
);
}
static
inline
struct
gdiinterop
*
impl_from_IDWriteGdiInterop
(
IDWriteGdiInterop
*
iface
)
static
inline
struct
gdiinterop
*
impl_from_IDWriteGdiInterop
1
(
IDWriteGdiInterop1
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
gdiinterop
,
IDWriteGdiInterop_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
gdiinterop
,
IDWriteGdiInterop
1
_iface
);
}
static
HRESULT
WINAPI
rendertarget_sink_QueryInterface
(
ID2D1SimplifiedGeometrySink
*
iface
,
REFIID
riid
,
void
**
obj
)
...
...
@@ -583,17 +583,18 @@ static HRESULT create_rendertarget(IDWriteFactory *factory, HDC hdc, UINT32 widt
return
S_OK
;
}
static
HRESULT
WINAPI
gdiinterop_QueryInterface
(
IDWriteGdiInterop
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
gdiinterop_QueryInterface
(
IDWriteGdiInterop
1
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IDWriteGdiInterop
)
||
if
(
IsEqualIID
(
riid
,
&
IID_IDWriteGdiInterop1
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteGdiInterop
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IDWriteGdiInterop_AddRef
(
iface
);
IDWriteGdiInterop
1
_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -601,24 +602,24 @@ static HRESULT WINAPI gdiinterop_QueryInterface(IDWriteGdiInterop *iface, REFIID
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
gdiinterop_AddRef
(
IDWriteGdiInterop
*
iface
)
static
ULONG
WINAPI
gdiinterop_AddRef
(
IDWriteGdiInterop
1
*
iface
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDWriteFactory3_AddRef
(
This
->
factory
);
}
static
ULONG
WINAPI
gdiinterop_Release
(
IDWriteGdiInterop
*
iface
)
static
ULONG
WINAPI
gdiinterop_Release
(
IDWriteGdiInterop
1
*
iface
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDWriteFactory3_Release
(
This
->
factory
);
}
static
HRESULT
WINAPI
gdiinterop_CreateFontFromLOGFONT
(
IDWriteGdiInterop
*
iface
,
static
HRESULT
WINAPI
gdiinterop_CreateFontFromLOGFONT
(
IDWriteGdiInterop
1
*
iface
,
LOGFONTW
const
*
logfont
,
IDWriteFont
**
font
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
IDWriteFontCollection
*
collection
;
IDWriteFontFamily
*
family
;
DWRITE_FONT_STYLE
style
;
...
...
@@ -662,10 +663,10 @@ done:
return
hr
;
}
static
HRESULT
WINAPI
gdiinterop_ConvertFontToLOGFONT
(
IDWriteGdiInterop
*
iface
,
static
HRESULT
WINAPI
gdiinterop_ConvertFontToLOGFONT
(
IDWriteGdiInterop
1
*
iface
,
IDWriteFont
*
font
,
LOGFONTW
*
logfont
,
BOOL
*
is_systemfont
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
static
const
WCHAR
enusW
[]
=
{
'e'
,
'n'
,
'-'
,
'u'
,
's'
,
0
};
DWRITE_FONT_SIMULATIONS
simulations
;
IDWriteFontCollection
*
collection
;
...
...
@@ -718,11 +719,11 @@ static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface,
return
hr
;
}
static
HRESULT
WINAPI
gdiinterop_ConvertFontFaceToLOGFONT
(
IDWriteGdiInterop
*
iface
,
static
HRESULT
WINAPI
gdiinterop_ConvertFontFaceToLOGFONT
(
IDWriteGdiInterop
1
*
iface
,
IDWriteFontFace
*
fontface
,
LOGFONTW
*
logfont
)
{
static
const
WCHAR
enusW
[]
=
{
'e'
,
'n'
,
'-'
,
'u'
,
's'
,
0
};
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
IDWriteLocalizedStrings
*
familynames
;
DWRITE_FONT_SIMULATIONS
simulations
;
DWRITE_FONT_FACE_TYPE
face_type
;
...
...
@@ -803,10 +804,10 @@ struct font_fileinfo {
extern
BOOL
WINAPI
GetFontRealizationInfo
(
HDC
hdc
,
struct
font_realization_info
*
info
);
extern
BOOL
WINAPI
GetFontFileInfo
(
DWORD
instance_id
,
DWORD
unknown
,
struct
font_fileinfo
*
info
,
DWORD
size
,
DWORD
*
needed
);
static
HRESULT
WINAPI
gdiinterop_CreateFontFaceFromHdc
(
IDWriteGdiInterop
*
iface
,
static
HRESULT
WINAPI
gdiinterop_CreateFontFaceFromHdc
(
IDWriteGdiInterop
1
*
iface
,
HDC
hdc
,
IDWriteFontFace
**
fontface
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
struct
font_realization_info
info
;
struct
font_fileinfo
*
fileinfo
;
DWRITE_FONT_FILE_TYPE
filetype
;
...
...
@@ -867,15 +868,54 @@ static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop *iface,
return
hr
;
}
static
HRESULT
WINAPI
gdiinterop_CreateBitmapRenderTarget
(
IDWriteGdiInterop
*
iface
,
static
HRESULT
WINAPI
gdiinterop_CreateBitmapRenderTarget
(
IDWriteGdiInterop
1
*
iface
,
HDC
hdc
,
UINT32
width
,
UINT32
height
,
IDWriteBitmapRenderTarget
**
target
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
1
(
iface
);
TRACE
(
"(%p)->(%p %u %u %p)
\n
"
,
This
,
hdc
,
width
,
height
,
target
);
return
create_rendertarget
((
IDWriteFactory
*
)
This
->
factory
,
hdc
,
width
,
height
,
target
);
}
static
const
struct
IDWriteGdiInteropVtbl
gdiinteropvtbl
=
{
static
HRESULT
WINAPI
gdiinterop1_CreateFontFromLOGFONT
(
IDWriteGdiInterop1
*
iface
,
LOGFONTW
const
*
logfont
,
IDWriteFontCollection
*
collection
,
IDWriteFont
**
font
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop1
(
iface
);
FIXME
(
"(%p)->(%p %p %p): stub
\n
"
,
This
,
logfont
,
collection
,
font
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
gdiinterop1_GetFontSignature_
(
IDWriteGdiInterop1
*
iface
,
IDWriteFontFace
*
fontface
,
FONTSIGNATURE
*
fontsig
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop1
(
iface
);
FIXME
(
"(%p)->(%p %p): stub
\n
"
,
This
,
fontface
,
fontsig
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
gdiinterop1_GetFontSignature
(
IDWriteGdiInterop1
*
iface
,
IDWriteFont
*
font
,
FONTSIGNATURE
*
fontsig
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop1
(
iface
);
FIXME
(
"(%p)->(%p %p): stub
\n
"
,
This
,
font
,
fontsig
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
gdiinterop1_GetMatchingFontsByLOGFONT
(
IDWriteGdiInterop1
*
iface
,
LOGFONTW
const
*
logfont
,
IDWriteFontSet
*
fontset
,
IDWriteFontSet
**
subset
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop1
(
iface
);
FIXME
(
"(%p)->(%p %p %p): stub
\n
"
,
This
,
logfont
,
fontset
,
subset
);
return
E_NOTIMPL
;
}
static
const
struct
IDWriteGdiInterop1Vtbl
gdiinteropvtbl
=
{
gdiinterop_QueryInterface
,
gdiinterop_AddRef
,
gdiinterop_Release
,
...
...
@@ -883,10 +923,14 @@ static const struct IDWriteGdiInteropVtbl gdiinteropvtbl = {
gdiinterop_ConvertFontToLOGFONT
,
gdiinterop_ConvertFontFaceToLOGFONT
,
gdiinterop_CreateFontFaceFromHdc
,
gdiinterop_CreateBitmapRenderTarget
gdiinterop_CreateBitmapRenderTarget
,
gdiinterop1_CreateFontFromLOGFONT
,
gdiinterop1_GetFontSignature_
,
gdiinterop1_GetFontSignature
,
gdiinterop1_GetMatchingFontsByLOGFONT
};
HRESULT
create_gdiinterop
(
IDWriteFactory3
*
factory
,
IDWriteGdiInterop
**
ret
)
HRESULT
create_gdiinterop
(
IDWriteFactory3
*
factory
,
IDWriteGdiInterop
1
**
ret
)
{
struct
gdiinterop
*
This
;
...
...
@@ -895,15 +939,15 @@ HRESULT create_gdiinterop(IDWriteFactory3 *factory, IDWriteGdiInterop **ret)
This
=
heap_alloc
(
sizeof
(
struct
gdiinterop
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDWriteGdiInterop_iface
.
lpVtbl
=
&
gdiinteropvtbl
;
This
->
IDWriteGdiInterop
1
_iface
.
lpVtbl
=
&
gdiinteropvtbl
;
This
->
factory
=
factory
;
*
ret
=
&
This
->
IDWriteGdiInterop_iface
;
*
ret
=
&
This
->
IDWriteGdiInterop
1
_iface
;
return
S_OK
;
}
void
release_gdiinterop
(
IDWriteGdiInterop
*
iface
)
void
release_gdiinterop
(
IDWriteGdiInterop
1
*
iface
)
{
struct
gdiinterop
*
interop
=
impl_from_IDWriteGdiInterop
(
iface
);
struct
gdiinterop
*
interop
=
impl_from_IDWriteGdiInterop
1
(
iface
);
heap_free
(
interop
);
}
dlls/dwrite/main.c
View file @
f9e25741
...
...
@@ -525,7 +525,7 @@ struct dwritefactory {
IDWriteFontCollection
*
system_collection
;
IDWriteFontCollection
*
eudc_collection
;
IDWriteGdiInterop
*
gdiinterop
;
IDWriteGdiInterop
1
*
gdiinterop
;
IDWriteFontFallback
*
fallback
;
IDWriteLocalFontFileLoader
*
localfontfileloader
;
...
...
@@ -1061,7 +1061,7 @@ static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory3 *iface, IDWrit
return
hr
;
}
*
gdi_interop
=
This
->
gdiinterop
;
*
gdi_interop
=
(
IDWriteGdiInterop
*
)
This
->
gdiinterop
;
IDWriteGdiInterop_AddRef
(
*
gdi_interop
);
return
S_OK
;
...
...
include/dwrite_3.idl
View file @
f9e25741
...
...
@@ -24,6 +24,11 @@ interface IDWriteFontSet;
interface
IDWriteFontSetBuilder
;
interface
IDWriteFontDownloadQueue
;
cpp_quote
(
"#ifndef _WINGDI_"
)
/*
already
defined
in
wingdi
.
h
but
needed
for
WIDL
*/
typedef
struct
FONTSIGNATURE
FONTSIGNATURE
;
cpp_quote
(
"#endif /* _WINGDI_ */"
)
typedef
enum
DWRITE_LOCALITY
{
DWRITE_LOCALITY_REMOTE
,
...
...
@@ -257,6 +262,26 @@ interface IDWriteTextLayout3 : IDWriteTextLayout2
[
local
,
object
,
uuid
(
4556b
e70
-
3
abd
-
4
f70
-
90b
e
-
421780
a6f515
)
]
interface
IDWriteGdiInterop1
:
IDWriteGdiInterop
{
HRESULT
CreateFontFromLOGFONT
(
LOGFONTW
const
*
logfont
,
IDWriteFontCollection
*
collection
,
IDWriteFont
**
font
)
;
/*
GetFontSignature
()
methods
are
listed
in
reversed
order
to
make
resulting
vtable
order
compatible
.
*/
HRESULT
GetFontSignature_
(
IDWriteFontFace
*
fontface
,
FONTSIGNATURE
*
fontsig
)
;
HRESULT
GetFontSignature
(
IDWriteFont
*
font
,
FONTSIGNATURE
*
fontsig
)
;
HRESULT
GetMatchingFontsByLOGFONT
(
LOGFONTW
const
*
logfont
,
IDWriteFontSet
*
fontset
,
IDWriteFontSet
**
subset
)
;
}
[
local
,
object
,
uuid
(
9
a1b41c3
-
d3bb
-
466
a
-
87
fc
-
fe67556a3b65
)
]
interface
IDWriteFactory3
:
IDWriteFactory2
...
...
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