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
April
March
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 2015
----- 2025 -----
April 2025
March 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
623 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Added support for transform in glyph run analysis.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 170e31a8b22a5d0348f0b3dc02e0e6d01eaee62b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=170e31a8b22a5d0348f0b3dc0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 2 16:38:43 2015 +0300 dwrite: Added support for transform in glyph run analysis. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 28 +++++++++++++++ dlls/dwrite/freetype.c | 83 ++++++++++++++++++++++++++++++++++++++++---- dlls/dwrite/tests/font.c | 27 ++++++++++++++ 4 files changed, 133 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=170e31a8b22a5d0348f0b…
1
0
0
0
Nikolay Sivov : dwrite: Store origin, advances and offsets as vectors for run analysis.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 5da26de7c3394e0df0d8459c73d944987de1be7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5da26de7c3394e0df0d8459c7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 2 16:38:42 2015 +0300 dwrite: Store origin, advances and offsets as vectors for run analysis. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 169 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 114 insertions(+), 55 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5da26de7c3394e0df0d84…
1
0
0
0
Nikolay Sivov : dwrite: Store transform analysis was created with.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 6cc62d09bb986a68556e279953b129bc60798b31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6cc62d09bb986a68556e27995…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 2 16:38:41 2015 +0300 dwrite: Store transform analysis was created with. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 97ea039..ecd22de 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -152,9 +152,10 @@ struct dwrite_fonttable { BOOL exists; }; -enum runanalysis_readystate { - RUNANALYSIS_BOUNDS = 1 << 0, - RUNANALYSIS_BITMAP = 1 << 1, +enum runanalysis_flags { + RUNANALYSIS_BOUNDS_READY = 1 << 0, + RUNANALYSIS_BITMAP_READY = 1 << 1, + RUNANALYSIS_USE_TRANSFORM = 1 << 2 }; struct dwrite_glyphrunanalysis { @@ -163,6 +164,7 @@ struct dwrite_glyphrunanalysis { DWRITE_RENDERING_MODE rendering_mode; DWRITE_GLYPH_RUN run; + DWRITE_MATRIX m; FLOAT ppdip; FLOAT originX; FLOAT originY; @@ -170,7 +172,7 @@ struct dwrite_glyphrunanalysis { FLOAT *advances; DWRITE_GLYPH_OFFSET *offsets; - UINT8 ready; + UINT8 flags; RECT bounds; BYTE *bitmap; }; @@ -4058,7 +4060,7 @@ static void glyphrunanalysis_get_texturebounds(struct dwrite_glyphrunanalysis *a HRESULT hr; UINT32 i; - if (analysis->ready & RUNANALYSIS_BOUNDS) { + if (analysis->flags & RUNANALYSIS_BOUNDS_READY) { *bounds = analysis->bounds; return; } @@ -4107,7 +4109,7 @@ static void glyphrunanalysis_get_texturebounds(struct dwrite_glyphrunanalysis *a /* translate to given run origin */ OffsetRect(&analysis->bounds, analysis->originX, analysis->originY); - analysis->ready |= RUNANALYSIS_BOUNDS; + analysis->flags |= RUNANALYSIS_BOUNDS_READY; *bounds = analysis->bounds; } @@ -4255,7 +4257,7 @@ static void glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DW IDWriteFontFace2_Release(fontface2); - analysis->ready |= RUNANALYSIS_BITMAP; + analysis->flags |= RUNANALYSIS_BITMAP_READY; /* we don't need this anymore */ heap_free(analysis->glyphs); @@ -4320,7 +4322,7 @@ static HRESULT WINAPI glyphrunanalysis_CreateAlphaTexture(IDWriteGlyphRunAnalysi BYTE *src, *dst; int y; - if (!(This->ready & RUNANALYSIS_BITMAP)) + if (!(This->flags & RUNANALYSIS_BITMAP_READY)) glyphrunanalysis_render(This, type); src = get_pixel_ptr(This->bitmap, type, &runbounds, &This->bounds); @@ -4401,7 +4403,7 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEA analysis->IDWriteGlyphRunAnalysis_iface.lpVtbl = &glyphrunanalysisvtbl; analysis->ref = 1; analysis->rendering_mode = rendering_mode; - analysis->ready = 0; + analysis->flags = 0; analysis->bitmap = NULL; analysis->ppdip = ppdip; analysis->originX = originX * ppdip; @@ -4425,6 +4427,14 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEA return E_OUTOFMEMORY; } + /* check if transform is usable */ + if (transform && memcmp(transform, &identity, sizeof(*transform))) { + analysis->m = *transform; + analysis->flags |= RUNANALYSIS_USE_TRANSFORM; + } + else + memset(&analysis->m, 0, sizeof(analysis->m)); + analysis->run.glyphIndices = analysis->glyphs; analysis->run.glyphAdvances = analysis->advances; analysis->run.glyphOffsets = analysis->offsets;
1
0
0
0
Austin English : kernel32: Add AllocateUserPhysicalPages stub.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 4bfe66e7029777d8fca209bc7637f613eb671b66 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4bfe66e7029777d8fca209bc7…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Oct 27 00:00:40 2015 -0500 kernel32: Add AllocateUserPhysicalPages stub. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/heap.c | 7 +++++++ dlls/kernel32/kernel32.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index 0286d82..0c05de6 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -1483,3 +1483,10 @@ BOOL WINAPI SetSystemFileCacheSize(SIZE_T mincache, SIZE_T maxcache, DWORD flags SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + +BOOL WINAPI AllocateUserPhysicalPages(HANDLE process, ULONG_PTR *pages, ULONG_PTR *userarray) +{ + FIXME("stub: %p %p %p\n",process, pages, userarray); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 9b2a131..89292c9 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -154,7 +154,7 @@ @ stdcall AllocConsole() @ stub -i386 AllocLSCallback @ stdcall -i386 -private AllocSLCallback(ptr ptr) krnl386.exe16.AllocSLCallback -@ stub AllocateUserPhysicalPages +@ stdcall AllocateUserPhysicalPages(ptr ptr ptr) @ stdcall ApplicationRecoveryFinished(long) @ stdcall ApplicationRecoveryInProgress(ptr) @ stdcall AreFileApisANSI()
1
0
0
0
Hugh McMaster : kernel32/tests: Add tests for GetConsoleFontSize.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 77a75d74a27bffc2e9f90838a260721002fb76cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77a75d74a27bffc2e9f90838a…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Oct 29 23:17:22 2015 +1100 kernel32/tests: Add tests for GetConsoleFontSize. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/console.c | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 454f963..240d9d8 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -2627,6 +2627,60 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) "got %d, expected %d\n", cfi.dwFontSize.Y, height); } +static void test_GetConsoleFontSize(HANDLE std_output) +{ + COORD c; + DWORD index = 0; + CONSOLE_FONT_INFO cfi; + RECT r; + CONSOLE_SCREEN_BUFFER_INFO csbi; + LONG font_width, font_height; + HMODULE hmod; + DWORD (WINAPI *pGetNumberOfConsoleFonts)(void); + + memset(&c, 10, sizeof(COORD)); + SetLastError(0xdeadbeef); + c = GetConsoleFontSize(NULL, index); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(!c.X, "got %d, expected 0\n", c.X); + ok(!c.Y, "got %d, expected 0\n", c.Y); + + memset(&c, 10, sizeof(COORD)); + SetLastError(0xdeadbeef); + c = GetConsoleFontSize(GetStdHandle(STD_INPUT_HANDLE), index); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(!c.X, "got %d, expected 0\n", c.X); + ok(!c.Y, "got %d, expected 0\n", c.Y); + + GetCurrentConsoleFont(std_output, FALSE, &cfi); + memset(&c, 10, sizeof(COORD)); + SetLastError(0xdeadbeef); + c = GetConsoleFontSize(std_output, cfi.nFont); + ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + GetClientRect(GetConsoleWindow(), &r); + GetConsoleScreenBufferInfo(std_output, &csbi); + font_width = (r.right - r.left + 1) / csbi.srWindow.Right; + font_height = (r.bottom - r.top + 1) / csbi.srWindow.Bottom; + ok(c.X == font_width, "got %d, expected %d\n", c.X, font_width); + ok(c.Y == font_height, "got %d, expected %d\n", c.Y, font_height); + + hmod = GetModuleHandleA("kernel32.dll"); + pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts"); + if (!pGetNumberOfConsoleFonts) + { + win_skip("GetNumberOfConsoleFonts is not available\n"); + return; + } + index = pGetNumberOfConsoleFonts(); + + memset(&c, 10, sizeof(COORD)); + SetLastError(0xdeadbeef); + c = GetConsoleFontSize(std_output, index); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(!c.X, "got %d, expected 0\n", c.X); + ok(!c.Y, "got %d, expected 0\n", c.Y); +} + START_TEST(console) { static const char font_name[] = "Lucida Console"; @@ -2760,4 +2814,5 @@ START_TEST(console) test_ReadConsoleOutputCharacterW(hConOut); test_ReadConsoleOutputAttribute(hConOut); test_GetCurrentConsoleFont(hConOut); + test_GetConsoleFontSize(hConOut); }
1
0
0
0
Hugh McMaster : kernel32: Implement GetConsoleFontSize.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 4925f75869f577849d5f35d5b654c7680f8932cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4925f75869f577849d5f35d5b…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Oct 29 23:17:21 2015 +1100 kernel32: Implement GetConsoleFontSize. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/console.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 67627cc..d4c4a05 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -3265,32 +3265,47 @@ BOOL WINAPI GetCurrentConsoleFont(HANDLE hConsole, BOOL maxwindow, LPCONSOLE_FON return ret; } +static COORD get_console_font_size(HANDLE hConsole, DWORD index) +{ + COORD c = {0,0}; + + if (index >= GetNumberOfConsoleFonts()) + { + SetLastError(ERROR_INVALID_PARAMETER); + return c; + } + + SERVER_START_REQ(get_console_output_info) + { + req->handle = console_handle_unmap(hConsole); + if (!wine_server_call_err(req)) + { + c.X = reply->font_width; + c.Y = reply->font_height; + } + } + SERVER_END_REQ; + return c; +} + #ifdef __i386__ #undef GetConsoleFontSize -DWORD WINAPI GetConsoleFontSize(HANDLE hConsole, DWORD font) +DWORD WINAPI GetConsoleFontSize(HANDLE hConsole, DWORD index) { union { COORD c; DWORD w; } x; - FIXME(": (%p, %d) stub!\n", hConsole, font); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - x.c.X = 0; - x.c.Y = 0; + x.c = get_console_font_size(hConsole, index); return x.w; } #endif /* defined(__i386__) */ #ifndef __i386__ -COORD WINAPI GetConsoleFontSize(HANDLE hConsole, DWORD font) +COORD WINAPI GetConsoleFontSize(HANDLE hConsole, DWORD index) { - COORD c; - c.X = 80; - c.Y = 24; - FIXME(": (%p, %d) stub!\n", hConsole, font); - return c; + return get_console_font_size(hConsole, index); } -#endif /* defined(__i386__) */ +#endif /* !defined(__i386__) */
1
0
0
0
Hugh McMaster : kernel32: Implement GetNumberOfConsoleFonts.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: f0ee54a776839512e827ca06ef221e9a12bb8f51 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0ee54a776839512e827ca06e…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Oct 29 23:17:20 2015 +1100 kernel32: Implement GetNumberOfConsoleFonts. We only ever have one entry in the console font table. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/console.c | 5 +++++ dlls/kernel32/kernel32.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index c32dc49..67627cc 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -3234,6 +3234,11 @@ BOOL WINAPI SetConsoleIcon(HICON icon) return FALSE; } +DWORD WINAPI GetNumberOfConsoleFonts(void) +{ + return 1; +} + BOOL WINAPI GetCurrentConsoleFont(HANDLE hConsole, BOOL maxwindow, LPCONSOLE_FONT_INFO fontinfo) { BOOL ret; diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index d7eab83..9b2a131 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -753,7 +753,7 @@ @ stdcall GetNumberFormatA(long long str ptr ptr long) # @ stub GetNumberFormatEx @ stdcall GetNumberFormatW(long long wstr ptr ptr long) -@ stub GetNumberOfConsoleFonts +@ stdcall GetNumberOfConsoleFonts() @ stdcall GetNumberOfConsoleInputEvents(long ptr) @ stdcall GetNumberOfConsoleMouseButtons(ptr) @ stdcall GetOEMCP()
1
0
0
0
Hugh McMaster : wineconsole: Pass font size information to wineserver.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 313e064a44e4ce425ae5c5ea00dccd13ea890e88 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=313e064a44e4ce425ae5c5ea0…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Oct 29 23:17:19 2015 +1100 wineconsole: Pass font size information to wineserver. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineconsole/wineconsole.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index eb07f6b..7a89eeb 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -425,6 +425,15 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf data->curcfg.cell_height != cfg->cell_height || data->curcfg.font_weight != cfg->font_weight) { data->fnSetFont(data, cfg->face_name, cfg->cell_height, cfg->font_weight); + SERVER_START_REQ(set_console_output_info) + { + req->handle = wine_server_obj_handle( data->hConOut ); + req->mask = SET_CONSOLE_OUTPUT_INFO_FONT; + req->font_width = cfg->cell_width; + req->font_height = cfg->cell_height; + wine_server_call( req ); + } + SERVER_END_REQ; } if (data->curcfg.def_attr != cfg->def_attr) {
1
0
0
0
Hugh McMaster : server: Add console font information.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: b61badcc90f27cde61fa97020fd267b83fb6ac0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b61badcc90f27cde61fa97020…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Oct 29 23:17:18 2015 +1100 server: Add console font information. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/server_protocol.h | 11 ++++++++--- server/console.c | 16 ++++++++++++++++ server/protocol.def | 5 +++++ server/request.h | 6 +++++- server/trace.c | 4 ++++ 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 105273d..64f02a0 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1896,7 +1896,9 @@ struct set_console_output_info_request short int win_bottom; short int max_width; short int max_height; - char __pad_46[2]; + short int font_width; + short int font_height; + char __pad_50[6]; }; struct set_console_output_info_reply { @@ -1908,6 +1910,7 @@ struct set_console_output_info_reply #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20 +#define SET_CONSOLE_OUTPUT_INFO_FONT 0x40 @@ -1932,7 +1935,9 @@ struct get_console_output_info_reply short int win_bottom; short int max_width; short int max_height; - char __pad_34[6]; + short int font_width; + short int font_height; + char __pad_38[2]; }; @@ -6147,6 +6152,6 @@ union generic_reply struct terminate_job_reply terminate_job_reply; }; -#define SERVER_PROTOCOL_VERSION 488 +#define SERVER_PROTOCOL_VERSION 489 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/console.c b/server/console.c index 389547d..a57b2fe 100644 --- a/server/console.c +++ b/server/console.c @@ -121,6 +121,12 @@ static const struct object_ops console_input_events_ops = console_input_events_destroy /* destroy */ }; +struct font_info +{ + short int width; + short int height; +}; + struct screen_buffer { struct object obj; /* object header */ @@ -139,6 +145,7 @@ struct screen_buffer unsigned short attr; /* default attribute for screen buffer */ rectangle_t win; /* current visible window on the screen buffer * * as seen in wineconsole */ + struct font_info font; /* console font information */ struct fd *fd; /* for bare console, attached output fd */ }; @@ -411,6 +418,8 @@ static struct screen_buffer *create_console_output( struct console_input *consol screen_buffer->win.top = 0; screen_buffer->win.bottom = screen_buffer->max_height - 1; screen_buffer->data = NULL; + screen_buffer->font.width = 0; + screen_buffer->font.height = 0; list_add_head( &screen_buffer_list, &screen_buffer->entry ); if (fd == -1) @@ -1019,6 +1028,11 @@ static int set_console_output_info( struct screen_buffer *screen_buffer, screen_buffer->max_width = req->max_width; screen_buffer->max_height = req->max_height; } + if (req->mask & SET_CONSOLE_OUTPUT_INFO_FONT) + { + screen_buffer->font.width = req->font_width; + screen_buffer->font.height = req->font_height; + } return 1; } @@ -1676,6 +1690,8 @@ DECL_HANDLER(get_console_output_info) reply->win_bottom = screen_buffer->win.bottom; reply->max_width = screen_buffer->max_width; reply->max_height = screen_buffer->max_height; + reply->font_width = screen_buffer->font.width; + reply->font_height = screen_buffer->font.height; release_object( screen_buffer ); } } diff --git a/server/protocol.def b/server/protocol.def index 5b45078..aa37c66 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1495,6 +1495,8 @@ struct console_renderer_event short int win_bottom; short int max_width; /* maximum size (width x height) for the window */ short int max_height; + short int font_width; /* font size (width x height) */ + short int font_height; @END #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02 @@ -1502,6 +1504,7 @@ struct console_renderer_event #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20 +#define SET_CONSOLE_OUTPUT_INFO_FONT 0x40 /* Get info about a console (output only) */ @@ -1521,6 +1524,8 @@ struct console_renderer_event short int win_bottom; short int max_width; /* maximum size (width x height) for the window */ short int max_height; + short int font_width; /* font size (width x height) */ + short int font_height; @END /* Add input records to a console input queue */ diff --git a/server/request.h b/server/request.h index fefabaa..48f4d46 100644 --- a/server/request.h +++ b/server/request.h @@ -1112,7 +1112,9 @@ C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, win_right) == 38 C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, win_bottom) == 40 ); C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, max_width) == 42 ); C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, max_height) == 44 ); -C_ASSERT( sizeof(struct set_console_output_info_request) == 48 ); +C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, font_width) == 46 ); +C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, font_height) == 48 ); +C_ASSERT( sizeof(struct set_console_output_info_request) == 56 ); C_ASSERT( FIELD_OFFSET(struct get_console_output_info_request, handle) == 12 ); C_ASSERT( sizeof(struct get_console_output_info_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, cursor_size) == 8 ); @@ -1128,6 +1130,8 @@ C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, win_right) == 26 ); C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, win_bottom) == 28 ); C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, max_width) == 30 ); C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, max_height) == 32 ); +C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, font_width) == 34 ); +C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, font_height) == 36 ); C_ASSERT( sizeof(struct get_console_output_info_reply) == 40 ); C_ASSERT( FIELD_OFFSET(struct write_console_input_request, handle) == 12 ); C_ASSERT( sizeof(struct write_console_input_request) == 16 ); diff --git a/server/trace.c b/server/trace.c index 62867c2..4ec7aad 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1959,6 +1959,8 @@ static void dump_set_console_output_info_request( const struct set_console_outpu fprintf( stderr, ", win_bottom=%d", req->win_bottom ); fprintf( stderr, ", max_width=%d", req->max_width ); fprintf( stderr, ", max_height=%d", req->max_height ); + fprintf( stderr, ", font_width=%d", req->font_width ); + fprintf( stderr, ", font_height=%d", req->font_height ); } static void dump_get_console_output_info_request( const struct get_console_output_info_request *req ) @@ -1981,6 +1983,8 @@ static void dump_get_console_output_info_reply( const struct get_console_output_ fprintf( stderr, ", win_bottom=%d", req->win_bottom ); fprintf( stderr, ", max_width=%d", req->max_width ); fprintf( stderr, ", max_height=%d", req->max_height ); + fprintf( stderr, ", font_width=%d", req->font_width ); + fprintf( stderr, ", font_height=%d", req->font_height ); } static void dump_write_console_input_request( const struct write_console_input_request *req )
1
0
0
0
Hugh McMaster : wineconsole: Add if check to determine whether a font attribute has changed.
by Alexandre Julliard
02 Nov '15
02 Nov '15
Module: wine Branch: master Commit: 9096373048677e2791e819648c82aff352c882d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9096373048677e2791e819648…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Oct 29 23:17:17 2015 +1100 wineconsole: Add if check to determine whether a font attribute has changed. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineconsole/wineconsole.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index e1ee55b..eb07f6b 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -27,7 +27,7 @@ #include "winecon_private.h" #include "winnls.h" #include "winuser.h" - +#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wineconsole); @@ -421,7 +421,8 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf } data->curcfg.menu_mask = cfg->menu_mask; data->curcfg.quick_edit = cfg->quick_edit; - if (1 /* FIXME: font info has changed */) + if (strcmpiW(data->curcfg.face_name, cfg->face_name) || data->curcfg.cell_width != cfg->cell_width || + data->curcfg.cell_height != cfg->cell_height || data->curcfg.font_weight != cfg->font_weight) { data->fnSetFont(data, cfg->face_name, cfg->cell_height, cfg->font_weight); }
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
62
63
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
Results per page:
10
25
50
100
200