Fix c_parser.pm so it handles 'const' preceeding a '*'.

Add missing #pragma pack directives for the new shlobj.h types.
Fix some field names in CSFV and QCMINFO.
Update the generated tests to also check shtypes.h and test some more
types.
This commit is contained in:
Francois Gouget 2004-09-07 22:46:26 +00:00 committed by Alexandre Julliard
parent c9b7791198
commit c13638ee85
5 changed files with 142 additions and 5 deletions

View File

@ -963,7 +963,7 @@ HRESULT WINAPI SHCreateShellFolderViewEx(
HRESULT hRes; HRESULT hRes;
TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n", TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n",
psvcbi->pshf, psvcbi->pidlFolder, psvcbi->pfnCallback, psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
psvcbi->fvm, psvcbi->psvOuter); psvcbi->fvm, psvcbi->psvOuter);
psf = IShellView_Constructor(psvcbi->pshf); psf = IShellView_Constructor(psvcbi->pshf);

View File

@ -824,6 +824,13 @@ static void test_pack_LPCITEMIDLIST(void)
TEST_TYPE_POINTER(LPCITEMIDLIST, 3, 1); TEST_TYPE_POINTER(LPCITEMIDLIST, 3, 1);
} }
static void test_pack_LPCSHITEMID(void)
{
/* LPCSHITEMID */
TEST_TYPE(LPCSHITEMID, 4, 4);
TEST_TYPE_POINTER(LPCSHITEMID, 3, 1);
}
static void test_pack_LPITEMIDLIST(void) static void test_pack_LPITEMIDLIST(void)
{ {
/* LPITEMIDLIST */ /* LPITEMIDLIST */
@ -831,6 +838,12 @@ static void test_pack_LPITEMIDLIST(void)
TEST_TYPE_POINTER(LPITEMIDLIST, 3, 1); TEST_TYPE_POINTER(LPITEMIDLIST, 3, 1);
} }
static void test_pack_LPSHELLDETAILS(void)
{
/* LPSHELLDETAILS */
TEST_TYPE(LPSHELLDETAILS, 4, 4);
}
static void test_pack_LPSHITEMID(void) static void test_pack_LPSHITEMID(void)
{ {
/* LPSHITEMID */ /* LPSHITEMID */
@ -838,6 +851,19 @@ static void test_pack_LPSHITEMID(void)
TEST_TYPE_POINTER(LPSHITEMID, 3, 1); TEST_TYPE_POINTER(LPSHITEMID, 3, 1);
} }
static void test_pack_LPSTRRET(void)
{
/* LPSTRRET */
TEST_TYPE(LPSTRRET, 4, 4);
}
static void test_pack_SHELLDETAILS(void)
{
/* SHELLDETAILS (pack 1) */
TEST_FIELD(SHELLDETAILS, int, fmt, 0, 4, 1);
TEST_FIELD(SHELLDETAILS, int, cxChar, 4, 4, 1);
}
static void test_pack_SHITEMID(void) static void test_pack_SHITEMID(void)
{ {
/* SHITEMID (pack 1) */ /* SHITEMID (pack 1) */
@ -846,6 +872,12 @@ static void test_pack_SHITEMID(void)
TEST_FIELD(SHITEMID, BYTE[1], abID, 2, 1, 1); TEST_FIELD(SHITEMID, BYTE[1], abID, 2, 1, 1);
} }
static void test_pack_STRRET(void)
{
/* STRRET (pack 4) */
TEST_FIELD(STRRET, UINT, uType, 0, 4, 4);
}
static void test_pack_AUTO_SCROLL_DATA(void) static void test_pack_AUTO_SCROLL_DATA(void)
{ {
/* AUTO_SCROLL_DATA (pack 1) */ /* AUTO_SCROLL_DATA (pack 1) */
@ -908,6 +940,17 @@ static void test_pack_CIDA(void)
TEST_FIELD(CIDA, UINT[1], aoffset, 4, 4, 1); TEST_FIELD(CIDA, UINT[1], aoffset, 4, 4, 1);
} }
static void test_pack_CSFV(void)
{
/* CSFV (pack 1) */
TEST_FIELD(CSFV, UINT, cbSize, 0, 4, 1);
TEST_FIELD(CSFV, IShellFolder*, pshf, 4, 4, 1);
TEST_FIELD(CSFV, IShellView*, psvOuter, 8, 4, 1);
TEST_FIELD(CSFV, LPCITEMIDLIST, pidl, 12, 4, 1);
TEST_FIELD(CSFV, LONG, lEvents, 16, 4, 1);
TEST_FIELD(CSFV, LPFNVIEWCALLBACK, pfnCallback, 20, 4, 1);
}
static void test_pack_DROPFILES(void) static void test_pack_DROPFILES(void)
{ {
/* DROPFILES (pack 1) */ /* DROPFILES (pack 1) */
@ -1009,6 +1052,12 @@ static void test_pack_LPCABINETSTATE(void)
TEST_TYPE_POINTER(LPCABINETSTATE, 12, 1); TEST_TYPE_POINTER(LPCABINETSTATE, 12, 1);
} }
static void test_pack_LPCSFV(void)
{
/* LPCSFV */
TEST_TYPE(LPCSFV, 4, 4);
}
static void test_pack_LPDROPFILES(void) static void test_pack_LPDROPFILES(void)
{ {
/* LPDROPFILES */ /* LPDROPFILES */
@ -1044,6 +1093,12 @@ static void test_pack_LPFILEGROUPDESCRIPTORW(void)
TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORW, 596, 1); TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORW, 596, 1);
} }
static void test_pack_LPFNVIEWCALLBACK(void)
{
/* LPFNVIEWCALLBACK */
TEST_TYPE(LPFNVIEWCALLBACK, 4, 4);
}
static void test_pack_LPIDA(void) static void test_pack_LPIDA(void)
{ {
/* LPIDA */ /* LPIDA */
@ -1051,6 +1106,13 @@ static void test_pack_LPIDA(void)
TEST_TYPE_POINTER(LPIDA, 8, 1); TEST_TYPE_POINTER(LPIDA, 8, 1);
} }
static void test_pack_LPQCMINFO(void)
{
/* LPQCMINFO */
TEST_TYPE(LPQCMINFO, 4, 4);
TEST_TYPE_POINTER(LPQCMINFO, 20, 4);
}
static void test_pack_LPSHChangeDWORDAsIDList(void) static void test_pack_LPSHChangeDWORDAsIDList(void)
{ {
/* LPSHChangeDWORDAsIDList */ /* LPSHChangeDWORDAsIDList */
@ -1086,6 +1148,13 @@ static void test_pack_LPSHELLSTATE(void)
TEST_TYPE_POINTER(LPSHELLSTATE, 32, 1); TEST_TYPE_POINTER(LPSHELLSTATE, 32, 1);
} }
static void test_pack_LPTBINFO(void)
{
/* LPTBINFO */
TEST_TYPE(LPTBINFO, 4, 4);
TEST_TYPE_POINTER(LPTBINFO, 8, 4);
}
static void test_pack_PBROWSEINFOA(void) static void test_pack_PBROWSEINFOA(void)
{ {
/* PBROWSEINFOA */ /* PBROWSEINFOA */
@ -1100,6 +1169,33 @@ static void test_pack_PBROWSEINFOW(void)
TEST_TYPE_POINTER(PBROWSEINFOW, 32, 4); TEST_TYPE_POINTER(PBROWSEINFOW, 32, 4);
} }
static void test_pack_QCMINFO(void)
{
/* QCMINFO (pack 8) */
TEST_TYPE(QCMINFO, 20, 4);
TEST_FIELD(QCMINFO, HMENU, hmenu, 0, 4, 4);
TEST_FIELD(QCMINFO, UINT, indexMenu, 4, 4, 4);
TEST_FIELD(QCMINFO, UINT, idCmdFirst, 8, 4, 4);
TEST_FIELD(QCMINFO, UINT, idCmdLast, 12, 4, 4);
TEST_FIELD(QCMINFO, QCMINFO_IDMAP const*, pIdMap, 16, 4, 4);
}
static void test_pack_QCMINFO_IDMAP(void)
{
/* QCMINFO_IDMAP (pack 8) */
TEST_TYPE(QCMINFO_IDMAP, 12, 4);
TEST_FIELD(QCMINFO_IDMAP, UINT, nMaxIds, 0, 4, 4);
TEST_FIELD(QCMINFO_IDMAP, QCMINFO_IDMAP_PLACEMENT[1], pIdList, 4, 8, 4);
}
static void test_pack_QCMINFO_IDMAP_PLACEMENT(void)
{
/* QCMINFO_IDMAP_PLACEMENT (pack 8) */
TEST_TYPE(QCMINFO_IDMAP_PLACEMENT, 8, 4);
TEST_FIELD(QCMINFO_IDMAP_PLACEMENT, UINT, id, 0, 4, 4);
TEST_FIELD(QCMINFO_IDMAP_PLACEMENT, UINT, fFlags, 4, 4, 4);
}
static void test_pack_SHChangeDWORDAsIDList(void) static void test_pack_SHChangeDWORDAsIDList(void)
{ {
/* SHChangeDWORDAsIDList (pack 1) */ /* SHChangeDWORDAsIDList (pack 1) */
@ -1159,6 +1255,14 @@ static void test_pack_SHELLVIEWID(void)
TEST_TYPE(SHELLVIEWID, 16, 4); TEST_TYPE(SHELLVIEWID, 16, 4);
} }
static void test_pack_TBINFO(void)
{
/* TBINFO (pack 8) */
TEST_TYPE(TBINFO, 8, 4);
TEST_FIELD(TBINFO, UINT, cbuttons, 0, 4, 4);
TEST_FIELD(TBINFO, UINT, uFlags, 4, 4, 4);
}
static void test_pack(void) static void test_pack(void)
{ {
test_pack_APPBARDATA(); test_pack_APPBARDATA();
@ -1179,6 +1283,7 @@ static void test_pack(void)
test_pack_COAUTHIDENTITY(); test_pack_COAUTHIDENTITY();
test_pack_COAUTHINFO(); test_pack_COAUTHINFO();
test_pack_COSERVERINFO(); test_pack_COSERVERINFO();
test_pack_CSFV();
test_pack_DRAGINFOA(); test_pack_DRAGINFOA();
test_pack_DRAGINFOW(); test_pack_DRAGINFOW();
test_pack_DROPFILES(); test_pack_DROPFILES();
@ -1208,6 +1313,8 @@ static void test_pack(void)
test_pack_LPCABINETSTATE(); test_pack_LPCABINETSTATE();
test_pack_LPCITEMIDLIST(); test_pack_LPCITEMIDLIST();
test_pack_LPCOLESTR(); test_pack_LPCOLESTR();
test_pack_LPCSFV();
test_pack_LPCSHITEMID();
test_pack_LPCY(); test_pack_LPCY();
test_pack_LPDECIMAL(); test_pack_LPDECIMAL();
test_pack_LPDRAGINFOA(); test_pack_LPDRAGINFOA();
@ -1217,13 +1324,16 @@ static void test_pack(void)
test_pack_LPFILEDESCRIPTORW(); test_pack_LPFILEDESCRIPTORW();
test_pack_LPFILEGROUPDESCRIPTORA(); test_pack_LPFILEGROUPDESCRIPTORA();
test_pack_LPFILEGROUPDESCRIPTORW(); test_pack_LPFILEGROUPDESCRIPTORW();
test_pack_LPFNVIEWCALLBACK();
test_pack_LPGUID(); test_pack_LPGUID();
test_pack_LPIDA(); test_pack_LPIDA();
test_pack_LPITEMIDLIST(); test_pack_LPITEMIDLIST();
test_pack_LPOLESTR(); test_pack_LPOLESTR();
test_pack_LPQCMINFO();
test_pack_LPSHChangeDWORDAsIDList(); test_pack_LPSHChangeDWORDAsIDList();
test_pack_LPSHChangeProductKeyAsIDList(); test_pack_LPSHChangeProductKeyAsIDList();
test_pack_LPSHDESCRIPTIONID(); test_pack_LPSHDESCRIPTIONID();
test_pack_LPSHELLDETAILS();
test_pack_LPSHELLEXECUTEINFOA(); test_pack_LPSHELLEXECUTEINFOA();
test_pack_LPSHELLEXECUTEINFOW(); test_pack_LPSHELLEXECUTEINFOW();
test_pack_LPSHELLFLAGSTATE(); test_pack_LPSHELLFLAGSTATE();
@ -1233,6 +1343,8 @@ static void test_pack(void)
test_pack_LPSHITEMID(); test_pack_LPSHITEMID();
test_pack_LPSHNAMEMAPPINGA(); test_pack_LPSHNAMEMAPPINGA();
test_pack_LPSHNAMEMAPPINGW(); test_pack_LPSHNAMEMAPPINGW();
test_pack_LPSTRRET();
test_pack_LPTBINFO();
test_pack_NOTIFYICONDATAA(); test_pack_NOTIFYICONDATAA();
test_pack_NOTIFYICONDATAW(); test_pack_NOTIFYICONDATAW();
test_pack_OLECHAR(); test_pack_OLECHAR();
@ -1243,6 +1355,9 @@ static void test_pack(void)
test_pack_PNOTIFYICONDATAW(); test_pack_PNOTIFYICONDATAW();
test_pack_PRINTEROP_FLAGS(); test_pack_PRINTEROP_FLAGS();
test_pack_PROPID(); test_pack_PROPID();
test_pack_QCMINFO();
test_pack_QCMINFO_IDMAP();
test_pack_QCMINFO_IDMAP_PLACEMENT();
test_pack_RemHBITMAP(); test_pack_RemHBITMAP();
test_pack_RemHENHMETAFILE(); test_pack_RemHENHMETAFILE();
test_pack_RemHGLOBAL(); test_pack_RemHGLOBAL();
@ -1253,6 +1368,7 @@ static void test_pack(void)
test_pack_SHChangeNotifyEntry(); test_pack_SHChangeNotifyEntry();
test_pack_SHChangeProductKeyAsIDList(); test_pack_SHChangeProductKeyAsIDList();
test_pack_SHDESCRIPTIONID(); test_pack_SHDESCRIPTIONID();
test_pack_SHELLDETAILS();
test_pack_SHELLEXECUTEINFOA(); test_pack_SHELLEXECUTEINFOA();
test_pack_SHELLEXECUTEINFOW(); test_pack_SHELLEXECUTEINFOW();
test_pack_SHELLFLAGSTATE(); test_pack_SHELLFLAGSTATE();
@ -1265,6 +1381,8 @@ static void test_pack(void)
test_pack_SHITEMID(); test_pack_SHITEMID();
test_pack_SHNAMEMAPPINGA(); test_pack_SHNAMEMAPPINGA();
test_pack_SHNAMEMAPPINGW(); test_pack_SHNAMEMAPPINGW();
test_pack_STRRET();
test_pack_TBINFO();
test_pack_UP_BYTE_BLOB(); test_pack_UP_BYTE_BLOB();
test_pack_UP_FLAGGED_BYTE_BLOB(); test_pack_UP_FLAGGED_BYTE_BLOB();
test_pack_UP_FLAGGED_WORD_BLOB(); test_pack_UP_FLAGGED_WORD_BLOB();

View File

@ -295,10 +295,10 @@ typedef HRESULT (CALLBACK *LPFNVIEWCALLBACK)(
typedef struct _CSFV typedef struct _CSFV
{ {
UINT uSize; UINT cbSize;
IShellFolder* pshf; IShellFolder* pshf;
IShellView* psvOuter; IShellView* psvOuter;
LPCITEMIDLIST pidlFolder; LPCITEMIDLIST pidl;
LONG lEvents; LONG lEvents;
LPFNVIEWCALLBACK pfnCallback; LPFNVIEWCALLBACK pfnCallback;
FOLDERVIEWMODE fvm; FOLDERVIEWMODE fvm;
@ -365,6 +365,7 @@ HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV pshfvi, IShellView **ppshv);
#define SFVM_GETDEFERREDVIEWSETTINGS 92 /* undocumented */ #define SFVM_GETDEFERREDVIEWSETTINGS 92 /* undocumented */
/* Types and definitions for the SFM_* parameters */ /* Types and definitions for the SFM_* parameters */
#include <pshpack8.h>
#define QCMINFO_PLACE_BEFORE 0 #define QCMINFO_PLACE_BEFORE 0
#define QCMINFO_PLACE_AFTER 1 #define QCMINFO_PLACE_AFTER 1
@ -382,7 +383,7 @@ typedef struct _QCMINFO_IDMAP
typedef struct _QCMINFO typedef struct _QCMINFO
{ {
HMENU hMenu; HMENU hmenu;
UINT indexMenu; UINT indexMenu;
UINT idCmdFirst; UINT idCmdFirst;
UINT idCmdLast; UINT idCmdLast;
@ -403,6 +404,8 @@ typedef struct _TBINFO
UINT uFlags; UINT uFlags;
} TBINFO, *LPTBINFO; } TBINFO, *LPTBINFO;
#include <poppack.h>
/**************************************************************************** /****************************************************************************
* SHShellFolderView_Message API * SHShellFolderView_Message API
*/ */

View File

@ -1979,7 +1979,7 @@ sub parse_c_variable {
} }
$finished = 1; $finished = 1;
} elsif(s/^((?:enum\s+|struct\s+|union\s+)?\w+\b(?:\s+DECLSPEC_ALIGN\(.*?\)|\s*\*)*)\s*(\w+)\s*(\[.*?\]$|:\s*(\d+)$|\{)?//s) { } elsif(s/^((?:enum\s+|struct\s+|union\s+)?\w+\b(?:\s+DECLSPEC_ALIGN\(.*?\)|\s*(?:const\s*)?\*)*)\s*(\w+)\s*(\[.*?\]$|:\s*(\d+)$|\{)?//s) {
$type = "$sign$1"; $type = "$sign$1";
$name = $2; $name = $2;

View File

@ -924,6 +924,7 @@ windef.h
wtypes.h wtypes.h
guiddef.h guiddef.h
shellapi.h shellapi.h
shtypes.h
shlobj.h shlobj.h
%include %include
@ -957,6 +958,7 @@ CLSID
COAUTHIDENTITY COAUTHIDENTITY
COAUTHINFO COAUTHINFO
COSERVERINFO COSERVERINFO
CSFV
DATE DATE
DOUBLE DOUBLE
DRAGINFOA DRAGINFOA
@ -988,6 +990,8 @@ LPBSTRBLOB
LPCABINETSTATE LPCABINETSTATE
LPCITEMIDLIST LPCITEMIDLIST
LPCOLESTR LPCOLESTR
LPCSFV
LPCSHITEMID
LPCY LPCY
LPDECIMAL LPDECIMAL
LPDRAGINFOA LPDRAGINFOA
@ -997,13 +1001,16 @@ LPFILEDESCRIPTORA
LPFILEDESCRIPTORW LPFILEDESCRIPTORW
LPFILEGROUPDESCRIPTORA LPFILEGROUPDESCRIPTORA
LPFILEGROUPDESCRIPTORW LPFILEGROUPDESCRIPTORW
LPFNVIEWCALLBACK
LPGUID LPGUID
LPIDA LPIDA
LPITEMIDLIST LPITEMIDLIST
LPOLESTR LPOLESTR
LPQCMINFO
LPSHChangeDWORDAsIDList LPSHChangeDWORDAsIDList
LPSHChangeProductKeyAsIDList LPSHChangeProductKeyAsIDList
LPSHDESCRIPTIONID LPSHDESCRIPTIONID
LPSHELLDETAILS
LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFOA
LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFOW
LPSHELLFLAGSTATE LPSHELLFLAGSTATE
@ -1013,6 +1020,8 @@ LPSHFILEOPSTRUCTW
LPSHITEMID LPSHITEMID
LPSHNAMEMAPPINGA LPSHNAMEMAPPINGA
LPSHNAMEMAPPINGW LPSHNAMEMAPPINGW
LPSTRRET
LPTBINFO
NOTIFYICONDATAA NOTIFYICONDATAA
NOTIFYICONDATAW NOTIFYICONDATAW
OLECHAR OLECHAR
@ -1023,6 +1032,9 @@ PNOTIFYICONDATAA
PNOTIFYICONDATAW PNOTIFYICONDATAW
PRINTEROP_FLAGS PRINTEROP_FLAGS
PROPID PROPID
QCMINFO
QCMINFO_IDMAP
QCMINFO_IDMAP_PLACEMENT
RemHBITMAP RemHBITMAP
RemHENHMETAFILE RemHENHMETAFILE
RemHGLOBAL RemHGLOBAL
@ -1033,6 +1045,7 @@ SHChangeDWORDAsIDList
SHChangeNotifyEntry SHChangeNotifyEntry
SHChangeProductKeyAsIDList SHChangeProductKeyAsIDList
SHDESCRIPTIONID SHDESCRIPTIONID
SHELLDETAILS
SHELLEXECUTEINFOA SHELLEXECUTEINFOA
SHELLEXECUTEINFOW SHELLEXECUTEINFOW
SHELLFLAGSTATE SHELLFLAGSTATE
@ -1045,6 +1058,9 @@ SHFILEOPSTRUCTW
SHITEMID SHITEMID
SHNAMEMAPPINGA SHNAMEMAPPINGA
SHNAMEMAPPINGW SHNAMEMAPPINGW
STRRET
STRRET_TYPE
TBINFO
UP_BYTE_BLOB UP_BYTE_BLOB
UP_FLAGGED_BYTE_BLOB UP_FLAGGED_BYTE_BLOB
UP_FLAGGED_WORD_BLOB UP_FLAGGED_WORD_BLOB