Commit 48f860cb authored by Alexandre Julliard's avatar Alexandre Julliard

Moved a few remaining 16-bit window functions to wnd16.c and moved it

to the C_SRCS16 sources.
parent ec7155b6
...@@ -73,13 +73,13 @@ C_SRCS = \ ...@@ -73,13 +73,13 @@ C_SRCS = \
resource.c \ resource.c \
text.c \ text.c \
user_main.c \ user_main.c \
wnd16.c \
wsprintf.c wsprintf.c
C_SRCS16 = \ C_SRCS16 = \
bidi16.c \ bidi16.c \
network.c \ network.c \
user16.c user16.c \
wnd16.c
RC_SRCS = resources/user32.rc RC_SRCS = resources/user32.rc
......
...@@ -280,15 +280,15 @@ LONG WINAPI DispatchMessage16( const MSG16* msg ) ...@@ -280,15 +280,15 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
} }
} }
if (!(wndPtr = WIN_GetPtr( HWND_32(msg->hwnd) ))) if (!(wndPtr = WIN_GetPtr( hwnd )))
{ {
if (msg->hwnd) SetLastError( ERROR_INVALID_WINDOW_HANDLE ); if (msg->hwnd) SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0; return 0;
} }
if (wndPtr == WND_OTHER_PROCESS) if (wndPtr == WND_OTHER_PROCESS)
{ {
if (IsWindow16( msg->hwnd )) if (IsWindow( hwnd ))
ERR( "cannot dispatch msg to other process window %x\n", msg->hwnd ); ERR( "cannot dispatch msg to other process window %x\n", hwnd );
SetLastError( ERROR_INVALID_WINDOW_HANDLE ); SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0; return 0;
} }
...@@ -313,7 +313,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg ) ...@@ -313,7 +313,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
WIN_ReleasePtr( wndPtr ); WIN_ReleasePtr( wndPtr );
if (validate) if (validate)
{ {
ERR( "BeginPaint not called on WM_PAINT for hwnd %04x!\n", msg->hwnd ); ERR( "BeginPaint not called on WM_PAINT for hwnd %x!\n", hwnd );
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
RedrawWindow( hwnd, NULL, 0, RedrawWindow( hwnd, NULL, 0,
RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT ); RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
......
...@@ -333,7 +333,7 @@ BOOL16 WINAPI IsWindow16( HWND16 hwnd ) ...@@ -333,7 +333,7 @@ BOOL16 WINAPI IsWindow16( HWND16 hwnd )
{ {
CURRENT_STACK16->es = USER_HeapSel; CURRENT_STACK16->es = USER_HeapSel;
/* don't use WIN_Handle32 here, we don't care about the full handle */ /* don't use WIN_Handle32 here, we don't care about the full handle */
return IsWindow( WIN_Handle32(hwnd) ); return IsWindow( HWND_32(hwnd) );
} }
...@@ -1494,6 +1494,20 @@ BOOL16 WINAPI DrawAnimatedRects16( HWND16 hwnd, INT16 idAni, ...@@ -1494,6 +1494,20 @@ BOOL16 WINAPI DrawAnimatedRects16( HWND16 hwnd, INT16 idAni,
} }
/***********************************************************************
* GetInternalWindowPos (USER.460)
*/
UINT16 WINAPI GetInternalWindowPos16( HWND16 hwnd, LPRECT16 rectWnd, LPPOINT16 ptIcon )
{
WINDOWPLACEMENT16 wndpl;
if (!GetWindowPlacement16( hwnd, &wndpl )) return 0;
if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
if (ptIcon) *ptIcon = wndpl.ptMinPosition;
return wndpl.showCmd;
}
/************************************************************************** /**************************************************************************
* SetInternalWindowPos (USER.461) * SetInternalWindowPos (USER.461)
*/ */
......
...@@ -1064,7 +1064,6 @@ LRESULT WINAPI DefHookProc16( INT16 code, WPARAM16 wParam, LPARAM lParam, ...@@ -1064,7 +1064,6 @@ LRESULT WINAPI DefHookProc16( INT16 code, WPARAM16 wParam, LPARAM lParam,
*/ */
BOOL16 WINAPI CallMsgFilter16( SEGPTR msg, INT16 code ) BOOL16 WINAPI CallMsgFilter16( SEGPTR msg, INT16 code )
{ {
if (GetSysModalWindow16()) return FALSE;
if (HOOK_CallHooks16( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE; if (HOOK_CallHooks16( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE;
return HOOK_CallHooks16( WH_MSGFILTER, code, 0, (LPARAM)msg ); return HOOK_CallHooks16( WH_MSGFILTER, code, 0, (LPARAM)msg );
} }
...@@ -1120,7 +1119,6 @@ BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParam ...@@ -1120,7 +1119,6 @@ BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParam
*/ */
BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code ) BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code )
{ {
if (GetSysModalWindow16()) return FALSE; /* ??? */
if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
return TRUE; return TRUE;
return HOOK_CallHooksA( WH_MSGFILTER, code, 0, (LPARAM)msg ); return HOOK_CallHooksA( WH_MSGFILTER, code, 0, (LPARAM)msg );
...@@ -1132,7 +1130,6 @@ BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code ) ...@@ -1132,7 +1130,6 @@ BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code )
*/ */
BOOL WINAPI CallMsgFilterW( LPMSG msg, INT code ) BOOL WINAPI CallMsgFilterW( LPMSG msg, INT code )
{ {
if (GetSysModalWindow16()) return FALSE; /* ??? */
if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
return TRUE; return TRUE;
return HOOK_CallHooksW( WH_MSGFILTER, code, 0, (LPARAM)msg ); return HOOK_CallHooksW( WH_MSGFILTER, code, 0, (LPARAM)msg );
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include "wingdi.h" #include "wingdi.h"
#include "winreg.h" #include "winreg.h"
#include "wownt32.h" #include "wownt32.h"
#include "wine/winuser16.h"
#include "wine/winbase16.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "win.h" #include "win.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -2272,16 +2270,11 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, ...@@ -2272,16 +2270,11 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
case SPY_SENDMESSAGE16: case SPY_SENDMESSAGE16:
case SPY_SENDMESSAGE: case SPY_SENDMESSAGE:
{ {
char taskName[30]; char taskName[20];
HTASK16 hTask = GetWindowTask16( HWND_16(hWnd) ); DWORD tid = GetWindowThreadProcessId( hWnd, NULL );
if (hTask == GetCurrentTask()) strcpy( taskName, "self" ); if (tid == GetCurrentThreadId()) strcpy( taskName, "self" );
else if (!hTask) strcpy( taskName, "Wine" ); else sprintf( taskName, "tid %08lx", GetCurrentThreadId() );
else
{
sprintf( taskName, "task %04x ???", hTask );
GetModuleName16( hTask, taskName + 10, sizeof(taskName) - 10 );
}
if (iFlag == SPY_SENDMESSAGE16) if (iFlag == SPY_SENDMESSAGE16)
TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx\n", TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx\n",
......
...@@ -3144,7 +3144,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id ) ...@@ -3144,7 +3144,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id )
static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo ) static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo )
{ {
BOOL16 wParam, bResult = 0; BOOL16 wParam, bResult = 0;
POINT pt; POINT pt, client_pt;
LPDRAGINFO16 ptrDragInfo = MapSL(spDragInfo); LPDRAGINFO16 ptrDragInfo = MapSL(spDragInfo);
RECT tempRect; RECT tempRect;
...@@ -3191,8 +3191,10 @@ static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo ) ...@@ -3191,8 +3191,10 @@ static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo )
} }
else wParam = 1; else wParam = 1;
ScreenToClient16(HWND_16(hQueryWnd),&ptrDragInfo->pt); client_pt = pt;
ScreenToClient( hQueryWnd, &client_pt );
ptrDragInfo->pt.x = client_pt.x;
ptrDragInfo->pt.y = client_pt.y;
ptrDragInfo->hScope = HWND_16(hQueryWnd); ptrDragInfo->hScope = HWND_16(hQueryWnd);
bResult = SendMessage16( HWND_16(hQueryWnd), WM_QUERYDROPOBJECT, (WPARAM16)wParam, spDragInfo ); bResult = SendMessage16( HWND_16(hQueryWnd), WM_QUERYDROPOBJECT, (WPARAM16)wParam, spDragInfo );
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "controls.h" #include "controls.h"
#include "user.h" #include "user.h"
#include "win.h" #include "win.h"
#include "hook.h"
#include "message.h" #include "message.h"
#include "queue.h" #include "queue.h"
#include "winpos.h" #include "winpos.h"
...@@ -856,23 +855,6 @@ BOOL WINAPI ShowWindow( HWND hwnd, INT cmd ) ...@@ -856,23 +855,6 @@ BOOL WINAPI ShowWindow( HWND hwnd, INT cmd )
/*********************************************************************** /***********************************************************************
* GetInternalWindowPos (USER.460)
*/
UINT16 WINAPI GetInternalWindowPos16( HWND16 hwnd, LPRECT16 rectWnd,
LPPOINT16 ptIcon )
{
WINDOWPLACEMENT16 wndpl;
if (GetWindowPlacement16( hwnd, &wndpl ))
{
if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
if (ptIcon) *ptIcon = wndpl.ptMinPosition;
return wndpl.showCmd;
}
return 0;
}
/***********************************************************************
* GetInternalWindowPos (USER32.@) * GetInternalWindowPos (USER32.@)
*/ */
UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd, UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
......
...@@ -209,7 +209,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, ...@@ -209,7 +209,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
memset(&context, '\0', sizeof(context)); memset(&context, '\0', sizeof(context));
context.SegDs = context.SegEs = SELECTOROF(teb->cur_stack); context.SegDs = context.SegEs = SELECTOROF(teb->cur_stack);
if (!(context.Eax = GetWindowWord16( hwnd, GWL_HINSTANCE ))) context.Eax = context.SegDs; if (!(context.Eax = GetWindowWord( HWND_32(hwnd), GWL_HINSTANCE ))) context.Eax = context.SegDs;
context.SegCs = SELECTOROF(proc); context.SegCs = SELECTOROF(proc);
context.Eip = OFFSETOF(proc); context.Eip = OFFSETOF(proc);
context.Ebp = OFFSETOF(teb->cur_stack) context.Ebp = OFFSETOF(teb->cur_stack)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment