Commit in reactos on MAIN
iface/addsys/w32ksvc.db+11.50 -> 1.51
include/win32k/bitmaps.h+171.22 -> 1.23
lib/gdi32/objects/bitblt.c+7-851.19 -> 1.20
subsys/win32k/ntuser/msgqueue.c+2-21.78 -> 1.79
                    /window.c+1-31.201 -> 1.202
subsys/win32k/objects/bitmaps.c+118-11.64 -> 1.65
+146-91
6 modified files
Partly (not working) implementation of TransparentBlt()

reactos/iface/addsys
w32ksvc.db 1.50 -> 1.51
diff -u -r1.50 -r1.51
--- w32ksvc.db	23 Mar 2004 07:59:47 -0000	1.50
+++ w32ksvc.db	28 Mar 2004 21:46:25 -0000	1.51
@@ -274,6 +274,7 @@
 NtGdiStrokePath				1
 NtGdiSwapBuffers				1
 NtGdiTextOut				5
+NtGdiTransparentBlt         11
 NtGdiTranslateCharsetInfo		3
 NtGdiUnrealizeObject			2
 NtGdiUpdateColors			1

reactos/include/win32k
bitmaps.h 1.22 -> 1.23
diff -u -r1.22 -r1.23
--- bitmaps.h	15 Mar 2004 22:06:55 -0000	1.22
+++ bitmaps.h	28 Mar 2004 21:46:25 -0000	1.23
@@ -304,5 +304,22 @@
 	UINT			Usage,
 	DWORD			ROP
 	);
+
+BOOL
+STDCALL
+NtGdiTransparentBlt(
+	HDC			hdcDst,
+	INT			xDst,
+	INT			yDst,
+	INT			cxDst,
+	INT			cyDst,
+	HDC			hdcSrc,
+	INT			xSrc,
+	INT			ySrc,
+	INT			cxSrc,
+	INT			cySrc,
+	COLORREF	TransColor
+	);
+
 #endif
 

reactos/lib/gdi32/objects
bitblt.c 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- bitblt.c	24 Mar 2004 00:13:31 -0000	1.19
+++ bitblt.c	28 Mar 2004 21:46:26 -0000	1.20
@@ -1,13 +1,10 @@
-/* $Id: bitblt.c,v 1.19 2004/03/24 00:13:31 royce Exp $
+/* $Id: bitblt.c,v 1.20 2004/03/28 21:46:26 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
  * FILE:            lib/gdi32/object/bitblt.c
  * PURPOSE:         
  * PROGRAMMER:
- *
- * GdiTransparentBlt Copyright Kevin Koltzau
- * adapted from WINE 2-13-04
  */
 
 #ifdef UNICODE
@@ -396,87 +393,12 @@
  */
 WINBOOL
 STDCALL
-GdiTransparentBlt( HDC hdcDst, int xDst, int yDst, int cxDst, int cyDst,
-                            HDC hdcSrc, int xSrc, int ySrc, int cxSrc, int cySrc,
-                            COLORREF TransColor )
-{
-    BOOL ret = FALSE;
-    HDC hdcWork;
-    HBITMAP bmpWork;
-    HGDIOBJ oldWork;
-    HDC hdcMask = NULL;
-    HBITMAP bmpMask = NULL;
-    HBITMAP oldMask = NULL;
-    COLORREF oldBackground;
-    COLORREF oldForeground;
-    int oldStretchMode;
-
-    if(cxDst < 0 || cyDst < 0 || cxSrc < 0 || cySrc < 0) {
-        DPRINT("Can not mirror\n");
-        return FALSE;
-    }
-
-    oldBackground = SetBkColor(hdcDst, RGB(255,255,255));
-    oldForeground = SetTextColor(hdcDst, RGB(0,0,0));
-
-    /* Stretch bitmap */
-    oldStretchMode = GetStretchBltMode(hdcSrc);
-    if(oldStretchMode == BLACKONWHITE || oldStretchMode == WHITEONBLACK)
-        SetStretchBltMode(hdcSrc, COLORONCOLOR);
-    hdcWork = CreateCompatibleDC(hdcDst);
-    bmpWork = CreateCompatibleBitmap(hdcDst, cxDst, cyDst);
-    oldWork = SelectObject(hdcWork, bmpWork);
-    if(!StretchBlt(hdcWork, 0, 0, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, SRCCOPY)) {
-        DPRINT("Failed to stretch\n");
-        goto error;
-    }
-    SetBkColor(hdcWork, TransColor);
-
-    /* Create mask */
-    hdcMask = CreateCompatibleDC(hdcDst);
-    bmpMask = CreateCompatibleBitmap(hdcMask, cxDst, cyDst);
-    oldMask = SelectObject(hdcMask, bmpMask);
-    if(!BitBlt(hdcMask, 0, 0, cxDst, cyDst, hdcWork, 0, 0, SRCCOPY)) {
-        DPRINT("Failed to create mask\n");
-        goto error;
-    }
-
-    /* Replace transparent color with black */
-    SetBkColor(hdcWork, RGB(0,0,0));
-    SetTextColor(hdcWork, RGB(255,255,255));
-    if(!BitBlt(hdcWork, 0, 0, cxDst, cyDst, hdcMask, 0, 0, SRCAND)) {
-        DPRINT("Failed to mask out background\n");
-        goto error;
-    }
-
-    /* Replace non-transparent area on destination with black */
-    if(!BitBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcMask, 0, 0, SRCAND)) {
-        DPRINT("Failed to clear destination area\n");
-        goto error;
-    }
-
-    /* Draw the image */
-    if(!BitBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcWork, 0, 0, SRCPAINT)) {
-        DPRINT("Failed to paint image\n");
-        goto error;
-    }
-
-    ret = TRUE;
-error:
-    SetStretchBltMode(hdcSrc, oldStretchMode);
-    SetBkColor(hdcDst, oldBackground);
-    SetTextColor(hdcDst, oldForeground);
-    if(hdcWork) {
-        SelectObject(hdcWork, oldWork);
-        DeleteDC(hdcWork);
-    }
-    if(bmpWork) DeleteObject(bmpWork);
-    if(hdcMask) {
-        SelectObject(hdcMask, oldMask);
-        DeleteDC(hdcMask);
-    }
-    if(bmpMask) DeleteObject(bmpMask);
-    return ret;
+GdiTransparentBlt(HDC hdcDst, int xDst, int yDst, int cxDst, int cyDst,
+                  HDC hdcSrc, int xSrc, int ySrc, int cxSrc, int cySrc,
+                  COLORREF TransColor)
+{
+  return (WINBOOL)NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, 
+                                      xSrc, ySrc, cxSrc, cySrc, TransColor);
 }
 
 /*

reactos/subsys/win32k/ntuser
msgqueue.c 1.78 -> 1.79
diff -u -r1.78 -r1.79
--- msgqueue.c	28 Mar 2004 16:21:58 -0000	1.78
+++ msgqueue.c	28 Mar 2004 21:46:26 -0000	1.79
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: msgqueue.c,v 1.78 2004/03/28 16:21:58 weiden Exp $
+/* $Id: msgqueue.c,v 1.79 2004/03/28 21:46:26 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -842,7 +842,7 @@
   IntLockMessageQueue(MessageQueue);
   if (IsListEmpty(&MessageQueue->SentMessagesListHead))
     {
-      ExReleaseFastMutex(&MessageQueue->Lock);
+      IntUnLockMessageQueue(MessageQueue);
       return(FALSE);
     }
   Entry = RemoveHeadList(&MessageQueue->SentMessagesListHead);

reactos/subsys/win32k/ntuser
window.c 1.201 -> 1.202
diff -u -r1.201 -r1.202
--- window.c	23 Mar 2004 21:47:37 -0000	1.201
+++ window.c	28 Mar 2004 21:46:26 -0000	1.202
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.201 2004/03/23 21:47:37 weiden Exp $
+/* $Id: window.c,v 1.202 2004/03/28 21:46:26 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -3410,7 +3410,6 @@
   if(!hRgn)
   {
     IntReleaseWindowObject(WindowObject);
-    SetLastWin32Error(ERROR_INVALID_PARAMETER);
     return ERROR;
   }
   
@@ -3453,7 +3452,6 @@
   if(!Rect)
   {
     IntReleaseWindowObject(WindowObject);
-    SetLastWin32Error(ERROR_INVALID_PARAMETER);
     return ERROR;
   }
   

reactos/subsys/win32k/objects
bitmaps.c 1.64 -> 1.65
diff -u -r1.64 -r1.65
--- bitmaps.c	22 Mar 2004 20:46:33 -0000	1.64
+++ bitmaps.c	28 Mar 2004 21:46:26 -0000	1.65
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: bitmaps.c,v 1.64 2004/03/22 20:46:33 royce Exp $ */
+/* $Id: bitmaps.c,v 1.65 2004/03/28 21:46:26 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -263,6 +263,123 @@
 	return Status;
 }
 
+BOOL STDCALL
+NtGdiTransparentBlt(
+	HDC			hdcDst,
+	INT			xDst,
+	INT			yDst,
+	INT			cxDst,
+	INT			cyDst,
+	HDC			hdcSrc,
+	INT			xSrc,
+	INT			ySrc,
+	INT			cxSrc,
+	INT			cySrc,
+	COLORREF	TransColor)
+{
+  PDC DCDest, DCSrc;
+  RECT rcDest, rcSrc;
+  PSURFOBJ SurfDest, SurfSrc;
+  PSURFGDI SurfGDIDest, SurfGDISrc;
+  PXLATEOBJ XlateObj;
+  HPALETTE SourcePalette, DestPalette;
+  PPALGDI PalDestGDI, PalSourceGDI;
+  USHORT PalDestMode, PalSrcMode;
+  
+  if(!(DCDest = DC_LockDc(hdcDst)))
+  {
+    DPRINT1("Invalid destination dc handle (0x%08x) passed to NtGdiTransparentBlt\n", hdcDst);
+    SetLastWin32Error(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+  
+  if((hdcDst != hdcSrc) && !(DCSrc = DC_LockDc(hdcSrc)))
+  {
+    DC_UnlockDc(hdcDst);
+    DPRINT1("Invalid source dc handle (0x%08x) passed to NtGdiTransparentBlt\n", hdcSrc);
+    SetLastWin32Error(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+  if(hdcDst == hdcSrc)
+  {
+    DCSrc = DCDest;
+  }
+  
+  if(DCDest->w.hPalette)
+    DestPalette = DCDest->w.hPalette;
+  else
+    DestPalette = NtGdiGetStockObject(DEFAULT_PALETTE);
+  
+  if(DCSrc->w.hPalette)
+    SourcePalette = DCSrc->w.hPalette;
+  else
+    SourcePalette = NtGdiGetStockObject(DEFAULT_PALETTE);
+  
+  if(!(PalSourceGDI = PALETTE_LockPalette(SourcePalette)))
+  {
+    DC_UnlockDc(hdcSrc);
+    DC_UnlockDc(hdcDst);
+    SetLastWin32Error(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+  if((DestPalette != SourcePalette) && !(PalDestGDI = PALETTE_LockPalette(DestPalette)))
+  {
+    PALETTE_UnlockPalette(SourcePalette);
+    DC_UnlockDc(hdcSrc);
+    DC_UnlockDc(hdcDst);
+    SetLastWin32Error(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+  if(DestPalette != SourcePalette)
+  {
+    PalDestMode = PalDestGDI->Mode;
+    PalSrcMode = PalSourceGDI->Mode;
+    PALETTE_UnlockPalette(DestPalette);
+  }
+  else
+  {
+    PalDestMode = PalSrcMode = PalSourceGDI->Mode;
+  }
+  PALETTE_UnlockPalette(SourcePalette);
+  
+  XlateObj = (PXLATEOBJ)IntEngCreateXlate(PalDestMode, PalSrcMode, DestPalette, SourcePalette);
+  
+  SurfDest = (PSURFOBJ)AccessUserObject((ULONG)DCDest->Surface);
+  ASSERT(SurfDest);
+  SurfGDIDest = (PSURFGDI)AccessInternalObjectFromUserObject(SurfDest);
+  ASSERT(SurfGDIDest);
+  SurfSrc = (PSURFOBJ)AccessUserObject((ULONG)DCSrc->Surface);
+  ASSERT(SurfSrc);
+  SurfGDISrc = (PSURFGDI)AccessInternalObjectFromUserObject(SurfSrc);
+  ASSERT(SurfGDISrc);
+  
+  rcDest.left = xDst;
+  rcDest.top = yDst;
+  rcDest.right = rcDest.left + cxDst;
+  rcDest.bottom = rcDest.bottom + cyDst;
+  rcSrc.left = xSrc;
+  rcSrc.top = ySrc;
+  rcSrc.right = rcDest.left + cxSrc;
+  rcSrc.bottom = rcDest.bottom + cySrc;
+  
+  if((cxDst != cxSrc) || (cyDst != cySrc))
+  {
+    /* FIXME - Create a temporary bitmap and stretchblt it */
+  }
+  
+  
+  DC_UnlockDc(hdcSrc);
+  if(hdcDst != hdcSrc)
+  {
+    DC_UnlockDc(hdcDst);
+  }
+  if(XlateObj)
+  {
+    EngDeleteXlate(XlateObj);
+  }
+  return TRUE;
+}
+
 HBITMAP STDCALL
 NtGdiCreateBitmap(
 	INT  Width,
CVSspam 0.2.8