Release 941210
[wine/multimedia.git] / include / wintypes.h
blobda99fed7d5c8129d53e7570ea57efed2273afd69
1 #ifndef __WINE_WINTYPES_H
2 #define __WINE_WINTYPES_H
4 typedef short INT;
5 typedef unsigned short UINT;
6 typedef unsigned short WORD;
7 typedef unsigned long DWORD;
8 typedef unsigned short BOOL;
9 typedef unsigned char BYTE;
10 typedef long LONG;
11 typedef UINT WPARAM;
12 typedef LONG LPARAM;
13 typedef LONG LRESULT;
14 typedef WORD HANDLE;
15 typedef DWORD HHOOK;
16 typedef char *LPSTR;
17 typedef const char *LPCSTR;
18 typedef char *NPSTR;
19 typedef INT *LPINT;
20 typedef UINT *LPUINT;
21 typedef WORD *LPWORD;
22 typedef DWORD *LPDWORD;
23 typedef LONG *LPLONG;
24 typedef void *LPVOID;
25 typedef long (*FARPROC)();
26 typedef FARPROC DLGPROC;
27 typedef int CATCHBUF[9];
28 typedef int *LPCATCHBUF;
29 typedef FARPROC HOOKPROC;
31 #define DECLARE_HANDLE(a) typedef HANDLE a;
33 DECLARE_HANDLE(HTASK);
34 DECLARE_HANDLE(HDRVR);
35 DECLARE_HANDLE(HWND);
36 DECLARE_HANDLE(HDC);
37 DECLARE_HANDLE(HCLASS);
38 DECLARE_HANDLE(HCURSOR);
39 DECLARE_HANDLE(HFONT);
40 DECLARE_HANDLE(HPEN);
41 DECLARE_HANDLE(HRGN);
42 DECLARE_HANDLE(HPALETTE);
43 DECLARE_HANDLE(HICON);
44 DECLARE_HANDLE(HINSTANCE);
45 DECLARE_HANDLE(HMENU);
46 DECLARE_HANDLE(HBITMAP);
47 DECLARE_HANDLE(HBRUSH);
48 DECLARE_HANDLE(LOCALHANDLE);
49 DECLARE_HANDLE(HMETAFILE);
50 DECLARE_HANDLE(HDWP);
51 DECLARE_HANDLE(HDROP);
53 #define TRUE 1
54 #define FALSE 0
55 #define CW_USEDEFAULT ((INT)0x8000)
56 #define FAR
57 #define NEAR
58 #define PASCAL
59 #define VOID void
60 #define WINAPI PASCAL
61 #define CALLBACK PASCAL
63 #ifndef NULL
64 #define NULL (void *)0
65 #endif
67 #ifdef WINELIB
68 #define WINE_PACKED
69 #else
70 #define WINE_PACKED __attribute__ ((packed))
71 #endif
73 #pragma pack(1)
75 #define LOBYTE(w) ((BYTE)(w))
76 #define HIBYTE(w) ((BYTE)((UINT)(w) >> 8))
78 #define LOWORD(l) ((WORD)(l))
79 #define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
81 #define MAKELONG(low, high) ((LONG)(((WORD)(low)) | \
82 (((DWORD)((WORD)(high))) << 16)))
84 #ifndef max
85 #define max(a,b) (((a) > (b)) ? (a) : (b))
86 #endif
88 #ifndef min
89 #define min(a,b) (((a) < (b)) ? (a) : (b))
90 #endif
92 #endif /* __WINE_WINTYPES_H */