Replaced PTR_SEG_TO_LIN macro by exported MapSL function.
[wine.git] / include / wine / windef16.h
blobcaa6a45ecff1791530e17ca9efdd0631704b40bf
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.
5 */
7 #ifndef __WINE_WINDEF16_H
8 #define __WINE_WINDEF16_H
10 #include "windef.h"
12 /* Standard data types */
14 typedef short INT16;
15 typedef unsigned short UINT16;
16 typedef unsigned short BOOL16;
17 typedef DWORD SEGPTR;
19 typedef UINT16 HANDLE16;
20 typedef HANDLE16 *LPHANDLE16;
22 typedef UINT16 WPARAM16;
23 typedef INT16 *LPINT16;
24 typedef UINT16 *LPUINT16;
26 #define MAKESEGPTR(seg,off) ((SEGPTR)MAKELONG(off,seg))
28 #define HFILE_ERROR16 ((HFILE16)-1)
30 #define DECLARE_HANDLE16(a) \
31 typedef HANDLE16 a##16; \
32 typedef a##16 *P##a##16; \
33 typedef a##16 *NP##a##16; \
34 typedef a##16 *LP##a##16
36 DECLARE_HANDLE16(HACMDRIVERID);
37 DECLARE_HANDLE16(HACMDRIVER);
38 DECLARE_HANDLE16(HACMOBJ);
39 DECLARE_HANDLE16(HACMSTREAM);
40 DECLARE_HANDLE16(HMETAFILEPICT);
42 DECLARE_HANDLE16(HACCEL);
43 DECLARE_HANDLE16(HBITMAP);
44 DECLARE_HANDLE16(HBRUSH);
45 DECLARE_HANDLE16(HCOLORSPACE);
46 DECLARE_HANDLE16(HCURSOR);
47 DECLARE_HANDLE16(HDC);
48 DECLARE_HANDLE16(HDROP);
49 DECLARE_HANDLE16(HDRVR);
50 DECLARE_HANDLE16(HDWP);
51 DECLARE_HANDLE16(HENHMETAFILE);
52 DECLARE_HANDLE16(HFILE);
53 DECLARE_HANDLE16(HFONT);
54 DECLARE_HANDLE16(HICON);
55 DECLARE_HANDLE16(HINSTANCE);
56 DECLARE_HANDLE16(HKEY);
57 DECLARE_HANDLE16(HMENU);
58 DECLARE_HANDLE16(HMETAFILE);
59 DECLARE_HANDLE16(HMIDI);
60 DECLARE_HANDLE16(HMIDIIN);
61 DECLARE_HANDLE16(HMIDIOUT);
62 DECLARE_HANDLE16(HMIDISTRM);
63 DECLARE_HANDLE16(HMIXER);
64 DECLARE_HANDLE16(HMIXEROBJ);
65 DECLARE_HANDLE16(HMMIO);
66 DECLARE_HANDLE16(HPALETTE);
67 DECLARE_HANDLE16(HPEN);
68 DECLARE_HANDLE16(HQUEUE);
69 DECLARE_HANDLE16(HRGN);
70 DECLARE_HANDLE16(HRSRC);
71 DECLARE_HANDLE16(HTASK);
72 DECLARE_HANDLE16(HWAVE);
73 DECLARE_HANDLE16(HWAVEIN);
74 DECLARE_HANDLE16(HWAVEOUT);
75 DECLARE_HANDLE16(HWINSTA);
76 DECLARE_HANDLE16(HDESK);
77 DECLARE_HANDLE16(HWND);
78 DECLARE_HANDLE16(HKL);
79 DECLARE_HANDLE16(HIC);
80 DECLARE_HANDLE16(HRASCONN);
81 #undef DECLARE_HANDLE16
83 typedef HINSTANCE16 HMODULE16;
84 typedef HANDLE16 HGDIOBJ16;
85 typedef HANDLE16 HGLOBAL16;
86 typedef HANDLE16 HLOCAL16;
88 /* The SIZE structure */
90 typedef struct
92 INT16 cx;
93 INT16 cy;
94 } SIZE16, *PSIZE16, *LPSIZE16;
96 /* The POINT structure */
98 typedef struct
100 INT16 x;
101 INT16 y;
102 } POINT16, *PPOINT16, *LPPOINT16;
104 /* The RECT structure */
106 typedef struct
108 INT16 left;
109 INT16 top;
110 INT16 right;
111 INT16 bottom;
112 } RECT16, *LPRECT16;
114 /* Callback function pointers types */
116 typedef LRESULT CALLBACK (*DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
117 typedef BOOL16 CALLBACK (*DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
118 typedef INT16 CALLBACK (*EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
119 typedef LRESULT CALLBACK (*FARPROC16)();
120 typedef INT16 CALLBACK (*PROC16)();
121 typedef BOOL16 CALLBACK (*GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
122 typedef LRESULT CALLBACK (*HOOKPROC16)(INT16,WPARAM16,LPARAM);
123 typedef BOOL16 CALLBACK (*PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
124 typedef VOID CALLBACK (*TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
125 typedef LRESULT CALLBACK (*WNDENUMPROC16)(HWND16,LPARAM);
126 typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
128 #endif /* __WINE_WINDEF16_H */