Fixed wownt32.h to make it usable from inside Wine, and use it to
avoid some duplication of the handle conversion macros.
This commit is contained in:
parent
11e3523949
commit
0ca051e555
|
@ -25,6 +25,7 @@
|
|||
#include "wingdi.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winuser.h"
|
||||
#include "winerror.h"
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "wingdi.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "cursoricon.h"
|
||||
#include "controls.h"
|
||||
#include "user.h"
|
||||
|
|
|
@ -23,10 +23,7 @@
|
|||
|
||||
#include "dlgs.h"
|
||||
#include "wine/windef16.h"
|
||||
|
||||
/* handle conversions */
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
#include "wownt32.h"
|
||||
|
||||
/*---------------- 16-bit ----------------*/
|
||||
extern HINSTANCE16 COMMDLG_hInstance;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/wingdi16.h"
|
||||
#include "gdi.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -29,20 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
|
|||
#define HGDIOBJ_32(handle16) ((HGDIOBJ)(ULONG_PTR)(handle16))
|
||||
#define HGDIOBJ_16(handle32) ((HGDIOBJ16)(ULONG_PTR)(handle32))
|
||||
|
||||
#define HDC_32(hdc16) ((HDC)HGDIOBJ_32(hdc16))
|
||||
#define HRGN_32(hrgn16) ((HRGN)HGDIOBJ_32(hrgn16))
|
||||
#define HBRUSH_32(hbrush16) ((HBRUSH)HGDIOBJ_32(hbrush16))
|
||||
#define HBITMAP_32(hbitmap16) ((HBITMAP)HGDIOBJ_32(hbitmap16))
|
||||
#define HPALETTE_32(hpalette16) ((HPALETTE)HGDIOBJ_32(hpalette16))
|
||||
|
||||
#define HDC_16(hdc) ((HDC16)HGDIOBJ_16(hdc))
|
||||
#define HPEN_16(hpen) ((HPEN16)HGDIOBJ_16(hpen))
|
||||
#define HRGN_16(hrgn) ((HRGN16)HGDIOBJ_16(hrgn))
|
||||
#define HFONT_16(hfont) ((HFONT16)HGDIOBJ_16(hfont))
|
||||
#define HBRUSH_16(hbrush) ((HBRUSH16)HGDIOBJ_16(hbrush))
|
||||
#define HBITMAP_16(hbitmap) ((HBITMAP16)HGDIOBJ_16(hbitmap))
|
||||
#define HPALETTE_16(hpalette) ((HPALETTE16)HGDIOBJ_16(hpalette))
|
||||
|
||||
|
||||
/* convert a LOGFONT16 to a LOGFONTW */
|
||||
static void logfont_16_to_W( const LOGFONT16 *font16, LPLOGFONTW font32 )
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <errno.h>
|
||||
#include "wine/winbase16.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "win16drv/win16drv.h"
|
||||
#include "wine/debug.h"
|
||||
#include "bitmap.h"
|
||||
|
@ -63,8 +64,6 @@ extern LONG CALLBACK PRTDRV_CallTo16_long_llwll (FARPROC16,LONG,LONG,WORD,LONG,
|
|||
/* ### stop build ### */
|
||||
|
||||
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
|
||||
#define MAX_PRINTER_DRIVERS 16
|
||||
static LOADED_PRINTER_DRIVER *gapLoadedPrinterDrivers[MAX_PRINTER_DRIVERS];
|
||||
|
||||
|
|
|
@ -29,12 +29,10 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(msvideo);
|
||||
|
||||
/* handle16 --> handle conversions */
|
||||
#define HDC_32(h16) ((HDC)(ULONG_PTR)(h16))
|
||||
#define HDRAWDIB_32(h16) ((HDRAWDIB)(ULONG_PTR)(h16))
|
||||
#define HIC_32(h16) ((HIC)(ULONG_PTR)(h16))
|
||||
|
||||
/* handle --> handle16 conversions */
|
||||
#define HDC_16(h32) (LOWORD(h32))
|
||||
#define HDRAWDIB_16(h32) (LOWORD(h32))
|
||||
#define HIC_16(h32) (LOWORD(h32))
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ void MSVIDEO_UnmapMsg16To32(UINT msg, LPVOID lpv, LPDWORD lParam1, LPDWORD lPara
|
|||
LRESULT MSVIDEO_SendMessage(HIC hic, UINT msg, DWORD lParam1, DWORD lParam2, BOOL bFrom32);
|
||||
|
||||
#define HDRVR_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define __WINE_VFW16_H
|
||||
|
||||
#include "vfw.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/windef16.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -117,10 +118,6 @@ HIC16 VFWAPI ICOpen16(DWORD,DWORD,UINT16);
|
|||
HIC16 VFWAPI ICOpenFunction16(DWORD,DWORD,UINT16,FARPROC16);
|
||||
LRESULT VFWAPI ICSendMessage16(HIC16,UINT16,DWORD,DWORD);
|
||||
|
||||
/* handle <-> handle16 conversions */
|
||||
#define HPALETTE_32(h16) ((HPALETTE)(ULONG_PTR)(h16))
|
||||
#define HPALETTE_16(h32) (LOWORD(h32))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "wownt32.h"
|
||||
|
||||
#include "wine/obj_clientserver.h"
|
||||
#include "wine/winbase16.h"
|
||||
|
@ -48,10 +49,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(accel);
|
||||
|
||||
#define HACCEL_16(h32) (LOWORD(h32))
|
||||
#define HICON_16(h32) (LOWORD(h32))
|
||||
|
||||
#define HDC_32(h16) ((HDC)(ULONG_PTR)(h16))
|
||||
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "setupapi.h"
|
||||
#include "setupx16.h"
|
||||
#include "setupapi_private.h"
|
||||
|
@ -69,7 +70,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
|
||||
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
/***********************************************************************
|
||||
* SURegOpenKey (SETUPX.47)
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "wownt32.h"
|
||||
#include "dlgs.h"
|
||||
#include "shellapi.h"
|
||||
#include "shlobj.h"
|
||||
|
|
|
@ -200,6 +200,5 @@ inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source)
|
|||
#define HICON_16(h32) (LOWORD(h32))
|
||||
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
|
||||
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "wownt32.h"
|
||||
#include "heap.h"
|
||||
#include "shellapi.h"
|
||||
#include "shlobj.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "winerror.h"
|
||||
#include "hook.h"
|
||||
#include "message.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/server.h"
|
||||
#include "win.h"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "winnls.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "user.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
|
|
@ -20,19 +20,14 @@
|
|||
|
||||
#include "wine/winuser16.h"
|
||||
#include "winbase.h"
|
||||
#include "wownt32.h"
|
||||
#include "user.h"
|
||||
|
||||
/* handle to handle 16 conversions */
|
||||
#define HANDLE_16(h32) (LOWORD(h32))
|
||||
#define HBITMAP_16(h32) (LOWORD(h32))
|
||||
#define HCURSOR_16(h32) (LOWORD(h32))
|
||||
#define HICON_16(h32) (LOWORD(h32))
|
||||
|
||||
/* handle16 to handle conversions */
|
||||
#define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
|
||||
#define HBRUSH_32(h16) ((HBRUSH)(ULONG_PTR)(h16))
|
||||
#define HCURSOR_32(h16) ((HCURSOR)(ULONG_PTR)(h16))
|
||||
#define HDC_32(h16) ((HDC)(ULONG_PTR)(h16))
|
||||
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
|
||||
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
|
||||
|
||||
WORD WINAPI DestroyIcon32(HGLOBAL16, UINT16);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "user.h"
|
||||
#include "win.h"
|
||||
#include "task.h"
|
||||
|
@ -26,19 +27,6 @@
|
|||
|
||||
/* handle --> handle16 conversions */
|
||||
#define HANDLE_16(h32) (LOWORD(h32))
|
||||
#define HDC_16(h32) (LOWORD(h32))
|
||||
#define HDWP_16(h32) (LOWORD(h32))
|
||||
#define HMENU_16(h32) (LOWORD(h32))
|
||||
|
||||
/* handle16 --> handle conversions */
|
||||
#define HBITMAP_32(h16) ((HBITMAP)(ULONG_PTR)(h16))
|
||||
#define HDC_32(h16) ((HDC)(ULONG_PTR)(h16))
|
||||
#define HDWP_32(h16) ((HDWP)(ULONG_PTR)(h16))
|
||||
#define HFONT_32(h16) ((HFONT)(ULONG_PTR)(h16))
|
||||
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
|
||||
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
|
||||
#define HMENU_32(h16) ((HMENU)(ULONG_PTR)(h16))
|
||||
#define HRGN_32(h16) ((HRGN)(ULONG_PTR)(h16))
|
||||
|
||||
static HWND16 hwndSysModal;
|
||||
|
||||
|
@ -1667,7 +1655,7 @@ INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox )
|
|||
|
||||
msgbox32.cbSize = msgbox->cbSize;
|
||||
msgbox32.hwndOwner = WIN_Handle32( msgbox->hwndOwner );
|
||||
msgbox32.hInstance = HINSTANCE_32(msgbox->hInstance);
|
||||
msgbox32.hInstance = MapHModuleSL(msgbox->hInstance);
|
||||
msgbox32.lpszText = MapSL(msgbox->lpszText);
|
||||
msgbox32.lpszCaption = MapSL(msgbox->lpszCaption);
|
||||
msgbox32.dwStyle = msgbox->dwStyle;
|
||||
|
|
|
@ -26,14 +26,13 @@
|
|||
#include "psdrv.h"
|
||||
#include "wine/debug.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "winspool.h"
|
||||
#include "prsht.h"
|
||||
#include "psdlg.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
|
||||
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "mmddk.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -33,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mcianim);
|
|||
#define ANIMFRAMES_PERMIN 1800
|
||||
#define SECONDS_PERMIN 60
|
||||
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
typedef struct {
|
||||
UINT16 wDevID;
|
||||
int nUseCount; /* Incremented for each shared open */
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_PRIVATE_MCIAVI_H
|
||||
#define __WINE_PRIVATE_MCIAVI_H
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
@ -27,6 +30,7 @@
|
|||
#include "mmddk.h"
|
||||
#include "digitalv.h"
|
||||
#include "vfw.h"
|
||||
#include "wownt32.h"
|
||||
#include "mciavi.h"
|
||||
|
||||
struct MMIOPos {
|
||||
|
@ -101,5 +105,4 @@ DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms);
|
|||
DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms);
|
||||
DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSA lpParms);
|
||||
|
||||
/* handle conversions */
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
#endif /* __WINE_PRIVATE_MCIAVI_H */
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "mmddk.h"
|
||||
#include "winioctl.h"
|
||||
#include "ntddstor.h"
|
||||
|
@ -42,8 +43,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mcicda);
|
|||
#define FRAME_OF_ADDR(a) ((a)[1] * CDFRAMES_PERMIN + (a)[2] * CDFRAMES_PERSEC + (a)[3])
|
||||
#define FRAME_OF_TOC(toc, idx) FRAME_OF_ADDR((toc).TrackData[idx - (toc).FirstTrack].Address)
|
||||
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
typedef struct {
|
||||
UINT wDevID;
|
||||
int nUseCount; /* Incremented for each shared open */
|
||||
|
|
|
@ -37,13 +37,12 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "mmddk.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mcimidi);
|
||||
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
#define MIDI_NOTEOFF 0x80
|
||||
#define MIDI_NOTEON 0x90
|
||||
|
||||
|
|
|
@ -27,13 +27,12 @@
|
|||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "mmddk.h"
|
||||
#include "wownt32.h"
|
||||
#include "digitalv.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mciwave);
|
||||
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
typedef struct {
|
||||
UINT wDevID;
|
||||
HANDLE hWave;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "mmddk.h"
|
||||
#include "wownt32.h"
|
||||
|
||||
typedef DWORD (WINAPI *MessageProc16)(UINT16 wDevID, UINT16 wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
|
||||
typedef DWORD (WINAPI *MessageProc32)(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
|
||||
|
@ -252,7 +253,6 @@ void TIME_MMTimeStop(void);
|
|||
#define HWAVE_32(h16) ((HWAVE)(ULONG_PTR)(h16))
|
||||
#define HWAVEIN_32(h16) ((HWAVEIN)(ULONG_PTR)(h16))
|
||||
#define HWAVEOUT_32(h16) ((HWAVEOUT)(ULONG_PTR)(h16))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
/* HANDLE -> HANDLE16 conversions */
|
||||
#define HDRVR_16(h32) (LOWORD(h32))
|
||||
|
@ -266,4 +266,3 @@ void TIME_MMTimeStop(void);
|
|||
#define HWAVE_16(h32) (LOWORD(h32))
|
||||
#define HWAVEIN_16(h32) (LOWORD(h32))
|
||||
#define HWAVEOUT_16(h32) (LOWORD(h32))
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
|
|
|
@ -102,6 +102,7 @@
|
|||
#include "winuser.h"
|
||||
#include "winsock2.h"
|
||||
#include "ws2spi.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winsock16.h"
|
||||
#include "winnt.h"
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
#include "wsipx.h"
|
||||
#include "wine/winsock16.h"
|
||||
#include "winnt.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
|
|
@ -143,13 +143,9 @@ extern HPEN SYSCOLOR_GetPen( INT index );
|
|||
extern DWORD USER16_AlertableWait;
|
||||
|
||||
/* HANDLE16 <-> HANDLE conversions */
|
||||
#define HACCEL_16(h32) (LOWORD(h32))
|
||||
#define HBRUSH_16(h32) (LOWORD(h32))
|
||||
#define HCURSOR_16(h32) (LOWORD(h32))
|
||||
#define HICON_16(h32) (LOWORD(h32))
|
||||
|
||||
#define HACCEL_32(h16) ((HACCEL)(ULONG_PTR)(h16))
|
||||
#define HBRUSH_32(h16) ((HBRUSH)(ULONG_PTR)(h16))
|
||||
#define HCURSOR_32(h16) ((HCURSOR)(ULONG_PTR)(h16))
|
||||
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
|
||||
|
||||
|
|
|
@ -120,9 +120,6 @@ inline static HWND WIN_GetFullHandle( HWND hwnd )
|
|||
return hwnd;
|
||||
}
|
||||
|
||||
#define HWND_16(hwnd32) (LOWORD(hwnd32))
|
||||
#define HWND_32(hwnd16) ((HWND)(ULONG_PTR)(hwnd16))
|
||||
|
||||
inline static WND *WIN_FindWndPtr16( HWND16 hwnd )
|
||||
{
|
||||
/* don't bother with full conversion */
|
||||
|
|
|
@ -105,7 +105,4 @@ INT16 WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle);
|
|||
INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent);
|
||||
INT16 WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags);
|
||||
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
#endif /* __WINE_WINE_WINSOCK16_H */
|
||||
|
|
|
@ -59,6 +59,46 @@ typedef enum
|
|||
HANDLE WINAPI WOWHandle32(WORD,WOW_HANDLE_TYPE);
|
||||
WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
|
||||
|
||||
#ifdef __WINE__
|
||||
/* under Wine use the kernel functions directly so we don't have to import wow32 */
|
||||
HANDLE WINAPI K32WOWHandle32(WORD,WOW_HANDLE_TYPE);
|
||||
WORD WINAPI K32WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
|
||||
#define WOWHandle32 K32WOWHandle32
|
||||
#define WOWHandle16 K32WOWHandle16
|
||||
#endif
|
||||
|
||||
#ifdef __WINE__
|
||||
/* under Wine we use optimized versions where we can */
|
||||
#define HWND_32(h16) ((HWND) (ULONG_PTR)(h16))
|
||||
#define HMENU_32(h16) ((HMENU) (ULONG_PTR)(h16))
|
||||
#define HDWP_32(h16) ((HDWP) (ULONG_PTR)(h16))
|
||||
#define HDROP_32(h16) ((HDROP) (ULONG_PTR)(h16))
|
||||
#define HDC_32(h16) ((HDC) (ULONG_PTR)(h16))
|
||||
#define HFONT_32(h16) ((HFONT) (ULONG_PTR)(h16))
|
||||
#define HMETAFILE_32(h16) ((HMETAFILE) (ULONG_PTR)(h16))
|
||||
#define HRGN_32(h16) ((HRGN) (ULONG_PTR)(h16))
|
||||
#define HBITMAP_32(h16) ((HBITMAP) (ULONG_PTR)(h16))
|
||||
#define HBRUSH_32(h16) ((HBRUSH) (ULONG_PTR)(h16))
|
||||
#define HPALETTE_32(h16) ((HPALETTE) (ULONG_PTR)(h16))
|
||||
#define HPEN_32(h16) ((HPEN) (ULONG_PTR)(h16))
|
||||
#define HACCEL_32(h16) ((HACCEL) (ULONG_PTR)(h16))
|
||||
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HMENU_16(h32) (LOWORD(h32))
|
||||
#define HDWP_16(h32) (LOWORD(h32))
|
||||
#define HDROP_16(h32) (LOWORD(h32))
|
||||
#define HDC_16(h32) (LOWORD(h32))
|
||||
#define HFONT_16(h32) (LOWORD(h32))
|
||||
#define HMETAFILE_16(h32) (LOWORD(h32))
|
||||
#define HRGN_16(h32) (LOWORD(h32))
|
||||
#define HBITMAP_16(h32) (LOWORD(h32))
|
||||
#define HBRUSH_16(h32) (LOWORD(h32))
|
||||
#define HPALETTE_16(h32) (LOWORD(h32))
|
||||
#define HPEN_16(h32) (LOWORD(h32))
|
||||
#define HACCEL_16(h32) (LOWORD(h32))
|
||||
|
||||
#else /* __WINE__ */
|
||||
|
||||
#define HWND_32(h16) ((HWND) (WOWHandle32(h16, WOW_TYPE_HWND)))
|
||||
#define HMENU_32(h16) ((HMENU) (WOWHandle32(h16, WOW_TYPE_HMENU)))
|
||||
#define HDWP_32(h16) ((HDWP) (WOWHandle32(h16, WOW_TYPE_HDWP)))
|
||||
|
@ -72,8 +112,6 @@ WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
|
|||
#define HPALETTE_32(h16) ((HPALETTE) (WOWHandle32(h16, WOW_TYPE_HPALETTE)))
|
||||
#define HPEN_32(h16) ((HPEN) (WOWHandle32(h16, WOW_TYPE_HPEN)))
|
||||
#define HACCEL_32(h16) ((HACCEL) (WOWHandle32(h16, WOW_TYPE_HACCEL)))
|
||||
#define HTASK_32(h16) ((DWORD) (WOWHandle32(h16, WOW_TYPE_HTASK)))
|
||||
#define FULLHWND_32(h16) ((HWND) (WOWHandle32(h16, WOW_TYPE_FULLHWND)))
|
||||
|
||||
#define HWND_16(h32) (WOWHandle16(h32, WOW_TYPE_HWND))
|
||||
#define HMENU_16(h32) (WOWHandle16(h32, WOW_TYPE_HMENU))
|
||||
|
@ -88,8 +126,13 @@ WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
|
|||
#define HPALETTE_16(h32) (WOWHandle16(h32, WOW_TYPE_HPALETTE))
|
||||
#define HPEN_16(h32) (WOWHandle16(h32, WOW_TYPE_HPEN))
|
||||
#define HACCEL_16(h32) (WOWHandle16(h32, WOW_TYPE_HACCEL))
|
||||
#define HTASK_16(h32) (WOWHandle16(h32, WOW_TYPE_HTASK))
|
||||
|
||||
#endif /* __WINE__ */
|
||||
|
||||
#define FULLHWND_32(h16) ((HWND) (WOWHandle32(h16, WOW_TYPE_FULLHWND)))
|
||||
#define HTASK_32(h16) ((DWORD)(WOWHandle32(h16, WOW_TYPE_HTASK)))
|
||||
|
||||
#define HTASK_16(h32) (WOWHandle16((HANDLE)(h32), WOW_TYPE_HTASK))
|
||||
|
||||
#define WCB16_PASCAL 0
|
||||
#define WCB16_CDECL 1
|
||||
|
@ -99,5 +142,3 @@ DWORD WINAPI WOWCallback16(DWORD,DWORD);
|
|||
BOOL WINAPI WOWCallback16Ex(DWORD,DWORD,DWORD,LPVOID,LPDWORD);
|
||||
|
||||
#endif /* _WOWNT32_H_ */
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
#include "user.h"
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/exception.h"
|
||||
|
@ -66,16 +67,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cursor);
|
|||
WINE_DECLARE_DEBUG_CHANNEL(icon);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(resource);
|
||||
|
||||
/* handle conversions */
|
||||
#define HCURSOR_16(h32) (LOWORD(h32))
|
||||
#define HGLOBAL_16(h32) (LOWORD(h32))
|
||||
#define HICON_16(h32) (LOWORD(h32))
|
||||
#define HINSTANCE_16(h32) (LOWORD(h32))
|
||||
|
||||
#define HCURSOR_32(h16) ((HCURSOR)(ULONG_PTR)(h16))
|
||||
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
|
||||
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
|
||||
#define HMODULE_32(h16) ((HMODULE)(ULONG_PTR)(h16))
|
||||
|
||||
static RECT CURSOR_ClipRect; /* Cursor clipping rect */
|
||||
|
||||
|
@ -504,14 +495,13 @@ fail:
|
|||
* FIXME: Convert to mono when cFlag is LR_MONOCHROME. Do something
|
||||
* with cbSize parameter as well.
|
||||
*/
|
||||
static HICON CURSORICON_CreateFromResource( HINSTANCE hInstance, HICON hObject, LPBYTE bits,
|
||||
static HICON CURSORICON_CreateFromResource( HMODULE16 hModule, HGLOBAL16 hObj, LPBYTE bits,
|
||||
UINT cbSize, BOOL bIcon, DWORD dwVersion,
|
||||
INT width, INT height, UINT loadflags )
|
||||
{
|
||||
static HDC hdcMem;
|
||||
int sizeAnd, sizeXor;
|
||||
HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */
|
||||
HGLOBAL16 hObj = HGLOBAL_16(hObject);
|
||||
BITMAP bmpXor, bmpAnd;
|
||||
POINT16 hotspot;
|
||||
BITMAPINFO *bmi;
|
||||
|
@ -677,8 +667,8 @@ static HICON CURSORICON_CreateFromResource( HINSTANCE hInstance, HICON hObject,
|
|||
CURSORICONINFO *info;
|
||||
|
||||
/* Make it owned by the module */
|
||||
if (hInstance) hInstance = GetExePtr(hInstance);
|
||||
FarSetOwner16( hObj, hInstance );
|
||||
if (hModule) hModule = GetExePtr(hModule);
|
||||
FarSetOwner16( hObj, hModule );
|
||||
|
||||
info = (CURSORICONINFO *)GlobalLock16( hObj );
|
||||
info->ptHotSpot.x = hotspot.x;
|
||||
|
@ -825,11 +815,10 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
|
|||
*
|
||||
* Make a copy of a cursor or icon.
|
||||
*/
|
||||
static HICON CURSORICON_Copy( HINSTANCE hInst, HICON hIcon )
|
||||
static HICON CURSORICON_Copy( HINSTANCE16 hInst16, HICON hIcon )
|
||||
{
|
||||
char *ptrOld, *ptrNew;
|
||||
int size;
|
||||
HINSTANCE16 hInst16 = HINSTANCE_16(hInst);
|
||||
HICON16 hOld = HICON_16(hIcon);
|
||||
HICON16 hNew;
|
||||
|
||||
|
@ -1008,7 +997,7 @@ HCURSOR WINAPI CreateCursor( HINSTANCE hInstance,
|
|||
info.bPlanes = 1;
|
||||
info.bBitsPerPixel = 1;
|
||||
|
||||
return HICON_32(CreateCursorIconIndirect16(HINSTANCE_16(hInstance), &info,
|
||||
return HICON_32(CreateCursorIconIndirect16(MapHModuleLS(hInstance), &info,
|
||||
lpANDbits, lpXORbits));
|
||||
}
|
||||
|
||||
|
@ -1099,7 +1088,7 @@ HICON WINAPI CreateIcon(
|
|||
info.bPlanes = bPlanes;
|
||||
info.bBitsPerPixel = bBitsPixel;
|
||||
|
||||
hIcon=HICON_32(CreateCursorIconIndirect16(HINSTANCE_16(hInstance), &info,
|
||||
hIcon=HICON_32(CreateCursorIconIndirect16(MapHModuleLS(hInstance), &info,
|
||||
lpANDbits, lpXORbits));
|
||||
} else {
|
||||
ICONINFO iinfo;
|
||||
|
@ -1171,7 +1160,7 @@ HGLOBAL16 WINAPI CreateCursorIconIndirect16( HINSTANCE16 hInstance,
|
|||
HICON16 WINAPI CopyIcon16( HINSTANCE16 hInstance, HICON16 hIcon )
|
||||
{
|
||||
TRACE_(icon)("%04x %04x\n", hInstance, hIcon );
|
||||
return HICON_16(CURSORICON_Copy(HINSTANCE_32(hInstance), HICON_32(hIcon)));
|
||||
return HICON_16(CURSORICON_Copy(hInstance, HICON_32(hIcon)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1191,7 +1180,7 @@ HICON WINAPI CopyIcon( HICON hIcon )
|
|||
HCURSOR16 WINAPI CopyCursor16( HINSTANCE16 hInstance, HCURSOR16 hCursor )
|
||||
{
|
||||
TRACE_(cursor)("%04x %04x\n", hInstance, hCursor );
|
||||
return HICON_16(CURSORICON_Copy(HINSTANCE_32(hInstance), HCURSOR_32(hCursor)));
|
||||
return HICON_16(CURSORICON_Copy(hInstance, HCURSOR_32(hCursor)));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -1528,7 +1517,7 @@ HGLOBAL16 WINAPI LoadDIBIconHandler16( HGLOBAL16 hMemObj, HMODULE16 hModule, HRS
|
|||
{
|
||||
LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj );
|
||||
hMemObj = HICON_16(CURSORICON_CreateFromResource(
|
||||
HMODULE_32(hModule), HICON_32(hMemObj), bits,
|
||||
hModule, hMemObj, bits,
|
||||
SizeofResource16(hModule, hRsrc), TRUE, 0x00030000,
|
||||
GetSystemMetrics(SM_CXICON),
|
||||
GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR));
|
||||
|
@ -1548,7 +1537,7 @@ HGLOBAL16 WINAPI LoadDIBCursorHandler16( HGLOBAL16 hMemObj, HMODULE16 hModule, H
|
|||
{
|
||||
LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj );
|
||||
hMemObj = HICON_16(CURSORICON_CreateFromResource(
|
||||
HMODULE_32(hModule), HICON_32(hMemObj), bits,
|
||||
hModule, hMemObj, bits,
|
||||
SizeofResource16(hModule, hRsrc), FALSE, 0x00030000,
|
||||
GetSystemMetrics(SM_CXCURSOR),
|
||||
GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME));
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "windowsx.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "controls.h"
|
||||
#include "heap.h"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "winuser.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wownt32.h"
|
||||
#include "hook.h"
|
||||
#include "win.h"
|
||||
#include "queue.h"
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
#include "nonclient.h"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "winreg.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/unicode.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "struct32.h"
|
||||
#include "wownt32.h"
|
||||
#include "win.h"
|
||||
#include "winerror.h"
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "windef.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "wine/debug.h"
|
||||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "win.h"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "stackframe.h"
|
||||
|
|
Loading…
Reference in New Issue