mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
- Rewritten painting implementation (not complete yet, but better then the current).
- Bug fixes. svn path=/trunk/; revision=6691
This commit is contained in:
parent
cb10422980
commit
1ccabd4c8e
40 changed files with 995 additions and 1286 deletions
|
@ -10,7 +10,6 @@ NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi);
|
||||||
LONG STDCALL
|
LONG STDCALL
|
||||||
NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
|
NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
|
||||||
|
|
||||||
|
|
||||||
INT STDCALL
|
INT STDCALL
|
||||||
NtUserReleaseDC(HWND hWnd, HDC hDc);
|
NtUserReleaseDC(HWND hWnd, HDC hDc);
|
||||||
|
|
||||||
|
@ -861,12 +860,8 @@ NtUserGetTitleBarInfo(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1);
|
DWORD Unknown1);
|
||||||
|
|
||||||
DWORD
|
BOOL STDCALL
|
||||||
STDCALL
|
NtUserGetUpdateRect(HWND hWnd, LPRECT lpRect, BOOL fErase);
|
||||||
NtUserGetUpdateRect(
|
|
||||||
DWORD Unknown0,
|
|
||||||
DWORD Unknown1,
|
|
||||||
DWORD Unknown2);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -323,14 +323,7 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: This works on Windows, but not on ReactOS! */
|
|
||||||
#ifdef __REACTOS__
|
|
||||||
hDC = GetDCEx(hWnd, (hRgn > (HRGN)1) ? hRgn : 0,
|
|
||||||
/*DCX_USESTYLE*/0x10000 | DCX_WINDOW |
|
|
||||||
((hRgn > (HRGN)1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN) : 0));
|
|
||||||
#else
|
|
||||||
hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | 0x10000);
|
hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | 0x10000);
|
||||||
#endif
|
|
||||||
if (hDC == 0)
|
if (hDC == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: bitblt.c,v 1.28 2003/10/29 08:38:55 gvg Exp $
|
/* $Id: bitblt.c,v 1.29 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -40,7 +40,6 @@
|
||||||
#include <include/object.h>
|
#include <include/object.h>
|
||||||
#include <include/dib.h>
|
#include <include/dib.h>
|
||||||
#include <include/surface.h>
|
#include <include/surface.h>
|
||||||
#include <include/copybits.h>
|
|
||||||
#include <include/inteng.h>
|
#include <include/inteng.h>
|
||||||
|
|
||||||
//#define NDEBUG
|
//#define NDEBUG
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __SUBSYS_WIN32K_INCLUDE_CALLBACK_H
|
#ifndef _WIN32K_CALLBACK_H
|
||||||
#define __SUBSYS_WIN32K_INCLUDE_CALLBACK_H
|
#define _WIN32K_CALLBACK_H
|
||||||
|
|
||||||
LRESULT STDCALL
|
LRESULT STDCALL
|
||||||
IntCallWindowProc(WNDPROC Proc,
|
IntCallWindowProc(WNDPROC Proc,
|
||||||
|
@ -23,9 +23,11 @@ IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback,
|
||||||
UINT Msg,
|
UINT Msg,
|
||||||
ULONG_PTR CompletionCallbackContext,
|
ULONG_PTR CompletionCallbackContext,
|
||||||
LRESULT Result);
|
LRESULT Result);
|
||||||
|
|
||||||
LRESULT STDCALL
|
LRESULT STDCALL
|
||||||
IntSendNCCALCSIZEMessage(HWND Wnd, BOOL Validate, PRECT Rect,
|
IntSendNCCALCSIZEMessage(HWND Wnd, BOOL Validate, PRECT Rect,
|
||||||
NCCALCSIZE_PARAMS* Params);
|
NCCALCSIZE_PARAMS* Params);
|
||||||
|
|
||||||
LRESULT STDCALL
|
LRESULT STDCALL
|
||||||
IntSendGETMINMAXINFOMessage(HWND Wnd, MINMAXINFO* MinMaxInfo);
|
IntSendGETMINMAXINFOMessage(HWND Wnd, MINMAXINFO* MinMaxInfo);
|
||||||
|
|
||||||
|
@ -47,4 +49,4 @@ IntLoadSysMenuTemplate();
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
IntLoadDefaultCursors();
|
IntLoadDefaultCursors();
|
||||||
|
|
||||||
#endif /* __SUBSYS_WIN32K_INCLUDE_CALLBACK_H */
|
#endif /* _WIN32K_CALLBACK_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_CARET_H
|
#ifndef _WIN32K_CARET_H
|
||||||
#define __WIN32K_CARET_H
|
#define _WIN32K_CARET_H
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <napi/win32.h>
|
#include <napi/win32.h>
|
||||||
|
@ -33,6 +33,6 @@ IntSwitchCaretShowing(PVOID Info);
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntDrawCaret(HWND hWnd);
|
IntDrawCaret(HWND hWnd);
|
||||||
|
|
||||||
#endif /* __WIN32K_CARET_H */
|
#endif /* _WIN32K_CARET_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_CLASS_H
|
#ifndef _WIN32K_CLASS_H
|
||||||
#define __WIN32K_CLASS_H
|
#define _WIN32K_CLASS_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -54,6 +54,6 @@ struct _WINDOW_OBJECT;
|
||||||
ULONG FASTCALL
|
ULONG FASTCALL
|
||||||
IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi);
|
IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi);
|
||||||
|
|
||||||
#endif /* __WIN32K_CLASS_H */
|
#endif /* _WIN32K_CLASS_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
|
#ifndef _WIN32K_COLOR_H
|
||||||
|
#define _WIN32K_COLOR_H
|
||||||
|
|
||||||
const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID);
|
const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID);
|
||||||
COLORREF STDCALL COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size, COLORREF color);
|
COLORREF STDCALL COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size, COLORREF color);
|
||||||
INT STDCALL COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col);
|
INT STDCALL COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col);
|
||||||
INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, PXLATEOBJ XlateObj, COLORREF col, BOOL skipReserved);
|
INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, PXLATEOBJ XlateObj, COLORREF col, BOOL skipReserved);
|
||||||
ULONG FASTCALL NtGdiGetSysColor(int nIndex);
|
ULONG FASTCALL NtGdiGetSysColor(int nIndex);
|
||||||
HBRUSH STDCALL NtGdiGetSysColorBrush(int nIndex);
|
HBRUSH STDCALL NtGdiGetSysColorBrush(int nIndex);
|
||||||
|
|
||||||
|
#endif /* _WIN32K_COLOR_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_DCE_H
|
#ifndef _WIN32K_DCE_H
|
||||||
#define __WIN32K_DCE_H
|
#define _WIN32K_DCE_H
|
||||||
|
|
||||||
/* Ported from WINE by Jason Filby */
|
/* Ported from WINE by Jason Filby */
|
||||||
|
|
||||||
|
@ -54,4 +54,4 @@ HWND FASTCALL IntWindowFromDC(HDC hDc);
|
||||||
PDCE FASTCALL DceFreeDCE(PDCE dce);
|
PDCE FASTCALL DceFreeDCE(PDCE dce);
|
||||||
void FASTCALL DceFreeWindowDCE(PWINDOW_OBJECT Window);
|
void FASTCALL DceFreeWindowDCE(PWINDOW_OBJECT Window);
|
||||||
|
|
||||||
#endif
|
#endif /* _WIN32K_DCE_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_DIB_H
|
#ifndef _WIN32K_DIB_H
|
||||||
#define __WIN32K_DIB_H
|
#define _WIN32K_DIB_H
|
||||||
|
|
||||||
#include <win32k/dc.h>
|
#include <win32k/dc.h>
|
||||||
|
|
||||||
|
@ -21,4 +21,4 @@ DIBColorTableToPaletteEntries(PPALETTEENTRY palEntries, const RGBQUAD *DIBColorT
|
||||||
HPALETTE FASTCALL
|
HPALETTE FASTCALL
|
||||||
BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType);
|
BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType);
|
||||||
|
|
||||||
#endif /* __WIN32K_DIB_H */
|
#endif /* _WIN32K_DIB_H */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __WIN32K_ENG_H
|
#ifndef _WIN32K_ENG_H
|
||||||
#define __WIN32K_ENG_H
|
#define _WIN32K_ENG_H
|
||||||
|
|
||||||
BOOL STDCALL EngIntersectRect (PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2);
|
BOOL STDCALL EngIntersectRect (PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2);
|
||||||
VOID FASTCALL EngDeleteXlate (XLATEOBJ *XlateObj);
|
VOID FASTCALL EngDeleteXlate (XLATEOBJ *XlateObj);
|
||||||
|
|
||||||
#endif /* __WIN32K_ENG_H */
|
#endif /* _WIN32K_ENG_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_ERROR_H
|
#ifndef _WIN32K_ERROR_H
|
||||||
#define __WIN32K_ERROR_H
|
#define _WIN32K_ERROR_H
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
SetLastNtError(
|
SetLastNtError(
|
||||||
|
@ -12,6 +12,6 @@ SetLastWin32Error(
|
||||||
NTSTATUS FASTCALL
|
NTSTATUS FASTCALL
|
||||||
GetLastNtError();
|
GetLastNtError();
|
||||||
|
|
||||||
#endif /* __WIN32K_ERROR_H */
|
#endif /* _WIN32K_ERROR_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_GUICHECK_H
|
#ifndef _WIN32K_GUICHECK_H
|
||||||
#define __WIN32K_GUICHECK_H
|
#define _WIN32K_GUICHECK_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -7,6 +7,6 @@
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntGraphicsCheck(BOOL Create);
|
IntGraphicsCheck(BOOL Create);
|
||||||
|
|
||||||
#endif /* __WIN32K_GUICHECK_H */
|
#endif /* _WIN32K_GUICHECK_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_HOTKEY_H
|
#ifndef _WIN32K_HOTKEY_H
|
||||||
#define __WIN32K_HOTKEY_H
|
#define _WIN32K_HOTKEY_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -36,6 +36,6 @@ UnregisterWindowHotKeys(PWINDOW_OBJECT Window);
|
||||||
VOID
|
VOID
|
||||||
UnregisterThreadHotKeys(struct _ETHREAD *Thread);
|
UnregisterThreadHotKeys(struct _ETHREAD *Thread);
|
||||||
|
|
||||||
#endif /* __WIN32K_HOTKEY_H */
|
#endif /* _WIN32K_HOTKEY_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_INPUT_H
|
#ifndef _WIN32K_INPUT_H
|
||||||
#define __WIN32K_INPUT_H
|
#define _WIN32K_INPUT_H
|
||||||
|
|
||||||
#include <internal/kbd.h>
|
#include <internal/kbd.h>
|
||||||
|
|
||||||
|
@ -9,4 +9,4 @@ PUSER_MESSAGE_QUEUE W32kGetPrimitiveMessageQueue(VOID);
|
||||||
PKBDTABLES W32kGetDefaultKeyLayout(VOID);
|
PKBDTABLES W32kGetDefaultKeyLayout(VOID);
|
||||||
VOID FASTCALL W32kKeyProcessMessage(LPMSG Msg, PKBDTABLES KeyLayout);
|
VOID FASTCALL W32kKeyProcessMessage(LPMSG Msg, PKBDTABLES KeyLayout);
|
||||||
|
|
||||||
#endif /* __WIN32K_INPUT_H */
|
#endif /* _WIN32K_INPUT_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_INTENG_H
|
#ifndef _WIN32K_INTENG_H
|
||||||
#define __WIN32K_INTENG_H
|
#define _WIN32K_INTENG_H
|
||||||
|
|
||||||
/* Definitions of IntEngXxx functions */
|
/* Definitions of IntEngXxx functions */
|
||||||
|
|
||||||
|
@ -38,4 +38,4 @@ BOOL STDCALL IntEngPolyline(SURFOBJ *DestSurf,
|
||||||
CLIPOBJ* STDCALL IntEngCreateClipRegion(ULONG count,
|
CLIPOBJ* STDCALL IntEngCreateClipRegion(ULONG count,
|
||||||
PRECTL pRect,
|
PRECTL pRect,
|
||||||
RECTL rcBounds);
|
RECTL rcBounds);
|
||||||
#endif
|
#endif /* _WIN32K_INTENG_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_MENU_H
|
#ifndef _WIN32K_MENU_H
|
||||||
#define __WIN32K_MENU_H
|
#define _WIN32K_MENU_H
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <napi/win32.h>
|
#include <napi/win32.h>
|
||||||
|
@ -285,6 +285,4 @@ NtUserTrackPopupMenuEx(
|
||||||
HWND hwnd,
|
HWND hwnd,
|
||||||
LPTPMPARAMS lptpm);
|
LPTPMPARAMS lptpm);
|
||||||
|
|
||||||
#endif /* __WIN32K_MENU_H */
|
#endif /* _WIN32K_MENU_H */
|
||||||
|
|
||||||
/* EOF */
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_MOUSE_H
|
#ifndef _WIN32K_MOUSE_H
|
||||||
#define __WIN32K_MOUSE_H
|
#define _WIN32K_MOUSE_H
|
||||||
|
|
||||||
#include "../eng/misc.h"
|
#include "../eng/misc.h"
|
||||||
#include <include/winsta.h>
|
#include <include/winsta.h>
|
||||||
|
@ -14,4 +14,4 @@ VOID FASTCALL EnableMouse(HDC hDisplayDC);
|
||||||
VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount);
|
VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __WIN32K_MOUSE_H */
|
#endif /* _WIN32K_MOUSE_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_MSGQUEUE_H
|
#ifndef _WIN32K_MSGQUEUE_H
|
||||||
#define __WIN32K_MSGQUEUE_H
|
#define _WIN32K_MSGQUEUE_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
@ -138,6 +138,6 @@ inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits );
|
||||||
|
|
||||||
#define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
|
#define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
|
||||||
|
|
||||||
#endif /* __WIN32K_MSGQUEUE_H */
|
#endif /* _WIN32K_MSGQUEUE_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_OBJECT_H
|
#ifndef _WIN32K_OBJECT_H
|
||||||
#define __WIN32K_OBJECT_H
|
#define _WIN32K_OBJECT_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <win32k/gdiobj.h>
|
#include <win32k/gdiobj.h>
|
||||||
|
@ -139,6 +139,6 @@ HBITMAP
|
||||||
FASTCALL
|
FASTCALL
|
||||||
BitmapToSurf ( PBITMAPOBJ BitmapObj );
|
BitmapToSurf ( PBITMAPOBJ BitmapObj );
|
||||||
|
|
||||||
#endif /* __WIN32K_OBJECT_H */
|
#endif /* _WIN32K_OBJECT_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __WIN32K_PAINT_H
|
#ifndef _WIN32K_PAINT_H
|
||||||
#define __WIN32K_PAINT_H
|
#define _WIN32K_PAINT_H
|
||||||
|
|
||||||
BOOL STDCALL FillSolid (SURFOBJ* Surface, RECTL* Dimensions, ULONG iColor);
|
BOOL STDCALL FillSolid (SURFOBJ* Surface, RECTL* Dimensions, ULONG iColor);
|
||||||
BOOL STDCALL FillPolygon ( DC* dc, SURFOBJ* SurfObj, BRUSHOBJ* BrushObj, MIX RopMode, CONST PPOINT Points, INT Count, RECTL BoundRect );
|
BOOL STDCALL FillPolygon ( DC* dc, SURFOBJ* SurfObj, BRUSHOBJ* BrushObj, MIX RopMode, CONST PPOINT Points, INT Count, RECTL BoundRect );
|
||||||
|
|
||||||
#endif /* __WIN32K_PAINT_H */
|
#endif /* _WIN32K_PAINT_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_PAINTING_H
|
#ifndef _WIN32K_PAINTING_H
|
||||||
#define __WIN32K_PAINTING_H
|
#define _WIN32K_PAINTING_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -7,31 +7,11 @@
|
||||||
#include <include/msgqueue.h>
|
#include <include/msgqueue.h>
|
||||||
#include <include/window.h>
|
#include <include/window.h>
|
||||||
|
|
||||||
/* PaintRedrawWindow() control flags */
|
BOOL FASTCALL
|
||||||
#define RDW_EX_USEHRGN 0x0001
|
IntRedrawWindow(PWINDOW_OBJECT Wnd, const RECT* UpdateRect, HRGN UpdateRgn, ULONG Flags);
|
||||||
#define RDW_EX_DELETEHRGN 0x0002
|
BOOL FASTCALL
|
||||||
#define RDW_EX_XYWINDOW 0x0004
|
IntGetPaintMessage(PWINDOW_OBJECT Window, PW32THREAD Thread, MSG *Message);
|
||||||
#define RDW_EX_TOPFRAME 0x0010
|
|
||||||
#define RDW_EX_DELAY_NCPAINT 0x0020
|
|
||||||
|
|
||||||
/* Update non-client region flags. */
|
|
||||||
#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)
|
|
||||||
|
|
||||||
HWND STDCALL
|
|
||||||
PaintingFindWinToRepaint(HWND hWnd, PW32THREAD Thread);
|
|
||||||
BOOL STDCALL
|
|
||||||
PaintRedrawWindow(PWINDOW_OBJECT Wnd, 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);
|
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
NtUserValidateRgn(HWND hWnd, HRGN hRgn);
|
NtUserValidateRgn(HWND hWnd, HRGN hRgn);
|
||||||
|
|
||||||
#endif /* __WIN32K_PAINTING_H */
|
#endif /* _WIN32K_PAINTING_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_PALETTE_H
|
#ifndef _WIN32K_PALETTE_H
|
||||||
#define __WIN32K_PALETTE_H
|
#define _WIN32K_PALETTE_H
|
||||||
|
|
||||||
#define PALETTE_FIXED 0x0001 /* read-only colormap - have to use XAllocColor (if not virtual) */
|
#define PALETTE_FIXED 0x0001 /* read-only colormap - have to use XAllocColor (if not virtual) */
|
||||||
#define PALETTE_VIRTUAL 0x0002 /* no mapping needed - pixel == pixel color */
|
#define PALETTE_VIRTUAL 0x0002 /* no mapping needed - pixel == pixel color */
|
||||||
|
@ -42,4 +42,4 @@ INT FASTCALL PALETTE_ToPhysical (PDC dc, COLORREF color);
|
||||||
|
|
||||||
PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);
|
PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);
|
||||||
|
|
||||||
#endif /* __WIN32K_PALETTE_H */
|
#endif /* _WIN32K_PALETTE_H */
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef _WIN32K_PATH_H
|
||||||
|
#define _WIN32K_PATH_H
|
||||||
|
|
||||||
BOOL FASTCALL PATH_Arc (PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd);
|
BOOL FASTCALL PATH_Arc (PDC dc, 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);
|
BOOL FASTCALL PATH_AssignGdiPath (GdiPath *pPathDest, const GdiPath *pPathSrc);
|
||||||
VOID FASTCALL PATH_DestroyGdiPath (GdiPath *pPath);
|
VOID FASTCALL PATH_DestroyGdiPath (GdiPath *pPath);
|
||||||
|
@ -27,3 +30,5 @@ BOOL FASTCALL PATH_PathToRegion(const GdiPath *pPath, INT nPolyFillMode, HRGN *p
|
||||||
BOOL FASTCALL PATH_ReserveEntries (GdiPath *pPath, INT numEntries);
|
BOOL FASTCALL PATH_ReserveEntries (GdiPath *pPath, INT numEntries);
|
||||||
VOID FASTCALL PATH_ScaleNormalizedPoint (FLOAT_POINT corners[], double x, double y, POINT *pPoint);
|
VOID FASTCALL PATH_ScaleNormalizedPoint (FLOAT_POINT corners[], double x, double y, POINT *pPoint);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* _WIN32K_PATH_H */
|
||||||
|
|
|
@ -3,5 +3,3 @@
|
||||||
|
|
||||||
#endif /* _WIN32K_PROP_H */
|
#endif /* _WIN32K_PROP_H */
|
||||||
|
|
||||||
/* EOF */
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef _WIN32K_RECT_H
|
||||||
|
#define _WIN32K_RECT_H
|
||||||
|
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
NtGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
|
NtGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
|
@ -10,3 +13,5 @@ BOOL STDCALL
|
||||||
NtGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
|
NtGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
NtGdiOffsetRect(LPRECT Rect, int x, int y);
|
NtGdiOffsetRect(LPRECT Rect, int x, int y);
|
||||||
|
|
||||||
|
#endif /* _WIN32K_RECT_H */
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
|
#ifndef _WIN32K_SCROLL_H
|
||||||
|
#define _WIN32K_SCROLL_H
|
||||||
|
|
||||||
DWORD FASTCALL IntCreateScrollBar(PWINDOW_OBJECT Window, LONG idObject);
|
DWORD FASTCALL IntCreateScrollBar(PWINDOW_OBJECT Window, LONG idObject);
|
||||||
BOOL FASTCALL IntDestroyScrollBar(PWINDOW_OBJECT Window, LONG idObject);
|
BOOL FASTCALL IntDestroyScrollBar(PWINDOW_OBJECT Window, LONG idObject);
|
||||||
|
|
||||||
|
#endif /* _WIN32K_SCROLL_H */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __WIN32K_SURFACE_H
|
#ifndef _WIN32K_SURFACE_H
|
||||||
#define __WIN32K_SURFACE_H
|
#define _WIN32K_SURFACE_H
|
||||||
|
|
||||||
INT FASTCALL BitsPerFormat (ULONG Format);
|
INT FASTCALL BitsPerFormat (ULONG Format);
|
||||||
ULONG FASTCALL BitmapFormat (WORD Bits, DWORD Compression);
|
ULONG FASTCALL BitmapFormat (WORD Bits, DWORD Compression);
|
||||||
|
|
||||||
#endif /* __WIN32K_SURFACE_H */
|
#endif /* _WIN32K_SURFACE_H */
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
|
#ifndef _WIN32K_TEXT_H
|
||||||
|
#define _WIN32K_TEXT_H
|
||||||
|
|
||||||
BOOL FASTCALL InitFontSupport(VOID);
|
BOOL FASTCALL InitFontSupport(VOID);
|
||||||
|
|
||||||
|
#endif /* _WIN32K_TEXT_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _SUBSYS_WIN32K_INCLUDE_TIMER_H
|
#ifndef _WIN32K_TIMER_H
|
||||||
#define _SUBSYS_WIN32K_INCLUDE_TIMER_H
|
#define _WIN32K_TIMER_H
|
||||||
|
|
||||||
typedef struct _MSG_TIMER_ENTRY{
|
typedef struct _MSG_TIMER_ENTRY{
|
||||||
LIST_ENTRY ListEntry;
|
LIST_ENTRY ListEntry;
|
||||||
|
@ -14,4 +14,4 @@ VOID FASTCALL RemoveTimersThread(HANDLE ThreadID);
|
||||||
PMSG_TIMER_ENTRY FASTCALL IntRemoveTimer(HWND hWnd, UINT_PTR IDEvent, HANDLE ThreadID, BOOL SysTimer);
|
PMSG_TIMER_ENTRY FASTCALL IntRemoveTimer(HWND hWnd, UINT_PTR IDEvent, HANDLE ThreadID, BOOL SysTimer);
|
||||||
UINT_PTR FASTCALL IntSetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, BOOL SystemTimer);
|
UINT_PTR FASTCALL IntSetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, BOOL SystemTimer);
|
||||||
|
|
||||||
#endif /* ndef _SUBSYS_WIN32K_INCLUDE_TIMER_H */
|
#endif /* _WIN32K_TIMER_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_WINDOW_H
|
#ifndef _WIN32K_WINDOW_H
|
||||||
#define __WIN32K_WINDOW_H
|
#define _WIN32K_WINDOW_H
|
||||||
|
|
||||||
struct _PROPERTY;
|
struct _PROPERTY;
|
||||||
struct _WINDOW_OBJECT;
|
struct _WINDOW_OBJECT;
|
||||||
|
@ -94,15 +94,20 @@ typedef struct _WINDOW_OBJECT
|
||||||
|
|
||||||
/* Window flags. */
|
/* Window flags. */
|
||||||
#define WINDOWOBJECT_NEED_SIZE (0x00000001)
|
#define WINDOWOBJECT_NEED_SIZE (0x00000001)
|
||||||
/* Not used anymore: define WINDOWOBJECT_NEED_BEGINPAINT (0x00000002) */
|
#define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002)
|
||||||
#define WINDOWOBJECT_NEED_ERASEBACKGRD (0x00000004)
|
#define WINDOWOBJECT_NEED_NCPAINT (0x00000004)
|
||||||
#define WINDOWOBJECT_NEED_NCPAINT (0x00000008)
|
#define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008)
|
||||||
#define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000010)
|
|
||||||
#define WINDOWOBJECT_RESTOREMAX (0x00000020)
|
#define WINDOWOBJECT_RESTOREMAX (0x00000020)
|
||||||
|
|
||||||
inline BOOL IntIsDesktopWindow(PWINDOW_OBJECT WindowObject);
|
inline BOOL IntIsDesktopWindow(PWINDOW_OBJECT WindowObject);
|
||||||
|
|
||||||
inline BOOL IntIsBroadcastHwnd( HWND hwnd );
|
inline BOOL IntIsBroadcastHwnd(HWND hwnd);
|
||||||
|
|
||||||
|
BOOL FASTCALL
|
||||||
|
IntIsWindow(HWND hWnd);
|
||||||
|
|
||||||
|
HWND* FASTCALL
|
||||||
|
IntWinListChildren(PWINDOW_OBJECT Window);
|
||||||
|
|
||||||
BOOLEAN FASTCALL
|
BOOLEAN FASTCALL
|
||||||
IntWndBelongsToThread(PWINDOW_OBJECT Window, PW32THREAD ThreadData);
|
IntWndBelongsToThread(PWINDOW_OBJECT Window, PW32THREAD ThreadData);
|
||||||
|
@ -160,12 +165,6 @@ IntUnlinkWindow(PWINDOW_OBJECT Wnd);
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntLinkWindow(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndParent, PWINDOW_OBJECT WndPrevSibling);
|
IntLinkWindow(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndParent, PWINDOW_OBJECT WndPrevSibling);
|
||||||
|
|
||||||
ULONG
|
|
||||||
UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle);
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
UserHasThickFrameStyle(ULONG Style, ULONG ExStyle);
|
|
||||||
|
|
||||||
PWINDOW_OBJECT FASTCALL
|
PWINDOW_OBJECT FASTCALL
|
||||||
IntGetAncestor(PWINDOW_OBJECT Wnd, UINT Type);
|
IntGetAncestor(PWINDOW_OBJECT Wnd, UINT Type);
|
||||||
|
|
||||||
|
@ -194,6 +193,6 @@ DWORD IntRemoveWndProcHandle(WNDPROC Handle);
|
||||||
DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID);
|
DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID);
|
||||||
DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode);
|
DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode);
|
||||||
|
|
||||||
#endif /* __WIN32K_WINDOW_H */
|
#endif /* _WIN32K_WINDOW_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef _WIN32K_WINPOS_H
|
||||||
|
#define _WIN32K_WINPOS_H
|
||||||
|
|
||||||
/* Undocumented flags. */
|
/* Undocumented flags. */
|
||||||
#define SWP_NOCLIENTMOVE 0x0800
|
#define SWP_NOCLIENTMOVE 0x0800
|
||||||
#define SWP_NOCLIENTSIZE 0x1000
|
#define SWP_NOCLIENTSIZE 0x1000
|
||||||
|
@ -18,3 +21,5 @@ USHORT STDCALL
|
||||||
WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT WinPoint,
|
WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT WinPoint,
|
||||||
PWINDOW_OBJECT* Window);
|
PWINDOW_OBJECT* Window);
|
||||||
VOID FASTCALL WinPosActivateOtherWindow(PWINDOW_OBJECT Window);
|
VOID FASTCALL WinPosActivateOtherWindow(PWINDOW_OBJECT Window);
|
||||||
|
|
||||||
|
#endif /* _WIN32K_WINPOS_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __WIN32K_WINSTA_H
|
#ifndef _WIN32K_WINSTA_H
|
||||||
#define __WIN32K_WINSTA_H
|
#define _WIN32K_WINSTA_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -61,6 +61,6 @@ IntSetCaptureWindow(struct _WINDOW_OBJECT* Window);
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntGetWindowStationObject(PWINSTATION_OBJECT Object);
|
IntGetWindowStationObject(PWINSTATION_OBJECT Object);
|
||||||
|
|
||||||
#endif /* __WIN32K_WINSTA_H */
|
#endif /* _WIN32K_WINSTA_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: message.c,v 1.31 2003/11/11 20:28:21 gvg Exp $
|
/* $Id: message.c,v 1.32 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -205,39 +205,10 @@ IntPeekMessage(LPMSG Msg,
|
||||||
/* Check for paint messages. */
|
/* Check for paint messages. */
|
||||||
if (ThreadQueue->PaintPosted)
|
if (ThreadQueue->PaintPosted)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT WindowObject;
|
if (IntGetPaintMessage(Wnd, PsGetWin32Thread(), Msg))
|
||||||
|
{
|
||||||
Msg->hwnd = PaintingFindWinToRepaint(Wnd, PsGetWin32Thread());
|
return TRUE;
|
||||||
Msg->message = WM_PAINT;
|
}
|
||||||
Msg->wParam = Msg->lParam = 0;
|
|
||||||
|
|
||||||
WindowObject = IntGetWindowObject(Msg->hwnd);
|
|
||||||
if (WindowObject != NULL)
|
|
||||||
{
|
|
||||||
if (WindowObject->Style & WS_MINIMIZE &&
|
|
||||||
(HICON)NtUserGetClassLong(Msg->hwnd, GCL_HICON, FALSE) != NULL)
|
|
||||||
{
|
|
||||||
Msg->message = WM_PAINTICON;
|
|
||||||
Msg->wParam = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Msg->hwnd == NULL || Msg->hwnd == Wnd ||
|
|
||||||
IntIsChildWindow(Wnd, Msg->hwnd))
|
|
||||||
{
|
|
||||||
if (WindowObject->Flags & WINDOWOBJECT_NEED_INTERNALPAINT &&
|
|
||||||
WindowObject->UpdateRegion == NULL)
|
|
||||||
{
|
|
||||||
WindowObject->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
|
||||||
if (RemoveMessages)
|
|
||||||
{
|
|
||||||
MsqDecPaintCountQueue(WindowObject->MessageQueue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
IntReleaseWindowObject(WindowObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: stubs.c,v 1.34 2003/11/10 17:44:49 weiden Exp $
|
/* $Id: stubs.c,v 1.35 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -637,18 +637,6 @@ NtUserGetTitleBarInfo(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
NtUserGetUpdateRect(
|
|
||||||
DWORD Unknown0,
|
|
||||||
DWORD Unknown1,
|
|
||||||
DWORD Unknown2)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserImpersonateDdeClientWindow(
|
NtUserImpersonateDdeClientWindow(
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: vis.c,v 1.7 2003/09/09 09:39:21 gvg Exp $
|
* $Id: vis.c,v 1.8 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -221,7 +221,6 @@ VIS_RepaintDesktop(HWND Desktop, HRGN RepaintRgn)
|
||||||
NtUserReleaseDC(Desktop, dc);
|
NtUserReleaseDC(Desktop, dc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID FASTCALL
|
static VOID FASTCALL
|
||||||
GetUncoveredArea(HRGN Uncovered, PWINDOW_OBJECT Parent, PWINDOW_OBJECT TargetChild,
|
GetUncoveredArea(HRGN Uncovered, PWINDOW_OBJECT Parent, PWINDOW_OBJECT TargetChild,
|
||||||
BOOL IncludeTarget)
|
BOOL IncludeTarget)
|
||||||
|
@ -249,7 +248,6 @@ GetUncoveredArea(HRGN Uncovered, PWINDOW_OBJECT Parent, PWINDOW_OBJECT TargetChi
|
||||||
}
|
}
|
||||||
ExReleaseFastMutexUnsafe(&Parent->ChildrenListLock);
|
ExReleaseFastMutexUnsafe(&Parent->ChildrenListLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
||||||
|
@ -303,9 +301,10 @@ VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
||||||
RgnType = NtGdiCombineRgn(DirtyRgn, DirtyRgn, ExposedWindow, RGN_AND);
|
RgnType = NtGdiCombineRgn(DirtyRgn, DirtyRgn, ExposedWindow, RGN_AND);
|
||||||
if (NULLREGION != RgnType && ERROR != RgnType)
|
if (NULLREGION != RgnType && ERROR != RgnType)
|
||||||
{
|
{
|
||||||
PaintRedrawWindow(Sibling, NULL, DirtyRgn,
|
NtGdiOffsetRgn(DirtyRgn, -Sibling->ClientRect.left, -Sibling->ClientRect.top);
|
||||||
RDW_INVALIDATE | RDW_FRAME | RDW_ERASE
|
IntRedrawWindow(Sibling, NULL, DirtyRgn,
|
||||||
| RDW_ALLCHILDREN, RDW_EX_XYWINDOW);
|
RDW_INVALIDATE | RDW_FRAME | RDW_ERASE
|
||||||
|
| RDW_ALLCHILDREN);
|
||||||
}
|
}
|
||||||
Covered = UnsafeIntCreateRectRgnIndirect(&Sibling->WindowRect);
|
Covered = UnsafeIntCreateRectRgnIndirect(&Sibling->WindowRect);
|
||||||
NtGdiCombineRgn(Uncovered, Uncovered, Covered, RGN_DIFF);
|
NtGdiCombineRgn(Uncovered, Uncovered, Covered, RGN_DIFF);
|
||||||
|
@ -329,9 +328,11 @@ VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
||||||
RgnType = NtGdiCombineRgn(DirtyRgn, DirtyRgn, ExposedWindow, RGN_AND);
|
RgnType = NtGdiCombineRgn(DirtyRgn, DirtyRgn, ExposedWindow, RGN_AND);
|
||||||
if (NULLREGION != RgnType && ERROR != RgnType)
|
if (NULLREGION != RgnType && ERROR != RgnType)
|
||||||
{
|
{
|
||||||
PaintRedrawWindow(Parent, NULL, DirtyRgn,
|
NtGdiOffsetRgn(DirtyRgn, -Parent->ClientRect.left,
|
||||||
RDW_INVALIDATE | RDW_FRAME | RDW_ERASE
|
-Parent->ClientRect.top);
|
||||||
| RDW_NOCHILDREN, RDW_EX_XYWINDOW);
|
IntRedrawWindow(Parent, NULL, DirtyRgn,
|
||||||
|
RDW_INVALIDATE | RDW_FRAME | RDW_ERASE
|
||||||
|
| RDW_NOCHILDREN);
|
||||||
}
|
}
|
||||||
NtGdiDeleteObject(ExposedWindow);
|
NtGdiDeleteObject(ExposedWindow);
|
||||||
NtGdiDeleteObject(DirtyRgn);
|
NtGdiDeleteObject(DirtyRgn);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: windc.c,v 1.34 2003/10/22 13:34:25 gvg Exp $
|
/* $Id: windc.c,v 1.35 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -433,6 +433,20 @@ NtUserGetDCEx(HWND hWnd, HANDLE ClipRegion, ULONG Flags)
|
||||||
Dce->hClipRgn = NULL;
|
Dce->hClipRgn = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 != (Flags & DCX_INTERSECTUPDATE) && NULL == ClipRegion)
|
||||||
|
{
|
||||||
|
Dce->hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||||
|
if (Dce->hClipRgn)
|
||||||
|
{
|
||||||
|
if (Window->UpdateRegion)
|
||||||
|
NtGdiCombineRgn(Dce->hClipRgn, Window->UpdateRegion, NULL, RGN_COPY);
|
||||||
|
NtGdiOffsetRgn(Dce->hClipRgn,
|
||||||
|
Window->WindowRect.left - Window->ClientRect.left,
|
||||||
|
Window->WindowRect.top - Window->ClientRect.top);
|
||||||
|
}
|
||||||
|
Flags &= DCX_INTERSECTRGN;
|
||||||
|
}
|
||||||
|
|
||||||
if (NULL != ClipRegion)
|
if (NULL != ClipRegion)
|
||||||
{
|
{
|
||||||
Dce->hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
|
Dce->hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: window.c,v 1.135 2003/11/12 05:40:59 royce Exp $
|
/* $Id: window.c,v 1.136 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -245,45 +245,37 @@ IntReleaseWindowObject(PWINDOW_OBJECT Window)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IntBuildChildWindowArray
|
* IntWinListChildren
|
||||||
*
|
*
|
||||||
* Compile a list of all child window handles from given window.
|
* Compile a list of all child window handles from given window.
|
||||||
*
|
*
|
||||||
* Remarks
|
* Remarks
|
||||||
* This function is similar to Wine WIN_ListChildren, but has different
|
* This function is similar to Wine WIN_ListChildren. The caller
|
||||||
* syntax.
|
* must free the returned list with ExFreePool.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL FASTCALL
|
HWND* FASTCALL
|
||||||
IntBuildChildWindowArray(PWINDOW_OBJECT Window, HWND **Children, unsigned *NumChildren)
|
IntWinListChildren(PWINDOW_OBJECT Window)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT Child;
|
PWINDOW_OBJECT Child;
|
||||||
UINT Index;
|
HWND *List;
|
||||||
|
UINT Index, NumChildren = 0;
|
||||||
*Children = NULL;
|
|
||||||
*NumChildren = 0;
|
|
||||||
|
|
||||||
ExAcquireFastMutexUnsafe(&Window->ChildrenListLock);
|
ExAcquireFastMutexUnsafe(&Window->ChildrenListLock);
|
||||||
|
|
||||||
Child = Window->FirstChild;
|
for (Child = Window->FirstChild; Child; Child = Child->NextSibling)
|
||||||
while (Child)
|
++NumChildren;
|
||||||
{
|
|
||||||
(*NumChildren)++;
|
|
||||||
Child = Child->NextSibling;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*NumChildren != 0)
|
if (NumChildren != 0)
|
||||||
{
|
{
|
||||||
*Children = ExAllocatePoolWithTag(PagedPool, *NumChildren * sizeof(HWND), TAG_WNAM);
|
List = ExAllocatePool(PagedPool, (NumChildren + 1) * sizeof(HWND));
|
||||||
if (*Children != NULL)
|
if (List != NULL)
|
||||||
{
|
{
|
||||||
for (Child = Window->FirstChild, Index = 0;
|
for (Child = Window->FirstChild, Index = 0;
|
||||||
Child != NULL;
|
Child != NULL;
|
||||||
Child = Child->NextSibling, ++Index)
|
Child = Child->NextSibling, ++Index)
|
||||||
{
|
List[Index] = Child->Self;
|
||||||
(*Children)[Index] = Child->Self;
|
List[Index] = NULL;
|
||||||
}
|
|
||||||
ASSERT(Index == *NumChildren);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -293,10 +285,9 @@ IntBuildChildWindowArray(PWINDOW_OBJECT Window, HWND **Children, unsigned *NumCh
|
||||||
|
|
||||||
ExReleaseFastMutexUnsafe(&Window->ChildrenListLock);
|
ExReleaseFastMutexUnsafe(&Window->ChildrenListLock);
|
||||||
|
|
||||||
return ((*NumChildren != 0) && (*Children != NULL));
|
return (NumChildren > 0) ? List : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IntDestroyWindow
|
* IntDestroyWindow
|
||||||
*
|
*
|
||||||
|
@ -308,8 +299,7 @@ static LRESULT IntDestroyWindow(PWINDOW_OBJECT Window,
|
||||||
BOOLEAN SendMessages)
|
BOOLEAN SendMessages)
|
||||||
{
|
{
|
||||||
HWND *Children;
|
HWND *Children;
|
||||||
unsigned NumChildren;
|
HWND *ChildHandle;
|
||||||
unsigned Index;
|
|
||||||
PWINDOW_OBJECT Child;
|
PWINDOW_OBJECT Child;
|
||||||
|
|
||||||
if (! IntWndBelongsToThread(Window, ThreadData))
|
if (! IntWndBelongsToThread(Window, ThreadData))
|
||||||
|
@ -319,33 +309,23 @@ static LRESULT IntDestroyWindow(PWINDOW_OBJECT Window,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free child windows */
|
/* free child windows */
|
||||||
if (IntBuildChildWindowArray(Window, &Children, &NumChildren))
|
Children = IntWinListChildren(Window);
|
||||||
|
if (Children)
|
||||||
{
|
{
|
||||||
DbgPrint("NumChildren: %d\n", NumChildren);
|
for (ChildHandle = Children; *ChildHandle; ++ChildHandle)
|
||||||
for (Index = NumChildren; 0 < Index; Index--)
|
|
||||||
{
|
{
|
||||||
Child = IntGetProcessWindowObject(ProcessData, Children[Index - 1]);
|
Child = IntGetProcessWindowObject(ProcessData, *ChildHandle);
|
||||||
DbgPrint("Child %d: %x\n", Index - 1, Child);
|
|
||||||
if (NULL != Child)
|
if (NULL != Child)
|
||||||
{
|
{
|
||||||
if (IntWndBelongsToThread(Child, ThreadData))
|
if (IntWndBelongsToThread(Child, ThreadData))
|
||||||
{
|
IntDestroyWindow(Child, ProcessData, ThreadData, SendMessages);
|
||||||
DbgPrint("Destroying\n");
|
|
||||||
IntDestroyWindow(Child, ProcessData, ThreadData, SendMessages);
|
|
||||||
DbgPrint("End Destroying\n");
|
|
||||||
}
|
|
||||||
#if 0 /* FIXME */
|
#if 0 /* FIXME */
|
||||||
else
|
else
|
||||||
{
|
SendMessageW( list[i], WM_WINE_DESTROYWINDOW, 0, 0 );
|
||||||
SendMessageW( list[i], WM_WINE_DESTROYWINDOW, 0, 0 );
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (0 != NumChildren)
|
|
||||||
{
|
|
||||||
ExFreePool(Children);
|
|
||||||
}
|
}
|
||||||
|
ExFreePool(Children);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SendMessages)
|
if (SendMessages)
|
||||||
|
@ -354,9 +334,9 @@ static LRESULT IntDestroyWindow(PWINDOW_OBJECT Window,
|
||||||
* Clear the update region to make sure no WM_PAINT messages will be
|
* Clear the update region to make sure no WM_PAINT messages will be
|
||||||
* generated for this window while processing the WM_NCDESTROY.
|
* generated for this window while processing the WM_NCDESTROY.
|
||||||
*/
|
*/
|
||||||
PaintRedrawWindow(Window, NULL, 0,
|
IntRedrawWindow(Window, NULL, 0,
|
||||||
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_NOCHILDREN,
|
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE |
|
||||||
0);
|
RDW_NOINTERNALPAINT | RDW_NOCHILDREN);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send the WM_NCDESTROY to the window being destroyed.
|
* Send the WM_NCDESTROY to the window being destroyed.
|
||||||
|
@ -486,7 +466,7 @@ IntCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
|
||||||
WindowObject->Class = DesktopClass;
|
WindowObject->Class = DesktopClass;
|
||||||
WindowObject->ExStyle = 0;
|
WindowObject->ExStyle = 0;
|
||||||
WindowObject->Style = WS_VISIBLE;
|
WindowObject->Style = WS_VISIBLE;
|
||||||
WindowObject->Flags |= WINDOWOBJECT_NEED_ERASEBACKGRD;
|
WindowObject->Flags = 0;
|
||||||
WindowObject->x = 0;
|
WindowObject->x = 0;
|
||||||
WindowObject->y = 0;
|
WindowObject->y = 0;
|
||||||
WindowObject->Width = Width;
|
WindowObject->Width = Width;
|
||||||
|
@ -1838,16 +1818,16 @@ NtUserDestroyWindow(HWND Wnd)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
BOOL GotOne = FALSE;
|
BOOL GotOne = FALSE;
|
||||||
HWND *list;
|
HWND *Children;
|
||||||
UINT NumChildren;
|
HWND *ChildHandle;
|
||||||
PWINDOW_OBJECT Child;
|
PWINDOW_OBJECT Child;
|
||||||
|
|
||||||
if (IntBuildChildWindowArray(IntGetWindowObject(IntGetDesktopWindow()),
|
Children = IntWinListChildren(IntGetWindowObject(IntGetDesktopWindow());
|
||||||
&list, &NumChildren))
|
if (Children)
|
||||||
{
|
{
|
||||||
for (i = 0; i < NumChildren; i++)
|
for (ChildHandle = Children; *ChildHandle; ++ChildHandle)
|
||||||
{
|
{
|
||||||
Child = IntGetWindowObject(list[i]);
|
Child = IntGetWindowObject(*ChildHandle);
|
||||||
if (Child->Owner != Window)
|
if (Child->Owner != Window)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -1855,7 +1835,7 @@ NtUserDestroyWindow(HWND Wnd)
|
||||||
if (IntWndBelongsToThread(Child, PsGetWin32Thread()))
|
if (IntWndBelongsToThread(Child, PsGetWin32Thread()))
|
||||||
{
|
{
|
||||||
IntReleaseWindowObject(Child);
|
IntReleaseWindowObject(Child);
|
||||||
NtUserDestroyWindow(list[i]);
|
NtUserDestroyWindow(*ChildHandle);
|
||||||
GotOne = TRUE;
|
GotOne = TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1866,7 +1846,7 @@ NtUserDestroyWindow(HWND Wnd)
|
||||||
}
|
}
|
||||||
IntReleaseWindowObject(Child);
|
IntReleaseWindowObject(Child);
|
||||||
}
|
}
|
||||||
ExFreePool(list);
|
ExFreePool(Children);
|
||||||
}
|
}
|
||||||
if (! GotOne)
|
if (! GotOne)
|
||||||
{
|
{
|
||||||
|
@ -3064,61 +3044,6 @@ NtUserRealChildWindowFromPoint(DWORD Unknown0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
NtUserRedrawWindow
|
|
||||||
(
|
|
||||||
HWND hWnd,
|
|
||||||
CONST RECT *lprcUpdate,
|
|
||||||
HRGN hrgnUpdate,
|
|
||||||
UINT flags
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RECT SafeUpdateRect;
|
|
||||||
NTSTATUS Status;
|
|
||||||
PWINDOW_OBJECT Wnd;
|
|
||||||
|
|
||||||
if (!(Wnd = IntGetWindowObject(hWnd)))
|
|
||||||
{
|
|
||||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(NULL != lprcUpdate)
|
|
||||||
{
|
|
||||||
Status = MmCopyFromCaller(&SafeUpdateRect, (PRECT)lprcUpdate, sizeof(RECT));
|
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
/* FIXME: set last error */
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Status = PaintRedrawWindow
|
|
||||||
(
|
|
||||||
Wnd,
|
|
||||||
NULL == lprcUpdate ? NULL : &SafeUpdateRect,
|
|
||||||
hrgnUpdate,
|
|
||||||
flags,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
/* FIXME: set last error */
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -3454,23 +3379,6 @@ NtUserShowWindowAsync(DWORD Unknown0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL STDCALL
|
|
||||||
NtUserUpdateWindow(HWND hWnd)
|
|
||||||
{
|
|
||||||
PWINDOW_OBJECT pWindow = IntGetWindowObject( hWnd);
|
|
||||||
|
|
||||||
if (!pWindow)
|
|
||||||
return FALSE;
|
|
||||||
if (pWindow->UpdateRegion)
|
|
||||||
NtUserSendMessage( hWnd, WM_PAINT,0,0);
|
|
||||||
IntReleaseWindowObject(pWindow);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: winpos.c,v 1.40 2003/10/29 16:24:59 navaraf Exp $
|
/* $Id: winpos.c,v 1.41 2003/11/18 20:49:39 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -900,7 +900,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
||||||
HRGN ClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
|
HRGN ClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||||
NtGdiCombineRgn(ClipRgn, CopyRgn, NULL, RGN_COPY);
|
NtGdiCombineRgn(ClipRgn, CopyRgn, NULL, RGN_COPY);
|
||||||
Dc = NtUserGetDCEx(Wnd, ClipRgn, DCX_WINDOW | DCX_CACHE |
|
Dc = NtUserGetDCEx(Wnd, ClipRgn, DCX_WINDOW | DCX_CACHE |
|
||||||
DCX_KEEPCLIPRGN | DCX_INTERSECTRGN | DCX_CLIPSIBLINGS );
|
DCX_INTERSECTRGN | DCX_CLIPSIBLINGS );
|
||||||
NtGdiBitBlt(Dc, CopyRect.left, CopyRect.top, CopyRect.right - CopyRect.left,
|
NtGdiBitBlt(Dc, CopyRect.left, CopyRect.top, CopyRect.right - CopyRect.left,
|
||||||
CopyRect.bottom - CopyRect.top, Dc,
|
CopyRect.bottom - CopyRect.top, Dc,
|
||||||
CopyRect.left + (OldWindowRect.left - NewWindowRect.left),
|
CopyRect.left + (OldWindowRect.left - NewWindowRect.left),
|
||||||
|
@ -922,19 +922,17 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
||||||
RgnType = NtGdiCombineRgn(DirtyRgn, VisAfter, CopyRgn, RGN_DIFF);
|
RgnType = NtGdiCombineRgn(DirtyRgn, VisAfter, CopyRgn, RGN_DIFF);
|
||||||
if (ERROR != RgnType && NULLREGION != RgnType)
|
if (ERROR != RgnType && NULLREGION != RgnType)
|
||||||
{
|
{
|
||||||
PaintRedrawWindow(Window, NULL, DirtyRgn,
|
IntRedrawWindow(Window, NULL, DirtyRgn,
|
||||||
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE |
|
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE |
|
||||||
RDW_ALLCHILDREN | RDW_ERASENOW,
|
RDW_ALLCHILDREN | RDW_ERASENOW);
|
||||||
RDW_EX_XYWINDOW | RDW_EX_USEHRGN);
|
|
||||||
}
|
}
|
||||||
NtGdiDeleteObject(DirtyRgn);
|
NtGdiDeleteObject(DirtyRgn);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PaintRedrawWindow(Window, NULL, NULL,
|
IntRedrawWindow(Window, NULL, NULL,
|
||||||
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE |
|
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE |
|
||||||
RDW_ALLCHILDREN | RDW_ERASENOW,
|
RDW_ALLCHILDREN | RDW_ERASENOW);
|
||||||
RDW_EX_XYWINDOW | RDW_EX_USEHRGN);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -999,18 +997,13 @@ WinPosShowWindow(HWND Wnd, INT Cmd)
|
||||||
{
|
{
|
||||||
BOOLEAN WasVisible;
|
BOOLEAN WasVisible;
|
||||||
PWINDOW_OBJECT Window;
|
PWINDOW_OBJECT Window;
|
||||||
NTSTATUS Status;
|
|
||||||
UINT Swp = 0;
|
UINT Swp = 0;
|
||||||
RECT NewPos;
|
RECT NewPos = {0, 0, 0, 0};
|
||||||
BOOLEAN ShowFlag;
|
BOOLEAN ShowFlag;
|
||||||
HRGN VisibleRgn;
|
/* HRGN VisibleRgn;*/
|
||||||
|
|
||||||
Status =
|
Window = IntGetWindowObject(Wnd);
|
||||||
ObmReferenceObjectByHandle(PsGetWin32Process()->WindowStation->HandleTable,
|
if (!Window)
|
||||||
Wnd,
|
|
||||||
otWindow,
|
|
||||||
(PVOID*)&Window);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -1101,60 +1094,50 @@ WinPosShowWindow(HWND Wnd, INT Cmd)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Window->Style & WS_CHILD &&
|
/* We can't activate a child window */
|
||||||
!IntIsWindowVisible(Window->Parent->Self) &&
|
if ((Window->Style & WS_CHILD) &&
|
||||||
(Swp & (SWP_NOSIZE | SWP_NOMOVE)) == (SWP_NOSIZE | SWP_NOMOVE))
|
!(Window->ExStyle & WS_EX_MDICHILD))
|
||||||
{
|
{
|
||||||
if (Cmd == SW_HIDE)
|
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
|
}
|
||||||
|
|
||||||
|
WinPosSetWindowPos(Wnd, HWND_TOP, NewPos.left, NewPos.top,
|
||||||
|
NewPos.right, NewPos.bottom, LOWORD(Swp));
|
||||||
|
|
||||||
|
if (Cmd == SW_HIDE)
|
||||||
|
{
|
||||||
|
/* FIXME: This will cause the window to be activated irrespective
|
||||||
|
* of whether it is owned by the same thread. Has to be done
|
||||||
|
* asynchronously.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Wnd == IntGetActiveWindow())
|
||||||
|
{
|
||||||
|
WinPosActivateOtherWindow(Window);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Revert focus to parent */
|
||||||
|
if (Wnd == IntGetFocusWindow() ||
|
||||||
|
IntIsChildWindow(Wnd, IntGetFocusWindow()))
|
||||||
{
|
{
|
||||||
VisibleRgn = VIS_ComputeVisibleRegion(PsGetWin32Thread()->Desktop, Window,
|
IntSetFocusWindow(Window->Parent->Self);
|
||||||
FALSE, FALSE, FALSE);
|
|
||||||
Window->Style &= ~WS_VISIBLE;
|
|
||||||
VIS_WindowLayoutChanged(PsGetWin32Thread()->Desktop, Window, VisibleRgn);
|
|
||||||
NtGdiDeleteObject(VisibleRgn);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Window->Style |= WS_VISIBLE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (!IntIsWindow(Wnd))
|
||||||
{
|
{
|
||||||
if (Window->Style & WS_CHILD &&
|
IntReleaseWindowObject(Window);
|
||||||
!(Window->ExStyle & WS_EX_MDICHILD))
|
return WasVisible;
|
||||||
{
|
}
|
||||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
else if (Window->Style & WS_MINIMIZE)
|
||||||
}
|
{
|
||||||
if (!(Swp & MINMAX_NOSWP))
|
WinPosShowIconTitle(Window, TRUE);
|
||||||
{
|
|
||||||
WinPosSetWindowPos(Wnd, HWND_TOP, NewPos.left, NewPos.top,
|
|
||||||
NewPos.right, NewPos.bottom, LOWORD(Swp));
|
|
||||||
if (Cmd == SW_HIDE)
|
|
||||||
{
|
|
||||||
/* Hide the window. */
|
|
||||||
if (Wnd == IntGetActiveWindow())
|
|
||||||
{
|
|
||||||
WinPosActivateOtherWindow(Window);
|
|
||||||
}
|
|
||||||
/* Revert focus to parent. */
|
|
||||||
if (Wnd == IntGetFocusWindow() ||
|
|
||||||
IntIsChildWindow(Wnd, IntGetFocusWindow()))
|
|
||||||
{
|
|
||||||
IntSetFocusWindow(Window->Parent->Self);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* FIXME: Check for window destruction. */
|
|
||||||
/* Show title for minimized windows. */
|
|
||||||
if (Window->Style & WS_MINIMIZE)
|
|
||||||
{
|
|
||||||
WinPosShowIconTitle(Window, TRUE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Window->Flags & WINDOWOBJECT_NEED_SIZE)
|
if (Window->Flags & WINDOWOBJECT_NEED_SIZE)
|
||||||
{
|
{
|
||||||
WPARAM wParam = SIZE_RESTORED;
|
/* should happen only in CreateWindowEx() */
|
||||||
|
int wParam = SIZE_RESTORED;
|
||||||
|
|
||||||
Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
|
Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
|
||||||
if (Window->Style & WS_MAXIMIZE)
|
if (Window->Style & WS_MAXIMIZE)
|
||||||
|
@ -1182,8 +1165,8 @@ WinPosShowWindow(HWND Wnd, INT Cmd)
|
||||||
WinPosChangeActiveWindow(Wnd, FALSE);
|
WinPosChangeActiveWindow(Wnd, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ObmDereferenceObject(Window);
|
IntReleaseWindowObject(Window);
|
||||||
return(WasVisible);
|
return WasVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL STATIC FASTCALL
|
BOOL STATIC FASTCALL
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: region.c,v 1.38 2003/11/08 22:54:26 navaraf Exp $ */
|
/* $Id: region.c,v 1.39 2003/11/18 20:49:39 navaraf Exp $ */
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -101,6 +101,33 @@ typedef struct _POINTBLOCK {
|
||||||
struct _POINTBLOCK *next;
|
struct _POINTBLOCK *next;
|
||||||
} POINTBLOCK;
|
} POINTBLOCK;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This function is left there for debugging purposes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
VOID FASTCALL
|
||||||
|
IntDumpRegion(HRGN hRgn)
|
||||||
|
{
|
||||||
|
ROSRGNDATA *Data;
|
||||||
|
|
||||||
|
Data = RGNDATA_LockRgn(hRgn);
|
||||||
|
if (Data == NULL)
|
||||||
|
{
|
||||||
|
DbgPrint("IntDumpRegion called with invalid region!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DbgPrint("IntDumpRegion(%x): %d,%d-%d,%d %d\n",
|
||||||
|
hRgn,
|
||||||
|
Data->rdh.rcBound.left,
|
||||||
|
Data->rdh.rcBound.top,
|
||||||
|
Data->rdh.rcBound.right,
|
||||||
|
Data->rdh.rcBound.bottom,
|
||||||
|
Data->rdh.iType);
|
||||||
|
|
||||||
|
RGNDATA_UnlockRgn(hRgn);
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL FASTCALL 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
|
if(dst != src) // don't want to copy to itself
|
||||||
|
|
Loading…
Reference in a new issue