*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+import "basetsd.h";
+import "guiddef.h";
+
[
uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
version(0.1),
pointer_default(unique)
]
+
interface IWinTypes
{
-/******************** WINE STUFF ********************/
-
-cpp_quote("#include \"basetsd.h\"")
-cpp_quote("#include \"guiddef.h\"")
-
/******************** BASIC WIN32 TYPES ********************/
cpp_quote("#if 0 /* winnt.h */") /* don't redefine these */
typedef long LONG;
typedef unsigned long ULONG;
typedef float FLOAT;
-typedef double DOUBLE;
typedef void *PVOID, *LPVOID;
+typedef DWORD *LPDWORD;
+
typedef char CHAR;
typedef [string] CHAR *LPSTR;
typedef [string] const CHAR *LPCSTR;
typedef boolean BOOLEAN;
+typedef DWORD COLORREF;
+
typedef void *HANDLE;
#define DECLARE_HANDLE(name) typedef void *name
#define DECLARE_WIREM_HANDLE(name) typedef [wire_marshal(wire##name)] void*name
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HKEY);
+DECLARE_HANDLE(HDESK);
+DECLARE_HANDLE(HMF);
+DECLARE_HANDLE(HEMF);
+DECLARE_HANDLE(HPEN);
+DECLARE_HANDLE(HRSRC);
+DECLARE_HANDLE(HSTR);
+DECLARE_HANDLE(HWINSTA);
+DECLARE_HANDLE(HKL);
+DECLARE_HANDLE(HGDIOBJ);
+
+typedef HANDLE HDWP;
+
+typedef LONG_PTR LRESULT;
-typedef double DATE;
typedef LONG HRESULT;
typedef DWORD LCID;
PACL Dacl;
} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
+typedef struct _SECURITY_ATTRIBUTES
+{
+ DWORD nLength;
+ [size_is(nLength)] LPVOID lpSecurityDescriptor;
+ BOOL bInheritHandle;
+} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
+
+typedef struct tagSIZE
+{
+ LONG cx;
+ LONG cy;
+} SIZE, *PSIZE, *LPSIZE;
+typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
+
+typedef struct tagPOINT
+{
+ LONG x;
+ LONG y;
+} POINT, *PPOINT, *LPPOINT;
+
+typedef struct _POINTL
+{
+ LONG x;
+ LONG y;
+} POINTL, *PPOINTL;
+
+typedef struct tagRECT
+{
+ LONG left;
+ LONG top;
+ LONG right;
+ LONG bottom;
+} RECT, *PRECT, *LPRECT;
+typedef const RECT *LPCRECT;
+
+typedef struct _RECTL
+{
+ LONG left;
+ LONG top;
+ LONG right;
+ LONG bottom;
+} RECTL, *PRECTL, *LPRECTL;
+typedef const RECTL *LPCRECTL;
+
+typedef UINT_PTR WPARAM;
+typedef LONG_PTR LPARAM;
+
cpp_quote("#endif /* winnt.h */")
+cpp_quote("#ifdef _MSC_VER") /* for IDL and MSVC only */
+typedef double DOUBLE;
+cpp_quote("#else")
+cpp_quote("typedef double DECLSPEC_ALIGN(8) DOUBLE;")
+cpp_quote("#endif")
+
cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
cpp_quote("#define _PALETTEENTRY_DEFINED")
typedef struct tagPALETTEENTRY {
} FILETIME, *PFILETIME, *LPFILETIME;
cpp_quote("#endif")
+cpp_quote("#ifndef _TEXTMETRIC_DEFINED")
+cpp_quote("#define _TEXTMETRIC_DEFINED")
+typedef struct tagTEXTMETRICA
+{
+ LONG tmHeight;
+ LONG tmAscent;
+ LONG tmDescent;
+ LONG tmInternalLeading;
+ LONG tmExternalLeading;
+ LONG tmAveCharWidth;
+ LONG tmMaxCharWidth;
+ LONG tmWeight;
+ LONG tmOverhang;
+ LONG tmDigitizedAspectX;
+ LONG tmDigitizedAspectY;
+ BYTE tmFirstChar;
+ BYTE tmLastChar;
+ BYTE tmDefaultChar;
+ BYTE tmBreakChar;
+ BYTE tmItalic;
+ BYTE tmUnderlined;
+ BYTE tmStruckOut;
+ BYTE tmPitchAndFamily;
+ BYTE tmCharSet;
+} TEXTMETRICA, *LPTEXTMETRICA, *PTEXTMETRICA;
+
+typedef struct tagTEXTMETRICW
+{
+ LONG tmHeight;
+ LONG tmAscent;
+ LONG tmDescent;
+ LONG tmInternalLeading;
+ LONG tmExternalLeading;
+ LONG tmAveCharWidth;
+ LONG tmMaxCharWidth;
+ LONG tmWeight;
+ LONG tmOverhang;
+ LONG tmDigitizedAspectX;
+ LONG tmDigitizedAspectY;
+ WCHAR tmFirstChar;
+ WCHAR tmLastChar;
+ WCHAR tmDefaultChar;
+ WCHAR tmBreakChar;
+ BYTE tmItalic;
+ BYTE tmUnderlined;
+ BYTE tmStruckOut;
+ BYTE tmPitchAndFamily;
+ BYTE tmCharSet;
+} TEXTMETRICW, *LPTEXTMETRICW, *PTEXTMETRICW;
+cpp_quote("#endif")
+
/******************** BASIC COM/OLE TYPES ********************/
typedef WCHAR OLECHAR;
typedef [string] OLECHAR *LPOLESTR;
typedef [string] const OLECHAR *LPCOLESTR;
-cpp_quote("#ifndef __WINE__")
-cpp_quote("#define OLESTR(str) WINE_UNICODE_TEXT(str)")
+cpp_quote("#ifndef __WINESRC__")
+cpp_quote("#define OLESTR(str) L##str")
cpp_quote("#endif")
-/* from Wine's pre-WIDL wtypes.h */
-/* FIXME: does not belong here */
-typedef CHAR OLECHAR16;
-typedef LPSTR LPOLESTR16;
-typedef LPCSTR LPCOLESTR16;
-/* quoted because if BSTR16 is ever used in IDL files,
- * it'll probably need some wire_marshal stuff too,
- * and quoting these will detect any such necessity */
-cpp_quote("typedef OLECHAR16 *BSTR16;")
-cpp_quote("typedef BSTR16 *LPBSTR16;")
-cpp_quote("#define OLESTR16(x) x")
-
typedef LONG SCODE;
typedef struct _COAUTHIDENTITY {
DWORD dwCapabilities;
} COAUTHINFO;
-/* FIXME: COSERVERINFO was in Wine's pre-WIDL wtypes.h, but should be in objidl.idl */
-typedef struct _COSERVERINFO {
- DWORD dwReserved1;
- LPWSTR pwszName;
- COAUTHINFO *pAuthInfo;
- DWORD dwReserved2;
-} COSERVERINFO;
+typedef enum tagMEMCTX {
+ MEMCTX_TASK = 1,
+ MEMCTX_SHARED = 2,
+ MEMCTX_MACSYSTEM = 3,
+ MEMCTX_UNKNOWN = -1,
+ MEMCTX_SAME = -2
+} MEMCTX;
+
+cpp_quote("#ifndef _ROT_COMPARE_MAX_DEFINED")
+cpp_quote("#define _ROT_COMPARE_MAX_DEFINED")
+cpp_quote("#define ROT_COMPARE_MAX 2048")
+cpp_quote("#endif")
cpp_quote("#ifndef _ROTFLAGS_DEFINED")
cpp_quote("#define _ROTFLAGS_DEFINED")
/******************** GDI TYPES ********************/
-const unsigned long WDT_INPROC_CALL = 0x48746457;
-const unsigned long WDT_REMOTE_CALL = 0x52746457;
+const unsigned long WDT_INPROC_CALL = 0x48746457;
+const unsigned long WDT_REMOTE_CALL = 0x52746457;
+const unsigned long WDT_INPROC64_CALL = 0x50746457;
typedef union _userCLIPFORMAT switch(long fContext) u {
case WDT_INPROC_CALL: DWORD dwValue;
cpp_quote("#endif")
DECLARE_WIREM_HANDLE(HMETAFILEPICT);
-/******************** GUID TYPES ********************/
+typedef union _RemotableHandle switch (long fContext) u
+{
+ case WDT_INPROC_CALL: long hInproc;
+ case WDT_REMOTE_CALL: long hRemote;
+} RemotableHandle;
+
+typedef [unique] RemotableHandle *wireHACCEL;
+typedef [unique] RemotableHandle *wireHBRUSH;
+typedef [unique] RemotableHandle *wireHDC;
+typedef [unique] RemotableHandle *wireHFONT;
+typedef [unique] RemotableHandle *wireHICON;
+typedef [unique] RemotableHandle *wireHMENU;
+typedef [unique] RemotableHandle *wireHWND;
+
+cpp_quote("#if 0") /* for IDL only (C/C++ defs are in windef.h) */
+DECLARE_WIREM_HANDLE(HACCEL);
+DECLARE_WIREM_HANDLE(HBRUSH);
+DECLARE_WIREM_HANDLE(HDC);
+DECLARE_WIREM_HANDLE(HFONT);
+DECLARE_WIREM_HANDLE(HICON);
+DECLARE_WIREM_HANDLE(HMENU);
+DECLARE_WIREM_HANDLE(HWND);
+
+typedef HICON HCURSOR;
+
+typedef struct tagMSG
+{
+ HWND hwnd;
+ UINT message;
+ WPARAM wParam;
+ LPARAM lParam;
+ DWORD time;
+ POINT pt;
+} MSG, *PMSG, *NPMSG, *LPMSG;
-cpp_quote("#ifndef GUID_DEFINED")
-cpp_quote("#define GUID_DEFINED")
-typedef struct _GUID {
- DWORD Data1;
- WORD Data2;
- WORD Data3;
- BYTE Data4[8];
-} GUID;
cpp_quote("#endif")
-cpp_quote("#if 0 /* guiddef.h */")
-typedef GUID *LPGUID;
-
-typedef GUID IID;
-typedef IID *LPIID;
-
-typedef GUID CLSID;
-typedef CLSID *LPCLSID;
-
-typedef GUID FMTID;
-typedef FMTID *LPFMTID;
+/******************** GUID TYPES ********************/
cpp_quote("#if 0") /* for IDL only (C/C++ defs are in guiddef.h) */
typedef GUID *REFGUID;
typedef FMTID *REFFMTID;
cpp_quote("#endif")
-cpp_quote("#endif /* guiddef.h */")
-
/******************** MISC TYPES ********************/
typedef enum tagDVASPECT {
STGMOVE_SHALLOWCOPY = 2
} STGMOVE;
+typedef enum tagSTATFLAG {
+ STATFLAG_DEFAULT = 0,
+ STATFLAG_NONAME = 1,
+ STATFLAG_NOOPEN = 2
+} STATFLAG;
+
/******************** OLE Automation ********************/
+cpp_quote("#ifdef _MSC_VER") /* for IDL and MSVC only */
+typedef double DATE;
+cpp_quote("#else")
+cpp_quote("typedef double DECLSPEC_ALIGN(8) DATE;")
+cpp_quote("#endif")
+
cpp_quote("#if 0") /* for IDL only */
typedef struct tagCY {
LONGLONG int64;
} CY;
cpp_quote("#else") /* C/C++ defs */
+cpp_quote("#ifndef _tagCY_DEFINED")
+cpp_quote("#define _tagCY_DEFINED")
cpp_quote("typedef union tagCY {")
cpp_quote(" struct {")
cpp_quote("#ifdef WORDS_BIGENDIAN")
cpp_quote(" LONGLONG int64;")
cpp_quote("} CY;")
cpp_quote("#endif")
+cpp_quote("#endif")
typedef CY *LPCY;
+cpp_quote("#if 0") /* for IDL only */
typedef struct tagDEC {
USHORT wReserved;
BYTE scale;
ULONG Hi32;
ULONGLONG Lo64;
} DECIMAL;
+cpp_quote("#else") /* C/C++ defs */
+cpp_quote("typedef struct tagDEC {")
+cpp_quote(" USHORT wReserved;")
+cpp_quote(" union {")
+cpp_quote(" struct {")
+cpp_quote(" BYTE scale;")
+cpp_quote(" BYTE sign;")
+cpp_quote(" } DUMMYSTRUCTNAME;")
+cpp_quote(" USHORT signscale;")
+cpp_quote(" } DUMMYUNIONNAME;")
+cpp_quote(" ULONG Hi32;")
+cpp_quote(" union {")
+cpp_quote(" struct {")
+cpp_quote("#ifdef WORDS_BIGENDIAN")
+cpp_quote(" ULONG Mid32;")
+cpp_quote(" ULONG Lo32;")
+cpp_quote("#else")
+cpp_quote(" ULONG Lo32;")
+cpp_quote(" ULONG Mid32;")
+cpp_quote("#endif")
+cpp_quote(" } DUMMYSTRUCTNAME1;")
+cpp_quote(" ULONGLONG Lo64;")
+cpp_quote(" } DUMMYUNIONNAME1;")
+cpp_quote("} DECIMAL;")
+cpp_quote("#endif")
+cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
+cpp_quote("#define DECIMAL_SETZERO(d) do{ memset(((char*)&(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u + sizeof(USHORT)); }while (0)")
+
typedef DECIMAL *LPDECIMAL;
typedef [unique] FLAGGED_WORD_BLOB *wireBSTR;
[size_is(cbSize)] BYTE *pData;
} BSTRBLOB, *LPBSTRBLOB;
+cpp_quote("#ifndef _tagBLOB_DEFINED")
+cpp_quote("#define _tagBLOB_DEFINED")
+cpp_quote("#define _BLOB_DEFINED")
+cpp_quote("#define _LPBLOB_DEFINED")
typedef struct tagBLOB {
ULONG cbSize;
[size_is(cbSize)] BYTE *pBlobData;
} BLOB, *LPBLOB;
+cpp_quote("#endif")
typedef struct tagCLIPDATA {
ULONG cbSize;
VT_LPSTR = 30,
VT_LPWSTR = 31,
VT_RECORD = 36,
+ VT_INT_PTR = 37,
+ VT_UINT_PTR = 38,
VT_FILETIME = 64,
VT_BLOB = 65,
VT_STREAM = 66,
VT_BLOB_OBJECT = 70,
VT_CF = 71,
VT_CLSID = 72,
+ VT_VERSIONED_STREAM= 73,
VT_BSTR_BLOB = 0x0fff,
VT_VECTOR = 0x1000,
VT_ARRAY = 0x2000,
VT_TYPEMASK = 0x0fff
};
+typedef struct tagCSPLATFORM
+{
+ DWORD dwPlatformId;
+ DWORD dwVersionHi;
+ DWORD dwVersionLo;
+ DWORD dwProcessorArch;
+} CSPLATFORM;
+
+typedef struct tagQUERYCONTEXT
+{
+ DWORD dwContext;
+ CSPLATFORM Platform;
+ LCID Locale;
+ DWORD dwVersionHi;
+ DWORD dwVersionLo;
+} QUERYCONTEXT;
+
+typedef [v1_enum] enum tagTYSPEC
+{
+ TYSPEC_CLSID,
+ TYSPEC_FILEEXT,
+ TYSPEC_MIMETYPE,
+ TYSPEC_PROGID,
+ TYSPEC_FILENAME,
+ TYSPEC_PACKAGENAME,
+ TYSPEC_OBJECTID
+} TYSPEC;
+
+typedef union switch(DWORD tyspec)
+{
+ case TYSPEC_CLSID:
+ CLSID clsid;
+ case TYSPEC_FILEEXT:
+ LPOLESTR pFileExt;
+ case TYSPEC_MIMETYPE:
+ LPOLESTR pMimeType;
+ case TYSPEC_PROGID:
+ LPOLESTR pProgId;
+ case TYSPEC_FILENAME:
+ LPOLESTR pFileName;
+ case TYSPEC_PACKAGENAME:
+ struct
+ {
+ LPOLESTR pPackageName;
+ GUID PolicyId;
+ } ByName;
+ case TYSPEC_OBJECTID:
+ struct
+ {
+ GUID ObjectId;
+ GUID PolicyId;
+ } ByObjectId;
+} uCLSSPEC;
+
} /* interface IWinTypes */