2000-02-03 02:04:39 +01:00
|
|
|
/*
|
|
|
|
* Basic type definitions for 16 bit variations on Windows types.
|
|
|
|
* These types are provided mostly to insure compatibility with
|
|
|
|
* 16 bit windows code.
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* Copyright (C) the Wine project
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-02-03 02:04:39 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_WINDEF16_H
|
|
|
|
#define __WINE_WINDEF16_H
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#ifndef RC_INVOKED
|
|
|
|
#include <stdarg.h>
|
|
|
|
#endif
|
2003-08-28 23:43:34 +02:00
|
|
|
#include <windef.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <winbase.h>
|
2000-03-24 22:13:57 +01:00
|
|
|
|
2000-02-03 02:04:39 +01:00
|
|
|
/* Standard data types */
|
|
|
|
|
|
|
|
typedef unsigned short BOOL16;
|
2000-11-16 00:41:46 +01:00
|
|
|
typedef DWORD SEGPTR;
|
2000-02-03 02:04:39 +01:00
|
|
|
|
|
|
|
typedef UINT16 HANDLE16;
|
|
|
|
typedef HANDLE16 *LPHANDLE16;
|
|
|
|
|
|
|
|
typedef UINT16 WPARAM16;
|
|
|
|
typedef INT16 *LPINT16;
|
|
|
|
typedef UINT16 *LPUINT16;
|
|
|
|
|
2003-09-17 06:31:27 +02:00
|
|
|
typedef WORD CATCHBUF[9];
|
|
|
|
typedef WORD *LPCATCHBUF;
|
|
|
|
|
2000-12-13 21:20:09 +01:00
|
|
|
#define MAKESEGPTR(seg,off) ((SEGPTR)MAKELONG(off,seg))
|
2003-09-17 06:31:27 +02:00
|
|
|
#define SELECTOROF(ptr) (HIWORD(ptr))
|
|
|
|
#define OFFSETOF(ptr) (LOWORD(ptr))
|
2000-12-13 21:20:09 +01:00
|
|
|
|
2003-08-27 04:20:44 +02:00
|
|
|
typedef WORD *VA_LIST16;
|
|
|
|
|
|
|
|
#define __VA_ROUNDED16(type) \
|
|
|
|
((sizeof(type) + sizeof(WORD) - 1) / sizeof(WORD) * sizeof(WORD))
|
|
|
|
#define VA_ARG16(list,type) \
|
|
|
|
(((list) = (VA_LIST16)((char *)(list) + __VA_ROUNDED16(type))), \
|
|
|
|
*((type *)(void *)((char *)(list) - __VA_ROUNDED16(type))))
|
|
|
|
|
2000-09-27 00:20:14 +02:00
|
|
|
#define HFILE_ERROR16 ((HFILE16)-1)
|
|
|
|
|
2000-02-03 02:04:39 +01:00
|
|
|
#define DECLARE_HANDLE16(a) \
|
|
|
|
typedef HANDLE16 a##16; \
|
|
|
|
typedef a##16 *P##a##16; \
|
|
|
|
typedef a##16 *NP##a##16; \
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef a##16 *LP##a##16
|
2000-02-03 02:04:39 +01:00
|
|
|
|
|
|
|
DECLARE_HANDLE16(HACMDRIVERID);
|
|
|
|
DECLARE_HANDLE16(HACMDRIVER);
|
|
|
|
DECLARE_HANDLE16(HACMOBJ);
|
|
|
|
DECLARE_HANDLE16(HACMSTREAM);
|
|
|
|
DECLARE_HANDLE16(HMETAFILEPICT);
|
|
|
|
|
|
|
|
DECLARE_HANDLE16(HACCEL);
|
|
|
|
DECLARE_HANDLE16(HBITMAP);
|
|
|
|
DECLARE_HANDLE16(HBRUSH);
|
|
|
|
DECLARE_HANDLE16(HCOLORSPACE);
|
|
|
|
DECLARE_HANDLE16(HCURSOR);
|
|
|
|
DECLARE_HANDLE16(HDC);
|
|
|
|
DECLARE_HANDLE16(HDROP);
|
|
|
|
DECLARE_HANDLE16(HDRVR);
|
|
|
|
DECLARE_HANDLE16(HDWP);
|
|
|
|
DECLARE_HANDLE16(HENHMETAFILE);
|
|
|
|
DECLARE_HANDLE16(HFILE);
|
|
|
|
DECLARE_HANDLE16(HFONT);
|
|
|
|
DECLARE_HANDLE16(HICON);
|
|
|
|
DECLARE_HANDLE16(HINSTANCE);
|
|
|
|
DECLARE_HANDLE16(HKEY);
|
|
|
|
DECLARE_HANDLE16(HMENU);
|
|
|
|
DECLARE_HANDLE16(HMETAFILE);
|
|
|
|
DECLARE_HANDLE16(HMIDI);
|
|
|
|
DECLARE_HANDLE16(HMIDIIN);
|
|
|
|
DECLARE_HANDLE16(HMIDIOUT);
|
|
|
|
DECLARE_HANDLE16(HMIDISTRM);
|
|
|
|
DECLARE_HANDLE16(HMIXER);
|
|
|
|
DECLARE_HANDLE16(HMIXEROBJ);
|
|
|
|
DECLARE_HANDLE16(HMMIO);
|
|
|
|
DECLARE_HANDLE16(HPALETTE);
|
|
|
|
DECLARE_HANDLE16(HPEN);
|
|
|
|
DECLARE_HANDLE16(HQUEUE);
|
|
|
|
DECLARE_HANDLE16(HRGN);
|
|
|
|
DECLARE_HANDLE16(HRSRC);
|
|
|
|
DECLARE_HANDLE16(HTASK);
|
|
|
|
DECLARE_HANDLE16(HWAVE);
|
|
|
|
DECLARE_HANDLE16(HWAVEIN);
|
|
|
|
DECLARE_HANDLE16(HWAVEOUT);
|
|
|
|
DECLARE_HANDLE16(HWINSTA);
|
|
|
|
DECLARE_HANDLE16(HDESK);
|
|
|
|
DECLARE_HANDLE16(HWND);
|
|
|
|
DECLARE_HANDLE16(HKL);
|
|
|
|
DECLARE_HANDLE16(HIC);
|
|
|
|
DECLARE_HANDLE16(HRASCONN);
|
|
|
|
#undef DECLARE_HANDLE16
|
|
|
|
|
|
|
|
typedef HINSTANCE16 HMODULE16;
|
|
|
|
typedef HANDLE16 HGDIOBJ16;
|
|
|
|
typedef HANDLE16 HGLOBAL16;
|
|
|
|
typedef HANDLE16 HLOCAL16;
|
|
|
|
|
2003-08-28 23:43:34 +02:00
|
|
|
#include <pshpack1.h>
|
2001-12-05 23:09:33 +01:00
|
|
|
|
2000-02-03 02:04:39 +01:00
|
|
|
/* The SIZE structure */
|
2000-09-27 00:20:14 +02:00
|
|
|
|
2000-02-03 02:04:39 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 cx;
|
|
|
|
INT16 cy;
|
|
|
|
} SIZE16, *PSIZE16, *LPSIZE16;
|
|
|
|
|
|
|
|
/* The POINT structure */
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 x;
|
|
|
|
INT16 y;
|
|
|
|
} POINT16, *PPOINT16, *LPPOINT16;
|
|
|
|
|
|
|
|
/* The RECT structure */
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 left;
|
|
|
|
INT16 top;
|
|
|
|
INT16 right;
|
|
|
|
INT16 bottom;
|
|
|
|
} RECT16, *LPRECT16;
|
|
|
|
|
2003-08-28 23:43:34 +02:00
|
|
|
#include <poppack.h>
|
2001-12-05 23:09:33 +01:00
|
|
|
|
2000-02-03 02:04:39 +01:00
|
|
|
/* Callback function pointers types */
|
|
|
|
|
2002-02-01 00:22:07 +01:00
|
|
|
typedef LRESULT (CALLBACK *DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
|
|
|
|
typedef BOOL16 (CALLBACK *DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
|
|
|
typedef INT16 (CALLBACK *EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
|
|
|
|
typedef BOOL16 (CALLBACK *GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
|
|
|
|
typedef LRESULT (CALLBACK *HOOKPROC16)(INT16,WPARAM16,LPARAM);
|
|
|
|
typedef BOOL16 (CALLBACK *PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
|
|
|
|
typedef VOID (CALLBACK *TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
|
|
|
|
typedef LRESULT (CALLBACK *WNDENUMPROC16)(HWND16,LPARAM);
|
|
|
|
typedef LRESULT (CALLBACK *WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
2000-02-03 02:04:39 +01:00
|
|
|
|
2009-10-06 12:30:49 +02:00
|
|
|
#ifdef WINE_STRICT_PROTOTYPES
|
|
|
|
typedef LRESULT (CALLBACK *FARPROC16)(void);
|
|
|
|
typedef INT16 (CALLBACK *PROC16)(void);
|
|
|
|
#else
|
|
|
|
typedef LRESULT (CALLBACK *FARPROC16)();
|
|
|
|
typedef INT16 (CALLBACK *PROC16)();
|
|
|
|
#endif
|
|
|
|
|
2000-02-03 02:04:39 +01:00
|
|
|
#endif /* __WINE_WINDEF16_H */
|