Convert HPALETTE to a void*.

This commit is contained in:
Michael Stefaniuc 2002-08-29 01:55:55 +00:00 committed by Alexandre Julliard
parent a0b32d7c1b
commit 1033ffe423
5 changed files with 7 additions and 5 deletions

View File

@ -32,13 +32,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvideo);
#define HDC_32(h16) ((HDC)(ULONG_PTR)(h16)) #define HDC_32(h16) ((HDC)(ULONG_PTR)(h16))
#define HDRAWDIB_32(h16) ((HDRAWDIB)(ULONG_PTR)(h16)) #define HDRAWDIB_32(h16) ((HDRAWDIB)(ULONG_PTR)(h16))
#define HIC_32(h16) ((HIC)(ULONG_PTR)(h16)) #define HIC_32(h16) ((HIC)(ULONG_PTR)(h16))
#define HPALETTE_32(h16) ((HPALETTE)(ULONG_PTR)(h16))
/* handle --> handle16 conversions */ /* handle --> handle16 conversions */
#define HDC_16(h32) (LOWORD(h32)) #define HDC_16(h32) (LOWORD(h32))
#define HDRAWDIB_16(h32) (LOWORD(h32)) #define HDRAWDIB_16(h32) (LOWORD(h32))
#define HIC_16(h32) (LOWORD(h32)) #define HIC_16(h32) (LOWORD(h32))
#define HPALETTE_16(h32) (LOWORD(h32))
/*********************************************************************** /***********************************************************************

View File

@ -672,7 +672,7 @@ LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) {
ret = icdb16; ret = icdb16;
COPY(icdb,dwFlags); COPY(icdb,dwFlags);
COPY(icdb,hpal); icdb->hpal = HPALETTE_32(icdb16->hpal);
COPY(icdb,hwnd); COPY(icdb,hwnd);
COPY(icdb,hdc); COPY(icdb,hdc);
COPY(icdb,xDst); COPY(icdb,xDst);

View File

@ -117,6 +117,10 @@ HIC16 VFWAPI ICOpen16(DWORD,DWORD,UINT16);
HIC16 VFWAPI ICOpenFunction16(DWORD,DWORD,UINT16,FARPROC16); HIC16 VFWAPI ICOpenFunction16(DWORD,DWORD,UINT16,FARPROC16);
LRESULT VFWAPI ICSendMessage16(HIC16,UINT16,DWORD,DWORD); 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 #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */

View File

@ -829,7 +829,7 @@ int X11DRV_PALETTE_ToPhysical( X11DRV_PDEVICE *physDev, COLORREF color )
{ {
DC *dc = physDev ? physDev->dc : NULL; DC *dc = physDev ? physDev->dc : NULL;
WORD index = 0; WORD index = 0;
HPALETTE16 hPal = (dc)? dc->hPalette: GetStockObject(DEFAULT_PALETTE); HPALETTE hPal = (dc)? dc->hPalette: GetStockObject(DEFAULT_PALETTE);
unsigned char spec_type = color >> 24; unsigned char spec_type = color >> 24;
PALETTEOBJ* palPtr = (PALETTEOBJ *) GDI_GetObjPtr( hPal, PALETTE_MAGIC ); PALETTEOBJ* palPtr = (PALETTEOBJ *) GDI_GetObjPtr( hPal, PALETTE_MAGIC );

View File

@ -87,7 +87,7 @@ DECLARE_HANDLE(HKL);
DECLARE_OLD_HANDLE(HMENU); DECLARE_OLD_HANDLE(HMENU);
DECLARE_HANDLE(HMETAFILE); DECLARE_HANDLE(HMETAFILE);
DECLARE_HANDLE(HMONITOR); DECLARE_HANDLE(HMONITOR);
DECLARE_OLD_HANDLE(HPALETTE); DECLARE_HANDLE(HPALETTE);
DECLARE_OLD_HANDLE(HPEN); DECLARE_OLD_HANDLE(HPEN);
DECLARE_OLD_HANDLE(HRGN); DECLARE_OLD_HANDLE(HRGN);
DECLARE_OLD_HANDLE(HRSRC); DECLARE_OLD_HANDLE(HRSRC);