Ignore setsockopt calls that make the size of the receive buffer too
[wine] / include / wine / windef16.h
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
7 #ifndef __WINE_WINDEF16_H
8 #define __WINE_WINDEF16_H
9
10 #include "windef.h"
11
12 /* Standard data types */
13
14 typedef short           INT16;
15 typedef unsigned short  UINT16;
16 typedef unsigned short  BOOL16;
17
18 typedef UINT16          HANDLE16;
19 typedef HANDLE16       *LPHANDLE16;
20
21 typedef UINT16          WPARAM16;
22 typedef INT16          *LPINT16;
23 typedef UINT16         *LPUINT16;
24
25 #define HFILE_ERROR16   ((HFILE16)-1)
26
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 
32
33 DECLARE_HANDLE16(HACMDRIVERID);
34 DECLARE_HANDLE16(HACMDRIVER);
35 DECLARE_HANDLE16(HACMOBJ);
36 DECLARE_HANDLE16(HACMSTREAM);
37 DECLARE_HANDLE16(HMETAFILEPICT);
38
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
79
80 typedef HINSTANCE16 HMODULE16;
81 typedef HANDLE16 HGDIOBJ16;
82 typedef HANDLE16 HGLOBAL16;
83 typedef HANDLE16 HLOCAL16;
84
85 /* The SIZE structure */
86
87 typedef struct
88 {
89     INT16  cx;
90     INT16  cy;
91 } SIZE16, *PSIZE16, *LPSIZE16;
92
93 /* The POINT structure */
94
95 typedef struct
96 {
97     INT16  x;
98     INT16  y;
99 } POINT16, *PPOINT16, *LPPOINT16;
100
101 /* The RECT structure */
102
103 typedef struct
104 {
105     INT16  left;
106     INT16  top;
107     INT16  right;
108     INT16  bottom;
109 } RECT16, *LPRECT16;
110
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)
115
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)
120
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)
127
128 /* Callback function pointers types */
129
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);
141
142 #endif /* __WINE_WINDEF16_H */