winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2014
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
397 discussions
Start a n
N
ew thread
Iván Matellanes : msvcrt: Added _ftelli64_nolock implementation.
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: 7cf0c877b3a5ab33f3c28a20f58f6a2cbf257a28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cf0c877b3a5ab33f3c28a20f…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Oct 15 16:46:01 2014 +0200 msvcrt: Added _ftelli64_nolock implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/file.c | 24 ++++++++++++++++-------- dlls/msvcrt/msvcrt.h | 1 + include/msvcrt/stdio.h | 1 + 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 406e9e7..2425f72 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -850,7 +850,7 @@ @ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32 @ stub _ftell_nolock @ cdecl -ret64 _ftelli64(ptr) MSVCRT__ftelli64 -@ stub _ftelli64_nolock +@ cdecl -ret64 _ftelli64_nolock(ptr) MSVCRT__ftelli64_nolock @ cdecl _ftime32(ptr) MSVCRT__ftime32 @ cdecl _ftime32_s(ptr) MSVCRT__ftime32_s @ cdecl _ftime64(ptr) MSVCRT__ftime64 diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 0c62d69..9fa1ac4 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1198,7 +1198,7 @@ @ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32 @ stub _ftell_nolock @ cdecl -ret64 _ftelli64(ptr) MSVCRT__ftelli64 -@ stub _ftelli64_nolock +@ cdecl -ret64 _ftelli64_nolock(ptr) MSVCRT__ftelli64_nolock @ cdecl _ftime32(ptr) MSVCRT__ftime32 @ cdecl _ftime32_s(ptr) MSVCRT__ftime32_s @ cdecl _ftime64(ptr) MSVCRT__ftime64 diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 7123a06..334921b 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -517,7 +517,7 @@ @ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32 @ stub _ftell_nolock @ cdecl -ret64 _ftelli64(ptr) MSVCRT__ftelli64 -@ stub _ftelli64_nolock +@ cdecl -ret64 _ftelli64_nolock(ptr) MSVCRT__ftelli64_nolock @ cdecl _ftime32(ptr) MSVCRT__ftime32 @ cdecl _ftime32_s(ptr) MSVCRT__ftime32_s @ cdecl _ftime64(ptr) MSVCRT__ftime64 diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 41ce183..1cbb339 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -499,7 +499,7 @@ @ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32 @ stub _ftell_nolock @ cdecl -ret64 _ftelli64(ptr) MSVCRT__ftelli64 -@ stub _ftelli64_nolock +@ cdecl -ret64 _ftelli64_nolock(ptr) MSVCRT__ftelli64_nolock @ cdecl _ftime32(ptr) MSVCRT__ftime32 @ cdecl _ftime32_s(ptr) MSVCRT__ftime32_s @ cdecl _ftime64(ptr) MSVCRT__ftime64 diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 9a0effd..43f8055 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4226,14 +4226,25 @@ int CDECL MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos) */ __int64 CDECL MSVCRT__ftelli64(MSVCRT_FILE* file) { - __int64 pos; + __int64 ret; MSVCRT__lock_file(file); + ret = MSVCRT__ftelli64_nolock(file); + MSVCRT__unlock_file(file); + + return ret; +} + +/********************************************************************* + * _ftelli64_nolock (MSVCRT.@) + */ +__int64 CDECL MSVCRT__ftelli64_nolock(MSVCRT_FILE* file) +{ + __int64 pos; + pos = _telli64(file->_file); - if(pos == -1) { - MSVCRT__unlock_file(file); + if(pos == -1) return -1; - } if(file->_flag & (MSVCRT__IOMYBUF | MSVCRT__USERBUF)) { if(file->_flag & MSVCRT__IOWRT) { pos += file->_ptr - file->_base; @@ -4258,10 +4269,8 @@ __int64 CDECL MSVCRT__ftelli64(MSVCRT_FILE* file) } else { char *p; - if(MSVCRT__lseeki64(file->_file, pos, SEEK_SET) != pos) { - MSVCRT__unlock_file(file); + if(MSVCRT__lseeki64(file->_file, pos, SEEK_SET) != pos) return -1; - } pos -= file->_bufsiz; pos += file->_ptr - file->_base; @@ -4277,7 +4286,6 @@ __int64 CDECL MSVCRT__ftelli64(MSVCRT_FILE* file) } } - MSVCRT__unlock_file(file); return pos; } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index b5cf8b7..41f3632 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -920,6 +920,7 @@ int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*); MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*); MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*); __int64 __cdecl MSVCRT__ftelli64(MSVCRT_FILE* file); +__int64 __cdecl MSVCRT__ftelli64_nolock(MSVCRT_FILE*); void __cdecl MSVCRT__exit(int); void __cdecl MSVCRT_abort(void); MSVCRT_ulong* __cdecl MSVCRT___doserrno(void); diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 0170d2e..90fc3f7 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -130,6 +130,7 @@ int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,__ms_va_list); size_t __cdecl _fread_nolock(void*,size_t,size_t,FILE*); size_t __cdecl _fwrite_nolock(const void*,size_t,size_t,FILE*); int __cdecl _fclose_nolock(FILE*); +__int64 __cdecl _ftelli64_nolock(FILE*); void __cdecl clearerr(FILE*); int __cdecl fclose(FILE*);
1
0
0
0
Nikolay Sivov : dwrite: Implement GetUnicodeRanges().
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: 4c0ec6700cb17022f3cbc7fddfff3d514d2d8278 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c0ec6700cb17022f3cbc7fdd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 16 07:33:51 2014 +0400 dwrite: Implement GetUnicodeRanges(). --- dlls/dwrite/bidi.c | 2 +- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 66 +++++++++++++++++++++++-------- dlls/dwrite/gdiinterop.c | 2 +- dlls/dwrite/opentype.c | 94 +++++++++++++++++++++++++++++++++++++++++++- dlls/dwrite/shape.c | 2 +- dlls/dwrite/tests/font.c | 77 +++++++++++++++++++++++++++++++++++- 7 files changed, 222 insertions(+), 22 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4c0ec6700cb17022f3cbc…
1
0
0
0
Nikolay Sivov : dwrite: Use better integer types for cmap helpers.
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: d3cdec0e66ef4222dea4b663b33ce871d7254eda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d3cdec0e66ef4222dea4b663b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 16 07:32:27 2014 +0400 dwrite: Use better integer types for cmap helpers. --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 5 ++--- dlls/dwrite/opentype.c | 33 +++++++++++++++++---------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index b3bd1df..f4a19c7 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -108,7 +108,7 @@ extern HRESULT font_create_fontface(IDWriteFactory *iface, DWRITE_FONT_FACE_TYPE /* Opentype font table functions */ extern HRESULT opentype_analyze_font(IDWriteFontFileStream*,UINT32*,DWRITE_FONT_FILE_TYPE*,DWRITE_FONT_FACE_TYPE*,BOOL*) DECLSPEC_HIDDEN; extern HRESULT opentype_get_font_table(IDWriteFontFileStream*,DWRITE_FONT_FACE_TYPE,UINT32,UINT32,const void**,void**,UINT32*,BOOL*) DECLSPEC_HIDDEN; -extern VOID OpenType_CMAP_GetGlyphIndex(LPVOID data, DWORD utf32c, LPWORD pgi, DWORD flags) DECLSPEC_HIDDEN; +extern void opentype_cmap_get_glyphindex(void*,UINT32,UINT16*) DECLSPEC_HIDDEN; extern VOID get_font_properties(LPCVOID os2, LPCVOID head, LPCVOID post, DWRITE_FONT_METRICS *metrics, DWRITE_FONT_STRETCH *stretch, DWRITE_FONT_WEIGHT *weight, DWRITE_FONT_STYLE *style) DECLSPEC_HIDDEN; extern HRESULT bidi_computelevels(const WCHAR*,UINT32,UINT8,UINT8*,UINT8*); diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 69b7746..e3edbaa 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -391,9 +391,8 @@ static HRESULT WINAPI dwritefontface_GetGlyphIndices(IDWriteFontFace2 *iface, UI } for (i = 0; i < count; i++) - { - OpenType_CMAP_GetGlyphIndex(This->cmap.data, codepoints[i], &glyph_indices[i], 0); - } + opentype_cmap_get_glyphindex(This->cmap.data, codepoints[i], &glyph_indices[i]); + return S_OK; } } diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 9af04fd..dba3e31 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -96,6 +96,12 @@ typedef struct { WORD endCode[1]; } CMAP_SegmentMapping_0; +enum OPENTYPE_CMAP_TABLE_FORMAT +{ + OPENTYPE_CMAP_TABLE_SEGMENT_MAPPING = 4, + OPENTYPE_CMAP_TABLE_SEGMENTED_COVERAGE = 12 +}; + /* PANOSE is 10 bytes in size, need to pack the structure properly */ #include "pshpack2.h" typedef struct @@ -301,7 +307,7 @@ static int compare_group(const void *a, const void* b) return 0; } -static void CMAP4_GetGlyphIndex(CMAP_SegmentMapping_0* format, DWORD utf32c, LPWORD pgi) +static void CMAP4_GetGlyphIndex(CMAP_SegmentMapping_0* format, UINT32 utf32c, UINT16 *pgi) { WORD *startCode; SHORT *idDelta; @@ -340,9 +346,9 @@ static void CMAP4_GetGlyphIndex(CMAP_SegmentMapping_0* format, DWORD utf32c, LPW } } -static void CMAP12_GetGlyphIndex(CMAP_SegmentedCoverage* format, DWORD utf32c, LPWORD pgi) +static void CMAP12_GetGlyphIndex(CMAP_SegmentedCoverage* format, UINT32 utf32c, UINT16 *pgi) { - CMAP_SegmentedCoverage_group *group = NULL; + CMAP_SegmentedCoverage_group *group; group = bsearch(&utf32c, format->groups, GET_BE_DWORD(format->nGroups), sizeof(CMAP_SegmentedCoverage_group), compare_group); @@ -354,17 +360,12 @@ static void CMAP12_GetGlyphIndex(CMAP_SegmentedCoverage* format, DWORD utf32c, L } } -VOID OpenType_CMAP_GetGlyphIndex(LPVOID data, DWORD utf32c, LPWORD pgi, DWORD flags) +void opentype_cmap_get_glyphindex(void *data, UINT32 utf32c, UINT16 *pgi) { + CMAP_Header *CMAP_Table = data; int i; - CMAP_Header *CMAP_Table = NULL; - - if (flags & GGI_MARK_NONEXISTING_GLYPHS) - *pgi = 0xffff; - else - *pgi = 0; - CMAP_Table = data; + *pgi = 0; for (i = 0; i < GET_BE_WORD(CMAP_Table->numTables); i++) { @@ -376,18 +377,18 @@ VOID OpenType_CMAP_GetGlyphIndex(LPVOID data, DWORD utf32c, LPWORD pgi, DWORD fl table = (WORD*)(((BYTE*)CMAP_Table) + GET_BE_DWORD(CMAP_Table->tables[i].offset)); type = GET_BE_WORD(*table); - TRACE("Type %i\n", type); + TRACE("table type %i\n", type); /* Break when we find a handled type */ - switch(type) + switch (type) { - case 4: + case OPENTYPE_CMAP_TABLE_SEGMENT_MAPPING: CMAP4_GetGlyphIndex((CMAP_SegmentMapping_0*) table, utf32c, pgi); break; - case 12: + case OPENTYPE_CMAP_TABLE_SEGMENTED_COVERAGE: CMAP12_GetGlyphIndex((CMAP_SegmentedCoverage*) table, utf32c, pgi); break; default: - TRACE("Type %i unhandled.\n", type); + TRACE("table type %i unhandled.\n", type); } } }
1
0
0
0
Nikolay Sivov : dwrite: Implement HasCharacter().
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: 9b46e19aa43f4cab48329438051206e1013f961c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b46e19aa43f4cab483294380…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 16 07:30:40 2014 +0400 dwrite: Implement HasCharacter(). --- dlls/dwrite/font.c | 22 ++++++++++++++++++++-- dlls/dwrite/tests/font.c | 11 +++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index a220501..69b7746 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -835,8 +835,26 @@ static void WINAPI dwritefont_GetMetrics(IDWriteFont2 *iface, DWRITE_FONT_METRIC static HRESULT WINAPI dwritefont_HasCharacter(IDWriteFont2 *iface, UINT32 value, BOOL *exists) { struct dwrite_font *This = impl_from_IDWriteFont2(iface); - FIXME("(%p)->(0x%08x %p): stub\n", This, value, exists); - return E_NOTIMPL; + IDWriteFontFace *fontface; + UINT16 index; + HRESULT hr; + + TRACE("(%p)->(0x%08x %p)\n", This, value, exists); + + *exists = FALSE; + + hr = IDWriteFont2_CreateFontFace(iface, &fontface); + if (FAILED(hr)) + return hr; + + index = 0; + hr = IDWriteFontFace_GetGlyphIndices(fontface, &value, 1, &index); + IDWriteFontFace_Release(fontface); + if (FAILED(hr)) + return hr; + + *exists = index != 0; + return S_OK; } static HRESULT WINAPI dwritefont_CreateFontFace(IDWriteFont2 *iface, IDWriteFontFace **face) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 33c47bd..5e269c3 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -218,6 +218,7 @@ static void test_CreateFontFromLOGFONT(void) BOOL ret; HDC hdc; HFONT hfont; + BOOL exists; int i; UINT r; @@ -251,6 +252,16 @@ if (0) DeleteDC(hdc); DeleteObject(hfont); + exists = TRUE; + hr = IDWriteFont_HasCharacter(font, 0xd800, &exists); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(exists == FALSE, "got %d\n", exists); + + exists = FALSE; + hr = IDWriteFont_HasCharacter(font, 0x20, &exists); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(exists == TRUE, "got %d\n", exists); + /* now check properties */ weight = IDWriteFont_GetWeight(font); ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "got %d\n", weight);
1
0
0
0
Nikolay Sivov : dwrite: Added one more test for system font collection.
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: 8f34bee25ac54f13538e5a6bf172c8b73dd58d1e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f34bee25ac54f13538e5a6bf…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 16 07:29:31 2014 +0400 dwrite: Added one more test for system font collection. --- dlls/dwrite/tests/font.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 65cd398..33c47bd 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -657,11 +657,13 @@ if (0) /* crashes on native */ ok(hr == S_OK, "got 0x%08x\n", hr); ok(fontface == fontface2, "got %p, was %p\n", fontface2, fontface); /* the fontface refcount is increased here */ - IDWriteFontFace_Release(fontface); + IDWriteFont_Release(font); + + hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFont, (void**)&font); + ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL), "got 0x%08x\n", hr); IDWriteFontFace_Release(fontface); - IDWriteFont_Release(font); IDWriteGdiInterop_Release(interop); } @@ -726,6 +728,7 @@ static void test_system_fontcollection(void) { IDWriteFontCollection *collection, *coll2; IDWriteFontFamily *family; + IDWriteFactory *factory2; HRESULT hr; UINT32 i; BOOL ret; @@ -743,6 +746,14 @@ static void test_system_fontcollection(void) ok(coll2 == collection, "got %p, was %p\n", coll2, collection); IDWriteFontCollection_Release(coll2); + hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IDWriteFactory, (IUnknown**)&factory2); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IDWriteFactory_GetSystemFontCollection(factory2, &coll2, FALSE); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(coll2 != collection, "got %p, was %p\n", coll2, collection); + IDWriteFontCollection_Release(coll2); + IDWriteFactory_Release(factory2); + i = IDWriteFontCollection_GetFontFamilyCount(collection); ok(i, "got %u\n", i);
1
0
0
0
Vincent Povirk : mscoree: Use mono_runtime_quit in shutdown process.
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: 6ef156e656b76a71e76e9b6d126dc958aa8df3c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ef156e656b76a71e76e9b6d1…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Oct 15 16:26:09 2014 -0500 mscoree: Use mono_runtime_quit in shutdown process. --- dlls/mscoree/corruntimehost.c | 2 +- dlls/mscoree/metahost.c | 4 ++-- dlls/mscoree/mscoree_private.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index ce73134..6a037f8 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -1124,7 +1124,7 @@ __int32 WINAPI _CorExeMain(void) if (domain) { mono_thread_manage(); - mono_jit_cleanup(domain); + mono_runtime_quit(); } return exit_code; diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index f07145b..9cbad22 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -88,7 +88,6 @@ static void (CDECL *mono_free)(void *); static MonoImage* (CDECL *mono_image_open)(const char *fname, MonoImageOpenStatus *status); MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status); static void (CDECL *mono_install_assembly_preload_hook)(MonoAssemblyPreLoadFunc func, void *user_data); -void (CDECL *mono_jit_cleanup)(MonoDomain *domain); int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]); MonoDomain* (CDECL *mono_jit_init)(const char *file); static int (CDECL *mono_jit_set_trace_options)(const char* options); @@ -100,6 +99,7 @@ static void (CDECL *mono_profiler_install)(MonoProfiler *prof, MonoProfileFunc s MonoType* (CDECL *mono_reflection_type_from_name)(char *name, MonoImage *image); MonoObject* (CDECL *mono_runtime_invoke)(MonoMethod *method, void *obj, void **params, MonoObject **exc); void (CDECL *mono_runtime_object_init)(MonoObject *this_obj); +void (CDECL *mono_runtime_quit)(void); static void (CDECL *mono_set_dirs)(const char *assembly_dir, const char *config_dir); static void (CDECL *mono_set_verbose_level)(DWORD level); MonoString* (CDECL *mono_string_new)(MonoDomain *domain, const char *str); @@ -197,7 +197,6 @@ static HRESULT load_mono(CLRRuntimeInfo *This) LOAD_MONO_FUNCTION(mono_free); LOAD_MONO_FUNCTION(mono_image_open); LOAD_MONO_FUNCTION(mono_install_assembly_preload_hook); - LOAD_MONO_FUNCTION(mono_jit_cleanup); LOAD_MONO_FUNCTION(mono_jit_exec); LOAD_MONO_FUNCTION(mono_jit_init); LOAD_MONO_FUNCTION(mono_jit_set_trace_options); @@ -209,6 +208,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This) LOAD_MONO_FUNCTION(mono_reflection_type_from_name); LOAD_MONO_FUNCTION(mono_runtime_invoke); LOAD_MONO_FUNCTION(mono_runtime_object_init); + LOAD_MONO_FUNCTION(mono_runtime_quit); LOAD_MONO_FUNCTION(mono_set_dirs); LOAD_MONO_FUNCTION(mono_set_verbose_level); LOAD_MONO_FUNCTION(mono_stringify_assembly_name); diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index a451344..af329f8 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -145,7 +145,6 @@ extern MonoClass* (CDECL *mono_class_from_mono_type)(MonoType *type); extern MonoClass* (CDECL *mono_class_from_name)(MonoImage *image, const char* name_space, const char *name); extern MonoMethod* (CDECL *mono_class_get_method_from_name)(MonoClass *klass, const char *name, int param_count); extern MonoAssembly* (CDECL *mono_domain_assembly_open)(MonoDomain *domain, const char *name); -extern void (CDECL *mono_jit_cleanup)(MonoDomain *domain); extern int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]); extern MonoDomain* (CDECL *mono_jit_init)(const char *file); extern MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status); @@ -156,6 +155,7 @@ extern void* (CDECL *mono_object_unbox)(MonoObject *obj); extern MonoType* (CDECL *mono_reflection_type_from_name)(char *name, MonoImage *image); extern MonoObject* (CDECL *mono_runtime_invoke)(MonoMethod *method, void *obj, void **params, MonoObject **exc); extern void (CDECL *mono_runtime_object_init)(MonoObject *this_obj); +extern void (CDECL *mono_runtime_quit)(void); extern MonoString* (CDECL *mono_string_new)(MonoDomain *domain, const char *str); extern MonoThread* (CDECL *mono_thread_attach)(MonoDomain *domain); extern void (CDECL *mono_thread_manage)(void);
1
0
0
0
Nikolay Sivov : mscoree: Use E_NOT_SUFFICIENT_BUFFER definition.
by Alexandre Julliard
16 Oct '14
16 Oct '14
Module: wine Branch: master Commit: a99d8cb21bd0f658518a16459172974593f17fff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a99d8cb21bd0f658518a16459…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 16 00:00:23 2014 +0400 mscoree: Use E_NOT_SUFFICIENT_BUFFER definition. --- dlls/mscoree/metahost.c | 6 +++--- dlls/mscoree/tests/metahost.c | 2 +- dlls/mscoree/tests/mscoree.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 2383068..f07145b 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -360,7 +360,7 @@ static HRESULT WINAPI CLRRuntimeInfo_GetVersionString(ICLRRuntimeInfo* iface, if (buffer_size >= *pcchBuffer) MultiByteToWideChar(CP_UTF8, 0, version, -1, pwzBuffer, buffer_size); else - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = E_NOT_SUFFICIENT_BUFFER; } return hr; @@ -421,7 +421,7 @@ static HRESULT WINAPI CLRRuntimeInfo_GetRuntimeDirectory(ICLRRuntimeInfo* iface, if (buffer_size >= size) strcpyW(pwzBuffer, system_dir); else - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = E_NOT_SUFFICIENT_BUFFER; } return hr; @@ -1051,7 +1051,7 @@ HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost* iface, if (buffer_size >= *pcchBuffer) MultiByteToWideChar(CP_UTF8, 0, version, -1, pwzBuffer, buffer_size); else - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = E_NOT_SUFFICIENT_BUFFER; } } diff --git a/dlls/mscoree/tests/metahost.c b/dlls/mscoree/tests/metahost.c index d00bb4f..5a8b3e0 100644 --- a/dlls/mscoree/tests/metahost.c +++ b/dlls/mscoree/tests/metahost.c @@ -122,7 +122,7 @@ static void test_enumruntimes(void) count = 1; hr = ICLRRuntimeInfo_GetVersionString(runtime_info, buf, &count); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetVersionString returned %x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetVersionString returned %x\n", hr); ok(count > 1, "GetVersionString returned count %u\n", count); count = 0xdeadbeef; diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c index fcea603..30b068d 100644 --- a/dlls/mscoree/tests/mscoree.c +++ b/dlls/mscoree/tests/mscoree.c @@ -92,7 +92,7 @@ static void test_versioninfo(void) return; } - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),"GetCORVersion returned %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetCORVersion returned %08x\n", hr); hr = pGetCORVersion(version, MAX_PATH, &size); ok(hr == S_OK,"GetCORVersion returned %08x\n", hr); @@ -107,12 +107,12 @@ static void test_versioninfo(void) path_len = size; hr = pGetCORSystemDirectory(path, path_len-1 , &size); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetCORSystemDirectory returned %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetCORSystemDirectory returned %08x\n", hr); if (0) /* crashes on <= w2k3 */ { hr = pGetCORSystemDirectory(NULL, MAX_PATH , &size); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetCORSystemDirectory returned %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetCORSystemDirectory returned %08x\n", hr); } hr = pGetCORSystemDirectory(path, MAX_PATH , NULL); @@ -140,7 +140,7 @@ static void test_versioninfo(void) ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr); hr = pGetRequestedRuntimeInfo( NULL, v2_0, NULL, 0, 0, path, 1, &path_len, version, MAX_PATH, &size); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetRequestedRuntimeInfo returned %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetRequestedRuntimeInfo returned %08x\n", hr); /* if one of the buffers is NULL, the other one is still happily filled */ memset(version, 0, sizeof(version));
1
0
0
0
Hans Leidekker : msi: Don't skip the media check for the first volume.
by Alexandre Julliard
15 Oct '14
15 Oct '14
Module: wine Branch: master Commit: 5cb10c96b26d07b7d0aabe3b8e337c7ce144b8af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5cb10c96b26d07b7d0aabe3b8…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 15 15:30:23 2014 +0200 msi: Don't skip the media check for the first volume. Some installers require the first volume to be reinserted. --- dlls/msi/media.c | 9 +-------- dlls/msi/msipriv.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 8646069..c26ac41 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -298,9 +298,6 @@ static UINT CDECL msi_media_get_disk_info(MSIPACKAGE *package, MSIMEDIAINFO *mi) mi->cabinet = strdupW(MSI_RecordGetString(row, 4)); mi->volume_label = strdupW(MSI_RecordGetString(row, 5)); - if (!mi->first_volume) - mi->first_volume = strdupW(mi->volume_label); - msiobj_release(&row->hdr); return ERROR_SUCCESS; } @@ -673,7 +670,6 @@ void msi_free_media_info(MSIMEDIAINFO *mi) msi_free(mi->disk_prompt); msi_free(mi->cabinet); msi_free(mi->volume_label); - msi_free(mi->first_volume); msi_free(mi); } @@ -719,9 +715,6 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi) mi->volume_label = strdupW(MSI_RecordGetString(row, 5)); msiobj_release(&row->hdr); - if (!mi->first_volume) - mi->first_volume = strdupW(mi->volume_label); - msi_set_sourcedir_props(package, FALSE); source_dir = msi_dup_property(package->db, szSourceDir); lstrcpyW(mi->sourcedir, source_dir); @@ -891,7 +884,7 @@ UINT ready_media( MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi ) } } /* check volume matches, change media if not */ - if (mi->volume_label && mi->disk_id > 1 && strcmpW( mi->first_volume, mi->volume_label )) + if (mi->volume_label && mi->disk_id > 1) { WCHAR *source = msi_dup_property( package->db, szSourceDir ); BOOL match = source_matches_volume( mi, source ); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 75d1920..d0b2247 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -154,7 +154,6 @@ typedef struct tagMSIMEDIAINFO UINT last_sequence; LPWSTR disk_prompt; LPWSTR cabinet; - LPWSTR first_volume; LPWSTR volume_label; BOOL is_continuous; BOOL is_extracted;
1
0
0
0
Akihiro Sagawa : server: KeyNameInformation returns the full name of the key.
by Alexandre Julliard
15 Oct '14
15 Oct '14
Module: wine Branch: master Commit: e94d2e045960978f8c48c4e9527f88f1229bf4be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e94d2e045960978f8c48c4e95…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Tue Oct 14 00:25:00 2014 +0900 server: KeyNameInformation returns the full name of the key. --- dlls/ntdll/tests/reg.c | 19 ++++++++++++++----- server/registry.c | 25 ++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 22048f9..08af73e 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -1285,7 +1285,7 @@ static void test_NtQueryKey(void) HANDLE key; NTSTATUS status; OBJECT_ATTRIBUTES attr; - ULONG len; + ULONG length, len; KEY_NAME_INFORMATION *info = NULL; UNICODE_STRING str; @@ -1293,21 +1293,30 @@ static void test_NtQueryKey(void) status = pNtOpenKey(&key, KEY_READ, &attr); ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status); - status = pNtQueryKey(key, KeyNameInformation, NULL, 0, &len); + status = pNtQueryKey(key, KeyNameInformation, NULL, 0, &length); if (status == STATUS_INVALID_PARAMETER) { win_skip("KeyNameInformation is not supported\n"); pNtClose(key); return; } todo_wine ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryKey Failed: 0x%08x\n", status); + info = HeapAlloc(GetProcessHeap(), 0, length); - info = HeapAlloc(GetProcessHeap(), 0, len); - status = pNtQueryKey(key, KeyNameInformation, info, len, &len); + /* non-zero buffer size, but insufficient */ + status = pNtQueryKey(key, KeyNameInformation, info, sizeof(*info), &len); + ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryKey Failed: 0x%08x\n", status); + ok(length == len, "got %d, expected %d\n", len, length); + ok(info->NameLength == winetestpath.Length, "got %d, expected %d\n", + info->NameLength, winetestpath.Length); + + /* correct buffer size */ + status = pNtQueryKey(key, KeyNameInformation, info, length, &len); ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08x\n", status); + ok(length == len, "got %d, expected %d\n", len, length); str.Buffer = info->Name; str.Length = info->NameLength; - todo_wine ok(pRtlCompareUnicodeString(&winetestpath, &str, TRUE) == 0, + ok(pRtlCompareUnicodeString(&winetestpath, &str, TRUE) == 0, "got %s, expected %s\n", wine_dbgstr_wn(str.Buffer, str.Length/sizeof(WCHAR)), wine_dbgstr_wn(winetestpath.Buffer, winetestpath.Length/sizeof(WCHAR))); diff --git a/server/registry.c b/server/registry.c index 1436bfe..4aaaf03 100644 --- a/server/registry.c +++ b/server/registry.c @@ -864,10 +864,12 @@ static struct key *create_key_recursive( struct key *key, const struct unicode_s static void enum_key( const struct key *key, int index, int info_class, struct enum_key_reply *reply ) { + static const WCHAR backslash[] = { '\\' }; int i; data_size_t len, namelen, classlen; data_size_t max_subkey = 0, max_class = 0; data_size_t max_value = 0, max_data = 0; + const struct key *k; char *data; if (index != -1) /* -1 means use the specified key directly */ @@ -885,8 +887,14 @@ static void enum_key( const struct key *key, int index, int info_class, switch(info_class) { - case KeyBasicInformation: case KeyNameInformation: + namelen = 0; + for (k = key; k != root_key; k = k->parent) + namelen += k->namelen + sizeof(backslash); + if (!namelen) return; + namelen += sizeof(root_name) - sizeof(backslash); + /* fall through */ + case KeyBasicInformation: classlen = 0; /* only return the name */ /* fall through */ case KeyNodeInformation: @@ -935,6 +943,21 @@ static void enum_key( const struct key *key, int index, int info_class, memcpy( data, key->name, namelen ); memcpy( data + namelen, key->class, len - namelen ); } + else if (info_class == KeyNameInformation) + { + data_size_t pos = namelen; + reply->namelen = namelen; + for (k = key; k != root_key; k = k->parent) + { + pos -= k->namelen; + if (pos < len) memcpy( data + namelen, k->name, + min( k->namelen, len - pos ) ); + pos -= sizeof(backslash); + if (pos < len) memcpy( data + namelen, backslash, + min( sizeof(backslash), len - pos ) ); + } + memcpy( data, root_name, min( sizeof(root_name) - sizeof(backslash), len ) ); + } else { reply->namelen = len;
1
0
0
0
Nikolay Sivov : dwrite: Block negative max height/width for layout.
by Alexandre Julliard
15 Oct '14
15 Oct '14
Module: wine Branch: master Commit: 617f668f49ddd6293799c29f8614fee4af60991d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=617f668f49ddd6293799c29f8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 14 10:03:28 2014 +0400 dwrite: Block negative max height/width for layout. --- dlls/dwrite/layout.c | 8 ++++++++ dlls/dwrite/tests/layout.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index c48a7c1..0afd466 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -772,6 +772,10 @@ static HRESULT WINAPI dwritetextlayout_SetMaxWidth(IDWriteTextLayout2 *iface, FL { struct dwrite_textlayout *This = impl_from_IDWriteTextLayout2(iface); TRACE("(%p)->(%.1f)\n", This, maxWidth); + + if (maxWidth < 0.0) + return E_INVALIDARG; + This->maxwidth = maxWidth; return S_OK; } @@ -780,6 +784,10 @@ static HRESULT WINAPI dwritetextlayout_SetMaxHeight(IDWriteTextLayout2 *iface, F { struct dwrite_textlayout *This = impl_from_IDWriteTextLayout2(iface); TRACE("(%p)->(%.1f)\n", This, maxHeight); + + if (maxHeight < 0.0) + return E_INVALIDARG; + This->maxheight = maxHeight; return S_OK; } diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index bff9d15..0975ee8 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -550,6 +550,7 @@ static void test_fontweight(void) IDWriteTextLayout *layout; DWRITE_FONT_WEIGHT weight; DWRITE_TEXT_RANGE range; + FLOAT size; HRESULT hr; hr = IDWriteFactory_CreateTextFormat(factory, tahomaW, NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL, @@ -581,6 +582,48 @@ static void test_fontweight(void) ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "got %d\n", weight); ok(range.length == 6, "got %d\n", range.length); + size = IDWriteTextLayout_GetMaxWidth(layout); + ok(size == 100.0, "got %.2f\n", size); + + hr = IDWriteTextLayout_SetMaxWidth(layout, 0.0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + size = IDWriteTextLayout_GetMaxWidth(layout); + ok(size == 0.0, "got %.2f\n", size); + + hr = IDWriteTextLayout_SetMaxWidth(layout, -1.0); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + size = IDWriteTextLayout_GetMaxWidth(layout); + ok(size == 0.0, "got %.2f\n", size); + + hr = IDWriteTextLayout_SetMaxWidth(layout, 100.0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + size = IDWriteTextLayout_GetMaxWidth(layout); + ok(size == 100.0, "got %.2f\n", size); + + size = IDWriteTextLayout_GetMaxHeight(layout); + ok(size == 100.0, "got %.2f\n", size); + + hr = IDWriteTextLayout_SetMaxHeight(layout, 0.0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + size = IDWriteTextLayout_GetMaxHeight(layout); + ok(size == 0.0, "got %.2f\n", size); + + hr = IDWriteTextLayout_SetMaxHeight(layout, -1.0); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + size = IDWriteTextLayout_GetMaxHeight(layout); + ok(size == 0.0, "got %.2f\n", size); + + hr = IDWriteTextLayout_SetMaxHeight(layout, 100.0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + size = IDWriteTextLayout_GetMaxHeight(layout); + ok(size == 100.0, "got %.2f\n", size); + IDWriteTextLayout_Release(layout); IDWriteTextFormat_Release(fmt2); IDWriteTextFormat_Release(format);
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
40
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Results per page:
10
25
50
100
200