2 * Basic type definitions for 16 bit variations on Windows types.
3 * These types are provided mostly to insure compatibility with
7 #ifndef __WINE_WINDEF16_H
8 #define __WINE_WINDEF16_H
12 /* Standard data types */
15 typedef unsigned short UINT16;
16 typedef unsigned short BOOL16;
18 typedef UINT16 HANDLE16;
19 typedef HANDLE16 *LPHANDLE16;
21 typedef UINT16 WPARAM16;
22 typedef INT16 *LPINT16;
23 typedef UINT16 *LPUINT16;
25 #define HFILE_ERROR16 ((HFILE16)-1)
27 #define DECLARE_HANDLE16(a) \
28 typedef HANDLE16 a##16; \
29 typedef a##16 *P##a##16; \
30 typedef a##16 *NP##a##16; \
31 typedef a##16 *LP##a##16
33 DECLARE_HANDLE16(HACMDRIVERID);
34 DECLARE_HANDLE16(HACMDRIVER);
35 DECLARE_HANDLE16(HACMOBJ);
36 DECLARE_HANDLE16(HACMSTREAM);
37 DECLARE_HANDLE16(HMETAFILEPICT);
39 DECLARE_HANDLE16(HACCEL);
40 DECLARE_HANDLE16(HBITMAP);
41 DECLARE_HANDLE16(HBRUSH);
42 DECLARE_HANDLE16(HCOLORSPACE);
43 DECLARE_HANDLE16(HCURSOR);
44 DECLARE_HANDLE16(HDC);
45 DECLARE_HANDLE16(HDROP);
46 DECLARE_HANDLE16(HDRVR);
47 DECLARE_HANDLE16(HDWP);
48 DECLARE_HANDLE16(HENHMETAFILE);
49 DECLARE_HANDLE16(HFILE);
50 DECLARE_HANDLE16(HFONT);
51 DECLARE_HANDLE16(HICON);
52 DECLARE_HANDLE16(HINSTANCE);
53 DECLARE_HANDLE16(HKEY);
54 DECLARE_HANDLE16(HMENU);
55 DECLARE_HANDLE16(HMETAFILE);
56 DECLARE_HANDLE16(HMIDI);
57 DECLARE_HANDLE16(HMIDIIN);
58 DECLARE_HANDLE16(HMIDIOUT);
59 DECLARE_HANDLE16(HMIDISTRM);
60 DECLARE_HANDLE16(HMIXER);
61 DECLARE_HANDLE16(HMIXEROBJ);
62 DECLARE_HANDLE16(HMMIO);
63 DECLARE_HANDLE16(HPALETTE);
64 DECLARE_HANDLE16(HPEN);
65 DECLARE_HANDLE16(HQUEUE);
66 DECLARE_HANDLE16(HRGN);
67 DECLARE_HANDLE16(HRSRC);
68 DECLARE_HANDLE16(HTASK);
69 DECLARE_HANDLE16(HWAVE);
70 DECLARE_HANDLE16(HWAVEIN);
71 DECLARE_HANDLE16(HWAVEOUT);
72 DECLARE_HANDLE16(HWINSTA);
73 DECLARE_HANDLE16(HDESK);
74 DECLARE_HANDLE16(HWND);
75 DECLARE_HANDLE16(HKL);
76 DECLARE_HANDLE16(HIC);
77 DECLARE_HANDLE16(HRASCONN);
78 #undef DECLARE_HANDLE16
80 typedef HINSTANCE16 HMODULE16;
81 typedef HANDLE16 HGDIOBJ16;
82 typedef HANDLE16 HGLOBAL16;
83 typedef HANDLE16 HLOCAL16;
85 /* The SIZE structure */
91 } SIZE16, *PSIZE16, *LPSIZE16;
93 /* The POINT structure */
99 } POINT16, *PPOINT16, *LPPOINT16;
101 /* The RECT structure */
111 #define CONV_SIZE16TO32(s16,s32) \
112 ((s32)->cx = (INT)(s16)->cx, (s32)->cy = (INT)(s16)->cy)
113 #define CONV_SIZE32TO16(s32,s16) \
114 ((s16)->cx = (INT16)(s32)->cx, (s16)->cy = (INT16)(s32)->cy)
116 #define CONV_POINT16TO32(p16,p32) \
117 ((p32)->x = (INT)(p16)->x, (p32)->y = (INT)(p16)->y)
118 #define CONV_POINT32TO16(p32,p16) \
119 ((p16)->x = (INT16)(p32)->x, (p16)->y = (INT16)(p32)->y)
121 #define CONV_RECT16TO32(r16,r32) \
122 ((r32)->left = (INT)(r16)->left, (r32)->top = (INT)(r16)->top, \
123 (r32)->right = (INT)(r16)->right, (r32)->bottom = (INT)(r16)->bottom)
124 #define CONV_RECT32TO16(r32,r16) \
125 ((r16)->left = (INT16)(r32)->left, (r16)->top = (INT16)(r32)->top, \
126 (r16)->right = (INT16)(r32)->right, (r16)->bottom = (INT16)(r32)->bottom)
128 /* Callback function pointers types */
130 typedef LRESULT CALLBACK (*DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
131 typedef BOOL16 CALLBACK (*DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
132 typedef INT16 CALLBACK (*EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
133 typedef LRESULT CALLBACK (*FARPROC16)();
134 typedef INT16 CALLBACK (*PROC16)();
135 typedef BOOL16 CALLBACK (*GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
136 typedef LRESULT CALLBACK (*HOOKPROC16)(INT16,WPARAM16,LPARAM);
137 typedef BOOL16 CALLBACK (*PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
138 typedef VOID CALLBACK (*TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
139 typedef LRESULT CALLBACK (*WNDENUMPROC16)(HWND16,LPARAM);
140 typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
142 #endif /* __WINE_WINDEF16_H */