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
November 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
394 discussions
Start a n
N
ew thread
Piotr Caban : msvcp110: Add codecvt::length export.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: 688d4140a7b90ca4029ec3c6b27600a567ec1deb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=688d4140a7b90ca4029ec3c6b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Nov 7 13:20:50 2014 +0100 msvcp110: Add codecvt::length export. --- dlls/msvcp110/msvcp110.spec | 36 ++++++++++++++++++------------------ dlls/msvcp70/msvcp70.spec | 7 ++++--- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 6d3118a..a2c5ac9 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -2120,15 +2120,15 @@ @ cdecl -arch=arm ?do_is@?$ctype@_W@std@@MBA_NF_W@Z(ptr long long) ctype_wchar_do_is_ch @ thiscall -arch=i386 ?do_is@?$ctype@_W@std@@MBE_NF_W@Z(ptr long long) ctype_wchar_do_is_ch @ cdecl -arch=win64 ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z(ptr long long) ctype_wchar_do_is_ch -@ stub -arch=arm ?do_length@?$codecvt@DDH@std@@MBAHAAHPBD1I@Z -@ stub -arch=i386 ?do_length@?$codecvt@DDH@std@@MBEHAAHPBD1I@Z -@ stub -arch=win64 ?do_length@?$codecvt@DDH@std@@MEBAHAEAHPEBD1_K@Z -@ stub -arch=arm ?do_length@?$codecvt@GDH@std@@MBAHAAHPBD1I@Z -@ stub -arch=i386 ?do_length@?$codecvt@GDH@std@@MBEHAAHPBD1I@Z -@ stub -arch=win64 ?do_length@?$codecvt@GDH@std@@MEBAHAEAHPEBD1_K@Z -@ stub -arch=arm ?do_length@?$codecvt@_WDH@std@@MBAHAAHPBD1I@Z -@ stub -arch=i386 ?do_length@?$codecvt@_WDH@std@@MBEHAAHPBD1I@Z -@ stub -arch=win64 ?do_length@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1_K@Z +@ cdecl -arch=arm ?do_length@?$codecvt@DDH@std@@MBAHAAHPBD1I@Z(ptr ptr str str long) codecvt_char_do_length +@ thiscall -arch=i386 ?do_length@?$codecvt@DDH@std@@MBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_char_do_length +@ cdecl -arch=win64 ?do_length@?$codecvt@DDH@std@@MEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_char_do_length +@ cdecl -arch=arm ?do_length@?$codecvt@GDH@std@@MBAHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length +@ thiscall -arch=i386 ?do_length@?$codecvt@GDH@std@@MBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length +@ cdecl -arch=win64 ?do_length@?$codecvt@GDH@std@@MEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_wchar_do_length +@ cdecl -arch=arm ?do_length@?$codecvt@_WDH@std@@MBAHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length +@ thiscall -arch=i386 ?do_length@?$codecvt@_WDH@std@@MBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length +@ cdecl -arch=win64 ?do_length@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_wchar_do_length @ cdecl -arch=arm ?do_max_length@?$codecvt@GDH@std@@MBAHXZ(ptr) codecvt_wchar_do_max_length @ thiscall -arch=i386 ?do_max_length@?$codecvt@GDH@std@@MBEHXZ(ptr) codecvt_wchar_do_max_length @ cdecl -arch=win64 ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ(ptr) codecvt_wchar_do_max_length @@ -2846,15 +2846,15 @@ @ cdecl -arch=arm ?iword@ios_base@std@@QAAAAJH@Z(ptr long) ios_base_iword @ thiscall -arch=i386 ?iword@ios_base@std@@QAEAAJH@Z(ptr long) ios_base_iword @ cdecl -arch=win64 ?iword@ios_base@std@@QEAAAEAJH@Z(ptr long) ios_base_iword -@ stub -arch=arm ?length@?$codecvt@DDH@std@@QBAHAAHPBD1I@Z -@ stub -arch=i386 ?length@?$codecvt@DDH@std@@QBEHAAHPBD1I@Z -@ stub -arch=win64 ?length@?$codecvt@DDH@std@@QEBAHAEAHPEBD1_K@Z -@ stub -arch=arm ?length@?$codecvt@GDH@std@@QBAHAAHPBD1I@Z -@ stub -arch=i386 ?length@?$codecvt@GDH@std@@QBEHAAHPBD1I@Z -@ stub -arch=win64 ?length@?$codecvt@GDH@std@@QEBAHAEAHPEBD1_K@Z -@ stub -arch=arm ?length@?$codecvt@_WDH@std@@QBAHAAHPBD1I@Z -@ stub -arch=i386 ?length@?$codecvt@_WDH@std@@QBEHAAHPBD1I@Z -@ stub -arch=win64 ?length@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1_K@Z +@ cdecl -arch=arm ?length@?$codecvt@DDH@std@@QBAHAAHPBD1I@Z(ptr ptr str str long) codecvt_char_length +@ thiscall -arch=i386 ?length@?$codecvt@DDH@std@@QBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_char_length +@ cdecl -arch=win64 ?length@?$codecvt@DDH@std@@QEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_char_length +@ cdecl -arch=arm ?length@?$codecvt@GDH@std@@QBAHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_length +@ thiscall -arch=i386 ?length@?$codecvt@GDH@std@@QBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_length +@ cdecl -arch=win64 ?length@?$codecvt@GDH@std@@QEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_wchar_length +@ cdecl -arch=arm ?length@?$codecvt@_WDH@std@@QBAHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_length +@ thiscall -arch=i386 ?length@?$codecvt@_WDH@std@@QBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_length +@ cdecl -arch=win64 ?length@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_wchar_length @ cdecl -arch=arm ?max_length@codecvt_base@std@@QBAHXZ(ptr) codecvt_base_max_length @ thiscall -arch=i386 ?max_length@codecvt_base@std@@QBEHXZ(ptr) codecvt_base_max_length @ cdecl -arch=win64 ?max_length@codecvt_base@std@@QEBAHXZ(ptr) codecvt_base_max_length diff --git a/dlls/msvcp70/msvcp70.spec b/dlls/msvcp70/msvcp70.spec index f2022dd..749e64a 100644 --- a/dlls/msvcp70/msvcp70.spec +++ b/dlls/msvcp70/msvcp70.spec @@ -2855,11 +2855,12 @@ @ cdecl -arch=win64 ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z(ptr ptr ptr ptr) ctype_wchar_do_is @ thiscall -arch=i386 ?do_is@?$ctype@_W@std@@MBE_NF_W@Z(ptr long long) ctype_wchar_do_is_ch @ cdecl -arch=win64 ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z(ptr long long) ctype_wchar_do_is_ch -@ stub -arch=win32 ?do_length@?$codecvt@DDH@std@@MBEHAAHPBD1I@Z -@ stub -arch=win64 ?do_length@?$codecvt@DDH@std@@MEBAHAEAHPEBD1_K@Z +@ thiscall -arch=i386 ?do_length@?$codecvt@DDH@std@@MBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_char_do_length +@ cdecl -arch=win64 ?do_length@?$codecvt@DDH@std@@MEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_char_do_length @ thiscall -arch=win32 ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z(ptr ptr str str long) codecvt_char_do_length @ cdecl -arch=win64 ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z(ptr ptr str str long) codecvt_char_do_length -@ stub -arch=win32 ?do_length@?$codecvt@GDH@std@@MBEHAAHPBD1I@Z +@ thiscall -arch=i386 ?do_length@?$codecvt@GDH@std@@MBEHAAHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length +@ cdecl -arch=win64 ?do_length@?$codecvt@GDH@std@@MEBAHAEAHPEBD1_K@Z(ptr ptr str str long) codecvt_wchar_do_length @ thiscall -arch=win32 ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length @ cdecl -arch=win64 ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z(ptr ptr str str long) codecvt_wchar_do_length @ thiscall -arch=win32 ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z(ptr ptr str str long) codecvt_wchar_do_length
1
0
0
0
Nikolay Sivov : dwrite: Remove OpenType language id from cache.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: 53209e70170437dddbcad8662ca5b2754d549bbc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53209e70170437dddbcad8662…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 10 10:03:28 2014 +0300 dwrite: Remove OpenType language id from cache. --- dlls/dwrite/analyzer.c | 21 +++++++++++++++++---- dlls/dwrite/dwrite_private.h | 20 ++++++++++++++++---- dlls/dwrite/shape.c | 26 +++++++++----------------- 3 files changed, 42 insertions(+), 25 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 82e9fa5..3670e46 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -844,6 +844,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props, UINT32* actual_glyph_count) { const struct dwritescript_properties *scriptprops; + struct scriptshaping_context context; struct scriptshaping_cache *cache; WCHAR *string; BOOL update_cluster; @@ -924,13 +925,25 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, } *actual_glyph_count = g; - hr = create_scriptshaping_cache(fontface, locale, &cache); + hr = create_scriptshaping_cache(fontface, &cache); if (FAILED(hr)) goto done; + context.cache = cache; + context.text = text; + context.length = length; + context.is_rtl = is_rtl; + context.max_glyph_count = max_glyph_count; + context.language_tag = DWRITE_MAKE_OPENTYPE_TAG('d','f','l','t'); + if (locale) { + WCHAR tag[5]; + if (GetLocaleInfoEx(locale, LOCALE_SOPENTYPELANGUAGETAG, tag, sizeof(tag)/sizeof(WCHAR))) + context.language_tag = DWRITE_MAKE_OPENTYPE_TAG(tag[0],tag[1],tag[2],tag[3]); + } + scriptprops = &dwritescripts_properties[script]; if (scriptprops->ops && scriptprops->ops->contextual_shaping) { - hr = scriptprops->ops->contextual_shaping(cache, is_rtl, string, length, max_glyph_count, clustermap, glyph_indices, actual_glyph_count); + hr = scriptprops->ops->contextual_shaping(&context, clustermap, glyph_indices, actual_glyph_count); if (FAILED(hr)) goto done; } @@ -938,9 +951,9 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, /* FIXME: apply default features */ if (scriptprops->ops && scriptprops->ops->set_text_glyphs_props) - hr = scriptprops->ops->set_text_glyphs_props(cache, string, length, clustermap, glyph_indices, *actual_glyph_count, text_props, glyph_props); + hr = scriptprops->ops->set_text_glyphs_props(&context, clustermap, glyph_indices, *actual_glyph_count, text_props, glyph_props); else - hr = default_shaping_ops.set_text_glyphs_props(cache, string, length, clustermap, glyph_indices, *actual_glyph_count, text_props, glyph_props); + hr = default_shaping_ops.set_text_glyphs_props(&context, clustermap, glyph_indices, *actual_glyph_count, text_props, glyph_props); done: release_scriptshaping_cache(cache); diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 57983ed..d1c42ce 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -143,14 +143,26 @@ enum SCRIPT_JUSTIFY }; struct scriptshaping_cache; -extern HRESULT create_scriptshaping_cache(IDWriteFontFace*,const WCHAR*,struct scriptshaping_cache**) DECLSPEC_HIDDEN; + +struct scriptshaping_context +{ + struct scriptshaping_cache *cache; + UINT32 language_tag; + + const WCHAR *text; + UINT32 length; + BOOL is_rtl; + + UINT32 max_glyph_count; +}; + +extern HRESULT create_scriptshaping_cache(IDWriteFontFace*,struct scriptshaping_cache**) DECLSPEC_HIDDEN; extern void release_scriptshaping_cache(struct scriptshaping_cache*) DECLSPEC_HIDDEN; struct scriptshaping_ops { - HRESULT (*contextual_shaping)(struct scriptshaping_cache *cache, BOOL is_rtl, const WCHAR *text, UINT32 len, UINT32 max_glyph_count, - UINT16 *clustermap, UINT16 *glyph_indices, UINT32* actual_glyph_count); - HRESULT (*set_text_glyphs_props)(struct scriptshaping_cache *cache, const WCHAR *text, UINT32 len, UINT16 *clustermap, UINT16 *glyph_indices, + HRESULT (*contextual_shaping)(struct scriptshaping_context *context, UINT16 *clustermap, UINT16 *glyph_indices, UINT32* actual_glyph_count); + HRESULT (*set_text_glyphs_props)(struct scriptshaping_context *context, UINT16 *clustermap, UINT16 *glyph_indices, UINT32 glyphcount, DWRITE_SHAPING_TEXT_PROPERTIES *text_props, DWRITE_SHAPING_GLYPH_PROPERTIES *glyph_props); }; diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index 00c9548..c1ae452 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -28,10 +28,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); struct scriptshaping_cache { IDWriteFontFace *fontface; - UINT32 language_tag; }; -HRESULT create_scriptshaping_cache(IDWriteFontFace *fontface, const WCHAR *locale, struct scriptshaping_cache **cache) +HRESULT create_scriptshaping_cache(IDWriteFontFace *fontface, struct scriptshaping_cache **cache) { struct scriptshaping_cache *ret; @@ -42,13 +41,6 @@ HRESULT create_scriptshaping_cache(IDWriteFontFace *fontface, const WCHAR *local ret->fontface = fontface; IDWriteFontFace_AddRef(fontface); - ret->language_tag = DWRITE_MAKE_OPENTYPE_TAG('d','f','l','t'); - if (locale) { - WCHAR tag[5]; - if (GetLocaleInfoEx(locale, LOCALE_SOPENTYPELANGUAGETAG, tag, sizeof(tag)/sizeof(WCHAR))) - ret->language_tag = DWRITE_MAKE_OPENTYPE_TAG(tag[0],tag[1],tag[2],tag[3]); - } - *cache = ret; return S_OK; @@ -122,7 +114,7 @@ static INT32 map_glyph_to_text_pos(const UINT16 *clustermap, UINT32 len, UINT16 return k; } -static HRESULT default_set_text_glyphs_props(struct scriptshaping_cache *cache, const WCHAR *text, UINT32 len, UINT16 *clustermap, UINT16 *glyph_indices, +static HRESULT default_set_text_glyphs_props(struct scriptshaping_context *context, UINT16 *clustermap, UINT16 *glyph_indices, UINT32 glyphcount, DWRITE_SHAPING_TEXT_PROPERTIES *text_props, DWRITE_SHAPING_GLYPH_PROPERTIES *glyph_props) { UINT32 i; @@ -132,36 +124,36 @@ static HRESULT default_set_text_glyphs_props(struct scriptshaping_cache *cache, UINT32 char_count = 0; INT32 k; - k = map_glyph_to_text_pos(clustermap, len, i); + k = map_glyph_to_text_pos(clustermap, context->length, i); if (k >= 0) { - for (; k < len && clustermap[k] == i; k++) + for (; k < context->length && clustermap[k] == i; k++) char_index[char_count++] = k; } if (char_count == 0) continue; - if (char_count == 1 && isspaceW(text[char_index[0]])) { + if (char_count == 1 && isspaceW(context->text[char_index[0]])) { glyph_props[i].justification = SCRIPT_JUSTIFY_BLANK; - text_props[char_index[0]].isShapedAlone = text[char_index[0]] == ' '; + text_props[char_index[0]].isShapedAlone = context->text[char_index[0]] == ' '; } else glyph_props[i].justification = SCRIPT_JUSTIFY_CHARACTER; } /* FIXME: update properties using GDEF table */ - shape_update_clusters_from_glyphprop(glyphcount, len, clustermap, glyph_props); + shape_update_clusters_from_glyphprop(glyphcount, context->length, clustermap, glyph_props); return S_OK; } -static HRESULT latn_set_text_glyphs_props(struct scriptshaping_cache *cache, const WCHAR *text, UINT32 len, UINT16 *clustermap, UINT16 *glyph_indices, +static HRESULT latn_set_text_glyphs_props(struct scriptshaping_context *context, UINT16 *clustermap, UINT16 *glyph_indices, UINT32 glyphcount, DWRITE_SHAPING_TEXT_PROPERTIES *text_props, DWRITE_SHAPING_GLYPH_PROPERTIES *glyph_props) { HRESULT hr; UINT32 i; - hr = default_set_text_glyphs_props(cache, text, len, clustermap, glyph_indices, glyphcount, text_props, glyph_props); + hr = default_set_text_glyphs_props(context, clustermap, glyph_indices, glyphcount, text_props, glyph_props); for (i = 0; i < glyphcount; i++) if (glyph_props[i].isZeroWidthSpace)
1
0
0
0
Iván Matellanes : msvcrt: Added _fread_nolock_s implementation.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: bcbd83d1543a345fca994266eff224fb7fd9be9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcbd83d1543a345fca994266e…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Sun Nov 9 20:17:45 2014 +0100 msvcrt: Added _fread_nolock_s implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr100/tests/msvcr100.c | 35 +++++++++++++++++++++++++++++++++++ dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/file.c | 26 ++++++++++++++++++++++++-- dlls/msvcrt/msvcrt.h | 1 + include/msvcrt/stdio.h | 2 ++ 9 files changed, 67 insertions(+), 7 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index cb45506..a6e7771 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -835,7 +835,7 @@ @ cdecl _fputwc_nolock(long ptr) MSVCRT__fputwc_nolock @ cdecl _fputwchar(long) MSVCRT__fputwchar @ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock -@ stub _fread_nolock_s +@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s @ cdecl _free_locale(ptr) MSVCRT__free_locale @ stub _freea @ stub _freea_s diff --git a/dlls/msvcr100/tests/msvcr100.c b/dlls/msvcr100/tests/msvcr100.c index a998fb5..4c66ed5 100644 --- a/dlls/msvcr100/tests/msvcr100.c +++ b/dlls/msvcr100/tests/msvcr100.c @@ -140,6 +140,8 @@ static int (__cdecl *p_wmemmove_s)(wchar_t *dest, size_t numberOfElements, const static FILE* (__cdecl *p_fopen)(const char*,const char*); static int (__cdecl *p_fclose)(FILE*); static size_t (__cdecl *p_fread_s)(void*,size_t,size_t,size_t,FILE*); +static void (__cdecl *p_lock_file)(FILE*); +static void (__cdecl *p_unlock_file)(FILE*); static void* (__cdecl *p__aligned_offset_malloc)(size_t, size_t, size_t); static void (__cdecl *p__aligned_free)(void*); static size_t (__cdecl *p__aligned_msize)(void*, size_t, size_t); @@ -178,6 +180,8 @@ static BOOL init(void) SET(p_fopen, "fopen"); SET(p_fclose, "fclose"); SET(p_fread_s, "fread_s"); + SET(p_lock_file, "_lock_file"); + SET(p_unlock_file, "_unlock_file"); SET(p__aligned_offset_malloc, "_aligned_offset_malloc"); SET(p__aligned_free, "_aligned_free"); SET(p__aligned_msize, "_aligned_msize"); @@ -357,11 +361,30 @@ static void test_wmemmove_s(void) "Cannot reset invalid parameter handler\n"); } +struct block_file_arg +{ + FILE *test_file; + HANDLE init; + HANDLE finish; +}; + +static DWORD WINAPI block_file(void *arg) +{ + struct block_file_arg *files = arg; + p_lock_file(files->test_file); + SetEvent(files->init); + WaitForSingleObject(files->finish, INFINITE); + p_unlock_file(files->test_file); + return 0; +} + static void test_fread_s(void) { static const char test_file[] = "fread_s.tst"; int ret; char buf[10]; + HANDLE thread; + struct block_file_arg arg; FILE *f = fopen(test_file, "w"); if(!f) { @@ -382,6 +405,12 @@ static void test_fread_s(void) CHECK_CALLED(invalid_parameter_handler); f = p_fopen(test_file, "r"); + arg.test_file = f; + arg.init = CreateEventW(NULL, FALSE, FALSE, NULL); + arg.finish = CreateEventW(NULL, FALSE, FALSE, NULL); + thread = CreateThread(NULL, 0, block_file, (void*)&arg, 0, NULL); + WaitForSingleObject(arg.init, INFINITE); + errno = 0xdeadbeef; ret = p_fread_s(NULL, sizeof(buf), 0, 1, f); ok(ret == 0, "fread_s returned %d, expected 0\n", ret); @@ -390,6 +419,9 @@ static void test_fread_s(void) ok(ret == 0, "fread_s returned %d, expected 0\n", ret); ok(errno == 0xdeadbeef, "errno = %d, expected 0xdeadbeef\n", errno); + SetEvent(arg.finish); + WaitForSingleObject(thread, INFINITE); + SET_EXPECT(invalid_parameter_handler); errno = 0xdeadbeef; ret = p_fread_s(NULL, sizeof(buf), 1, 1, f); @@ -426,6 +458,9 @@ static void test_fread_s(void) ok(p_set_invalid_parameter_handler(NULL) == test_invalid_parameter_handler, "Cannot reset invalid parameter handler\n"); + CloseHandle(arg.init); + CloseHandle(arg.finish); + CloseHandle(thread); unlink(test_file); } diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index d41699d..141697c 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1183,7 +1183,7 @@ @ cdecl _fputwc_nolock(long ptr) MSVCRT__fputwc_nolock @ cdecl _fputwchar(long) MSVCRT__fputwchar @ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock -@ stub _fread_nolock_s +@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s @ cdecl _free_locale(ptr) MSVCRT__free_locale @ stub _freea @ stub _freea_s diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index fbf688e..1b8dc28 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1181,7 +1181,7 @@ @ cdecl _fputwc_nolock(long ptr) MSVCRT__fputwc_nolock @ cdecl _fputwchar(long) MSVCRT__fputwchar @ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock -@ stub _fread_nolock_s +@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s @ cdecl _free_locale(ptr) MSVCRT__free_locale @ stub _freea @ stub _freea_s diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index efb4539..fcad7cd 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -502,7 +502,7 @@ @ cdecl _fputwc_nolock(long ptr) MSVCRT__fputwc_nolock @ cdecl _fputwchar(long) MSVCRT__fputwchar @ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock -@ stub _fread_nolock_s +@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s @ cdecl _free_locale(ptr) MSVCRT__free_locale @ stub _freea @ stub _freea_s diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index fa62366..7328b46 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -484,7 +484,7 @@ @ cdecl _fputwc_nolock(long ptr) MSVCRT__fputwc_nolock @ cdecl _fputwchar(long) MSVCRT__fputwchar @ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock -@ stub _fread_nolock_s +@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s @ cdecl _free_locale(ptr) MSVCRT__free_locale @ stub _freea @ stub _freea_s diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 491942d..5049605 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4130,9 +4130,31 @@ MSVCRT_size_t CDECL MSVCRT__fread_nolock(void *ptr, MSVCRT_size_t size, MSVCRT_s MSVCRT_size_t CDECL MSVCRT_fread_s(void *buf, MSVCRT_size_t buf_size, MSVCRT_size_t elem_size, MSVCRT_size_t count, MSVCRT_FILE *stream) { + MSVCRT_size_t ret; + + if(!MSVCRT_CHECK_PMT(stream != NULL)) { + if(buf && buf_size) + memset(buf, 0, buf_size); + return 0; + } + if(!elem_size || !count) return 0; + + MSVCRT__lock_file(stream); + ret = MSVCRT__fread_nolock_s(buf, buf_size, elem_size, count, stream); + MSVCRT__unlock_file(stream); + + return ret; +} + +/********************************************************************* + * _fread_nolock_s (MSVCR80.@) + */ +MSVCRT_size_t CDECL MSVCRT__fread_nolock_s(void *buf, MSVCRT_size_t buf_size, MSVCRT_size_t elem_size, + MSVCRT_size_t count, MSVCRT_FILE *stream) +{ size_t bytes_left, buf_pos; - TRACE("(%p %lu %lu %lu %p\n", buf, buf_size, elem_size, count, stream); + TRACE("(%p %lu %lu %lu %p)\n", buf, buf_size, elem_size, count, stream); if(!MSVCRT_CHECK_PMT(stream != NULL)) { if(buf && buf_size) @@ -4154,7 +4176,7 @@ MSVCRT_size_t CDECL MSVCRT_fread_s(void *buf, MSVCRT_size_t buf_size, MSVCRT_siz return 0; } - MSVCRT_fread((char*)buf+buf_pos, 1, size, stream); + MSVCRT__fread_nolock((char*)buf+buf_pos, 1, size, stream); buf_pos += size; bytes_left -= size; }else { diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 70ac68b..72d529d 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -934,6 +934,7 @@ MSVCRT_ulong* __cdecl MSVCRT___doserrno(void); int* __cdecl MSVCRT__errno(void); char* __cdecl MSVCRT_getenv(const char*); MSVCRT_size_t __cdecl MSVCRT__fread_nolock(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*); +MSVCRT_size_t __cdecl MSVCRT__fread_nolock_s(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*); MSVCRT_size_t __cdecl MSVCRT__fwrite_nolock(const void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*); int __cdecl MSVCRT_fclose(MSVCRT_FILE*); int __cdecl MSVCRT__fclose_nolock(MSVCRT_FILE*); diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index eda89e6..0606d07 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -128,6 +128,7 @@ int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,__ms_va_list); 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 _fread_nolock_s(void*,size_t,size_t,size_t,FILE*); size_t __cdecl _fwrite_nolock(const void*,size_t,size_t,FILE*); int __cdecl _fclose_nolock(FILE*); int __cdecl _fflush_nolock(FILE*); @@ -156,6 +157,7 @@ int __cdecl fprintf_s(FILE*,const char*,...); int __cdecl fputc(int,FILE*); int __cdecl fputs(const char*,FILE*); size_t __cdecl fread(void*,size_t,size_t,FILE*); +size_t __cdecl fread_s(void*,size_t,size_t,size_t,FILE*); FILE* __cdecl freopen(const char*,const char*,FILE*); int __cdecl fscanf(FILE*,const char*,...); int __cdecl fscanf_s(FILE*,const char*,...);
1
0
0
0
Iván Matellanes : msvcrt: Add missing declarations in wchar.h.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: e4f9f53719b2bb381ebef8c3f680971fbc151133 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4f9f53719b2bb381ebef8c3f…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Sun Nov 9 20:17:31 2014 +0100 msvcrt: Add missing declarations in wchar.h. --- include/msvcrt/wchar.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index d936dc3..702fa67 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -313,12 +313,18 @@ int __cdecl _wstat64(const wchar_t*,struct _stat64*); #ifndef _WSTDIO_DEFINED #define _WSTDIO_DEFINED +wint_t __cdecl _fgetwc_nolock(FILE*); wint_t __cdecl _fgetwchar(void); +wint_t __cdecl _fputwc_nolock(wint_t,FILE*); wint_t __cdecl _fputwchar(wint_t); +wint_t __cdecl _getwc_nolock(FILE*); wchar_t* __cdecl _getws(wchar_t*); +wint_t __cdecl _putwc_nolock(wint_t,FILE*); int __cdecl _putws(const wchar_t*); int __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...); int __cdecl _snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...); +int __cdecl _scwprintf(const wchar_t*,...); +wint_t __cdecl _ungetwc_nolock(wint_t,FILE*); int __cdecl _vscwprintf(const wchar_t*,__ms_va_list); int __cdecl _vscwprintf_p_l(const wchar_t*,_locale_t,__ms_va_list); int __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
1
0
0
0
Nikolay Sivov : include: Add a couple more defines for D3DPRESENT_* flags.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: d0ad33c219b58cbc133524001abef4163c2a3747 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0ad33c219b58cbc133524001…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Nov 8 18:58:20 2014 +0300 include: Add a couple more defines for D3DPRESENT_* flags. --- include/d3d9.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/d3d9.h b/include/d3d9.h index d5107db..712104b 100644 --- a/include/d3d9.h +++ b/include/d3d9.h @@ -62,6 +62,8 @@ #define D3D_SDK_VERSION 32 #define D3DADAPTER_DEFAULT 0 #define D3DENUM_NO_WHQL_LEVEL __MSABI_LONG(0x00000002) +#define D3DPRESENT_DONOTWAIT __MSABI_LONG(1) +#define D3DPRESENT_LINEAR_CONTENT __MSABI_LONG(2) #define D3DPRESENT_BACK_BUFFERS_MAX __MSABI_LONG(3) #define D3DSGR_NO_CALIBRATION __MSABI_LONG(0x00000000) #define D3DSGR_CALIBRATE __MSABI_LONG(0x00000001)
1
0
0
0
Huw Davies : user32: Make the combo's listbox a topmost window.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: 4c2ad39140cc256b18bc2ea3f4b0d9539ef34a1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c2ad39140cc256b18bc2ea3f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Nov 7 16:48:49 2014 +0000 user32: Make the combo's listbox a topmost window. --- dlls/user32/combo.c | 2 +- dlls/user32/tests/combo.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 2aa4424..e891c58 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1059,7 +1059,7 @@ static void CBDropDown( LPHEADCOMBO lphc ) r.bottom = min( r.top + nDroppedHeight, mon_info.rcWork.bottom ); } - SetWindowPos( lphc->hWndLBox, HWND_TOP, r.left, r.top, r.right - r.left, r.bottom - r.top, + SetWindowPos( lphc->hWndLBox, HWND_TOPMOST, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOACTIVATE | SWP_SHOWWINDOW ); diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index d9875ea..b6d5ef6 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -537,6 +537,61 @@ static void test_editselection(void) DestroyWindow(hCombo); } +static void test_listbox_styles(DWORD cb_style) +{ + BOOL (WINAPI *pGetComboBoxInfo)(HWND, PCOMBOBOXINFO); + HWND combo; + COMBOBOXINFO info; + DWORD style, exstyle, expect_style, expect_exstyle; + BOOL ret; + + pGetComboBoxInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); + if (!pGetComboBoxInfo){ + win_skip("GetComboBoxInfo is not available\n"); + return; + } + + expect_style = WS_CHILD|WS_CLIPSIBLINGS|LBS_COMBOBOX|LBS_HASSTRINGS|LBS_NOTIFY; + if (cb_style == CBS_SIMPLE) + { + expect_style |= WS_VISIBLE; + expect_exstyle = WS_EX_CLIENTEDGE; + } + else + { + expect_style |= WS_BORDER; + expect_exstyle = WS_EX_TOOLWINDOW; + } + + combo = build_combo(cb_style); + info.cbSize = sizeof(COMBOBOXINFO); + SetLastError(0xdeadbeef); + ret = pGetComboBoxInfo(combo, &info); + ok(ret, "Failed to get combobox info structure.\n"); + + style = GetWindowLongW( info.hwndList, GWL_STYLE ); + exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); + ok(style == expect_style, "%08x: got %08x\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + + if (cb_style != CBS_SIMPLE) + expect_exstyle |= WS_EX_TOPMOST; + + SendMessageW(combo, CB_SHOWDROPDOWN, TRUE, 0 ); + style = GetWindowLongW( info.hwndList, GWL_STYLE ); + exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); + ok(style == (expect_style | WS_VISIBLE), "%08x: got %08x\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + + SendMessageW(combo, CB_SHOWDROPDOWN, FALSE, 0 ); + style = GetWindowLongW( info.hwndList, GWL_STYLE ); + exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); + ok(style == expect_style, "%08x: got %08x\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + + DestroyWindow(combo); +} + START_TEST(combo) { hMainWnd = CreateWindowA("static", "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0); @@ -551,6 +606,9 @@ START_TEST(combo) test_changesize(CBS_DROPDOWN); test_changesize(CBS_DROPDOWNLIST); test_editselection(); + test_listbox_styles(CBS_SIMPLE); + test_listbox_styles(CBS_DROPDOWN); + test_listbox_styles(CBS_DROPDOWNLIST); DestroyWindow(hMainWnd); }
1
0
0
0
Mark Harmstone : winealsa: Disable channel remapping for capture devices.
by Alexandre Julliard
10 Nov '14
10 Nov '14
Module: wine Branch: master Commit: 8fe52db332352946484e438581bd48e41469853f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fe52db332352946484e43858…
Author: Mark Harmstone <hellas(a)burntcomma.com> Date: Fri Nov 7 15:13:32 2014 +0000 winealsa: Disable channel remapping for capture devices. --- dlls/winealsa.drv/mmdevdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 5f623c0..5ad72f9 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -1162,7 +1162,7 @@ static DWORD get_channel_mask(unsigned int channels) static HRESULT map_channels(ACImpl *This, const WAVEFORMATEX *fmt) { - if(fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE || fmt->nChannels > 2){ + if(This->dataflow != eCapture && (fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE || fmt->nChannels > 2) ){ WAVEFORMATEXTENSIBLE *fmtex = (void*)fmt; DWORD mask, flag = SPEAKER_FRONT_LEFT; UINT i = 0;
1
0
0
0
Stefan Dösinger : ddraw/tests: Fix some COM macro versions in test_coop_level_mode_set.
by Alexandre Julliard
07 Nov '14
07 Nov '14
Module: wine Branch: master Commit: 5d17f9bc7c1ca849a97f2f6f1271c4b698f97d31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d17f9bc7c1ca849a97f2f6f1…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Nov 6 23:47:22 2014 +0100 ddraw/tests: Fix some COM macro versions in test_coop_level_mode_set. --- dlls/ddraw/tests/ddraw2.c | 6 +++--- dlls/ddraw/tests/ddraw4.c | 20 ++++++++++---------- dlls/ddraw/tests/ddraw7.c | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 607f14c..ad0d040 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -2424,7 +2424,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw2_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2682,7 +2682,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw2_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2786,7 +2786,7 @@ static void test_coop_level_mode_set(void) s.bottom - s.top, ddsd.dwHeight); IDirectDrawSurface_Release(primary); - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw2_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); /* If the window is changed at the same time, messages are sent to the new window. */ diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 1224698..69f3ac7 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -2611,7 +2611,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw4_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2736,7 +2736,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw4_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2862,7 +2862,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw4_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2934,13 +2934,13 @@ static void test_coop_level_mode_set(void) hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); - hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); + hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); ok(ddsd.dwWidth == fullscreen_rect.right - fullscreen_rect.left, "Expected surface width %u, got %u.\n", fullscreen_rect.right - fullscreen_rect.left, ddsd.dwWidth); ok(ddsd.dwHeight == fullscreen_rect.bottom - fullscreen_rect.top, "Expected surface height %u, got %u.\n", fullscreen_rect.bottom - fullscreen_rect.top, ddsd.dwHeight); - IDirectDrawSurface_Release(primary); + IDirectDrawSurface4_Release(primary); /* The screen restore is a property of DDSCL_EXCLUSIVE */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); @@ -2958,15 +2958,15 @@ static void test_coop_level_mode_set(void) hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); - hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); + hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); ok(ddsd.dwWidth == s.right - s.left, "Expected surface width %u, got %u.\n", s.right - s.left, ddsd.dwWidth); ok(ddsd.dwHeight == s.bottom - s.top, "Expected surface height %u, got %u.\n", s.bottom - s.top, ddsd.dwHeight); - IDirectDrawSurface_Release(primary); + IDirectDrawSurface4_Release(primary); - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw4_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); /* If the window is changed at the same time, messages are sent to the new window. */ @@ -3009,13 +3009,13 @@ static void test_coop_level_mode_set(void) hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); - hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); + hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); ok(ddsd.dwWidth == fullscreen_rect.right - fullscreen_rect.left, "Expected surface width %u, got %u.\n", fullscreen_rect.right - fullscreen_rect.left, ddsd.dwWidth); ok(ddsd.dwHeight == fullscreen_rect.bottom - fullscreen_rect.top, "Expected surface height %u, got %u.\n", fullscreen_rect.bottom - fullscreen_rect.top, ddsd.dwHeight); - IDirectDrawSurface_Release(primary); + IDirectDrawSurface4_Release(primary); ref = IDirectDraw4_Release(ddraw); ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 282432f..3aebfa7 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -2288,7 +2288,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw7_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2539,7 +2539,7 @@ static void test_coop_level_mode_set(void) screen_size.cx = 0; screen_size.cy = 0; - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw7_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); @@ -2643,7 +2643,7 @@ static void test_coop_level_mode_set(void) s.bottom - s.top, ddsd.dwHeight); IDirectDrawSurface7_Release(primary); - hr = IDirectDraw_RestoreDisplayMode(ddraw); + hr = IDirectDraw7_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); /* If the window is changed at the same time, messages are sent to the new window. */
1
0
0
0
Stefan Dösinger : ddraw/tests: Check if the current display settings match the registry settings.
by Alexandre Julliard
07 Nov '14
07 Nov '14
Module: wine Branch: master Commit: c436a525e432f35c374cbb6888bafe74997f5fa0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c436a525e432f35c374cbb688…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Nov 6 23:47:21 2014 +0100 ddraw/tests: Check if the current display settings match the registry settings. --- dlls/ddraw/tests/ddraw1.c | 68 ++++++++++++++++++++++++++++------------------- dlls/ddraw/tests/ddraw2.c | 68 ++++++++++++++++++++++++++++------------------- dlls/ddraw/tests/ddraw4.c | 68 ++++++++++++++++++++++++++++------------------- dlls/ddraw/tests/ddraw7.c | 67 +++++++++++++++++++++++++++------------------- 4 files changed, 159 insertions(+), 112 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c436a525e432f35c374cb…
1
0
0
0
Nikolay Sivov : dwrite: Implement ConvertFontToLOGFONT().
by Alexandre Julliard
07 Nov '14
07 Nov '14
Module: wine Branch: master Commit: a8ad62aa51f8da1e86dd05a41186322467079210 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8ad62aa51f8da1e86dd05a41…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Nov 7 13:17:38 2014 +0300 dwrite: Implement ConvertFontToLOGFONT(). --- dlls/dwrite/dwrite_private.h | 3 ++- dlls/dwrite/font.c | 22 ++++++++++++++---- dlls/dwrite/gdiinterop.c | 50 ++++++++++++++++++++++++++++++++++++++-- dlls/dwrite/main.c | 2 +- dlls/dwrite/tests/font.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 124 insertions(+), 8 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index b606d23..57983ed 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -106,7 +106,8 @@ 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*,IDWriteFontCollection**) DECLSPEC_HIDDEN; +extern HRESULT create_font_collection(IDWriteFactory*,IDWriteFontFileEnumerator*,BOOL,IDWriteFontCollection**) DECLSPEC_HIDDEN; +extern BOOL is_system_collection(IDWriteFontCollection*) DECLSPEC_HIDDEN; /* Opentype font table functions */ extern HRESULT opentype_analyze_font(IDWriteFontFileStream*,UINT32*,DWRITE_FONT_FILE_TYPE*,DWRITE_FONT_FACE_TYPE*,BOOL*) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 36d333f..8bb39fa 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -31,6 +31,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); #define MS_CMAP_TAG DWRITE_MAKE_OPENTYPE_TAG('c','m','a','p') #define MS_NAME_TAG DWRITE_MAKE_OPENTYPE_TAG('n','a','m','e') +static const IID IID_issystemcollection = {0x14d88047,0x331f,0x4cd3,{0xbc,0xa8,0x3e,0x67,0x99,0xaf,0x34,0x75}}; + struct dwrite_font_data { LONG ref; @@ -66,6 +68,7 @@ struct dwrite_fontcollection { struct dwrite_fontfamily_data **family_data; UINT32 family_count; UINT32 family_alloc; + BOOL is_system; }; struct dwrite_fontfamily { @@ -1190,6 +1193,12 @@ static HRESULT create_fontfamily(struct dwrite_fontfamily_data *data, IDWriteFon return S_OK; } +BOOL is_system_collection(IDWriteFontCollection *collection) +{ + void *obj; + return IDWriteFontCollection_QueryInterface(collection, &IID_issystemcollection, (void**)&obj) == S_OK; +} + static HRESULT WINAPI dwritefontcollection_QueryInterface(IDWriteFontCollection *iface, REFIID riid, void **obj) { struct dwrite_fontcollection *This = impl_from_IDWriteFontCollection(iface); @@ -1204,6 +1213,10 @@ static HRESULT WINAPI dwritefontcollection_QueryInterface(IDWriteFontCollection } *obj = NULL; + + if (This->is_system && IsEqualIID(riid, &IID_issystemcollection)) + return S_OK; + return E_NOINTERFACE; } @@ -1413,12 +1426,13 @@ static HRESULT fontcollection_add_family(struct dwrite_fontcollection *collectio return S_OK; } -static HRESULT init_font_collection(struct dwrite_fontcollection *collection) +static HRESULT init_font_collection(struct dwrite_fontcollection *collection, BOOL is_system) { collection->IDWriteFontCollection_iface.lpVtbl = &fontcollectionvtbl; collection->ref = 1; collection->family_count = 0; collection->family_alloc = 2; + collection->is_system = is_system; collection->family_data = heap_alloc(sizeof(*collection->family_data)*2); if (!collection->family_data) @@ -1506,7 +1520,7 @@ static HRESULT init_fontfamily_data(IDWriteLocalizedStrings *familyname, struct return S_OK; } -HRESULT create_font_collection(IDWriteFactory* factory, IDWriteFontFileEnumerator *enumerator, IDWriteFontCollection **ret) +HRESULT create_font_collection(IDWriteFactory* factory, IDWriteFontFileEnumerator *enumerator, BOOL is_system, IDWriteFontCollection **ret) { struct dwrite_fontcollection *collection; BOOL current = FALSE; @@ -1517,7 +1531,7 @@ HRESULT create_font_collection(IDWriteFactory* factory, IDWriteFontFileEnumerato collection = heap_alloc(sizeof(struct dwrite_fontcollection)); if (!collection) return E_OUTOFMEMORY; - hr = init_font_collection(collection); + hr = init_font_collection(collection, is_system); if (FAILED(hr)) { heap_free(collection); return hr; @@ -1765,7 +1779,7 @@ HRESULT get_system_fontcollection(IDWriteFactory *factory, IDWriteFontCollection return hr; TRACE("building system font collection for factory %p\n", factory); - hr = create_font_collection(factory, enumerator, collection); + hr = create_font_collection(factory, enumerator, TRUE, collection); IDWriteFontFileEnumerator_Release(enumerator); return hr; } diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index b099e52..3715bf0 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -326,8 +326,54 @@ static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface, IDWriteFont *font, LOGFONTW *logfont, BOOL *is_systemfont) { struct gdiinterop *This = impl_from_IDWriteGdiInterop(iface); - FIXME("(%p)->(%p %p %p): stub\n", This, font, logfont, is_systemfont); - return E_NOTIMPL; + static const WCHAR enusW[] = {'e','n','-','u','s',0}; + DWRITE_FONT_SIMULATIONS simulations; + IDWriteFontCollection *collection; + IDWriteLocalizedStrings *name; + IDWriteFontFamily *family; + DWRITE_FONT_STYLE style; + UINT32 index; + BOOL exists; + HRESULT hr; + + TRACE("(%p)->(%p %p %p)\n", This, font, logfont, is_systemfont); + + *is_systemfont = FALSE; + + if (!font) + return E_INVALIDARG; + + hr = IDWriteFont_GetFontFamily(font, &family); + if (FAILED(hr)) + return hr; + + hr = IDWriteFontFamily_GetFontCollection(family, &collection); + IDWriteFontFamily_Release(family); + if (FAILED(hr)) + return hr; + + *is_systemfont = is_system_collection(collection); + IDWriteFontCollection_Release(collection); + + simulations = IDWriteFont_GetSimulations(font); + style = IDWriteFont_GetStyle(font); + + logfont->lfCharSet = DEFAULT_CHARSET; + logfont->lfWeight = IDWriteFont_GetWeight(font); + logfont->lfItalic = style == DWRITE_FONT_STYLE_ITALIC || (simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE); + logfont->lfOutPrecision = OUT_OUTLINE_PRECIS; + logfont->lfFaceName[0] = 0; + + exists = FALSE; + hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &name, &exists); + if (FAILED(hr) || !exists) + return hr; + + IDWriteLocalizedStrings_FindLocaleName(name, enusW, &index, &exists); + IDWriteLocalizedStrings_GetString(name, index, logfont->lfFaceName, sizeof(logfont->lfFaceName)/sizeof(WCHAR)); + IDWriteLocalizedStrings_Release(name); + + return S_OK; } static HRESULT WINAPI gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop *iface, diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index 023ae4f..2868c3b 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -631,7 +631,7 @@ static HRESULT WINAPI dwritefactory_CreateCustomFontCollection(IDWriteFactory *i if (FAILED(hr)) return hr; - hr = create_font_collection(iface, enumerator, collection); + hr = create_font_collection(iface, enumerator, FALSE, collection); IDWriteFontFileEnumerator_Release(enumerator); return hr; } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index d7e61e5..60d0d44 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -2266,6 +2266,60 @@ todo_wine DeleteFileW(test_fontfile); } +static void test_ConvertFontToLOGFONT(void) +{ + IDWriteFactory *factory, *factory2; + IDWriteFontCollection *collection; + IDWriteGdiInterop *interop; + IDWriteFontFamily *family; + IDWriteFont *font; + LOGFONTW logfont; + BOOL system; + HRESULT hr; + + factory = create_factory(); + factory2 = create_factory(); + + interop = NULL; + hr = IDWriteFactory_GetGdiInterop(factory, &interop); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFactory_GetSystemFontCollection(factory2, &collection, FALSE); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, + DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); + ok(hr == S_OK, "got 0x%08x\n", hr); + +if (0) { /* crashes on native */ + IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, NULL, NULL); + IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, &logfont, NULL); + IDWriteGdiInterop_ConvertFontToLOGFONT(interop, font, NULL, &system); +} + system = TRUE; + hr = IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, &logfont, &system); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(!system, "got %d\n", system); + + system = FALSE; + memset(&logfont, 0, sizeof(logfont)); + hr = IDWriteGdiInterop_ConvertFontToLOGFONT(interop, font, &logfont, &system); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(system, "got %d\n", system); + ok(logfont.lfFaceName[0] != 0, "got face name %s\n", wine_dbgstr_w(logfont.lfFaceName)); + + IDWriteFactory_Release(factory2); + + IDWriteFontCollection_Release(collection); + IDWriteFontFamily_Release(family); + IDWriteFont_Release(font); + IDWriteGdiInterop_Release(interop); + IDWriteFactory_Release(factory); +} + START_TEST(font) { IDWriteFactory *factory; @@ -2296,6 +2350,7 @@ START_TEST(font) test_GetSimulations(); test_GetFaceNames(); test_TryGetFontTable(); + test_ConvertFontToLOGFONT(); IDWriteFactory_Release(factory); }
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
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