Modified: vendor/wine/dlls/cabinet/current/Makefile.in
Modified: vendor/wine/dlls/cabinet/current/cabinet.h
Modified: vendor/wine/dlls/cabinet/current/fci.c
Modified: vendor/wine/dlls/comctl32/current/Makefile.in
Modified: vendor/wine/dlls/comctl32/current/comboex.c
Modified: vendor/wine/dlls/comctl32/current/comctl32undoc.c
Modified: vendor/wine/dlls/comctl32/current/datetime.c
Modified: vendor/wine/dlls/comctl32/current/header.c
Modified: vendor/wine/dlls/comctl32/current/hotkey.c
Modified: vendor/wine/dlls/comctl32/current/imagelist.c
Modified: vendor/wine/dlls/comctl32/current/ipaddress.c
Modified: vendor/wine/dlls/comctl32/current/listview.c
Modified: vendor/wine/dlls/comctl32/current/monthcal.c
Modified: vendor/wine/dlls/comctl32/current/tab.c
Modified: vendor/wine/dlls/comctl32/current/toolbar.c
Modified: vendor/wine/dlls/comctl32/current/updown.c
Modified: vendor/wine/dlls/commdlg/current/Makefile.in
Modified: vendor/wine/dlls/commdlg/current/commdlg.spec
Modified: vendor/wine/dlls/commdlg/current/filedlg.c
Modified: vendor/wine/dlls/commdlg/current/filedlgbrowser.c
Modified: vendor/wine/dlls/commdlg/current/fontdlg.c
Deleted: vendor/wine/dlls/commdlg/current/generic.c
Modified: vendor/wine/dlls/dinput/current/Makefile.in
Modified: vendor/wine/dlls/dinput/current/device.c
Modified: vendor/wine/dlls/dinput/current/dinput_main.c
Modified: vendor/wine/dlls/dinput/current/dinput_private.h
Modified: vendor/wine/dlls/dinput/current/joystick_linux.c
Modified: vendor/wine/dlls/dinput/current/joystick_linuxinput.c
Modified: vendor/wine/dlls/dinput/current/keyboard.c
Modified: vendor/wine/dlls/dinput/current/mouse.c
Modified: vendor/wine/dlls/dinput8/current/Makefile.in
Modified: vendor/wine/dlls/dsound/current/Makefile.in
Modified: vendor/wine/dlls/dsound/current/buffer.c
Modified: vendor/wine/dlls/dsound/current/dsound.c
Modified: vendor/wine/dlls/dsound/current/dsound.spec
Modified: vendor/wine/dlls/dsound/current/dsound_main.c
Modified: vendor/wine/dlls/dsound/current/dsound_private.h
Modified: vendor/wine/dlls/dsound/current/mixer.c
Modified: vendor/wine/dlls/dsound/current/primary.c
Modified: vendor/wine/dlls/dsound/current/propset.c
Modified: vendor/wine/dlls/dsound/current/regsvr.c
Modified: vendor/wine/dlls/icmp/current/Makefile.in
Modified: vendor/wine/dlls/mpr/current/Makefile.in
Modified: vendor/wine/dlls/msi/current/Makefile.in
Modified: vendor/wine/dlls/msi/current/action.c
Modified: vendor/wine/dlls/msi/current/action.h
Modified: vendor/wine/dlls/msi/current/appsearch.c
Modified: vendor/wine/dlls/msi/current/cond.y
Modified: vendor/wine/dlls/msi/current/create.c
Modified: vendor/wine/dlls/msi/current/custom.c
Modified: vendor/wine/dlls/msi/current/database.c
Modified: vendor/wine/dlls/msi/current/dialog.c
Modified: vendor/wine/dlls/msi/current/insert.c
Modified: vendor/wine/dlls/msi/current/msi.c
Modified: vendor/wine/dlls/msi/current/msi.spec
Modified: vendor/wine/dlls/msi/current/msi_Fr.rc
Modified: vendor/wine/dlls/msi/current/msipriv.h
Modified: vendor/wine/dlls/msi/current/msiquery.c
Modified: vendor/wine/dlls/msi/current/order.c
Modified: vendor/wine/dlls/msi/current/package.c
Modified: vendor/wine/dlls/msi/current/query.h
Modified: vendor/wine/dlls/msi/current/record.c
Modified: vendor/wine/dlls/msi/current/registry.c
Modified: vendor/wine/dlls/msi/current/sql.y
Modified: vendor/wine/dlls/msi/current/suminfo.c
Modified: vendor/wine/dlls/msi/current/table.c
Modified: vendor/wine/dlls/msi/current/tokenize.c
Modified: vendor/wine/dlls/msi/current/update.c
Modified: vendor/wine/dlls/msi/current/version.rc
Modified: vendor/wine/dlls/msi/current/where.c
Modified: vendor/wine/dlls/msimg32/current/Makefile.in
Modified: vendor/wine/dlls/ole32/current/Makefile.in
Modified: vendor/wine/dlls/ole32/current/compobj.c
Modified: vendor/wine/dlls/ole32/current/compobj_private.h
Modified: vendor/wine/dlls/ole32/current/compositemoniker.c
Modified: vendor/wine/dlls/ole32/current/filemoniker.c
Modified: vendor/wine/dlls/ole32/current/ftmarshal.c
Modified: vendor/wine/dlls/ole32/current/git.c
Modified: vendor/wine/dlls/ole32/current/hglobalstream.c
Modified: vendor/wine/dlls/ole32/current/itemmoniker.c
Modified: vendor/wine/dlls/ole32/current/marshal.c
Modified: vendor/wine/dlls/ole32/current/moniker.c
Modified: vendor/wine/dlls/ole32/current/moniker.h
Modified: vendor/wine/dlls/ole32/current/ole16.c
Modified: vendor/wine/dlls/ole32/current/ole2.c
Modified: vendor/wine/dlls/ole32/current/ole2_16.c
Modified: vendor/wine/dlls/ole32/current/ole2thk.spec
Modified: vendor/wine/dlls/ole32/current/ole32.spec
Modified: vendor/wine/dlls/ole32/current/ole32_main.c
Deleted: vendor/wine/dlls/ole32/current/ole32_main.h
Modified: vendor/wine/dlls/ole32/current/oleobj.c
Modified: vendor/wine/dlls/ole32/current/oleproxy.c
Modified: vendor/wine/dlls/ole32/current/stg_prop.c
Modified: vendor/wine/dlls/ole32/current/storage32.c
Modified: vendor/wine/dlls/ole32/current/storage32.h
Modified: vendor/wine/dlls/oleaut32/current/Makefile.in
Modified: vendor/wine/dlls/oleaut32/current/oleaut32_Fr.rc
Modified: vendor/wine/dlls/oleaut32/current/olepicture.c
Modified: vendor/wine/dlls/oleaut32/current/tmarshal.c
Modified: vendor/wine/dlls/oleaut32/current/variant.c
[truncated at 100 lines; 89 more skipped]
--- vendor/wine/dlls/cabinet/current/Makefile.in 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/cabinet/current/Makefile.in 2005-05-24 22:29:00 UTC (rev 15488)
@@ -3,6 +3,7 @@
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = cabinet.dll
+IMPORTLIB = libcabinet.$(IMPLIBEXT)
IMPORTS = kernel32
C_SRCS = \
--- vendor/wine/dlls/cabinet/current/cabinet.h 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/cabinet/current/cabinet.h 2005-05-24 22:29:00 UTC (rev 15488)
@@ -2,6 +2,7 @@
* cabinet.h
*
* Copyright 2002 Greg Turner
+ * Copyright 2005 Gerold Jens Wucherpfennig
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -292,6 +293,19 @@
typedef struct {
unsigned int FCI_Intmagic;
+ PERF perf;
+ PFNFCIFILEPLACED pfnfiledest;
+ PFNFCIALLOC pfnalloc;
+ PFNFCIFREE pfnfree;
+ PFNFCIOPEN pfnopen;
+ PFNFCIREAD pfnread;
+ PFNFCIWRITE pfnwrite;
+ PFNFCICLOSE pfnclose;
+ PFNFCISEEK pfnseek;
+ PFNFCIDELETE pfndelete;
+ PFNFCIGETTEMPFILE pfnfcigtf;
+ PCCAB pccab;
+ void *pv;
} FCI_Int, *PFCI_Int;
typedef struct {
@@ -307,7 +321,7 @@
} FDI_Int, *PFDI_Int;
/* cast an HFCI into a PFCI_Int */
-#define PFCI_INT(hfci) ((PFDI_Int)(hfci))
+#define PFCI_INT(hfci) ((PFCI_Int)(hfci))
/* cast an HFDI into a PFDI_Int */
#define PFDI_INT(hfdi) ((PFDI_Int)(hfdi))
--- vendor/wine/dlls/cabinet/current/fci.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/cabinet/current/fci.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -2,6 +2,7 @@
* File Compression Interface
*
* Copyright 2002 Patrik Stridvall
+ * Copyright 2005 Gerold Jens Wucherpfennig
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,6 +27,7 @@
#include "winbase.h"
#include "winerror.h"
#include "fci.h"
+#include "cabinet.h"
#include "wine/debug.h"
@@ -33,12 +35,55 @@
/***********************************************************************
* FCICreate (CABINET.10)
+ *
+ * Provided with several callbacks,
+ * returns a handle which can be used to perform operations
+ * on cabinet files.
+ *
+ * PARAMS
+ * perf [IO] A pointer to an ERF structure. When FCICreate
+ * returns an error condition, error information may
+ * be found here as well as from GetLastError.
+ * pfnfiledest [I] A pointer to a function which is called when a file
+ * is placed. Only useful for subsequent cabinet files.
+ * pfnalloc [I] A pointer to a function which allocates ram. Uses
+ * the same interface as malloc.
+ * pfnfree [I] A pointer to a function which frees ram. Uses the
+ * same interface as free.
+ * pfnopen [I] A pointer to a function which opens a file. Uses
+ * the same interface as _open.
+ * pfnread [I] A pointer to a function which reads from a file into
+ * a caller-provided buffer. Uses the same interface
+ * as _read
+ * pfnwrite [I] A pointer to a function which writes to a file from
+ * a caller-provided buffer. Uses the same interface
+ * as _write.
+ * pfnclose [I] A pointer to a function which closes a file handle.
+ * Uses the same interface as _close.
+ * pfnseek [I] A pointer to a function which seeks in a file.
+ * Uses the same interface as _lseek.
+ * pfndelete [I] A pointer to a function which deletes a file.
+ * pfnfcigtf [I] A pointer to a function which gets the name of a
+ * temporary file; ignored in wine
+ * pccab [I] A pointer to an initialized CCAB structure
+ * pv [I] A pointer to an application-defined notification
+ * function which will be passed to other FCI functions
+ * as a parameter.
+ *
+ * RETURNS
+ * On success, returns an FCI handle of type HFCI.
+ * On failure, the NULL file handle is returned. Error
+ * info can be retrieved from perf.
+ *
+ * INCLUDES
+ * fci.h
+ *
*/
HFCI __cdecl FCICreate(
PERF perf,
- PFNFCIFILEPLACED pfnfcifp,
- PFNFCIALLOC pfna,
- PFNFCIFREE pfnf,
+ PFNFCIFILEPLACED pfnfiledest,
+ PFNFCIALLOC pfnalloc,
+ PFNFCIFREE pfnfree,
PFNFCIOPEN pfnopen,
PFNFCIREAD pfnread,
PFNFCIWRITE pfnwrite,
@@ -49,17 +94,57 @@
PCCAB pccab,
void *pv)
{
- FIXME("(%p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p): stub\n",
- perf, pfnfcifp, pfna, pfnf, pfnopen, pfnread, pfnwrite, pfnclose,
- pfnseek, pfndelete, pfnfcigtf, pccab, pv);
+ HFCI rv;
+ if ((!pfnalloc) || (!pfnfree)) {
perf->erfOper = FCIERR_NONE;
- perf->erfType = 0;
+ perf->erfType = ERROR_BAD_ARGUMENTS;
perf->fError = TRUE;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ SetLastError(ERROR_BAD_ARGUMENTS);
+ return NULL;
+ }
+ if (!(rv = (HFCI) (*pfnalloc)(sizeof(FCI_Int)))) {
+ perf->erfOper = FCIERR_ALLOC_FAIL;
+ perf->erfType = ERROR_NOT_ENOUGH_MEMORY;
+ perf->fError = TRUE;
+
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
+ }
+
+ PFCI_INT(rv)->FCI_Intmagic = FCI_INT_MAGIC;
+ PFCI_INT(rv)->perf = perf;
+ PFCI_INT(rv)->pfnfiledest = pfnfiledest;
+ PFCI_INT(rv)->pfnalloc = pfnalloc;
+ PFCI_INT(rv)->pfnfree = pfnfree;
+ PFCI_INT(rv)->pfnopen = pfnopen;
+ PFCI_INT(rv)->pfnread = pfnread;
+ PFCI_INT(rv)->pfnwrite = pfnwrite;
+ PFCI_INT(rv)->pfnclose = pfnclose;
+ PFCI_INT(rv)->pfnseek = pfnseek;
+ PFCI_INT(rv)->pfndelete = pfndelete;
+ PFCI_INT(rv)->pfnfcigtf = pfnfcigtf;
+ PFCI_INT(rv)->pccab = pccab;
+ PFCI_INT(rv)->pv = pv;
+
+ /* Still mark as incomplete, because of other missing FCI* APIs */
+
+ PFCI_INT(rv)->FCI_Intmagic = 0;
+ PFDI_FREE(rv, rv);
+ FIXME("(%p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p): stub\n",
+ perf, pfnfiledest, pfnalloc, pfnfree, pfnopen, pfnread, pfnwrite, pfnclose,
+ pfnseek, pfndelete, pfnfcigtf, pccab, pv);
+
+ perf->erfOper = FCIERR_NONE;
+ perf->erfType = 0;
+ perf->fError = TRUE;
+
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+
+ return NULL;
+
}
/***********************************************************************
@@ -116,12 +201,30 @@
/***********************************************************************
* FCIDestroy (CABINET.14)
+ *
+ * Frees a handle created by FCICreate.
+ * Only reason for failure would be an invalid handle.
+ *
+ * PARAMS
+ * hfci [I] The HFCI to free
+ *
+ * RETURNS
+ * TRUE for success
+ * FALSE for failure
*/
BOOL __cdecl FCIDestroy(HFCI hfci)
{
- FIXME("(%p): stub\n", hfci);
+ if (REALLY_IS_FCI(hfci)) {
+ PFCI_INT(hfci)->FCI_Intmagic = 0;
+ PFDI_FREE(hfci, hfci);
+ /*return TRUE; */
+ } else {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
- return FALSE;
+ /* Still mark as incomplete, because of other missing FCI* APIs */
+ FIXME("(%p): stub\n", hfci);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
}
--- vendor/wine/dlls/comctl32/current/Makefile.in 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/Makefile.in 2005-05-24 22:29:00 UTC (rev 15488)
@@ -4,6 +4,7 @@
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = comctl32.dll
+IMPORTLIB = libcomctl32.$(IMPLIBEXT)
IMPORTS = user32 gdi32 advapi32 kernel32
DELAYIMPORTS = winmm
EXTRALIBS = $(LIBUNICODE)
--- vendor/wine/dlls/comctl32/current/comboex.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/comboex.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -283,6 +283,26 @@
}
+static INT COMBOEX_GetIndex(COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
+{
+ CBE_ITEMDATA *moving;
+ INT index;
+
+ moving = infoPtr->items;
+ index = infoPtr->nb_items - 1;
+
+ while (moving && (moving != item)) {
+ moving = moving->next;
+ index--;
+ }
+ if (!moving || (index < 0)) {
+ ERR("COMBOBOXEX item structures broken. Please report!\n");
+ return -1;
+ }
+ return index;
+}
+
+
static LPCWSTR COMBOEX_GetText(COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
{
NMCOMBOBOXEXW nmce;
@@ -295,6 +315,7 @@
ZeroMemory(&nmce, sizeof(nmce));
nmce.ceItem.mask = CBEIF_TEXT;
nmce.ceItem.lParam = item->lParam;
+ nmce.ceItem.iItem = COMBOEX_GetIndex(infoPtr, item);
COMBOEX_NotifyItem(infoPtr, CBEN_GETDISPINFOW, &nmce);
if (is_textW(nmce.ceItem.pszText)) {
@@ -1389,6 +1410,7 @@
ZeroMemory(&nmce, sizeof(nmce));
nmce.ceItem.mask = CBEIF_INDENT;
nmce.ceItem.lParam = item->lParam;
+ nmce.ceItem.iItem = dis->itemID;
COMBOEX_NotifyItem(infoPtr, CBEN_GETDISPINFOW, &nmce);
if (nmce.ceItem.mask & CBEIF_DI_SETITEM)
item->iIndent = nmce.ceItem.iIndent;
@@ -1453,6 +1475,7 @@
ZeroMemory(&nmce, sizeof(nmce));
nmce.ceItem.mask = (drawstate == ILD_NORMAL) ? CBEIF_IMAGE : CBEIF_SELECTEDIMAGE;
nmce.ceItem.lParam = item->lParam;
+ nmce.ceItem.iItem = dis->itemID;
COMBOEX_NotifyItem(infoPtr, CBEN_GETDISPINFOW, &nmce);
if (drawstate == ILD_NORMAL) {
if (nmce.ceItem.mask & CBEIF_DI_SETITEM) item->iImage = nmce.ceItem.iImage;
@@ -1468,6 +1491,7 @@
ZeroMemory(&nmce, sizeof(nmce));
nmce.ceItem.mask = CBEIF_OVERLAY;
nmce.ceItem.lParam = item->lParam;
+ nmce.ceItem.iItem = dis->itemID;
COMBOEX_NotifyItem(infoPtr, CBEN_GETDISPINFOW, &nmce);
if (nmce.ceItem.mask & CBEIF_DI_SETITEM)
item->iOverlay = nmce.ceItem.iOverlay;
--- vendor/wine/dlls/comctl32/current/comctl32undoc.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/comctl32undoc.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -588,7 +588,7 @@
if ((err = RegOpenKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
0, KEY_WRITE, &newkey))) {
/* not present - what to do ??? */
- ERR("Can not open key, error=%d, attempting to create\n",
+ ERR("Could not open key, error=%d, attempting to create\n",
err);
if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
0,
@@ -980,7 +980,7 @@
&newkey,
&dwdisp))) {
/* error - what to do ??? */
- ERR("(%lu %lu %lx %lx \"%s\" %p): Can not open key, error=%d\n",
+ ERR("(%lu %lu %lx %lx \"%s\" %p): Could not open key, error=%d\n",
mp->extview.cbSize, mp->extview.nMaxItems, mp->extview.dwFlags,
(DWORD)mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
mp->extview.lpfnCompare, err);
--- vendor/wine/dlls/comctl32/current/datetime.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/datetime.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -607,7 +607,7 @@
RECT *checkbox = &infoPtr->checkbox;
SIZE size;
COLORREF oldTextColor;
- SHORT fieldWidth;
+ SHORT fieldWidth = 0;
/* draw control edge */
TRACE("\n");
--- vendor/wine/dlls/comctl32/current/header.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/header.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -163,7 +163,7 @@
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
HEADER_ITEM *phdi = &infoPtr->items[iItem];
RECT r;
- INT oldBkMode;
+ INT oldBkMode, cxEdge = GetSystemMetrics(SM_CXEDGE);
TRACE("DrawItem(iItem %d bHotTrack %d unicode flag %d)\n", iItem, bHotTrack, infoPtr->bUnicode);
@@ -188,6 +188,9 @@
else
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
+ r.left -= cxEdge;
+ r.right += cxEdge;
+
if (phdi->fmt & HDF_OWNERDRAW) {
DRAWITEMSTRUCT dis;
dis.CtlType = ODT_HEADER;
@@ -206,149 +209,117 @@
SetBkMode(hdc, oldBkMode);
}
else {
- UINT uTextJustify = DT_LEFT;
+ UINT rw, rh, /* width and height of r */
+ *x = NULL, *w = NULL; /* x and width of the pic (bmp or img) which is part of cnt */
+ /* cnt,txt,img,bmp */
+ UINT cx, tx, ix, bx,
+ cw, tw, iw, bw;
+ BITMAP bmp;
- if ((phdi->fmt & HDF_JUSTIFYMASK) == HDF_CENTER)
- uTextJustify = DT_CENTER;
- else if ((phdi->fmt & HDF_JUSTIFYMASK) == HDF_RIGHT)
- uTextJustify = DT_RIGHT;
+ cw = tw = iw = bw = 0;
+ rw = r.right - r.left;
+ rh = r.bottom - r.top;
- if ((phdi->fmt & HDF_BITMAP) && !(phdi->fmt & HDF_BITMAP_ON_RIGHT) && (phdi->hbm)) {
- BITMAP bmp;
- HDC hdcBitmap;
- INT yD, yS, cx, cy, rx, ry;
+ if (phdi->fmt & HDF_STRING) {
+ RECT textRect;
- GetObjectW (phdi->hbm, sizeof(BITMAP), (LPVOID)&bmp);
+ DrawTextW (hdc, phdi->pszText, -1,
+ &textRect, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_CALCRECT);
+ cw = textRect.right - textRect.left + 2 * infoPtr->iMargin;
+ }
- ry = r.bottom - r.top;
- rx = r.right - r.left;
-
- if (ry >= bmp.bmHeight) {
- cy = bmp.bmHeight;
- yD = r.top + (ry - bmp.bmHeight) / 2;
- yS = 0;
- }
- else {
- cy = ry;
- yD = r.top;
- yS = (bmp.bmHeight - ry) / 2;
-
- }
-
- if (rx >= bmp.bmWidth + infoPtr->iMargin) {
- cx = bmp.bmWidth;
- }
- else {
- cx = rx - infoPtr->iMargin;
- }
-
- hdcBitmap = CreateCompatibleDC (hdc);
- SelectObject (hdcBitmap, phdi->hbm);
- BitBlt (hdc, r.left + infoPtr->iMargin, yD, cx, cy, hdcBitmap, 0, yS, SRCCOPY);
- DeleteDC (hdcBitmap);
-
- r.left += (bmp.bmWidth + infoPtr->iMargin);
+ if ((phdi->fmt & HDF_IMAGE) && (infoPtr->himl)) {
+ iw = infoPtr->himl->cx + 2 * infoPtr->iMargin;
+ x = &ix;
+ w = &iw;
}
-
- if ((phdi->fmt & HDF_BITMAP) && (phdi->fmt & HDF_BITMAP_ON_RIGHT) && (phdi->hbm)) {
- BITMAP bmp;
- HDC hdcBitmap;
- INT xD, yD, yS, cx, cy, rx, ry, tx;
- RECT textRect;
-
+ if ((phdi->fmt & HDF_BITMAP) && (phdi->hbm)) {
GetObjectW (phdi->hbm, sizeof(BITMAP), (LPVOID)&bmp);
-
- textRect = r;
- if (phdi->fmt & HDF_STRING) {
- DrawTextW (hdc, phdi->pszText, -1,
- &textRect, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_CALCRECT);
- tx = textRect.right - textRect.left;
+ bw = bmp.bmWidth + 2 * infoPtr->iMargin;
+ if (!iw) {
+ x = &bx;
+ w = &bw;
}
- else
- tx = 0;
- ry = r.bottom - r.top;
- rx = r.right - r.left;
+ }
- if (ry >= bmp.bmHeight) {
- cy = bmp.bmHeight;
- yD = r.top + (ry - bmp.bmHeight) / 2;
- yS = 0;
- }
- else {
- cy = ry;
- yD = r.top;
- yS = (bmp.bmHeight - ry) / 2;
+ if (bw || iw)
+ cw += *w;
+ /* align cx using the unclipped cw */
+ if ((phdi->fmt & HDF_JUSTIFYMASK) == HDF_LEFT)
+ cx = r.left;
+ else if ((phdi->fmt & HDF_JUSTIFYMASK) == HDF_CENTER)
+ cx = r.left + rw / 2 - cw / 2;
+ else /* HDF_RIGHT */
+ cx = r.right - cw;
+
+ /* clip cx & cw */
+ if (cx < r.left)
+ cx = r.left;
+ if (cx + cw > r.right)
+ cw = r.right - cx;
+
+ tx = cx + infoPtr->iMargin;
+ /* since cw might have changed we have to recalculate tw */
+ tw = cw - infoPtr->iMargin * 2;
+
+ if (iw || bw) {
+ tw -= *w;
+ if (phdi->fmt & HDF_BITMAP_ON_RIGHT) {
+ /* put pic behind text */
+ *x = cx + tw + infoPtr->iMargin * 3;
+ } else {
+ *x = cx + infoPtr->iMargin;
+ /* move text behind pic */
+ tx += *w;
}
-
- if (r.left + tx + bmp.bmWidth + 2*infoPtr->iMargin <= r.right) {
- cx = bmp.bmWidth;
- xD = r.left + tx + infoPtr->iMargin;
- }
- else {
- if (rx >= bmp.bmWidth + infoPtr->iMargin ) {
- cx = bmp.bmWidth;
- xD = r.right - bmp.bmWidth - infoPtr->iMargin;
- r.right = xD - infoPtr->iMargin;
- }
- else {
- cx = rx - infoPtr->iMargin;
- xD = r.left;
- r.right = r.left;
- }
- }
-
- hdcBitmap = CreateCompatibleDC (hdc);
- SelectObject (hdcBitmap, phdi->hbm);
- BitBlt (hdc, xD, yD, cx, cy, hdcBitmap, 0, yS, SRCCOPY);
- DeleteDC (hdcBitmap);
}
- if ((phdi->fmt & HDF_IMAGE) && !(phdi->fmt & HDF_BITMAP_ON_RIGHT) && (infoPtr->himl)) {
- r.left += infoPtr->iMargin;
- ImageList_DrawEx(infoPtr->himl, phdi->iImage, hdc, r.left, r.top + (r.bottom-r.top- infoPtr->himl->cy)/2,
- infoPtr->himl->cx, r.bottom-r.top, CLR_DEFAULT, CLR_DEFAULT, 0);
- r.left += infoPtr->himl->cx;
+ if (iw && bw) {
+ /* since we're done with the layout we can
+ now calculate the position of bmp which
+ has no influence on alignment and layout
+ because of img */
+ if ((phdi->fmt & HDF_JUSTIFYMASK) == HDF_RIGHT)
+ bx = cx - bw + infoPtr->iMargin;
+ else
+ bx = cx + cw + infoPtr->iMargin;
}
- if ((phdi->fmt & HDF_IMAGE) && (phdi->fmt & HDF_BITMAP_ON_RIGHT) && (infoPtr->himl)) {
- RECT textRect;
- INT tx;
+ if (iw || bw) {
+ HDC hClipDC = GetDC(hwnd);
+ HRGN hClipRgn = CreateRectRgn(r.left, r.top, r.right, r.bottom);
+ SelectClipRgn(hClipDC, hClipRgn);
+
+ if (bw) {
+ HDC hdcBitmap = CreateCompatibleDC (hClipDC);
+ SelectObject (hdcBitmap, phdi->hbm);
+ BitBlt (hClipDC, bx, r.top + ((INT)rh - bmp.bmHeight) / 2,
+ bmp.bmWidth, bmp.bmHeight, hdcBitmap, 0, 0, SRCCOPY);
+ DeleteDC (hdcBitmap);
+ }
- textRect = r;
- if (phdi->fmt & HDF_STRING) {
- DrawTextW (hdc, phdi->pszText, -1,
- &textRect, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_CALCRECT);
- tx = textRect.right - textRect.left;
- }
- else
- tx = 0;
-
- if (tx < (r.right-r.left - infoPtr->himl->cx - GetSystemMetrics(SM_CXEDGE)))
- ImageList_DrawEx(infoPtr->himl, phdi->iImage, hdc, r.left + tx + 2*infoPtr->iMargin,
- r.top + (r.bottom-r.top-infoPtr->himl->cy)/2, infoPtr->himl->cx, r.bottom-r.top,
- CLR_DEFAULT, CLR_DEFAULT, 0);
- else {
- INT x = max(r.right - infoPtr->iMargin - infoPtr->himl->cx, r.left);
- INT cx = min(infoPtr->himl->cx, r.right-r.left - GetSystemMetrics(SM_CXEDGE));
- ImageList_DrawEx(infoPtr->himl, phdi->iImage, hdc, x ,
- r.top + (r.bottom-r.top-infoPtr->himl->cy)/2, cx, r.bottom-r.top,
- CLR_DEFAULT, CLR_DEFAULT, 0);
- r.right -= infoPtr->himl->cx - infoPtr->iMargin;
+ if (iw) {
+ ImageList_DrawEx (infoPtr->himl, phdi->iImage, hClipDC,
+ ix, r.top + ((INT)rh - infoPtr->himl->cy) / 2,
+ infoPtr->himl->cx, infoPtr->himl->cy, CLR_DEFAULT, CLR_DEFAULT, 0);
}
- }
- if (((phdi->fmt & HDF_STRING)
+ DeleteObject(hClipRgn);
+ DeleteDC(hClipDC);
+ }
+
+ if (((phdi->fmt & HDF_STRING)
|| (!(phdi->fmt & (HDF_OWNERDRAW|HDF_STRING|HDF_BITMAP|
HDF_BITMAP_ON_RIGHT|HDF_IMAGE)))) /* no explicit format specified? */
&& (phdi->pszText)) {
- oldBkMode = SetBkMode(hdc, TRANSPARENT);
- r.left += infoPtr->iMargin;
- r.right -= infoPtr->iMargin;
+ oldBkMode = SetBkMode(hdc, TRANSPARENT);
SetTextColor (hdc, (bHotTrack) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT);
+ r.left = tx;
+ r.right = tx + tw;
DrawTextW (hdc, phdi->pszText, -1,
- &r, uTextJustify|DT_END_ELLIPSIS|DT_VCENTER|DT_SINGLELINE);
+ &r, DT_LEFT|DT_END_ELLIPSIS|DT_VCENTER|DT_SINGLELINE);
if (oldBkMode != TRANSPARENT)
SetBkMode(hdc, oldBkMode);
}
--- vendor/wine/dlls/comctl32/current/hotkey.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/hotkey.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -54,7 +54,7 @@
BYTE CurrMod;
INT CaretPos;
DWORD ScanCode;
- WCHAR strNone[15]; /* hope its long enough ... */
+ WCHAR strNone[15]; /* hope it's long enough ... */
} HOTKEY_INFO;
static const WCHAR HOTKEY_plussep[] = { ' ', '+', ' ' };
--- vendor/wine/dlls/comctl32/current/imagelist.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/imagelist.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -98,7 +98,7 @@
* nothing
*
* NOTES
- * This function can NOT be used to reduce the number of images.
+ * This function CANNOT be used to reduce the number of images.
*/
static void
IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cx, INT cy)
--- vendor/wine/dlls/comctl32/current/ipaddress.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/ipaddress.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -62,6 +62,7 @@
{
HWND Self;
HWND Notify;
+ BOOL Enabled;
IPPART_INFO Part[4];
} IPADDRESS_INFO;
@@ -127,12 +128,26 @@
static const WCHAR dotW[] = { '.', 0 };
RECT rect, rcPart;
POINT pt;
+ COLORREF bgCol, fgCol;
int i;
TRACE("\n");
GetClientRect (infoPtr->Self, &rect);
+
+ if (infoPtr->Enabled) {
+ bgCol = COLOR_WINDOW;
+ fgCol = COLOR_WINDOWTEXT;
+ } else {
+ bgCol = COLOR_3DFACE;
+ fgCol = COLOR_GRAYTEXT;
+ }
+
+ FillRect (hdc, &rect, (HBRUSH) (bgCol+1));
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
+
+ SetBkColor (hdc, GetSysColor(bgCol));
+ SetTextColor(hdc, GetSysColor(fgCol));
for (i = 0; i < 3; i++) {
GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart);
@@ -174,6 +189,7 @@
edit.bottom = rcClient.bottom - 2;
infoPtr->Self = hwnd;
+ infoPtr->Enabled = FALSE;
infoPtr->Notify = lpCreate->hwndParent;
for (i = 0; i < 4; i++) {
@@ -215,6 +231,20 @@
}
+static LRESULT IPADDRESS_Enable (IPADDRESS_INFO *infoPtr, BOOL enabled)
+{
+ int i;
+
+ infoPtr->Enabled = enabled;
+
+ for (i = 0; i < 4; i++)
+ EnableWindow(infoPtr->Part[i].EditHwnd, enabled);
+
+ InvalidateRgn(infoPtr->Self, NULL, FALSE);
+ return 0;
+}
+
+
static LRESULT IPADDRESS_Paint (IPADDRESS_INFO *infoPtr, HDC hdc)
{
PAINTSTRUCT ps;
@@ -517,6 +547,10 @@
case WM_DESTROY:
return IPADDRESS_Destroy (infoPtr);
+ case WM_ENABLE:
+ return IPADDRESS_Enable (infoPtr, (BOOL)wParam);
+ break;
+
case WM_PAINT:
return IPADDRESS_Paint (infoPtr, (HDC)wParam);
--- vendor/wine/dlls/comctl32/current/listview.c 2005-05-24 21:32:47 UTC (rev 15487)
+++ vendor/wine/dlls/comctl32/current/listview.c 2005-05-24 22:29:00 UTC (rev 15488)
@@ -24,7 +24,7 @@
* NOTES
*
* This code was audited for completeness against the documented features
- * of Comctl32.dll version 6.0 on Oct. 21, 2002, by Dimitrie O. Paun.
+ * of Comctl32.dll version 6.0 on May. 20, 2005, by James Hawkins.
*
* Unless otherwise noted, we believe this code to be complete, as per
* the specification mentioned above.
@@ -32,6 +32,17 @@
*
* TODO:
*
+ * Default Message Processing
+ * -- EN_KILLFOCUS should be handled in WM_COMMAND
+ * -- WM_CREATE: create the icon and small icon image lists at this point only if
+ * the LVS_SHAREIMAGELISTS style is not specified.
+ * -- WM_ERASEBKGND: forward this message to the parent window if the bkgnd
+ * color is CLR_NONE.
+ * -- WM_WINDOWPOSCHANGED: arrange the list items if the current view is icon
+ * or small icon and the LVS_AUTOARRANGE style is specified.
+ * -- WM_TIMER
+ * -- WM_WININICHANGE
+ *
* Features
* -- Hot item handling, mouse hovering
* -- Workareas support
@@ -74,6 +85,8 @@
* -- LVS_NOLABELWRAP
* -- LVS_NOSCROLL (see Q137520)
* -- LVS_SORTASCENDING, LVS_SORTDESCENDING
+ * -- LVS_ALIGNTOP
+ * -- LVS_TYPESTYLEMASK
*
* Extended Styles
* -- LVS_EX_BORDERSELECT
@@ -99,6 +112,7 @@
* -- LVN_ODFINDITEM
* -- LVN_SETDISPINFO
* -- NM_HOVER
+ * -- LVN_BEGINRDRAG
*
* Messages:
* -- LVM_CANCELEDITLABEL
@@ -130,6 +144,20 @@
* -- LVM_SORTGROUPS
* -- LVM_SORTITEMSEX
*
+ * Macros:
+ * -- ListView_GetCheckSate, ListView_SetCheckState
+ * -- ListView_GetHoverTime, ListView_SetHoverTime
+ * -- ListView_GetISearchString
+ * -- ListView_GetNumberOfWorkAreas
+ * -- ListView_GetOrigin
+ * -- ListView_GetTextBkColor
+ * -- ListView_GetUnicodeFormat, ListView_SetUnicodeFormat
+ * -- ListView_GetWorkAreas, ListView_SetWorkAreas
+ * -- ListView_SortItemsEx
+ *
+ * Functions:
+ * -- LVGroupComparE
+ *
* Known differences in message stream from native control (not known if
* these differences cause problems):
* LVM_INSERTITEM issues LVM_SETITEMSTATE and LVM_SETITEM in certain cases.
@@ -224,6 +252,7 @@
HIMAGELIST himlState;
BOOL bLButtonDown;
BOOL bRButtonDown;
+ POINT ptClickPos; /* point where the user clicked */
BOOL bNoItemMetrics; /* flags if item metrics are not yet computed */
INT nItemHeight;
INT nItemWidth;
@@ -393,6 +422,7 @@
static BOOL LISTVIEW_EnsureVisible(LISTVIEW_INFO *, INT, BOOL);
static HWND CreateEditLabelT(LISTVIEW_INFO *, LPCWSTR, DWORD, INT, INT, INT, INT, BOOL);
static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *, INT, HIMAGELIST);
+static INT LISTVIEW_HitTest(LISTVIEW_INFO *, LPLVHITTESTINFO, BOOL, BOOL);
/******** Text handling functions *************************************/
@@ -3141,7 +3171,23 @@
return bResult;
}
+static BOOL LISTVIEW_GetItemAtPt(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, POINT pt)
+{
+ LVHITTESTINFO lvHitTestInfo;
+ ZeroMemory(&lvHitTestInfo, sizeof(lvHitTestInfo));
+ lvHitTestInfo.pt.x = pt.x;
+ lvHitTestInfo.pt.y = pt.y;
+
+ LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, FALSE);
+
+ lpLVItem->mask = LVIF_PARAM;
+ lpLVItem->iItem = lvHitTestInfo.iItem;
+ lpLVItem->iSubItem = 0;
+
+ return LISTVIEW_GetItemT(infoPtr, lpLVItem, TRUE);
+}
+
/***
* DESCRIPTION:
* Called when the mouse is being actively tracked and has hovered for a specified
@@ -3162,10 +3208,18 @@
*/
static LRESULT LISTVIEW_MouseHover(LISTVIEW_INFO *infoPtr, WORD fwKyes, INT x, INT y)
{
- if(infoPtr->dwLvExStyle & LVS_EX_TRACKSELECT)
- /* FIXME: select the item!!! */
- /*LISTVIEW_GetItemAtPt(infoPtr, pt)*/;
+ if (infoPtr->dwLvExStyle & LVS_EX_TRACKSELECT)
+ {
+ LVITEMW item;
+ POINT pt;
+ pt.x = x;
+ pt.y = y;
+
+ if (LISTVIEW_GetItemAtPt(infoPtr, &item, pt))
+ LISTVIEW_SetSelection(infoPtr, item.iItem);
+ }
+
return 0;
}
@@ -3183,8 +3237,25 @@
*/
static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, INT y)
{
- TRACKMOUSEEVENT trackinfo;
+ TRACKMOUSEEVENT trackinfo;
+ if (infoPtr->bLButtonDown && DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos))
+ {
+ LVHITTESTINFO lvHitTestInfo;
+ NMLISTVIEW nmlv;
+
+ lvHitTestInfo.pt = infoPtr->ptClickPos;
+ LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
+
+ ZeroMemory(&nmlv, sizeof(nmlv));
+ nmlv.iItem = lvHitTestInfo.iItem;
+ nmlv.ptAction = infoPtr->ptClickPos;
+
+ notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
+
+ return 0;
+ }
+
/* see if we are supposed to be tracking mouse hovering */
if(infoPtr->dwLvExStyle & LVS_EX_TRACKSELECT) {
/* fill in the trackinfo struct */
@@ -7488,6 +7559,25 @@
/***
* DESCRIPTION:
+ * Enables the listview control.
+ *
+ * PARAMETER(S):
+ * [I] infoPtr : valid pointer to the listview structure
+ * [I] bEnable : specifies whether to enable or disable the window
+ *
+ * RETURN:
+ * SUCCESS : TRUE
+ * FAILURE : FALSE
+ */
+static BOOL LISTVIEW_Enable(LISTVIEW_INFO *infoPtr, BOOL bEnable)
+{
+ if (infoPtr->dwStyle & LVS_OWNERDRAWFIXED)
+ InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
+ return TRUE;
+}
+
+/***
+ * DESCRIPTION:
* Erases the background of the listview control.
*
* PARAMETER(S):
@@ -7901,70 +7991,8 @@
return 0;
}
-
/***
* DESCRIPTION:
- * Track mouse/dragging
- *
- * PARAMETER(S):
- * [I] infoPtr : valid pointer to the listview structure
- * [I] pt : mouse coordinate
- *
- * RETURN:
- * Zero
- */
-static LRESULT LISTVIEW_TrackMouse(LISTVIEW_INFO *infoPtr, POINT pt)
-{
- INT cxDrag = GetSystemMetrics(SM_CXDRAG);
- INT cyDrag = GetSystemMetrics(SM_CYDRAG);
- RECT r;
- MSG msg;
-
- TRACE("\n");
-
- r.top = pt.y - cyDrag;
- r.left = pt.x - cxDrag;
- r.bottom = pt.y + cyDrag;
- r.right = pt.x + cxDrag;
-
- SetCapture(infoPtr->hwndSelf);
-
- while (1)
- {
- if (PeekMessageW(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD))
- {
- if (msg.message == WM_MOUSEMOVE)
- {
- pt.x = (short)LOWORD(msg.lParam);
- pt.y = (short)HIWORD(msg.lParam);
- if (PtInRect(&r, pt))
- continue;
- else
- {
- ReleaseCapture();
- return 1;
- }
- }
- else if (msg.message >= WM_LBUTTONDOWN &&
- msg.message <= WM_RBUTTONDBLCLK)
- {
- break;
- }
-
- DispatchMessageW(&msg);
- }
-
- if (GetCapture() != infoPtr->hwndSelf)
- return 0;
- }
-
- ReleaseCapture();
- return 0;
-}
-
-
-/***
- * DESCRIPTION:
* Processes double click messages (left mouse button).
*
* PARAMETER(S):
@@ -8023,8 +8051,9 @@
if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf);
- /* set left button down flag */
+ /* set left button down flag and record the click position */
infoPtr->bLButtonDown = TRUE;
+ infoPtr->ptClickPos = pt;
lvHitTestInfo.pt.x = x;
lvHitTestInfo.pt.y = y;
@@ -8047,20 +8076,7 @@
}
return 0;
}
- if (LISTVIEW_TrackMouse(infoPtr, lvHitTestInfo.pt))
- {
- NMLISTVIEW nmlv;
- ZeroMemory(&nmlv, sizeof(nmlv));
- nmlv.iItem = nItem;
- nmlv.ptAction.x = lvHitTestInfo.pt.x;
- nmlv.ptAction.y = lvHitTestInfo.pt.y;
-
- notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
-
- return 0;
- }
-
if (infoPtr->dwStyle & LVS_SINGLESEL)
{
if (LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED))
@@ -8288,6 +8304,11 @@
notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv);
}
break;
+
+ case HDN_DIVIDERDBLCLICKW:
+ case HDN_DIVIDERDBLCLICKA:
[truncated at 1000 lines; 22447 more skipped]