ReactOS  0.4.14-dev-77-gd9e7c48
windef16.h
Go to the documentation of this file.
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 #ifndef __WINE_WINDEF16_H
24 #define __WINE_WINDEF16_H
25 
26 #ifndef RC_INVOKED
27 #include <stdarg.h>
28 #endif
29 #include <windef.h>
30 #include <winbase.h>
31 #ifndef _NTNDK_
32 #include <exception.h> // ROS Hack
33 #endif
34 /* Standard data types */
35 
36 typedef unsigned short BOOL16;
37 typedef DWORD SEGPTR;
38 
39 typedef UINT16 HANDLE16;
41 
42 typedef UINT16 WPARAM16;
43 typedef INT16 *LPINT16;
44 typedef UINT16 *LPUINT16;
45 
46 typedef WORD CATCHBUF[9];
47 typedef WORD *LPCATCHBUF;
48 
49 #define MAKESEGPTR(seg,off) ((SEGPTR)MAKELONG(off,seg))
50 #define SELECTOROF(ptr) (HIWORD(ptr))
51 #define OFFSETOF(ptr) (LOWORD(ptr))
52 
53 typedef WORD *VA_LIST16;
54 
55 #define __VA_ROUNDED16(type) \
56  ((sizeof(type) + sizeof(WORD) - 1) / sizeof(WORD) * sizeof(WORD))
57 #define VA_ARG16(list,type) \
58  (((list) = (VA_LIST16)((char *)(list) + __VA_ROUNDED16(type))), \
59  *((type *)(void *)((char *)(list) - __VA_ROUNDED16(type))))
60 
61 #define HFILE_ERROR16 ((HFILE16)-1)
62 
63 #define DECLARE_HANDLE16(a) \
64  typedef HANDLE16 a##16; \
65  typedef a##16 *P##a##16; \
66  typedef a##16 *NP##a##16; \
67  typedef a##16 *LP##a##16
68 
69 DECLARE_HANDLE16(HACMDRIVERID);
70 DECLARE_HANDLE16(HACMDRIVER);
71 DECLARE_HANDLE16(HACMOBJ);
72 DECLARE_HANDLE16(HACMSTREAM);
73 DECLARE_HANDLE16(HMETAFILEPICT);
74 
75 DECLARE_HANDLE16(HACCEL);
77 DECLARE_HANDLE16(HBRUSH);
78 DECLARE_HANDLE16(HCOLORSPACE);
81 DECLARE_HANDLE16(HDROP);
82 DECLARE_HANDLE16(HDRVR);
83 DECLARE_HANDLE16(HDWP);
84 DECLARE_HANDLE16(HENHMETAFILE);
91 DECLARE_HANDLE16(HMETAFILE);
92 DECLARE_HANDLE16(HMIDI);
93 DECLARE_HANDLE16(HMIDIIN);
94 DECLARE_HANDLE16(HMIDIOUT);
95 DECLARE_HANDLE16(HMIDISTRM);
96 DECLARE_HANDLE16(HMIXER);
97 DECLARE_HANDLE16(HMIXEROBJ);
98 DECLARE_HANDLE16(HMMIO);
99 DECLARE_HANDLE16(HPALETTE);
100 DECLARE_HANDLE16(HPEN);
101 DECLARE_HANDLE16(HQUEUE);
102 DECLARE_HANDLE16(HRGN);
103 DECLARE_HANDLE16(HRSRC);
104 DECLARE_HANDLE16(HTASK);
105 DECLARE_HANDLE16(HWAVE);
106 DECLARE_HANDLE16(HWAVEIN);
107 DECLARE_HANDLE16(HWAVEOUT);
108 DECLARE_HANDLE16(HWINSTA);
109 DECLARE_HANDLE16(HDESK);
112 DECLARE_HANDLE16(HIC);
113 DECLARE_HANDLE16(HRASCONN);
114 #undef DECLARE_HANDLE16
115 
116 typedef HINSTANCE16 HMODULE16;
120 
121 #include <pshpack1.h>
122 
123 /* The SIZE structure */
124 
125 typedef struct
126 {
129 } SIZE16, *PSIZE16, *LPSIZE16;
130 
131 /* The POINT structure */
132 
133 typedef struct
134 {
138 
139 /* The RECT structure */
140 
141 typedef struct
142 {
147 } RECT16, *LPRECT16;
148 
149 #include <poppack.h>
150 
151 /* Callback function pointers types */
152 
157 typedef INT16 (CALLBACK *PROC16)();
164 
165 #endif /* __WINE_WINDEF16_H */
INT16(CALLBACK * PROC16)()
Definition: windef16.h:157
static HICON
Definition: imagelist.c:84
WORD * VA_LIST16
Definition: windef16.h:53
struct POINT16 * LPPOINT16
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
INT16 * LPINT16
Definition: windef16.h:43
INT16 x
Definition: windef16.h:135
INT16 left
Definition: windef16.h:143
UINT16 HANDLE16
Definition: netiodef.h:47
struct RECT16 * LPRECT16
HICON HCURSOR
Definition: windef.h:284
INT16(CALLBACK * EDITWORDBREAKPROC16)(LPSTR, INT16, INT16, INT16)
Definition: windef16.h:155
char * LPSTR
Definition: xmlstorage.h:182
#define DWORD
Definition: nt_native.h:44
INT16 right
Definition: windef16.h:145
LRESULT(CALLBACK * DRIVERPROC16)(DWORD, HDRVR16, UINT16, LPARAM, LPARAM)
Definition: windef16.h:153
INT16 bottom
Definition: windef16.h:146
DWORD SEGPTR
Definition: windef16.h:37
BOOL16(CALLBACK * GRAYSTRINGPROC16)(HDC16, LPARAM, INT16)
Definition: windef16.h:158
UINT16 HANDLE16
Definition: windef16.h:39
HINSTANCE16 HMODULE16
Definition: windef16.h:116
LONG_PTR LPARAM
Definition: windef.h:208
BOOL16(CALLBACK * DLGPROC16)(HWND16, UINT16, WPARAM16, LPARAM)
Definition: windef16.h:154
unsigned short BOOL16
Definition: windef16.h:36
INT16 y
Definition: windef16.h:136
HANDLE16 HGLOBAL16
Definition: windef16.h:118
LRESULT(CALLBACK * WNDPROC16)(HWND16, UINT16, WPARAM16, LPARAM)
Definition: windef16.h:163
LRESULT(CALLBACK * HOOKPROC16)(INT16, WPARAM16, LPARAM)
Definition: windef16.h:159
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DECLARE_HANDLE16(a)
Definition: windef16.h:63
HANDLE16 HGDIOBJ16
Definition: windef16.h:117
WORD CATCHBUF[9]
Definition: windef16.h:46
INT16 cx
Definition: windef16.h:127
#define VOID
Definition: acefi.h:82
#define LRESULT
Definition: ole.h:14
WORD * LPCATCHBUF
Definition: windef16.h:47
UINT_PTR HKL
Definition: msctf.idl:101
INT16 cy
Definition: windef16.h:128
LRESULT(CALLBACK * FARPROC16)()
Definition: windef16.h:156
LRESULT(CALLBACK * WNDENUMPROC16)(HWND16, LPARAM)
Definition: windef16.h:162
VOID(CALLBACK * TIMERPROC16)(HWND16, UINT16, UINT16, DWORD)
Definition: windef16.h:161
struct POINT16 * PPOINT16
unsigned short UINT16
INT16 top
Definition: windef16.h:144
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
struct SIZE16 * PSIZE16
struct SIZE16 * LPSIZE16
HANDLE16 * LPHANDLE16
Definition: windef16.h:40
HANDLE16 HLOCAL16
Definition: windef16.h:119
static HBITMAP
Definition: button.c:44
BOOL16(CALLBACK * PROPENUMPROC16)(HWND16, SEGPTR, HANDLE16)
Definition: windef16.h:160
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
int HFILE
Definition: windef.h:283
UINT16 WPARAM16
Definition: windef16.h:42
UINT16 * LPUINT16
Definition: windef16.h:44
signed short INT16