Commit Graph

106 Commits

Author SHA1 Message Date
Zebediah Figura 5e4dedff8e win32u: Remove the "proc" parameter to NtUserSetSystemTimer().
Testing on 32-bit Windows 10 suggests that the function only has three
parameters. The test fixed in this patch (which still succeeds on e.g. Windows
2003) suggests that the final parameter to SetSystemTimer() is not a callback,
either.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 14:41:22 +02:00
Jacek Caban ce9a782a4f win32u: Move NtUserSetSystemTimer implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-16 21:16:21 +01:00
Jacek Caban 08b2fbcbd6 win32u: Move NtUserSetWindowPos implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-15 18:05:27 +01:00
Jacek Caban 31a044efa5 win32u: Move NtUserEndPaint implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Jacek Caban 0b0403baa8 win32u: Move NtUserBeginPaint implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Jacek Caban b1708179b9 win32u: Move NtUserReleaseDC implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Jacek Caban ace24ec946 win32u: Move NtUserGetDCEx implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Jacek Caban 4f6ba11fde win32u: Move NtUserSetCapture implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-11 19:23:28 +01:00
Jacek Caban d5fd27761f win32u: Move NtUserSetFocus implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-11 19:23:28 +01:00
Jacek Caban d99f61dd9a win32u: Move NtUserGetKeyState implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 17:44:42 +01:00
Akihiro Sagawa 247185ba78 user32/listbox: Fix redraw after LB_SETCOUNT message.
3ef790b968 accidentally dropped updating
LBS_DISPLAYCHANGED flag that had been done in LISTBOX_InvalidateItems()
if the count value was changed.
In fact, the newly added test shows LB_SETCOUNT message always causes
WM_DRAWITEM requests regardless of the count value.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51591
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Alexandre Julliard 5ad25c293b user32: Use wide character string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:09:59 +02:00
Alexandre Julliard 9cc9236556 user32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 15:15:38 +02:00
Nikolay Sivov 832b748b06 user32/listbox: Update caret index on LB_SETSEL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47459
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Nikolay Sivov b37b3f00a6 user32/listbox: Scroll to specified caret index.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Gabriel Ivăncescu b95bc84273 user32/listbox: Fix mouse wheel scrolling for multi-column listboxes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22253
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-14 10:26:18 +02:00
Gabriel Ivăncescu f748d6794d user32/listbox: Don't try to paint non-visible items for multi-column listboxes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:26 +02:00
Gabriel Ivăncescu 7a1b96f6b7 user32/listbox: Implement LBS_NODATA for multi-selection listboxes.
Use a byte array to store selection state of items, since we don't need any
other data for LBS_NODATA multi-selection listboxes. This improves memory
usage dramatically for large lists, and performance boosts are nice too.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:52 +01:00
Gabriel Ivăncescu 80ff468748 user32/listbox: Use a helper to get the size of an item.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:49 +01:00
Huw Davies 0092a4bb19 user32/listbox: Use helper functions for item initialization.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:44 +01:00
Gabriel Ivăncescu 18a6e37ce1 user32/listbox: Rewrite FindString to use helpers and avoid the macro.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:42 +01:00
Gabriel Ivăncescu a01b90d382 user32/listbox: Use a helper to set item data by index.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:39 +01:00
Gabriel Ivăncescu 7edbf1c8e5 user32/listbox: Use is_item_selected in GetSelCount and GetSelItems.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 12:51:21 +01:00
Gabriel Ivăncescu 8a9ff9fb13 user32/listbox: Implement LBS_NODATA for single-selection listboxes.
The LBS_NODATA style's purpose is to drastically improve performance and
memory usage on very large lists, since they should function as virtual
lists. Thus, don't store any data for single-selection listboxes (descr->items
always NULL).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=32374
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:04:03 +01:00
Gabriel Ivăncescu 9f58653421 user32/listbox: Move the item data removal into a separate function.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:04:00 +01:00
Gabriel Ivăncescu ff1ebccdd0 user32/listbox: Move the item data insertion into a separate function.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:03:56 +01:00
Gabriel Ivăncescu 9b6d9cb8ae user32/listbox: Use a helper to set item height by index.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:03:53 +01:00
Gabriel Ivăncescu 4a27ea8494 user32/listbox: Use a helper to retrieve item height by index.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:03:50 +01:00
Huw Davies 6a421988df user32/listbox: Remove some unnecessary differences to the comctl32 version.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:30 +01:00
Gabriel Ivăncescu 0beea9f474 user32/listbox: Send LB_RESETCONTENT from RemoveItem rather than DeleteItem.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:22 +01:00
Gabriel Ivăncescu 84ac6eebaa user32/listbox: Use a helper to set the selected item state.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:19 +01:00
Gabriel Ivăncescu e0e939501f user32/listbox: Use is_item_selected in more places.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:17 +01:00
Gabriel Ivăncescu 8ffe69d705 user32/listbox: Use a helper to retrieve item string by index.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:14 +01:00
Gabriel Ivăncescu 0e3e81d345 user32/listbox: Use a helper to retrieve item data by index.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:12 +01:00
Gabriel Ivăncescu 076fa5f3ed user32/listbox: Use descr->selected_item for single-selection listboxes when checking selection.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:07 +01:00
Gabriel Ivăncescu 087304f117 user32/listbox: Repaint the old selected item after setting the item selection.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:04 +01:00
Gabriel Ivăncescu 3ef790b968 user32/listbox: Resize the entire item array at once in SetCount.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:08:02 +01:00
Gabriel Ivăncescu 0dd9eaf4e3 user32/listbox: Return proper value for LB_INITSTORAGE.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Gabriel Ivăncescu 1ece9f6205 user32/listbox: Shrink the item array with resize_storage.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Gabriel Ivăncescu d7f2f33575 user32/listbox: Use a helper to expand the item array.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Gabriel Ivăncescu ea185314b3 user32/listbox: Check for out of bounds using the index when painting the item.
Needed for LBS_NODATA.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Gabriel Ivăncescu ae4199e264 user32/listbox: Store the items array size instead of using HeapSize().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 12:02:01 +01:00
Gabriel Ivăncescu 8700ef560e user32/listbox: Account for NULL item when painting ownerdrawn list.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 12:01:59 +01:00
Nikolay Sivov db869b61a1 user32/listbox: Remove duplicated condition.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 12:01:57 +01:00
Nikolay Sivov 4705843642 user32/listbox: Use helper to test for selected state on painting.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 12:01:55 +01:00
Gabriel Ivăncescu 3b087ce81f user32/listbox: Use a helper function to check the selection state of an item.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 12:01:53 +01:00
Gabriel Ivăncescu dfb57a1655 user32/listbox: Make LBS_NODATA listboxes error on any attempt to find a value.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-16 14:58:41 +01:00
Gabriel Ivăncescu d30aadd3e1 user32/listbox: Don't set any data for LBS_NODATA listboxes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-16 14:58:41 +01:00
Gabriel Ivăncescu cab591c59b user32/listbox: Return 0 from LB_GETITEMDATA for LBS_NODATA listboxes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-16 14:58:41 +01:00
Gabriel Ivăncescu c980edc227 user32/listbox: Always retrieve zeros in LB_GETTEXT for LBS_NODATA listboxes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-16 14:58:41 +01:00