"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/comctl32/listview.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

listview.c  (wine-5.12.tar.xz):listview.c  (wine-5.13.tar.xz)
skipping to change at line 143 skipping to change at line 143
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winnt.h" #include "winnt.h"
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "winnls.h" #include "winnls.h"
#include "commctrl.h" #include "commctrl.h"
#include "comctl32.h" #include "comctl32.h"
#include "uxtheme.h" #include "uxtheme.h"
#include "shlwapi.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(listview); WINE_DEFAULT_DEBUG_CHANNEL(listview);
typedef struct tagCOLUMN_INFO typedef struct tagCOLUMN_INFO
{ {
RECT rcHeader; /* tracks the header's rectangle */ RECT rcHeader; /* tracks the header's rectangle */
INT fmt; /* same as LVCOLUMN.fmt */ INT fmt; /* same as LVCOLUMN.fmt */
INT cxMin; INT cxMin;
skipping to change at line 6296 skipping to change at line 6297
* FAILURE : -1 * FAILURE : -1
*/ */
static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart, static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
const LVFINDINFOW *lpFindInfo) const LVFINDINFOW *lpFindInfo)
{ {
WCHAR szDispText[DISP_TEXT_SIZE] = { '\0' }; WCHAR szDispText[DISP_TEXT_SIZE] = { '\0' };
BOOL bWrap = FALSE, bNearest = FALSE; BOOL bWrap = FALSE, bNearest = FALSE;
INT nItem = nStart + 1, nLast = infoPtr->nItemCount, nNearestItem = -1; INT nItem = nStart + 1, nLast = infoPtr->nItemCount, nNearestItem = -1;
ULONG xdist, ydist, dist, mindist = 0x7fffffff; ULONG xdist, ydist, dist, mindist = 0x7fffffff;
POINT Position, Destination; POINT Position, Destination;
int search_len = 0;
LVITEMW lvItem; LVITEMW lvItem;
/* Search in virtual listviews should be done by application, not by /* Search in virtual listviews should be done by application, not by
listview control, so we just send LVN_ODFINDITEMW and return the result * / listview control, so we just send LVN_ODFINDITEMW and return the result * /
if (infoPtr->dwStyle & LVS_OWNERDATA) if (infoPtr->dwStyle & LVS_OWNERDATA)
{ {
NMLVFINDITEMW nmlv; NMLVFINDITEMW nmlv;
nmlv.iStart = nStart; nmlv.iStart = nStart;
nmlv.lvfi = *lpFindInfo; nmlv.lvfi = *lpFindInfo;
skipping to change at line 6361 skipping to change at line 6363
/* if LVFI_PARAM is specified, all other flags are ignored */ /* if LVFI_PARAM is specified, all other flags are ignored */
if (lpFindInfo->flags & LVFI_PARAM) if (lpFindInfo->flags & LVFI_PARAM)
{ {
lvItem.mask |= LVIF_PARAM; lvItem.mask |= LVIF_PARAM;
bNearest = FALSE; bNearest = FALSE;
lvItem.mask &= ~LVIF_TEXT; lvItem.mask &= ~LVIF_TEXT;
} }
nItem = bNearest ? -1 : nStart + 1; nItem = bNearest ? -1 : nStart + 1;
if (lpFindInfo->flags & (LVFI_PARTIAL | LVFI_SUBSTRING))
search_len = lstrlenW(lpFindInfo->psz);
again: again:
for (; nItem < nLast; nItem++) for (; nItem < nLast; nItem++)
{ {
lvItem.iItem = nItem; lvItem.iItem = nItem;
lvItem.iSubItem = 0; lvItem.iSubItem = 0;
lvItem.pszText = szDispText; lvItem.pszText = szDispText;
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) continue; if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) continue;
if (lvItem.mask & LVIF_PARAM) if (lvItem.mask & LVIF_PARAM)
{ {
if (lpFindInfo->lParam == lvItem.lParam) if (lpFindInfo->lParam == lvItem.lParam)
return nItem; return nItem;
else else
continue; continue;
} }
if (lvItem.mask & LVIF_TEXT) if (lvItem.mask & LVIF_TEXT)
{ {
if (lpFindInfo->flags & (LVFI_PARTIAL | LVFI_SUBSTRING)) if (lpFindInfo->flags & (LVFI_PARTIAL | LVFI_SUBSTRING))
{ {
WCHAR *p = wcsstr(lvItem.pszText, lpFindInfo->psz); if (StrCmpNIW(lvItem.pszText, lpFindInfo->psz, search_len)) cont
if (!p || p != lvItem.pszText) continue; inue;
} }
else else
{ {
if (lstrcmpW(lvItem.pszText, lpFindInfo->psz) != 0) continue; if (StrCmpIW(lvItem.pszText, lpFindInfo->psz)) continue;
} }
} }
if (!bNearest) return nItem; if (!bNearest) return nItem;
/* This is very inefficient. To do a good job here, /* This is very inefficient. To do a good job here,
* we need a sorted array of (x,y) item positions */ * we need a sorted array of (x,y) item positions */
LISTVIEW_GetItemOrigin(infoPtr, nItem, &Position); LISTVIEW_GetItemOrigin(infoPtr, nItem, &Position);
/* compute the distance^2 to the destination */ /* compute the distance^2 to the destination */
skipping to change at line 8718 skipping to change at line 8722
LOWORD(oldspacing), HIWORD(oldspacing), infoPtr->iconSpacing.cx, infoP tr->iconSpacing.cy, LOWORD(oldspacing), HIWORD(oldspacing), infoPtr->iconSpacing.cx, infoP tr->iconSpacing.cy,
infoPtr->iconSize.cx, infoPtr->iconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy,
infoPtr->ntmHeight); infoPtr->ntmHeight);
/* these depend on the iconSpacing */ /* these depend on the iconSpacing */
LISTVIEW_UpdateItemSize(infoPtr); LISTVIEW_UpdateItemSize(infoPtr);
return oldspacing; return oldspacing;
} }
static inline void set_icon_size(SIZE *size, HIMAGELIST himl, BOOL small) static inline void set_icon_size(SIZE *size, HIMAGELIST himl, BOOL is_small)
{ {
INT cx, cy; INT cx, cy;
if (himl && ImageList_GetIconSize(himl, &cx, &cy)) if (himl && ImageList_GetIconSize(himl, &cx, &cy))
{ {
size->cx = cx; size->cx = cx;
size->cy = cy; size->cy = cy;
} }
else else
{ {
size->cx = GetSystemMetrics(small ? SM_CXSMICON : SM_CXICON); size->cx = GetSystemMetrics(is_small ? SM_CXSMICON : SM_CXICON);
size->cy = GetSystemMetrics(small ? SM_CYSMICON : SM_CYICON); size->cy = GetSystemMetrics(is_small ? SM_CYSMICON : SM_CYICON);
} }
} }
/*** /***
* DESCRIPTION: * DESCRIPTION:
* Sets image lists. * Sets image lists.
* *
* PARAMETER(S): * PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure * [I] infoPtr : valid pointer to the listview structure
* [I] nType : image list type * [I] nType : image list type
 End of changes. 7 change blocks. 
6 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)