diff --git a/reactos/subsys/win32k/dib/dib.c b/reactos/subsys/win32k/dib/dib.c index fd06bae0d58..5ab46bc3ac6 100644 --- a/reactos/subsys/win32k/dib/dib.c +++ b/reactos/subsys/win32k/dib/dib.c @@ -1,5 +1,27 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib.c,v 1.2 2003/05/18 17:16:17 ea Exp $ */ + /* Static data */ unsigned char notmask[2] = { 0x0f, 0xf0 }; unsigned char altnotmask[2] = { 0xf0, 0x0f }; unsigned char mask1Bpp[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; + +/* EOF */ diff --git a/reactos/subsys/win32k/dib/dib.h b/reactos/subsys/win32k/dib/dib.h index bcc3b60ac19..bb3cd5fd45c 100644 --- a/reactos/subsys/win32k/dib/dib.h +++ b/reactos/subsys/win32k/dib/dib.h @@ -2,55 +2,55 @@ extern unsigned char notmask[2]; extern unsigned char altnotmask[2]; extern unsigned char mask1Bpp[8]; -VOID DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); -ULONG DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); -VOID DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); -VOID DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); +VOID DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); +ULONG DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); +VOID DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); +VOID DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); BOOLEAN DIB_1BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation); -VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); -ULONG DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); -VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); -VOID DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); +VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); +ULONG DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); +VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); +VOID DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); BOOLEAN DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation); -VOID DIB_8BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); -ULONG DIB_8BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); -VOID DIB_8BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); -VOID DIB_8BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); +VOID DIB_8BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); +ULONG DIB_8BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); +VOID DIB_8BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); +VOID DIB_8BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); BOOLEAN DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation); -VOID DIB_16BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); -ULONG DIB_16BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); -VOID DIB_16BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); -VOID DIB_16BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); +VOID DIB_16BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); +ULONG DIB_16BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); +VOID DIB_16BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); +VOID DIB_16BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); BOOLEAN DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation); -VOID DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); -ULONG DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); -VOID DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); -VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); +VOID DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); +ULONG DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); +VOID DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); +VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); BOOLEAN DIB_24BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation); -VOID DIB_32BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); -ULONG DIB_32BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); -VOID DIB_32BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); -VOID DIB_32BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); +VOID DIB_32BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c); +ULONG DIB_32BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y); +VOID DIB_32BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c); +VOID DIB_32BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c); BOOLEAN DIB_32BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, diff --git a/reactos/subsys/win32k/dib/dib16bpp.c b/reactos/subsys/win32k/dib/dib16bpp.c index da63042a3c9..ab3d1d1a22f 100644 --- a/reactos/subsys/win32k/dib/dib16bpp.c +++ b/reactos/subsys/win32k/dib/dib16bpp.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib16bpp.c,v 1.4 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,7 +27,8 @@ #include "../eng/objects.h" #include "dib.h" -VOID DIB_16BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) +VOID +DIB_16BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PWORD addr = (PWORD)byteaddr + x; @@ -16,7 +36,8 @@ VOID DIB_16BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) *addr = (WORD)c; } -ULONG DIB_16BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) +ULONG +DIB_16BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PWORD addr = (PWORD)byteaddr + x; @@ -24,7 +45,8 @@ ULONG DIB_16BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) return (ULONG)(*addr); } -VOID DIB_16BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) +VOID +DIB_16BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PWORD addr = (PWORD)byteaddr + x1; @@ -37,7 +59,8 @@ VOID DIB_16BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) } } -VOID DIB_16BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) +VOID +DIB_16BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta; PWORD addr = (PWORD)byteaddr + x; @@ -52,7 +75,8 @@ VOID DIB_16BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) } } -BOOLEAN DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN +DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) @@ -199,3 +223,4 @@ BOOLEAN DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/dib/dib1bpp.c b/reactos/subsys/win32k/dib/dib1bpp.c index d56140f5b5f..881e0cf0ac8 100644 --- a/reactos/subsys/win32k/dib/dib1bpp.c +++ b/reactos/subsys/win32k/dib/dib1bpp.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib1bpp.c,v 1.6 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,7 +27,8 @@ #include "../eng/objects.h" #include "dib.h" -VOID DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) +VOID +DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) { PBYTE addr = SurfObj->pvScan0; @@ -24,14 +44,16 @@ VOID DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) } } -ULONG DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) +ULONG +DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) { PBYTE addr = SurfObj->pvScan0 + y * SurfObj->lDelta + (x >> 3); return (*addr & mask1Bpp[x % 8] ? 1 : 0); } -VOID DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) +VOID +DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) { while(x1 < x2) { DIB_1BPP_PutPixel(SurfObj, x1, y, c); @@ -39,7 +61,8 @@ VOID DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) } } -VOID DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) +VOID +DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) { while(y1 < y2) { DIB_1BPP_PutPixel(SurfObj, x, y1, c); @@ -47,7 +70,8 @@ VOID DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) } } -BOOLEAN DIB_1BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN +DIB_1BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) @@ -171,3 +195,4 @@ BOOLEAN DIB_1BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/dib/dib24bpp.c b/reactos/subsys/win32k/dib/dib24bpp.c index e24df9146f2..7d332203ef8 100644 --- a/reactos/subsys/win32k/dib/dib24bpp.c +++ b/reactos/subsys/win32k/dib/dib24bpp.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib24bpp.c,v 1.11 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,7 +27,8 @@ #include "../eng/objects.h" #include "dib.h" -VOID DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) +VOID +DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x; @@ -16,7 +36,8 @@ VOID DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) *(PULONG)(addr) = c; } -ULONG DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) +ULONG +DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x; @@ -24,7 +45,8 @@ ULONG DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) return *(PULONG)(addr) & 0x00ffffff; } -VOID DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) +VOID +DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x1; @@ -37,7 +59,8 @@ VOID DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) } } -VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) +VOID +DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta; PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x; @@ -52,7 +75,8 @@ VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) } } -BOOLEAN DIB_24BPP_BitBlt( SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN +DIB_24BPP_BitBlt( SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) @@ -207,3 +231,4 @@ BOOLEAN DIB_24BPP_BitBlt( SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/dib/dib32bpp.c b/reactos/subsys/win32k/dib/dib32bpp.c index 38a479a52d0..78118a934f4 100644 --- a/reactos/subsys/win32k/dib/dib32bpp.c +++ b/reactos/subsys/win32k/dib/dib32bpp.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib32bpp.c,v 1.2 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,7 +27,8 @@ #include "../eng/objects.h" #include "dib.h" -VOID DIB_32BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) +VOID +DIB_32BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PDWORD addr = (PDWORD)byteaddr + x; @@ -16,7 +36,8 @@ VOID DIB_32BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) *addr = c; } -ULONG DIB_32BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) +ULONG +DIB_32BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PDWORD addr = (PDWORD)byteaddr + x; @@ -24,7 +45,8 @@ ULONG DIB_32BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) return (ULONG)(*addr); } -VOID DIB_32BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) +VOID +DIB_32BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PDWORD addr = (PDWORD)byteaddr + x1; @@ -37,7 +59,8 @@ VOID DIB_32BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) } } -VOID DIB_32BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) +VOID +DIB_32BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta; PDWORD addr = (PDWORD)byteaddr + x; @@ -51,7 +74,8 @@ VOID DIB_32BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) } } -BOOLEAN DIB_32BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN +DIB_32BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) @@ -201,3 +225,4 @@ BOOLEAN DIB_32BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/dib/dib4bpp.c b/reactos/subsys/win32k/dib/dib4bpp.c index e8231bbb849..f4ad4d3d0b7 100644 --- a/reactos/subsys/win32k/dib/dib4bpp.c +++ b/reactos/subsys/win32k/dib/dib4bpp.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib4bpp.c,v 1.13 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,7 +27,8 @@ #include "../eng/objects.h" #include "dib.h" -VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) +VOID +DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) { PBYTE addr = SurfObj->pvScan0; @@ -16,14 +36,16 @@ VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) *addr = (*addr & notmask[x&1]) | (c << ((1-(x&1))<<2)); } -ULONG DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) +ULONG +DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) { PBYTE addr = SurfObj->pvScan0; return (addr[(x>>1) + y * SurfObj->lDelta] >> ((1-(x&1))<<2) ) & 0x0f; } -VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) +VOID +DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) { PBYTE addr = SurfObj->pvScan0 + (x1>>1) + y * SurfObj->lDelta; LONG cx = x1; @@ -36,7 +58,8 @@ VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) } } -VOID DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) +VOID +DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) { PBYTE addr = SurfObj->pvScan0; int lDelta = SurfObj->lDelta; @@ -48,7 +71,8 @@ VOID DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) } } -BOOLEAN DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN +DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) @@ -201,3 +225,4 @@ BOOLEAN DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/dib/dib8bpp.c b/reactos/subsys/win32k/dib/dib8bpp.c index 84bd38cc059..442d44907df 100644 --- a/reactos/subsys/win32k/dib/dib8bpp.c +++ b/reactos/subsys/win32k/dib/dib8bpp.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib8bpp.c,v 1.2 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,21 +27,24 @@ #include "../eng/objects.h" #include "dib.h" -VOID DIB_8BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) +VOID +DIB_8BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta + x; *byteaddr = c; } -ULONG DIB_8BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) +ULONG +DIB_8BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta + x; return (ULONG)(*byteaddr); } -VOID DIB_8BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) +VOID +DIB_8BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta; PBYTE addr = byteaddr + x1; @@ -35,7 +57,8 @@ VOID DIB_8BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c) } } -VOID DIB_8BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) +VOID +DIB_8BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) { PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta; PBYTE addr = byteaddr + x; @@ -49,7 +72,8 @@ VOID DIB_8BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c) } } -BOOLEAN DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN +DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) @@ -199,3 +223,4 @@ BOOLEAN DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/bitblt.c b/reactos/subsys/win32k/eng/bitblt.c index 53f8046d1cf..0347182134f 100644 --- a/reactos/subsys/win32k/eng/bitblt.c +++ b/reactos/subsys/win32k/eng/bitblt.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: bitblt.c,v 1.20 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI BitBlt Functions @@ -10,6 +29,7 @@ #include #include +#include #include #include "brush.h" #include "clip.h" @@ -26,7 +46,7 @@ #define NDEBUG #include -BOOL EngIntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2) +BOOL STDCALL EngIntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2) { static const RECTL rclEmpty = { 0, 0, 0, 0 }; @@ -341,3 +361,4 @@ IntEngBitBlt(SURFOBJ *DestObj, return ret; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/brush.c b/reactos/subsys/win32k/eng/brush.c index b07abf134e0..84e86045a7d 100644 --- a/reactos/subsys/win32k/eng/brush.c +++ b/reactos/subsys/win32k/eng/brush.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: brush.c,v 1.7 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Driver Brush Functions @@ -23,3 +42,4 @@ BRUSHOBJ_pvGetRbrush(IN PBRUSHOBJ BrushObj) { return(BrushObj->pvRbrush); } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/brush.h b/reactos/subsys/win32k/eng/brush.h index d6b73aba8fe..a919275db17 100644 --- a/reactos/subsys/win32k/eng/brush.h +++ b/reactos/subsys/win32k/eng/brush.h @@ -1,3 +1,22 @@ +/* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: brush.h,v 1.3 2003/05/18 17:16:17 ea Exp $ */ typedef struct _BRUSHINST { // We need to removed ajC0-3 when color pattern code is complete!!! diff --git a/reactos/subsys/win32k/eng/clip.c b/reactos/subsys/win32k/eng/clip.c index 18a2953fe6b..eed1ad0dfd5 100644 --- a/reactos/subsys/win32k/eng/clip.c +++ b/reactos/subsys/win32k/eng/clip.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: clip.c,v 1.12 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Clipping Functions @@ -17,13 +36,13 @@ #define NDEBUG #include -VOID IntEngDeleteClipRegion(CLIPOBJ *ClipObj) +VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj) { HCLIP HClip = AccessHandleFromUserObject(ClipObj); FreeGDIHandle(HClip); } -CLIPOBJ * IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds ) +CLIPOBJ STDCALL * IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds ) { HCLIP hClip; CLIPGDI* clipInt; @@ -133,3 +152,4 @@ CLIPOBJ_bEnum(IN PCLIPOBJ ClipObj, return ClipGDI->EnumPos < ClipGDI->EnumRects.c; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/clip.h b/reactos/subsys/win32k/eng/clip.h index f637eb0d3f7..75e8c3926dd 100644 --- a/reactos/subsys/win32k/eng/clip.h +++ b/reactos/subsys/win32k/eng/clip.h @@ -1,9 +1,27 @@ +/* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ #ifndef __WIN32K_CLIP_H #define __WIN32K_CLIP_H typedef ULONG HCLIP; -CLIPOBJ * IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds ); -VOID IntEngDeleteClipRegion(CLIPOBJ *ClipObj); +CLIPOBJ STDCALL * IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds ); +VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj); #define ENUM_RECT_LIMIT 50 diff --git a/reactos/subsys/win32k/eng/copybits.c b/reactos/subsys/win32k/eng/copybits.c index 740faedac5c..ae131b7560f 100644 --- a/reactos/subsys/win32k/eng/copybits.c +++ b/reactos/subsys/win32k/eng/copybits.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: copybits.c,v 1.14 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI EngCopyBits Function @@ -9,6 +28,7 @@ */ #include +#include #include "objects.h" #include "clip.h" #include "../dib/dib.h" @@ -167,3 +187,4 @@ EngCopyBits(SURFOBJ *Dest, return FALSE; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/debug.c b/reactos/subsys/win32k/eng/debug.c index ecb0e83ef69..b5f017a4f1b 100644 --- a/reactos/subsys/win32k/eng/debug.c +++ b/reactos/subsys/win32k/eng/debug.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: debug.c,v 1.4 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Driver Brush Functions @@ -19,3 +38,4 @@ EngDebugPrint(PCHAR StandardPrefix, DbgPrint(DebugMessage, ap); DbgPrint("\n"); } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/device.c b/reactos/subsys/win32k/eng/device.c index cb2e1bc76e6..878cfb299b1 100644 --- a/reactos/subsys/win32k/eng/device.c +++ b/reactos/subsys/win32k/eng/device.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: device.c,v 1.7 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Driver Device Functions @@ -65,3 +84,4 @@ EngDeviceIoControl(HANDLE hDevice, return (Status); } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/handle.c b/reactos/subsys/win32k/eng/handle.c index 65716481df4..e3c59f62305 100644 --- a/reactos/subsys/win32k/eng/handle.c +++ b/reactos/subsys/win32k/eng/handle.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: handle.c,v 1.13 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Manage GDI Handles @@ -16,7 +35,7 @@ static int LastHandle = MAX_GDI_HANDLES; -ULONG CreateGDIHandle(ULONG InternalSize, ULONG UserSize) +ULONG FASTCALL CreateGDIHandle(ULONG InternalSize, ULONG UserSize) { ULONG size; PENGOBJ pObj; @@ -47,7 +66,7 @@ ULONG CreateGDIHandle(ULONG InternalSize, ULONG UserSize) return 0; } -VOID FreeGDIHandle(ULONG Handle) +VOID FASTCALL FreeGDIHandle(ULONG Handle) { if( Handle == 0 || Handle >= MAX_GDI_HANDLES ){ DPRINT1("FreeGDIHandle: invalid handle!!!!\n"); @@ -58,7 +77,7 @@ VOID FreeGDIHandle(ULONG Handle) GDIHandles[Handle].pEngObj = NULL; } -PVOID AccessInternalObject(ULONG Handle) +PVOID FASTCALL AccessInternalObject(ULONG Handle) { PENGOBJ pEngObj; @@ -71,7 +90,7 @@ PVOID AccessInternalObject(ULONG Handle) return (PVOID)pEngObj; } -PVOID AccessUserObject(ULONG Handle) +PVOID FASTCALL AccessUserObject(ULONG Handle) { PENGOBJ pEngObj; @@ -84,7 +103,7 @@ PVOID AccessUserObject(ULONG Handle) return (PVOID)( (PCHAR)pEngObj + sizeof( ENGOBJ ) ); } -ULONG AccessHandleFromUserObject(PVOID UserObject) +ULONG FASTCALL AccessHandleFromUserObject(PVOID UserObject) { PENGOBJ pEngObj; ULONG Handle; @@ -102,16 +121,17 @@ ULONG AccessHandleFromUserObject(PVOID UserObject) return Handle; } -PVOID AccessInternalObjectFromUserObject(PVOID UserObject) +PVOID FASTCALL AccessInternalObjectFromUserObject(PVOID UserObject) { return AccessInternalObject( AccessHandleFromUserObject( UserObject ) ); } -VOID InitEngHandleTable( void ) +VOID FASTCALL InitEngHandleTable( void ) { ULONG i; for( i=1; i < MAX_GDI_HANDLES; i++ ){ GDIHandles[ i ].pEngObj = NULL; } } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/handle.h b/reactos/subsys/win32k/eng/handle.h index 44a9cff2a41..0aaadfdd37c 100644 --- a/reactos/subsys/win32k/eng/handle.h +++ b/reactos/subsys/win32k/eng/handle.h @@ -1,4 +1,23 @@ /* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: handle.h,v 1.5 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Manage GDI Handle definitions diff --git a/reactos/subsys/win32k/eng/lineto.c b/reactos/subsys/win32k/eng/lineto.c index a4d2f09e6cd..53e01dcc3c9 100644 --- a/reactos/subsys/win32k/eng/lineto.c +++ b/reactos/subsys/win32k/eng/lineto.c @@ -1,4 +1,24 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: lineto.c,v 1.18 2003/05/18 17:16:17 ea Exp $ */ #include +#include #include #include #include "objects.h" @@ -211,3 +231,4 @@ IntEngPolyline(SURFOBJ *DestSurf, return ret; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/mem.c b/reactos/subsys/win32k/eng/mem.c index ba88a6401b5..2cebab25856 100644 --- a/reactos/subsys/win32k/eng/mem.c +++ b/reactos/subsys/win32k/eng/mem.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: mem.c,v 1.8 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Driver Memory Management Functions @@ -51,3 +70,4 @@ EngFreeUserMem(PVOID pv) { ZwFreeVirtualMemory (NtCurrentProcess(), &pv, 0, MEM_DECOMMIT); } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/misc.c b/reactos/subsys/win32k/eng/misc.c index 3e6b14c567a..8f2000ba4d3 100644 --- a/reactos/subsys/win32k/eng/misc.c +++ b/reactos/subsys/win32k/eng/misc.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: misc.c,v 1.2 2003/05/18 17:16:17 ea Exp $ */ #include #include #include @@ -116,4 +135,5 @@ IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave) } return Result; -} \ No newline at end of file +} +/* EOF */ diff --git a/reactos/subsys/win32k/eng/misc.h b/reactos/subsys/win32k/eng/misc.h index 9177784c7ef..87230a73edb 100644 --- a/reactos/subsys/win32k/eng/misc.h +++ b/reactos/subsys/win32k/eng/misc.h @@ -1,3 +1,22 @@ +/* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: misc.h,v 1.2 2003/05/18 17:16:17 ea Exp $ */ #ifndef __ENG_MISC_H #define __ENG_MISC_H diff --git a/reactos/subsys/win32k/eng/mouse.c b/reactos/subsys/win32k/eng/mouse.c index 2df0c5bc8b3..2999856fcf0 100644 --- a/reactos/subsys/win32k/eng/mouse.c +++ b/reactos/subsys/win32k/eng/mouse.c @@ -1,6 +1,6 @@ /* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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: mouse.c,v 1.22 2003/03/28 15:27:47 gvg Exp $ +/* $Id: mouse.c,v 1.23 2003/05/18 17:16:17 ea Exp $ * * PROJECT: ReactOS kernel * PURPOSE: Mouse @@ -35,6 +35,7 @@ #include "include/msgqueue.h" #include "include/object.h" #include "include/winsta.h" +#include #define NDEBUG #include @@ -117,7 +118,7 @@ static UCHAR DefaultCursor[256] = { /* FUNCTIONS *****************************************************************/ -INT +INT STDCALL MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2) /* @@ -167,7 +168,7 @@ MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1, return(TRUE); } -INT +INT FASTCALL MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI) /* * FUNCTION: Notify the mouse driver that drawing has finished on a surface. @@ -205,7 +206,7 @@ MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI) return(TRUE); } -VOID +VOID FASTCALL MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount) /* * FUNCTION: Call by the mouse driver when input events occur. @@ -309,7 +310,7 @@ MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount) } } -VOID +VOID FASTCALL EnableMouse(HDC hDisplayDC) { PDC dc; @@ -357,4 +358,4 @@ EnableMouse(HDC hDisplayDC) MouseEnabled = FALSE; } } - +/* EOF */ diff --git a/reactos/subsys/win32k/eng/objects.h b/reactos/subsys/win32k/eng/objects.h index bf4149ef5f8..d26fe681d7b 100644 --- a/reactos/subsys/win32k/eng/objects.h +++ b/reactos/subsys/win32k/eng/objects.h @@ -1,4 +1,23 @@ /* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: objects.h,v 1.15 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Internal Objects diff --git a/reactos/subsys/win32k/eng/paint.c b/reactos/subsys/win32k/eng/paint.c index 3f4f79cda4d..d2afd7eac7f 100644 --- a/reactos/subsys/win32k/eng/paint.c +++ b/reactos/subsys/win32k/eng/paint.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: paint.c,v 1.14 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Driver Paint Functions @@ -9,6 +28,7 @@ */ #include +#include #include #include #include @@ -23,7 +43,7 @@ //#define NDEBUG #include -BOOL FillSolid(SURFOBJ *Surface, PRECTL pRect, ULONG iColor) +BOOL STDCALL FillSolid(SURFOBJ *Surface, PRECTL pRect, ULONG iColor) { LONG y; ULONG LineWidth; @@ -42,7 +62,8 @@ BOOL FillSolid(SURFOBJ *Surface, PRECTL pRect, ULONG iColor) return TRUE; } -BOOL EngPaintRgn(SURFOBJ *Surface, CLIPOBJ *ClipRegion, ULONG iColor, MIX Mix, +BOOL STDCALL +EngPaintRgn(SURFOBJ *Surface, CLIPOBJ *ClipRegion, ULONG iColor, MIX Mix, BRUSHINST *BrushInst, POINTL *BrushPoint) { RECT_ENUM RectEnum; @@ -124,3 +145,4 @@ IntEngPaint(IN SURFOBJ *Surface, return EngPaint( Surface, ClipRegion, Brush, BrushOrigin, Mix ); } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/palette.c b/reactos/subsys/win32k/eng/palette.c index 7411167a97c..edd7e995622 100644 --- a/reactos/subsys/win32k/eng/palette.c +++ b/reactos/subsys/win32k/eng/palette.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: palette.c,v 1.15 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Palette Functions @@ -80,3 +99,4 @@ PALOBJ_cGetColors(PALOBJ *PalObj, return Colors; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/surface.c b/reactos/subsys/win32k/eng/surface.c index dfa33be9e1b..c78883b2e88 100644 --- a/reactos/subsys/win32k/eng/surface.c +++ b/reactos/subsys/win32k/eng/surface.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: surface.c,v 1.19 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Driver Surace Functions @@ -23,7 +42,7 @@ #define NDEBUG #include -INT BitsPerFormat(ULONG Format) +INT FASTCALL BitsPerFormat(ULONG Format) { switch(Format) { @@ -39,7 +58,7 @@ INT BitsPerFormat(ULONG Format) } } -ULONG BitmapFormat(WORD Bits, DWORD Compression) +ULONG FASTCALL BitmapFormat(WORD Bits, DWORD Compression) { switch(Compression) { @@ -84,7 +103,14 @@ static BOOLEAN Dummy_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, return FALSE; } -VOID InitializeFuncs(SURFGDI *SurfGDI, ULONG BitmapFormat) +#define SURF_METHOD(c,n) DIB_##c##_##n +#define SET_SURFGDI(c)\ + SurfGDI->DIB_PutPixel=SURF_METHOD(c,PutPixel);\ + SurfGDI->DIB_HLine=SURF_METHOD(c,HLine);\ + SurfGDI->DIB_VLine=SURF_METHOD(c,VLine);\ + SurfGDI->DIB_BitBlt=SURF_METHOD(c,BitBlt); + +VOID FASTCALL InitializeFuncs(SURFGDI *SurfGDI, ULONG BitmapFormat) { SurfGDI->BitBlt = NULL; SurfGDI->CopyBits = NULL; @@ -94,48 +120,12 @@ VOID InitializeFuncs(SURFGDI *SurfGDI, ULONG BitmapFormat) switch(BitmapFormat) { - case BMF_1BPP: - SurfGDI->DIB_PutPixel = DIB_1BPP_PutPixel; - SurfGDI->DIB_HLine = DIB_1BPP_HLine; - SurfGDI->DIB_VLine = DIB_1BPP_VLine; - SurfGDI->DIB_BitBlt = DIB_1BPP_BitBlt; - break; - - case BMF_4BPP: - SurfGDI->DIB_PutPixel = DIB_4BPP_PutPixel; - SurfGDI->DIB_HLine = DIB_4BPP_HLine; - SurfGDI->DIB_VLine = DIB_4BPP_VLine; - SurfGDI->DIB_BitBlt = DIB_4BPP_BitBlt; - break; - - case BMF_8BPP: - SurfGDI->DIB_PutPixel = DIB_8BPP_PutPixel; - SurfGDI->DIB_HLine = DIB_8BPP_HLine; - SurfGDI->DIB_VLine = DIB_8BPP_VLine; - SurfGDI->DIB_BitBlt = DIB_8BPP_BitBlt; - break; - - case BMF_16BPP: - SurfGDI->DIB_PutPixel = DIB_16BPP_PutPixel; - SurfGDI->DIB_HLine = DIB_16BPP_HLine; - SurfGDI->DIB_VLine = DIB_16BPP_VLine; - SurfGDI->DIB_BitBlt = DIB_16BPP_BitBlt; - break; - - case BMF_24BPP: - SurfGDI->DIB_PutPixel = DIB_24BPP_PutPixel; - SurfGDI->DIB_HLine = DIB_24BPP_HLine; - SurfGDI->DIB_VLine = DIB_24BPP_VLine; - SurfGDI->DIB_BitBlt = DIB_24BPP_BitBlt; - break; - - case BMF_32BPP: - SurfGDI->DIB_PutPixel = DIB_32BPP_PutPixel; - SurfGDI->DIB_HLine = DIB_32BPP_HLine; - SurfGDI->DIB_VLine = DIB_32BPP_VLine; - SurfGDI->DIB_BitBlt = DIB_32BPP_BitBlt; - break; - + case BMF_1BPP: SET_SURFGDI(1BPP) break; + case BMF_4BPP: SET_SURFGDI(4BPP) break; + case BMF_8BPP: SET_SURFGDI(8BPP) break; + case BMF_16BPP: SET_SURFGDI(16BPP) break; + case BMF_24BPP: SET_SURFGDI(24BPP) break; + case BMF_32BPP: SET_SURFGDI(32BPP) break; case BMF_4RLE: case BMF_8RLE: /* Not supported yet, fall through to unrecognized case */ @@ -255,7 +245,7 @@ EngCreateDeviceSurface(IN DHSURF dhsurf, return NewSurface; } -PFN DriverFunction(DRVENABLEDATA *DED, ULONG DriverFunc) +PFN FASTCALL DriverFunction(DRVENABLEDATA *DED, ULONG DriverFunc) { ULONG i; @@ -333,3 +323,4 @@ EngUnlockSurface(IN SURFOBJ *Surface) { // FIXME: Call GDI_UnlockObject } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/transblt.c b/reactos/subsys/win32k/eng/transblt.c index ff0c1ce6e42..94762cc5401 100644 --- a/reactos/subsys/win32k/eng/transblt.c +++ b/reactos/subsys/win32k/eng/transblt.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: transblt.c,v 1.9 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI TransparentBlt Function @@ -10,6 +29,7 @@ #include #include +#include #include #include #include @@ -98,3 +118,4 @@ EngTransparentBlt(PSURFOBJ Dest, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/eng/xlate.c b/reactos/subsys/win32k/eng/xlate.c index 00a4f631366..eb1a5fd21bd 100644 --- a/reactos/subsys/win32k/eng/xlate.c +++ b/reactos/subsys/win32k/eng/xlate.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: xlate.c,v 1.19 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI Color Translation Functions @@ -22,17 +41,17 @@ ULONG CCMLastSourceColor = 0, CCMLastColorMatch = 0; -ULONG RGBtoULONG(BYTE Red, BYTE Green, BYTE Blue) +ULONG STDCALL RGBtoULONG(BYTE Red, BYTE Green, BYTE Blue) { return ((Red & 0xff) << 16) | ((Green & 0xff) << 8) | (Blue & 0xff); } -ULONG BGRtoULONG(BYTE Blue, BYTE Green, BYTE Red) +ULONG STDCALL BGRtoULONG(BYTE Blue, BYTE Green, BYTE Red) { return ((Blue & 0xff) << 16) | ((Green & 0xff) << 8) | (Red & 0xff); } -static ULONG ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color) +static ULONG FASTCALL ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color) { ULONG TranslatedColor; @@ -61,7 +80,8 @@ static ULONG ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color) // then we should cache more than one value. Same with the source. // Takes indexed palette and a -ULONG ClosestColorMatch(XLATEGDI *XlateGDI, ULONG SourceColor, ULONG *DestColors, +ULONG STDCALL +ClosestColorMatch(XLATEGDI *XlateGDI, ULONG SourceColor, ULONG *DestColors, ULONG NumColors) { PVIDEO_CLUTDATA cSourceColor; @@ -123,7 +143,8 @@ ULONG ClosestColorMatch(XLATEGDI *XlateGDI, ULONG SourceColor, ULONG *DestColors return idx; } -VOID IndexedToIndexedTranslationTable(XLATEGDI *XlateGDI, ULONG *TranslationTable, +VOID STDCALL +IndexedToIndexedTranslationTable(XLATEGDI *XlateGDI, ULONG *TranslationTable, PALGDI *PalDest, PALGDI *PalSource) { ULONG i; @@ -134,7 +155,8 @@ VOID IndexedToIndexedTranslationTable(XLATEGDI *XlateGDI, ULONG *TranslationTabl } } -static VOID BitMasksFromPal(USHORT PalType, PPALGDI Palette, +static VOID STDCALL +BitMasksFromPal(USHORT PalType, PPALGDI Palette, PULONG RedMask, PULONG BlueMask, PULONG GreenMask) { switch(PalType) @@ -161,7 +183,7 @@ static VOID BitMasksFromPal(USHORT PalType, PPALGDI Palette, * Calculate the number of bits Mask must be shift to the left to get a * 1 in the most significant bit position */ -static INT CalculateShift(ULONG Mask) +static INT FASTCALL CalculateShift(ULONG Mask) { INT Shift = 0; ULONG LeftmostBit = 1 << (8 * sizeof(ULONG) - 1); @@ -175,7 +197,7 @@ static INT CalculateShift(ULONG Mask) return Shift; } -XLATEOBJ *IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, +XLATEOBJ * STDCALL IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, HPALETTE PaletteDest, HPALETTE PaletteSource) { // FIXME: Add support for BGR conversions @@ -321,7 +343,7 @@ XLATEOBJ *IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, return XlateObj; } -VOID EngDeleteXlate(XLATEOBJ *XlateObj) +VOID FASTCALL EngDeleteXlate(XLATEOBJ *XlateObj) { HPALETTE HXlate = (HPALETTE)AccessHandleFromUserObject(XlateObj); XLATEGDI *XlateGDI = (XLATEGDI*)AccessInternalObject((ULONG)HXlate); @@ -411,3 +433,4 @@ XLATEOBJ_cGetPalette(XLATEOBJ *XlateObj, return i; } +/* EOF */ diff --git a/reactos/subsys/win32k/include/class.h b/reactos/subsys/win32k/include/class.h index 7a07cc5fdb3..575c1be6d6d 100644 --- a/reactos/subsys/win32k/include/class.h +++ b/reactos/subsys/win32k/include/class.h @@ -15,29 +15,29 @@ typedef struct _WNDCLASS_OBJECT LIST_ENTRY ListEntry; } WNDCLASS_OBJECT, *PWNDCLASS_OBJECT; -NTSTATUS +NTSTATUS FASTCALL InitClassImpl(VOID); -NTSTATUS +NTSTATUS FASTCALL CleanupClassImpl(VOID); -NTSTATUS +NTSTATUS STDCALL ClassReferenceClassByName(PW32PROCESS Process, PWNDCLASS_OBJECT *Class, LPWSTR ClassName); -NTSTATUS +NTSTATUS FASTCALL ClassReferenceClassByAtom(PWNDCLASS_OBJECT *Class, RTL_ATOM ClassAtom); -NTSTATUS +NTSTATUS FASTCALL ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class, LPWSTR ClassNameOrAtom); -PWNDCLASS_OBJECT +PWNDCLASS_OBJECT FASTCALL W32kCreateClass(LPWNDCLASSEX lpwcx, BOOL bUnicodeClass); struct _WINDOW_OBJECT; -ULONG +ULONG FASTCALL W32kGetClassLong(struct _WINDOW_OBJECT* WindowObject, ULONG Offset); #endif /* __WIN32K_CLASS_H */ diff --git a/reactos/subsys/win32k/include/color.h b/reactos/subsys/win32k/include/color.h new file mode 100644 index 00000000000..75fc494db56 --- /dev/null +++ b/reactos/subsys/win32k/include/color.h @@ -0,0 +1,5 @@ +const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID); +COLORREF STDCALL COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size, COLORREF color); +INT STDCALL COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col); +INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, PXLATEOBJ XlateObj, COLORREF col, BOOL skipReserved); + diff --git a/reactos/subsys/win32k/include/copybits.h b/reactos/subsys/win32k/include/copybits.h index 469c68a7a52..75c986ab390 100644 --- a/reactos/subsys/win32k/include/copybits.h +++ b/reactos/subsys/win32k/include/copybits.h @@ -1,7 +1,7 @@ #ifndef __WIN32K_COPYBITS_H #define __WIN32K_COPYBITS_H -BOOLEAN CopyBitsCopy(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, +BOOLEAN STDCALL CopyBitsCopy(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFGDI *DestGDI, SURFGDI *SourceGDI, PRECTL DestRect, POINTL *SourcePoint, ULONG Delta, XLATEOBJ *ColorTranslation); diff --git a/reactos/subsys/win32k/include/dce.h b/reactos/subsys/win32k/include/dce.h index 9c203183bb8..931b2ef7daf 100644 --- a/reactos/subsys/win32k/include/dce.h +++ b/reactos/subsys/win32k/include/dce.h @@ -39,11 +39,13 @@ typedef struct tagDCE #define DCEOBJ_LockDCE(hDCE) ((PDCE)GDIOBJ_LockObj((HGDIOBJ)hDCE, GO_DCE_MAGIC)) #define DCEOBJ_UnlockDCE(hDCE) GDIOBJ_UnlockObj((HGDIOBJ)hDCE, GO_DCE_MAGIC) -PDCE DCE_AllocDCE(HWND hWnd, DCE_TYPE type); -PDCE DCE_FreeDCE(PDCE dce); -VOID DCE_FreeWindowDCE(HWND); -INT DCE_ExcludeRgn(HDC, HWND, HRGN); -BOOL DCE_InvalidateDCE(HWND, const PRECTL); -BOOL DCE_InternalDelete(PDCE dce); +PDCE FASTCALL DCE_AllocDCE(HWND hWnd, DCE_TYPE type); // ??? +PDCE FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type); +PDCE FASTCALL DCE_FreeDCE(PDCE dce); +VOID FASTCALL DCE_FreeWindowDCE(HWND); +HRGN STDCALL DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild, ULONG CFlags); +INT FASTCALL DCE_ExcludeRgn(HDC, HWND, HRGN); +BOOL FASTCALL DCE_InvalidateDCE(HWND, const PRECTL); +BOOL FASTCALL DCE_InternalDelete(PDCE dce); #endif diff --git a/reactos/subsys/win32k/include/dib.h b/reactos/subsys/win32k/include/dib.h index 54ef5c59d5c..1d69011e85d 100644 --- a/reactos/subsys/win32k/include/dib.h +++ b/reactos/subsys/win32k/include/dib.h @@ -1,6 +1,16 @@ #ifndef __WIN32K_DIB_H #define __WIN32K_DIB_H -int DIB_GetDIBWidthBytes(int width, int depth); +#include +INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse); +HBITMAP STDCALL DIB_CreateDIBSection (PDC dc, PBITMAPINFO bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch); +INT STDCALL 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, LPBITMAPINFO lpbmi); + +PPALETTEENTRY STDCALL DIBColorTableToPaletteEntries(PPALETTEENTRY palEntries, const RGBQUAD *DIBColorTable, ULONG ColorCount); +HPALETTE FASTCALL BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType); + #endif /* __WIN32K_DIB_H */ diff --git a/reactos/subsys/win32k/include/eng.h b/reactos/subsys/win32k/include/eng.h index b70f8fc3c34..5daaa706d02 100644 --- a/reactos/subsys/win32k/include/eng.h +++ b/reactos/subsys/win32k/include/eng.h @@ -1,6 +1,7 @@ #ifndef __WIN32K_ENG_H #define __WIN32K_ENG_H -BOOL EngIntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2); +BOOL STDCALL EngIntersectRect (PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2); +VOID FASTCALL EngDeleteXlate (XLATEOBJ *XlateObj); #endif /* __WIN32K_ENG_H */ diff --git a/reactos/subsys/win32k/include/error.h b/reactos/subsys/win32k/include/error.h index 2ef7d83c133..e7012f0d89f 100644 --- a/reactos/subsys/win32k/include/error.h +++ b/reactos/subsys/win32k/include/error.h @@ -1,11 +1,11 @@ #ifndef __WIN32K_ERROR_H #define __WIN32K_ERROR_H -VOID +VOID FASTCALL SetLastNtError( NTSTATUS Status); -VOID +VOID FASTCALL SetLastWin32Error( DWORD Status); diff --git a/reactos/subsys/win32k/include/guicheck.h b/reactos/subsys/win32k/include/guicheck.h index 9c6024bf5df..e1e9d26605c 100644 --- a/reactos/subsys/win32k/include/guicheck.h +++ b/reactos/subsys/win32k/include/guicheck.h @@ -4,9 +4,9 @@ #include #include -VOID +VOID FASTCALL W32kGuiCheck(VOID); -VOID +VOID FASTCALL W32kGraphicsCheck(BOOL Create); #endif /* __WIN32K_GUICHECK_H */ diff --git a/reactos/subsys/win32k/include/input.h b/reactos/subsys/win32k/include/input.h index 1c83e091052..415644ba837 100644 --- a/reactos/subsys/win32k/include/input.h +++ b/reactos/subsys/win32k/include/input.h @@ -1,7 +1,7 @@ #ifndef __WIN32K_MOUSE_H #define __WIN32K_MOUSE_H -NTSTATUS +NTSTATUS FASTCALL InitInputImpl(VOID); #endif /* __WIN32K_MOUSE_H */ diff --git a/reactos/subsys/win32k/include/inteng.h b/reactos/subsys/win32k/include/inteng.h index 8303ba03453..07cae98dcad 100644 --- a/reactos/subsys/win32k/include/inteng.h +++ b/reactos/subsys/win32k/include/inteng.h @@ -3,7 +3,7 @@ /* Definitions of IntEngXxx functions */ -extern BOOL STDCALL IntEngLineTo(SURFOBJ *Surface, +BOOL STDCALL IntEngLineTo(SURFOBJ *Surface, CLIPOBJ *Clip, BRUSHOBJ *Brush, LONG x1, @@ -24,15 +24,18 @@ BOOL STDCALL IntEngBitBlt(SURFOBJ *DestObj, POINTL *BrushOrigin, ROP4 rop4); -XLATEOBJ *IntEngCreateXlate(USHORT DestPalType, +XLATEOBJ * STDCALL IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, HPALETTE PaletteDest, HPALETTE PaletteSource); -extern BOOL STDCALL IntEngPolyline(SURFOBJ *DestSurf, +BOOL STDCALL IntEngPolyline(SURFOBJ *DestSurf, CLIPOBJ *Clip, BRUSHOBJ *Brush, CONST LPPOINT pt, LONG dCount, MIX mix); +CLIPOBJ STDCALL * IntEngCreateClipRegion(ULONG count, + PRECTL pRect, + RECTL rcBounds); #endif diff --git a/reactos/subsys/win32k/include/mouse.h b/reactos/subsys/win32k/include/mouse.h index abd734e9a4a..36c37d083ce 100644 --- a/reactos/subsys/win32k/include/mouse.h +++ b/reactos/subsys/win32k/include/mouse.h @@ -1,8 +1,13 @@ #ifndef __WIN32K_MOUSE_H #define __WIN32K_MOUSE_H -INT MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2); -INT MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI); -VOID EnableMouse(HDC hDisplayDC); +#include "../eng/misc.h" +//#include + +INT STDCALL MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2); +INT FASTCALL MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI); +VOID FASTCALL EnableMouse(HDC hDisplayDC); +VOID FASTCALL MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount); + #endif /* __WIN32K_MOUSE_H */ diff --git a/reactos/subsys/win32k/include/msgqueue.h b/reactos/subsys/win32k/include/msgqueue.h index e2a3394691e..65b83019e29 100644 --- a/reactos/subsys/win32k/include/msgqueue.h +++ b/reactos/subsys/win32k/include/msgqueue.h @@ -64,20 +64,20 @@ typedef struct _USER_MESSAGE_QUEUE HWND CaptureWindow; } USER_MESSAGE_QUEUE, *PUSER_MESSAGE_QUEUE; -VOID +VOID FASTCALL MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_SENT_MESSAGE Message); -VOID +VOID FASTCALL MsqInitializeMessage(PUSER_MESSAGE Message, LPMSG Msg); -PUSER_MESSAGE +PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg); -VOID +VOID FASTCALL MsqDestroyMessage(PUSER_MESSAGE Message); -VOID +VOID FASTCALL MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_MESSAGE Message); -BOOLEAN +BOOLEAN STDCALL MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, IN BOOLEAN Hardware, IN BOOLEAN Remove, @@ -85,30 +85,30 @@ MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, IN UINT MsgFilterLow, IN UINT MsgFilterHigh, OUT PUSER_MESSAGE* Message); -VOID +VOID FASTCALL MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue); -VOID +VOID FASTCALL MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue); -PUSER_MESSAGE_QUEUE +PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(VOID); -VOID +VOID FASTCALL MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue); -PUSER_MESSAGE_QUEUE +PUSER_MESSAGE_QUEUE FASTCALL MsqGetHardwareMessageQueue(VOID); -NTSTATUS +NTSTATUS FASTCALL MsqWaitForNewMessage(PUSER_MESSAGE_QUEUE MessageQueue); -NTSTATUS +NTSTATUS FASTCALL MsqInitializeImpl(VOID); -BOOLEAN +BOOLEAN FASTCALL MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue); -NTSTATUS +NTSTATUS FASTCALL MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue); -VOID +VOID FASTCALL MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_SENT_MESSAGE_NOTIFY NotifyMessage); -VOID +VOID FASTCALL MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue); -VOID +VOID FASTCALL MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue); LRESULT STDCALL W32kSendMessage(HWND hWnd, @@ -116,9 +116,9 @@ W32kSendMessage(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL KernelMessage); -VOID +VOID STDCALL MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam); -VOID +VOID FASTCALL MsqInsertSystemMessage(MSG* Msg); #define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF)) diff --git a/reactos/subsys/win32k/include/object.h b/reactos/subsys/win32k/include/object.h index c8762c9bd61..2faf7bd54db 100644 --- a/reactos/subsys/win32k/include/object.h +++ b/reactos/subsys/win32k/include/object.h @@ -2,6 +2,9 @@ #define __WIN32K_OBJECT_H #include +#include +#include +#include typedef enum { otUnknown = 0, @@ -40,77 +43,88 @@ typedef struct _USER_HANDLE_TABLE } USER_HANDLE_TABLE, *PUSER_HANDLE_TABLE; -ULONG +ULONG FASTCALL ObmGetReferenceCount( PVOID ObjectBody); -ULONG +ULONG FASTCALL ObmGetHandleCount( PVOID ObjectBody); -VOID +VOID FASTCALL ObmReferenceObject( PVOID ObjectBody); -VOID +VOID FASTCALL ObmDereferenceObject( PVOID ObjectBody); -NTSTATUS +NTSTATUS FASTCALL ObmReferenceObjectByPointer( PVOID ObjectBody, USER_OBJECT_TYPE ObjectType); -PVOID +PVOID FASTCALL ObmCreateObject( PUSER_HANDLE_TABLE HandleTable, PHANDLE Handle, USER_OBJECT_TYPE ObjectType, ULONG ObjectSize); -NTSTATUS +NTSTATUS FASTCALL ObmCreateHandle( PUSER_HANDLE_TABLE HandleTable, PVOID ObjectBody, PHANDLE HandleReturn); -NTSTATUS +NTSTATUS FASTCALL ObmReferenceObjectByHandle( PUSER_HANDLE_TABLE HandleTable, HANDLE Handle, USER_OBJECT_TYPE ObjectType, PVOID* Object); -NTSTATUS +NTSTATUS FASTCALL ObmCloseHandle( PUSER_HANDLE_TABLE HandleTable, HANDLE Handle); -VOID +VOID FASTCALL ObmInitializeHandleTable( PUSER_HANDLE_TABLE HandleTable); -VOID +VOID FASTCALL ObmFreeHandleTable( PUSER_HANDLE_TABLE HandleTable); -PUSER_HANDLE_TABLE +PUSER_HANDLE_TABLE FASTCALL ObmCreateHandleTable(VOID); -VOID -ObmDestroyHandleTable( - PUSER_HANDLE_TABLE HandleTable); +VOID FASTCALL ObmDestroyHandleTable (PUSER_HANDLE_TABLE HandleTable); -ULONG CreateGDIHandle(ULONG InternalSize, ULONG UserSize); -VOID FreeGDIHandle(ULONG Handle); +ULONG FASTCALL CreateGDIHandle (ULONG InternalSize, ULONG UserSize); +VOID FASTCALL FreeGDIHandle (ULONG Handle); -PVOID AccessUserObject(ULONG Handle); -PVOID AccessInternalObject(ULONG Handle); +PVOID FASTCALL AccessUserObject (ULONG Handle); +PVOID FASTCALL AccessInternalObject (ULONG Handle); -PVOID AccessInternalObjectFromUserObject(PVOID UserObject); -ULONG AccessHandleFromUserObject(PVOID UserObject); +PVOID FASTCALL AccessInternalObjectFromUserObject (PVOID UserObject); +ULONG FASTCALL AccessHandleFromUserObject (PVOID UserObject); -VOID InitEngHandleTable( void ); +VOID FASTCALL InitEngHandleTable (VOID); +VOID FASTCALL InitGdiObjectHandleTable (VOID); + +VOID FASTCALL CreateStockObjects (VOID); + +VOID FASTCALL GDIOBJ_MarkObjectGlobal (HGDIOBJ ObjectHandle); +BOOL FASTCALL GDIOBJ_LockMultipleObj (PGDIMULTILOCK pList, INT nObj); + +PPOINT FASTCALL GDI_Bezier (const POINT *Points, INT count, PINT nPtsOut); + +/* objects/objconv.c */ + +PBRUSHOBJ FASTCALL PenToBrushObj (PDC dc, PENOBJ *pen); +HBITMAP FASTCALL BitmapToSurf (PBITMAPOBJ BitmapObj); #endif /* __WIN32K_OBJECT_H */ diff --git a/reactos/subsys/win32k/include/paint.h b/reactos/subsys/win32k/include/paint.h index 379fc3633e2..7c5f6f3626b 100644 --- a/reactos/subsys/win32k/include/paint.h +++ b/reactos/subsys/win32k/include/paint.h @@ -1,6 +1,8 @@ #ifndef __WIN32K_PAINT_H #define __WIN32K_PAINT_H -BOOL FillSolid(SURFOBJ *Surface, PRECTL Dimensions, ULONG iColor); +BOOL STDCALL FillSolid (PSURFOBJ Surface, PRECTL Dimensions, ULONG iColor); +BOOL STDCALL FillPolygon_ALTERNATE (PSURFOBJ SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, CONST PPOINT Points, INT Count, RECTL BoundRect, INT OrigX, INT OrigY); +BOOL STDCALL FillPolygon_WINDING (PSURFOBJ SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, CONST PPOINT Points, INT Count, RECTL BoundRect, INT OrigX, INT OrigY); #endif /* __WIN32K_DIB_H */ diff --git a/reactos/subsys/win32k/include/painting.h b/reactos/subsys/win32k/include/painting.h index 761610cb391..43d8e29f15a 100644 --- a/reactos/subsys/win32k/include/painting.h +++ b/reactos/subsys/win32k/include/painting.h @@ -16,6 +16,9 @@ HWND STDCALL PaintingFindWinToRepaint(HWND hWnd, PW32THREAD Thread); BOOL STDCALL +PaintRedrawWindow(HWND hWnd, const RECT* UpdateRect, HRGN UpdateRgn, + ULONG Flags, ULONG ExFlags); +BOOL STDCALL PaintHaveToDelayNCPaint(PWINDOW_OBJECT Window, ULONG Flags); HRGN STDCALL PaintUpdateNCRegion(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags); diff --git a/reactos/subsys/win32k/include/palette.h b/reactos/subsys/win32k/include/palette.h index 48bcb5ab2fc..bf4fab86b81 100644 --- a/reactos/subsys/win32k/include/palette.h +++ b/reactos/subsys/win32k/include/palette.h @@ -22,4 +22,11 @@ static ColorShifts PALETTE_LBlue = {0,0,0}; static int PALETTE_Graymax = 0; static int palette_size; +HPALETTE FASTCALL PALETTE_Init (VOID); +VOID FASTCALL PALETTE_ValidateFlags (PALETTEENTRY* lpPalE, INT size); +INT STDCALL PALETTE_SetMapping(PPALOBJ palPtr, UINT uStart, UINT uNum, BOOL mapOnly); +INT FASTCALL PALETTE_ToPhysical (PDC dc, COLORREF color); + +PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID); + #endif /* __WIN32K_PALETTE_H */ diff --git a/reactos/subsys/win32k/include/path.h b/reactos/subsys/win32k/include/path.h new file mode 100644 index 00000000000..41f32003f0b --- /dev/null +++ b/reactos/subsys/win32k/include/path.h @@ -0,0 +1,28 @@ +BOOL STDCALL PATH_Arc (HDC hdc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd); +BOOL FASTCALL PATH_AssignGdiPath (GdiPath *pPathDest, const GdiPath *pPathSrc); +VOID FASTCALL PATH_DestroyGdiPath (GdiPath *pPath); +BOOL STDCALL PATH_Ellipse (HDC hdc, INT x1, INT y1, INT x2, INT y2); +VOID STDCALL PATH_EmptyPath (GdiPath *pPath); +VOID FASTCALL PATH_InitGdiPath (GdiPath *pPath); +BOOL STDCALL PATH_LineTo (HDC hdc, INT x, INT y); +BOOL FASTCALL PATH_MoveTo (HDC hdc); +BOOL STDCALL PATH_PolyBezier (HDC hdc, const POINT *pts, DWORD cbPoints); +BOOL STDCALL PATH_PolyBezierTo (HDC hdc, const POINT *pts, DWORD cbPoints); +BOOL STDCALL PATH_Polygon (HDC hdc, const POINT *pts, DWORD cbPoints); +BOOL STDCALL PATH_Polyline (HDC hdc, const POINT *pts, DWORD cbPoints); +BOOL STDCALL PATH_PolylineTo (HDC hdc, const POINT *pts, DWORD cbPoints); +BOOL STDCALL PATH_PolyPolygon ( HDC hdc, const POINT* pts, const INT* counts, UINT polygons); +BOOL STDCALL PATH_PolyPolyline( HDC hdc, const POINT* pts, const DWORD* counts, DWORD polylines); +BOOL STDCALL PATH_Rectangle (HDC hdc, INT x1, INT y1, INT x2, INT y2); +BOOL STDCALL PATH_PathToRegion (const GdiPath *pPath, INT nPolyFillMode, HRGN *pHrgn); +#ifdef _WIN32K_PATH_INTERNAL +BOOL STDCALL PATH_AddEntry (GdiPath *pPath, const POINT *pPoint, BYTE flags); +BOOL STDCALL PATH_AddFlatBezier (GdiPath *pPath, POINT *pt, BOOL closed); +BOOL STDCALL PATH_DoArcPart (GdiPath *pPath, FLOAT_POINT corners[], double angleStart, double angleEnd, BOOL addMoveTo); +BOOL FASTCALL PATH_FlattenPath (GdiPath *pPath); +BOOL FASTCALL PATH_GetPathFromHDC (HDC hdc, GdiPath **ppPath); +VOID STDCALL PATH_NormalizePoint (FLOAT_POINT corners[], const FLOAT_POINT *pPoint, double *pX, double *pY); +BOOL STDCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, HRGN *pHrgn); +BOOL STDCALL PATH_ReserveEntries (GdiPath *pPath, INT numEntries); +VOID STDCALL PATH_ScaleNormalizedPoint (FLOAT_POINT corners[], double x, double y, POINT *pPoint); +#endif diff --git a/reactos/subsys/win32k/include/rect.h b/reactos/subsys/win32k/include/rect.h index d7c923f1f25..d05c2f6ed94 100644 --- a/reactos/subsys/win32k/include/rect.h +++ b/reactos/subsys/win32k/include/rect.h @@ -8,5 +8,5 @@ BOOL STDCALL W32kIsEmptyRect(PRECT Rect); BOOL STDCALL W32kIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2); -BOOL +BOOL STDCALL W32kOffsetRect(LPRECT Rect, INT x, INT y); diff --git a/reactos/subsys/win32k/include/scroll.h b/reactos/subsys/win32k/include/scroll.h new file mode 100644 index 00000000000..27d62149a2e --- /dev/null +++ b/reactos/subsys/win32k/include/scroll.h @@ -0,0 +1,2 @@ +DWORD FASTCALL SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject); +DWORD STDCALL SCROLL_GetScrollBarInfo(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi); diff --git a/reactos/subsys/win32k/include/surface.h b/reactos/subsys/win32k/include/surface.h index 8374b506662..1a102834f3d 100644 --- a/reactos/subsys/win32k/include/surface.h +++ b/reactos/subsys/win32k/include/surface.h @@ -1,6 +1,7 @@ #ifndef __WIN32K_SURFACE_H #define __WIN32K_SURFACE_H -INT BitsPerFormat(ULONG Format); +INT FASTCALL BitsPerFormat (ULONG Format); +ULONG FASTCALL BitmapFormat (WORD Bits, DWORD Compression); #endif /* __WIN32K_SURFACE_H */ diff --git a/reactos/subsys/win32k/include/text.h b/reactos/subsys/win32k/include/text.h new file mode 100644 index 00000000000..0865c816326 --- /dev/null +++ b/reactos/subsys/win32k/include/text.h @@ -0,0 +1 @@ +BOOL FASTCALL InitFontSupport(VOID); diff --git a/reactos/subsys/win32k/include/timer.h b/reactos/subsys/win32k/include/timer.h new file mode 100644 index 00000000000..b7f5dee8105 --- /dev/null +++ b/reactos/subsys/win32k/include/timer.h @@ -0,0 +1,6 @@ +#ifndef _SUBSYS_WIN32K_INCLUDE_TIMER_H +#define _SUBSYS_WIN32K_INCLUDE_TIMER_H + +NTSTATUS FASTCALL InitTimerImpl(VOID); + +#endif /* ndef _SUBSYS_WIN32K_INCLUDE_TIMER_H */ diff --git a/reactos/subsys/win32k/include/window.h b/reactos/subsys/win32k/include/window.h index 389e79b2fdb..2b48a5ab31c 100644 --- a/reactos/subsys/win32k/include/window.h +++ b/reactos/subsys/win32k/include/window.h @@ -15,7 +15,7 @@ typedef struct _PROPERTY ATOM Atom; } PROPERTY, *PPROPERTY; -VOID +VOID FASTCALL WinPosSetupInternalPos(VOID); typedef struct _WINDOW_OBJECT @@ -93,29 +93,21 @@ typedef struct _WINDOW_OBJECT #define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000010) #define WINDOWOBJECT_RESTOREMAX (0x00000020) -NTSTATUS -InitWindowImpl(VOID); -NTSTATUS -CleanupWindowImpl(VOID); -VOID -W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect); -PWINDOW_OBJECT -W32kGetWindowObject(HWND hWnd); -VOID -W32kReleaseWindowObject(PWINDOW_OBJECT Window); -HWND STDCALL -W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation, +NTSTATUS FASTCALL InitWindowImpl (VOID); +NTSTATUS FASTCALL CleanupWindowImpl (VOID); +VOID FASTCALL W32kGetClientRect (PWINDOW_OBJECT WindowObject, PRECT Rect); +PWINDOW_OBJECT FASTCALL W32kGetWindowObject (HWND hWnd); +VOID FASTCALL W32kReleaseWindowObject (PWINDOW_OBJECT Window); +HWND STDCALL W32kCreateDesktopWindow (PWINSTATION_OBJECT WindowStation, PWNDCLASS_OBJECT DesktopClass, ULONG Width, ULONG Height); -BOOL -W32kIsDesktopWindow(HWND hWnd); -HWND -W32kGetActiveWindow(VOID); -BOOL -W32kIsWindowVisible(HWND Wnd); -BOOL -W32kIsChildWindow(HWND Parent, HWND Child); -HWND W32kGetDesktopWindow(); +BOOL FASTCALL W32kIsDesktopWindow (HWND hWnd); +HWND FASTCALL W32kGetActiveWindow (VOID); +BOOL FASTCALL W32kIsWindowVisible (HWND Wnd); +BOOL FASTCALL W32kIsChildWindow (HWND Parent, HWND Child); +HWND FASTCALL W32kGetDesktopWindow (VOID); +HWND FASTCALL W32kGetFocusWindow (VOID); +VOID FASTCALL W32kSetFocusWindow (HWND hWnd); #endif /* __WIN32K_WINDOW_H */ diff --git a/reactos/subsys/win32k/include/winpos.h b/reactos/subsys/win32k/include/winpos.h index b449693df98..a084ee3d1e7 100644 --- a/reactos/subsys/win32k/include/winpos.h +++ b/reactos/subsys/win32k/include/winpos.h @@ -2,18 +2,18 @@ #define SWP_NOCLIENTMOVE 0x0800 #define SWP_NOCLIENTSIZE 0x1000 -LRESULT +LRESULT STDCALL WinPosGetNonClientSize(HWND Wnd, RECT* WindowRect, RECT* ClientRect); -UINT +UINT STDCALL WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos, POINT* MinTrack, POINT* MaxTrack); -UINT +UINT STDCALL WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos); -BOOLEAN +BOOLEAN STDCALL WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags); -BOOLEAN +BOOLEAN FASTCALL WinPosShowWindow(HWND Wnd, INT Cmd); -USHORT +USHORT STDCALL WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT WinPoint, PWINDOW_OBJECT* Window); diff --git a/reactos/subsys/win32k/include/winsta.h b/reactos/subsys/win32k/include/winsta.h index ddbf173833d..7c257564632 100644 --- a/reactos/subsys/win32k/include/winsta.h +++ b/reactos/subsys/win32k/include/winsta.h @@ -13,32 +13,32 @@ ((IoGetCurrentProcess()->Win32WindowStation) = (PVOID)(WinSta)) -NTSTATUS +NTSTATUS FASTCALL InitWindowStationImpl(VOID); -NTSTATUS +NTSTATUS FASTCALL CleanupWindowStationImpl(VOID); -NTSTATUS +NTSTATUS STDCALL ValidateWindowStationHandle(HWINSTA WindowStation, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PWINSTATION_OBJECT *Object); -NTSTATUS +NTSTATUS STDCALL ValidateDesktopHandle(HDESK Desktop, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PDESKTOP_OBJECT *Object); LRESULT CALLBACK W32kDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); -PDESKTOP_OBJECT +PDESKTOP_OBJECT FASTCALL W32kGetActiveDesktop(VOID); -VOID +VOID FASTCALL W32kInitializeDesktopGraphics(VOID); -VOID +VOID FASTCALL W32kEndDesktopGraphics(VOID); -HDC +HDC FASTCALL W32kGetScreenDC(VOID); #endif /* __WIN32K_WINSTA_H */ diff --git a/reactos/subsys/win32k/ldr/loader.c b/reactos/subsys/win32k/ldr/loader.c index 3661928f399..d647612ddfd 100644 --- a/reactos/subsys/win32k/ldr/loader.c +++ b/reactos/subsys/win32k/ldr/loader.c @@ -1,4 +1,22 @@ -/* $Id: loader.c,v 1.9 2002/09/08 10:23:50 chorns Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: loader.c,v 1.10 2003/05/18 17:16:17 ea Exp $ * */ diff --git a/reactos/subsys/win32k/main/dllmain.c b/reactos/subsys/win32k/main/dllmain.c index 830ac2245c1..9357fa11c1e 100644 --- a/reactos/subsys/win32k/main/dllmain.c +++ b/reactos/subsys/win32k/main/dllmain.c @@ -1,4 +1,22 @@ -/* $Id: dllmain.c,v 1.34 2003/04/02 23:18:48 gdalsnes Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dllmain.c,v 1.35 2003/05/18 17:16:17 ea Exp $ * * Entry Point for win32k.sys */ @@ -16,6 +34,10 @@ #include #include #include +#include +#include +#include +#include #define NDEBUG #include diff --git a/reactos/subsys/win32k/main/svctabm.c b/reactos/subsys/win32k/main/svctabm.c index 0a0411f1d9f..520cd4ab792 100644 --- a/reactos/subsys/win32k/main/svctabm.c +++ b/reactos/subsys/win32k/main/svctabm.c @@ -1,4 +1,40 @@ -/* $Id: svctabm.c,v 1.3 2002/09/08 10:23:51 chorns Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: svctabm.c,v 1.4 2003/05/18 17:16:17 ea Exp $ * * Entry Point for win32k.sys */ diff --git a/reactos/subsys/win32k/makefile b/reactos/subsys/win32k/makefile index e00635a21bc..7134d39f30d 100644 --- a/reactos/subsys/win32k/makefile +++ b/reactos/subsys/win32k/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.61 2003/04/02 23:19:28 gdalsnes Exp $ +# $Id: makefile,v 1.62 2003/05/18 17:16:17 ea Exp $ PATH_TO_TOP = ../.. @@ -22,9 +22,16 @@ else CFLAGS_DBG := endif -TARGET_CFLAGS = $(CFLAGS_DBG) -I$(PATH_TO_TOP)/ntoskrnl/include -I$(FREETYPE_DIR)/include -DUNICODE -Wall +TARGET_CFLAGS =\ + $(CFLAGS_DBG) \ + -I$(PATH_TO_TOP)/ntoskrnl/include \ + -I$(FREETYPE_DIR)/include \ + -DUNICODE \ + -Wall -TARGET_LFLAGS = $(PATH_TO_TOP)/dk/nkm/lib/freetype.a +TARGET_LFLAGS =\ + $(PATH_TO_TOP)/dk/nkm/lib/freetype.a \ + --disable-stdcall-fixup ENG_OBJECTS= eng/debug.o eng/mem.o eng/brush.o eng/bitblt.o eng/clip.o \ eng/copybits.o eng/device.o eng/handle.o eng/lineto.o eng/paint.o \ diff --git a/reactos/subsys/win32k/misc/driver.c b/reactos/subsys/win32k/misc/driver.c index 677562b8aee..33345a6bf7c 100644 --- a/reactos/subsys/win32k/misc/driver.c +++ b/reactos/subsys/win32k/misc/driver.c @@ -1,4 +1,22 @@ -/* $Id: driver.c,v 1.24 2003/03/11 00:21:41 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: driver.c,v 1.25 2003/05/18 17:16:17 ea Exp $ * * GDI Driver support routines * (mostly swiped from Wine) @@ -32,7 +50,7 @@ typedef struct _GRAPHICS_DRIVER static PGRAPHICS_DRIVER DriverList; static PGRAPHICS_DRIVER GenericDriver = 0; -BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver) +BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver) { PGRAPHICS_DRIVER Driver = ExAllocatePoolWithTag(NonPagedPool, sizeof(*Driver), DRIVER_TAG); DPRINT( "DRIVER_RegisterDriver( Name: %S )\n", Name ); @@ -139,7 +157,7 @@ PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name) return (PGD_ENABLEDRIVER)GdiDriverInfo.EntryPoint; } -BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED, +BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED, PDRIVER_FUNCTIONS DF) { int i; @@ -255,7 +273,7 @@ HANDLE DRIVER_FindMPDriver(LPCWSTR Name) } -BOOL DRIVER_UnregisterDriver(LPCWSTR Name) +BOOL DRIVER_UnregisterDriver(LPCWSTR Name) { PGRAPHICS_DRIVER Driver = NULL; @@ -300,7 +318,7 @@ BOOL DRIVER_UnregisterDriver(LPCWSTR Name) } } -INT DRIVER_ReferenceDriver (LPCWSTR Name) +INT DRIVER_ReferenceDriver (LPCWSTR Name) { GRAPHICS_DRIVER *Driver = DriverList; @@ -318,7 +336,7 @@ INT DRIVER_ReferenceDriver (LPCWSTR Name) return ++GenericDriver->ReferenceCount; } -INT DRIVER_UnreferenceDriver (LPCWSTR Name) +INT DRIVER_UnreferenceDriver (LPCWSTR Name) { GRAPHICS_DRIVER *Driver = DriverList; @@ -335,3 +353,4 @@ INT DRIVER_UnreferenceDriver (LPCWSTR Name) assert( GenericDriver != 0 ); return --GenericDriver->ReferenceCount; } +/* EOF */ diff --git a/reactos/subsys/win32k/misc/error.c b/reactos/subsys/win32k/misc/error.c index 0d124d9a349..1e5e6662de7 100644 --- a/reactos/subsys/win32k/misc/error.c +++ b/reactos/subsys/win32k/misc/error.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: error.c,v 1.5 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Errors @@ -11,13 +30,13 @@ #include -VOID +VOID FASTCALL SetLastNtError(NTSTATUS Status) { SetLastWin32Error(RtlNtStatusToDosError(Status)); } -VOID +VOID FASTCALL SetLastWin32Error(DWORD Status) { PTEB Teb = NtCurrentTeb(); diff --git a/reactos/subsys/win32k/misc/object.c b/reactos/subsys/win32k/misc/object.c index f9ff4c811e5..2a44a430966 100644 --- a/reactos/subsys/win32k/misc/object.c +++ b/reactos/subsys/win32k/misc/object.c @@ -1,4 +1,22 @@ -/* $Id: object.c,v 1.5 2002/06/26 18:38:24 hbirr Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: object.c,v 1.6 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -19,31 +37,31 @@ /* FUNCTIONS *****************************************************************/ -PVOID +PVOID FASTCALL HEADER_TO_BODY(PUSER_OBJECT_HEADER ObjectHeader) { return (((PUSER_OBJECT_HEADER)ObjectHeader) + 1); } -PUSER_OBJECT_HEADER +PUSER_OBJECT_HEADER FASTCALL BODY_TO_HEADER(PVOID ObjectBody) { return (((PUSER_OBJECT_HEADER)ObjectBody) - 1); } -VOID STATIC +VOID STATIC FASTCALL ObmpLockHandleTable(PUSER_HANDLE_TABLE HandleTable) { ExAcquireFastMutex(&HandleTable->ListLock); } -VOID STATIC +VOID STATIC FASTCALL ObmpUnlockHandleTable(PUSER_HANDLE_TABLE HandleTable) { ExReleaseFastMutex(&HandleTable->ListLock); } -VOID +VOID FASTCALL ObmpPerformRetentionChecks(PUSER_OBJECT_HEADER ObjectHeader) { if (ObjectHeader->RefCount < 0) @@ -64,7 +82,7 @@ ObmpPerformRetentionChecks(PUSER_OBJECT_HEADER ObjectHeader) } } -PUSER_HANDLE +PUSER_HANDLE FASTCALL ObmpGetObjectByHandle(PUSER_HANDLE_TABLE HandleTable, HANDLE Handle) /* @@ -98,7 +116,7 @@ ObmpGetObjectByHandle(PUSER_HANDLE_TABLE HandleTable, return &(Block->Handles[Index % HANDLE_BLOCK_ENTRIES]); } -VOID +VOID FASTCALL ObmpCloseAllHandles(PUSER_HANDLE_TABLE HandleTable) { PLIST_ENTRY CurrentEntry; @@ -142,7 +160,7 @@ ObmpCloseAllHandles(PUSER_HANDLE_TABLE HandleTable) ObmpUnlockHandleTable(HandleTable); } -VOID +VOID FASTCALL ObmpDeleteHandleTable(PUSER_HANDLE_TABLE HandleTable) { PUSER_HANDLE_BLOCK Current; @@ -164,7 +182,7 @@ ObmpDeleteHandleTable(PUSER_HANDLE_TABLE HandleTable) } } -PVOID +PVOID FASTCALL ObmpDeleteHandle(PUSER_HANDLE_TABLE HandleTable, HANDLE Handle) { @@ -196,7 +214,7 @@ ObmpDeleteHandle(PUSER_HANDLE_TABLE HandleTable, return ObjectBody; } -NTSTATUS +NTSTATUS FASTCALL ObmpInitializeObject(PUSER_HANDLE_TABLE HandleTable, PUSER_OBJECT_HEADER ObjectHeader, PHANDLE Handle, @@ -221,7 +239,7 @@ ObmpInitializeObject(PUSER_HANDLE_TABLE HandleTable, } -ULONG +ULONG FASTCALL ObmGetReferenceCount(PVOID ObjectBody) { PUSER_OBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody); @@ -229,7 +247,7 @@ ObmGetReferenceCount(PVOID ObjectBody) return ObjectHeader->RefCount; } -ULONG +ULONG FASTCALL ObmGetHandleCount(PVOID ObjectBody) { PUSER_OBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody); @@ -237,7 +255,7 @@ ObmGetHandleCount(PVOID ObjectBody) return ObjectHeader->HandleCount; } -VOID +VOID FASTCALL ObmReferenceObject(PVOID ObjectBody) /* * FUNCTION: Increments a given object's reference count and performs @@ -260,7 +278,7 @@ ObmReferenceObject(PVOID ObjectBody) ObmpPerformRetentionChecks(ObjectHeader); } -VOID +VOID FASTCALL ObmDereferenceObject(PVOID ObjectBody) /* * FUNCTION: Decrements a given object's reference count and performs @@ -283,7 +301,7 @@ ObmDereferenceObject(PVOID ObjectBody) ObmpPerformRetentionChecks(ObjectHeader); } -NTSTATUS +NTSTATUS FASTCALL ObmReferenceObjectByPointer(PVOID ObjectBody, USER_OBJECT_TYPE ObjectType) /* @@ -308,7 +326,7 @@ ObmReferenceObjectByPointer(PVOID ObjectBody, return STATUS_SUCCESS; } -PVOID +PVOID FASTCALL ObmCreateObject(PUSER_HANDLE_TABLE HandleTable, PHANDLE Handle, USER_OBJECT_TYPE ObjectType, @@ -344,7 +362,7 @@ ObmCreateObject(PUSER_HANDLE_TABLE HandleTable, return ObjectBody; } -NTSTATUS +NTSTATUS FASTCALL ObmCreateHandle(PUSER_HANDLE_TABLE HandleTable, PVOID ObjectBody, PHANDLE HandleReturn) @@ -414,7 +432,7 @@ ObmCreateHandle(PUSER_HANDLE_TABLE HandleTable, return STATUS_SUCCESS; } -NTSTATUS +NTSTATUS FASTCALL ObmReferenceObjectByHandle(PUSER_HANDLE_TABLE HandleTable, HANDLE Handle, USER_OBJECT_TYPE ObjectType, @@ -461,7 +479,7 @@ ObmReferenceObjectByHandle(PUSER_HANDLE_TABLE HandleTable, return STATUS_SUCCESS; } -NTSTATUS +NTSTATUS FASTCALL ObmCloseHandle(PUSER_HANDLE_TABLE HandleTable, HANDLE Handle) { @@ -478,20 +496,20 @@ ObmCloseHandle(PUSER_HANDLE_TABLE HandleTable, return STATUS_SUCCESS; } -VOID +VOID FASTCALL ObmInitializeHandleTable(PUSER_HANDLE_TABLE HandleTable) { InitializeListHead(&HandleTable->ListHead); ExInitializeFastMutex(&HandleTable->ListLock); } -VOID +VOID FASTCALL ObmFreeHandleTable(PUSER_HANDLE_TABLE HandleTable) { ObmpDeleteHandleTable(HandleTable); } -PUSER_HANDLE_TABLE +PUSER_HANDLE_TABLE FASTCALL ObmCreateHandleTable(VOID) { PUSER_HANDLE_TABLE HandleTable; @@ -508,7 +526,7 @@ ObmCreateHandleTable(VOID) return HandleTable; } -VOID +VOID FASTCALL ObmDestroyHandleTable(PUSER_HANDLE_TABLE HandleTable) { ObmFreeHandleTable(HandleTable); diff --git a/reactos/subsys/win32k/ntuser/callback.c b/reactos/subsys/win32k/ntuser/callback.c index 37a4da77e80..048b8c959e4 100644 --- a/reactos/subsys/win32k/ntuser/callback.c +++ b/reactos/subsys/win32k/ntuser/callback.c @@ -1,4 +1,22 @@ -/* $Id: callback.c,v 1.8 2003/05/17 14:30:28 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: callback.c,v 1.9 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -17,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/subsys/win32k/ntuser/class.c b/reactos/subsys/win32k/ntuser/class.c index 3ca58ca4748..9b41309f5cd 100644 --- a/reactos/subsys/win32k/ntuser/class.c +++ b/reactos/subsys/win32k/ntuser/class.c @@ -1,4 +1,22 @@ -/* $Id: class.c,v 1.15 2003/05/03 14:12:14 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: class.c,v 1.16 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -25,20 +43,20 @@ /* FUNCTIONS *****************************************************************/ -NTSTATUS +NTSTATUS FASTCALL InitClassImpl(VOID) { return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS FASTCALL CleanupClassImpl(VOID) { return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS STDCALL ClassReferenceClassByName(PW32PROCESS Process, PWNDCLASS_OBJECT* Class, LPWSTR ClassName) @@ -67,7 +85,7 @@ ClassReferenceClassByName(PW32PROCESS Process, return(STATUS_NOT_FOUND); } -NTSTATUS +NTSTATUS FASTCALL ClassReferenceClassByAtom(PWNDCLASS_OBJECT *Class, RTL_ATOM ClassAtom) { @@ -109,7 +127,7 @@ ClassReferenceClassByAtom(PWNDCLASS_OBJECT *Class, return(Status); } -NTSTATUS +NTSTATUS FASTCALL ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class, LPWSTR ClassNameOrAtom) { @@ -165,7 +183,7 @@ NtUserGetWOWClass(DWORD Unknown0, return(0); } -PWNDCLASS_OBJECT +PWNDCLASS_OBJECT FASTCALL W32kCreateClass(LPWNDCLASSEX lpwcx, BOOL bUnicodeClass) { @@ -265,7 +283,7 @@ NtUserRegisterClassExWOW(LPWNDCLASSEX lpwcx, return(Atom); } -ULONG +ULONG FASTCALL W32kGetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset) { LONG Ret; diff --git a/reactos/subsys/win32k/ntuser/guicheck.c b/reactos/subsys/win32k/ntuser/guicheck.c index 6eb71c0e625..9d60d7c4270 100644 --- a/reactos/subsys/win32k/ntuser/guicheck.c +++ b/reactos/subsys/win32k/ntuser/guicheck.c @@ -1,4 +1,22 @@ - /* $Id: guicheck.c,v 1.10 2003/03/06 23:57:03 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: guicheck.c,v 1.11 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -33,7 +51,7 @@ static ULONG NrGuiApplicationsRunning = 0; /* FUNCTIONS *****************************************************************/ -VOID +VOID FASTCALL W32kGraphicsCheck(BOOL Create) { if (Create) @@ -58,7 +76,7 @@ W32kGraphicsCheck(BOOL Create) } -VOID +VOID FASTCALL W32kGuiCheck(VOID) { if (PsGetWin32Process() == NULL) diff --git a/reactos/subsys/win32k/ntuser/hook.c b/reactos/subsys/win32k/ntuser/hook.c index 031a8757fc0..8a68b3a6bae 100644 --- a/reactos/subsys/win32k/ntuser/hook.c +++ b/reactos/subsys/win32k/ntuser/hook.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: hook.c,v 1.2 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Window hooks diff --git a/reactos/subsys/win32k/ntuser/input.c b/reactos/subsys/win32k/ntuser/input.c index 42c49db317e..bb68dedcc12 100644 --- a/reactos/subsys/win32k/ntuser/input.c +++ b/reactos/subsys/win32k/ntuser/input.c @@ -1,4 +1,22 @@ -/* $Id: input.c,v 1.5 2003/03/09 18:44:59 jfilby Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: input.c,v 1.6 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -19,6 +37,7 @@ #include #include #include +#include #define NDEBUG #include @@ -32,8 +51,6 @@ static HANDLE KeyboardDeviceHandle; static KEVENT InputThreadsStart; static BOOLEAN InputThreadsRunning = FALSE; -VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount); - /* FUNCTIONS *****************************************************************/ NTSTATUS STDCALL STATIC @@ -139,7 +156,7 @@ NtUserAcquireOrReleaseInputOwnership(BOOLEAN Release) return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS FASTCALL InitInputImpl(VOID) { NTSTATUS Status; @@ -231,7 +248,7 @@ InitInputImpl(VOID) return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS FASTCALL CleanupInputImp(VOID) { return(STATUS_SUCCESS); diff --git a/reactos/subsys/win32k/ntuser/keyboard.c b/reactos/subsys/win32k/ntuser/keyboard.c index 1546dc1e6c6..fdf14de7330 100644 --- a/reactos/subsys/win32k/ntuser/keyboard.c +++ b/reactos/subsys/win32k/ntuser/keyboard.c @@ -1,4 +1,22 @@ -/* $Id: keyboard.c,v 1.2 2002/10/31 00:03:31 dwelch Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: keyboard.c,v 1.3 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -153,6 +171,7 @@ ToUnicode(UINT wVirtKey, int cchBuff, UINT wFlags) { + return(0); } BOOL STDCALL @@ -220,3 +239,4 @@ NtUserTranslateMessage(LPMSG lpMsg, } return(FALSE); } +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/message.c b/reactos/subsys/win32k/ntuser/message.c index 015af9f336d..d8ddfb4398e 100644 --- a/reactos/subsys/win32k/ntuser/message.c +++ b/reactos/subsys/win32k/ntuser/message.c @@ -1,4 +1,22 @@ -/* $Id: message.c,v 1.17 2003/05/18 06:47:19 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: message.c,v 1.18 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,13 +46,13 @@ /* FUNCTIONS *****************************************************************/ -NTSTATUS +NTSTATUS FASTCALL W32kInitMessageImpl(VOID) { return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS FASTCALL W32kCleanupMessageImpl(VOID) { return(STATUS_SUCCESS); diff --git a/reactos/subsys/win32k/ntuser/metric.c b/reactos/subsys/win32k/ntuser/metric.c index bad8d0506a3..b1cf442dcd3 100644 --- a/reactos/subsys/win32k/ntuser/metric.c +++ b/reactos/subsys/win32k/ntuser/metric.c @@ -1,4 +1,22 @@ -/* $Id: metric.c,v 1.6 2003/03/13 20:02:36 rcampbell Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: metric.c,v 1.7 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel diff --git a/reactos/subsys/win32k/ntuser/msgqueue.c b/reactos/subsys/win32k/ntuser/msgqueue.c index 1216ba8d6d8..e057567812c 100644 --- a/reactos/subsys/win32k/ntuser/msgqueue.c +++ b/reactos/subsys/win32k/ntuser/msgqueue.c @@ -1,4 +1,22 @@ -/* $Id: msgqueue.c,v 1.7 2002/11/01 11:29:58 dwelch Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * 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.8 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -40,7 +58,7 @@ static KEVENT HardwareMessageEvent; /* FUNCTIONS *****************************************************************/ -VOID +VOID FASTCALL MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue) { ExAcquireFastMutex(&Queue->Lock); @@ -49,7 +67,7 @@ MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue) ExReleaseFastMutex(&Queue->Lock); } -VOID +VOID FASTCALL MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue) { ExAcquireFastMutex(&Queue->Lock); @@ -62,7 +80,7 @@ MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue) } -NTSTATUS +NTSTATUS FASTCALL MsqInitializeImpl(VOID) { /*CurrentFocusMessageQueue = NULL;*/ @@ -73,7 +91,7 @@ MsqInitializeImpl(VOID) return(STATUS_SUCCESS); } -VOID +VOID FASTCALL MsqInsertSystemMessage(MSG* Msg) { KIRQL OldIrql; @@ -92,7 +110,7 @@ MsqInsertSystemMessage(MSG* Msg) KeSetEvent(&HardwareMessageEvent, IO_NO_INCREMENT, FALSE); } -BOOL STATIC +BOOL STATIC STDCALL MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh, PUSER_MESSAGE Message, BOOL Remove, PWINDOW_OBJECT ScopeWin, PUSHORT HitTest, @@ -194,7 +212,7 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh, return(TRUE); } -BOOL +BOOL STDCALL MsqPeekHardwareMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND hWnd, UINT FilterLow, UINT FilterHigh, BOOL Remove, PUSER_MESSAGE* Message) @@ -325,7 +343,7 @@ MsqPeekHardwareMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND hWnd, return(FALSE); } -VOID +VOID STDCALL MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) { #if 0 @@ -348,14 +366,14 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) #endif } -VOID +VOID FASTCALL MsqInitializeMessage(PUSER_MESSAGE Message, LPMSG Msg) { RtlMoveMemory(&Message->Msg, Msg, sizeof(MSG)); } -PUSER_MESSAGE +PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg) { PUSER_MESSAGE Message; @@ -371,13 +389,13 @@ MsqCreateMessage(LPMSG Msg) return Message; } -VOID +VOID FASTCALL MsqDestroyMessage(PUSER_MESSAGE Message) { ExFreePool(Message); } -VOID +VOID FASTCALL MsqDispatchSentNotifyMessages(PUSER_MESSAGE_QUEUE MessageQueue) { PLIST_ENTRY ListEntry; @@ -399,13 +417,13 @@ MsqDispatchSentNotifyMessages(PUSER_MESSAGE_QUEUE MessageQueue) } } -BOOLEAN +BOOLEAN FASTCALL MsqPeekSentMessages(PUSER_MESSAGE_QUEUE MessageQueue) { return(!IsListEmpty(&MessageQueue->SentMessagesListHead)); } -BOOLEAN +BOOLEAN FASTCALL MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue) { PUSER_SENT_MESSAGE Message; @@ -461,7 +479,7 @@ MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue) return(TRUE); } -VOID +VOID FASTCALL MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_SENT_MESSAGE_NOTIFY NotifyMessage) { @@ -471,7 +489,7 @@ MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue, ExReleaseFastMutex(&MessageQueue->Lock); } -VOID +VOID FASTCALL MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_SENT_MESSAGE Message) { @@ -480,7 +498,7 @@ MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue, ExReleaseFastMutex(&MessageQueue->Lock); } -VOID +VOID FASTCALL MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_MESSAGE Message) { ExAcquireFastMutex(&MessageQueue->Lock); @@ -490,7 +508,7 @@ MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_MESSAGE Message) ExReleaseFastMutex(&MessageQueue->Lock); } -BOOLEAN +BOOLEAN STDCALL MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, IN BOOLEAN Hardware, IN BOOLEAN Remove, @@ -536,7 +554,7 @@ MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, return(FALSE); } -NTSTATUS +NTSTATUS FASTCALL MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue) { PVOID WaitObjects[2] = {&MessageQueue->NewMessages, &HardwareMessageEvent}; @@ -550,7 +568,7 @@ MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue) NULL)); } -VOID +VOID FASTCALL MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue) { InitializeListHead(&MessageQueue->PostedMessagesListHead); @@ -564,7 +582,7 @@ MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue) MessageQueue->FocusWindow = NULL; } -VOID +VOID FASTCALL MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue) { PLIST_ENTRY CurrentEntry; @@ -580,7 +598,7 @@ MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue) } } -PUSER_MESSAGE_QUEUE +PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(VOID) { PUSER_MESSAGE_QUEUE MessageQueue; @@ -597,7 +615,7 @@ MsqCreateMessageQueue(VOID) return MessageQueue; } -VOID +VOID FASTCALL MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue) { MsqFreeMessageQueue(MessageQueue); diff --git a/reactos/subsys/win32k/ntuser/painting.c b/reactos/subsys/win32k/ntuser/painting.c index ffa863ba637..6bf66e74607 100644 --- a/reactos/subsys/win32k/ntuser/painting.c +++ b/reactos/subsys/win32k/ntuser/painting.c @@ -1,4 +1,22 @@ -/* $Id: painting.c,v 1.12 2003/03/27 02:25:14 rcampbell Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: painting.c,v 1.13 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -40,7 +58,7 @@ /* FUNCTIONS *****************************************************************/ -HRGN STATIC +HRGN STATIC STDCALL PaintDoPaint(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, ULONG ExFlags) { HDC hDC; @@ -123,7 +141,7 @@ PaintDoPaint(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, ULONG ExFlags) return(hRgn); } -VOID STATIC +VOID STATIC FASTCALL PaintUpdateInternalPaint(PWINDOW_OBJECT Window, ULONG Flags) { if (Flags & RDW_INTERNALPAINT) @@ -146,7 +164,7 @@ PaintUpdateInternalPaint(PWINDOW_OBJECT Window, ULONG Flags) } } -VOID STATIC +VOID STATIC FASTCALL PaintValidateParent(PWINDOW_OBJECT Child) { HWND DesktopHandle = W32kGetDesktopWindow(); @@ -207,7 +225,7 @@ PaintValidateParent(PWINDOW_OBJECT Child) W32kReleaseWindowObject(Desktop); } -VOID STATIC +VOID STATIC STDCALL PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, BOOL First) { @@ -412,7 +430,7 @@ PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, PaintUpdateInternalPaint(Window, Flags); } -BOOL +BOOL STDCALL PaintRedrawWindow(HWND hWnd, const RECT* UpdateRect, HRGN UpdateRgn, ULONG Flags, ULONG ExFlags) { @@ -841,7 +859,7 @@ NtUserInvalidateRect( WINBOOL bErase) { HRGN hRGN; - hRGN = W32kCreateRectRgnIndirect(lpRect); + hRGN = W32kCreateRectRgnIndirect((PRECT)lpRect); return NtUserInvalidateRgn(hWnd, hRGN, bErase); } @@ -880,4 +898,4 @@ NtUserInvalidateRgn( W32kSendMessage(hWnd, WM_PAINT, 0, 0, FALSE); return(TRUE); } - +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/prop.c b/reactos/subsys/win32k/ntuser/prop.c index d75b7722774..ef0891be4fc 100644 --- a/reactos/subsys/win32k/ntuser/prop.c +++ b/reactos/subsys/win32k/ntuser/prop.c @@ -1,4 +1,22 @@ -/* $Id: prop.c,v 1.1 2002/09/04 18:09:31 dwelch Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: prop.c,v 1.2 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,7 +46,7 @@ /* FUNCTIONS *****************************************************************/ -PPROPERTY +PPROPERTY FASTCALL W32kGetProp(PWINDOW_OBJECT WindowObject, ATOM Atom) { PLIST_ENTRY ListEntry; @@ -134,3 +152,4 @@ NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data) W32kReleaseWindowObject(WindowObject); return(TRUE); } +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/scrollbar.c b/reactos/subsys/win32k/ntuser/scrollbar.c index 95a52060bb7..e0ed7018646 100644 --- a/reactos/subsys/win32k/ntuser/scrollbar.c +++ b/reactos/subsys/win32k/ntuser/scrollbar.c @@ -1,4 +1,22 @@ -/* $Id: scrollbar.c,v 1.4 2003/01/24 22:42:15 jfilby Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: scrollbar.c,v 1.5 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -19,6 +37,7 @@ #include #include #include +#include //#define NDEBUG #include @@ -34,7 +53,7 @@ * 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to * the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal. */ -static BOOL +static BOOL STDCALL SCROLL_GetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect) { SCROLLBARINFO info; @@ -133,7 +152,7 @@ SCROLL_GetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect) return vertical; } -DWORD SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject) +DWORD FASTCALL SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject) { PSCROLLBARINFO psbi; LRESULT Result; @@ -168,7 +187,7 @@ DWORD SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject) return 0; } -DWORD SCROLL_GetScrollBarInfo(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi) +DWORD STDCALL SCROLL_GetScrollBarInfo(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi) { switch(idObject) { diff --git a/reactos/subsys/win32k/ntuser/stubs.c b/reactos/subsys/win32k/ntuser/stubs.c index fbb0052200e..5c64eb34539 100644 --- a/reactos/subsys/win32k/ntuser/stubs.c +++ b/reactos/subsys/win32k/ntuser/stubs.c @@ -1,4 +1,5 @@ -/* +/* $Id: stubs.c,v 1.10 2003/05/18 17:16:17 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Native User stubs diff --git a/reactos/subsys/win32k/ntuser/timer.c b/reactos/subsys/win32k/ntuser/timer.c index 6d174a9c3d0..7b61d22912c 100644 --- a/reactos/subsys/win32k/ntuser/timer.c +++ b/reactos/subsys/win32k/ntuser/timer.c @@ -1,4 +1,22 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: timer.c,v 1.2 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -246,7 +264,7 @@ NtUserSetSystemTimer( static NTSTATUS STDCALL -TimerThreadMain() +TimerThreadMain(VOID) { NTSTATUS Status; LARGE_INTEGER CurrentTime; @@ -327,8 +345,8 @@ TimerThreadMain() -NTSTATUS -InitTimerImpl() +NTSTATUS FASTCALL +InitTimerImpl(VOID) { NTSTATUS Status; @@ -355,8 +373,4 @@ InitTimerImpl() return Status; } - - - - - +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/userobj.c b/reactos/subsys/win32k/ntuser/userobj.c index 006e9ed5a00..dd11f04c8d6 100644 --- a/reactos/subsys/win32k/ntuser/userobj.c +++ b/reactos/subsys/win32k/ntuser/userobj.c @@ -1,4 +1,22 @@ -/* $Id: userobj.c,v 1.1 2001/07/06 00:05:05 rex Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: userobj.c,v 1.2 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -17,7 +35,7 @@ static LIST_ENTRY UserObjectList; -PUSER_OBJECT USEROBJ_AllocObject (WORD size, WORD magic) +PUSER_OBJECT FASTCALL USEROBJ_AllocObject (WORD size, WORD magic) { PUSER_OBJECT_HEADER newObject; @@ -37,7 +55,7 @@ PUSER_OBJECT USEROBJ_AllocObject (WORD size, WORD magic) return UserObjectHeaderToBody (newObject); } -BOOL USEROBJ_FreeObject (PUSER_OBJECT object, WORD magic) +BOOL FASTCALL USEROBJ_FreeObject (PUSER_OBJECT object, WORD magic) { PUSER_OBJECT_HEADER objectHeader; @@ -56,7 +74,7 @@ BOOL USEROBJ_FreeObject (PUSER_OBJECT object, WORD magic) return TRUE; } -HUSEROBJ USEROBJ_PtrToHandle (PUSER_OBJECT object, WORD magic) +HUSEROBJ FASTCALL USEROBJ_PtrToHandle (PUSER_OBJECT object, WORD magic) { PUSER_OBJECT_HEADER objectHeader; @@ -73,7 +91,7 @@ HUSEROBJ USEROBJ_PtrToHandle (PUSER_OBJECT object, WORD magic) return UserObjectHeaderToHandle(objectHeader); } -PUSER_OBJECT USEROBJ_HandleToPtr (HUSEROBJ handle, WORD magic) +PUSER_OBJECT FASTCALL USEROBJ_HandleToPtr (HUSEROBJ handle, WORD magic) { PUSER_OBJECT_HEADER objectHeader; @@ -91,7 +109,7 @@ PUSER_OBJECT USEROBJ_HandleToPtr (HUSEROBJ handle, WORD magic) return UserObjectHeaderToBody (objectHeader); } -BOOL USEROBJ_LockObject (HUSEROBJ objectHandle) +BOOL FASTCALL USEROBJ_LockObject (HUSEROBJ objectHandle) { PUSER_OBJECT_HEADER objectHeader; @@ -106,7 +124,7 @@ BOOL USEROBJ_LockObject (HUSEROBJ objectHandle) return TRUE; } -BOOL USEROBJ_UnlockObject (HUSEROBJ objectHandle) +BOOL FASTCALL USEROBJ_UnlockObject (HUSEROBJ objectHandle) { PUSER_OBJECT_HEADER objectHeader; @@ -121,5 +139,4 @@ BOOL USEROBJ_UnlockObject (HUSEROBJ objectHandle) return TRUE; } - - +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/windc.c b/reactos/subsys/win32k/ntuser/windc.c index 9ca834f3f98..c11c9181be0 100644 --- a/reactos/subsys/win32k/ntuser/windc.c +++ b/reactos/subsys/win32k/ntuser/windc.c @@ -1,4 +1,22 @@ -/* $Id: windc.c,v 1.10 2003/05/04 15:41:40 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: windc.c,v 1.11 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -35,7 +53,7 @@ static PDCE FirstDce = NULL; /* FUNCTIONS *****************************************************************/ -VOID STATIC +VOID STATIC FASTCALL DceOffsetVisRgn(HDC hDC, HRGN hVisRgn) { DC *dc = DC_HandleToPtr(hDC); @@ -47,7 +65,7 @@ DceOffsetVisRgn(HDC hDC, HRGN hVisRgn) DC_ReleasePtr(hDC); } -BOOL STATIC +BOOL STATIC STDCALL DceGetVisRect(PWINDOW_OBJECT Window, BOOL ClientArea, RECT* Rect) { if (ClientArea) @@ -97,7 +115,7 @@ DceGetVisRect(PWINDOW_OBJECT Window, BOOL ClientArea, RECT* Rect) return(FALSE); } -BOOL +BOOL STDCALL DceAddClipRects(PWINDOW_OBJECT Parent, PWINDOW_OBJECT End, HRGN ClipRgn, PRECT Rect, INT XOffset, INT YOffset) { @@ -131,7 +149,7 @@ DceAddClipRects(PWINDOW_OBJECT Parent, PWINDOW_OBJECT End, return(FALSE); } -HRGN +HRGN STDCALL DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild, ULONG CFlags) { PWINDOW_OBJECT Window; @@ -252,7 +270,7 @@ NtUserGetDC(HWND hWnd) return NtUserGetDCEx(hWnd, NULL, NULL == hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE); } -DCE* DceAllocDCE(HWND hWnd, DCE_TYPE Type) +DCE * FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type) { HDCE DceHandle; DCE* Dce; @@ -292,7 +310,7 @@ DCE* DceAllocDCE(HWND hWnd, DCE_TYPE Type) return(Dce); } -VOID STATIC +VOID STATIC STDCALL DceSetDrawable(PWINDOW_OBJECT WindowObject, HDC hDC, ULONG Flags, BOOL SetClipOrigin) { @@ -537,7 +555,7 @@ NtUserGetDCEx(HWND hWnd, HANDLE hRegion, ULONG Flags) return(Dce->hDC); } -BOOL +BOOL FASTCALL DCE_InternalDelete(PDCE Dce) { PDCE PrevInList; diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index b6002405212..81761d468cc 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -1,4 +1,22 @@ -/* $Id: window.c,v 1.44 2003/05/17 14:30:28 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * 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.45 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,6 +41,10 @@ #include #include #include +#include +#include +#include +#include #define NDEBUG #include @@ -79,12 +101,12 @@ NtUserGetAncestor(HWND hWnd, UINT Flags) } } -VOID +VOID FASTCALL W32kSetFocusWindow(HWND hWnd) { } -BOOL +BOOL FASTCALL W32kIsChildWindow(HWND Parent, HWND Child) { PWINDOW_OBJECT BaseWindow = W32kGetWindowObject(Child); @@ -102,7 +124,7 @@ W32kIsChildWindow(HWND Parent, HWND Child) return(FALSE); } -BOOL +BOOL FASTCALL W32kIsWindowVisible(HWND Wnd) { PWINDOW_OBJECT BaseWindow = W32kGetWindowObject(Wnd); @@ -125,7 +147,7 @@ W32kIsWindowVisible(HWND Wnd) return(Result); } -BOOL +BOOL FASTCALL W32kIsDesktopWindow(HWND hWnd) { PWINDOW_OBJECT WindowObject; @@ -136,17 +158,17 @@ W32kIsDesktopWindow(HWND hWnd) return(IsDesktop); } -HWND W32kGetDesktopWindow() +HWND FASTCALL W32kGetDesktopWindow(VOID) { return W32kGetActiveDesktop()->DesktopWindow; } -HWND W32kGetParentWindow(HWND hWnd) +HWND FASTCALL W32kGetParentWindow(HWND hWnd) { return W32kGetWindowObject(hWnd)->ParentHandle; } -PWINDOW_OBJECT +PWINDOW_OBJECT FASTCALL W32kGetWindowObject(HWND hWnd) { PWINDOW_OBJECT WindowObject; @@ -164,7 +186,7 @@ W32kGetWindowObject(HWND hWnd) return(WindowObject); } -VOID +VOID FASTCALL W32kReleaseWindowObject(PWINDOW_OBJECT Window) { ObmDereferenceObject(Window); @@ -176,7 +198,7 @@ W32kReleaseWindowObject(PWINDOW_OBJECT Window) * * \note Does not check the validity of the parameters */ -VOID +VOID FASTCALL W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect) { ASSERT( WindowObject ); @@ -259,7 +281,7 @@ NtUserGetClientRect(HWND hWnd, LPRECT Rect) return(TRUE); } -HWND +HWND FASTCALL W32kGetActiveWindow(VOID) { PUSER_MESSAGE_QUEUE Queue; @@ -274,7 +296,7 @@ W32kGetActiveWindow(VOID) } } -HWND +HWND FASTCALL W32kGetFocusWindow(VOID) { PUSER_MESSAGE_QUEUE Queue; @@ -292,7 +314,7 @@ W32kGetFocusWindow(VOID) } -WNDPROC +WNDPROC FASTCALL W32kGetWindowProc(HWND Wnd) { PWINDOW_OBJECT WindowObject; @@ -307,7 +329,7 @@ W32kGetWindowProc(HWND Wnd) return(WndProc); } -NTSTATUS +NTSTATUS FASTCALL InitWindowImpl(VOID) { InitializeListHead(&RegisteredMessageListHead); @@ -315,7 +337,7 @@ InitWindowImpl(VOID) return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS FASTCALL CleanupWindowImpl(VOID) { return(STATUS_SUCCESS); @@ -777,9 +799,9 @@ NtUserFindWindowEx(HWND hwndParent, ExReleaseFastMutexUnsafe (&PsGetWin32Process()->WindowListLock); ObmDereferenceObject (classObject); +#endif return (HWND)0; -#endif } DWORD STDCALL @@ -819,7 +841,7 @@ NtUserGetOpenClipboardWindow(VOID) DWORD STDCALL NtUserGetWindowDC(HWND hWnd) { - return NtUserGetDCEx( hWnd, 0, DCX_USESTYLE | DCX_WINDOW ); + return (DWORD) NtUserGetDCEx( hWnd, 0, DCX_USESTYLE | DCX_WINDOW ); } DWORD STDCALL @@ -951,7 +973,7 @@ NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flag if (NULL != lprcUpdate) { - Status = MmCopyFromCaller(&SafeUpdateRect, lprcUpdate, sizeof(RECT)); + Status = MmCopyFromCaller(&SafeUpdateRect, (PRECT) lprcUpdate, sizeof(RECT)); if (! NT_SUCCESS(Status)) { return Status; diff --git a/reactos/subsys/win32k/ntuser/winpos.c b/reactos/subsys/win32k/ntuser/winpos.c index fcc1f6bf045..85acbe4efba 100644 --- a/reactos/subsys/win32k/ntuser/winpos.c +++ b/reactos/subsys/win32k/ntuser/winpos.c @@ -1,4 +1,22 @@ -/* $Id: winpos.c,v 1.9 2003/05/18 07:51:41 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: winpos.c,v 1.10 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,6 +41,7 @@ #include #include #include +#include #define NDEBUG #include @@ -33,7 +52,7 @@ #define SWP_EX_PAINTSELF 0x0002 -ATOM AtomInternalPos = NULL; +ATOM AtomInternalPos = (ATOM) NULL; /* FUNCTIONS *****************************************************************/ @@ -45,7 +64,7 @@ ATOM AtomInternalPos = NULL; (((Style) & WS_THICKFRAME) && \ !((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME) -VOID +VOID FASTCALL WinPosSetupInternalPos(VOID) { AtomInternalPos = NtAddAtom(L"SysIP", (ATOM*)(PULONG)&AtomInternalPos); @@ -67,23 +86,27 @@ NtUserGetClientOrigin(HWND hWnd, LPPOINT Point) return(TRUE); } -BOOL +BOOL FASTCALL WinPosActivateOtherWindow(PWINDOW_OBJECT Window) { + return FALSE; } -POINT STATIC +POINT STATIC FASTCALL WinPosFindIconPos(HWND hWnd, POINT Pos) { + POINT point; + //FIXME + return point; } -HWND STATIC +HWND STATIC FASTCALL WinPosCreateIconTitle(PWINDOW_OBJECT WindowObject) { return(NULL); } -BOOL STATIC +BOOL STATIC FASTCALL WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show) { PINTERNALPOS InternalPos = NtUserGetProp(WindowObject->Self, @@ -127,7 +150,7 @@ WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show) return(FALSE); } -PINTERNALPOS STATIC +PINTERNALPOS STATIC STDCALL WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect) { PINTERNALPOS InternalPos = NtUserGetProp(WindowObject->Self, @@ -157,7 +180,7 @@ WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect) return(InternalPos); } -UINT +UINT STDCALL WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos) { POINT Size; @@ -258,7 +281,7 @@ WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos) return(SwpFlags); } -UINT +UINT STDCALL WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos, POINT* MinTrack, POINT* MaxTrack) { @@ -318,20 +341,24 @@ WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos, if (MaxPos) *MaxPos = MinMax.ptMaxPosition; if (MinTrack) *MinTrack = MinMax.ptMinTrackSize; if (MaxTrack) *MaxTrack = MinMax.ptMaxTrackSize; + + return 0; //FIXME: what does it return? } -BOOL STATIC +BOOL STATIC FASTCALL WinPosChangeActiveWindow(HWND Wnd, BOOL MouseMsg) { + return FALSE; } -LONG STATIC +LONG STATIC STDCALL WinPosDoNCCALCSize(PWINDOW_OBJECT Window, PWINDOWPOS WinPos, RECT* WindowRect, RECT* ClientRect) { + return 0; //FIXME } -BOOL +BOOL STDCALL WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject, PWINDOWPOS WinPos, PRECT WindowRect, @@ -368,7 +395,7 @@ WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject, return(TRUE); } -BOOLEAN +BOOLEAN STDCALL WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags) { @@ -493,7 +520,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, { Window->Style |= WS_VISIBLE; flags |= SWP_EX_PAINTSELF; - VisRgn = 1; + VisRgn = (HRGN) 1; } else { @@ -517,7 +544,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, if (flags & SWP_EX_PAINTSELF) { PaintRedrawWindow(Window->Self, NULL, - (VisRgn == 1) ? 0 : VisRgn, + (VisRgn == (HRGN) 1) ? 0 : VisRgn, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN, RDW_EX_XYWINDOW | RDW_EX_USEHRGN); @@ -525,7 +552,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, else { PaintRedrawWindow(Window->Self, NULL, - (VisRgn == 1) ? 0 : VisRgn, + (VisRgn == (HRGN) 1) ? 0 : VisRgn, RDW_ERASE | RDW_INVALIDATE | RDW_ALLCHILDREN, RDW_EX_USEHRGN); } @@ -546,14 +573,14 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, return(TRUE); } -LRESULT +LRESULT STDCALL WinPosGetNonClientSize(HWND Wnd, RECT* WindowRect, RECT* ClientRect) { *ClientRect = *WindowRect; return(W32kSendNCCALCSIZEMessage(Wnd, FALSE, ClientRect, NULL)); } -BOOLEAN +BOOLEAN FASTCALL WinPosShowWindow(HWND Wnd, INT Cmd) { BOOLEAN WasVisible; @@ -733,7 +760,7 @@ WinPosShowWindow(HWND Wnd, INT Cmd) return(WasVisible); } -BOOL STATIC +BOOL STATIC FASTCALL WinPosPtInWindow(PWINDOW_OBJECT Window, POINT Point) { return(Point.x >= Window->WindowRect.left && @@ -742,7 +769,7 @@ WinPosPtInWindow(PWINDOW_OBJECT Window, POINT Point) Point.y < Window->WindowRect.bottom); } -USHORT STATIC +USHORT STATIC STDCALL WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, POINT Point, PWINDOW_OBJECT* Window) { @@ -786,7 +813,7 @@ WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, POINT Point, return(0); } -USHORT +USHORT STDCALL WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT WinPoint, PWINDOW_OBJECT* Window) { @@ -832,3 +859,4 @@ WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT WinPoint, return(HitTest); } +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/winsta.c b/reactos/subsys/win32k/ntuser/winsta.c index 9b65f51bd5a..e70342f60a6 100644 --- a/reactos/subsys/win32k/ntuser/winsta.c +++ b/reactos/subsys/win32k/ntuser/winsta.c @@ -1,4 +1,22 @@ -/* $Id: winsta.c,v 1.12 2003/03/06 23:57:03 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: winsta.c,v 1.13 2003/05/18 17:16:17 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -18,6 +36,7 @@ /* INCLUDES ******************************************************************/ #include +#include #include #include #include @@ -25,6 +44,8 @@ #include #include #include +#include +#include #define NDEBUG #include @@ -47,13 +68,13 @@ static HDC ScreenDeviceContext = NULL; /* FUNCTIONS *****************************************************************/ -PDESKTOP_OBJECT +PDESKTOP_OBJECT FASTCALL W32kGetActiveDesktop(VOID) { return(InputDesktop); } -NTSTATUS +NTSTATUS FASTCALL InitWindowStationImpl(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; @@ -99,14 +120,14 @@ InitWindowStationImpl(VOID) return(STATUS_SUCCESS); } -NTSTATUS +NTSTATUS FASTCALL CleanupWindowStationImpl(VOID) { return STATUS_SUCCESS; } -NTSTATUS +NTSTATUS STDCALL ValidateWindowStationHandle(HWINSTA WindowStation, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, @@ -128,7 +149,7 @@ ValidateWindowStationHandle(HWINSTA WindowStation, return Status; } -NTSTATUS +NTSTATUS STDCALL ValidateDesktopHandle(HDESK Desktop, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, @@ -341,7 +362,7 @@ NtUserOpenWindowStation( { OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING WindowStationName; - PWINSTATION_OBJECT WinStaObject; + //PWINSTATION_OBJECT WinStaObject; WCHAR NameBuffer[MAX_PATH]; NTSTATUS Status; HWINSTA WinSta; @@ -838,7 +859,7 @@ NtUserSwitchDesktop(HDESK hDesktop) return(TRUE); } -VOID +VOID FASTCALL W32kInitializeDesktopGraphics(VOID) { ScreenDeviceContext = W32kCreateDC(L"DISPLAY", NULL, NULL, NULL); @@ -847,7 +868,7 @@ W32kInitializeDesktopGraphics(VOID) NtUserAcquireOrReleaseInputOwnership(FALSE); } -VOID +VOID FASTCALL W32kEndDesktopGraphics(VOID) { NtUserAcquireOrReleaseInputOwnership(TRUE); @@ -859,7 +880,7 @@ W32kEndDesktopGraphics(VOID) } } -HDC +HDC FASTCALL W32kGetScreenDC(VOID) { return(ScreenDeviceContext); diff --git a/reactos/subsys/win32k/objects/bezier.c b/reactos/subsys/win32k/objects/bezier.c index 9337783e4f7..96aa394a9db 100644 --- a/reactos/subsys/win32k/objects/bezier.c +++ b/reactos/subsys/win32k/objects/bezier.c @@ -1,5 +1,25 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: bezier.c,v 1.3 2003/05/18 17:16:17 ea Exp $ */ #include #include +#include /****************************************************************** * @@ -52,7 +72,7 @@ * level is the recursion depth * returns true if the recusion can be terminated */ -static BOOL BezierCheck( int level, POINT *Points) +static BOOL FASTCALL BezierCheck( int level, POINT *Points) { INT dx, dy; @@ -100,7 +120,7 @@ static BOOL BezierCheck( int level, POINT *Points) /* Helper for GDI_Bezier. * Just handles one Bezier, so Points should point to four POINTs */ -static void GDI_InternalBezier( POINT *Points, POINT **PtsOut, INT *dwOut, +static void STDCALL GDI_InternalBezier( POINT *Points, POINT **PtsOut, INT *dwOut, INT *nPtsOut, INT level ) { if(*nPtsOut == *dwOut) { @@ -160,7 +180,7 @@ static void GDI_InternalBezier( POINT *Points, POINT **PtsOut, INT *dwOut, * alternative would be to call the function twice, once to determine the size * and a second time to do the work - I decided this was too much of a pain]. */ -POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ) +POINT * FASTCALL GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ) { POINT *out; INT Bezier, dwOut = BEZIER_INITBUFSIZE, i; @@ -182,3 +202,4 @@ POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ) return out; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/bitmaps.c b/reactos/subsys/win32k/objects/bitmaps.c index 9a556907855..73c816652a5 100644 --- a/reactos/subsys/win32k/objects/bitmaps.c +++ b/reactos/subsys/win32k/objects/bitmaps.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * 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.27 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -5,6 +24,8 @@ //#include #include "../eng/handle.h" #include +#include +#include #define NDEBUG #include @@ -170,7 +191,7 @@ HBITMAP STDCALL W32kCreateBitmap(INT Width, return hBitmap; } -BOOL Bitmap_InternalDelete( PBITMAPOBJ pBmp ) +BOOL FASTCALL Bitmap_InternalDelete( PBITMAPOBJ pBmp ) { ASSERT( pBmp ); if( pBmp->bitmap.bmBits ) @@ -432,7 +453,7 @@ BOOL STDCALL W32kStretchBlt(HDC hDCDest, /* Internal Functions */ -INT +INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp) { switch(bpp) @@ -462,7 +483,7 @@ BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp) return -1; } -HBITMAP BITMAPOBJ_CopyBitmap(HBITMAP hBitmap) +HBITMAP FASTCALL BITMAPOBJ_CopyBitmap(HBITMAP hBitmap) { PBITMAPOBJ bmp; HBITMAP res; @@ -491,7 +512,7 @@ HBITMAP BITMAPOBJ_CopyBitmap(HBITMAP hBitmap) return res; } -INT BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer) +INT STDCALL BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer) { if(bmp->dib) { @@ -513,3 +534,4 @@ INT BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer) return count; } } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/brush.c b/reactos/subsys/win32k/objects/brush.c index 01e2f89e48d..837cf30ed61 100644 --- a/reactos/subsys/win32k/objects/brush.c +++ b/reactos/subsys/win32k/objects/brush.c @@ -1,4 +1,22 @@ -/* $Id: brush.c,v 1.19 2003/02/25 23:08:54 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: brush.c,v 1.20 2003/05/18 17:16:17 ea Exp $ */ @@ -246,3 +264,4 @@ BOOL STDCALL W32kSetBrushOrgEx(HDC hDC, { UNIMPLEMENTED; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/cliprgn.c b/reactos/subsys/win32k/objects/cliprgn.c index 0b00d4e8b21..1f998a6d82a 100644 --- a/reactos/subsys/win32k/objects/cliprgn.c +++ b/reactos/subsys/win32k/objects/cliprgn.c @@ -1,4 +1,22 @@ - +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: cliprgn.c,v 1.15 2003/05/18 17:16:17 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -11,7 +29,7 @@ #define NDEBUG #include -VOID +VOID FASTCALL CLIPPING_UpdateGCRegion(DC* Dc) { if (Dc->w.hGCClipRgn == NULL) @@ -162,4 +180,4 @@ int STDCALL W32kSetMetaRgn(HDC hDC) } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/color.c b/reactos/subsys/win32k/objects/color.c index e9e542b729a..1e91158dda5 100644 --- a/reactos/subsys/win32k/objects/color.c +++ b/reactos/subsys/win32k/objects/color.c @@ -1,3 +1,23 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: color.c,v 1.17 2003/05/18 17:16:17 ea Exp $ */ + // FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping #undef WIN32_LEAN_AND_MEAN @@ -10,6 +30,8 @@ #include #include "../eng/handle.h" #include +#include +#include #define NDEBUG #include @@ -53,7 +75,7 @@ const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] = { 0xff, 0xff, 0xff, PC_SYS_USED } // last 10 }; -ULONG W32kGetSysColor(int nIndex) +ULONG FASTCALL W32kGetSysColor(int nIndex) { PALETTEENTRY *p = COLOR_sysPalTemplate + (nIndex * sizeof(PALETTEENTRY)); return RGB(p->peRed, p->peGreen, p->peBlue); @@ -73,11 +95,9 @@ HBRUSH STDCALL W32kGetSysColorBrush(int nIndex) return(W32kCreateSolidBrush(Col)); } -//forward declarations -COLORREF COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF color ); -const PALETTEENTRY* COLOR_GetSystemPaletteTemplate(void) +const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate(void) { return (const PALETTEENTRY*)&COLOR_sysPalTemplate; } @@ -483,7 +503,7 @@ BOOL STDCALL W32kUpdateColors(HDC hDC) return 0x666; } -int COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, int size, +INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, PXLATEOBJ XlateObj, COLORREF col, BOOL skipReserved) { int i, best = 0, diff = 0x7fffffff; @@ -505,7 +525,7 @@ int COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, int size, return (XlateObj->pulXlate) ? XlateObj->pulXlate[best] : best; } -COLORREF COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF color ) +COLORREF STDCALL COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF color ) { unsigned char spec_type = color >> 24; int i; @@ -530,7 +550,7 @@ COLORREF COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF return (0x00ffffff & *(COLORREF*)(COLOR_sysPal + COLOR_PaletteLookupPixel(COLOR_sysPal, 256, NULL, color, FALSE))); } -int COLOR_PaletteLookupExactIndex( PALETTEENTRY* palPalEntry, int size, +int STDCALL COLOR_PaletteLookupExactIndex( PALETTEENTRY* palPalEntry, int size, COLORREF col ) { int i; @@ -542,3 +562,4 @@ int COLOR_PaletteLookupExactIndex( PALETTEENTRY* palPalEntry, int size, } return -1; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/coord.c b/reactos/subsys/win32k/objects/coord.c index 7254b88ceec..fa4399ee17a 100644 --- a/reactos/subsys/win32k/objects/coord.c +++ b/reactos/subsys/win32k/objects/coord.c @@ -1,4 +1,22 @@ -/* $Id: coord.c,v 1.10 2003/03/18 08:34:37 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: coord.c,v 1.11 2003/05/18 17:16:18 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -50,7 +68,7 @@ BOOL STDCALL W32kCombineTransform(LPXFORM UnsafeXFormResult, return TRUE; } -VOID STATIC +VOID STATIC FASTCALL CoordDPtoLP(PDC Dc, LPPOINT Point) { FLOAT x, y; @@ -392,4 +410,4 @@ W32kSetWorldTransform(HDC hDC, return TRUE; } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/dc.c b/reactos/subsys/win32k/objects/dc.c index c6197f28f6d..fa58f8262d5 100644 --- a/reactos/subsys/win32k/objects/dc.c +++ b/reactos/subsys/win32k/objects/dc.c @@ -1,4 +1,22 @@ -/* $Id: dc.c,v 1.59 2003/05/04 15:41:40 gvg Exp $ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dc.c,v 1.60 2003/05/18 17:16:18 ea Exp $ * * DC.C - Device context functions * @@ -20,6 +38,7 @@ #include #include "../eng/handle.h" #include +#include #define NDEBUG #include @@ -88,7 +107,7 @@ INT STDCALL func_name( HDC hdc, INT mode ) \ // --------------------------------------------------------- File Statics -static void W32kSetDCState16(HDC hDC, HDC hDCSave); +static VOID FASTCALL W32kSetDCState16(HDC hDC, HDC hDCSave); // ----------------------------------------------------- Public Functions @@ -1291,7 +1310,7 @@ COLORREF STDCALL W32kSetBkColor(HDC hDC, COLORREF color) return oldColor; } -static void W32kSetDCState16(HDC hDC, HDC hDCSave) +STATIC VOID FASTCALL W32kSetDCState16(HDC hDC, HDC hDCSave) { PDC dc, dcs; @@ -1406,7 +1425,7 @@ static void W32kSetDCState16(HDC hDC, HDC hDCSave) // ---------------------------------------------------- Private Interface -HDC DC_AllocDC(LPCWSTR Driver) +HDC FASTCALL DC_AllocDC(LPCWSTR Driver) { PDC NewDC; HDC hDC; @@ -1441,7 +1460,7 @@ HDC DC_AllocDC(LPCWSTR Driver) return hDC; } -HDC DC_FindOpenDC(LPCWSTR Driver) +HDC FASTCALL DC_FindOpenDC(LPCWSTR Driver) { return NULL; } @@ -1449,7 +1468,7 @@ HDC DC_FindOpenDC(LPCWSTR Driver) /*! * Initialize some common fields in the Device Context structure. */ -void DC_InitDC(HDC DCHandle) +VOID FASTCALL DC_InitDC(HDC DCHandle) { // W32kRealizeDefaultPalette(DCHandle); @@ -1461,7 +1480,7 @@ void DC_InitDC(HDC DCHandle) } -void DC_FreeDC(HDC DCToFree) +VOID FASTCALL DC_FreeDC(HDC DCToFree) { if (!GDIOBJ_FreeObj(DCToFree, GO_DC_MAGIC, GDIOBJFLAG_DEFAULT)) { @@ -1469,24 +1488,24 @@ void DC_FreeDC(HDC DCToFree) } } -BOOL DC_InternalDeleteDC( PDC DCToDelete ) +BOOL FASTCALL DC_InternalDeleteDC( PDC DCToDelete ) { if( DCToDelete->DriverName ) ExFreePool(DCToDelete->DriverName); return TRUE; } -HDC DC_GetNextDC (PDC pDC) +HDC FASTCALL DC_GetNextDC (PDC pDC) { return pDC->hNext; } -void DC_SetNextDC (PDC pDC, HDC hNextDC) +VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC) { pDC->hNext = hNextDC; } -void +VOID FASTCALL DC_UpdateXforms(PDC dc) { XFORM xformWnd2Vport; @@ -1509,7 +1528,7 @@ DC_UpdateXforms(PDC dc) dc->w.vport2WorldValid = DC_InvertXform(&dc->w.xformWorld2Vport, &dc->w.xformVport2World); } -BOOL +BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest) { @@ -1530,3 +1549,4 @@ DC_InvertXform(const XFORM *xformSrc, return TRUE; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/dib.c b/reactos/subsys/win32k/objects/dib.c index b58dd5b4d63..5c3d0d6620d 100644 --- a/reactos/subsys/win32k/objects/dib.c +++ b/reactos/subsys/win32k/objects/dib.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dib.c,v 1.22 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -7,7 +26,10 @@ #include #include #include +#include +#include #include +#include #define NDEBUG #include @@ -482,7 +504,8 @@ HBITMAP STDCALL W32kCreateDIBSection(HDC hDC, return hbitmap; } -HBITMAP DIB_CreateDIBSection( +HBITMAP STDCALL +DIB_CreateDIBSection( PDC dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch) @@ -648,7 +671,7 @@ HBITMAP DIB_CreateDIBSection( * http://www.microsoft.com/msdn/sdk/platforms/doc/sdk/win32/struc/src/str01.htm * 11/16/1999 (RJJ) lifted from wine */ -int DIB_GetDIBWidthBytes(int width, int depth) +INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth) { int words; @@ -677,7 +700,7 @@ int DIB_GetDIBWidthBytes(int width, int depth) * 11/16/1999 (RJJ) lifted from wine */ -int DIB_GetDIBImageBytes (int width, int height, int depth) +INT STDCALL DIB_GetDIBImageBytes (INT width, INT height, INT depth) { return DIB_GetDIBWidthBytes( width, depth ) * (height < 0 ? -height : height); } @@ -689,7 +712,7 @@ int DIB_GetDIBImageBytes (int width, int height, int depth) * 11/16/1999 (RJJ) lifted from wine */ -int DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse) +INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse) { int colors; @@ -707,8 +730,11 @@ int DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse) } } -int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width, - int *height, WORD *bpp, WORD *compr ) +INT STDCALL DIB_GetBitmapInfo (const BITMAPINFOHEADER *header, + PDWORD width, + PINT height, + PWORD bpp, + PWORD compr) { if (header->biSize == sizeof(BITMAPINFOHEADER)) { @@ -733,7 +759,7 @@ int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width, // Converts a Device Independent Bitmap (DIB) to a Device Dependant Bitmap (DDB) // The specified Device Context (DC) defines what the DIB should be converted to -PBITMAPOBJ DIBtoDDB(HGLOBAL hPackedDIB, HDC hdc) // FIXME: This should be removed. All references to this function should +PBITMAPOBJ FASTCALL DIBtoDDB(HGLOBAL hPackedDIB, HDC hdc) // FIXME: This should be removed. All references to this function should // change to W32kSetDIBits { HBITMAP hBmp = 0; @@ -758,7 +784,7 @@ PBITMAPOBJ DIBtoDDB(HGLOBAL hPackedDIB, HDC hdc) // FIXME: This should be remove return pBmp; } -RGBQUAD *DIB_MapPaletteColors(PDC dc, LPBITMAPINFO lpbmi) +RGBQUAD * FASTCALL DIB_MapPaletteColors(PDC dc, LPBITMAPINFO lpbmi) { RGBQUAD *lpRGB; int nNumColors,i; @@ -790,7 +816,8 @@ RGBQUAD *DIB_MapPaletteColors(PDC dc, LPBITMAPINFO lpbmi) return lpRGB; } -PALETTEENTRY *DIBColorTableToPaletteEntries(PALETTEENTRY *palEntries, const RGBQUAD *DIBColorTable, ULONG ColorCount) +PPALETTEENTRY STDCALL +DIBColorTableToPaletteEntries(PPALETTEENTRY palEntries, const RGBQUAD *DIBColorTable, ULONG ColorCount) { ULONG i; @@ -804,7 +831,7 @@ PALETTEENTRY *DIBColorTableToPaletteEntries(PALETTEENTRY *palEntries, const RGBQ } } -HPALETTE BuildDIBPalette(BITMAPINFO *bmi, PINT paletteType) +HPALETTE FASTCALL BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType) { BYTE bits; ULONG ColorCount; @@ -843,3 +870,4 @@ HPALETTE BuildDIBPalette(BITMAPINFO *bmi, PINT paletteType) return hPal; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/fillshap.c b/reactos/subsys/win32k/objects/fillshap.c index d387975e7cb..31ea71200ef 100644 --- a/reactos/subsys/win32k/objects/fillshap.c +++ b/reactos/subsys/win32k/objects/fillshap.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: fillshap.c,v 1.18 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -7,6 +26,8 @@ #include #include #include +#include +#include #define NDEBUG #include @@ -52,6 +73,8 @@ W32kPie(HDC hDC, UNIMPLEMENTED; } +#if 0 + //ALTERNATE Selects alternate mode (fills the area between odd-numbered and even-numbered //polygon sides on each scan line). //When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and @@ -78,6 +101,7 @@ extern BOOL FillPolygon_WINDING(SURFOBJ *SurfObj, RECTL BoundRect, int OrigX, int OrigY); +#endif //This implementation is blatantly ripped off from W32kRectangle BOOL @@ -301,3 +325,4 @@ W32kRoundRect(HDC hDC, { UNIMPLEMENTED; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/gdiobj.c b/reactos/subsys/win32k/objects/gdiobj.c index 6da2accb09e..c4f59708287 100644 --- a/reactos/subsys/win32k/objects/gdiobj.c +++ b/reactos/subsys/win32k/objects/gdiobj.c @@ -1,7 +1,25 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ /* * GDIOBJ.C - GDI object manipulation routines * - * $Id: gdiobj.c,v 1.23 2003/03/28 16:20:51 gvg Exp $ + * $Id: gdiobj.c,v 1.24 2003/05/18 17:16:18 ea Exp $ * */ @@ -9,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -16,6 +35,7 @@ #include #include #include +#include #define NDEBUG #include @@ -118,7 +138,7 @@ static FAST_MUTEX RefCountHandling; * Allocate GDI object table. * \param Size - number of entries in the object table. */ -static PGDI_HANDLE_TABLE +static PGDI_HANDLE_TABLE FASTCALL GDIOBJ_iAllocHandleTable (WORD Size) { PGDI_HANDLE_TABLE handleTable; @@ -140,7 +160,7 @@ GDIOBJ_iAllocHandleTable (WORD Size) /*! * Returns the entry into the handle table by index. */ -static PGDI_HANDLE_ENTRY +static PGDI_HANDLE_ENTRY FASTCALL GDIOBJ_iGetHandleEntryForIndex (WORD TableIndex) { //DPRINT("GDIOBJ_iGetHandleEntryForIndex: TableIndex: %d,\n handle: %x, ptr: %x\n", TableIndex, HandleTable->Handles [TableIndex], &(HandleTable->Handles [TableIndex]) ); @@ -153,7 +173,7 @@ GDIOBJ_iGetHandleEntryForIndex (WORD TableIndex) * Finds next free entry in the GDI handle table. * \return index into the table is successful, zero otherwise. */ -static WORD +static WORD FASTCALL GDIOBJ_iGetNextOpenHandleIndex (void) { WORD tableIndex; @@ -183,7 +203,7 @@ GDIOBJ_iGetNextOpenHandleIndex (void) * * \note Use GDIOBJ_Lock() to obtain pointer to the new object. */ -HGDIOBJ GDIOBJ_AllocObj(WORD Size, WORD Magic) +HGDIOBJ FASTCALL GDIOBJ_AllocObj(WORD Size, WORD Magic) { PGDIOBJHDR newObject; PGDI_HANDLE_ENTRY handleEntry; @@ -221,7 +241,7 @@ HGDIOBJ GDIOBJ_AllocObj(WORD Size, WORD Magic) * \note You should only use GDIOBJFLAG_IGNOREPID if you are cleaning up after the process that terminated. * \note This function deferres object deletion if it is still in use. */ -BOOL GDIOBJ_FreeObj(HGDIOBJ hObj, WORD Magic, DWORD Flag) +BOOL STDCALL GDIOBJ_FreeObj(HGDIOBJ hObj, WORD Magic, DWORD Flag) { PGDIOBJHDR objectHeader; PGDI_HANDLE_ENTRY handleEntry; @@ -301,7 +321,7 @@ BOOL GDIOBJ_FreeObj(HGDIOBJ hObj, WORD Magic, DWORD Flag) * * \todo Don't allow to lock the objects twice! Synchronization! */ -PGDIOBJ GDIOBJ_LockObj( HGDIOBJ hObj, WORD Magic ) +PGDIOBJ FASTCALL GDIOBJ_LockObj( HGDIOBJ hObj, WORD Magic ) { PGDI_HANDLE_ENTRY handleEntry = GDIOBJ_iGetHandleEntryForIndex ((WORD) hObj & 0xffff); PGDIOBJHDR objectHeader; @@ -337,7 +357,7 @@ PGDIOBJ GDIOBJ_LockObj( HGDIOBJ hObj, WORD Magic ) * * \note this function uses an O(n^2) algoritm because we shouldn't need to call it with more than 3 or 4 objects. */ -BOOL GDIOBJ_LockMultipleObj( PGDIMULTILOCK pList, INT nObj ) +BOOL FASTCALL GDIOBJ_LockMultipleObj( PGDIMULTILOCK pList, INT nObj ) { INT i, j; ASSERT( pList ); @@ -372,7 +392,7 @@ BOOL GDIOBJ_LockMultipleObj( PGDIMULTILOCK pList, INT nObj ) * * \todo Change synchronization algorithm. */ -BOOL GDIOBJ_UnlockObj( HGDIOBJ hObj, WORD Magic ) +BOOL FASTCALL GDIOBJ_UnlockObj( HGDIOBJ hObj, WORD Magic ) { PGDI_HANDLE_ENTRY handleEntry = GDIOBJ_iGetHandleEntryForIndex ((WORD) hObj & 0xffff); PGDIOBJHDR objectHeader; @@ -420,7 +440,7 @@ BOOL GDIOBJ_UnlockObj( HGDIOBJ hObj, WORD Magic ) * * \note this function uses O(n^2) algoritm because we shouldn't need to call it with more than 3 or 4 objects. */ -BOOL GDIOBJ_UnlockMultipleObj( PGDIMULTILOCK pList, INT nObj ) +BOOL FASTCALL GDIOBJ_UnlockMultipleObj( PGDIMULTILOCK pList, INT nObj ) { INT i, j; ASSERT( pList ); @@ -447,7 +467,7 @@ BOOL GDIOBJ_UnlockMultipleObj( PGDIMULTILOCK pList, INT nObj ) * * \note Only stock objects should be marked global. */ -VOID GDIOBJ_MarkObjectGlobal(HGDIOBJ ObjectHandle) +VOID FASTCALL GDIOBJ_MarkObjectGlobal(HGDIOBJ ObjectHandle) { PGDI_HANDLE_ENTRY handleEntry; @@ -466,7 +486,7 @@ VOID GDIOBJ_MarkObjectGlobal(HGDIOBJ ObjectHandle) * \param ObjectHandle - handle of the object. * \return GDI Magic value. */ -WORD GDIOBJ_GetHandleMagic (HGDIOBJ ObjectHandle) +WORD FASTCALL GDIOBJ_GetHandleMagic (HGDIOBJ ObjectHandle) { PGDI_HANDLE_ENTRY handleEntry; @@ -485,8 +505,8 @@ WORD GDIOBJ_GetHandleMagic (HGDIOBJ ObjectHandle) /*! * Initialization of the GDI object engine. */ -VOID -InitGdiObjectHandleTable (void) +VOID FASTCALL +InitGdiObjectHandleTable (VOID) { DPRINT ("InitGdiObjectHandleTable\n"); ExInitializeFastMutex (&HandleTableMutex); @@ -501,7 +521,7 @@ InitGdiObjectHandleTable (void) /*! * Creates a bunch of stock objects: brushes, pens, fonts. */ -VOID CreateStockObjects(void) +VOID FASTCALL CreateStockObjects(void) { // Create GDI Stock Objects from the logical structures we've defined @@ -605,3 +625,4 @@ VOID STDCALL W32kDumpGdiObjects( INT Process ) } } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/icm.c b/reactos/subsys/win32k/objects/icm.c index 4b81c8e3216..5aed2c9bc9d 100644 --- a/reactos/subsys/win32k/objects/icm.c +++ b/reactos/subsys/win32k/objects/icm.c @@ -1,4 +1,22 @@ - +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: icm.c,v 1.6 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -140,4 +158,4 @@ W32kUpdateICMRegKey(DWORD Reserved, UNIMPLEMENTED; } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/line.c b/reactos/subsys/win32k/objects/line.c index aceb83ec769..a501261aacc 100644 --- a/reactos/subsys/win32k/objects/line.c +++ b/reactos/subsys/win32k/objects/line.c @@ -1,3 +1,23 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: line.c,v 1.16 2003/05/18 17:16:18 ea Exp $ */ + // Some code from the WINE project source (www.winehq.com) #undef WIN32_LEAN_AND_MEAN @@ -10,6 +30,8 @@ #include #include #include +#include +#include #define NDEBUG #include @@ -398,3 +420,4 @@ W32kSetArcDirection(HDC hDC, DC_ReleasePtr( hDC ); return nOldDirection; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/metafile.c b/reactos/subsys/win32k/objects/metafile.c index 073be0a800c..f6c34d3b00b 100644 --- a/reactos/subsys/win32k/objects/metafile.c +++ b/reactos/subsys/win32k/objects/metafile.c @@ -1,4 +1,22 @@ - +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: metafile.c,v 1.8 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -233,4 +251,4 @@ W32kSetWinMetaFileBits(UINT BufSize, UNIMPLEMENTED; } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/objconv.c b/reactos/subsys/win32k/objects/objconv.c index fc8c8f963b9..e33c5302b7d 100644 --- a/reactos/subsys/win32k/objects/objconv.c +++ b/reactos/subsys/win32k/objects/objconv.c @@ -1,3 +1,23 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: objconv.c,v 1.9 2003/05/18 17:16:18 ea Exp $ */ + #undef WIN32_LEAN_AND_MEAN #include #include @@ -12,12 +32,14 @@ #include #include #include "../eng/objects.h" +#include +#include #define NDEBUG #include -PBRUSHOBJ PenToBrushObj(PDC dc, PENOBJ *pen) +PBRUSHOBJ FASTCALL PenToBrushObj(PDC dc, PENOBJ *pen) { BRUSHOBJ *BrushObj; XLATEOBJ *RGBtoVGA16; @@ -30,7 +52,7 @@ PBRUSHOBJ PenToBrushObj(PDC dc, PENOBJ *pen) return BrushObj; } -HBITMAP BitmapToSurf(PBITMAPOBJ BitmapObj) +HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj) { HBITMAP BitmapHandle; @@ -49,3 +71,4 @@ HBITMAP BitmapToSurf(PBITMAPOBJ BitmapObj) return BitmapHandle; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/paint.c b/reactos/subsys/win32k/objects/paint.c index b0d688f4712..7c8cd9c52c4 100644 --- a/reactos/subsys/win32k/objects/paint.c +++ b/reactos/subsys/win32k/objects/paint.c @@ -1,4 +1,22 @@ - +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: paint.c,v 1.9 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -49,4 +67,4 @@ W32kSetBoundsRect(HDC hDC, DPRINT("stub"); return DCB_DISABLE; /* bounding rectangle always empty */ } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/palette.c b/reactos/subsys/win32k/objects/palette.c index b4e150dcfed..f7cff8249b3 100644 --- a/reactos/subsys/win32k/objects/palette.c +++ b/reactos/subsys/win32k/objects/palette.c @@ -1,10 +1,32 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: palette.c,v 1.8 2003/05/18 17:16:18 ea Exp $ */ + #undef WIN32_LEAN_AND_MEAN #include #include #include #include #include -#include "../include/palette.h" +#include +#include +#include static int PALETTE_firstFree = 0; static unsigned char PALETTE_freeList[256]; @@ -16,13 +38,13 @@ int COLOR_gapEnd; int COLOR_gapFilled; int COLOR_max; -PALETTEENTRY *ReturnSystemPalette(void) +PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID) { return COLOR_sysPal; } // Create the system palette -HPALETTE PALETTE_Init(void) +HPALETTE FASTCALL PALETTE_Init(VOID) { int i; HPALETTE hpalette; @@ -63,7 +85,7 @@ HPALETTE PALETTE_Init(void) return hpalette; } -static void PALETTE_FormatSystemPalette(void) +static void FASTCALL PALETTE_FormatSystemPalette(void) { // Build free list so we'd have an easy way to find // out if there are any available colorcells. @@ -84,7 +106,7 @@ static void PALETTE_FormatSystemPalette(void) } /* Ported from WINE 20020804 (graphics\x11drv\palette.c) */ -static int SysPaletteLookupPixel( COLORREF col, BOOL skipReserved ) +static int FASTCALL SysPaletteLookupPixel( COLORREF col, BOOL skipReserved ) { int i, best = 0, diff = 0x7fffffff; int r,g,b; @@ -138,7 +160,7 @@ UINT WINAPI GetNearestPaletteIndex( return index; } -void PALETTE_ValidateFlags(PALETTEENTRY* lpPalE, int size) +VOID FASTCALL PALETTE_ValidateFlags(PALETTEENTRY* lpPalE, INT size) { int i = 0; for( ; imapping) ? 1 : 0; @@ -251,7 +273,7 @@ int PALETTE_SetMapping(PPALOBJ palPtr, UINT uStart, UINT uNum, BOOL mapOnly) /* Return the physical color closest to 'color'. */ /* Ported from WINE 20020804 (graphics\x11drv\palette.c) */ -int PALETTE_ToPhysical( PDC dc, COLORREF color ) +INT FASTCALL PALETTE_ToPhysical (PDC dc, COLORREF color) { WORD index = 0; HPALETTE hPal = (dc)? dc->w.hPalette: W32kGetStockObject(DEFAULT_PALETTE); @@ -384,3 +406,4 @@ int PALETTE_ToPhysical( PDC dc, COLORREF color ) // GDI_ReleaseObj( hPal ); return index; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/path.c b/reactos/subsys/win32k/objects/path.c index 65e0e0f53f1..f75f60dea8f 100644 --- a/reactos/subsys/win32k/objects/path.c +++ b/reactos/subsys/win32k/objects/path.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: path.c,v 1.10 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -8,6 +27,9 @@ #include #include #include +#define _WIN32K_PATH_INTERNAL +#include +#include #include #include @@ -20,19 +42,6 @@ #define GROW_FACTOR_DENOM 1 /* Denominator of grow factor */ -static BOOL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, - HRGN *pHrgn); -static void PATH_EmptyPath(GdiPath *pPath); -static BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, - BYTE flags); -static BOOL PATH_ReserveEntries(GdiPath *pPath, INT numEntries); -static BOOL PATH_GetPathFromHDC(HDC hdc, GdiPath **ppPath); -static BOOL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[], - double angleStart, double angleEnd, BOOL addMoveTo); -static void PATH_ScaleNormalizedPoint(FLOAT_POINT corners[], double x, - double y, POINT *pPoint); -static void PATH_NormalizePoint(FLOAT_POINT corners[], const FLOAT_POINT - *pPoint, double *pX, double *pY); BOOL STDCALL @@ -140,7 +149,7 @@ W32kWidenPath(HDC hDC) * * Initializes the GdiPath structure. */ -void PATH_InitGdiPath(GdiPath *pPath) +VOID FASTCALL PATH_InitGdiPath(GdiPath *pPath) { assert(pPath!=NULL); @@ -155,7 +164,7 @@ void PATH_InitGdiPath(GdiPath *pPath) * * Destroys a GdiPath structure (frees the memory in the arrays). */ -void PATH_DestroyGdiPath(GdiPath *pPath) +VOID FASTCALL PATH_DestroyGdiPath(GdiPath *pPath) { assert(pPath!=NULL); @@ -173,7 +182,7 @@ void PATH_DestroyGdiPath(GdiPath *pPath) * not a copy constructor). * Returns TRUE if successful, else FALSE. */ -BOOL PATH_AssignGdiPath(GdiPath *pPathDest, const GdiPath *pPathSrc) +BOOL FASTCALL PATH_AssignGdiPath(GdiPath *pPathDest, const GdiPath *pPathSrc) { assert(pPathDest!=NULL && pPathSrc!=NULL); @@ -200,7 +209,7 @@ BOOL PATH_AssignGdiPath(GdiPath *pPathDest, const GdiPath *pPathSrc) * open path. This starts a new stroke. Returns TRUE if successful, else * FALSE. */ -BOOL PATH_MoveTo(HDC hdc) +BOOL FASTCALL PATH_MoveTo(HDC hdc) { GdiPath *pPath; @@ -226,7 +235,7 @@ BOOL PATH_MoveTo(HDC hdc) * a PT_MOVETO entry, if this is the first LineTo in a stroke). * Returns TRUE if successful, else FALSE. */ -BOOL PATH_LineTo(HDC hdc, INT x, INT y) +BOOL STDCALL PATH_LineTo(HDC hdc, INT x, INT y) { GdiPath *pPath; POINT point, pointCurPos; @@ -265,7 +274,7 @@ BOOL PATH_LineTo(HDC hdc, INT x, INT y) * Should be called when a call to Rectangle is performed on a DC that has * an open path. Returns TRUE if successful, else FALSE. */ -BOOL PATH_Rectangle(HDC hdc, INT x1, INT y1, INT x2, INT y2) +BOOL STDCALL PATH_Rectangle(HDC hdc, INT x1, INT y1, INT x2, INT y2) { GdiPath *pPath; POINT corners[2], pointTemp; @@ -347,7 +356,7 @@ BOOL PATH_Rectangle(HDC hdc, INT x1, INT y1, INT x2, INT y2) * an open path. This adds four Bezier splines representing the ellipse * to the path. Returns TRUE if successful, else FALSE. */ -BOOL PATH_Ellipse(HDC hdc, INT x1, INT y1, INT x2, INT y2) +BOOL STDCALL PATH_Ellipse(HDC hdc, INT x1, INT y1, INT x2, INT y2) { /* TODO: This should probably be revised to call PATH_AngleArc */ /* (once it exists) */ @@ -360,7 +369,7 @@ BOOL PATH_Ellipse(HDC hdc, INT x1, INT y1, INT x2, INT y2) * an open path. This adds up to five Bezier splines representing the arc * to the path. Returns TRUE if successful, else FALSE. */ -BOOL PATH_Arc(HDC hdc, INT x1, INT y1, INT x2, INT y2, +BOOL STDCALL PATH_Arc(HDC hdc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd) { GdiPath *pPath; @@ -504,7 +513,7 @@ BOOL PATH_Arc(HDC hdc, INT x1, INT y1, INT x2, INT y2, return TRUE; } -BOOL PATH_PolyBezierTo(HDC hdc, const POINT *pts, DWORD cbPoints) +BOOL STDCALL PATH_PolyBezierTo(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; @@ -537,7 +546,7 @@ BOOL PATH_PolyBezierTo(HDC hdc, const POINT *pts, DWORD cbPoints) return TRUE; } -BOOL PATH_PolyBezier(HDC hdc, const POINT *pts, DWORD cbPoints) +BOOL STDCALL PATH_PolyBezier(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; @@ -559,7 +568,7 @@ BOOL PATH_PolyBezier(HDC hdc, const POINT *pts, DWORD cbPoints) return TRUE; } -BOOL PATH_Polyline(HDC hdc, const POINT *pts, DWORD cbPoints) +BOOL STDCALL PATH_Polyline(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; @@ -581,7 +590,7 @@ BOOL PATH_Polyline(HDC hdc, const POINT *pts, DWORD cbPoints) return TRUE; } -BOOL PATH_PolylineTo(HDC hdc, const POINT *pts, DWORD cbPoints) +BOOL STDCALL PATH_PolylineTo(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; @@ -616,7 +625,7 @@ BOOL PATH_PolylineTo(HDC hdc, const POINT *pts, DWORD cbPoints) } -BOOL PATH_Polygon(HDC hdc, const POINT *pts, DWORD cbPoints) +BOOL STDCALL PATH_Polygon(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; @@ -640,7 +649,7 @@ BOOL PATH_Polygon(HDC hdc, const POINT *pts, DWORD cbPoints) return TRUE; } -BOOL PATH_PolyPolygon( HDC hdc, const POINT* pts, const INT* counts, +BOOL STDCALL PATH_PolyPolygon( HDC hdc, const POINT* pts, const INT* counts, UINT polygons ) { GdiPath *pPath; @@ -668,7 +677,7 @@ BOOL PATH_PolyPolygon( HDC hdc, const POINT* pts, const INT* counts, return TRUE; } -BOOL PATH_PolyPolyline( HDC hdc, const POINT* pts, const DWORD* counts, +BOOL STDCALL PATH_PolyPolyline( HDC hdc, const POINT* pts, const DWORD* counts, DWORD polylines ) { GdiPath *pPath; @@ -701,7 +710,7 @@ BOOL PATH_PolyPolyline( HDC hdc, const POINT* pts, const DWORD* counts, /* PATH_AddFlatBezier * */ -static BOOL PATH_AddFlatBezier(GdiPath *pPath, POINT *pt, BOOL closed) +BOOL STDCALL PATH_AddFlatBezier(GdiPath *pPath, POINT *pt, BOOL closed) { POINT *pts; INT no, i; @@ -721,7 +730,7 @@ static BOOL PATH_AddFlatBezier(GdiPath *pPath, POINT *pt, BOOL closed) * Replaces Beziers with line segments * */ -static BOOL PATH_FlattenPath(GdiPath *pPath) +BOOL FASTCALL PATH_FlattenPath(GdiPath *pPath) { GdiPath newPath; INT srcpt; @@ -754,7 +763,7 @@ static BOOL PATH_FlattenPath(GdiPath *pPath) * error occurs, SetLastError is called with the appropriate value and * FALSE is returned. */ -static BOOL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, +BOOL STDCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, HRGN *pHrgn) { int numStrokes, iStroke, i; @@ -818,7 +827,7 @@ static BOOL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, * * Removes all entries from the path and sets the path state to PATH_Null. */ -static void PATH_EmptyPath(GdiPath *pPath) +VOID STDCALL PATH_EmptyPath(GdiPath *pPath) { assert(pPath!=NULL); @@ -832,7 +841,7 @@ static void PATH_EmptyPath(GdiPath *pPath) * or PT_BEZIERTO, optionally ORed with PT_CLOSEFIGURE. Returns TRUE if * successful, FALSE otherwise (e.g. if not enough memory was available). */ -BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags) +BOOL STDCALL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags) { assert(pPath!=NULL); @@ -868,7 +877,7 @@ BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags) * been allocated; allocates larger arrays and copies the existing entries * to those arrays, if necessary. Returns TRUE if successful, else FALSE. */ -static BOOL PATH_ReserveEntries(GdiPath *pPath, INT numEntries) +BOOL STDCALL PATH_ReserveEntries(GdiPath *pPath, INT numEntries) { INT numEntriesToAllocate; POINT *pPointsNew; @@ -926,7 +935,7 @@ static BOOL PATH_ReserveEntries(GdiPath *pPath, INT numEntries) * Retrieves a pointer to the GdiPath structure contained in an HDC and * places it in *ppPath. TRUE is returned if successful, FALSE otherwise. */ -static BOOL PATH_GetPathFromHDC(HDC hdc, GdiPath **ppPath) +BOOL FASTCALL PATH_GetPathFromHDC(HDC hdc, GdiPath **ppPath) { DC *pDC; @@ -949,7 +958,7 @@ static BOOL PATH_GetPathFromHDC(HDC hdc, GdiPath **ppPath) * point is added to the path; otherwise, it is assumed that the current * position is equal to the first control point. */ -static BOOL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[], +BOOL STDCALL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[], double angleStart, double angleEnd, BOOL addMoveTo) { double halfAngle, a; @@ -1007,7 +1016,7 @@ static BOOL PATH_DoArcPart(GdiPath *pPath, FLOAT_POINT corners[], * coordinates (-1.0, -1.0) correspond to corners[0], the coordinates * (1.0, 1.0) correspond to corners[1]. */ -static void PATH_ScaleNormalizedPoint(FLOAT_POINT corners[], double x, +VOID STDCALL PATH_ScaleNormalizedPoint(FLOAT_POINT corners[], double x, double y, POINT *pPoint) { pPoint->x=GDI_ROUND( (double)corners[0].x + (double)(corners[1].x-corners[0].x)*0.5*(x+1.0) ); @@ -1019,10 +1028,11 @@ static void PATH_ScaleNormalizedPoint(FLOAT_POINT corners[], double x, * Normalizes a point with respect to the box whose corners are passed in * corners. The normalized coordinates are stored in *pX and *pY. */ -static void PATH_NormalizePoint(FLOAT_POINT corners[], +VOID STDCALL PATH_NormalizePoint(FLOAT_POINT corners[], const FLOAT_POINT *pPoint, double *pX, double *pY) { *pX=(double)(pPoint->x-corners[0].x)/(double)(corners[1].x-corners[0].x) * 2.0 - 1.0; *pY=(double)(pPoint->y-corners[0].y)/(double)(corners[1].y-corners[0].y) * 2.0 - 1.0; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/pen.c b/reactos/subsys/win32k/objects/pen.c index 63cf49fa192..af6ce7cc97e 100644 --- a/reactos/subsys/win32k/objects/pen.c +++ b/reactos/subsys/win32k/objects/pen.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: pen.c,v 1.10 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -52,3 +71,4 @@ W32kExtCreatePen(DWORD PenStyle, { UNIMPLEMENTED; } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/polyfill.c b/reactos/subsys/win32k/objects/polyfill.c index e57b5d2b82e..2874a1122d0 100644 --- a/reactos/subsys/win32k/objects/polyfill.c +++ b/reactos/subsys/win32k/objects/polyfill.c @@ -1,4 +1,23 @@ /* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: polyfill.c,v 1.3 2003/05/18 17:16:18 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Various Polygon Filling routines for Polygon() @@ -15,6 +34,7 @@ #include #include #include +#include #define NDEBUG #include @@ -71,7 +91,7 @@ static void DEBUG_PRINT_EDGELIST(PFILL_EDGE_LIST list) /* ** Hide memory clean up. */ -static void POLYGONFILL_DestroyEdge(PPFILL_EDGE pEdge) +static void FASTCALL POLYGONFILL_DestroyEdge(PPFILL_EDGE pEdge) { if (0 != pEdge) EngFreeMem(pEdge); @@ -80,7 +100,7 @@ static void POLYGONFILL_DestroyEdge(PPFILL_EDGE pEdge) /* ** Clean up a list. */ -static void POLYGONFILL_DestroyEdgeList(PFILL_EDGE_LIST list) +static void FASTCALL POLYGONFILL_DestroyEdgeList(PFILL_EDGE_LIST list) { PPFILL_EDGE pThis = 0; PPFILL_EDGE pNext = 0; @@ -99,7 +119,7 @@ static void POLYGONFILL_DestroyEdgeList(PFILL_EDGE_LIST list) /* ** This makes and initiaizes an Edge struct for a line between two points. */ -static PPFILL_EDGE POLYGONFILL_MakeEdge(POINT From, POINT To) +static PPFILL_EDGE FASTCALL POLYGONFILL_MakeEdge(POINT From, POINT To) { PPFILL_EDGE rc = (PPFILL_EDGE)EngAllocMem(FL_ZERO_MEMORY, sizeof(PFILL_EDGE), PFILL_EDGE_ALLOC_TAG); @@ -171,7 +191,7 @@ static PPFILL_EDGE POLYGONFILL_MakeEdge(POINT From, POINT To) ** Zero element1 = element2 ** Positive integer element1 > element2 */ -static INT PFILL_EDGE_Compare(PPFILL_EDGE Edge1, PPFILL_EDGE Edge2) +static INT FASTCALL PFILL_EDGE_Compare(PPFILL_EDGE Edge1, PPFILL_EDGE Edge2) { //DPRINT("In PFILL_EDGE_Compare()\n"); if (Edge1->MinY == Edge2->MinY) @@ -202,7 +222,7 @@ static INT PFILL_EDGE_Compare(PPFILL_EDGE Edge1, PPFILL_EDGE Edge2) /* ** Insert an edge into a list keeping the list in order. */ -static void POLYGONFILL_ListInsert(PFILL_EDGE_LIST *list, PPFILL_EDGE NewEdge) +static void FASTCALL POLYGONFILL_ListInsert(PFILL_EDGE_LIST *list, PPFILL_EDGE NewEdge) { PPFILL_EDGE pThis; if (0 != list && 0 != NewEdge) @@ -238,7 +258,7 @@ static void POLYGONFILL_ListInsert(PFILL_EDGE_LIST *list, PPFILL_EDGE NewEdge) /* ** Create a list of edges for a list of points. */ -static PFILL_EDGE_LIST POLYGONFILL_MakeEdgeList(PPOINT Points, int Count) +static PFILL_EDGE_LIST FASTCALL POLYGONFILL_MakeEdgeList(PPOINT Points, int Count) { int CurPt = 0; int SeqNum = 0; @@ -281,7 +301,7 @@ static PFILL_EDGE_LIST POLYGONFILL_MakeEdgeList(PPOINT Points, int Count) ** for scanline Scanline. **TODO: Get rid of this floating point arithmetic */ -static void POLYGONFILL_UpdateScanline(PPFILL_EDGE pEdge, int Scanline) +static void FASTCALL POLYGONFILL_UpdateScanline(PPFILL_EDGE pEdge, int Scanline) { int Coord = 0; @@ -312,7 +332,7 @@ static void POLYGONFILL_UpdateScanline(PPFILL_EDGE pEdge, int Scanline) ** ** Note: once an edge is no longer active, it is deleted. */ -static void POLYGONFILL_AECInsertInOrder(PFILL_EDGE_LIST *list, PPFILL_EDGE pEdge) +static void FASTCALL POLYGONFILL_AECInsertInOrder(PFILL_EDGE_LIST *list, PPFILL_EDGE pEdge) { BOOL Done = FALSE; PPFILL_EDGE pThis = 0; @@ -343,7 +363,7 @@ static void POLYGONFILL_AECInsertInOrder(PFILL_EDGE_LIST *list, PPFILL_EDGE pEdg ** This routine reorders the Active Edge collection (list) after all ** the now inactive edges have been removed. */ -static void POLYGONFILL_AECReorder(PFILL_EDGE_LIST *AEC) +static void FASTCALL POLYGONFILL_AECReorder(PFILL_EDGE_LIST *AEC) { PPFILL_EDGE pThis = 0; PPFILL_EDGE pPrev = 0; @@ -378,7 +398,7 @@ static void POLYGONFILL_AECReorder(PFILL_EDGE_LIST *AEC) /* ** This method updates the Active edge collection for the scanline Scanline. */ -static void POLYGONFILL_UpdateActiveEdges(int Scanline, PFILL_EDGE_LIST *GEC, PFILL_EDGE_LIST *AEC) +static void STDCALL POLYGONFILL_UpdateActiveEdges(int Scanline, PFILL_EDGE_LIST *GEC, PFILL_EDGE_LIST *AEC) { PPFILL_EDGE pThis = 0; PPFILL_EDGE pAECLast = 0; @@ -467,7 +487,7 @@ static void POLYGONFILL_UpdateActiveEdges(int Scanline, PFILL_EDGE_LIST *GEC, PF ** This method fills the portion of the polygon that intersects with the scanline ** Scanline. */ -static void POLYGONFILL_FillScanLine(int ScanLine, PFILL_EDGE_LIST ActiveEdges, SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, int OrigX, int OrigY) +static void STDCALL POLYGONFILL_FillScanLine(int ScanLine, PFILL_EDGE_LIST ActiveEdges, SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, int OrigX, int OrigY) { BOOL OnOdd = TRUE; RECTL BoundRect; @@ -510,7 +530,7 @@ static void POLYGONFILL_FillScanLine(int ScanLine, PFILL_EDGE_LIST ActiveEdges, //When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and //even-numbered polygon sides on each scan line. That is, GDI fills the area between the //first and second side, between the third and fourth side, and so on. -BOOL FillPolygon_ALTERNATE(SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, CONST PPOINT Points, int Count, RECTL BoundRect, int OrigX, int OrigY) +BOOL STDCALL FillPolygon_ALTERNATE(SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, CONST PPOINT Points, int Count, RECTL BoundRect, int OrigX, int OrigY) { PFILL_EDGE_LIST list = 0; PFILL_EDGE_LIST ActiveEdges = 0; @@ -541,8 +561,9 @@ BOOL FillPolygon_ALTERNATE(SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, CO //When the fill mode is WINDING, GDI fills any region that has a nonzero winding value. //This value is defined as the number of times a pen used to draw the polygon would go around the region. //The direction of each edge of the polygon is important. -BOOL FillPolygon_WINDING(SURFOBJ *SurfObj, PBRUSHOBJ BrushObj,MIX RopMode, CONST PPOINT Points, int Count, RECTL BoundRect, int OrigX, int OrigY) +BOOL STDCALL FillPolygon_WINDING(SURFOBJ *SurfObj, PBRUSHOBJ BrushObj,MIX RopMode, CONST PPOINT Points, int Count, RECTL BoundRect, int OrigX, int OrigY) { DPRINT("FillPolygon_WINDING\n"); return FALSE; -} \ No newline at end of file +} +/* EOF */ diff --git a/reactos/subsys/win32k/objects/print.c b/reactos/subsys/win32k/objects/print.c index c9bc0ab042c..3ee168d2768 100644 --- a/reactos/subsys/win32k/objects/print.c +++ b/reactos/subsys/win32k/objects/print.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: print.c,v 1.9 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -72,4 +91,4 @@ W32kStartPage(HDC hDC) { UNIMPLEMENTED; } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/rect.c b/reactos/subsys/win32k/objects/rect.c index fdc11e3427d..b4bab5a9a78 100644 --- a/reactos/subsys/win32k/objects/rect.c +++ b/reactos/subsys/win32k/objects/rect.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: rect.c,v 1.4 2003/05/18 17:16:18 ea Exp $ */ #include #include #include @@ -9,7 +28,7 @@ /* FUNCTIONS *****************************************************************/ -BOOL +BOOL STDCALL W32kOffsetRect(LPRECT Rect, INT x, INT y) { Rect->left += x; @@ -91,3 +110,4 @@ W32kIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2) Dest->bottom = min(Src1->bottom, Src2->bottom); return(TRUE); } +/* EOF */ diff --git a/reactos/subsys/win32k/objects/region.c b/reactos/subsys/win32k/objects/region.c index c71f2fe9bc8..7461a4c360d 100644 --- a/reactos/subsys/win32k/objects/region.c +++ b/reactos/subsys/win32k/objects/region.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: region.c,v 1.23 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -9,6 +28,8 @@ #include #include #include +#include +#include #define NDEBUG @@ -79,7 +100,7 @@ typedef struct _POINTBLOCK { struct _POINTBLOCK *next; } POINTBLOCK; -static BOOL REGION_CopyRegion(PROSRGNDATA dst, PROSRGNDATA src) +static BOOL FASTCALL REGION_CopyRegion(PROSRGNDATA dst, PROSRGNDATA src) { if(dst != src) // don't want to copy to itself { @@ -107,7 +128,7 @@ static BOOL REGION_CopyRegion(PROSRGNDATA dst, PROSRGNDATA src) return TRUE; } -static void REGION_SetExtents (ROSRGNDATA *pReg) +static void FASTCALL REGION_SetExtents (ROSRGNDATA *pReg) { RECT *pRect, *pRectEnd, *pExtents; @@ -150,7 +171,7 @@ static void REGION_SetExtents (ROSRGNDATA *pReg) /*********************************************************************** * REGION_CropAndOffsetRegion */ -static BOOL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT rect, PROSRGNDATA rgnSrc, PROSRGNDATA rgnDst) +static BOOL STDCALL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT rect, PROSRGNDATA rgnSrc, PROSRGNDATA rgnDst) { if(!rect) // just copy and offset { @@ -312,7 +333,7 @@ empty: * * \return hDst if success, 0 otherwise. */ -HRGN REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt) +HRGN STDCALL REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt) { PROSRGNDATA objSrc, rgnDst; HRGN hNewDst, hRet = NULL; @@ -325,7 +346,7 @@ HRGN REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt) Lock[0].hObj = hNewDst; } - GDIOBJ_LockMultipleObj( &Lock, 2 ); + GDIOBJ_LockMultipleObj( Lock, 2 ); rgnDst = Lock[0].pObj; objSrc = Lock[1].pObj; @@ -347,7 +368,7 @@ HRGN REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt) } } } - GDIOBJ_UnlockMultipleObj( &Lock, 2 ); + GDIOBJ_UnlockMultipleObj( Lock, 2 ); return hRet; } @@ -365,7 +386,7 @@ HRGN REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt) * - pReg->numRects will be decreased. * */ -static INT REGION_Coalesce ( +static INT STDCALL REGION_Coalesce ( PROSRGNDATA pReg, /* Region to coalesce */ INT prevStart, /* Index of start of previous band */ INT curStart /* Index of start of current band */ @@ -506,7 +527,7 @@ static INT REGION_Coalesce ( * to reduce the number of rectangles in the region. * */ -static void REGION_RegionOp( +static void STDCALL REGION_RegionOp( ROSRGNDATA *newReg, /* Place to store result */ ROSRGNDATA *reg1, /* First region in operation */ ROSRGNDATA *reg2, /* 2nd region in operation */ @@ -798,7 +819,7 @@ static void REGION_RegionOp( * Rectangles may be added to the region. * */ -static void REGION_IntersectO(ROSRGNDATA *pReg, RECT *r1, RECT *r1End, +static void STDCALL REGION_IntersectO(ROSRGNDATA *pReg, RECT *r1, RECT *r1End, RECT *r2, RECT *r2End, INT top, INT bottom) { @@ -821,7 +842,7 @@ static void REGION_IntersectO(ROSRGNDATA *pReg, RECT *r1, RECT *r1End, */ if (left < right) { - MEMCHECK(pReg, pNextRect, pReg->Buffer); + MEMCHECK(pReg, *(LPRECT*)pNextRect, *(LPRECT*)pReg->Buffer); pNextRect->left = left; pNextRect->top = top; pNextRect->right = right; @@ -855,7 +876,7 @@ static void REGION_IntersectO(ROSRGNDATA *pReg, RECT *r1, RECT *r1End, /*********************************************************************** * REGION_IntersectRegion */ -static void REGION_IntersectRegion(ROSRGNDATA *newReg, ROSRGNDATA *reg1, +static void STDCALL REGION_IntersectRegion(ROSRGNDATA *newReg, ROSRGNDATA *reg1, ROSRGNDATA *reg2) { /* check for trivial reject */ @@ -894,7 +915,7 @@ static void REGION_IntersectRegion(ROSRGNDATA *newReg, ROSRGNDATA *reg1, * with the rectangles we're passed. * */ -static void REGION_UnionNonO (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, +static void STDCALL REGION_UnionNonO (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, INT top, INT bottom) { RECT *pNextRect; @@ -903,7 +924,7 @@ static void REGION_UnionNonO (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, while (r != rEnd) { - MEMCHECK(pReg, pNextRect, pReg->Buffer); + MEMCHECK(pReg, *(LPRECT*)pNextRect, *(LPRECT*)pReg->Buffer); pNextRect->left = r->left; pNextRect->top = top; pNextRect->right = r->right; @@ -927,7 +948,7 @@ static void REGION_UnionNonO (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, * be changed. * */ -static void REGION_UnionO (ROSRGNDATA *pReg, RECT *r1, RECT *r1End, +static void STDCALL REGION_UnionO (ROSRGNDATA *pReg, RECT *r1, RECT *r1End, RECT *r2, RECT *r2End, INT top, INT bottom) { RECT *pNextRect; @@ -986,7 +1007,7 @@ static void REGION_UnionO (ROSRGNDATA *pReg, RECT *r1, RECT *r1End, /*********************************************************************** * REGION_UnionRegion */ -static void REGION_UnionRegion(ROSRGNDATA *newReg, ROSRGNDATA *reg1, +static void STDCALL REGION_UnionRegion(ROSRGNDATA *newReg, ROSRGNDATA *reg1, ROSRGNDATA *reg2) { /* checks all the simple cases */ @@ -1062,7 +1083,7 @@ static void REGION_UnionRegion(ROSRGNDATA *newReg, ROSRGNDATA *reg1, * pReg may be affected. * */ -static void REGION_SubtractNonO1 (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, +static void STDCALL REGION_SubtractNonO1 (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, INT top, INT bottom) { RECT *pNextRect; @@ -1095,7 +1116,7 @@ static void REGION_SubtractNonO1 (ROSRGNDATA *pReg, RECT *r, RECT *rEnd, * pReg may have rectangles added to it. * */ -static void REGION_SubtractO (ROSRGNDATA *pReg, RECT *r1, RECT *r1End, +static void STDCALL REGION_SubtractO (ROSRGNDATA *pReg, RECT *r1, RECT *r1End, RECT *r2, RECT *r2End, INT top, INT bottom) { RECT *pNextRect; @@ -1221,7 +1242,7 @@ static void REGION_SubtractO (ROSRGNDATA *pReg, RECT *r1, RECT *r1End, * regD is overwritten. * */ -static void REGION_SubtractRegion(ROSRGNDATA *regD, ROSRGNDATA *regM, +static void STDCALL REGION_SubtractRegion(ROSRGNDATA *regD, ROSRGNDATA *regM, ROSRGNDATA *regS ) { /* check for trivial reject */ @@ -1248,7 +1269,7 @@ static void REGION_SubtractRegion(ROSRGNDATA *regD, ROSRGNDATA *regM, /*********************************************************************** * REGION_XorRegion */ -static void REGION_XorRegion(ROSRGNDATA *dr, ROSRGNDATA *sra, +static void STDCALL REGION_XorRegion(ROSRGNDATA *dr, ROSRGNDATA *sra, ROSRGNDATA *srb) { HRGN htra, htrb; @@ -1287,7 +1308,7 @@ static void REGION_XorRegion(ROSRGNDATA *dr, ROSRGNDATA *sra, /*! * Adds a rectangle to a REGION */ -static void REGION_UnionRectWithRegion(const RECT *rect, ROSRGNDATA *rgn) +static void FASTCALL REGION_UnionRectWithRegion(const RECT *rect, ROSRGNDATA *rgn) { ROSRGNDATA region; @@ -1299,7 +1320,7 @@ static void REGION_UnionRectWithRegion(const RECT *rect, ROSRGNDATA *rgn) } -BOOL REGION_LPTODP(HDC hdc, HRGN hDest, HRGN hSrc) +BOOL STDCALL REGION_LPTODP(HDC hdc, HRGN hDest, HRGN hSrc) { RECT *pCurRect, *pEndRect; PROSRGNDATA srcObj = NULL; @@ -1357,7 +1378,7 @@ done: return ret; } -HRGN RGNDATA_AllocRgn(INT n) +HRGN FASTCALL RGNDATA_AllocRgn(INT n) { HRGN hReg; PROSRGNDATA pReg; @@ -1385,7 +1406,7 @@ HRGN RGNDATA_AllocRgn(INT n) return NULL; } -BOOL RGNDATA_InternalDelete( PROSRGNDATA pRgn ) +BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA pRgn ) { ASSERT(pRgn); if(pRgn->Buffer) @@ -1731,8 +1752,8 @@ STDCALL W32kPaintRgn(HDC hDC, HRGN hRgn) { - RECT box; - HRGN tmpVisRgn, prevVisRgn; + //RECT box; + HRGN tmpVisRgn; //, prevVisRgn; DC *dc = DC_HandleToPtr(hDC); PROSRGNDATA visrgn; CLIPOBJ* ClipRegion; @@ -1770,13 +1791,13 @@ W32kPaintRgn(HDC hDC, ASSERT(pBrush); BrushOrigin.x = dc->w.brushOrgX; BrushOrigin.y = dc->w.brushOrgY; - SurfObj = (SURFOBJ*)AccessUserObject(dc->Surface); + SurfObj = (SURFOBJ*)AccessUserObject((ULONG)dc->Surface); bRet = IntEngPaint(SurfObj, ClipRegion, pBrush, &BrushOrigin, - 0xFFFF);//don't know what to put here + 0xFFFF);//FIXME:don't know what to put here RGNDATA_UnlockRgn( tmpVisRgn ); @@ -1886,7 +1907,7 @@ W32kUnionRectWithRgn(HRGN hDest, const RECT* unsafeRect) PRECT pRect; PROSRGNDATA pRgn; - if( !NT_SUCCESS( MmCopyFromCaller( pRect, unsafeRect, sizeof( RECT ) ) ) ) + if( !NT_SUCCESS( MmCopyFromCaller( pRect, (PRECT)unsafeRect, sizeof( RECT ) ) ) ) return NULL; if( !(pRgn = RGNDATA_LockRgn( hDest ) ) ) @@ -1938,4 +1959,4 @@ DWORD STDCALL W32kGetRegionData(HRGN hrgn, DWORD count, LPRGNDATA rgndata) RGNDATA_UnlockRgn( hrgn ); return size + sizeof(RGNDATAHEADER); } - +/* EOF */ diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index 65dd23abf81..7a837e5a5b4 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: text.c,v 1.32 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN @@ -14,6 +33,8 @@ #include "../eng/handle.h" #include +#include +#include #define NDEBUG #include @@ -28,7 +49,7 @@ typedef struct _FONTTABLE { FONTTABLE FontTable[256]; INT FontsLoaded = 0; -BOOL InitFontSupport() +BOOL FASTCALL InitFontSupport(VOID) { ULONG error; UINT File; @@ -66,7 +87,7 @@ BOOL InitFontSupport() return TRUE; } -static NTSTATUS +static NTSTATUS STDCALL GetFontObjectsFromTextObj(PTEXTOBJ TextObj, HFONT *FontHandle, PFONTOBJ *FontObj, PFONTGDI *FontGDI) { NTSTATUS Status = STATUS_SUCCESS; @@ -208,7 +229,7 @@ W32kAddFontResource(LPCWSTR Filename) return 1; } -NTSTATUS +NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont) { PTEXTOBJ TextObj; @@ -895,7 +916,7 @@ W32kTranslateCharsetInfo(PDWORD Src, UNIMPLEMENTED; } -NTSTATUS +NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle) { UINT i; @@ -941,3 +962,5 @@ TextIntRealizeFont(HFONT FontHandle) return Status; } + +/* EOF */ diff --git a/reactos/subsys/win32k/objects/wingl.c b/reactos/subsys/win32k/objects/wingl.c index 97a90fdda01..a2d59273c04 100644 --- a/reactos/subsys/win32k/objects/wingl.c +++ b/reactos/subsys/win32k/objects/wingl.c @@ -1,3 +1,22 @@ +/* + * ReactOS W32 Subsystem + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: wingl.c,v 1.6 2003/05/18 17:16:18 ea Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -58,4 +77,4 @@ W32kSwapBuffers(HDC hDC) UNIMPLEMENTED; } - +/* EOF */