dmusic/tests: Test IDirectMusic(Port)Download interfaces.
[wine.git] / include / wine / windef16.h
blob40d96ee5706965a19fac7ac069a1650ec857f735
1 /*
2 * Basic type definitions for 16 bit variations on Windows types.
3 * These types are provided mostly to insure compatibility with
4 * 16 bit windows code.
6 * Copyright (C) the Wine project
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #ifndef __WINE_WINDEF16_H
24 #define __WINE_WINDEF16_H
26 #ifndef RC_INVOKED
27 #include <stdarg.h>
28 #endif
29 #include <windef.h>
30 #include <winbase.h>
32 /* Standard data types */
34 typedef unsigned short BOOL16;
35 typedef DWORD SEGPTR;
37 typedef UINT16 HANDLE16;
38 typedef HANDLE16 *LPHANDLE16;
40 typedef UINT16 WPARAM16;
41 typedef INT16 *LPINT16;
42 typedef UINT16 *LPUINT16;
44 typedef WORD CATCHBUF[9];
45 typedef WORD *LPCATCHBUF;
47 #define MAKESEGPTR(seg,off) ((SEGPTR)MAKELONG(off,seg))
48 #define SELECTOROF(ptr) (HIWORD(ptr))
49 #define OFFSETOF(ptr) (LOWORD(ptr))
51 typedef WORD *VA_LIST16;
53 #define __VA_ROUNDED16(type) \
54 ((sizeof(type) + sizeof(WORD) - 1) / sizeof(WORD) * sizeof(WORD))
55 #define VA_ARG16(list,type) \
56 (((list) = (VA_LIST16)((char *)(list) + __VA_ROUNDED16(type))), \
57 *((type *)(void *)((char *)(list) - __VA_ROUNDED16(type))))
59 #define HFILE_ERROR16 ((HFILE16)-1)
61 #define DECLARE_HANDLE16(a) \
62 typedef HANDLE16 a##16; \
63 typedef a##16 *P##a##16; \
64 typedef a##16 *NP##a##16; \
65 typedef a##16 *LP##a##16
67 DECLARE_HANDLE16(HACMDRIVERID);
68 DECLARE_HANDLE16(HACMDRIVER);
69 DECLARE_HANDLE16(HACMOBJ);
70 DECLARE_HANDLE16(HACMSTREAM);
71 DECLARE_HANDLE16(HMETAFILEPICT);
73 DECLARE_HANDLE16(HACCEL);
74 DECLARE_HANDLE16(HBITMAP);
75 DECLARE_HANDLE16(HBRUSH);
76 DECLARE_HANDLE16(HCOLORSPACE);
77 DECLARE_HANDLE16(HCURSOR);
78 DECLARE_HANDLE16(HDC);
79 DECLARE_HANDLE16(HDROP);
80 DECLARE_HANDLE16(HDRVR);
81 DECLARE_HANDLE16(HDWP);
82 DECLARE_HANDLE16(HENHMETAFILE);
83 DECLARE_HANDLE16(HFILE);
84 DECLARE_HANDLE16(HFONT);
85 DECLARE_HANDLE16(HICON);
86 DECLARE_HANDLE16(HINSTANCE);
87 DECLARE_HANDLE16(HKEY);
88 DECLARE_HANDLE16(HMENU);
89 DECLARE_HANDLE16(HMETAFILE);
90 DECLARE_HANDLE16(HMIDI);
91 DECLARE_HANDLE16(HMIDIIN);
92 DECLARE_HANDLE16(HMIDIOUT);
93 DECLARE_HANDLE16(HMIDISTRM);
94 DECLARE_HANDLE16(HMIXER);
95 DECLARE_HANDLE16(HMIXEROBJ);
96 DECLARE_HANDLE16(HMMIO);
97 DECLARE_HANDLE16(HPALETTE);
98 DECLARE_HANDLE16(HPEN);
99 DECLARE_HANDLE16(HQUEUE);
100 DECLARE_HANDLE16(HRGN);
101 DECLARE_HANDLE16(HRSRC);
102 DECLARE_HANDLE16(HTASK);
103 DECLARE_HANDLE16(HWAVE);
104 DECLARE_HANDLE16(HWAVEIN);
105 DECLARE_HANDLE16(HWAVEOUT);
106 DECLARE_HANDLE16(HWINSTA);
107 DECLARE_HANDLE16(HDESK);
108 DECLARE_HANDLE16(HWND);
109 DECLARE_HANDLE16(HKL);
110 DECLARE_HANDLE16(HIC);
111 DECLARE_HANDLE16(HRASCONN);
112 #undef DECLARE_HANDLE16
114 typedef HINSTANCE16 HMODULE16;
115 typedef HANDLE16 HGDIOBJ16;
116 typedef HANDLE16 HGLOBAL16;
117 typedef HANDLE16 HLOCAL16;
119 #include <pshpack1.h>
121 /* The SIZE structure */
123 typedef struct
125 INT16 cx;
126 INT16 cy;
127 } SIZE16, *PSIZE16, *LPSIZE16;
129 /* The POINT structure */
131 typedef struct
133 INT16 x;
134 INT16 y;
135 } POINT16, *PPOINT16, *LPPOINT16;
137 /* The RECT structure */
139 typedef struct
141 INT16 left;
142 INT16 top;
143 INT16 right;
144 INT16 bottom;
145 } RECT16, *LPRECT16;
147 #include <poppack.h>
149 /* Callback function pointers types */
151 typedef LRESULT (CALLBACK *DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
152 typedef BOOL16 (CALLBACK *DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
153 typedef INT16 (CALLBACK *EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
154 typedef BOOL16 (CALLBACK *GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
155 typedef LRESULT (CALLBACK *HOOKPROC16)(INT16,WPARAM16,LPARAM);
156 typedef BOOL16 (CALLBACK *PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
157 typedef VOID (CALLBACK *TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
158 typedef LRESULT (CALLBACK *WNDENUMPROC16)(HWND16,LPARAM);
159 typedef LRESULT (CALLBACK *WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
161 #ifdef WINE_STRICT_PROTOTYPES
162 typedef LRESULT (CALLBACK *FARPROC16)(void);
163 typedef INT16 (CALLBACK *PROC16)(void);
164 #else
165 typedef LRESULT (CALLBACK *FARPROC16)();
166 typedef INT16 (CALLBACK *PROC16)();
167 #endif
169 #endif /* __WINE_WINDEF16_H */