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
February 2009
----- 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
965 discussions
Start a n
N
ew thread
Aurimas Fischer : gdiplus: Implement GdipSetStringFormatFlags with tests.
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: 2489e76b5955d5794f6aed58513b6c69494ce951 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2489e76b5955d5794f6aed585…
Author: Aurimas Fischer <aurimas(a)gmail.com> Date: Sun Feb 1 17:15:57 2009 +0200 gdiplus: Implement GdipSetStringFormatFlags with tests. --- dlls/gdiplus/stringformat.c | 5 ++- dlls/gdiplus/tests/stringformat.c | 62 +++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index a28f014..21053b7 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -286,7 +286,10 @@ GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format, GpStatus WINGDIPAPI GdipSetStringFormatFlags(GpStringFormat *format, INT flags) { - FIXME("format (%p) flags (%d)\n", format, flags); + if(!format) + return InvalidParameter; + + format->attr = flags; return Ok; } diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index 9331912..b28dbc6 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -318,6 +318,67 @@ static void test_getgenericdefault(void) expect(Ok, stat); } +static void test_stringformatflags(void) +{ + GpStringFormat *format; + GpStatus stat; + + INT flags; + + stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); + expect(Ok, stat); + + /* NULL args */ + stat = GdipSetStringFormatFlags(NULL, 0); + expect(InvalidParameter, stat); + + stat = GdipSetStringFormatFlags(format, 0); + expect(Ok, stat); + stat = GdipGetStringFormatFlags(format, &flags); + expect(Ok, stat); + expect(0, flags); + + /* Check some valid flags */ + stat = GdipSetStringFormatFlags(format, StringFormatFlagsDirectionRightToLeft); + expect(Ok, stat); + stat = GdipGetStringFormatFlags(format, &flags); + expect(Ok, stat); + expect(StringFormatFlagsDirectionRightToLeft, flags); + + stat = GdipSetStringFormatFlags(format, StringFormatFlagsNoFontFallback); + expect(Ok, stat); + stat = GdipGetStringFormatFlags(format, &flags); + expect(Ok, stat); + expect(StringFormatFlagsNoFontFallback, flags); + + /* Check some flag combinations */ + stat = GdipSetStringFormatFlags(format, StringFormatFlagsDirectionVertical + | StringFormatFlagsNoFitBlackBox); + expect(Ok, stat); + stat = GdipGetStringFormatFlags(format, &flags); + expect(Ok, stat); + expect((StringFormatFlagsDirectionVertical + | StringFormatFlagsNoFitBlackBox), flags); + + stat = GdipSetStringFormatFlags(format, StringFormatFlagsDisplayFormatControl + | StringFormatFlagsMeasureTrailingSpaces); + expect(Ok, stat); + stat = GdipGetStringFormatFlags(format, &flags); + expect(Ok, stat); + expect((StringFormatFlagsDisplayFormatControl + | StringFormatFlagsMeasureTrailingSpaces), flags); + + /* Check invalid flags */ + stat = GdipSetStringFormatFlags(format, 0xdeadbeef); + expect(Ok, stat); + stat = GdipGetStringFormatFlags(format, &flags); + expect(Ok, stat); + expect(0xdeadbeef, flags); + + stat = GdipDeleteStringFormat(format); + expect(Ok, stat); +} + START_TEST(stringformat) { struct GdiplusStartupInput gdiplusStartupInput; @@ -336,6 +397,7 @@ START_TEST(stringformat) test_getgenerictypographic(); test_tabstops(); test_getgenericdefault(); + test_stringformatflags(); GdiplusShutdown(gdiplusToken); }
1
0
0
0
Aurimas Fischer : include: Add GdipSetStringFormatFlags prototype.
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: 6319006368bf85a8347cd230a1097d233f6899b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6319006368bf85a8347cd230a…
Author: Aurimas Fischer <aurimas(a)gmail.com> Date: Sun Feb 1 16:19:05 2009 +0200 include: Add GdipSetStringFormatFlags prototype. --- dlls/gdiplus/stringformat.c | 2 +- include/gdiplusflat.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 201201a..a28f014 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -284,7 +284,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format, return Ok; } -GpStatus WINGDIPAPI GdipSetStringFormatFlags(GDIPCONST GpStringFormat *format, INT flags) +GpStatus WINGDIPAPI GdipSetStringFormatFlags(GpStringFormat *format, INT flags) { FIXME("format (%p) flags (%d)\n", format, flags); diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 1a39dee..cb53ea4 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -561,6 +561,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatMeasurableCharacterRanges( GpStringFormat*, INT, GDIPCONST CharacterRange*); GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat*,REAL,INT,GDIPCONST REAL*); GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); +GpStatus WINGDIPAPI GdipSetStringFormatFlags(GpStringFormat*, INT); GpStatus WINGDIPAPI GdipStringFormatGetGenericDefault(GpStringFormat **); GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat **);
1
0
0
0
Detlef Riekenberg : comctl32: Make the status control height dpi and theme aware.
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: dd8515915575203bc5fc8383675e3ad4a86a53b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd8515915575203bc5fc83836…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Feb 1 11:59:11 2009 +0100 comctl32: Make the status control height dpi and theme aware. --- dlls/comctl32/status.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index d107329..35d3bd4 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -95,7 +95,6 @@ typedef struct #define HORZ_BORDER 0 #define VERT_BORDER 2 #define HORZ_GAP 2 -#define MIN_PANE_HEIGHT 18 static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 }; @@ -649,7 +648,9 @@ STATUSBAR_SetIcon (STATUS_INFO *infoPtr, INT nPart, HICON hIcon) static BOOL STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height) { - infoPtr->minHeight = max(height, MIN_PANE_HEIGHT); + DWORD ysize = GetSystemMetrics(SM_CYSIZE); + if (ysize & 1) ysize--; + infoPtr->minHeight = max(height, ysize); infoPtr->height = STATUSBAR_ComputeHeight(infoPtr); /* like native, don't resize the control */ return TRUE; @@ -921,7 +922,8 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) infoPtr->horizontalBorder = HORZ_BORDER; infoPtr->verticalBorder = VERT_BORDER; infoPtr->horizontalGap = HORZ_GAP; - infoPtr->minHeight = MIN_PANE_HEIGHT; + infoPtr->minHeight = GetSystemMetrics(SM_CYSIZE); + if (infoPtr->minHeight & 1) infoPtr->minHeight--; STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY);
1
0
0
0
Marcus Meissner : dmime: Added missing NULL ptr check (Coverity).
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: 3ce650bfd0b82b750d0e79539a14440348018a3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ce650bfd0b82b750d0e79539…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jan 31 23:40:05 2009 +0100 dmime: Added missing NULL ptr check (Coverity). --- dlls/dmime/segtriggertrack.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/dmime/segtriggertrack.c b/dlls/dmime/segtriggertrack.c index 1f9e784..16fd3c3 100644 --- a/dlls/dmime/segtriggertrack.c +++ b/dlls/dmime/segtriggertrack.c @@ -274,7 +274,7 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS TRACE_(dmfile)(": segment item chunk\n"); /** alloc new item entry */ pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_ITEM)); - if (NULL == pNewItem) { + if (!pNewItem) { ERR(": no more memory\n"); return E_OUTOFMEMORY; } @@ -288,6 +288,10 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS } case DMUS_FOURCC_SEGMENTITEMNAME_CHUNK: { TRACE_(dmfile)(": segment item name chunk\n"); + if (!pNewItem) { + ERR(": pNewItem not allocated, bad chunk order?\n"); + return E_FAIL; + } IStream_Read (pStm, pNewItem->wszName, Chunk.dwSize, NULL); TRACE_(dmfile)(" - name: %s\n", debugstr_w(pNewItem->wszName)); break; @@ -305,6 +309,10 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS ERR(": could not load Reference\n"); return hr; } + if (!pNewItem) { + ERR(": pNewItem not allocated, bad chunk order?\n"); + return E_FAIL; + } pNewItem->pObject = pObject; break; }
1
0
0
0
Marcus Meissner : itss: Move buffer initialization a bit up (Coverity).
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: e7d58bdd5243d31dec0f7c735566b6b9744ddf7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7d58bdd5243d31dec0f7c735…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jan 31 23:50:30 2009 +0100 itss: Move buffer initialization a bit up (Coverity). --- dlls/itss/chm_lib.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/itss/chm_lib.c b/dlls/itss/chm_lib.c index 6b80ef2..e0fceb3 100644 --- a/dlls/itss/chm_lib.c +++ b/dlls/itss/chm_lib.c @@ -759,6 +759,10 @@ struct chmFile *chm_openW(const WCHAR *filename) if (newHandle->index_root == -1) newHandle->index_root = newHandle->index_head; + /* initialize cache */ + chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED, + CHM_MAX_BLOCKS_CACHED); + /* By default, compression is enabled. */ newHandle->compression_enabled = 1; @@ -822,10 +826,6 @@ struct chmFile *chm_openW(const WCHAR *filename) #endif } - /* initialize cache */ - chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED, - CHM_MAX_BLOCKS_CACHED); - return newHandle; }
1
0
0
0
Marcus Meissner : dmstyle: Another NULL ptr check added (Coverity).
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: 9d47f87b4cd1869534eaecadd3bbb32e12b6ff2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d47f87b4cd1869534eaecadd…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jan 31 23:30:59 2009 +0100 dmstyle: Another NULL ptr check added (Coverity). --- dlls/dmstyle/style.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/dmstyle/style.c b/dlls/dmstyle/style.c index 79c3fdd..eb6e77c 100644 --- a/dlls/dmstyle/style.c +++ b/dlls/dmstyle/style.c @@ -500,9 +500,9 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePartRefList (LPPERSIST case DMUS_FOURCC_PARTREF_CHUNK: { TRACE_(dmfile)(": PartRef chunk\n"); pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_STYLE_PARTREF_ITEM)); - if (NULL == pNewItem) { + if (!pNewItem) { ERR(": no more memory\n"); - return E_OUTOFMEMORY; + return E_OUTOFMEMORY; } hr = IStream_Read (pStm, &pNewItem->part_ref, sizeof(DMUS_IO_PARTREF), NULL); /*TRACE_(dmfile)(" - sizeof %lu\n", sizeof(DMUS_IO_PARTREF));*/ @@ -523,6 +523,10 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePartRefList (LPPERSIST ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); + if (!pNewItem) { + ERR(": pNewItem not yet allocated, chunk order bad?\n"); + return E_OUTOFMEMORY; + } hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &pNewItem->desc); if (FAILED(hr)) return hr;
1
0
0
0
Marcus Meissner : winhlp32: Check hlpfile for being NULL (Coverity).
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: 55ae86ccb17d58025f07f6c9b440e836bb56e240 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55ae86ccb17d58025f07f6c9b…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jan 31 22:24:51 2009 +0100 winhlp32: Check hlpfile for being NULL (Coverity). --- programs/winhlp32/winhelp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 15e17f6..7a9e093 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -274,7 +274,7 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name) { strcpy(mwi.type, "primary"); strcpy(mwi.name, "main"); - if (!LoadString(Globals.hInstance, STID_WINE_HELP, + if (hlpfile && !LoadString(Globals.hInstance, STID_WINE_HELP, mwi.caption, sizeof(mwi.caption))) strcpy(mwi.caption, hlpfile->lpszTitle); mwi.origin.x = mwi.origin.y = mwi.size.cx = mwi.size.cy = CW_USEDEFAULT;
1
0
0
0
Marcus Meissner : dbghelp: Check for wImageName being NULL (Coverity).
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: 54e8ecf1b028f718c95a36a95979101268df7062 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=54e8ecf1b028f718c95a36a95…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jan 31 13:23:35 2009 +0100 dbghelp: Check for wImageName being NULL (Coverity). --- dlls/dbghelp/module.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 49b7742..fcdea2e 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -543,7 +543,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam if (!(module = pe_load_native_module(pcs, wImageName, hFile, BaseOfDll, SizeOfDll))) { /* and finally and ELF module */ - if (module_get_type_by_name(wImageName) == DMT_ELF) + if (wImageName && (module_get_type_by_name(wImageName) == DMT_ELF)) module = elf_load_module(pcs, wImageName, BaseOfDll); } }
1
0
0
0
Aric Stewart : msctf: Add ITfDocumentMgr interface.
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: fdbe3d187020a4d11aa83d69ac2f0a3316845972 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdbe3d187020a4d11aa83d69a…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri Jan 30 14:27:06 2009 -0600 msctf: Add ITfDocumentMgr interface. --- dlls/msctf/Makefile.in | 1 + dlls/msctf/documentmgr.c | 167 +++++++++++++++++++++++++++++++++++++++++++ dlls/msctf/msctf_internal.h | 1 + dlls/msctf/threadmgr.c | 5 +- include/msctf.idl | 36 +++++++++ 5 files changed, 207 insertions(+), 3 deletions(-) diff --git a/dlls/msctf/Makefile.in b/dlls/msctf/Makefile.in index 6872551..a629554 100644 --- a/dlls/msctf/Makefile.in +++ b/dlls/msctf/Makefile.in @@ -6,6 +6,7 @@ MODULE = msctf.dll IMPORTS = uuid ole32 user32 advapi32 kernel32 ntdll C_SRCS = \ + documentmgr.c \ msctf.c \ regsvr.c \ threadmgr.c diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c new file mode 100644 index 0000000..fe02320 --- /dev/null +++ b/dlls/msctf/documentmgr.c @@ -0,0 +1,167 @@ +/* + * ITfDocumentMgr implementation + * + * Copyright 2009 Aric Stewart, CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include <stdarg.h> + +#define COBJMACROS + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winuser.h" +#include "shlwapi.h" +#include "winerror.h" +#include "objbase.h" + +#include "wine/unicode.h" + +#include "msctf.h" +#include "msctf_internal.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msctf); + +typedef struct tagDocumentMgr { + const ITfDocumentMgrVtbl *DocumentMgrVtbl; + LONG refCount; +} DocumentMgr; + +static void DocumentMgr_Destructor(DocumentMgr *This) +{ + TRACE("destroying %p\n", This); + HeapFree(GetProcessHeap(),0,This); +} + +static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID iid, LPVOID *ppvOut) +{ + DocumentMgr *This = (DocumentMgr *)iface; + *ppvOut = NULL; + + if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfDocumentMgr)) + { + *ppvOut = This; + } + + if (*ppvOut) + { + IUnknown_AddRef(iface); + return S_OK; + } + + WARN("unsupported interface: %s\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI DocumentMgr_AddRef(ITfDocumentMgr *iface) +{ + DocumentMgr *This = (DocumentMgr *)iface; + return InterlockedIncrement(&This->refCount); +} + +static ULONG WINAPI DocumentMgr_Release(ITfDocumentMgr *iface) +{ + DocumentMgr *This = (DocumentMgr *)iface; + ULONG ret; + + ret = InterlockedDecrement(&This->refCount); + if (ret == 0) + DocumentMgr_Destructor(This); + return ret; +} + +/***************************************************** + * ITfDocumentMgr functions + *****************************************************/ +static HRESULT WINAPI DocumentMgr_CreateContext(ITfDocumentMgr *iface, + TfClientId tidOwner, + DWORD dwFlags, IUnknown *punk, ITfContext **ppic, + TfEditCookie *pecTextStore) +{ + DocumentMgr *This = (DocumentMgr *)iface; + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic) +{ + DocumentMgr *This = (DocumentMgr *)iface; + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags) +{ + DocumentMgr *This = (DocumentMgr *)iface; + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocumentMgr_GetTop(ITfDocumentMgr *iface, ITfContext **ppic) +{ + DocumentMgr *This = (DocumentMgr *)iface; + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocumentMgr_GetBase(ITfDocumentMgr *iface, ITfContext **ppic) +{ + DocumentMgr *This = (DocumentMgr *)iface; + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocumentMgr_EnumContexts(ITfDocumentMgr *iface, IEnumTfContexts **ppEnum) +{ + DocumentMgr *This = (DocumentMgr *)iface; + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl = +{ + DocumentMgr_QueryInterface, + DocumentMgr_AddRef, + DocumentMgr_Release, + + DocumentMgr_CreateContext, + DocumentMgr_Push, + DocumentMgr_Pop, + DocumentMgr_GetTop, + DocumentMgr_GetBase, + DocumentMgr_EnumContexts +}; + +HRESULT DocumentMgr_Constructor(ITfDocumentMgr **ppOut) +{ + DocumentMgr *This; + + This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DocumentMgr)); + if (This == NULL) + return E_OUTOFMEMORY; + + This->DocumentMgrVtbl= &DocumentMgr_DocumentMgrVtbl; + This->refCount = 1; + + TRACE("returning %p\n", This); + *ppOut = (ITfDocumentMgr*)This; + return S_OK; +} diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index b8fd3ba..ee87a50 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -22,5 +22,6 @@ #define __WINE_MSCTF_I_H extern HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); +extern HRESULT DocumentMgr_Constructor(ITfDocumentMgr **ppOut); #endif /* __WINE_MSCTF_I_H */ diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c index 1867570..7589052 100644 --- a/dlls/msctf/threadmgr.c +++ b/dlls/msctf/threadmgr.c @@ -109,9 +109,8 @@ static HRESULT WINAPI ThreadMgr_fnDeactivate( ITfThreadMgr* iface) static HRESULT WINAPI ThreadMgr_CreateDocumentMgr( ITfThreadMgr* iface, ITfDocumentMgr **ppdim) { - ThreadMgr *This = (ThreadMgr *)iface; - FIXME("STUB:(%p)\n",This); - return E_NOTIMPL; + TRACE("(%p)\n",iface); + return DocumentMgr_Constructor(ppdim); } static HRESULT WINAPI ThreadMgr_EnumDocumentMgrs( ITfThreadMgr* iface, IEnumTfDocumentMgrs diff --git a/include/msctf.idl b/include/msctf.idl index 2ef8b07..620b65f 100644 --- a/include/msctf.idl +++ b/include/msctf.idl @@ -25,10 +25,13 @@ import "comcat.idl"; cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;") +typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie; typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId; interface ITfDocumentMgr; +interface ITfContext; interface IEnumTfDocumentMgrs; +interface IEnumTfContexts; interface ITfFunctionProvider; interface IEnumTfFunctionProviders; interface ITfCompartmentMgr; @@ -75,3 +78,36 @@ interface ITfThreadMgr: IUnknown HRESULT GetGlobalCompartment( [out] ITfCompartmentMgr **ppCompMgr); }; + + +[ + object, + uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e), + pointer_default(unique) +] +interface ITfDocumentMgr: IUnknown +{ + HRESULT CreateContext( + [in] TfClientId tidOwner, + [in] DWORD dwFlags, + [in, unique] IUnknown *punk, + [out] ITfContext **ppic, + [out] TfEditCookie *pecTextStore); + + HRESULT Push( + [in] ITfContext *pic); + + const DWORD TF_POPF_ALL = 0x0001; + + HRESULT Pop( + [in] DWORD dwFlags); + + HRESULT GetTop( + [out] ITfContext **ppic); + + HRESULT GetBase( + [out] ITfContext **ppic); + + HRESULT EnumContexts( + [out] IEnumTfContexts **ppEnum); +};
1
0
0
0
Vitaliy Margolen : comctl32: Fix propsheet size calculation.
by Alexandre Julliard
02 Feb '09
02 Feb '09
Module: wine Branch: master Commit: edbea606f94a34872097620e2b79e9c07fa3c921 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edbea606f94a34872097620e2…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Fri Jan 30 09:06:03 2009 -0700 comctl32: Fix propsheet size calculation. --- dlls/comctl32/propsheet.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 7c2f26a..785643d 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -740,7 +740,7 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo) HWND hwndTabCtrl = GetDlgItem(hwndDlg, IDC_TABCONTROL); HWND hwndButton = GetDlgItem(hwndDlg, IDOK); RECT rc,tabRect; - int tabOffsetX, tabOffsetY, buttonHeight; + int buttonHeight; PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndDlg); RECT units; @@ -784,9 +784,6 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo) SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, TRUE, (LPARAM)&rc); - tabOffsetX = -(rc.left); - tabOffsetY = -(rc.top); - rc.right -= rc.left; rc.bottom -= rc.top; TRACE("setting tab %p, rc (0,0)-(%d,%d)\n", @@ -798,8 +795,14 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo) TRACE("tab client rc %s\n", wine_dbgstr_rect(&rc)); - rc.right += ((padding.x * 2) + tabOffsetX); - rc.bottom += (buttonHeight + (3 * padding.y) + tabOffsetY); + rc.right += (padding.x * 2); + rc.bottom += buttonHeight + (3 * padding.y); + + if (!psInfo->isModeless) + AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE); + + rc.right -= rc.left; + rc.bottom -= rc.top; /* * Resize the property sheet.
1
0
0
0
← Newer
1
...
89
90
91
92
93
94
95
96
97
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
97
Results per page:
10
25
50
100
200