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
de741ffe
Commit
de741ffe
authored
Dec 09, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Update to IDWriteFactory2.
parent
415e0b3f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
dwrite_private.h
dlls/dwrite/dwrite_private.h
+3
-3
font.c
dlls/dwrite/font.c
+14
-14
gdiinterop.c
dlls/dwrite/gdiinterop.c
+5
-5
main.c
dlls/dwrite/main.c
+0
-0
No files found.
dlls/dwrite/dwrite_private.h
View file @
de741ffe
...
...
@@ -96,17 +96,17 @@ extern HRESULT create_textformat(const WCHAR*,IDWriteFontCollection*,DWRITE_FONT
extern
HRESULT
create_textlayout
(
const
WCHAR
*
,
UINT32
,
IDWriteTextFormat
*
,
FLOAT
,
FLOAT
,
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_trimmingsign
(
IDWriteInlineObject
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_typography
(
IDWriteTypography
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteFactory
*
,
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteFactory
2
*
,
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
void
release_gdiinterop
(
IDWriteGdiInterop
*
)
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
;
extern
HRESULT
get_system_fontcollection
(
IDWriteFactory
*
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_system_fontcollection
(
IDWriteFactory
2
*
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_textanalyzer
(
IDWriteTextAnalyzer
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_file
(
IDWriteFontFileLoader
*
loader
,
const
void
*
reference_key
,
UINT32
key_size
,
IDWriteFontFile
**
font_file
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localfontfileloader
(
IDWriteLocalFontFileLoader
**
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_fontface
(
DWRITE_FONT_FACE_TYPE
,
UINT32
,
IDWriteFontFile
*
const
*
,
UINT32
,
DWRITE_FONT_SIMULATIONS
,
IDWriteFontFace2
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_collection
(
IDWriteFactory
*
,
IDWriteFontFileEnumerator
*
,
BOOL
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_collection
(
IDWriteFactory
2
*
,
IDWriteFontFileEnumerator
*
,
BOOL
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_system_collection
(
IDWriteFontCollection
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_local_refkey
(
const
WCHAR
*
,
const
FILETIME
*
,
void
**
,
UINT32
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_filestream_from_file
(
IDWriteFontFile
*
,
IDWriteFontFileStream
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/font.c
View file @
de741ffe
...
...
@@ -43,7 +43,7 @@ struct dwrite_font_data {
IDWriteLocalizedStrings
*
info_strings
[
DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME
+
1
];
/* data needed to create fontface instance */
IDWriteFactory
*
factory
;
IDWriteFactory
2
*
factory
;
DWRITE_FONT_FACE_TYPE
face_type
;
IDWriteFontFile
*
file
;
UINT32
face_index
;
...
...
@@ -210,7 +210,7 @@ static void release_font_data(struct dwrite_font_data *data)
}
IDWriteFontFile_Release
(
data
->
file
);
IDWriteFactory_Release
(
data
->
factory
);
IDWriteFactory
2
_Release
(
data
->
factory
);
heap_free
(
data
->
facename
);
heap_free
(
data
);
}
...
...
@@ -725,7 +725,7 @@ static HRESULT get_fontface_from_font(struct dwrite_font *font, IDWriteFontFace2
*
fontface
=
NULL
;
hr
=
IDWriteFactory_CreateFontFace
(
data
->
factory
,
data
->
face_type
,
1
,
&
data
->
file
,
hr
=
IDWriteFactory
2
_CreateFontFace
(
data
->
factory
,
data
->
face_type
,
1
,
&
data
->
file
,
data
->
face_index
,
font
->
simulations
,
&
face
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -1527,7 +1527,7 @@ HRESULT get_filestream_from_file(IDWriteFontFile *file, IDWriteFontFileStream **
return
hr
;
}
static
HRESULT
init_font_data
(
IDWriteFactory
*
factory
,
IDWriteFontFile
*
file
,
UINT32
face_index
,
DWRITE_FONT_FACE_TYPE
face_type
,
struct
dwrite_font_data
*
data
)
static
HRESULT
init_font_data
(
IDWriteFactory
2
*
factory
,
IDWriteFontFile
*
file
,
UINT32
face_index
,
DWRITE_FONT_FACE_TYPE
face_type
,
struct
dwrite_font_data
*
data
)
{
void
*
os2_context
,
*
head_context
;
const
void
*
tt_os2
=
NULL
,
*
tt_head
=
NULL
;
...
...
@@ -1543,7 +1543,7 @@ static HRESULT init_font_data(IDWriteFactory *factory, IDWriteFontFile *file, UI
data
->
face_index
=
face_index
;
data
->
face_type
=
face_type
;
IDWriteFontFile_AddRef
(
file
);
IDWriteFactory_AddRef
(
factory
);
IDWriteFactory
2
_AddRef
(
factory
);
opentype_get_font_table
(
stream
,
face_type
,
face_index
,
MS_OS2_TAG
,
&
tt_os2
,
&
os2_context
,
NULL
,
NULL
);
opentype_get_font_table
(
stream
,
face_type
,
face_index
,
MS_HEAD_TAG
,
&
tt_head
,
&
head_context
,
NULL
,
NULL
);
...
...
@@ -1578,7 +1578,7 @@ static HRESULT init_fontfamily_data(IDWriteLocalizedStrings *familyname, struct
return
S_OK
;
}
HRESULT
create_font_collection
(
IDWriteFactory
*
factory
,
IDWriteFontFileEnumerator
*
enumerator
,
BOOL
is_system
,
IDWriteFontCollection
**
ret
)
HRESULT
create_font_collection
(
IDWriteFactory
2
*
factory
,
IDWriteFontFileEnumerator
*
enumerator
,
BOOL
is_system
,
IDWriteFontCollection
**
ret
)
{
struct
dwrite_fontcollection
*
collection
;
BOOL
current
=
FALSE
;
...
...
@@ -1688,7 +1688,7 @@ struct system_fontfile_enumerator
IDWriteFontFileEnumerator
IDWriteFontFileEnumerator_iface
;
LONG
ref
;
IDWriteFactory
*
factory
;
IDWriteFactory
2
*
factory
;
HKEY
hkey
;
int
index
;
};
...
...
@@ -1723,7 +1723,7 @@ static ULONG WINAPI systemfontfileenumerator_Release(IDWriteFontFileEnumerator *
ULONG
ref
=
InterlockedDecrement
(
&
enumerator
->
ref
);
if
(
!
ref
)
{
IDWriteFactory_Release
(
enumerator
->
factory
);
IDWriteFactory
2
_Release
(
enumerator
->
factory
);
RegCloseKey
(
enumerator
->
hkey
);
heap_free
(
enumerator
);
}
...
...
@@ -1764,10 +1764,10 @@ static HRESULT WINAPI systemfontfileenumerator_GetCurrentFontFile(IDWriteFontFil
strcatW
(
fullpathW
,
fontsW
);
strcatW
(
fullpathW
,
filename
);
hr
=
IDWriteFactory_CreateFontFileReference
(
enumerator
->
factory
,
fullpathW
,
NULL
,
file
);
hr
=
IDWriteFactory
2
_CreateFontFileReference
(
enumerator
->
factory
,
fullpathW
,
NULL
,
file
);
}
else
hr
=
IDWriteFactory_CreateFontFileReference
(
enumerator
->
factory
,
filename
,
NULL
,
file
);
hr
=
IDWriteFactory
2
_CreateFontFileReference
(
enumerator
->
factory
,
filename
,
NULL
,
file
);
heap_free
(
filename
);
return
hr
;
...
...
@@ -1805,7 +1805,7 @@ static const struct IDWriteFontFileEnumeratorVtbl systemfontfileenumeratorvtbl =
systemfontfileenumerator_GetCurrentFontFile
};
static
HRESULT
create_system_fontfile_enumerator
(
IDWriteFactory
*
factory
,
IDWriteFontFileEnumerator
**
ret
)
static
HRESULT
create_system_fontfile_enumerator
(
IDWriteFactory
2
*
factory
,
IDWriteFontFileEnumerator
**
ret
)
{
struct
system_fontfile_enumerator
*
enumerator
;
static
const
WCHAR
fontslistW
[]
=
{
...
...
@@ -1824,11 +1824,11 @@ static HRESULT create_system_fontfile_enumerator(IDWriteFactory *factory, IDWrit
enumerator
->
ref
=
1
;
enumerator
->
factory
=
factory
;
enumerator
->
index
=
-
1
;
IDWriteFactory_AddRef
(
factory
);
IDWriteFactory
2
_AddRef
(
factory
);
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
fontslistW
,
0
,
GENERIC_READ
,
&
enumerator
->
hkey
))
{
ERR
(
"failed to open fonts list key
\n
"
);
IDWriteFactory_Release
(
factory
);
IDWriteFactory
2
_Release
(
factory
);
heap_free
(
enumerator
);
return
E_FAIL
;
}
...
...
@@ -1838,7 +1838,7 @@ static HRESULT create_system_fontfile_enumerator(IDWriteFactory *factory, IDWrit
return
S_OK
;
}
HRESULT
get_system_fontcollection
(
IDWriteFactory
*
factory
,
IDWriteFontCollection
**
collection
)
HRESULT
get_system_fontcollection
(
IDWriteFactory
2
*
factory
,
IDWriteFontCollection
**
collection
)
{
IDWriteFontFileEnumerator
*
enumerator
;
HRESULT
hr
;
...
...
dlls/dwrite/gdiinterop.c
View file @
de741ffe
...
...
@@ -40,7 +40,7 @@ static const DWRITE_MATRIX identity =
struct
gdiinterop
{
IDWriteGdiInterop
IDWriteGdiInterop_iface
;
IDWriteFactory
*
factory
;
IDWriteFactory
2
*
factory
;
};
struct
rendertarget
{
...
...
@@ -299,14 +299,14 @@ static ULONG WINAPI gdiinterop_AddRef(IDWriteGdiInterop *iface)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDWriteFactory_AddRef
(
This
->
factory
);
return
IDWriteFactory
2
_AddRef
(
This
->
factory
);
}
static
ULONG
WINAPI
gdiinterop_Release
(
IDWriteGdiInterop
*
iface
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDWriteFactory_Release
(
This
->
factory
);
return
IDWriteFactory
2
_Release
(
This
->
factory
);
}
static
HRESULT
WINAPI
gdiinterop_CreateFontFromLOGFONT
(
IDWriteGdiInterop
*
iface
,
...
...
@@ -326,7 +326,7 @@ static HRESULT WINAPI gdiinterop_CreateFontFromLOGFONT(IDWriteGdiInterop *iface,
if
(
!
logfont
)
return
E_INVALIDARG
;
hr
=
IDWriteFactory_GetSystemFontCollection
(
This
->
factory
,
&
collection
,
FALSE
);
hr
=
IDWriteFactory
2
_GetSystemFontCollection
(
This
->
factory
,
&
collection
,
FALSE
);
if
(
FAILED
(
hr
))
{
ERR
(
"failed to get system font collection: 0x%08x.
\n
"
,
hr
);
return
hr
;
...
...
@@ -465,7 +465,7 @@ static const struct IDWriteGdiInteropVtbl gdiinteropvtbl = {
gdiinterop_CreateBitmapRenderTarget
};
HRESULT
create_gdiinterop
(
IDWriteFactory
*
factory
,
IDWriteGdiInterop
**
ret
)
HRESULT
create_gdiinterop
(
IDWriteFactory
2
*
factory
,
IDWriteGdiInterop
**
ret
)
{
struct
gdiinterop
*
This
;
...
...
dlls/dwrite/main.c
View file @
de741ffe
This diff is collapsed.
Click to expand it.
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