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 2020
----- 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
1 participants
796 discussions
Start a n
N
ew thread
Gijs Vermeulen : quartz/vmr9: Don't expose IVMRMonitorConfig9 in renderless mode.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: f708161a478072d06866003a2c1e75e51736371f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f708161a478072d06866003a…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Mon Oct 26 15:37:21 2020 +0100 quartz/vmr9: Don't expose IVMRMonitorConfig9 in renderless mode. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 2 +- dlls/quartz/vmr9.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 2d09caea14e..7f8ce5b26f4 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -322,7 +322,7 @@ static void test_interfaces(void) todo_wine check_interface(filter, &IID_IBasicVideo, FALSE); check_interface(filter, &IID_IBasicVideo2, FALSE); todo_wine check_interface(filter, &IID_IVideoWindow, FALSE); - todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); + check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); check_interface(filter, &IID_IVMRWindowlessControl9, FALSE); ref = IBaseFilter_Release(filter); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index fb5a846c24b..8bad3f5bdb7 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -613,7 +613,8 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, *out = &filter->IVMRMixerControl9_iface; else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig)) *out = &filter->IVMRMonitorConfig_iface; - else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9) && is_vmr9(filter)) + else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9) + && filter->mode != VMR9Mode_Renderless && is_vmr9(filter)) *out = &filter->IVMRMonitorConfig9_iface; else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify) && filter->mode == (VMR9Mode)VMRMode_Renderless && !is_vmr9(filter))
1
0
0
0
Gijs Vermeulen : quartz/vmr9: Don't expose IVMRMonitorConfig9 from the VMR7.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: ef8acacaefe6aa5415366fc77824ab3515a74e78 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef8acacaefe6aa5415366fc7…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Mon Oct 26 15:37:20 2020 +0100 quartz/vmr9: Don't expose IVMRMonitorConfig9 from the VMR7. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr7.c | 6 +++--- dlls/quartz/vmr9.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 9c70926330e..39592afce66 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -257,7 +257,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRMixerBitmap9, FALSE); check_interface(filter, &IID_IVMRMixerControl, FALSE); check_interface(filter, &IID_IVMRMixerControl9, FALSE); - todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); + check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE); check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE); check_interface(filter, &IID_IVMRWindowlessControl, FALSE); @@ -290,7 +290,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE); check_interface(filter, &IID_IVMRMixerControl, FALSE); check_interface(filter, &IID_IVMRMixerControl9, FALSE); - todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); + check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); check_interface(filter, &IID_IVMRWindowlessControl9, FALSE); IBaseFilter_FindPin(filter, L"VMR Input0", &pin); @@ -317,7 +317,7 @@ static void test_interfaces(void) todo_wine check_interface(filter, &IID_IVideoWindow, FALSE); check_interface(filter, &IID_IVMRMixerControl, FALSE); todo_wine check_interface(filter, &IID_IVMRMonitorConfig, FALSE); - todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); + check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE); check_interface(filter, &IID_IVMRWindowlessControl, FALSE); check_interface(filter, &IID_IVMRWindowlessControl9, FALSE); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index aa4187404c6..fb5a846c24b 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -613,7 +613,7 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, *out = &filter->IVMRMixerControl9_iface; else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig)) *out = &filter->IVMRMonitorConfig_iface; - else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9)) + else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9) && is_vmr9(filter)) *out = &filter->IVMRMonitorConfig9_iface; else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify) && filter->mode == (VMR9Mode)VMRMode_Renderless && !is_vmr9(filter))
1
0
0
0
Gijs Vermeulen : quartz/vmr9: Don't expose IVMRFilterConfig9 from the VMR7.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 08166d7a2d076c27aa963b032c1871a1bf97df64 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=08166d7a2d076c27aa963b03…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Mon Oct 26 15:37:19 2020 +0100 quartz/vmr9: Don't expose IVMRFilterConfig9 from the VMR7. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr7.c | 2 +- dlls/quartz/vmr9.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index d7eafe53be8..9c70926330e 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -253,7 +253,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IReferenceClock, FALSE); check_interface(filter, &IID_IVMRAspectRatioControl9, FALSE); check_interface(filter, &IID_IVMRDeinterlaceControl9, FALSE); - todo_wine check_interface(filter, &IID_IVMRFilterConfig9, FALSE); + check_interface(filter, &IID_IVMRFilterConfig9, FALSE); check_interface(filter, &IID_IVMRMixerBitmap9, FALSE); check_interface(filter, &IID_IVMRMixerControl, FALSE); check_interface(filter, &IID_IVMRMixerControl9, FALSE); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 5f95f547e33..aa4187404c6 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -605,7 +605,7 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, *out = &filter->IAMFilterMiscFlags_iface; else if (IsEqualGUID(iid, &IID_IVMRFilterConfig)) *out = &filter->IVMRFilterConfig_iface; - else if (IsEqualGUID(iid, &IID_IVMRFilterConfig9)) + else if (IsEqualGUID(iid, &IID_IVMRFilterConfig9) && is_vmr9(filter)) *out = &filter->IVMRFilterConfig9_iface; else if (IsEqualGUID(iid, &IID_IVMRMixerBitmap9) && is_vmr9(filter)) *out = &filter->IVMRMixerBitmap9_iface;
1
0
0
0
Alexandre Julliard : gdi32: Move the AddFontMemResourceEx() implementation out of freetype.c.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: f6d9908e4864efd59e26c41129aeef6880c53b22 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6d9908e4864efd59e26c411…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 12:05:19 2020 +0100 gdi32: Move the AddFontMemResourceEx() implementation out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 44 +++++++++++++++++++++++++++++--------------- dlls/gdi32/freetype.c | 35 +++++++++-------------------------- dlls/gdi32/gdi_private.h | 2 +- 3 files changed, 39 insertions(+), 42 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 2e926fa52fc..af87c66498f 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -5429,34 +5429,48 @@ BOOL WINAPI RemoveFontResourceW( LPCWSTR str ) /*********************************************************************** * AddFontMemResourceEx (GDI32.@) */ -HANDLE WINAPI AddFontMemResourceEx( PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts) +HANDLE WINAPI AddFontMemResourceEx( PVOID ptr, DWORD size, PVOID pdv, DWORD *pcFonts ) { HANDLE ret; DWORD num_fonts; + void *copy; - if (!pbFont || !cbFont || !pcFonts) + if (!ptr || !size || !pcFonts) { SetLastError(ERROR_INVALID_PARAMETER); return NULL; } if (!font_funcs) return NULL; + if (!(copy = HeapAlloc( GetProcessHeap(), 0, size ))) return NULL; + memcpy( copy, ptr, size ); + EnterCriticalSection( &font_cs ); - ret = font_funcs->pAddFontMemResourceEx( pbFont, cbFont, pdv, &num_fonts ); + num_fonts = font_funcs->add_mem_font( copy, size, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE ); LeaveCriticalSection( &font_cs ); - if (ret) + + if (!num_fonts) { - __TRY - { - *pcFonts = num_fonts; - } - __EXCEPT_PAGE_FAULT - { - WARN("page fault while writing to *pcFonts (%p)\n", pcFonts); - RemoveFontMemResourceEx(ret); - ret = 0; - } - __ENDTRY + HeapFree( GetProcessHeap(), 0, copy ); + return NULL; + } + + /* FIXME: is the handle only for use in RemoveFontMemResourceEx or should it be a true handle? + * For now return something unique but quite random + */ + ret = (HANDLE)((INT_PTR)copy ^ 0x87654321); + + __TRY + { + *pcFonts = num_fonts; + } + __EXCEPT_PAGE_FAULT + { + WARN("page fault while writing to *pcFonts (%p)\n", pcFonts); + RemoveFontMemResourceEx( ret ); + ret = 0; } + __ENDTRY + TRACE( "Returning handle %p\n", ret ); return ret; } diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 286af040355..9ed6077443f 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -2107,6 +2107,14 @@ static INT CDECL freetype_add_font( const WCHAR *file, DWORD flags ) return ret; } +/************************************************************* + * freetype_add_mem_font + */ +static INT CDECL freetype_add_mem_font( void *ptr, SIZE_T size, DWORD flags ) +{ + return AddFontToList( NULL, NULL, ptr, size, flags ); +} + /************************************************************* * freetype_remove_font */ @@ -3049,31 +3057,6 @@ static void delete_external_font_keys(void) if(winnt_key) RegCloseKey(winnt_key); } -/************************************************************* - * freetype_AddFontMemResourceEx - * - */ -static HANDLE CDECL freetype_AddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts) -{ - PVOID pFontCopy = HeapAlloc(GetProcessHeap(), 0, cbFont); - - TRACE("Copying %d bytes of data from %p to %p\n", cbFont, pbFont, pFontCopy); - memcpy(pFontCopy, pbFont, cbFont); - - *pcFonts = AddFontToList(NULL, NULL, pFontCopy, cbFont, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE); - if (*pcFonts == 0) - { - TRACE("AddFontToList failed\n"); - HeapFree(GetProcessHeap(), 0, pFontCopy); - return 0; - } - /* FIXME: is the handle only for use in RemoveFontMemResourceEx or should it be a true handle? - * For now return something unique but quite random - */ - TRACE("Returning handle %lx\n", ((INT_PTR)pFontCopy)^0x87654321); - return (HANDLE)(((INT_PTR)pFontCopy)^0x87654321); -} - static WCHAR *get_ttf_file_name( LPCWSTR font_file, LPCWSTR font_path ) { WCHAR *fullname; @@ -7477,9 +7460,9 @@ static const struct font_backend_funcs font_funcs = freetype_GetCharWidthInfo, freetype_GetFontUnicodeRanges, freetype_SelectFont, - freetype_AddFontMemResourceEx, freetype_CreateScalableFontResource, freetype_add_font, + freetype_add_mem_font, freetype_remove_font, freetype_alloc_font, freetype_get_font_data, diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 4fd59cfd9bc..32cdace5c7d 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -370,10 +370,10 @@ struct font_backend_funcs DWORD (CDECL *pGetFontUnicodeRanges)( struct gdi_font *font, GLYPHSET *glyphset ); struct gdi_font * (CDECL *pSelectFont)( DC *dc, HFONT hfont, UINT *aa_flags, UINT default_aa_flags ); - HANDLE (CDECL *pAddFontMemResourceEx)( void *font, DWORD size, PVOID pdv, DWORD *count ); BOOL (CDECL *pCreateScalableFontResource)( DWORD hidden, LPCWSTR resource, LPCWSTR font_file, LPCWSTR font_path ); INT (CDECL *add_font)( const WCHAR *file, DWORD flags ); + INT (CDECL *add_mem_font)( void *ptr, SIZE_T size, DWORD flags ); BOOL (CDECL *remove_font)( const WCHAR *file, DWORD flags ); BOOL (CDECL *alloc_font)( struct gdi_font *font );
1
0
0
0
Alexandre Julliard : gdi32: Move the Add/RemoveFontResource() implementation out of freetype.c.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 047bf2522304c8b5772902404f7683d4b746fe08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=047bf2522304c8b577290240…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 12:04:36 2020 +0100 gdi32: Move the Add/RemoveFontResource() implementation out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 110 ++++++++++++++++++++++++++++++++++++++--------- dlls/gdi32/freetype.c | 86 +++++++----------------------------- dlls/gdi32/gdi_private.h | 11 ++++- 3 files changed, 114 insertions(+), 93 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=047bf2522304c8b57729…
1
0
0
0
Alexandre Julliard : gdi32: Move the fonts directory helper functions out of freetype.c.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: f3a75923a671e5bc07eaec43c79369e0b8974e01 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f3a75923a671e5bc07eaec43…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 12:03:21 2020 +0100 gdi32: Move the fonts directory helper functions out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/Makefile.in | 2 +- dlls/gdi32/font.c | 43 ++++++++++++++++++++++++++++++++++ dlls/gdi32/freetype.c | 60 +++++++----------------------------------------- dlls/gdi32/gdi_private.h | 4 ++++ 4 files changed, 56 insertions(+), 53 deletions(-) diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index a94abad599d..3b78f5e132f 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -52,4 +52,4 @@ C_SRCS = \ RC_SRCS = gdi32.rc -freetype_EXTRADEFS = -DWINE_FONT_DIR=\"`${MAKEDEP} -R ${datadir}/wine ${fontdir}`\" +font_EXTRADEFS = -DWINE_FONT_DIR=\"`${MAKEDEP} -R ${datadir}/wine ${fontdir}`\" diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 27aa129c0de..2331c7cf784 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -350,6 +350,49 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; CRITICAL_SECTION font_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; +#ifndef WINE_FONT_DIR +#define WINE_FONT_DIR "fonts" +#endif + +void get_font_dir( WCHAR *path ) +{ + static const WCHAR slashW[] = {'\\',0}; + static const WCHAR fontsW[] = {'\\','f','o','n','t','s',0}; + static const WCHAR winedatadirW[] = {'W','I','N','E','D','A','T','A','D','I','R',0}; + static const WCHAR winebuilddirW[] = {'W','I','N','E','B','U','I','L','D','D','I','R',0}; + + if (GetEnvironmentVariableW( winedatadirW, path, MAX_PATH )) + { + const char fontdir[] = WINE_FONT_DIR; + strcatW( path, slashW ); + MultiByteToWideChar( CP_ACP, 0, fontdir, -1, path + strlenW(path), MAX_PATH - strlenW(path) ); + } + else if (GetEnvironmentVariableW( winebuilddirW, path, MAX_PATH )) + { + strcatW( path, fontsW ); + } + if (path[5] == ':') memmove( path, path + 4, (strlenW(path) - 3) * sizeof(WCHAR) ); + else path[1] = '\\'; /* change \??\ to \\?\ */ +} + +void get_fonts_data_dir_path( const WCHAR *file, WCHAR *path ) +{ + static const WCHAR slashW[] = {'\\',0}; + + get_font_dir( path ); + strcatW( path, slashW ); + strcatW( path, file ); +} + +void get_fonts_win_dir_path( const WCHAR *file, WCHAR *path ) +{ + static const WCHAR fontsW[] = {'\\','f','o','n','t','s','\\',0}; + + GetWindowsDirectoryW( path, MAX_PATH ); + strcatW( path, fontsW ); + strcatW( path, file ); +} + /* realized font objects */ #define FIRST_FONT_HANDLE 1 diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 16fb92dd73b..7129acfeb5c 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -225,10 +225,6 @@ MAKE_FUNCPTR(FcPatternGetString); #define GASP_GRIDFIT 0x01 #define GASP_DOGRAY 0x02 -#ifndef WINE_FONT_DIR -#define WINE_FONT_DIR "fonts" -#endif - /* This is basically a copy of FT_Bitmap_Size with an extra element added */ typedef struct { FT_Short height; @@ -2858,46 +2854,6 @@ static void load_mac_fonts(void) #endif -static void get_font_dir( WCHAR *path ) -{ - static const WCHAR slashW[] = {'\\',0}; - static const WCHAR fontsW[] = {'\\','f','o','n','t','s',0}; - static const WCHAR winedatadirW[] = {'W','I','N','E','D','A','T','A','D','I','R',0}; - static const WCHAR winebuilddirW[] = {'W','I','N','E','B','U','I','L','D','D','I','R',0}; - - if (GetEnvironmentVariableW( winedatadirW, path, MAX_PATH )) - { - const char fontdir[] = WINE_FONT_DIR; - strcatW( path, slashW ); - MultiByteToWideChar( CP_ACP, 0, fontdir, -1, path + strlenW(path), MAX_PATH - strlenW(path) ); - } - else if (GetEnvironmentVariableW( winebuilddirW, path, MAX_PATH )) - { - strcatW( path, fontsW ); - } - if (path[5] == ':') memmove( path, path + 4, (strlenW(path) - 3) * sizeof(WCHAR) ); - else path[1] = '\\'; /* change \??\ to \\?\ */ -} - -static void get_data_dir_path( LPCWSTR file, WCHAR *path ) -{ - static const WCHAR slashW[] = {'\\','\0'}; - - get_font_dir( path ); - strcatW( path, slashW ); - strcatW( path, file ); -} - -static void get_winfonts_dir_path(LPCWSTR file, WCHAR *path) -{ - static const WCHAR slashW[] = {'\\','\0'}; - - GetWindowsDirectoryW(path, MAX_PATH); - strcatW(path, fontsW); - strcatW(path, slashW); - strcatW(path, file); -} - static void load_system_fonts(void) { HKEY hkey; @@ -2910,10 +2866,10 @@ static void load_system_fonts(void) dlen = sizeof(data); if(RegQueryValueExW(hkey, *value, 0, &type, (void*)data, &dlen) == ERROR_SUCCESS && type == REG_SZ) { - get_winfonts_dir_path( data, pathW ); + get_fonts_win_dir_path( data, pathW ); if (!add_font_resource( pathW, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE )) { - get_data_dir_path( data, pathW ); + get_fonts_data_dir_path( data, pathW ); add_font_resource( pathW, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); } } @@ -3110,12 +3066,12 @@ static INT CDECL freetype_AddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv if (!ret && !strchrW(file, '\\')) { /* Try in %WINDIR%/fonts, needed for Fotobuch Designer */ - get_winfonts_dir_path( file, path ); + get_fonts_win_dir_path( file, path ); ret = add_font_resource( path, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE ); /* Try in datadir/fonts (or builddir/fonts), needed for Magic the Gathering Online */ if (!ret) { - get_data_dir_path( file, path ); + get_fonts_data_dir_path( file, path ); ret = add_font_resource( path, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE ); } } @@ -3163,11 +3119,11 @@ static BOOL CDECL freetype_RemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID if (!ret && !strchrW(file, '\\')) { - get_winfonts_dir_path( file, path ); + get_fonts_win_dir_path( file, path ); ret = remove_font_resource( path, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE ); if (!ret) { - get_data_dir_path( file, path ); + get_fonts_data_dir_path( file, path ); ret = remove_font_resource( path, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE ); } } @@ -3615,10 +3571,10 @@ static void init_font_list(void) { WCHAR pathW[MAX_PATH]; - get_winfonts_dir_path( data, pathW ); + get_fonts_win_dir_path( data, pathW ); if (!add_font_resource( pathW, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE )) { - get_data_dir_path( data, pathW ); + get_fonts_data_dir_path( data, pathW ); add_font_resource( pathW, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); } } diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 8036dfb986b..d7680464b6a 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -382,6 +382,10 @@ struct font_backend_funcs void (CDECL *destroy_font)( struct gdi_font *font ); }; +extern void get_font_dir( WCHAR *path ) DECLSPEC_HIDDEN; +extern void get_fonts_data_dir_path( const WCHAR *file, WCHAR *path ) DECLSPEC_HIDDEN; +extern void get_fonts_win_dir_path( const WCHAR *file, WCHAR *path ) DECLSPEC_HIDDEN; + extern struct gdi_font *alloc_gdi_font( const WCHAR *file, void *data_ptr, SIZE_T data_size ) DECLSPEC_HIDDEN; extern void free_gdi_font( struct gdi_font *font ) DECLSPEC_HIDDEN; extern void cache_gdi_font( struct gdi_font *font ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : gdi32: Move the kerning pairs data into the generic font structure.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: df335e3405c19fb9e91c1fd696bb58892aab30c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=df335e3405c19fb9e91c1fd6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 11:50:07 2020 +0100 gdi32: Move the kerning pairs data into the generic font structure. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 18 +++++++++++++++--- dlls/gdi32/freetype.c | 49 +++++++++++------------------------------------- dlls/gdi32/gdi_private.h | 4 +++- 3 files changed, 29 insertions(+), 42 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 6fe211eac3d..27aa129c0de 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -426,6 +426,7 @@ struct gdi_font *alloc_gdi_font( const WCHAR *file, void *data_ptr, SIZE_T data_ font->refcount = 1; font->matrix.eM11 = font->matrix.eM22 = 1.0; font->scale_y = 1.0; + font->kern_count = -1; if (file) { @@ -468,6 +469,7 @@ void free_gdi_font( struct gdi_font *font ) HeapFree( GetProcessHeap(), 0, font->otm.otmpFaceName ); HeapFree( GetProcessHeap(), 0, font->otm.otmpFullName ); HeapFree( GetProcessHeap(), 0, font->gm ); + HeapFree( GetProcessHeap(), 0, font->kern_pairs ); HeapFree( GetProcessHeap(), 0, font ); } @@ -1179,17 +1181,27 @@ static DWORD CDECL font_GetGlyphOutline( PHYSDEV dev, UINT glyph, UINT format, static DWORD CDECL font_GetKerningPairs( PHYSDEV dev, DWORD count, KERNINGPAIR *pairs ) { struct font_physdev *physdev = get_font_dev( dev ); - DWORD ret; if (!physdev->font) { dev = GET_NEXT_PHYSDEV( dev, pGetKerningPairs ); return dev->funcs->pGetKerningPairs( dev, count, pairs ); } + EnterCriticalSection( &font_cs ); - ret = font_funcs->pGetKerningPairs( physdev->font, count, pairs ); + if (physdev->font->kern_count == -1) + physdev->font->kern_count = font_funcs->get_kerning_pairs( physdev->font, + &physdev->font->kern_pairs ); LeaveCriticalSection( &font_cs ); - return ret; + + if (count && pairs) + { + count = min( count, physdev->font->kern_count ); + memcpy( pairs, physdev->font->kern_pairs, count * sizeof(*pairs) ); + } + else count = physdev->font->kern_count; + + return count; } diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 01a66600063..16fb92dd73b 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -302,8 +302,6 @@ typedef struct { struct tagGdiFont { struct gdi_font *gdi_font; - DWORD total_kern_pairs; - KERNINGPAIR *kern_pairs; struct list child_fonts; /* the following members can be accessed without locking, they are never modified after creation */ @@ -4021,8 +4019,6 @@ static UINT get_nearest_charset(const WCHAR *family_name, Face *face, UINT *cp) static BOOL CDECL freetype_alloc_font( struct gdi_font *font ) { GdiFont *ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)); - ret->total_kern_pairs = (DWORD)-1; - ret->kern_pairs = NULL; list_init(&ret->child_fonts); ret->gdi_font = font; font->private = ret; @@ -4048,7 +4044,6 @@ static void CDECL freetype_destroy_font( struct gdi_font *gdi_font ) if (font->ft_face) pFT_Done_Face(font->ft_face); if (font->mapping) unmap_font_file( font->mapping ); - HeapFree(GetProcessHeap(), 0, font->kern_pairs); HeapFree(GetProcessHeap(), 0, font->GSUB_Table); HeapFree(GetProcessHeap(), 0, font); } @@ -7458,31 +7453,18 @@ static DWORD parse_format0_kern_subtable(GdiFont *font, } /************************************************************* - * freetype_GetKerningPairs + * freetype_get_kerning_pairs */ -static DWORD CDECL freetype_GetKerningPairs( struct gdi_font *gdi_font, DWORD cPairs, KERNINGPAIR *kern_pair ) +static DWORD CDECL freetype_get_kerning_pairs( struct gdi_font *gdi_font, KERNINGPAIR **pairs ) { GdiFont *font = get_font_ptr(gdi_font); - DWORD length; + DWORD length, count = 0; void *buf; const struct TT_kern_table *tt_kern_table; const struct TT_kern_subtable *tt_kern_subtable; USHORT i, nTables; USHORT *glyph_to_char; - if (font->total_kern_pairs != (DWORD)-1) - { - if (cPairs && kern_pair) - { - cPairs = min(cPairs, font->total_kern_pairs); - memcpy(kern_pair, font->kern_pairs, cPairs * sizeof(*kern_pair)); - } - else cPairs = font->total_kern_pairs; - return cPairs; - } - - font->total_kern_pairs = 0; - length = freetype_get_font_data(gdi_font, MS_KERN_TAG, 0, NULL, 0); if (length == GDI_ERROR) @@ -7563,21 +7545,19 @@ static DWORD CDECL freetype_GetKerningPairs( struct gdi_font *gdi_font, DWORD cP */ if (tt_kern_subtable_copy.coverage.bits.format == 0) { - DWORD new_chunk, old_total = font->total_kern_pairs; + DWORD new_chunk, old_total = count; new_chunk = parse_format0_kern_subtable(font, (const struct TT_format0_kern_subtable *)(tt_kern_subtable + 1), glyph_to_char, NULL, 0); - font->total_kern_pairs += new_chunk; + count += new_chunk; - if (!font->kern_pairs) - font->kern_pairs = HeapAlloc(GetProcessHeap(), 0, - font->total_kern_pairs * sizeof(*font->kern_pairs)); + if (!*pairs) + *pairs = HeapAlloc(GetProcessHeap(), 0, count * sizeof(**pairs)); else - font->kern_pairs = HeapReAlloc(GetProcessHeap(), 0, font->kern_pairs, - font->total_kern_pairs * sizeof(*font->kern_pairs)); + *pairs = HeapReAlloc(GetProcessHeap(), 0, *pairs, count * sizeof(**pairs)); parse_format0_kern_subtable(font, (const struct TT_format0_kern_subtable *)(tt_kern_subtable + 1), - glyph_to_char, font->kern_pairs + old_total, new_chunk); + glyph_to_char, *pairs + old_total, new_chunk); } else TRACE("skipping kerning table format %u\n", tt_kern_subtable_copy.coverage.bits.format); @@ -7587,14 +7567,7 @@ static DWORD CDECL freetype_GetKerningPairs( struct gdi_font *gdi_font, DWORD cP HeapFree(GetProcessHeap(), 0, glyph_to_char); HeapFree(GetProcessHeap(), 0, buf); - - if (cPairs && kern_pair) - { - cPairs = min(cPairs, font->total_kern_pairs); - memcpy(kern_pair, font->kern_pairs, cPairs * sizeof(*kern_pair)); - } - else cPairs = font->total_kern_pairs; - return cPairs; + return count; } static const struct font_backend_funcs font_funcs = @@ -7603,7 +7576,6 @@ static const struct font_backend_funcs font_funcs = freetype_FontIsLinked, freetype_GetCharWidthInfo, freetype_GetFontUnicodeRanges, - freetype_GetKerningPairs, freetype_SelectFont, freetype_AddFontResourceEx, freetype_RemoveFontResourceEx, @@ -7616,6 +7588,7 @@ static const struct font_backend_funcs font_funcs = freetype_get_glyph_outline, freetype_set_outline_text_metrics, freetype_set_bitmap_text_metrics, + freetype_get_kerning_pairs, freetype_destroy_font }; diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 1f744d1bf2b..8036dfb986b 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -313,6 +313,8 @@ struct gdi_font DWORD gm_size; struct glyph_metrics **gm; OUTLINETEXTMETRICW otm; + KERNINGPAIR *kern_pairs; + int kern_count; /* the following members can be accessed without locking, they are never modified after creation */ void *private; /* font backend private data */ DWORD handle; @@ -359,7 +361,6 @@ struct font_backend_funcs BOOL (CDECL *pFontIsLinked)( struct gdi_font *font ); BOOL (CDECL *pGetCharWidthInfo)( struct gdi_font *font, struct char_width_info *info ); DWORD (CDECL *pGetFontUnicodeRanges)( struct gdi_font *font, GLYPHSET *glyphset ); - DWORD (CDECL *pGetKerningPairs)( struct gdi_font *font, DWORD count, KERNINGPAIR *pairs ); struct gdi_font * (CDECL *pSelectFont)( DC *dc, HFONT hfont, UINT *aa_flags, UINT default_aa_flags ); INT (CDECL *pAddFontResourceEx)( LPCWSTR file, DWORD flags, PVOID pdv ); @@ -377,6 +378,7 @@ struct font_backend_funcs GLYPHMETRICS *gm, ABC *abc, DWORD buflen, void *buf, const MAT2 *mat ); BOOL (CDECL *set_outline_text_metrics)( struct gdi_font *font ); BOOL (CDECL *set_bitmap_text_metrics)( struct gdi_font *font ); + DWORD (CDECL *get_kerning_pairs)( struct gdi_font *gdi_font, KERNINGPAIR **kern_pair ); void (CDECL *destroy_font)( struct gdi_font *font ); };
1
0
0
0
Alexandre Julliard : gdi32: Move the text metrics cache into the generic font structure.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: e0872b64243d651c35c16b493971d2c785b8d997 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e0872b64243d651c35c16b49…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 11:43:24 2020 +0100 gdi32: Move the text metrics cache into the generic font structure. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 159 +++++++++++++++- dlls/gdi32/freetype.c | 484 ++++++++++++++--------------------------------- dlls/gdi32/gdi_private.h | 10 +- 3 files changed, 298 insertions(+), 355 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e0872b64243d651c35c1…
1
0
0
0
Alexandre Julliard : gdi32: Set the font file name directly at creation time.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: a89595a259b6748e461ea0b731ccf7f73a01014f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a89595a259b6748e461ea0b7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 26 11:37:03 2020 +0100 gdi32: Set the font file name directly at creation time. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 64 ++++++++++++++++++++++++------------------------ dlls/gdi32/freetype.c | 52 +++++++++++++++++++-------------------- dlls/gdi32/gdi_private.h | 8 +++--- 3 files changed, 63 insertions(+), 61 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a89595a259b6748e461e…
1
0
0
0
Huw Davies : riched20: Use row ptrs in the cursor to co-ordinates function.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 6b3fd7869a73e715db066810bcb594cdefc94242 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b3fd7869a73e715db066810…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 08:46:42 2020 +0000 riched20: Use row ptrs in the cursor to co-ordinates function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 24 +++++++++++------------- dlls/riched20/editor.h | 2 +- dlls/riched20/richole.c | 4 ++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 49ae1b2769a..834f9fd3afe 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -218,31 +218,29 @@ int set_selection_cursors(ME_TextEditor *editor, int from, int to) } -void ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor, - int *x, int *y, int *height) +void cursor_coords( ME_TextEditor *editor, ME_Cursor *cursor, + int *x, int *y, int *height ) { - ME_DisplayItem *row; - ME_Run *run = &pCursor->pRun->member.run; - ME_Paragraph *para = &pCursor->pPara->member.para; + ME_Row *row; + ME_Run *run = &cursor->pRun->member.run; + ME_Paragraph *para = &cursor->pPara->member.para; ME_Run *size_run = run, *prev; ME_Context c; int run_x; - assert(height && x && y); assert(~para->nFlags & MEPF_REWRAP); - row = ME_FindItemBack( run_get_di( run ), diStartRowOrParagraph ); - assert(row && row->type == diStartRow); + row = row_from_cursor( cursor ); ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost)); - if (!pCursor->nOffset && (prev = run_prev( run ))) size_run = prev; + if (!cursor->nOffset && (prev = run_prev( run ))) size_run = prev; - run_x = ME_PointFromCharContext( &c, run, pCursor->nOffset, TRUE ); + run_x = ME_PointFromCharContext( &c, run, cursor->nOffset, TRUE ); *height = size_run->nAscent + size_run->nDescent; *x = c.rcView.left + run->pt.x + run_x - editor->horz_si.nPos; - *y = c.rcView.top + para->pt.y + row->member.row.nBaseline + *y = c.rcView.top + para->pt.y + row->nBaseline + run->pt.y - size_run->nAscent - editor->vert_si.nPos; ME_DestroyContext(&c); return; @@ -252,7 +250,7 @@ void create_caret(ME_TextEditor *editor) { int x, y, height; - ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height); + cursor_coords( editor, &editor->pCursors[0], &x, &y, &height ); ITextHost_TxCreateCaret(editor->texthost, NULL, 0, height); editor->caret_height = height; editor->caret_hidden = TRUE; @@ -281,7 +279,7 @@ void update_caret(ME_TextEditor *editor) if (!editor->bHaveFocus) return; if (!ME_IsSelection(editor)) { - ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height); + cursor_coords( editor, &editor->pCursors[0], &x, &y, &height ); if (height != editor->caret_height) create_caret(editor); x = min(x, editor->rcFormat.right-1); ITextHost_TxSetCaretPos(editor->texthost, x, y); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index e197e3e9a9b..f4484f57d39 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -164,6 +164,7 @@ static inline ME_DisplayItem *run_get_di( ME_Run *run ) } /* caret.c */ +void cursor_coords( ME_TextEditor *editor, ME_Cursor *cursor, int *x, int *y, int *height ) DECLSPEC_HIDDEN; void ME_SetCursorToStart(ME_TextEditor *editor, ME_Cursor *cursor) DECLSPEC_HIDDEN; int set_selection_cursors(ME_TextEditor *editor, int from, int to) DECLSPEC_HIDDEN; BOOL ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) DECLSPEC_HIDDEN; @@ -192,7 +193,6 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, int nChars, int ME_GetTextLength(ME_TextEditor *editor) DECLSPEC_HIDDEN; int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how) DECLSPEC_HIDDEN; ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor) DECLSPEC_HIDDEN; -void ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor, int *x, int *y, int *height) DECLSPEC_HIDDEN; /* context.c */ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 2f2e5e09d1f..21b63911954 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -2734,11 +2734,11 @@ static HRESULT WINAPI ITextRange_fnScrollIntoView(ITextRange *me, LONG value) { case tomStart: cursor_from_char_ofs( editor, This->start, &cursor ); - ME_GetCursorCoordinates(editor, &cursor, &x, &y, &height); + cursor_coords( editor, &cursor, &x, &y, &height ); break; case tomEnd: cursor_from_char_ofs( editor, This->end, &cursor ); - ME_GetCursorCoordinates(editor, &cursor, &x, &y, &height); + cursor_coords( editor, &cursor, &x, &y, &height ); break; default: FIXME("bStart value %d not handled\n", value);
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
80
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200