DSTRICT: some fixes for gdi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

this patch fixes the -DSTRICT warnings in files with few warnings.

License: LGPL, X11
Changelog:
	Michael Stefaniuc <mstefani@redhat.com>
	- some -DSTRICT fixes for the gdi dll

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: dlls/gdi/wing.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/wing.c,v
retrieving revision 1.10
diff -u -r1.10 wing.c
--- dlls/gdi/wing.c	31 May 2002 23:25:47 -0000	1.10
+++ dlls/gdi/wing.c	6 Nov 2002 23:27:04 -0000
@@ -25,6 +25,7 @@
 #include "wine/debug.h"
 #include "palette.h"
 #include "windef.h"
+#include "wownt32.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(wing);
 
@@ -99,7 +100,8 @@
  */
 SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
 {
-    BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( hWinGBitmap, BITMAP_MAGIC );
+    BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( HBITMAP_32(hWinGBitmap),
+						  BITMAP_MAGIC );
     SEGPTR res = 0;
 
     TRACE("(%d,%p)\n", hWinGBitmap, bmpi);
@@ -108,7 +110,7 @@
     if (bmpi) FIXME(": Todo - implement setting BITMAPINFO\n");
 
     res = bmp->segptr_bits;
-    GDI_ReleaseObj( hWinGBitmap );
+    GDI_ReleaseObj( HBITMAP_32(hWinGBitmap) );
     return res;
 }
 
@@ -137,10 +139,10 @@
  */
 HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void)
 {
-    HDC hdc = CreateCompatibleDC(0);
+    HDC16 hdc = CreateCompatibleDC16(0);
     HPALETTE16 ret = CreateHalftonePalette16(hdc);
     TRACE("(void)\n");
-    DeleteDC(hdc);
+    DeleteDC16(hdc);
     return ret;
 }
 
Index: dlls/gdi/enhmfdrv/objects.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/enhmfdrv/objects.c,v
retrieving revision 1.5
diff -u -r1.5 objects.c
--- dlls/gdi/enhmfdrv/objects.c	17 Aug 2002 00:26:57 -0000	1.5
+++ dlls/gdi/enhmfdrv/objects.c	6 Nov 2002 23:27:04 -0000
@@ -231,7 +231,7 @@
 
     if(!EMFDRV_WriteRecord( dev, &emr.emr ))
         index = 0;
-    return index;
+    return (HPEN)index;
 }
 
 /******************************************************************
@@ -257,7 +257,7 @@
             goto found;
         }
     }
-    if (!(index = EMFDRV_CreatePenIndirect(dev, hPen ))) return 0;
+    if (!(index = (DWORD)EMFDRV_CreatePenIndirect(dev, hPen ))) return 0;
  found:
     emr.emr.iType = EMR_SELECTOBJECT;
     emr.emr.nSize = sizeof(emr);
Index: dlls/gdi/mfdrv/init.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/mfdrv/init.c,v
retrieving revision 1.13
diff -u -r1.13 init.c
--- dlls/gdi/mfdrv/init.c	24 Sep 2002 18:29:39 -0000	1.13
+++ dlls/gdi/mfdrv/init.c	6 Nov 2002 23:27:05 -0000
@@ -21,6 +21,7 @@
 #include "windef.h"
 #include "wine/winbase16.h"
 #include "gdi.h"
+#include "wownt32.h"
 #include "mfdrv/metafiledrv.h"
 #include "wine/debug.h"
 
@@ -324,7 +325,7 @@
 {
     HMETAFILE16 hmf;
     METAFILEDRV_PDEVICE *physDev;
-    DC *dc = MFDRV_CloseMetaFile(hdc);
+    DC *dc = MFDRV_CloseMetaFile(HDC_32(hdc));
     if (!dc) return 0;
     physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
 
Index: dlls/gdi/mfdrv/objects.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/mfdrv/objects.c,v
retrieving revision 1.4
diff -u -r1.4 objects.c
--- dlls/gdi/mfdrv/objects.c	16 Aug 2002 00:42:06 -0000	1.4
+++ dlls/gdi/mfdrv/objects.c	6 Nov 2002 23:27:05 -0000
@@ -24,6 +24,7 @@
 
 #include "bitmap.h"
 #include "font.h"
+#include "wownt32.h"
 #include "mfdrv/metafiledrv.h"
 #include "wine/debug.h"
 
@@ -78,7 +79,7 @@
 	    BITMAPINFO *info;
 	    DWORD bmSize;
 
-	    GetObjectA(logbrush.lbHatch, sizeof(bm), &bm);
+	    GetObjectA((HANDLE)logbrush.lbHatch, sizeof(bm), &bm);
 	    if(bm.bmBitsPixel != 1 || bm.bmPlanes != 1) {
 	        FIXME("Trying to store a colour pattern brush\n");
 		goto done;
@@ -104,7 +105,7 @@
 	    info->bmiHeader.biBitCount = 1;
 	    bits = ((BYTE *)info) + sizeof(BITMAPINFO) + sizeof(RGBQUAD);
 
-	    GetDIBits(physDev->hdc, logbrush.lbHatch, 0, bm.bmHeight,
+	    GetDIBits(physDev->hdc, (HANDLE)logbrush.lbHatch, 0, bm.bmHeight,
 		      bits, info, DIB_RGB_COLORS);
 	    *(DWORD *)info->bmiColors = 0;
 	    *(DWORD *)(info->bmiColors + 1) = 0xffffff;
@@ -168,7 +169,7 @@
  *         MFDRV_CreateFontIndirect
  */
 
-static BOOL MFDRV_CreateFontIndirect(PHYSDEV dev, HFONT16 hFont, LOGFONT16 *logfont)
+static BOOL MFDRV_CreateFontIndirect(PHYSDEV dev, HFONT hFont, LOGFONT16 *logfont)
 {
     int index;
     char buffer[sizeof(METARECORD) - 2 + sizeof(LOGFONT16)];
@@ -195,7 +196,7 @@
 {
     LOGFONT16 lf16;
 
-    if (!GetObject16( hfont, sizeof(lf16), &lf16 )) return GDI_ERROR;
+    if (!GetObject16( HFONT_16(hfont), sizeof(lf16), &lf16 )) return HGDI_ERROR;
     if (MFDRV_CreateFontIndirect(dev, hfont, &lf16)) return 0;
     return HGDI_ERROR;
 }
@@ -203,7 +204,7 @@
 /******************************************************************
  *         MFDRV_CreatePenIndirect
  */
-static BOOL MFDRV_CreatePenIndirect(PHYSDEV dev, HPEN16 hPen, LOGPEN16 *logpen)
+static BOOL MFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen, LOGPEN16 *logpen)
 {
     int index;
     char buffer[sizeof(METARECORD) - 2 + sizeof(*logpen)];
@@ -230,7 +231,7 @@
 {
     LOGPEN16 logpen;
 
-    if (!GetObject16( hpen, sizeof(logpen), &logpen )) return 0;
+    if (!GetObject16( HPEN_16(hpen), sizeof(logpen), &logpen )) return 0;
     if (MFDRV_CreatePenIndirect( dev, hpen, &logpen )) return hpen;
     return 0;
 }
Index: dlls/gdi/win16drv/font.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/win16drv/font.c,v
retrieving revision 1.6
diff -u -r1.6 font.c
--- dlls/gdi/win16drv/font.c	28 Aug 2002 22:35:23 -0000	1.6
+++ dlls/gdi/win16drv/font.c	6 Nov 2002 23:27:05 -0000
@@ -21,6 +21,7 @@
 
 #include <string.h>
 #include "winnls.h"
+#include "wownt32.h"
 #include "wine/winbase16.h"
 #include "win16drv/win16drv.h"
 #include "gdi.h"
@@ -147,7 +148,7 @@
     DC *dc = physDev->dc;
     int	nSize;
 
-    if (!GetObject16( hfont, sizeof(physDev->lf), &physDev->lf ))
+    if (!GetObject16( HFONT_16(hfont), sizeof(physDev->lf), &physDev->lf ))
         return HGDI_ERROR;
 
     TRACE("WIN16DRV_FONT_SelectObject %s h=%d\n",
@@ -213,7 +214,7 @@
            physDev->tm.tmMaxCharWidth,
            physDev->tm.tmWeight);
 
-    return TRUE; /* We'll use a device font */
+    return (HFONT)1; /* We'll use a device font */
 }
 
 /***********************************************************************
Index: dlls/gdi/win16drv/graphics.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/win16drv/graphics.c,v
retrieving revision 1.5
diff -u -r1.5 graphics.c
--- dlls/gdi/win16drv/graphics.c	25 Jun 2002 23:29:51 -0000	1.5
+++ dlls/gdi/win16drv/graphics.c	6 Nov 2002 23:27:05 -0000
@@ -21,6 +21,7 @@
 #include <stdio.h>
 
 #include "win16drv/win16drv.h"
+#include "wownt32.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(win16drv);
@@ -40,7 +41,7 @@
     points[0].y = dc->CursPosY;
     points[1].x = x;
     points[1].y = y;
-    LPtoDP16( physDev->hdc, points, 2 );
+    LPtoDP16( HDC_16(physDev->hdc), points, 2 );
 
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
                          OS_POLYLINE, 2, points,
@@ -72,7 +73,7 @@
     points[0].y = top;
     points[1].x = right;
     points[1].y = bottom;
-    LPtoDP16( physDev->hdc, points, 2 );
+    LPtoDP16( HDC_16(physDev->hdc), points, 2 );
 
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
                            OS_RECTANGLE, 2, points,
@@ -109,7 +110,7 @@
       points[i].x = pt[i].x;
       points[i].y = pt[i].y;
     }
-    LPtoDP16( physDev->hdc, points, count-1 );
+    LPtoDP16( HDC_16(physDev->hdc), points, count-1 );
     points[count-1].x = points[0].x;
     points[count-1].y = points[0].y;
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
@@ -144,7 +145,7 @@
       points[i].x = pt[i].x;
       points[i].y = pt[i].y;
     }
-    LPtoDP16( physDev->hdc, points, count );
+    LPtoDP16( HDC_16(physDev->hdc), points, count );
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
                          OS_POLYLINE, count, points,
                          physDev->PenInfo,
@@ -174,7 +175,7 @@
     points[0].y = top;
     points[1].x = right;
     points[1].y = bottom;
-    LPtoDP16( physDev->hdc, points, 2 );
+    LPtoDP16( HDC_16(physDev->hdc), points, 2 );
 
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
                          OS_ELLIPSE, 2, points,
Index: dlls/gdi/win16drv/objects.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/win16drv/objects.c,v
retrieving revision 1.3
diff -u -r1.3 objects.c
--- dlls/gdi/win16drv/objects.c	16 Aug 2002 00:42:06 -0000	1.3
+++ dlls/gdi/win16drv/objects.c	6 Nov 2002 23:27:05 -0000
@@ -24,6 +24,7 @@
 #include <stdio.h>
 
 #include "win16drv/win16drv.h"
+#include "wownt32.h"
 
 #include "wine/debug.h"
 
@@ -49,7 +50,7 @@
     int          nSize;
     LOGBRUSH16 lBrush16;
 
-    if (!GetObject16( hbrush, sizeof(lBrush16), &lBrush16 )) return 0;
+    if (!GetObject16( HBRUSH_16(hbrush), sizeof(lBrush16), &lBrush16 )) return 0;
 
     if ( physDev->BrushInfo )
     {
@@ -79,7 +80,7 @@
     int          nSize;
     LOGPEN16     lPen16;
 
-    if (!GetObject16( hpen, sizeof(lPen16), &lPen16 )) return 0;
+    if (!GetObject16( HPEN_16(hpen), sizeof(lPen16), &lPen16 )) return 0;
 
     if ( physDev->PenInfo )
     {
Index: graphics/mapping.c
===================================================================
RCS file: /home/wine/wine/graphics/mapping.c,v
retrieving revision 1.19
diff -u -r1.19 mapping.c
--- graphics/mapping.c	17 Aug 2002 18:32:12 -0000	1.19
+++ graphics/mapping.c	6 Nov 2002 23:27:05 -0000
@@ -19,6 +19,7 @@
  */
 
 #include "gdi.h"
+#include "wownt32.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(gdi);
@@ -53,7 +54,7 @@
  */
 BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count )
 {
-    DC * dc = DC_GetDCPtr( hdc );
+    DC * dc = DC_GetDCPtr( HDC_32(hdc) );
     if (!dc) return FALSE;
 
     while (count--)
@@ -62,7 +63,7 @@
         points->y = MulDiv( points->y - dc->vportOrgY, dc->wndExtY, dc->vportExtY ) + dc->wndOrgY;
         points++;
     }
-    GDI_ReleaseObj( hdc );
+    GDI_ReleaseObj( HDC_32(hdc) );
     return TRUE;
 }
 
@@ -100,7 +101,7 @@
  */
 BOOL16 WINAPI LPtoDP16( HDC16 hdc, LPPOINT16 points, INT16 count )
 {
-    DC * dc = DC_GetDCPtr( hdc );
+    DC * dc = DC_GetDCPtr( HDC_32(hdc) );
     if (!dc) return FALSE;
 
     while (count--)
@@ -109,7 +110,7 @@
         points->y = MulDiv( points->y - dc->wndOrgY, dc->vportExtY, dc->wndExtY ) + dc->vportOrgY;
         points++;
     }
-    GDI_ReleaseObj( hdc );
+    GDI_ReleaseObj( HDC_32(hdc) );
     return TRUE;
 }
 
Index: objects/bitmap.c
===================================================================
RCS file: /home/wine/wine/objects/bitmap.c,v
retrieving revision 1.53
diff -u -r1.53 bitmap.c
--- objects/bitmap.c	28 Aug 2002 22:35:23 -0000	1.53
+++ objects/bitmap.c	6 Nov 2002 23:27:05 -0000
@@ -122,7 +122,8 @@
     if (width < 0) width = -width;
 
       /* Create the BITMAPOBJ */
-    if (!(bmp = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC, &hbitmap, &bitmap_funcs )))
+    if (!(bmp = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC,
+				 (HGDIOBJ *)&hbitmap, &bitmap_funcs )))
         return 0;
 
     TRACE("%dx%d, %d colors returning %08x\n", width, height,
Index: objects/brush.c
===================================================================
RCS file: /home/wine/wine/objects/brush.c,v
retrieving revision 1.32
diff -u -r1.32 brush.c
--- objects/brush.c	3 Oct 2002 19:48:59 -0000	1.32
+++ objects/brush.c	6 Nov 2002 23:27:05 -0000
@@ -26,6 +26,7 @@
 #include "wingdi.h"
 #include "wine/wingdi16.h"
 #include "bitmap.h"
+#include "wownt32.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(gdi);
@@ -93,7 +94,8 @@
     BRUSHOBJ * ptr;
     HBRUSH hbrush;
 
-    if (!(ptr = GDI_AllocObject( sizeof(BRUSHOBJ), BRUSH_MAGIC, &hbrush, &brush_funcs ))) return 0;
+    if (!(ptr = GDI_AllocObject( sizeof(BRUSHOBJ), BRUSH_MAGIC,
+				 (HGDIOBJ *)&hbrush, &brush_funcs ))) return 0;
     ptr->logbrush.lbStyle = brush->lbStyle;
     ptr->logbrush.lbColor = brush->lbColor;
     ptr->logbrush.lbHatch = brush->lbHatch;
@@ -372,7 +374,7 @@
     BOOL16 res = FALSE;
 
     TRACE("(hBrush %04x, newColor %08lx)\n", hBrush, (DWORD)newColor);
-    if (!(brushPtr = (BRUSHOBJ *) GDI_GetObjPtr( hBrush, BRUSH_MAGIC )))
+    if (!(brushPtr = (BRUSHOBJ *) GDI_GetObjPtr( HBRUSH_32(hBrush), BRUSH_MAGIC )))
 	return FALSE;
 
     if (brushPtr->logbrush.lbStyle == BS_SOLID)
@@ -381,6 +383,6 @@
 	res = TRUE;
     }
 
-     GDI_ReleaseObj( hBrush );
+     GDI_ReleaseObj( HBRUSH_32(hBrush) );
      return res;
 }
Index: objects/dcvalues.c
===================================================================
RCS file: /home/wine/wine/objects/dcvalues.c,v
retrieving revision 1.19
diff -u -r1.19 dcvalues.c
--- objects/dcvalues.c	24 Sep 2002 18:29:40 -0000	1.19
+++ objects/dcvalues.c	6 Nov 2002 23:27:05 -0000
@@ -22,6 +22,7 @@
 
 #include "winbase.h"
 #include "winerror.h"
+#include "wownt32.h"
 
 #include "gdi.h"
 
@@ -403,11 +404,11 @@
 HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
 {
     HRGN16 ret = 0;
-    DC * dc = DC_GetDCPtr( hdc );
+    DC * dc = DC_GetDCPtr( HDC_32(hdc) );
     if (dc)
     {
-        ret = dc->hVisRgn;
-        GDI_ReleaseObj( hdc );
+        ret = HRGN_16(dc->hVisRgn);
+        GDI_ReleaseObj( HDC_32(hdc) );
     }
     return ret;
 }
@@ -419,11 +420,11 @@
 HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
 {
     HRGN16 ret = 0;
-    DC * dc = DC_GetDCPtr( hdc );
+    DC * dc = DC_GetDCPtr( HDC_32(hdc) );
     if (dc)
     {
-        ret = dc->hClipRgn;
-        GDI_ReleaseObj( hdc );
+        ret = HRGN_16(dc->hClipRgn);
+        GDI_ReleaseObj( HDC_32(hdc) );
     }
     return ret;
 }
Index: objects/dib.c
===================================================================
RCS file: /home/wine/wine/objects/dib.c,v
retrieving revision 1.70
diff -u -r1.70 dib.c
--- objects/dib.c	23 Oct 2002 18:50:10 -0000	1.70
+++ objects/dib.c	6 Nov 2002 23:27:06 -0000
@@ -25,6 +25,7 @@
 #include "bitmap.h"
 #include "selectors.h"
 #include "gdi.h"
+#include "wownt32.h"
 #include "wine/debug.h"
 #include "palette.h"
 
@@ -835,7 +836,7 @@
     LPVOID bits32;
     HBITMAP hbitmap;
 
-    hbitmap = CreateDIBSection( hdc, bmi, usage, &bits32, section, offset );
+    hbitmap = CreateDIBSection( HDC_32(hdc), bmi, usage, &bits32, section, offset );
     if (hbitmap)
     {
         BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr(hbitmap, BITMAP_MAGIC);
@@ -863,7 +864,7 @@
         }
         if (bmp) GDI_ReleaseObj( hbitmap );
     }
-    return hbitmap;
+    return HBITMAP_16(hbitmap);
 }
 
 /***********************************************************************
Index: objects/enhmetafile.c
===================================================================
RCS file: /home/wine/wine/objects/enhmetafile.c,v
retrieving revision 1.62
diff -u -r1.62 enhmetafile.c
--- objects/enhmetafile.c	4 Nov 2002 22:43:24 -0000	1.62
+++ objects/enhmetafile.c	6 Nov 2002 23:27:07 -0000
@@ -60,7 +60,8 @@
 {
     HENHMETAFILE hmf = 0;
     ENHMETAFILEOBJ *metaObj = GDI_AllocObject( sizeof(ENHMETAFILEOBJ),
-                                               ENHMETAFILE_MAGIC, &hmf, NULL );
+                                               ENHMETAFILE_MAGIC,
+					       (HGDIOBJ *)&hmf, NULL );
     if (metaObj)
     {
         metaObj->emh = emh;
Index: objects/font.c
===================================================================
RCS file: /home/wine/wine/objects/font.c,v
retrieving revision 1.88
diff -u -r1.88 font.c
--- objects/font.c	4 Nov 2002 22:43:24 -0000	1.88
+++ objects/font.c	6 Nov 2002 23:27:07 -0000
@@ -27,6 +27,7 @@
 #include <assert.h>
 #include "winerror.h"
 #include "winnls.h"
+#include "wownt32.h"
 #include "wine/unicode.h"
 #include "font.h"
 #include "wine/debug.h"
@@ -313,7 +314,8 @@
     if (plf)
     {
         FONTOBJ* fontPtr;
-	if ((fontPtr = GDI_AllocObject( sizeof(FONTOBJ), FONT_MAGIC, &hFont, &font_funcs )))
+	if ((fontPtr = GDI_AllocObject( sizeof(FONTOBJ), FONT_MAGIC,
+					(HGDIOBJ *)&hFont, &font_funcs )))
 	{
 	    memcpy( &fontPtr->logfont, plf, sizeof(LOGFONTW) );
 
@@ -587,10 +589,10 @@
 {
     fontEnum16 fe16;
     INT16	retVal = 0;
-    DC* 	dc = DC_GetDCPtr( hDC );
+    DC* 	dc = DC_GetDCPtr( HDC_32(hDC) );
 
     if (!dc) return 0;
-    fe16.hdc = hDC;
+    fe16.hdc = HDC_32(hDC);
     fe16.dc = dc;
     fe16.physDev = dc->physDev;
 
Index: objects/metafile.c
===================================================================
RCS file: /home/wine/wine/objects/metafile.c,v
retrieving revision 1.53
diff -u -r1.53 metafile.c
--- objects/metafile.c	18 Oct 2002 03:33:37 -0000	1.53
+++ objects/metafile.c	6 Nov 2002 23:27:08 -0000
@@ -52,6 +52,7 @@
 #include "wine/wingdi16.h"
 #include "bitmap.h"
 #include "global.h"
+#include "wownt32.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(metafile);
@@ -109,7 +110,8 @@
 HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh)
 {
     HMETAFILE hmf = 0;
-    METAFILEOBJ *metaObj = GDI_AllocObject( sizeof(METAFILEOBJ), METAFILE_MAGIC, &hmf, NULL );
+    METAFILEOBJ *metaObj = GDI_AllocObject( sizeof(METAFILEOBJ), METAFILE_MAGIC,
+					    (HGDIOBJ *)&hmf, NULL );
     if (metaObj)
     {
     metaObj->mh = mh;
@@ -593,7 +595,7 @@
 {
     BOOL16 ret;
     METAHEADER *mh = MF_GetMetaHeader16( hmf );
-    ret = MF_PlayMetaFile( hdc, mh );
+    ret = MF_PlayMetaFile( HDC_32(hdc), mh );
     MF_ReleaseMetaHeader16( hmf );
     return ret;
 }
@@ -618,12 +620,13 @@
  *            EnumMetaFile   (GDI.175)
  *
  */
-BOOL16 WINAPI EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf,
+BOOL16 WINAPI EnumMetaFile16( HDC16 hdc16, HMETAFILE16 hmf,
 			      MFENUMPROC16 lpEnumFunc, LPARAM lpData )
 {
     METAHEADER *mh = MF_GetMetaHeader16(hmf);
     METARECORD *mr;
     HANDLETABLE16 *ht;
+    HDC hdc = HDC_32(hdc16);
     HGLOBAL16 hHT;
     SEGPTR spht;
     unsigned int offset = 0;
@@ -664,7 +667,7 @@
     {
 	mr = (METARECORD *)((char *)mh + offset);
 
-        if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc, spht,
+        if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc16, spht,
                                   MAKESEGPTR( seg + (HIWORD(offset) << __AHSHIFT), LOWORD(offset) ),
                                      mh->mtNoObjects, (LONG)lpData ))
 	{
@@ -685,7 +688,7 @@
     /* free objects in handle table */
     for(i = 0; i < mh->mtNoObjects; i++)
       if(*(ht->objectHandle + i) != 0)
-        DeleteObject(*(ht->objectHandle + i));
+        DeleteObject16(*(ht->objectHandle + i));
 
     /* free handle table */
     GlobalFree16(hHT);
Index: objects/palette.c
===================================================================
RCS file: /home/wine/wine/objects/palette.c,v
retrieving revision 1.52
diff -u -r1.52 palette.c
--- objects/palette.c	18 Oct 2002 04:05:49 -0000	1.52
+++ objects/palette.c	6 Nov 2002 23:27:08 -0000
@@ -29,6 +29,7 @@
 #include "winbase.h"
 #include "windef.h"
 #include "wingdi.h"
+#include "wownt32.h"
 #include "wine/winuser16.h"
 #include "gdi.h"
 #include "palette.h"
@@ -159,7 +160,8 @@
     size = sizeof(LOGPALETTE) + (palette->palNumEntries - 1) * sizeof(PALETTEENTRY);
 
     if (!(palettePtr = GDI_AllocObject( size + sizeof(int*) +sizeof(GDIOBJHDR),
-                                        PALETTE_MAGIC, &hpalette, &palette_funcs ))) return 0;
+                                        PALETTE_MAGIC, (HGDIOBJ *)&hpalette,
+					&palette_funcs ))) return 0;
     memcpy( &palettePtr->logpalette, palette, size );
     PALETTE_ValidateFlags(palettePtr->logpalette.palPalEntry,
 			  palettePtr->logpalette.palNumEntries);
@@ -723,10 +725,10 @@
 
     TRACE("%04x\n", hdc );
 
-    if (!(dc = DC_GetDCPtr( hdc ))) return 0;
+    if (!(dc = DC_GetDCPtr( HDC_32(hdc) ))) return 0;
 
     if (dc->funcs->pRealizeDefaultPalette) ret = dc->funcs->pRealizeDefaultPalette( dc->physDev );
-    GDI_ReleaseObj( hdc );
+    GDI_ReleaseObj( HDC_32(hdc) );
     return ret;
 }
 
@@ -735,11 +737,11 @@
  */
 BOOL16 WINAPI IsDCCurrentPalette16(HDC16 hDC)
 {
-    DC *dc = DC_GetDCPtr( hDC );
+    DC *dc = DC_GetDCPtr( HDC_32(hDC) );
     if (dc)
     {
       BOOL bRet = dc->hPalette == hPrimaryPalette;
-      GDI_ReleaseObj( hDC );
+      GDI_ReleaseObj( HDC_32(hDC) );
       return bRet;
     }
     return FALSE;
Index: objects/pen.c
===================================================================
RCS file: /home/wine/wine/objects/pen.c,v
retrieving revision 1.21
diff -u -r1.21 pen.c
--- objects/pen.c	16 Aug 2002 00:42:07 -0000	1.21
+++ objects/pen.c	6 Nov 2002 23:27:08 -0000
@@ -79,7 +79,8 @@
     PENOBJ * penPtr;
     HPEN hpen;
 
-    if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen, &pen_funcs ))) return 0;
+    if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen,
+				    &pen_funcs ))) return 0;
     penPtr->logpen.lopnStyle = pen->lopnStyle;
     penPtr->logpen.lopnWidth = pen->lopnWidth;
     penPtr->logpen.lopnColor = pen->lopnColor;
@@ -106,7 +107,8 @@
 	if (brush->lbHatch)
 	    FIXME("Hatches not implemented\n");
 
-    if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen, &pen_funcs ))) return 0;
+    if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen,
+				    &pen_funcs ))) return 0;
     penPtr->logpen.lopnStyle = style & ~PS_TYPE_MASK;
 
     /* PS_USERSTYLE workaround */
Index: objects/region.c
===================================================================
RCS file: /home/wine/wine/objects/region.c,v
retrieving revision 1.51
diff -u -r1.51 region.c
--- objects/region.c	28 Aug 2002 22:35:23 -0000	1.51
+++ objects/region.c	6 Nov 2002 23:27:09 -0000
@@ -513,7 +513,8 @@
     HRGN hrgn;
     RGNOBJ *obj;
 
-    if(!(obj = GDI_AllocObject( sizeof(RGNOBJ), REGION_MAGIC, &hrgn, &region_funcs ))) return 0;
+    if(!(obj = GDI_AllocObject( sizeof(RGNOBJ), REGION_MAGIC, (HGDIOBJ *)&hrgn,
+				&region_funcs ))) return 0;
     if(!(obj->rgn = REGION_AllocWineRegion(n))) {
         GDI_FreeObject( hrgn, obj );
         return 0;

Attachment: pgp00083.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux