add co_ to some funcs
svn path=/trunk/; revision=17713
\r
HWND FASTCALL UserGetShellWindow();\r
\r
\r
HWND FASTCALL UserGetShellWindow();\r
\r
-HWND FASTCALL UserSetParent(HWND hWndChild, HWND hWndNewParent);\r
-\r
HWND FASTCALL UserGetWindow(HWND hWnd, UINT Relationship);\r
\r
HDC FASTCALL\r
HWND FASTCALL UserGetWindow(HWND hWnd, UINT Relationship);\r
\r
HDC FASTCALL\r
co_WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
INT cy, UINT flags);
BOOLEAN FASTCALL
co_WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
INT cy, UINT flags);
BOOLEAN FASTCALL
-co_WinPosShowWindow(HWND Wnd, INT Cmd);
+co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd);
USHORT FASTCALL
co_WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTests, POINT *WinPoint,
PWINDOW_OBJECT* Window);
USHORT FASTCALL
co_WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTests, POINT *WinPoint,
PWINDOW_OBJECT* Window);
{
IntUpdateSBInfo(Window, SB_CTL);
{
IntUpdateSBInfo(Window, SB_CTL);
- co_WinPosShowWindow(Window->hSelf, bShow ? SW_SHOW : SW_HIDE);
+ co_WinPosShowWindow(Window, bShow ? SW_SHOW : SW_HIDE);
}
PWINDOW_OBJECT FASTCALL
}
PWINDOW_OBJECT FASTCALL
-IntSetParent(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndNewParent)
+co_IntSetParent(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndNewParent)
{
PWINDOW_OBJECT WndOldParent, Sibling, InsertAfter;
HWND hWnd, hWndNewParent, hWndOldParent;
{
PWINDOW_OBJECT WndOldParent, Sibling, InsertAfter;
HWND hWnd, hWndNewParent, hWndOldParent;
* Windows hides the window first, then shows it again
* including the WM_SHOWWINDOW messages and all
*/
* Windows hides the window first, then shows it again
* including the WM_SHOWWINDOW messages and all
*/
- WasVisible = co_WinPosShowWindow(hWnd, SW_HIDE);
+ WasVisible = co_WinPosShowWindow(Wnd, SW_HIDE);
/* Validate that window and parent still exist */
if (!IntIsWindow(hWnd) || !IntIsWindow(hWndNewParent))
/* Validate that window and parent still exist */
if (!IntIsWindow(hWnd) || !IntIsWindow(hWndNewParent))
{
co_UserShowScrollBar(Window, SB_HORZ, TRUE);
}
{
co_UserShowScrollBar(Window, SB_HORZ, TRUE);
}
- UserDereferenceWindowObjectCo(Window);
if (dwStyle & WS_VISIBLE)
{
DPRINT("IntCreateWindow(): About to show window\n");
if (dwStyle & WS_VISIBLE)
{
DPRINT("IntCreateWindow(): About to show window\n");
- co_WinPosShowWindow(Window->hSelf, dwShowMode);
+ co_WinPosShowWindow(Window, dwShowMode);
+ //faxme: temp hack
+ UserDereferenceWindowObjectCo(Window);
+
DPRINT("IntCreateWindow(): = %X\n", Handle);
DPRINT("WindowObject->SystemMenu = 0x%x\n", Window->SystemMenu);
return((HWND)Handle);
DPRINT("IntCreateWindow(): = %X\n", Handle);
DPRINT("WindowObject->SystemMenu = 0x%x\n", Window->SystemMenu);
return((HWND)Handle);
if (Window == NULL)
{
return FALSE;
if (Window == NULL)
{
return FALSE;
/* Look whether the focus is within the tree of windows we will
* be destroying.
*/
/* Look whether the focus is within the tree of windows we will
* be destroying.
*/
- if (!co_WinPosShowWindow(Window->hSelf, SW_HIDE))
+ if (!co_WinPosShowWindow(Window, SW_HIDE))
{
if (UserGetActiveWindow() == Window->hSelf)
{
{
if (UserGetActiveWindow() == Window->hSelf)
{
-UserSetParent(HWND hWndChild, HWND hWndNewParent)
+co_UserSetParent(HWND hWndChild, HWND hWndNewParent)
{
PWINDOW_OBJECT Wnd = NULL, WndParent = NULL, WndOldParent;
HWND hWndOldParent = NULL;
{
PWINDOW_OBJECT Wnd = NULL, WndParent = NULL, WndOldParent;
HWND hWndOldParent = NULL;
- WndOldParent = IntSetParent(Wnd, WndParent);
+ WndOldParent = co_IntSetParent(Wnd, WndParent);
DPRINT("Enter NtUserSetParent\n");
UserEnterExclusive();
DPRINT("Enter NtUserSetParent\n");
UserEnterExclusive();
- RETURN( UserSetParent(hWndChild, hWndNewParent));
+ RETURN( co_UserSetParent(hWndChild, hWndNewParent));
CLEANUP:
DPRINT("Leave NtUserSetParent, ret=%i\n",_ret_);
CLEANUP:
DPRINT("Leave NtUserSetParent, ret=%i\n",_ret_);
-UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
+co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
{
PWINDOW_OBJECT Window, Parent;
PWINSTATION_OBJECT WindowStation;
{
PWINDOW_OBJECT Window, Parent;
PWINSTATION_OBJECT WindowStation;
if (Parent && (Parent->hSelf == IntGetDesktopWindow()))
OldValue = (LONG) IntSetOwner(Window->hSelf, (HWND) NewValue);
else
if (Parent && (Parent->hSelf == IntGetDesktopWindow()))
OldValue = (LONG) IntSetOwner(Window->hSelf, (HWND) NewValue);
else
- OldValue = (LONG) UserSetParent(Window->hSelf, (HWND) NewValue);
+ OldValue = (LONG) co_UserSetParent(Window->hSelf, (HWND) NewValue);
if(Parent)
IntReleaseWindowObject(Parent);
break;
if(Parent)
IntReleaseWindowObject(Parent);
break;
DPRINT("Enter NtUserSetWindowLong\n");
UserEnterExclusive();
DPRINT("Enter NtUserSetWindowLong\n");
UserEnterExclusive();
- RETURN( UserSetWindowLong(hWnd, Index, NewValue, Ansi));
+ RETURN( co_UserSetWindowLong(hWnd, Index, NewValue, Ansi));
CLEANUP:
DPRINT("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
CLEANUP:
DPRINT("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
case GWL_ID:
case GWL_HINSTANCE:
case GWL_HWNDPARENT:
case GWL_ID:
case GWL_HINSTANCE:
case GWL_HWNDPARENT:
- RETURN( UserSetWindowLong(hWnd, Index, (UINT)NewValue, TRUE));
+ RETURN( co_UserSetWindowLong(hWnd, Index, (UINT)NewValue, TRUE));
default:
if (Index < 0)
{
default:
if (Index < 0)
{
}
/* FIXME - change window status */
}
/* FIXME - change window status */
- co_WinPosShowWindow(Window->hSelf, Safepl.showCmd);
+ co_WinPosShowWindow(Window, Safepl.showCmd);
if (Window->InternalPos == NULL)
Window->InternalPos = ExAllocatePoolWithTag(PagedPool, sizeof(INTERNALPOS), TAG_WININTLIST);
if (Window->InternalPos == NULL)
Window->InternalPos = ExAllocatePoolWithTag(PagedPool, sizeof(INTERNALPOS), TAG_WININTLIST);
* @implemented
*/
BOOL STDCALL
* @implemented
*/
BOOL STDCALL
-NtUserShowWindow(HWND hWnd,
- LONG nCmdShow)
+NtUserShowWindow(HWND hWnd, LONG nCmdShow)
+ PWINDOW_OBJECT Window;
+ BOOL ret;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserShowWindow\n");
UserEnterExclusive();
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserShowWindow\n");
UserEnterExclusive();
-
- RETURN( co_WinPosShowWindow(hWnd, nCmdShow));
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ RETURN(FALSE);
+ }
+
+ UserReferenceWindowObjectCo(Window);
+ ret = co_WinPosShowWindow(Window, nCmdShow);
+ UserReferenceWindowObjectCo(Window);
+
+ RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserShowWindow, ret=%i\n",_ret_);
CLEANUP:
DPRINT("Leave NtUserShowWindow, ret=%i\n",_ret_);
-co_WinPosShowWindow(HWND Wnd, INT Cmd)
+co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
- PWINDOW_OBJECT Window;
- NTSTATUS Status;
UINT Swp = 0;
RECT NewPos;
BOOLEAN ShowFlag;
// HRGN VisibleRgn;
UINT Swp = 0;
RECT NewPos;
BOOLEAN ShowFlag;
// HRGN VisibleRgn;
- Status =
- ObmReferenceObjectByHandle(gHandleTable,
- Wnd,
- otWindow,
- (PVOID*)&Window);
- if (!NT_SUCCESS(Status))
- {
- return(FALSE);
- }
WasVisible = (Window->Style & WS_VISIBLE) != 0;
WasVisible = (Window->Style & WS_VISIBLE) != 0;
- ObmDereferenceObject(Window);
return(FALSE);
}
Swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
return(FALSE);
}
Swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
ShowFlag = (Cmd != SW_HIDE);
if (ShowFlag != WasVisible)
{
ShowFlag = (Cmd != SW_HIDE);
if (ShowFlag != WasVisible)
{
- co_IntSendMessage(Wnd, WM_SHOWWINDOW, ShowFlag, 0);
+ co_IntSendMessage(Window->hSelf, WM_SHOWWINDOW, ShowFlag, 0);
/*
* FIXME: Need to check the window wasn't destroyed during the
* window procedure.
*/
if (!(Window->Parent))
{
/*
* FIXME: Need to check the window wasn't destroyed during the
* window procedure.
*/
if (!(Window->Parent))
{
- co_IntShellHookNotify(HSHELL_WINDOWCREATED, (LPARAM)Wnd);
+ co_IntShellHookNotify(HSHELL_WINDOWCREATED, (LPARAM)Window->hSelf);
}
/* Revert focus to parent */
}
/* Revert focus to parent */
- if (Wnd == IntGetThreadFocusWindow() ||
- IntIsChildWindow(Wnd, IntGetThreadFocusWindow()))
+ if (Window->hSelf == IntGetThreadFocusWindow() ||
+ IntIsChildWindow(Window->hSelf, IntGetThreadFocusWindow()))
{
UserSetFocus(Window->Parent->hSelf);
}
if (!(Window->Parent))
{
{
UserSetFocus(Window->Parent->hSelf);
}
if (!(Window->Parent))
{
- co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Wnd);
+ co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->hSelf);
wParam = SIZE_MINIMIZED;
}
wParam = SIZE_MINIMIZED;
}
- co_IntSendMessage(Wnd, WM_SIZE, wParam,
+ co_IntSendMessage(Window->hSelf, WM_SIZE, wParam,
MAKELONG(Window->ClientRect.right -
Window->ClientRect.left,
Window->ClientRect.bottom -
Window->ClientRect.top));
MAKELONG(Window->ClientRect.right -
Window->ClientRect.left,
Window->ClientRect.bottom -
Window->ClientRect.top));
- co_IntSendMessage(Wnd, WM_MOVE, 0,
+ co_IntSendMessage(Window->hSelf, WM_MOVE, 0,
MAKELONG(Window->ClientRect.left,
Window->ClientRect.top));
IntEngWindowChanged(Window, WOC_RGN_CLIENT);
MAKELONG(Window->ClientRect.left,
Window->ClientRect.top));
IntEngWindowChanged(Window, WOC_RGN_CLIENT);
WinPosChangeActiveWindow(Wnd, FALSE);
}
*/
WinPosChangeActiveWindow(Wnd, FALSE);
}
*/
-
- ObmDereferenceObject(Window);
PWINDOW_OBJECT Current;
HWND *List, *phWnd;
PWINDOW_OBJECT Current;
HWND *List, *phWnd;
+ ASSERT_REFS(ScopeWin);
+
if ((List = IntWinListChildren(ScopeWin)))
{
for (phWnd = List; *phWnd; ++phWnd)
if ((List = IntWinListChildren(ScopeWin)))
{
for (phWnd = List; *phWnd; ++phWnd)