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 | *
|
---|
6 | * Copyright (C) the Wine project
|
---|
7 | *
|
---|
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.
|
---|
12 | *
|
---|
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.
|
---|
17 | *
|
---|
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
|
---|
21 | */
|
---|
22 |
|
---|
23 | /*
|
---|
24 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
25 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
26 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
27 | * a choice of LGPL license versions is made available with the language indicating
|
---|
28 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
29 | * of the LGPL is applied is otherwise unspecified.
|
---|
30 | */
|
---|
31 |
|
---|
32 | #ifndef __WINE_WINDEF16_H
|
---|
33 | #define __WINE_WINDEF16_H
|
---|
34 |
|
---|
35 | #ifndef RC_INVOKED
|
---|
36 | #include <stdarg.h>
|
---|
37 | #endif
|
---|
38 | #include <windef.h>
|
---|
39 | #include <winbase.h>
|
---|
40 |
|
---|
41 | /* Standard data types */
|
---|
42 |
|
---|
43 | typedef unsigned short BOOL16;
|
---|
44 | typedef DWORD SEGPTR;
|
---|
45 |
|
---|
46 | typedef UINT16 HANDLE16;
|
---|
47 | typedef HANDLE16 *LPHANDLE16;
|
---|
48 |
|
---|
49 | typedef UINT16 WPARAM16;
|
---|
50 | typedef INT16 *LPINT16;
|
---|
51 | typedef UINT16 *LPUINT16;
|
---|
52 |
|
---|
53 | typedef WORD CATCHBUF[9];
|
---|
54 | typedef WORD *LPCATCHBUF;
|
---|
55 |
|
---|
56 | #define MAKESEGPTR(seg,off) ((SEGPTR)MAKELONG(off,seg))
|
---|
57 | #define SELECTOROF(ptr) (HIWORD(ptr))
|
---|
58 | #define OFFSETOF(ptr) (LOWORD(ptr))
|
---|
59 |
|
---|
60 | typedef WORD *VA_LIST16;
|
---|
61 |
|
---|
62 | #define __VA_ROUNDED16(type) \
|
---|
63 | ((sizeof(type) + sizeof(WORD) - 1) / sizeof(WORD) * sizeof(WORD))
|
---|
64 | #define VA_ARG16(list,type) \
|
---|
65 | (((list) = (VA_LIST16)((char *)(list) + __VA_ROUNDED16(type))), \
|
---|
66 | *((type *)(void *)((char *)(list) - __VA_ROUNDED16(type))))
|
---|
67 |
|
---|
68 | #define HFILE_ERROR16 ((HFILE16)-1)
|
---|
69 |
|
---|
70 | #define DECLARE_HANDLE16(a) \
|
---|
71 | typedef HANDLE16 a##16; \
|
---|
72 | typedef a##16 *P##a##16; \
|
---|
73 | typedef a##16 *NP##a##16; \
|
---|
74 | typedef a##16 *LP##a##16
|
---|
75 |
|
---|
76 | DECLARE_HANDLE16(HACMDRIVERID);
|
---|
77 | DECLARE_HANDLE16(HACMDRIVER);
|
---|
78 | DECLARE_HANDLE16(HACMOBJ);
|
---|
79 | DECLARE_HANDLE16(HACMSTREAM);
|
---|
80 | DECLARE_HANDLE16(HMETAFILEPICT);
|
---|
81 |
|
---|
82 | DECLARE_HANDLE16(HACCEL);
|
---|
83 | DECLARE_HANDLE16(HBITMAP);
|
---|
84 | DECLARE_HANDLE16(HBRUSH);
|
---|
85 | DECLARE_HANDLE16(HCOLORSPACE);
|
---|
86 | DECLARE_HANDLE16(HCURSOR);
|
---|
87 | DECLARE_HANDLE16(HDC);
|
---|
88 | DECLARE_HANDLE16(HDROP);
|
---|
89 | DECLARE_HANDLE16(HDRVR);
|
---|
90 | DECLARE_HANDLE16(HDWP);
|
---|
91 | DECLARE_HANDLE16(HENHMETAFILE);
|
---|
92 | DECLARE_HANDLE16(HFILE);
|
---|
93 | DECLARE_HANDLE16(HFONT);
|
---|
94 | DECLARE_HANDLE16(HICON);
|
---|
95 | DECLARE_HANDLE16(HINSTANCE);
|
---|
96 | DECLARE_HANDLE16(HKEY);
|
---|
97 | DECLARE_HANDLE16(HMENU);
|
---|
98 | DECLARE_HANDLE16(HMETAFILE);
|
---|
99 | DECLARE_HANDLE16(HMIDI);
|
---|
100 | DECLARE_HANDLE16(HMIDIIN);
|
---|
101 | DECLARE_HANDLE16(HMIDIOUT);
|
---|
102 | DECLARE_HANDLE16(HMIDISTRM);
|
---|
103 | DECLARE_HANDLE16(HMIXER);
|
---|
104 | DECLARE_HANDLE16(HMIXEROBJ);
|
---|
105 | DECLARE_HANDLE16(HMMIO);
|
---|
106 | DECLARE_HANDLE16(HPALETTE);
|
---|
107 | DECLARE_HANDLE16(HPEN);
|
---|
108 | DECLARE_HANDLE16(HQUEUE);
|
---|
109 | DECLARE_HANDLE16(HRGN);
|
---|
110 | DECLARE_HANDLE16(HRSRC);
|
---|
111 | DECLARE_HANDLE16(HTASK);
|
---|
112 | DECLARE_HANDLE16(HWAVE);
|
---|
113 | DECLARE_HANDLE16(HWAVEIN);
|
---|
114 | DECLARE_HANDLE16(HWAVEOUT);
|
---|
115 | DECLARE_HANDLE16(HWINSTA);
|
---|
116 | DECLARE_HANDLE16(HDESK);
|
---|
117 | DECLARE_HANDLE16(HWND);
|
---|
118 | DECLARE_HANDLE16(HKL);
|
---|
119 | DECLARE_HANDLE16(HIC);
|
---|
120 | DECLARE_HANDLE16(HRASCONN);
|
---|
121 | #undef DECLARE_HANDLE16
|
---|
122 |
|
---|
123 | typedef HINSTANCE16 HMODULE16;
|
---|
124 | typedef HANDLE16 HGDIOBJ16;
|
---|
125 | typedef HANDLE16 HGLOBAL16;
|
---|
126 | typedef HANDLE16 HLOCAL16;
|
---|
127 |
|
---|
128 | #include <pshpack1.h>
|
---|
129 |
|
---|
130 | /* The SIZE structure */
|
---|
131 |
|
---|
132 | typedef struct
|
---|
133 | {
|
---|
134 | INT16 cx;
|
---|
135 | INT16 cy;
|
---|
136 | } SIZE16, *PSIZE16, *LPSIZE16;
|
---|
137 |
|
---|
138 | /* The POINT structure */
|
---|
139 |
|
---|
140 | typedef struct
|
---|
141 | {
|
---|
142 | INT16 x;
|
---|
143 | INT16 y;
|
---|
144 | } POINT16, *PPOINT16, *LPPOINT16;
|
---|
145 |
|
---|
146 | /* The RECT structure */
|
---|
147 |
|
---|
148 | typedef struct
|
---|
149 | {
|
---|
150 | INT16 left;
|
---|
151 | INT16 top;
|
---|
152 | INT16 right;
|
---|
153 | INT16 bottom;
|
---|
154 | } RECT16, *LPRECT16;
|
---|
155 |
|
---|
156 | #include <poppack.h>
|
---|
157 |
|
---|
158 | /* Callback function pointers types */
|
---|
159 |
|
---|
160 | typedef LRESULT (CALLBACK *DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
|
---|
161 | typedef BOOL16 (CALLBACK *DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
---|
162 | typedef INT16 (CALLBACK *EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
|
---|
163 | typedef LRESULT (CALLBACK *FARPROC16)();
|
---|
164 | typedef INT16 (CALLBACK *PROC16)();
|
---|
165 | typedef BOOL16 (CALLBACK *GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
|
---|
166 | typedef LRESULT (CALLBACK *HOOKPROC16)(INT16,WPARAM16,LPARAM);
|
---|
167 | typedef BOOL16 (CALLBACK *PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
|
---|
168 | typedef VOID (CALLBACK *TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
|
---|
169 | typedef LRESULT (CALLBACK *WNDENUMPROC16)(HWND16,LPARAM);
|
---|
170 | typedef LRESULT (CALLBACK *WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
---|
171 |
|
---|
172 | #endif /* __WINE_WINDEF16_H */
|
---|