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
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
October 2012
----- 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
960 discussions
Start a n
N
ew thread
André Hentschel : cryptdlg: Fix copy-paste error ( coverity).
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: a8125d6efdb5117db5e74bfdab6bee2ba6ba144d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8125d6efdb5117db5e74bfda…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Oct 24 19:27:00 2012 +0200 cryptdlg: Fix copy-paste error (coverity). --- dlls/cryptdlg/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/cryptdlg/main.c b/dlls/cryptdlg/main.c index 04311fd..9124541 100644 --- a/dlls/cryptdlg/main.c +++ b/dlls/cryptdlg/main.c @@ -276,7 +276,7 @@ static HCERTCHAINENGINE CRYPTDLG_MakeEngine(CERT_VERIFY_CERTIFICATE_TRUST *cert) { trust = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - if (root) + if (trust) { for (i = 0; i < cert->cTrustStores; i++) CertAddStoreToCollection(trust, cert->rghstoreTrust[i], 0, 0);
1
0
0
0
André Hentschel : d3d9/tests: Fix copy-paste error ( coverity).
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: 31ca59f0b59cdb0a4587c484d195b267de9991b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31ca59f0b59cdb0a4587c484d…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Oct 24 19:27:02 2012 +0200 d3d9/tests: Fix copy-paste error (coverity). --- dlls/d3d9/tests/visual.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index a67ce52..b6763099 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -2751,7 +2751,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) hr = IDirect3DTexture9_GetSurfaceLevel(tex_rt_dest64, 0, &surf_tex_rt_dest64); ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } - if (tex_rt_dest64) { + if (tex_rt_dest640_480) { hr = IDirect3DTexture9_GetSurfaceLevel(tex_rt_dest640_480, 0, &surf_tex_rt_dest640_480); ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); }
1
0
0
0
Piotr Caban : ieframe: Handle rebar height changes.
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: c7d7744860ac469be9ea5e4af39fef4a66d53a52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7d7744860ac469be9ea5e4af…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Oct 24 15:38:04 2012 +0200 ieframe: Handle rebar height changes. --- dlls/ieframe/iexplore.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/ieframe/iexplore.c b/dlls/ieframe/iexplore.c index 5b85205..a72ed34 100644 --- a/dlls/ieframe/iexplore.c +++ b/dlls/ieframe/iexplore.c @@ -551,6 +551,18 @@ static LRESULT iewnd_OnNotify(InternetExplorer *This, WPARAM wparam, LPARAM lpar } } + if(hdr->idFrom == IDC_BROWSE_REBAR && hdr->code == RBN_HEIGHTCHANGE) + { + RECT docarea; + + GetClientRect(This->frame_hwnd, &docarea); + adjust_ie_docobj_rect(This->frame_hwnd, &docarea); + + if(This->doc_host->doc_host.hwnd) + SetWindowPos(This->doc_host->doc_host.hwnd, NULL, docarea.left, docarea.top, docarea.right, docarea.bottom, + SWP_NOZORDER | SWP_NOACTIVATE); + } + return 0; }
1
0
0
0
Piotr Caban : ieframe: Added CSS_NORESIZE style to toolbar window.
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: d272c27673919e38d98e6b8e52b9f1f1479d893c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d272c27673919e38d98e6b8e5…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Oct 24 15:45:18 2012 +0200 ieframe: Added CSS_NORESIZE style to toolbar window. --- dlls/ieframe/iexplore.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/ieframe/iexplore.c b/dlls/ieframe/iexplore.c index 7d6c6ed..5b85205 100644 --- a/dlls/ieframe/iexplore.c +++ b/dlls/ieframe/iexplore.c @@ -440,6 +440,7 @@ static void create_rebar(HWND hwnd) WCHAR addr[40]; HIMAGELIST imagelist; WCHAR idb_ietoolbar[] = {'I','D','B','_','I','E','T','O','O','L','B','A','R',0}; + SIZE toolbar_size; LoadStringW(ieframe_instance, IDS_ADDRESS, addr, sizeof(addr)/sizeof(addr[0])); @@ -450,11 +451,10 @@ static void create_rebar(HWND hwnd) rebarinf.cbSize = sizeof(rebarinf); rebarinf.fMask = 0; rebarinf.himl = NULL; - rebarinf.cbSize = sizeof(rebarinf); SendMessageW(hwndRebar, RB_SETBARINFO, 0, (LPARAM)&rebarinf); - hwndToolbar = CreateWindowExW(TBSTYLE_EX_MIXEDBUTTONS, TOOLBARCLASSNAMEW, NULL, TBSTYLE_FLAT | WS_CHILD | WS_VISIBLE, + hwndToolbar = CreateWindowExW(TBSTYLE_EX_MIXEDBUTTONS, TOOLBARCLASSNAMEW, NULL, TBSTYLE_FLAT | WS_CHILD | WS_VISIBLE | CCS_NORESIZE, 0, 0, 0, 0, hwndRebar, (HMENU)IDC_BROWSE_TOOLBAR, ieframe_instance, NULL); imagelist = ImageList_LoadImageW(ieframe_instance, idb_ietoolbar, 32, 0, CLR_NONE, IMAGE_BITMAP, LR_CREATEDIBSECTION); @@ -469,14 +469,13 @@ static void create_rebar(HWND hwnd) add_tb_separator(hwndToolbar); add_tb_button(hwndToolbar, 5, ID_BROWSE_PRINT, IDS_TB_PRINT); SendMessageW(hwndToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(55,50)); - SendMessageW(hwndToolbar, TB_AUTOSIZE, 0, 0); + SendMessageW(hwndToolbar, TB_GETMAXSIZE, 0, (LPARAM)&toolbar_size); bandinf.cbSize = sizeof(bandinf); - bandinf.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE; + bandinf.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE; bandinf.fStyle = RBBS_CHILDEDGE; - bandinf.cx = 100; - bandinf.cxMinChild = 0; - bandinf.cyMinChild = 52; + bandinf.cxMinChild = toolbar_size.cx; + bandinf.cyMinChild = toolbar_size.cy+2; bandinf.hwndChild = hwndToolbar; SendMessageW(hwndRebar, RB_INSERTBANDW, -1, (LPARAM)&bandinf); @@ -487,6 +486,7 @@ static void create_rebar(HWND hwnd) bandinf.fMask |= RBBIM_TEXT; bandinf.fStyle = RBBS_CHILDEDGE | RBBS_BREAK; bandinf.lpText = addr; + bandinf.cxMinChild = 100; bandinf.cyMinChild = 20; bandinf.hwndChild = hwndAddress;
1
0
0
0
Rico Schüller : wined3d: Fix return value for WINED3DFMT_ATI2N in CheckTextureCapability().
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: deae923cd8e3c9ce5bfcbaae673515c3f5074f12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=deae923cd8e3c9ce5bfcbaae6…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Oct 24 14:53:44 2012 +0200 wined3d: Fix return value for WINED3DFMT_ATI2N in CheckTextureCapability(). --- dlls/wined3d/directx.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index b18a99f..7b9b6a4 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3857,9 +3857,6 @@ static BOOL CheckTextureCapability(const struct wined3d_adapter *adapter, const TRACE("[OK]\n"); return TRUE; } - - TRACE("[OK]\n"); - return TRUE; } TRACE("[FAILED]\n"); return FALSE;
1
0
0
0
Alexandre Julliard : gdi32: Add a DC hook flag to reset the DC state.
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: 4396a79edebc381bb5b394c0a1f315efb07da372 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4396a79edebc381bb5b394c0a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 24 18:24:03 2012 +0200 gdi32: Add a DC hook flag to reset the DC state. --- dlls/gdi32/dc.c | 94 ++++++++++++++++++++++++++++++++++++-------- dlls/gdi32/tests/dc.c | 3 - dlls/user32/painting.c | 16 +------- include/wine/gdi_driver.h | 1 + 4 files changed, 80 insertions(+), 34 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 030304c..b59c154 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -71,28 +71,20 @@ static inline DC *get_dc_obj( HDC hdc ) /*********************************************************************** - * alloc_dc_ptr + * set_initial_dc_state */ -DC *alloc_dc_ptr( WORD magic ) +static void set_initial_dc_state( DC *dc ) { - DC *dc; - - if (!(dc = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*dc) ))) return NULL; - - dc->nulldrv.funcs = &null_driver; - dc->physDev = &dc->nulldrv; - dc->module = gdi32_module; - dc->thread = GetCurrentThreadId(); - dc->refcount = 1; + dc->wndOrgX = 0; + dc->wndOrgY = 0; dc->wndExtX = 1; dc->wndExtY = 1; + dc->vportOrgX = 0; + dc->vportOrgY = 0; dc->vportExtX = 1; dc->vportExtY = 1; dc->miterLimit = 10.0f; /* 10.0 is the default, from MSDN */ - dc->hPen = GDI_inc_ref_count( GetStockObject( BLACK_PEN )); - dc->hBrush = GDI_inc_ref_count( GetStockObject( WHITE_BRUSH )); - dc->hFont = GDI_inc_ref_count( GetStockObject( SYSTEM_FONT )); - dc->hPalette = GetStockObject( DEFAULT_PALETTE ); + dc->layout = 0; dc->font_code_page = CP_ACP; dc->ROPmode = R2_COPYPEN; dc->polyFillMode = ALTERNATE; @@ -103,9 +95,17 @@ DC *alloc_dc_ptr( WORD magic ) dc->dcBrushColor = RGB( 255, 255, 255 ); dc->dcPenColor = RGB( 0, 0, 0 ); dc->textColor = RGB( 0, 0, 0 ); + dc->brushOrgX = 0; + dc->brushOrgY = 0; + dc->mapperFlags = 0; dc->textAlign = TA_LEFT | TA_TOP | TA_NOUPDATECP; + dc->charExtra = 0; + dc->breakExtra = 0; + dc->breakRem = 0; dc->MapMode = MM_TEXT; dc->GraphicsMode = GM_COMPATIBLE; + dc->CursPosX = 0; + dc->CursPosY = 0; dc->ArcDirection = AD_COUNTERCLOCKWISE; dc->xformWorld2Wnd.eM11 = 1.0f; dc->xformWorld2Wnd.eM12 = 0.0f; @@ -118,6 +118,28 @@ DC *alloc_dc_ptr( WORD magic ) dc->vport2WorldValid = TRUE; reset_bounds( &dc->bounds ); +} + +/*********************************************************************** + * alloc_dc_ptr + */ +DC *alloc_dc_ptr( WORD magic ) +{ + DC *dc; + + if (!(dc = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*dc) ))) return NULL; + + dc->nulldrv.funcs = &null_driver; + dc->physDev = &dc->nulldrv; + dc->module = gdi32_module; + dc->thread = GetCurrentThreadId(); + dc->refcount = 1; + dc->hPen = GDI_inc_ref_count( GetStockObject( BLACK_PEN )); + dc->hBrush = GDI_inc_ref_count( GetStockObject( WHITE_BRUSH )); + dc->hFont = GDI_inc_ref_count( GetStockObject( SYSTEM_FONT )); + dc->hPalette = GetStockObject( DEFAULT_PALETTE ); + + set_initial_dc_state( dc ); if (!(dc->hSelf = alloc_gdi_handle( dc, magic, &dc_funcs ))) { @@ -520,6 +542,44 @@ BOOL nulldrv_RestoreDC( PHYSDEV dev, INT level ) /*********************************************************************** + * reset_dc_state + */ +static BOOL reset_dc_state( HDC hdc ) +{ + DC *dc, *dcs, *next; + + if (!(dc = get_dc_ptr( hdc ))) return FALSE; + + set_initial_dc_state( dc ); + SetBkColor( hdc, RGB( 255, 255, 255 )); + SetTextColor( hdc, RGB( 0, 0, 0 )); + SelectObject( hdc, GetStockObject( WHITE_BRUSH )); + SelectObject( hdc, GetStockObject( SYSTEM_FONT )); + SelectObject( hdc, GetStockObject( BLACK_PEN )); + SetVirtualResolution( hdc, 0, 0, 0, 0 ); + GDISelectPalette( hdc, GetStockObject( DEFAULT_PALETTE ), FALSE ); + SetBoundsRect( hdc, NULL, DCB_DISABLE ); + AbortPath( hdc ); + + if (dc->hClipRgn) DeleteObject( dc->hClipRgn ); + if (dc->hMetaRgn) DeleteObject( dc->hMetaRgn ); + dc->hClipRgn = 0; + dc->hMetaRgn = 0; + update_dc_clipping( dc ); + + for (dcs = dc->saved_dc; dcs; dcs = next) + { + next = dcs->saved_dc; + free_dc_state( dcs ); + } + dc->saved_dc = NULL; + dc->saveLevel = 0; + release_dc_ptr( dc ); + return TRUE; +} + + +/*********************************************************************** * SaveDC (GDI32.@) */ INT WINAPI SaveDC( HDC hdc ) @@ -1217,8 +1277,6 @@ WORD WINAPI SetHookFlags( HDC hdc, WORD flags ) if (!dc) return 0; - /* "Undocumented Windows" info is slightly confusing. */ - TRACE("hDC %p, flags %04x\n",hdc,flags); if (flags & DCHF_INVALIDATEVISRGN) @@ -1227,6 +1285,8 @@ WORD WINAPI SetHookFlags( HDC hdc, WORD flags ) ret = InterlockedExchange( &dc->dirty, 0 ); GDI_ReleaseObj( hdc ); + + if (flags & DCHF_RESETDC) ret = reset_dc_state( hdc ); return ret; } diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index e286044..8baacc2 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -124,10 +124,7 @@ static void test_savedc_2(void) rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); ret = SaveDC(hdc); -todo_wine -{ ok(ret == 1, "ret = %d\n", ret); -} ret = IntersectClipRect(hdc, 0, 0, 50, 50); if (ret == COMPLEXREGION) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index e9705fe..b2ddfe6 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -178,16 +178,6 @@ static void update_visible_region( struct dce *dce ) /*********************************************************************** - * reset_dce_attrs - */ -static void reset_dce_attrs( struct dce *dce ) -{ - RestoreDC( dce->hdc, 1 ); /* initial save level is always 1 */ - SaveDC( dce->hdc ); /* save the state again for next time */ -} - - -/*********************************************************************** * release_dce */ static void release_dce( struct dce *dce ) @@ -235,8 +225,6 @@ static struct dce *alloc_dce(void) HeapFree( GetProcessHeap(), 0, dce ); return 0; } - SaveDC( dce->hdc ); - dce->hwnd = 0; dce->clip_rgn = 0; dce->flags = 0; @@ -352,7 +340,7 @@ void free_dce( struct dce *dce, HWND hwnd ) if (!--dce->count) { /* turn it into a cache entry */ - reset_dce_attrs( dce ); + SetHookFlags( dce->hdc, DCHF_RESETDC ); release_dce( dce ); dce->flags |= DCX_CACHE; } @@ -470,7 +458,7 @@ static INT release_dc( HWND hwnd, HDC hdc, BOOL end_paint ) dce = (struct dce *)GetDCHook( hdc, NULL ); if (dce && dce->count) { - if (!(dce->flags & DCX_NORESETATTRS)) reset_dce_attrs( dce ); + if (!(dce->flags & DCX_NORESETATTRS)) SetHookFlags( dce->hdc, DCHF_RESETDC ); if (end_paint || (dce->flags & DCX_CACHE)) delete_clip_rgn( dce ); if (dce->flags & DCX_CACHE) dce->count = 0; ret = TRUE; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 3d4e6c5..1f6376c 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -265,6 +265,7 @@ static inline ULONG window_surface_release( struct window_surface *surface ) #define DCHC_DELETEDC 0x0002 #define DCHF_INVALIDATEVISRGN 0x0001 #define DCHF_VALIDATEVISRGN 0x0002 +#define DCHF_RESETDC 0x0004 /* Wine extension */ typedef BOOL (CALLBACK *DCHOOKPROC)(HDC,WORD,DWORD_PTR,LPARAM);
1
0
0
0
Alexandre Julliard : gdi32: Remove an unused DC field.
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: 77c1856d43042958dd1e36c59ddd79c0f81a392d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77c1856d43042958dd1e36c59…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 24 18:22:29 2012 +0200 gdi32: Remove an unused DC field. --- dlls/gdi32/dc.c | 4 +--- dlls/gdi32/gdi_private.h | 1 - 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 7d70bf4..030304c 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -351,7 +351,6 @@ INT nulldrv_SaveDC( PHYSDEV dev ) newdc->hBrush = dc->hBrush; newdc->hFont = dc->hFont; newdc->hBitmap = dc->hBitmap; - newdc->hDevice = dc->hDevice; newdc->hPalette = dc->hPalette; newdc->ROPmode = dc->ROPmode; newdc->polyFillMode = dc->polyFillMode; @@ -417,7 +416,7 @@ INT nulldrv_SaveDC( PHYSDEV dev ) /*********************************************************************** - * restore_dc_state + * nulldrv_RestoreDC */ BOOL nulldrv_RestoreDC( PHYSDEV dev, INT level ) { @@ -437,7 +436,6 @@ BOOL nulldrv_RestoreDC( PHYSDEV dev, INT level ) if (!PATH_RestorePath( dc, dcs )) return FALSE; dc->layout = dcs->layout; - dc->hDevice = dcs->hDevice; dc->ROPmode = dcs->ROPmode; dc->polyFillMode = dcs->polyFillMode; dc->stretchBltMode = dcs->stretchBltMode; diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 806ca35..792a9e4 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -100,7 +100,6 @@ typedef struct tagDC HBRUSH hBrush; HFONT hFont; HBITMAP hBitmap; - HANDLE hDevice; HPALETTE hPalette; GdiFont *gdiFont;
1
0
0
0
Nikolay Sivov : dwrite: Partially implement IDWriteFontFace:: GetGlyphIndices().
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: 4dbacf05fb9503417d7c745a0b93be8000cd81ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4dbacf05fb9503417d7c745a0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 24 16:05:01 2012 -0400 dwrite: Partially implement IDWriteFontFace::GetGlyphIndices(). --- dlls/dwrite/font.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 4b697e9..7d332b7 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -154,11 +154,14 @@ struct dwrite_font { DWRITE_FONT_STRETCH stretch; DWRITE_FONT_WEIGHT weight; DWRITE_FONT_METRICS metrics; + WCHAR *facename; }; struct dwrite_fontface { IDWriteFontFace IDWriteFontFace_iface; LONG ref; + + LOGFONTW logfont; }; static HRESULT create_fontfamily(const WCHAR *familyname, IDWriteFontFamily **family); @@ -282,8 +285,30 @@ static HRESULT WINAPI dwritefontface_GetGlyphIndices(IDWriteFontFace *iface, UIN UINT32 count, UINT16 *glyph_indices) { struct dwrite_fontface *This = impl_from_IDWriteFontFace(iface); - FIXME("(%p)->(%p %u %p): stub\n", This, codepoints, count, glyph_indices); - return E_NOTIMPL; + HFONT hfont; + WCHAR *str; + HDC hdc; + int i; + + TRACE("(%p)->(%p %u %p)\n", This, codepoints, count, glyph_indices); + + str = heap_alloc(count*sizeof(WCHAR)); + if (!str) return E_OUTOFMEMORY; + + for (i = 0; i < count; i++) + str[i] = codepoints[i] < 0x10000 ? codepoints[i] : '?'; + + hdc = CreateCompatibleDC(0); + hfont = CreateFontIndirectW(&This->logfont); + SelectObject(hdc, hfont); + + GetGlyphIndicesW(hdc, str, count, glyph_indices, 0); + heap_free(str); + + DeleteDC(hdc); + DeleteObject(hfont); + + return S_OK; } static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace *iface, UINT32 table_tag, @@ -357,7 +382,7 @@ static const IDWriteFontFaceVtbl dwritefontfacevtbl = { dwritefontface_GetGdiCompatibleGlyphMetrics }; -static HRESULT create_fontface(IDWriteFontFace **face) +static HRESULT create_fontface(struct dwrite_font *font, IDWriteFontFace **face) { struct dwrite_fontface *This; @@ -368,6 +393,11 @@ static HRESULT create_fontface(IDWriteFontFace **face) This->IDWriteFontFace_iface.lpVtbl = &dwritefontfacevtbl; This->ref = 1; + + memset(&This->logfont, 0, sizeof(This->logfont)); + This->logfont.lfItalic = font->style == DWRITE_FONT_STYLE_ITALIC; + strcpyW(This->logfont.lfFaceName, font->facename); + *face = &This->IDWriteFontFace_iface; return S_OK; @@ -409,6 +439,7 @@ static ULONG WINAPI dwritefont_Release(IDWriteFont *iface) { if (This->face) IDWriteFontFace_Release(This->face); IDWriteFontFamily_Release(This->family); + heap_free(This->facename); heap_free(This); } @@ -498,7 +529,7 @@ static HRESULT WINAPI dwritefont_CreateFontFace(IDWriteFont *iface, IDWriteFontF if (!This->face) { - HRESULT hr = create_fontface(&This->face); + HRESULT hr = create_fontface(This, &This->face); if (FAILED(hr)) return hr; } @@ -525,7 +556,6 @@ static const IDWriteFontVtbl dwritefontvtbl = { dwritefont_CreateFontFace }; - static HRESULT WINAPI dwritefontfamily_QueryInterface(IDWriteFontFamily *iface, REFIID riid, void **obj) { struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily(iface); @@ -925,6 +955,7 @@ HRESULT create_font_from_logfont(const LOGFONTW *logfont, IDWriteFont **font) This->face = NULL; This->family = family; This->style = logfont->lfItalic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL; + This->facename = heap_strdupW(logfont->lfFaceName); *font = &This->IDWriteFont_iface;
1
0
0
0
Nikolay Sivov : dwrite: Implement some font properties accessors for IDWriteTextFormat.
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: 8089f73e87c1077c3b13d61f1ff8bb858530aac0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8089f73e87c1077c3b13d61f1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 23 08:37:48 2012 -0400 dwrite: Implement some font properties accessors for IDWriteTextFormat. --- dlls/dwrite/layout.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index a2d1ef9..e793e49 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -871,29 +871,29 @@ static HRESULT WINAPI dwritetextformat_GetFontFamilyName(IDWriteTextFormat *ifac static DWRITE_FONT_WEIGHT WINAPI dwritetextformat_GetFontWeight(IDWriteTextFormat *iface) { struct dwrite_textformat *This = impl_from_IDWriteTextFormat(iface); - FIXME("(%p): stub\n", This); - return DWRITE_FONT_WEIGHT_NORMAL; + TRACE("(%p)\n", This); + return This->format.weight; } static DWRITE_FONT_STYLE WINAPI dwritetextformat_GetFontStyle(IDWriteTextFormat *iface) { struct dwrite_textformat *This = impl_from_IDWriteTextFormat(iface); - FIXME("(%p): stub\n", This); - return DWRITE_FONT_STYLE_NORMAL; + TRACE("(%p)\n", This); + return This->format.style; } static DWRITE_FONT_STRETCH WINAPI dwritetextformat_GetFontStretch(IDWriteTextFormat *iface) { struct dwrite_textformat *This = impl_from_IDWriteTextFormat(iface); - FIXME("(%p): stub\n", This); - return DWRITE_FONT_STRETCH_NORMAL; + TRACE("(%p)\n", This); + return This->format.stretch; } static FLOAT WINAPI dwritetextformat_GetFontSize(IDWriteTextFormat *iface) { struct dwrite_textformat *This = impl_from_IDWriteTextFormat(iface); - FIXME("(%p): stub\n", This); - return 0.0; + TRACE("(%p)\n", This); + return This->format.size; } static UINT32 WINAPI dwritetextformat_GetLocaleNameLength(IDWriteTextFormat *iface)
1
0
0
0
Nikolay Sivov : dwrite: Derive some format data for text layout from specified text format.
by Alexandre Julliard
24 Oct '12
24 Oct '12
Module: wine Branch: master Commit: 2250f0e5336382bb4f344d54fe189a9c7234c878 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2250f0e5336382bb4f344d54f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 23 08:48:17 2012 -0400 dwrite: Derive some format data for text layout from specified text format. --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/layout.c | 12 +++++++++++- dlls/dwrite/main.c | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 7216393..ef50b54 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -70,7 +70,7 @@ static inline LPWSTR heap_strdupnW(const WCHAR *str, UINT32 len) extern HRESULT create_font_from_logfont(const LOGFONTW*, IDWriteFont**) DECLSPEC_HIDDEN; extern HRESULT create_textformat(const WCHAR*,IDWriteFontCollection*,DWRITE_FONT_WEIGHT,DWRITE_FONT_STYLE,DWRITE_FONT_STRETCH, FLOAT,const WCHAR*,IDWriteTextFormat**) DECLSPEC_HIDDEN; -extern HRESULT create_textlayout(const WCHAR*,UINT32,IDWriteTextLayout**) DECLSPEC_HIDDEN; +extern HRESULT create_textlayout(const WCHAR*,UINT32,IDWriteTextFormat*,IDWriteTextLayout**) DECLSPEC_HIDDEN; extern HRESULT create_gdiinterop(IDWriteGdiInterop**) DECLSPEC_HIDDEN; extern HRESULT create_localizedstrings(IDWriteLocalizedStrings**) DECLSPEC_HIDDEN; extern HRESULT add_localizedstring(IDWriteLocalizedStrings*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index e793e49..8567c6a 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -664,7 +664,7 @@ static const IDWriteTextLayoutVtbl dwritetextlayoutvtbl = { dwritetextlayout_HitTestTextRange }; -HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextLayout **layout) +HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *format, IDWriteTextLayout **layout) { struct dwrite_textlayout *This; @@ -678,6 +678,16 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextLayout **layo This->str = heap_strdupnW(str, len); memset(&This->format, 0, sizeof(This->format)); + /* reference is not kept here, instead copy all underlying data */ + if (format) + { + IDWriteTextFormat_GetFontCollection(format, &This->format.collection); + This->format.weight = IDWriteTextFormat_GetFontWeight(format); + This->format.style = IDWriteTextFormat_GetFontStyle(format); + This->format.stretch = IDWriteTextFormat_GetFontStretch(format); + This->format.size = IDWriteTextFormat_GetFontSize(format); + } + *layout = &This->IDWriteTextLayout_iface; return S_OK; diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index 09ed3f2..7514492 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -506,10 +506,10 @@ static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory *iface, IDWrite static HRESULT WINAPI dwritefactory_CreateTextLayout(IDWriteFactory *iface, WCHAR const* string, UINT32 len, IDWriteTextFormat *format, FLOAT max_width, FLOAT max_height, IDWriteTextLayout **layout) { - FIXME("(%s %u %p %f %f %p): stub\n", debugstr_w(string), len, format, max_width, max_height, layout); + TRACE("(%s %u %p %f %f %p)\n", debugstr_w(string), len, format, max_width, max_height, layout); if (!format) return E_INVALIDARG; - return create_textlayout(string, len, layout); + return create_textlayout(string, len, format, layout); } static HRESULT WINAPI dwritefactory_CreateGdiCompatibleTextLayout(IDWriteFactory *iface, WCHAR const* string, @@ -520,7 +520,7 @@ static HRESULT WINAPI dwritefactory_CreateGdiCompatibleTextLayout(IDWriteFactory pixels_per_dip, transform, use_gdi_natural, layout); if (!format) return E_INVALIDARG; - return create_textlayout(string, len, layout); + return create_textlayout(string, len, format, layout); } static HRESULT WINAPI dwritefactory_CreateEllipsisTrimmingSign(IDWriteFactory *iface, IDWriteTextFormat *format,
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
96
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200