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 2018
----- 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
804 discussions
Start a n
N
ew thread
Fabian Maurer : comctl32/tests: Add test for v6 combobox dropdown size.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 1f1e7259e6d0f6e87f79c31f3ff4710ac2a84d27 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f1e7259e6d0f6e87f79c31f…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Tue Feb 6 10:26:25 2018 +0300 comctl32/tests: Add test for v6 combobox dropdown size. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/combo.c | 110 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/dlls/comctl32/tests/combo.c b/dlls/comctl32/tests/combo.c index 895d942..da2ded2 100644 --- a/dlls/comctl32/tests/combo.c +++ b/dlls/comctl32/tests/combo.c @@ -1151,6 +1151,114 @@ static void test_combo_WS_VSCROLL(void) DestroyWindow(hCombo); } +static void test_combo_dropdown_size(DWORD style) +{ + static const char wine_test[] = "Wine Test"; + HWND hCombo, hList; + COMBOBOXINFO cbInfo; + int i, test, ret; + + static const struct list_size_info + { + int num_items; + int height_combo; + int limit; + } info_height[] = { + {33, 50, -1}, + {35, 50, 40}, + {15, 50, 3}, + }; + + for (test = 0; test < sizeof(info_height) / sizeof(info_height[0]); test++) + { + const struct list_size_info *info_test = &info_height[test]; + int height_item; /* Height of a list item */ + int height_list; /* Height of the list we got */ + int expected_height_list; + RECT rect_list_client; + int min_visible_expected; + + hCombo = CreateWindowA(WC_COMBOBOXA, "Combo", CBS_DROPDOWN | WS_VISIBLE | WS_CHILD | style, 5, 5, 100, + info_test->height_combo, hMainWnd, (HMENU)COMBO_ID, NULL, 0); + + min_visible_expected = SendMessageA(hCombo, CB_GETMINVISIBLE, 0, 0); + todo_wine + ok(min_visible_expected == 30, "Unexpected number of items %d.\n", min_visible_expected); + + cbInfo.cbSize = sizeof(COMBOBOXINFO); + ret = SendMessageA(hCombo, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbInfo); + ok(ret, "Failed to get combo info, %d\n", ret); + + hList = cbInfo.hwndList; + for (i = 0; i < info_test->num_items; i++) + { + ret = SendMessageA(hCombo, CB_ADDSTRING, 0, (LPARAM) wine_test); + ok(ret == i, "Failed to add string %d, returned %d.\n", i, ret); + } + + if (info_test->limit != -1) + { + int min_visible_actual; + min_visible_expected = info_test->limit; + + ret = SendMessageA(hCombo, CB_SETMINVISIBLE, min_visible_expected, 0); + todo_wine + ok(ret, "Failed to set visible limit.\n"); + min_visible_actual = SendMessageA(hCombo, CB_GETMINVISIBLE, 0, 0); + todo_wine + ok(min_visible_expected == min_visible_actual, "test %d: unexpected number of items %d.\n", + test, min_visible_actual); + } + + ret = SendMessageA(hCombo, CB_SHOWDROPDOWN, TRUE,0); + ok(ret, "Failed to show dropdown.\n"); + ret = SendMessageA(hCombo, CB_GETDROPPEDSTATE, 0, 0); + ok(ret, "Unexpected dropped state.\n"); + + GetClientRect(hList, &rect_list_client); + height_list = rect_list_client.bottom - rect_list_client.top; + height_item = (int)SendMessageA(hList, LB_GETITEMHEIGHT, 0, 0); + + if (style & CBS_NOINTEGRALHEIGHT) + { + RECT rect_list_complete; + int list_height_nonclient; + int list_height_calculated; + int edit_padding_size = cbInfo.rcItem.top; /* edit client rect top is the padding it has to its parent + We assume it's the same on the bottom */ + + GetWindowRect(hList, &rect_list_complete); + + list_height_nonclient = (rect_list_complete.bottom - rect_list_complete.top) + - (rect_list_client.bottom - rect_list_client.top); + + /* Calculate the expected client size of the listbox popup from the size of the combobox. */ + list_height_calculated = info_test->height_combo /* Take height we created combobox with */ + - (cbInfo.rcItem.bottom - cbInfo.rcItem.top) /* Subtract size of edit control */ + - list_height_nonclient /* Subtract list nonclient area */ + - edit_padding_size * 2; /* subtract space around the edit control */ + + expected_height_list = min(list_height_calculated, height_item * info_test->num_items); + if (expected_height_list < 0) + expected_height_list = 0; + + todo_wine + ok(expected_height_list == height_list, "Test %d, expected list height to be %d, got %d\n", + test, expected_height_list, height_list); + } + else + { + expected_height_list = min(info_test->num_items, min_visible_expected) * height_item; + + todo_wine + ok(expected_height_list == height_list, "Test %d, expected list height to be %d, got %d\n", + test, expected_height_list, height_list); + } + + DestroyWindow(hCombo); + } +} + START_TEST(combo) { ULONG_PTR ctx_cookie; @@ -1192,6 +1300,8 @@ START_TEST(combo) test_combo_listbox_styles(CBS_SIMPLE); test_combo_listbox_styles(CBS_DROPDOWN); test_combo_listbox_styles(CBS_DROPDOWNLIST); + test_combo_dropdown_size(0); + test_combo_dropdown_size(CBS_NOINTEGRALHEIGHT); cleanup(); unload_v6_module(ctx_cookie, hCtx);
1
0
0
0
Nikolay Sivov : msxml3/tests: Use the global HeapAlloc() helpers.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 75782e7cc3a14f46273f24d2bd0aa03147bb4deb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=75782e7cc3a14f46273f24d2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 6 08:57:32 2018 +0300 msxml3/tests: Use the global HeapAlloc() helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/tests/domdoc.c | 5 +++-- dlls/msxml3/tests/httpreq.c | 5 +++-- dlls/msxml3/tests/saxreader.c | 20 +++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 81e2493..7aeafa5 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -40,6 +40,7 @@ #include "initguid.h" #include "asptlb.h" +#include "wine/heap.h" #include "wine/test.h" /* undef the #define in msxml2 so that we can access all versions */ @@ -172,7 +173,7 @@ static ULONG WINAPI dispevent_Release(IDispatch *iface) ULONG ref = InterlockedDecrement( &This->ref ); if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); return ref; } @@ -232,7 +233,7 @@ static const IDispatchVtbl dispeventVtbl = static IDispatch* create_dispevent(void) { - dispevent *event = HeapAlloc(GetProcessHeap(), 0, sizeof(*event)); + dispevent *event = heap_alloc(sizeof(*event)); event->IDispatch_iface.lpVtbl = &dispeventVtbl; event->ref = 1; diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c index 538e23f..4f51ef9 100644 --- a/dlls/msxml3/tests/httpreq.c +++ b/dlls/msxml3/tests/httpreq.c @@ -35,6 +35,7 @@ #include "objsafe.h" #include "mshtml.h" +#include "wine/heap.h" #include "wine/test.h" #define EXPECT_HR(hr,hr_exp) \ @@ -1243,7 +1244,7 @@ static ULONG WINAPI dispevent_Release(IDispatch *iface) ULONG ref = InterlockedDecrement( &This->ref ); if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); return ref; } @@ -1320,7 +1321,7 @@ static const IDispatchVtbl dispeventVtbl = static IDispatch* create_dispevent(void) { - dispevent *event = HeapAlloc(GetProcessHeap(), 0, sizeof(*event)); + dispevent *event = heap_alloc(sizeof(*event)); event->IDispatch_iface.lpVtbl = &dispeventVtbl; event->ref = 1; diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index 34d11e6..9ebed62 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -33,6 +33,7 @@ #include "ocidl.h" #include "dispex.h" +#include "wine/heap.h" #include "wine/test.h" static const WCHAR emptyW[] = {0}; @@ -257,16 +258,13 @@ static void add_call(struct call_sequence **seq, int sequence_index, if (!call_seq->sequence) { call_seq->size = 10; - call_seq->sequence = HeapAlloc(GetProcessHeap(), 0, - call_seq->size * sizeof (struct call_entry)); + call_seq->sequence = heap_alloc(call_seq->size * sizeof (struct call_entry)); } if (call_seq->count == call_seq->size) { call_seq->size *= 2; - call_seq->sequence = HeapReAlloc(GetProcessHeap(), 0, - call_seq->sequence, - call_seq->size * sizeof (struct call_entry)); + call_seq->sequence = heap_realloc(call_seq->sequence, call_seq->size * sizeof (struct call_entry)); } assert(call_seq->sequence); @@ -301,7 +299,7 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index SysFreeString(call_seq->sequence[i].attributes[j].qnameW); SysFreeString(call_seq->sequence[i].attributes[j].valueW); } - HeapFree(GetProcessHeap(), 0, call_seq->sequence[i].attributes); + heap_free(call_seq->sequence[i].attributes); call_seq->sequence[i].attr_count = 0; SysFreeString(call_seq->sequence[i].arg1W); @@ -309,7 +307,7 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index SysFreeString(call_seq->sequence[i].arg3W); } - HeapFree(GetProcessHeap(), 0, call_seq->sequence); + heap_free(call_seq->sequence); call_seq->sequence = NULL; call_seq->count = call_seq->size = 0; } @@ -536,7 +534,7 @@ static void init_call_sequences(struct call_sequence **seq, int n) int i; for (i = 0; i < n; i++) - seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct call_sequence)); + seq[i] = heap_alloc_zero(sizeof(struct call_sequence)); } static const WCHAR szSimpleXML[] = { @@ -1223,7 +1221,7 @@ static HRESULT WINAPI contentHandler_startElement( int i; struct attribute_entry *attr; - attr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(struct attribute_entry)); + attr = heap_alloc_zero(len * sizeof(*attr)); v = VARIANT_TRUE; hr = ISAXXMLReader_getFeature(g_reader, _bstr_("
http://xml.org/sax/features/namespaces
"), &v); @@ -3307,7 +3305,7 @@ static void test_mxwriter_flush(void) ok(pos2.QuadPart == 0, "expected stream beginning\n"); len = 2048; - buff = HeapAlloc(GetProcessHeap(), 0, len+1); + buff = heap_alloc(len + 1); memset(buff, 'A', len); buff[len] = 0; hr = ISAXContentHandler_characters(content, _bstr_(buff), len); @@ -3390,7 +3388,7 @@ static void test_mxwriter_flush(void) ok(SysStringLen(V_BSTR(&dest)) == len, "got len=%d, expected %d\n", SysStringLen(V_BSTR(&dest)), len); VariantClear(&dest); - HeapFree(GetProcessHeap(), 0, buff); + heap_free(buff); ISAXContentHandler_Release(content); IStream_Release(stream); IMXWriter_Release(writer);
1
0
0
0
Nikolay Sivov : msxml3: Use the global HeapAlloc() helpers.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 9cb8629fb7d5b80dbaeef3c868b63ae5293e0ccb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9cb8629fb7d5b80dbaeef3c8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 6 08:57:31 2018 +0300 msxml3: Use the global HeapAlloc() helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/saxreader.c | 6 +++--- dlls/msxml3/schema.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index be2caf9..e8d5b27 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -561,7 +561,7 @@ static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) { if (!pool->pool) { - pool->pool = HeapAlloc(GetProcessHeap(), 0, 16 * sizeof(*pool->pool)); + pool->pool = heap_alloc(16 * sizeof(*pool->pool)); if (!pool->pool) return FALSE; @@ -570,7 +570,7 @@ static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) } else if (pool->index == pool->len) { - BSTR *realloc = HeapReAlloc(GetProcessHeap(), 0, pool->pool, pool->len * 2 * sizeof(*realloc)); + BSTR *realloc = heap_realloc(pool->pool, pool->len * 2 * sizeof(*realloc)); if (!realloc) return FALSE; @@ -590,7 +590,7 @@ static void free_bstr_pool(struct bstrpool *pool) for (i = 0; i < pool->index; i++) SysFreeString(pool->pool[i]); - HeapFree(GetProcessHeap(), 0, pool->pool); + heap_free(pool->pool); pool->pool = NULL; pool->index = pool->len = 0; diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index 30272cb..8087985 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -749,7 +749,7 @@ void schemasInit(void) /* Resource is loaded as raw data, * need a null-terminated string */ while (buf[datatypes_len - 1] != '>') datatypes_len--; - datatypes_src = HeapAlloc(GetProcessHeap(), 0, datatypes_len + 1); + datatypes_src = heap_alloc(datatypes_len + 1); memcpy(datatypes_src, buf, datatypes_len); datatypes_src[datatypes_len] = 0; @@ -763,7 +763,7 @@ void schemasInit(void) void schemasCleanup(void) { xmlSchemaFree(datatypes_schema); - HeapFree(GetProcessHeap(), 0, datatypes_src); + heap_free(datatypes_src); xmlSetExternalEntityLoader(_external_entity_loader); }
1
0
0
0
Nikolay Sivov : comctl32/tests: Remove some workarounds in ListBox tests.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: e6d315bab6f283457d53bd6c2b22da70e7e36f0d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6d315bab6f283457d53bd6c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 6 08:50:25 2018 +0300 comctl32/tests: Remove some workarounds in ListBox tests. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/listbox.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c index 23aaac2..4d80bea 100644 --- a/dlls/comctl32/tests/listbox.c +++ b/dlls/comctl32/tests/listbox.c @@ -26,6 +26,7 @@ #include "wingdi.h" #include "winuser.h" #include "winnls.h" +#include "commctrl.h" #include "wine/test.h" #include "v6util.h" @@ -50,7 +51,7 @@ static HWND create_listbox(DWORD add_style, HWND parent) if (parent) ctl_id=1; - handle = CreateWindowA("LISTBOX", "TestList", (LBS_STANDARD & ~LBS_SORT) | add_style, 0, 0, 100, 100, + handle = CreateWindowA(WC_LISTBOXA, "TestList", (LBS_STANDARD & ~LBS_SORT) | add_style, 0, 0, 100, 100, parent, (HMENU)ctl_id, NULL, 0); ok(handle != NULL, "Failed to create listbox window.\n"); @@ -207,7 +208,7 @@ static void test_item_height(void) DestroyWindow (hLB); - hLB = CreateWindowA("LISTBOX", "TestList", LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100, NULL, NULL, NULL, 0); + hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100, NULL, NULL, NULL, 0); itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0); ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %d.\n", @@ -430,7 +431,7 @@ static void test_listbox_height(void) HWND hList; int r, id; - hList = CreateWindowA( "ListBox", "list test", 0, + hList = CreateWindowA( WC_LISTBOXA, "list test", 0, 1, 1, 600, 100, NULL, NULL, NULL, NULL ); ok( hList != NULL, "failed to create listbox\n"); @@ -470,21 +471,20 @@ static void test_itemfrompoint(void) without caption). LBS_NOINTEGRALHEIGHT is required in order to test behavior of partially-displayed item. */ - HWND hList = CreateWindowA( "ListBox", "list test", + HWND hList = CreateWindowA( WC_LISTBOXA, "list test", WS_VISIBLE|WS_POPUP|LBS_NOINTEGRALHEIGHT, 1, 1, 600, 100, NULL, NULL, NULL, NULL ); ULONG r, id; RECT rc; - /* For an empty listbox win2k returns 0x1ffff, win98 returns 0x10000, nt4 returns 0xffffffff */ r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#x.\n", r ); r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 700, 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#x.\n", r ); r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 30, 300 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#x.\n", r ); id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); ok( id == 0, "item id wrong\n"); @@ -495,7 +495,7 @@ static void test_itemfrompoint(void) ok( r == 0x1, "ret %x\n", r ); r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 601 )); - ok( r == 0x10001, "ret %x\n", r ); + ok( r == MAKELPARAM(1, 1), "Unexpected ret value %#x.\n", r ); /* Resize control so that below assertions about sizes are valid */ r = SendMessageA( hList, LB_GETITEMRECT, 0, (LPARAM)&rc); @@ -551,7 +551,7 @@ static void test_listbox_item_data(void) HWND hList; int r, id; - hList = CreateWindowA( "ListBox", "list test", 0, + hList = CreateWindowA( WC_LISTBOXA, "list test", 0, 1, 1, 600, 100, NULL, NULL, NULL, NULL ); ok( hList != NULL, "failed to create listbox\n"); @@ -591,7 +591,7 @@ static void test_listbox_LB_DIR(void) one file that fits the wildcard w*.c . Normally, the test directory itself satisfies both conditions. */ - hList = CreateWindowA( "ListBox", "list test", WS_VISIBLE|WS_POPUP, + hList = CreateWindowA( WC_LISTBOXA, "list test", WS_VISIBLE|WS_POPUP, 1, 1, 600, 100, NULL, NULL, NULL, NULL ); assert(hList); @@ -902,7 +902,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res != -1 || broken(res == -1), "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", + ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", GetLastError()); itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1010,11 +1010,11 @@ static HWND g_label; static BOOL on_listbox_container_create(HWND hwnd, CREATESTRUCTA *lpcs) { - g_label = CreateWindowA("Static", "Contents of static control before DlgDirList.", + g_label = CreateWindowA(WC_STATICA, "Contents of static control before DlgDirList.", WS_CHILD | WS_VISIBLE, 10, 10, 512, 32, hwnd, (HMENU)ID_TEST_LABEL, NULL, 0); if (!g_label) return FALSE; - g_listBox = CreateWindowA("ListBox", "DlgDirList test", + g_listBox = CreateWindowA(WC_LISTBOXA, "DlgDirList test", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | WS_VSCROLL, 10, 60, 256, 256, hwnd, (HMENU)ID_TEST_LISTBOX, NULL, 0); if (!g_listBox) return FALSE;
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Use the global HeapAlloc() wrappers.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 26cce5550c5afe7c5139f4719c834293c383148c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26cce5550c5afe7c5139f471…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 6 08:50:24 2018 +0300 comctl32/monthcal: Use the global HeapAlloc() wrappers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/monthcal.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index b94345c..9d00094 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -56,6 +56,7 @@ #include "vssym32.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(monthcal); @@ -1966,7 +1967,7 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr) nmds.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID); nmds.nmhdr.code = MCN_GETDAYSTATE; nmds.cDayState = MONTHCAL_GetMonthRange(infoPtr, GMR_DAYSTATE, 0); - nmds.prgDayState = state = Alloc(nmds.cDayState * sizeof(MONTHDAYSTATE)); + nmds.prgDayState = state = heap_alloc_zero(nmds.cDayState * sizeof(MONTHDAYSTATE)); MONTHCAL_GetMinDate(infoPtr, &nmds.stStart); nmds.stStart.wDay = 1; @@ -1975,7 +1976,7 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr) memcpy(infoPtr->monthdayState, nmds.prgDayState, MONTHCAL_GetMonthRange(infoPtr, GMR_DAYSTATE, 0)*sizeof(MONTHDAYSTATE)); - Free(state); + heap_free(state); } /* no valid range check performed */ @@ -2615,9 +2616,9 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr) { infoPtr->dim.cx = x; infoPtr->dim.cy = y; - infoPtr->calendars = ReAlloc(infoPtr->calendars, MONTHCAL_GetCalCount(infoPtr)*sizeof(CALENDAR_INFO)); + infoPtr->calendars = heap_realloc(infoPtr->calendars, MONTHCAL_GetCalCount(infoPtr)*sizeof(CALENDAR_INFO)); - infoPtr->monthdayState = ReAlloc(infoPtr->monthdayState, + infoPtr->monthdayState = heap_realloc(infoPtr->monthdayState, MONTHCAL_GetMonthRange(infoPtr, GMR_DAYSTATE, 0)*sizeof(MONTHDAYSTATE)); MONTHCAL_NotifyDayState(infoPtr); @@ -2773,7 +2774,7 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs) MONTHCAL_INFO *infoPtr; /* allocate memory for info structure */ - infoPtr = Alloc(sizeof(MONTHCAL_INFO)); + infoPtr = heap_alloc_zero(sizeof(*infoPtr)); SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr); if (infoPtr == NULL) { @@ -2785,9 +2786,9 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs) infoPtr->hwndNotify = lpcs->hwndParent; infoPtr->dwStyle = GetWindowLongW(hwnd, GWL_STYLE); infoPtr->dim.cx = infoPtr->dim.cy = 1; - infoPtr->calendars = Alloc(sizeof(CALENDAR_INFO)); + infoPtr->calendars = heap_alloc_zero(sizeof(CALENDAR_INFO)); if (!infoPtr->calendars) goto fail; - infoPtr->monthdayState = Alloc(3*sizeof(MONTHDAYSTATE)); + infoPtr->monthdayState = heap_alloc_zero(3 * sizeof(MONTHDAYSTATE)); if (!infoPtr->monthdayState) goto fail; /* initialize info structure */ @@ -2828,9 +2829,9 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs) return 0; fail: - Free(infoPtr->monthdayState); - Free(infoPtr->calendars); - Free(infoPtr); + heap_free(infoPtr->monthdayState); + heap_free(infoPtr->calendars); + heap_free(infoPtr); return 0; } @@ -2840,8 +2841,8 @@ MONTHCAL_Destroy(MONTHCAL_INFO *infoPtr) INT i; /* free month calendar info data */ - Free(infoPtr->monthdayState); - Free(infoPtr->calendars); + heap_free(infoPtr->monthdayState); + heap_free(infoPtr->calendars); SetWindowLongPtrW(infoPtr->hwndSelf, 0, 0); CloseThemeData (GetWindowTheme (infoPtr->hwndSelf)); @@ -2849,7 +2850,7 @@ MONTHCAL_Destroy(MONTHCAL_INFO *infoPtr) for (i = 0; i < BrushLast; i++) DeleteObject(infoPtr->brushes[i]); for (i = 0; i < PenLast; i++) DeleteObject(infoPtr->pens[i]); - Free(infoPtr); + heap_free(infoPtr); return 0; }
1
0
0
0
Nikolay Sivov : comctl32/button: Use push button paint handler for split and command link buttons.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 598d36993430023a6f53aa341d2e7e3e2f171c43 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=598d36993430023a6f53aa34…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 6 08:50:22 2018 +0300 comctl32/button: Use push button paint handler for split and command link buttons. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index de036c6..b0eea99 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -120,7 +120,11 @@ static const WORD maxCheckState[MAX_BTN_TYPE] = BST_UNCHECKED, /* BS_USERBUTTON */ BST_CHECKED, /* BS_AUTORADIOBUTTON */ BST_UNCHECKED, /* BS_PUSHBOX */ - BST_UNCHECKED /* BS_OWNERDRAW */ + BST_UNCHECKED, /* BS_OWNERDRAW */ + BST_UNCHECKED, /* BS_SPLITBUTTON */ + BST_UNCHECKED, /* BS_DEFSPLITBUTTON */ + BST_UNCHECKED, /* BS_COMMANDLINK */ + BST_UNCHECKED /* BS_DEFCOMMANDLINK */ }; typedef void (*pfPaint)( HWND hwnd, HDC hdc, UINT action ); @@ -138,7 +142,11 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] = UB_Paint, /* BS_USERBUTTON */ CB_Paint, /* BS_AUTORADIOBUTTON */ NULL, /* BS_PUSHBOX */ - OB_Paint /* BS_OWNERDRAW */ + OB_Paint, /* BS_OWNERDRAW */ + PB_Paint, /* BS_SPLITBUTTON */ + PB_Paint, /* BS_DEFSPLITBUTTON */ + PB_Paint, /* BS_COMMANDLINK */ + PB_Paint /* BS_DEFCOMMANDLINK */ }; /*********************************************************************
1
0
0
0
Nikolay Sivov : comctl32: Introduce Button control.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 5d10abde503fc4a952c114c658fed74f97bff090 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d10abde503fc4a952c114c6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 6 08:50:21 2018 +0300 comctl32: Introduce Button control. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/Makefile.in | 1 + dlls/comctl32/button.c | 1153 ++++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/comctl32.h | 1 + dlls/comctl32/commctrl.c | 2 + dlls/comctl32/tests/button.c | 18 +- dlls/comctl32/tests/misc.c | 3 +- dlls/user32/class.c | 1 - 7 files changed, 1164 insertions(+), 15 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=5d10abde503fc4a952c1…
1
0
0
0
Michael Stefaniuc : usp10: Use the global HeapAlloc() wrappers.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: b21eb6733fab6d777886a8e0271cecb8a5a9fbdc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b21eb6733fab6d777886a8e0…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Feb 6 01:07:15 2018 +0100 usp10: Use the global HeapAlloc() wrappers. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/bidi.c | 1 + dlls/usp10/breaking.c | 1 + dlls/usp10/indic.c | 1 + dlls/usp10/opentype.c | 1 + dlls/usp10/shape.c | 1 + dlls/usp10/usp10.c | 1 + dlls/usp10/usp10_internal.h | 15 --------------- 7 files changed, 6 insertions(+), 15 deletions(-) diff --git a/dlls/usp10/bidi.c b/dlls/usp10/bidi.c index 5941ef8..d94dc7b 100644 --- a/dlls/usp10/bidi.c +++ b/dlls/usp10/bidi.c @@ -52,6 +52,7 @@ #include "usp10.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/heap.h" #include "wine/list.h" #include "usp10_internal.h" diff --git a/dlls/usp10/breaking.c b/dlls/usp10/breaking.c index f5e40ac..9b12d9e 100644 --- a/dlls/usp10/breaking.c +++ b/dlls/usp10/breaking.c @@ -32,6 +32,7 @@ #include "winternl.h" #include "wine/debug.h" +#include "wine/heap.h" #include "usp10_internal.h" WINE_DEFAULT_DEBUG_CHANNEL(uniscribe); diff --git a/dlls/usp10/indic.c b/dlls/usp10/indic.c index c9b0810..5a228e8 100644 --- a/dlls/usp10/indic.c +++ b/dlls/usp10/indic.c @@ -32,6 +32,7 @@ #include "winternl.h" #include "wine/debug.h" +#include "wine/heap.h" #include "usp10_internal.h" WINE_DEFAULT_DEBUG_CHANNEL(uniscribe); diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 1fd9c4d..2d708a8 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -32,6 +32,7 @@ #include "usp10_internal.h" #include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(uniscribe); diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index b75be60..ca084e7 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -32,6 +32,7 @@ #include "usp10_internal.h" #include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(uniscribe); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 17f60a1..5f50332 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -39,6 +39,7 @@ #include "usp10_internal.h" #include "wine/debug.h" +#include "wine/heap.h" #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(uniscribe); diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 832d894..eae0255 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -219,21 +219,6 @@ typedef struct { enum {lex_Halant, lex_Composed_Vowel, lex_Matra_post, lex_Matra_pre, lex_Matra_above, lex_Matra_below, lex_ZWJ, lex_ZWNJ, lex_NBSP, lex_Modifier, lex_Vowel, lex_Consonant, lex_Generic, lex_Ra, lex_Vedic, lex_Anudatta, lex_Nukta}; -static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size) -{ - return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline BOOL is_consonant( int type ) { return (type == lex_Ra || type == lex_Consonant);
1
0
0
0
Michael Stefaniuc : wmiutils: Use the global HeapAlloc() wrappers.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: 25692aefe0dfd2d09898f294f4790e6290e58c8c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=25692aefe0dfd2d09898f294…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Feb 6 01:07:22 2018 +0100 wmiutils: Use the global HeapAlloc() wrappers. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wmiutils/wmiutils_private.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/dlls/wmiutils/wmiutils_private.h b/dlls/wmiutils/wmiutils_private.h index 6782bd8..6195f21 100644 --- a/dlls/wmiutils/wmiutils_private.h +++ b/dlls/wmiutils/wmiutils_private.h @@ -16,31 +16,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "wine/heap.h" #include "wine/unicode.h" HRESULT WbemPath_create(LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemStatusCodeText_create(LPVOID *) DECLSPEC_HIDDEN; -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size) -{ - return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); -} - -static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size) -{ - return HeapReAlloc(GetProcessHeap(), 0, mem, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline WCHAR *strdupW( const WCHAR *src ) { WCHAR *dst;
1
0
0
0
Michael Stefaniuc : wininet: Use the global HeapAlloc() wrappers.
by Alexandre Julliard
06 Feb '18
06 Feb '18
Module: wine Branch: master Commit: a6a059f8024116076982d704bff994378099a2d1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a6a059f8024116076982d704…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Feb 6 01:07:21 2018 +0100 wininet: Use the global HeapAlloc() wrappers. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wininet/internet.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 4cd1856..498a79b 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -24,6 +24,7 @@ #define _WINE_INTERNET_H_ #include "wine/unicode.h" +#include "wine/heap.h" #include "wine/list.h" #include <time.h> @@ -89,31 +90,11 @@ typedef struct BOOL is_valid_netconn(netconn_t *) DECLSPEC_HIDDEN; void close_netconn(netconn_t *) DECLSPEC_HIDDEN; -static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len) -{ - return HeapAlloc(GetProcessHeap(), 0, len); -} - -static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len) -{ - return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); -} - -static inline void * __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t len) -{ - return HeapReAlloc(GetProcessHeap(), 0, mem, len); -} - static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len) { return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len); } -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline LPWSTR heap_strdupW(LPCWSTR str) { LPWSTR ret = NULL;
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
81
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
Results per page:
10
25
50
100
200