diff --git a/reactos/drivers/lib/zlib/.cvsignore b/reactos/drivers/lib/zlib/.cvsignore new file mode 100644 index 00000000000..a4383358ec7 --- /dev/null +++ b/reactos/drivers/lib/zlib/.cvsignore @@ -0,0 +1 @@ +*.d diff --git a/reactos/lib/packet/.cvsignore b/reactos/lib/packet/.cvsignore new file mode 100644 index 00000000000..bf33b8bf094 --- /dev/null +++ b/reactos/lib/packet/.cvsignore @@ -0,0 +1,3 @@ +packet.coff +packet.dll +packet.nostrip.dll diff --git a/reactos/services/eventlog/.cvsignore b/reactos/services/eventlog/.cvsignore new file mode 100644 index 00000000000..96c0b0966f0 --- /dev/null +++ b/reactos/services/eventlog/.cvsignore @@ -0,0 +1 @@ +eventlog.coff diff --git a/reactos/services/rpcss/.cvsignore b/reactos/services/rpcss/.cvsignore new file mode 100644 index 00000000000..19232dcb009 --- /dev/null +++ b/reactos/services/rpcss/.cvsignore @@ -0,0 +1 @@ +rpcss.coff diff --git a/reactos/subsys/system/autochk/.cvsignore b/reactos/subsys/system/autochk/.cvsignore new file mode 100644 index 00000000000..d9e6cf11de9 --- /dev/null +++ b/reactos/subsys/system/autochk/.cvsignore @@ -0,0 +1 @@ +autochk.coff \ No newline at end of file diff --git a/reactos/subsys/system/gstart/.cvsignore b/reactos/subsys/system/gstart/.cvsignore new file mode 100644 index 00000000000..5b5ede714ab --- /dev/null +++ b/reactos/subsys/system/gstart/.cvsignore @@ -0,0 +1 @@ +gstart.coff diff --git a/reactos/subsys/win32k/dib/.cvsignore b/reactos/subsys/win32k/dib/.cvsignore new file mode 100644 index 00000000000..a4383358ec7 --- /dev/null +++ b/reactos/subsys/win32k/dib/.cvsignore @@ -0,0 +1 @@ +*.d diff --git a/reactos/subsys/win32k/eng/.cvsignore b/reactos/subsys/win32k/eng/.cvsignore new file mode 100644 index 00000000000..a4383358ec7 --- /dev/null +++ b/reactos/subsys/win32k/eng/.cvsignore @@ -0,0 +1 @@ +*.d diff --git a/reactos/subsys/win32k/include/painting.h b/reactos/subsys/win32k/include/painting.h new file mode 100644 index 00000000000..761610cb391 --- /dev/null +++ b/reactos/subsys/win32k/include/painting.h @@ -0,0 +1,22 @@ +#ifndef __WIN32K_PAINTING_H +#define __WIN32K_PAINTING_H + +#include +#include +#include +#include + +/* PaintRedrawWindow() control flags */ +#define RDW_EX_USEHRGN 0x0001 +#define RDW_EX_DELETEHRGN 0x0002 +#define RDW_EX_XYWINDOW 0x0004 +#define RDW_EX_TOPFRAME 0x0010 +#define RDW_EX_DELAY_NCPAINT 0x0020 + +HWND STDCALL +PaintingFindWinToRepaint(HWND hWnd, PW32THREAD Thread); +BOOL STDCALL +PaintHaveToDelayNCPaint(PWINDOW_OBJECT Window, ULONG Flags); +HRGN STDCALL +PaintUpdateNCRegion(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags); +#endif /* __WIN32K_PAINTING_H */ diff --git a/reactos/subsys/win32k/include/rect.h b/reactos/subsys/win32k/include/rect.h new file mode 100644 index 00000000000..d7c923f1f25 --- /dev/null +++ b/reactos/subsys/win32k/include/rect.h @@ -0,0 +1,12 @@ +BOOL STDCALL +W32kUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2); +BOOL STDCALL +W32kSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom); +BOOL STDCALL +W32kSetEmptyRect(PRECT Rect); +BOOL STDCALL +W32kIsEmptyRect(PRECT Rect); +BOOL STDCALL +W32kIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2); +BOOL +W32kOffsetRect(LPRECT Rect, INT x, INT y); diff --git a/reactos/subsys/win32k/ldr/.cvsignore b/reactos/subsys/win32k/ldr/.cvsignore new file mode 100644 index 00000000000..a4383358ec7 --- /dev/null +++ b/reactos/subsys/win32k/ldr/.cvsignore @@ -0,0 +1 @@ +*.d diff --git a/reactos/subsys/win32k/main/.cvsignore b/reactos/subsys/win32k/main/.cvsignore index f82b881cab3..9cc6bc7d6df 100644 --- a/reactos/subsys/win32k/main/.cvsignore +++ b/reactos/subsys/win32k/main/.cvsignore @@ -1 +1,2 @@ -svctab.c \ No newline at end of file +svctab.c +*.d diff --git a/reactos/subsys/win32k/main/svctabm.c b/reactos/subsys/win32k/main/svctabm.c new file mode 100644 index 00000000000..c30a089b0cb --- /dev/null +++ b/reactos/subsys/win32k/main/svctabm.c @@ -0,0 +1,17 @@ +/* $Id: svctabm.c,v 1.1 2002/07/04 20:12:27 dwelch Exp $ + * + * Entry Point for win32k.sys + */ + +#undef WIN32_LEAN_AND_MEAN +#define WIN32_NO_STATUS +#include +#include +#include + +/* + * NOTE: the table is actually in the file ./svctab.c, + * generated by iface/addsys/mktab.c + w32ksvc.db + */ +#include "svctab.c" + diff --git a/reactos/subsys/win32k/misc/.cvsignore b/reactos/subsys/win32k/misc/.cvsignore new file mode 100644 index 00000000000..36de49a073e --- /dev/null +++ b/reactos/subsys/win32k/misc/.cvsignore @@ -0,0 +1 @@ +*.d \ No newline at end of file diff --git a/reactos/subsys/win32k/ntuser/.cvsignore b/reactos/subsys/win32k/ntuser/.cvsignore new file mode 100644 index 00000000000..36de49a073e --- /dev/null +++ b/reactos/subsys/win32k/ntuser/.cvsignore @@ -0,0 +1 @@ +*.d \ No newline at end of file diff --git a/reactos/subsys/win32k/ntuser/metric.c b/reactos/subsys/win32k/ntuser/metric.c new file mode 100644 index 00000000000..d1b2118c0d0 --- /dev/null +++ b/reactos/subsys/win32k/ntuser/metric.c @@ -0,0 +1,32 @@ +/* $Id: metric.c,v 1.1 2002/07/04 20:12:27 dwelch Exp $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Window classes + * FILE: subsys/win32k/ntuser/class.c + * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * REVISION HISTORY: + * 06-06-2001 CSH Created + */ + +/* INCLUDES ******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +/* FUNCTIONS *****************************************************************/ + +ULONG STDCALL +NtUserGetSystemMetrics(ULONG Index) +{ +} + +/* EOF */ diff --git a/reactos/subsys/win32k/ntuser/painting.c b/reactos/subsys/win32k/ntuser/painting.c new file mode 100644 index 00000000000..ac2afb01d72 --- /dev/null +++ b/reactos/subsys/win32k/ntuser/painting.c @@ -0,0 +1,538 @@ +/* $Id: painting.c,v 1.1 2002/07/04 20:12:27 dwelch Exp $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Painting + * FILE: subsys/win32k/ntuser/painting.c + * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * REVISION HISTORY: + * 06-06-2001 CSH Created + */ +/* INCLUDES ******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define NDEBUG +#include + +/* GLOBALS *******************************************************************/ + +#define UNC_DELAY_NCPAINT (0x00000001) +#define UNC_IN_BEGINPAINT (0x00000002) +#define UNC_CHECK (0x00000004) +#define UNC_REGION (0x00000008) +#define UNC_ENTIRE (0x00000010) +#define UNC_UPDATE (0x00000020) + +/* FUNCTIONS *****************************************************************/ + +HRGN STATIC +PaintDoPaint(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, ULONG ExFlags) +{ + HDC hDC; + HWND hWnd = Window->Self; + BOOL bIcon = (Window->Style & WS_MINIMIZE) && + NtUserGetClassLong(hWnd, GCL_HICON); + + if (ExFlags & RDW_EX_DELAY_NCPAINT || + PaintHaveToDelayNCPaint(Window, 0)) + { + ExFlags |= RDW_EX_DELAY_NCPAINT; + } + + if (Flags & RDW_UPDATENOW) + { + if (Window->UpdateRegion != NULL) + { + NtUserSendMessage(hWnd, bIcon ? WM_PAINTICON : WM_PAINT, bIcon, 0); + } + } + else if (Flags & RDW_ERASENOW || ExFlags & RDW_EX_TOPFRAME) + { + UINT Dcx = DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN | + DCX_WINDOWPAINT | DCX_CACHE; + HRGN hRgnRet; + + hRgnRet = + PaintUpdateNCRegion(Window, + hRgn, + UNC_REGION | UNC_CHECK | + ((ExFlags & RDW_EX_TOPFRAME) ? UNC_ENTIRE : 0) | + ((ExFlags & RDW_EX_DELAY_NCPAINT) ? + UNC_DELAY_NCPAINT : 0)); + if (hRgnRet != NULL) + { + if (hRgnRet != (HRGN)1) + { + hRgn = hRgnRet; + } + else + { + hRgnRet = NULL; + } + if (Window->Flags & WINDOWOBJECT_NEED_ERASEBACKGRD) + { + if (bIcon) + { + Dcx |= DCX_WINDOW; + } + if (hRgnRet) + { + W32kOffsetRgn(hRgnRet, + Window->WindowRect.left - + Window->ClientRect.left, + Window->WindowRect.top - + Window->ClientRect.top); + } + else + { + Dcx &= ~DCX_INTERSECTRGN; + } + if ((hDC = NtUserGetDCEx(hWnd, hRgnRet, Dcx)) != NULL) + { + LRESULT Result; + Result = NtUserSendMessage(hWnd, bIcon ? WM_ICONERASEBKGND : + WM_ERASEBKGND, (WPARAM)hDC, 0); + Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBACKGRD; + NtUserReleaseDC(hWnd, hDC); + } + } + } + } + + /* FIXME: Check that the window is still valid at this point. */ + + ExFlags &= ~RDW_EX_TOPFRAME; + + /* FIXME: Paint child windows. */ + + return(hRgn); +} + +VOID STATIC +PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, + BOOL First) +{ + +} + +BOOL +PaintRedrawWindow(HWND hWnd, const RECT* UpdateRect, HRGN UpdateRgn, + ULONG Flags, ULONG ExFlags) +{ + PWINDOW_OBJECT Window; + RECT Rect, Rect2; + POINT Pt; + HRGN hRgn; + + /* FIXME: Return if this is for a desktop. */ + + Window = W32kGetWindowObject(hWnd); + if (Window == NULL) + { + return(FALSE); + } + + if (Flags & RDW_FRAME) + { + Rect = Window->WindowRect; + } + else + { + Rect = Window->ClientRect; + } + + if (ExFlags & RDW_EX_XYWINDOW) + { + Pt.x = Pt.y = 0; + W32kOffsetRect(&Rect, -Window->WindowRect.left, -Window->WindowRect.top); + } + else + { + Pt.x = Window->ClientRect.left - Window->WindowRect.left; + Pt.y = Window->ClientRect.top - Window->WindowRect.top; + W32kOffsetRect(&Rect, -Window->ClientRect.left, -Window->WindowRect.top); + } + + if (Flags & RDW_INVALIDATE) + { + if (UpdateRgn != NULL) + { + if (Window->UpdateRegion != NULL) + { + hRgn = W32kCropRgn(0, UpdateRgn, NULL, &Pt); + } + else + { + Window->UpdateRegion = W32kCropRgn(0, UpdateRgn, &Rect, &Pt); + } + } + else if (UpdateRect != NULL) + { + if (!W32kIntersectRect(&Rect2, &Rect, UpdateRect)) + { + W32kReleaseWindowObject(Window); + if (hRgn != NULL && hRgn != (HRGN)1) + { + W32kDeleteObject(hRgn); + } + return(TRUE); + } + if (Window->UpdateRegion == NULL) + { + Window->UpdateRegion = W32kCreateRectRgnIndirect(&Rect2); + } + else + { + hRgn = W32kCreateRectRgnIndirect(&Rect2); + } + } + else + { + if (Flags & RDW_FRAME) + { + hRgn = (HRGN)1; + } + else + { + W32kGetClientRect(hWnd, &Rect2); + hRgn = W32kCreateRectRgnIndirect(&Rect2); + } + } + } + + PaintUpdateRgns(Window, hRgn, Flags, TRUE); + + hRgn = PaintDoPaint(Window, hRgn == 1 ? 0 : hRgn, Flags, ExFlags); + + if (hRgn != (HANDLE)1 && hRgn != UpdateRgn) + { + W32kDeleteObject(hRgn); + } + W32kReleaseWindowObject(Window); + return(TRUE); +} + +BOOL STDCALL +PaintHaveToDelayNCPaint(PWINDOW_OBJECT Window, ULONG Flags) +{ + if (Flags & UNC_DELAY_NCPAINT) + { + return(TRUE); + } + + if (Flags & UNC_IN_BEGINPAINT) + { + return(FALSE); + } + + Window = Window->Parent; + while (Window != NULL) + { + if (Window->Style & WS_CLIPCHILDREN && Window->UpdateRegion != NULL) + { + return(TRUE); + } + Window = Window->Parent; + } + return(FALSE); +} + +HWND STDCALL +PaintingFindWinToRepaint(HWND hWnd, PW32THREAD Thread) +{ + PWINDOW_OBJECT Window; + PWINDOW_OBJECT BaseWindow; + PLIST_ENTRY current_entry; + HWND hFoundWnd = NULL; + NTSTATUS Status; + + if (hWnd == NULL) + { + ExAcquireFastMutex(&Thread->WindowListLock); + current_entry = Thread->WindowListHead.Flink; + while (current_entry != &Thread->WindowListHead) + { + Window = CONTAINING_RECORD(current_entry, WINDOW_OBJECT, + ThreadListEntry); + if (Window->Style & WS_VISIBLE) + { + hFoundWnd = PaintingFindWinToRepaint(hWnd, Thread); + if (hFoundWnd != NULL) + { + break; + } + } + current_entry = current_entry->Flink; + } + ExReleaseFastMutex(&Thread->WindowListLock); + return(hFoundWnd); + } + + Status = + ObmReferenceObjectByHandle(PsGetWin32Process()->WindowStation->HandleTable, + hWnd, + otWindow, + (PVOID*)&BaseWindow); + if (!NT_SUCCESS(Status)) + { + return(NULL); + } + if (BaseWindow->Style & WS_VISIBLE && BaseWindow->UpdateRegion != NULL) + { + return(BaseWindow->Self); + } + + ExAcquireFastMutex(&BaseWindow->ChildrenListLock); + current_entry = Thread->WindowListHead.Flink; + while (current_entry != &Thread->WindowListHead) + { + Window = CONTAINING_RECORD(current_entry, WINDOW_OBJECT, + ThreadListEntry); + if (Window->Style & WS_VISIBLE) + { + hFoundWnd = PaintingFindWinToRepaint(hWnd, Thread); + if (hFoundWnd != NULL) + { + break; + } + } + current_entry = current_entry->Flink; + } + ExReleaseFastMutex(&BaseWindow->ChildrenListLock); + return(hFoundWnd); +} + +HRGN STDCALL +PaintUpdateNCRegion(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags) +{ + HRGN hRgnRet; + RECT ClientRect; + HRGN hClip = NULL; + + /* Desktop has no parent. */ + if (Window->Parent == NULL) + { + Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT; + if (Window->UpdateRegion > (HANDLE)1) + { + hRgnRet = W32kCropRgn(hRgn, Window->UpdateRegion, NULL, NULL); + } + else + { + hRgnRet = Window->UpdateRegion; + } + return(hRgnRet); + } + + if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT && + !PaintHaveToDelayNCPaint(Window, Flags)) + { + RECT UpdateRegionBox; + RECT Rect; + + Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT; + W32kGetClientRect(Window, &ClientRect); + + if (Window->UpdateRegion > (HRGN)1) + { + W32kGetRgnBox(Window->UpdateRegion, &UpdateRegionBox); + W32kUnionRect(&Rect, &ClientRect, &UpdateRegionBox); + if (Rect.left != ClientRect.left || Rect.top != ClientRect.top || + Rect.right != ClientRect.right || Rect.right != ClientRect.right) + { + hClip = Window->UpdateRegion; + Window->UpdateRegion = W32kCropRgn(hRgn, hClip, + &Rect, NULL); + if (Flags & UNC_REGION) + { + hRgnRet = hClip; + } + } + + if (Flags & UNC_CHECK) + { + W32kGetBoxRgn(Window->UpdateRegion, &UpdateRegionBox); + if (W32kIsEmptyRect(&UpdateRegionBox)) + { + W32kDeleteObject(Window->UpdateRegion); + Window->UpdateRegion = NULL; + MsqDecPaintCountQueue(Window->MessageQueue); + Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBACKGRD; + } + } + + if (!hClip && Window->UpdateRegion && Flags & UNC_REGION) + { + hRgnRet = W32kCropRgn(hRgn, Window->UpdateRegion, NULL, + NULL); + } + } + else if (Window->UpdateRegion == (HRGN)1) + { + if (Flags & UNC_UPDATE) + { + Window->UpdateRegion = W32kCreateRectRgnIndirect(&ClientRect); + } + if (Flags & UNC_REGION) + { + hRgnRet = (HANDLE)1; + } + Flags |= UNC_ENTIRE; + } + } + else + { + if (Window->UpdateRegion > (HANDLE)1 && Flags & UNC_REGION) + { + hRgnRet = W32kCropRgn(hRgn, Window->UpdateRegion, NULL, NULL); + } + else if (Window->UpdateRegion == (HANDLE)1 && Flags & UNC_UPDATE) + { + W32kGetClientRect(Window, &ClientRect); + Window->UpdateRegion = W32kCreateRectRgnIndirect(&ClientRect); + if (Flags & UNC_REGION) + { + hRgnRet = (HANDLE)1; + } + } + } + + if (hClip == NULL && Flags & UNC_ENTIRE) + { + if (RtlCompareMemory(&Window->WindowRect, &Window->ClientRect, + sizeof(RECT)) == sizeof(RECT)) + { + hClip = (HANDLE)1; + } + else + { + hClip = 0; + } + } + + if (hClip != 0) + { + if (hClip == hRgnRet && hRgnRet > (HANDLE)1) + { + hClip = W32kCreateRectRgn(0, 0, 0, 0); + W32kCombineRgn(hClip, hRgnRet, 0, RGN_COPY); + } + NtUserSendMessage(Window->Self, WM_NCPAINT, (WPARAM)hClip, 0); + if (hClip > (HANDLE)1 && hClip != hRgn && hClip != hRgnRet) + { + W32kDeleteObject(hClip); + /* FIXME: Need to check the window is still valid. */ + } + } + return(hRgnRet); +} + +BOOL STDCALL +NtUserEndPaint(HWND hWnd, PAINTSTRUCT* lPs) +{ + NtUserReleaseDC(hWnd, lPs->hdc); + /* FIXME: Show claret. */ + return(TRUE); +} + +HDC STDCALL +NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs) +{ + BOOL IsIcon; + PWINDOW_OBJECT Window; + HRGN UpdateRegion; + RECT ClientRect; + RECT ClipRect; + NTSTATUS Status; + + Status = + ObmReferenceObjectByHandle(PsGetWin32Process()->WindowStation->HandleTable, + hWnd, + otWindow, + (PVOID*)&Window); + if (!NT_SUCCESS(Status)) + { + return(NULL); + } + + IsIcon = Window->Style & WS_MINIMIZE && + NtUserGetClassLong(Window->Self, GCL_HICON); + + Window->Flags &= ~WINDOWOBJECT_NEED_BEGINPAINT; + + /* Send WM_NCPAINT */ + PaintUpdateNCRegion(Window, 0, UNC_UPDATE | UNC_IN_BEGINPAINT); + + /* FIXME: Check the window is still valid. */ + + /* FIXME: Decrement the paint count if the update region is non-zero. */ + + UpdateRegion = Window->UpdateRegion; + Window->UpdateRegion = 0; + + /* FIXME: Hide claret. */ + + if (NtUserGetClassLong(Window->Self, GCL_STYLE) & CS_PARENTDC) + { + if (UpdateRegion != NULL) + { + W32kDeleteObject(UpdateRegion); + } + lPs->hdc = NtUserGetDCEx(hWnd, 0, DCX_WINDOWPAINT | DCX_USESTYLE | + (IsIcon ? DCX_WINDOW : 0)); + } + else + { + if (UpdateRegion != NULL) + { + W32kOffsetRgn(UpdateRegion, + Window->WindowRect.left - + Window->ClientRect.left, + Window->WindowRect.top - + Window->ClientRect.top); + } + lPs->hdc = NtUserGetDCEx(hWnd, UpdateRegion, DCX_INTERSECTRGN | + DCX_WINDOWPAINT | DCX_USESTYLE | + (IsIcon ? DCX_WINDOW : 0)); + } + + /* FIXME: Check for DC creation failure. */ + + W32kGetClientRect(hWnd, &ClientRect); + W32kGetClipBox(lPs->hdc, &ClipRect); + W32kLPtoDP(lPs->hdc, (LPPOINT)&ClipRect, 2); + W32kIntersectRect(&lPs->rcPaint, &ClientRect, &ClipRect); + W32kDPtoLP(lPs->hdc, (LPPOINT)&lPs->rcPaint, 2); + + if (Window->Flags & WINDOWOBJECT_NEED_ERASEBACKGRD) + { + BOOLEAN Result; + Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBACKGRD; + Result = NtUserSendMessage(hWnd, + IsIcon ? WM_ICONERASEBKGND : WM_ERASEBKGND, + (WPARAM)lPs->hdc, + 0); + lPs->fErase = !Result; + } + else + { + lPs->fErase = FALSE; + } + + ObmDereferenceObject(Window); + return(lPs->hdc); +} diff --git a/reactos/subsys/win32k/ntuser/windc.c b/reactos/subsys/win32k/ntuser/windc.c new file mode 100644 index 00000000000..fc8151ea069 --- /dev/null +++ b/reactos/subsys/win32k/ntuser/windc.c @@ -0,0 +1,45 @@ +/* $Id: windc.c,v 1.1 2002/07/04 20:12:27 dwelch Exp $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Window classes + * FILE: subsys/win32k/ntuser/class.c + * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * REVISION HISTORY: + * 06-06-2001 CSH Created + */ + +/* INCLUDES ******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +/* FUNCTIONS *****************************************************************/ + +HRGN +DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild, ULONG CFlags) +{ + +} + +INT STDCALL +NtUserReleaseDC(HWND hWnd, HDC hDc) +{ + +} + +HDC STDCALL +NtUserGetDCEx(HWND hWnd, HANDLE hRegion, ULONG Flags) +{ + +} + +/* EOF */ diff --git a/reactos/subsys/win32k/objects/.cvsignore b/reactos/subsys/win32k/objects/.cvsignore new file mode 100644 index 00000000000..36de49a073e --- /dev/null +++ b/reactos/subsys/win32k/objects/.cvsignore @@ -0,0 +1 @@ +*.d \ No newline at end of file diff --git a/reactos/subsys/win32k/objects/rect.c b/reactos/subsys/win32k/objects/rect.c new file mode 100644 index 00000000000..b6ff9b0a49d --- /dev/null +++ b/reactos/subsys/win32k/objects/rect.c @@ -0,0 +1,93 @@ +#include +#include +#include +#include +#include + +//#define NDEBUG +#include + +/* FUNCTIONS *****************************************************************/ + +BOOL +W32kOffsetRect(LPRECT Rect, INT x, INT y) +{ + Rect->left += x; + Rect->right += x; + Rect->top += y; + Rect->bottom += y; + return(TRUE); +} + + +BOOL STDCALL +W32kUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2) +{ + if (W32kIsEmptyRect(Src1)) + { + if (W32kIsEmptyRect(Src2)) + { + W32kSetEmptyRect(Dest); + return(FALSE); + } + else + { + *Dest = *Src2; + } + } + else + { + if (W32kIsEmptyRect(Src2)) + { + *Dest = *Src1; + } + else + { + Dest->left = min(Src1->left, Src2->left); + Dest->top = min(Src1->top, Src2->top); + Dest->right = max(Src1->right, Src2->right); + Dest->bottom = max(Src1->bottom, Src2->bottom); + } + } + return(TRUE); +} + +BOOL STDCALL +W32kSetEmptyRect(PRECT Rect) +{ + Rect->left = Rect->right = Rect->top = Rect->bottom = 0; + return(TRUE); +} + +BOOL STDCALL +W32kIsEmptyRect(PRECT Rect) +{ + return(Rect->left >= Rect->right || Rect->top >= Rect->bottom); +} + +BOOL STDCALL +W32kSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom) +{ + Rect->left = left; + Rect->top = top; + Rect->right = right; + Rect->bottom = bottom; + return(TRUE); +} + +BOOL STDCALL +W32kIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2) +{ + if (W32kIsEmptyRect(Src1) || W32kIsEmptyRect(Src2) || + Src1->left >= Src2->right || Src2->left >= Src1->right || + Src1->top >= Src2->bottom || Src2->top >= Src1->bottom) + { + W32kSetEmptyRect(Dest); + return(FALSE); + } + Dest->left = max(Src1->left, Src2->left); + Dest->right = min(Src1->right, Src2->right); + Dest->top = max(Src1->top, Src2->top); + Dest->bottom = min(Src1->right, Src2->right); + return(TRUE); +} diff --git a/reactos/subsys/win32k/stubs/.cvsignore b/reactos/subsys/win32k/stubs/.cvsignore new file mode 100644 index 00000000000..a4383358ec7 --- /dev/null +++ b/reactos/subsys/win32k/stubs/.cvsignore @@ -0,0 +1 @@ +*.d