warnings, warnings, everywhere.... but not so many any more.

svn path=/trunk/; revision=5536
This commit is contained in:
Royce Mitchell III 2003-08-11 21:10:49 +00:00
parent 0eeded0a9a
commit 4504834722
23 changed files with 218 additions and 137 deletions

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: clip.c,v 1.15 2003/07/14 17:35:31 gvg Exp $ /* $Id: clip.c,v 1.16 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -42,7 +42,7 @@ VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj)
FreeGDIHandle(HClip); FreeGDIHandle(HClip);
} }
CLIPOBJ STDCALL * CLIPOBJ* STDCALL
IntEngCreateClipRegion(ULONG count, PRECTL pRect, RECTL rcBounds) IntEngCreateClipRegion(ULONG count, PRECTL pRect, RECTL rcBounds)
{ {
HCLIP hClip; HCLIP hClip;

View file

@ -20,7 +20,7 @@
#define __WIN32K_CLIP_H #define __WIN32K_CLIP_H
typedef ULONG HCLIP; typedef ULONG HCLIP;
CLIPOBJ STDCALL * IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds ); CLIPOBJ* STDCALL IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds );
VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj); VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj);

View file

@ -3,14 +3,22 @@
#include <win32k/dc.h> #include <win32k/dc.h>
INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse); INT FASTCALL
HBITMAP STDCALL DIB_CreateDIBSection (PDC dc, PBITMAPINFO bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch); DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
INT STDCALL DIB_GetBitmapInfo (const BITMAPINFOHEADER *header, PDWORD width, PINT height, PWORD bpp, PWORD compr); HBITMAP STDCALL
INT STDCALL DIB_GetDIBImageBytes (INT width, INT height, INT depth); DIB_CreateDIBSection (PDC dc, PBITMAPINFO bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch);
INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth); INT STDCALL
RGBQUAD * FASTCALL DIB_MapPaletteColors (PDC dc, LPBITMAPINFO lpbmi); DIB_GetBitmapInfo (const BITMAPINFOHEADER *header, PDWORD width, PINT height, PWORD bpp, PWORD compr);
INT STDCALL
DIB_GetDIBImageBytes (INT width, INT height, INT depth);
INT FASTCALL
DIB_GetDIBWidthBytes (INT width, INT depth);
RGBQUAD * FASTCALL
DIB_MapPaletteColors(PDC dc, CONST BITMAPINFO* lpbmi);
PPALETTEENTRY STDCALL
DIBColorTableToPaletteEntries(PPALETTEENTRY palEntries, const RGBQUAD *DIBColorTable, ULONG ColorCount);
HPALETTE FASTCALL
BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType);
PPALETTEENTRY STDCALL DIBColorTableToPaletteEntries(PPALETTEENTRY palEntries, const RGBQUAD *DIBColorTable, ULONG ColorCount);
HPALETTE FASTCALL BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType);
#endif /* __WIN32K_DIB_H */ #endif /* __WIN32K_DIB_H */

View file

@ -35,7 +35,7 @@ BOOL STDCALL IntEngPolyline(SURFOBJ *DestSurf,
CONST LPPOINT pt, CONST LPPOINT pt,
LONG dCount, LONG dCount,
MIX mix); MIX mix);
CLIPOBJ STDCALL * IntEngCreateClipRegion(ULONG count, CLIPOBJ* STDCALL IntEngCreateClipRegion(ULONG count,
PRECTL pRect, PRECTL pRect,
RECTL rcBounds); RECTL rcBounds);
#endif #endif

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: class.c,v 1.27 2003/08/11 10:30:19 gvg Exp $ /* $Id: class.c,v 1.28 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -212,10 +212,10 @@ W32kGetClassName(struct _WINDOW_OBJECT *WindowObject,
return((RTL_ATOM)0); return((RTL_ATOM)0);
} }
length = 0; length = 0;
Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,(RTL_ATOM)WindowObject->Class->lpszClassName,NULL,NULL,name,&length); Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,(RTL_ATOM)(size_t)WindowObject->Class->lpszClassName,NULL,NULL,name,&length);
name = ExAllocatePool(PagedPool,length+1); name = ExAllocatePool(PagedPool,length+1);
free = TRUE; free = TRUE;
Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,(RTL_ATOM)WindowObject->Class->lpszClassName,NULL,NULL,name,&length); Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,(RTL_ATOM)(size_t)WindowObject->Class->lpszClassName,NULL,NULL,name,&length);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT("Validation of window station handle (0x%X) failed\n", DPRINT("Validation of window station handle (0x%X) failed\n",

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: input.c,v 1.10 2003/08/04 16:54:54 gdalsnes Exp $ /* $Id: input.c,v 1.11 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -53,7 +53,7 @@ static BOOLEAN InputThreadsRunning = FALSE;
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS STDCALL STATIC VOID STDCALL_FUNC STATIC
KeyboardThreadMain(PVOID StartContext) KeyboardThreadMain(PVOID StartContext)
{ {
UNICODE_STRING KeyboardDeviceName; UNICODE_STRING KeyboardDeviceName;
@ -76,7 +76,7 @@ KeyboardThreadMain(PVOID StartContext)
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("W32K: Failed to open keyboard.\n"); DbgPrint("W32K: Failed to open keyboard.\n");
return(Status); return; //(Status);
} }
for (;;) for (;;)
@ -119,7 +119,7 @@ KeyboardThreadMain(PVOID StartContext)
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("W32K: Failed to read from keyboard.\n"); DbgPrint("W32K: Failed to read from keyboard.\n");
return(Status); return; //(Status);
} }
SysKey = KeyEvent.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED); SysKey = KeyEvent.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: keyboard.c,v 1.6 2003/07/29 23:03:01 jimtabor Exp $ /* $Id: keyboard.c,v 1.7 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -318,7 +318,7 @@ NTSTATUS STDCALL LdrGetProcedureAddress(PVOID module,
void InitKbdLayout( PVOID *pkKeyboardLayout ) { void InitKbdLayout( PVOID *pkKeyboardLayout ) {
HMODULE kbModule = 0; HMODULE kbModule = 0;
ANSI_STRING kbdProcedureName; ANSI_STRING kbdProcedureName;
NTSTATUS Status; //NTSTATUS Status;
KbdLayerDescriptor layerDescGetFn; KbdLayerDescriptor layerDescGetFn;
@ -333,7 +333,7 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) {
LdrGetProcedureAddress((PVOID)kbModule, LdrGetProcedureAddress((PVOID)kbModule,
&kbdProcedureName, &kbdProcedureName,
0, 0,
&layerDescGetFn); (PVOID*)&layerDescGetFn);
if( layerDescGetFn ) { if( layerDescGetFn ) {
*pkKeyboardLayout = layerDescGetFn(); *pkKeyboardLayout = layerDescGetFn();
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: menu.c,v 1.13 2003/08/07 10:25:59 weiden Exp $ /* $Id: menu.c,v 1.14 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -171,7 +171,8 @@ W32kFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem,
if(bRecurse && MenuItem->MenuItem.hSubMenu) if(bRecurse && MenuItem->MenuItem.hSubMenu)
{ {
PMENU_OBJECT SubMenuObject; PMENU_OBJECT SubMenuObject;
SubMenuObject = W32kGetWindowObject(MenuItem->MenuItem.hSubMenu); SubMenuObject = (PMENU_OBJECT)W32kGetWindowObject(
MenuItem->MenuItem.hSubMenu );
if(SubMenuObject) if(SubMenuObject)
{ {
W32kDestroyMenuObject(SubMenuObject, bRecurse); W32kDestroyMenuObject(SubMenuObject, bRecurse);

View file

@ -1,4 +1,4 @@
/* $Id: misc.c,v 1.3 2003/08/06 13:17:44 weiden Exp $ /* $Id: misc.c,v 1.4 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -54,7 +54,7 @@ NtUserCallOneParam(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
Result = WindowObject->Menu; Result = (DWORD)WindowObject->Menu;
W32kReleaseWindowObject(WindowObject); W32kReleaseWindowObject(WindowObject);
return Result; return Result;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: painting.c,v 1.25 2003/08/11 19:05:27 gdalsnes Exp $ /* $Id: painting.c,v 1.26 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -860,7 +860,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs)
HRGN UpdateRegion; HRGN UpdateRegion;
RECT ClientRect; RECT ClientRect;
RECT ClipRect; RECT ClipRect;
NTSTATUS Status; //NTSTATUS Status;
INT DcxFlags; INT DcxFlags;
if (!(Window = W32kGetWindowObject(hWnd))) if (!(Window = W32kGetWindowObject(hWnd)))

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: timer.c,v 1.8 2003/07/29 18:17:53 hbirr Exp $ /* $Id: timer.c,v 1.9 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -309,7 +309,7 @@ NtUserSetSystemTimer(
} }
static NTSTATUS STDCALL static VOID STDCALL_FUNC
TimerThreadMain( TimerThreadMain(
PVOID StartContext PVOID StartContext
) )

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: window.c,v 1.86 2003/08/11 19:05:26 gdalsnes Exp $ /* $Id: window.c,v 1.87 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -2419,9 +2419,8 @@ W32kSetParent(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndNewParent)
{ {
if (!(Wnd->Style & WS_CHILD)) if (!(Wnd->Style & WS_CHILD))
{ {
HMENU Menu = Wnd->Menu; //if ( Wnd->Menu ) DestroyMenu ( Wnd->menu );
Wnd->Menu = NULL; Wnd->Menu = NULL;
//if (Menu) DestroyMenu( menu );
} }
} }
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: winpos.c,v 1.22 2003/08/11 19:05:26 gdalsnes Exp $ /* $Id: winpos.c,v 1.23 2003/08/11 21:10:49 royce Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -117,7 +117,7 @@ WinPosCreateIconTitle(PWINDOW_OBJECT WindowObject)
BOOL STATIC FASTCALL BOOL STATIC FASTCALL
WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show) WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show)
{ {
PINTERNALPOS InternalPos = W32kGetProp(WindowObject, AtomInternalPos); PINTERNALPOS InternalPos = (PINTERNALPOS)W32kGetProp(WindowObject, AtomInternalPos);
PWINDOW_OBJECT IconWindow; PWINDOW_OBJECT IconWindow;
NTSTATUS Status; NTSTATUS Status;
@ -160,7 +160,7 @@ WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show)
PINTERNALPOS STATIC STDCALL PINTERNALPOS STATIC STDCALL
WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect) WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect)
{ {
PINTERNALPOS InternalPos = W32kGetProp(WindowObject, AtomInternalPos); PINTERNALPOS InternalPos = (PINTERNALPOS)W32kGetProp(WindowObject, AtomInternalPos);
if (InternalPos == NULL) if (InternalPos == NULL)
{ {
InternalPos = InternalPos =
@ -325,7 +325,7 @@ WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos,
MinMax.ptMaxSize.x += 2 * XInc; MinMax.ptMaxSize.x += 2 * XInc;
MinMax.ptMaxSize.y += 2 * YInc; MinMax.ptMaxSize.y += 2 * YInc;
Pos = W32kGetProp(Window, AtomInternalPos); Pos = (PINTERNALPOS)W32kGetProp(Window, AtomInternalPos);
if (Pos != NULL) if (Pos != NULL)
{ {
MinMax.ptMaxPosition = Pos->MaxPos; MinMax.ptMaxPosition = Pos->MaxPos;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: bezier.c,v 1.3 2003/05/18 17:16:17 ea Exp $ */ /* $Id: bezier.c,v 1.4 2003/08/11 21:10:49 royce Exp $ */
#include <windows.h> #include <windows.h>
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
#include <math.h> #include <math.h>
@ -63,7 +63,15 @@
#define BEZIERMIDDLE(Mid, P1, P2) \ #define BEZIERMIDDLE(Mid, P1, P2) \
(Mid).x=((P1).x+(P2).x + 1)/2;\ (Mid).x=((P1).x+(P2).x + 1)/2;\
(Mid).y=((P1).y+(P2).y + 1)/2; (Mid).y=((P1).y+(P2).y + 1)/2;
static int abs ( int __x )
{
if ( __x < 0 )
return -__x;
else
return __x;
}
/********************************************************** /**********************************************************
* BezierCheck helper function to check * BezierCheck helper function to check
* that recursion can be terminated * that recursion can be terminated
@ -78,40 +86,61 @@ static BOOL FASTCALL BezierCheck( int level, POINT *Points)
dx=Points[3].x-Points[0].x; dx=Points[3].x-Points[0].x;
dy=Points[3].y-Points[0].y; dy=Points[3].y-Points[0].y;
if(abs(dy)<=abs(dx)) {/* shallow line */ if ( abs(dy) <= abs(dx) ) /* shallow line */
{
/* check that control points are between begin and end */ /* check that control points are between begin and end */
if(Points[1].x < Points[0].x){ if ( Points[1].x < Points[0].x )
if(Points[1].x < Points[3].x) return FALSE; {
}else if ( Points[1].x < Points[3].x )
if(Points[1].x > Points[3].x) return FALSE; return FALSE;
if(Points[2].x < Points[0].x) { }
if(Points[2].x < Points[3].x) return FALSE; else if ( Points[1].x > Points[3].x )
} else return FALSE;
if(Points[2].x > Points[3].x) return FALSE; if ( Points[2].x < Points[0].x)
dx=BEZIERSHIFTDOWN(dx); {
if(!dx) return TRUE; if ( Points[2].x < Points[3].x )
if(abs(Points[1].y-Points[0].y-(dy/dx)* return FALSE;
BEZIERSHIFTDOWN(Points[1].x-Points[0].x)) > BEZIERPIXEL || }
abs(Points[2].y-Points[0].y-(dy/dx)* else if ( Points[2].x > Points[3].x )
BEZIERSHIFTDOWN(Points[2].x-Points[0].x)) > BEZIERPIXEL) return FALSE; return FALSE;
dx = BEZIERSHIFTDOWN(dx);
if ( !dx )
return TRUE;
if ( abs(Points[1].y-Points[0].y-(dy/dx)*
BEZIERSHIFTDOWN(Points[1].x-Points[0].x)) > BEZIERPIXEL ||
abs(Points[2].y-Points[0].y-(dy/dx)*
BEZIERSHIFTDOWN(Points[2].x-Points[0].x)) > BEZIERPIXEL
)
return FALSE;
else else
return TRUE; return TRUE;
} else{ /* steep line */ }
else
{ /* steep line */
/* check that control points are between begin and end */ /* check that control points are between begin and end */
if(Points[1].y < Points[0].y){ if(Points[1].y < Points[0].y)
if(Points[1].y < Points[3].y) return FALSE; {
} else if(Points[1].y < Points[3].y)
if(Points[1].y > Points[3].y) return FALSE; return FALSE;
if(Points[2].y < Points[0].y){ }
if(Points[2].y < Points[3].y) return FALSE; else if(Points[1].y > Points[3].y)
} else return FALSE;
if(Points[2].y > Points[3].y) return FALSE; if ( Points[2].y < Points[0].y )
dy=BEZIERSHIFTDOWN(dy); {
if(!dy) return TRUE; if ( Points[2].y < Points[3].y )
if(abs(Points[1].x-Points[0].x-(dx/dy)* return FALSE;
}
else if ( Points[2].y > Points[3].y )
return FALSE;
dy = BEZIERSHIFTDOWN(dy);
if ( !dy )
return TRUE;
if ( abs(Points[1].x-Points[0].x-(dx/dy)*
BEZIERSHIFTDOWN(Points[1].y-Points[0].y)) > BEZIERPIXEL || BEZIERSHIFTDOWN(Points[1].y-Points[0].y)) > BEZIERPIXEL ||
abs(Points[2].x-Points[0].x-(dx/dy)* abs(Points[2].x-Points[0].x-(dx/dy)*
BEZIERSHIFTDOWN(Points[2].y-Points[0].y)) > BEZIERPIXEL ) return FALSE; BEZIERSHIFTDOWN(Points[2].y-Points[0].y)) > BEZIERPIXEL
)
return FALSE;
else else
return TRUE; return TRUE;
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: cliprgn.c,v 1.18 2003/07/14 17:36:59 gvg Exp $ */ /* $Id: cliprgn.c,v 1.19 2003/08/11 21:10:49 royce Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -76,7 +76,7 @@ CLIPPING_UpdateGCRegion(DC* Dc)
} }
Dc->CombinedClip = IntEngCreateClipRegion(CombinedRegion->rdh.nCount, Dc->CombinedClip = IntEngCreateClipRegion(CombinedRegion->rdh.nCount,
CombinedRegion->Buffer, (PRECTL)CombinedRegion->Buffer,
CombinedRegion->rdh.rcBound); CombinedRegion->rdh.rcBound);
ASSERT(NULL != Dc->CombinedClip); ASSERT(NULL != Dc->CombinedClip);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: color.c,v 1.17 2003/05/18 17:16:17 ea Exp $ */ /* $Id: color.c,v 1.18 2003/08/11 21:10:49 royce Exp $ */
// FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping // FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping
@ -42,7 +42,7 @@ int COLOR_gapFilled = 0;
int COLOR_max = 256; int COLOR_max = 256;
static HPALETTE hPrimaryPalette = 0; // used for WM_PALETTECHANGED static HPALETTE hPrimaryPalette = 0; // used for WM_PALETTECHANGED
static HPALETTE hLastRealizedPalette = 0; // UnrealizeObject() needs it //static HPALETTE hLastRealizedPalette = 0; // UnrealizeObject() needs it
const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] = const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] =
{ {
@ -77,7 +77,7 @@ const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] =
ULONG FASTCALL W32kGetSysColor(int nIndex) ULONG FASTCALL W32kGetSysColor(int nIndex)
{ {
PALETTEENTRY *p = COLOR_sysPalTemplate + (nIndex * sizeof(PALETTEENTRY)); const PALETTEENTRY *p = COLOR_sysPalTemplate + (nIndex * sizeof(PALETTEENTRY));
return RGB(p->peRed, p->peGreen, p->peBlue); return RGB(p->peRed, p->peGreen, p->peBlue);
} }
@ -167,10 +167,14 @@ HPALETTE STDCALL W32kCreatePalette(CONST PLOGPALETTE palette)
{ {
PPALOBJ PalObj; PPALOBJ PalObj;
HPALETTE NewPalette = (HPALETTE)EngCreatePalette(PAL_INDEXED, palette->palNumEntries, (PULONG*) palette->palPalEntry, 0, 0, 0); HPALETTE NewPalette = (HPALETTE)EngCreatePalette(
PAL_INDEXED,
palette->palNumEntries,
(PULONG)palette->palPalEntry,
0, 0, 0);
ULONG size; ULONG size;
PalObj = (PPALOBJ)AccessUserObject(NewPalette); PalObj = (PPALOBJ)AccessUserObject ( (ULONG)NewPalette );
size = sizeof(LOGPALETTE) + (palette->palNumEntries * sizeof(PALETTEENTRY)); size = sizeof(LOGPALETTE) + (palette->palNumEntries * sizeof(PALETTEENTRY));
PalObj->logpalette = ExAllocatePool(NonPagedPool, size); PalObj->logpalette = ExAllocatePool(NonPagedPool, size);
@ -197,7 +201,7 @@ COLORREF STDCALL W32kGetNearestColor(HDC hDC,
if( (dc = DC_HandleToPtr(hDC) ) ) if( (dc = DC_HandleToPtr(hDC) ) )
{ {
HPALETTE hpal = (dc->w.hPalette)? dc->w.hPalette : W32kGetStockObject(DEFAULT_PALETTE); HPALETTE hpal = (dc->w.hPalette)? dc->w.hPalette : W32kGetStockObject(DEFAULT_PALETTE);
palObj = (PPALOBJ)AccessUserObject(hpal); palObj = (PPALOBJ)AccessUserObject((ULONG)hpal);
if (!palObj) { if (!palObj) {
// GDI_ReleaseObj(hdc); // GDI_ReleaseObj(hdc);
return nearest; return nearest;
@ -216,7 +220,7 @@ COLORREF STDCALL W32kGetNearestColor(HDC hDC,
UINT STDCALL W32kGetNearestPaletteIndex(HPALETTE hpal, UINT STDCALL W32kGetNearestPaletteIndex(HPALETTE hpal,
COLORREF Color) COLORREF Color)
{ {
PPALOBJ palObj = (PPALOBJ)AccessUserObject(hpal); PPALOBJ palObj = (PPALOBJ)AccessUserObject((ULONG)hpal);
UINT index = 0; UINT index = 0;
if( palObj ) if( palObj )
@ -237,7 +241,7 @@ UINT STDCALL W32kGetPaletteEntries(HPALETTE hpal,
PPALOBJ palPtr; PPALOBJ palPtr;
UINT numEntries; UINT numEntries;
palPtr = (PPALOBJ)AccessUserObject(hpal); palPtr = (PPALOBJ)AccessUserObject((ULONG)hpal);
if (!palPtr) return 0; if (!palPtr) return 0;
numEntries = palPtr->logpalette->palNumEntries; numEntries = palPtr->logpalette->palNumEntries;
@ -264,8 +268,8 @@ UINT STDCALL W32kGetSystemPaletteEntries(HDC hDC,
UINT Entries, UINT Entries,
LPPALETTEENTRY pe) LPPALETTEENTRY pe)
{ {
UINT i; //UINT i;
PDC dc; //PDC dc;
/* /*
if (!(dc = AccessUserObject(hdc))) return 0; if (!(dc = AccessUserObject(hdc))) return 0;
@ -291,11 +295,14 @@ UINT STDCALL W32kGetSystemPaletteEntries(HDC hDC,
done: done:
// GDI_ReleaseObj(hdc); // GDI_ReleaseObj(hdc);
return count; */ return count; */
// FIXME UNIMPLEMENTED;
return 0;
} }
UINT STDCALL W32kGetSystemPaletteUse(HDC hDC) UINT STDCALL W32kGetSystemPaletteUse(HDC hDC)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return 0;
} }
/*! /*!
@ -327,12 +334,12 @@ UINT STDCALL W32kRealizePalette(HDC hDC)
if (!dc) if (!dc)
return 0; return 0;
palPtr = (PPALOBJ)AccessUserObject(dc->w.hPalette); palPtr = (PPALOBJ)AccessUserObject((ULONG)dc->w.hPalette);
SurfGDI = (PSURFGDI)AccessInternalObjectFromUserObject(dc->Surface); SurfGDI = (PSURFGDI)AccessInternalObjectFromUserObject(dc->Surface);
systemPalette = W32kGetStockObject(STOCK_DEFAULT_PALETTE); systemPalette = W32kGetStockObject((INT)STOCK_DEFAULT_PALETTE);
sysPtr = (PPALOBJ)AccessInternalObject(systemPalette); sysPtr = (PPALOBJ)AccessInternalObject((ULONG)systemPalette);
palGDI = (PPALGDI)AccessInternalObject(dc->w.hPalette); palGDI = (PPALGDI)AccessInternalObject((ULONG)dc->w.hPalette);
sysGDI = (PPALGDI)AccessInternalObject(systemPalette); sysGDI = (PPALGDI)AccessInternalObject((ULONG)systemPalette);
// Step 1: Create mapping of system palette\DC palette // Step 1: Create mapping of system palette\DC palette
realized = PALETTE_SetMapping(palPtr, 0, palPtr->logpalette->palNumEntries, realized = PALETTE_SetMapping(palPtr, 0, palPtr->logpalette->palNumEntries,
@ -453,7 +460,7 @@ UINT STDCALL W32kSetPaletteEntries(HPALETTE hpal,
PPALOBJ palPtr; PPALOBJ palPtr;
INT numEntries; INT numEntries;
palPtr = (PPALOBJ)AccessUserObject(hpal); palPtr = (PPALOBJ)AccessUserObject((ULONG)hpal);
if (!palPtr) return 0; if (!palPtr) return 0;
numEntries = palPtr->logpalette->palNumEntries; numEntries = palPtr->logpalette->palNumEntries;
@ -484,9 +491,9 @@ BOOL STDCALL W32kUnrealizeObject(HGDIOBJ hgdiobj)
BOOL STDCALL W32kUpdateColors(HDC hDC) BOOL STDCALL W32kUpdateColors(HDC hDC)
{ {
PDC dc; //PDC dc;
HWND hWnd; //HWND hWnd;
int size; //int size;
/* /*
if (!(dc = AccessUserObject(hDC))) return 0; if (!(dc = AccessUserObject(hDC))) return 0;
size = dc->GDIInfo->ulNumPalReg; size = dc->GDIInfo->ulNumPalReg;
@ -500,6 +507,7 @@ BOOL STDCALL W32kUpdateColors(HDC hDC)
// but it would take forever given the speed of XGet/PutPixel. // but it would take forever given the speed of XGet/PutPixel.
if (hWnd && size) Callout.RedrawWindow( hWnd, NULL, 0, RDW_INVALIDATE ); if (hWnd && size) Callout.RedrawWindow( hWnd, NULL, 0, RDW_INVALIDATE );
} */ } */
// FIXME UNIMPLEMENTED
return 0x666; return 0x666;
} }

View file

@ -1,5 +1,5 @@
/* /*
* $Id: dib.c,v 1.23 2003/06/06 10:17:44 gvg Exp $ * $Id: dib.c,v 1.24 2003/08/11 21:10:49 royce Exp $
* *
* ReactOS W32 Subsystem * ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@ -44,11 +44,11 @@ UINT STDCALL W32kSetDIBColorTable(HDC hDC,
PDC dc; PDC dc;
PALETTEENTRY * palEntry; PALETTEENTRY * palEntry;
PPALOBJ palette; PPALOBJ palette;
RGBQUAD *end; const RGBQUAD *end;
if (!(dc = (PDC)AccessUserObject(hDC))) return 0; if (!(dc = (PDC)AccessUserObject((ULONG)hDC))) return 0;
if (!(palette = (PPALOBJ)AccessUserObject(dc->DevInfo->hpalDefault))) if (!(palette = (PPALOBJ)AccessUserObject((ULONG)dc->DevInfo->hpalDefault)))
{ {
// GDI_ReleaseObj( hdc ); // GDI_ReleaseObj( hdc );
return 0; return 0;
@ -56,7 +56,8 @@ UINT STDCALL W32kSetDIBColorTable(HDC hDC,
// Transfer color info // Transfer color info
if (dc->w.bitsPerPixel <= 8) { if (dc->w.bitsPerPixel <= 8)
{
palEntry = palette->logpalette->palPalEntry + StartIndex; palEntry = palette->logpalette->palPalEntry + StartIndex;
if (StartIndex + Entries > (1 << dc->w.bitsPerPixel)) if (StartIndex + Entries > (1 << dc->w.bitsPerPixel))
Entries = (1 << dc->w.bitsPerPixel) - StartIndex; Entries = (1 << dc->w.bitsPerPixel) - StartIndex;
@ -70,7 +71,9 @@ UINT STDCALL W32kSetDIBColorTable(HDC hDC,
palEntry->peGreen = Colors->rgbGreen; palEntry->peGreen = Colors->rgbGreen;
palEntry->peBlue = Colors->rgbBlue; palEntry->peBlue = Colors->rgbBlue;
} }
} else { }
else
{
Entries = 0; Entries = 0;
} }
@ -81,13 +84,15 @@ UINT STDCALL W32kSetDIBColorTable(HDC hDC,
} }
// Converts a DIB to a device-dependent bitmap // Converts a DIB to a device-dependent bitmap
INT STDCALL W32kSetDIBits(HDC hDC, INT STDCALL
HBITMAP hBitmap, W32kSetDIBits(
UINT StartScan, HDC hDC,
UINT ScanLines, HBITMAP hBitmap,
CONST VOID *Bits, UINT StartScan,
CONST BITMAPINFO *bmi, UINT ScanLines,
UINT ColorUse) CONST VOID *Bits,
CONST BITMAPINFO *bmi,
UINT ColorUse)
{ {
DC *dc; DC *dc;
BITMAPOBJ *bitmap; BITMAPOBJ *bitmap;
@ -104,7 +109,7 @@ INT STDCALL W32kSetDIBits(HDC hDC,
RGBQUAD *lpRGB; RGBQUAD *lpRGB;
HPALETTE DDB_Palette, DIB_Palette; HPALETTE DDB_Palette, DIB_Palette;
ULONG DDB_Palette_Type, DIB_Palette_Type; ULONG DDB_Palette_Type, DIB_Palette_Type;
PBYTE vBits = Bits; const BYTE* vBits = (const BYTE*)Bits;
INT scanDirection = 1, DIBWidth; INT scanDirection = 1, DIBWidth;
// Check parameters // Check parameters
@ -195,18 +200,20 @@ INT STDCALL W32kSetDIBits(HDC hDC,
return result; return result;
} }
INT STDCALL W32kSetDIBitsToDevice(HDC hDC, INT STDCALL
INT XDest, W32kSetDIBitsToDevice(
INT YDest, HDC hDC,
DWORD Width, INT XDest,
DWORD Height, INT YDest,
INT XSrc, DWORD Width,
INT YSrc, DWORD Height,
UINT StartScan, INT XSrc,
UINT ScanLines, INT YSrc,
CONST VOID *Bits, UINT StartScan,
CONST BITMAPINFO *bmi, UINT ScanLines,
UINT ColorUse) CONST VOID *Bits,
CONST BITMAPINFO *bmi,
UINT ColorUse)
{ {
} }
@ -854,7 +861,8 @@ PBITMAPOBJ FASTCALL DIBtoDDB(HGLOBAL hPackedDIB, HDC hdc) // FIXME: This should
return pBmp; return pBmp;
} }
RGBQUAD * FASTCALL DIB_MapPaletteColors(PDC dc, LPBITMAPINFO lpbmi) RGBQUAD * FASTCALL
DIB_MapPaletteColors(PDC dc, CONST BITMAPINFO* lpbmi)
{ {
RGBQUAD *lpRGB; RGBQUAD *lpRGB;
int nNumColors,i; int nNumColors,i;
@ -863,7 +871,8 @@ RGBQUAD * FASTCALL DIB_MapPaletteColors(PDC dc, LPBITMAPINFO lpbmi)
palObj = AccessUserObject(dc->DevInfo->hpalDefault); palObj = AccessUserObject(dc->DevInfo->hpalDefault);
if (palObj == NULL) { if (palObj == NULL)
{
// RELEASEDCINFO(hDC); // RELEASEDCINFO(hDC);
return NULL; return NULL;
} }
@ -875,7 +884,8 @@ RGBQUAD * FASTCALL DIB_MapPaletteColors(PDC dc, LPBITMAPINFO lpbmi)
lpRGB = (RGBQUAD *)ExAllocatePool(NonPagedPool, sizeof(RGBQUAD) * nNumColors); lpRGB = (RGBQUAD *)ExAllocatePool(NonPagedPool, sizeof(RGBQUAD) * nNumColors);
lpIndex = (DWORD *)&lpbmi->bmiColors[0]; lpIndex = (DWORD *)&lpbmi->bmiColors[0];
for (i=0; i<nNumColors; i++) { for (i=0; i<nNumColors; i++)
{
lpRGB[i].rgbRed = palObj->logpalette->palPalEntry[*lpIndex].peRed; lpRGB[i].rgbRed = palObj->logpalette->palPalEntry[*lpIndex].peRed;
lpRGB[i].rgbGreen = palObj->logpalette->palPalEntry[*lpIndex].peGreen; lpRGB[i].rgbGreen = palObj->logpalette->palPalEntry[*lpIndex].peGreen;
lpRGB[i].rgbBlue = palObj->logpalette->palPalEntry[*lpIndex].peBlue; lpRGB[i].rgbBlue = palObj->logpalette->palPalEntry[*lpIndex].peBlue;

View file

@ -19,7 +19,7 @@
/* /*
* GDIOBJ.C - GDI object manipulation routines * GDIOBJ.C - GDI object manipulation routines
* *
* $Id: gdiobj.c,v 1.33 2003/08/04 19:08:26 royce Exp $ * $Id: gdiobj.c,v 1.34 2003/08/11 21:10:49 royce Exp $
* *
*/ */
@ -594,7 +594,8 @@ GDIOBJ_LockObjDbg ( const char* file, int line, HGDIOBJ hObj, WORD Magic )
) )
) )
{ {
DPRINT1("GDIBOJ_LockObj failed for %d, magic: %d, reqMagic\n",(WORD) hObj & 0xffff, handleEntry->wMagic, Magic); DPRINT1("GDIBOJ_LockObj failed for %d, magic: %d, reqMagic\n",
(WORD)((size_t)hObj&0xffff), handleEntry->wMagic, Magic);
DPRINT1("\tcalled from: %s:%i\n", file, line ); DPRINT1("\tcalled from: %s:%i\n", file, line );
return NULL; return NULL;
} }
@ -629,9 +630,10 @@ GDIOBJ_UnlockObjDbg ( const char* file, int line, HGDIOBJ hObj, WORD Magic )
) )
) )
{ {
DPRINT1("GDIBOJ_UnlockObj failed for %d, magic: %d, reqMagic\n",(WORD) hObj & 0xffff, handleEntry->wMagic, Magic ); DPRINT1("GDIBOJ_UnlockObj failed for %d, magic: %d, reqMagic\n",
(WORD)((size_t)hObj & 0xffff), handleEntry->wMagic, Magic );
DPRINT1("\tcalled from: %s:%i\n", file, line ); DPRINT1("\tcalled from: %s:%i\n", file, line );
return NULL; return FALSE;
} }
//DbgPrint("(%s:%i) GDIOBJ_UnlockObj(0x%x,0x%x)\n", file, line, hObj, Magic ); //DbgPrint("(%s:%i) GDIOBJ_UnlockObj(0x%x,0x%x)\n", file, line, hObj, Magic );
handleEntry->lockfile = NULL; handleEntry->lockfile = NULL;
@ -666,8 +668,9 @@ GDIOBJ_LockObj( HGDIOBJ hObj, WORD Magic )
) )
) )
{ {
DPRINT1("GDIBOJ_LockObj failed for %d, magic: %d, reqMagic\n",(WORD) hObj & 0xffff, handleEntry->wMagic, Magic); DPRINT1("GDIBOJ_LockObj failed for %d, magic: %d, reqMagic\n",
return NULL; (WORD)((size_t)hObj & 0xffff), handleEntry->wMagic, Magic);
return NULL;
} }
objectHeader = (PGDIOBJHDR) handleEntry->pObject; objectHeader = (PGDIOBJHDR) handleEntry->pObject;
@ -713,7 +716,7 @@ GDIOBJ_UnlockObj( HGDIOBJ hObj, WORD Magic )
) )
{ {
DPRINT1( "GDIOBJ_UnLockObj: failed\n"); DPRINT1( "GDIOBJ_UnLockObj: failed\n");
return FALSE; return FALSE;
} }
objectHeader = (PGDIOBJHDR) handleEntry->pObject; objectHeader = (PGDIOBJHDR) handleEntry->pObject;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: line.c,v 1.17 2003/07/14 09:43:11 gvg Exp $ */ /* $Id: line.c,v 1.18 2003/08/11 21:10:49 royce Exp $ */
// Some code from the WINE project source (www.winehq.com) // Some code from the WINE project source (www.winehq.com)
@ -133,7 +133,7 @@ W32kLineTo(HDC hDC,
int YEnd) int YEnd)
{ {
DC *dc = DC_HandleToPtr(hDC); DC *dc = DC_HandleToPtr(hDC);
SURFOBJ *SurfObj = (SURFOBJ*)AccessUserObject(dc->Surface); SURFOBJ *SurfObj = (SURFOBJ*)AccessUserObject((ULONG)dc->Surface);
BOOL Ret; BOOL Ret;
PPENOBJ Pen; PPENOBJ Pen;
RECT Bounds; RECT Bounds;
@ -303,7 +303,7 @@ W32kPolyline(HDC hDC,
int Count) int Count)
{ {
DC *dc = DC_HandleToPtr(hDC); DC *dc = DC_HandleToPtr(hDC);
SURFOBJ *SurfObj = (SURFOBJ*)AccessUserObject(dc->Surface); SURFOBJ *SurfObj = (SURFOBJ*)AccessUserObject((ULONG)dc->Surface);
BOOL ret; BOOL ret;
LONG i; LONG i;
PPENOBJ pen; PPENOBJ pen;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: objconv.c,v 1.9 2003/05/18 17:16:18 ea Exp $ */ /* $Id: objconv.c,v 1.10 2003/08/11 21:10:49 royce Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -42,7 +42,7 @@
PBRUSHOBJ FASTCALL PenToBrushObj(PDC dc, PENOBJ *pen) PBRUSHOBJ FASTCALL PenToBrushObj(PDC dc, PENOBJ *pen)
{ {
BRUSHOBJ *BrushObj; BRUSHOBJ *BrushObj;
XLATEOBJ *RGBtoVGA16; //XLATEOBJ *RGBtoVGA16;
ASSERT( pen ); ASSERT( pen );

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: path.c,v 1.10 2003/05/18 17:16:18 ea Exp $ */ /* $Id: path.c,v 1.11 2003/08/11 21:10:49 royce Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
@ -763,6 +763,12 @@ BOOL FASTCALL PATH_FlattenPath(GdiPath *pPath)
* error occurs, SetLastError is called with the appropriate value and * error occurs, SetLastError is called with the appropriate value and
* FALSE is returned. * FALSE is returned.
*/ */
#if 0
// FIXME - don't reenable this function until you deal with the
// const pPath being given to PATH_FlattenPath() - which is
// expecting a non-const*. Since this function isn't being called
// at the moment, I'm commenting it out until the issue needs to
// be addressed.
BOOL STDCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, BOOL STDCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode,
HRGN *pHrgn) HRGN *pHrgn)
{ {
@ -773,7 +779,7 @@ BOOL STDCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode,
assert(pPath!=NULL); assert(pPath!=NULL);
assert(pHrgn!=NULL); assert(pHrgn!=NULL);
PATH_FlattenPath(pPath); PATH_FlattenPath ( pPath );
/* FIXME: What happens when number of points is zero? */ /* FIXME: What happens when number of points is zero? */
@ -822,6 +828,7 @@ BOOL STDCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode,
*pHrgn=hrgn; *pHrgn=hrgn;
return TRUE; return TRUE;
} }
#endif
/* PATH_EmptyPath /* PATH_EmptyPath
* *

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: region.c,v 1.30 2003/08/04 19:07:50 royce Exp $ */ /* $Id: region.c,v 1.31 2003/08/11 21:10:49 royce Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
@ -1833,7 +1833,8 @@ W32kPaintRgn(HDC hDC,
//visrgn = RGNDATA_LockRgn(tmpVisRgn); //visrgn = RGNDATA_LockRgn(tmpVisRgn);
visrgn = RGNDATA_LockRgn(hRgn); visrgn = RGNDATA_LockRgn(hRgn);
ClipRegion = IntEngCreateClipRegion( visrgn->rdh.nCount, visrgn->Buffer, visrgn->rdh.rcBound ); ClipRegion = IntEngCreateClipRegion (
visrgn->rdh.nCount, (PRECTL)visrgn->Buffer, visrgn->rdh.rcBound );
ASSERT( ClipRegion ); ASSERT( ClipRegion );
pBrush = BRUSHOBJ_LockBrush(dc->w.hBrush); pBrush = BRUSHOBJ_LockBrush(dc->w.hBrush);
ASSERT(pBrush); ASSERT(pBrush);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: text.c,v 1.40 2003/08/09 21:14:01 gvg Exp $ */ /* $Id: text.c,v 1.41 2003/08/11 21:10:49 royce Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
@ -861,8 +861,12 @@ W32kGetTextExtentPoint32(HDC hDC,
} }
TextObj = TEXTOBJ_LockText(dc->w.hFont); TextObj = TEXTOBJ_LockText(dc->w.hFont);
DC_ReleasePtr(hDC); DC_ReleasePtr(hDC);
Result = TextIntGetTextExtentPoint(dc, String, Count, 0, NULL, NULL, &Size); Result = TextIntGetTextExtentPoint (
TextObj, String, Count, 0, NULL, NULL, &Size);
dc = DC_HandleToPtr(hDC);
ASSERT(dc); // it succeeded earlier, it should now, too
TEXTOBJ_UnlockText(dc->w.hFont); TEXTOBJ_UnlockText(dc->w.hFont);
DC_ReleasePtr(hDC);
ExFreePool(String); ExFreePool(String);
if (! Result) if (! Result)
@ -1175,7 +1179,18 @@ W32kTextOut(HDC hDC,
SourceGlyphSurf = (PSURFOBJ)AccessUserObject((ULONG) HSourceGlyph); SourceGlyphSurf = (PSURFOBJ)AccessUserObject((ULONG) HSourceGlyph);
// Use the font data as a mask to paint onto the DCs surface using a brush // Use the font data as a mask to paint onto the DCs surface using a brush
IntEngBitBlt(SurfObj, NULL, SourceGlyphSurf, dc->CombinedClip, NULL, &DestRect, &SourcePoint, &MaskRect, Brush, &BrushOrigin, 0xAACC); IntEngBitBlt (
SurfObj,
NULL,
SourceGlyphSurf,
dc->CombinedClip,
NULL,
&DestRect,
&SourcePoint,
(PPOINTL)&MaskRect,
Brush,
&BrushOrigin,
0xAACC );
EngDeleteSurface(HSourceGlyph); EngDeleteSurface(HSourceGlyph);