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 = \
resource.c \
text.c \
user_main.c \
wnd16.c \
wsprintf.c
C_SRCS16 = \
bidi16.c \
network.c \
user16.c
user16.c \
wnd16.c
RC_SRCS = resources/user32.rc
......
......@@ -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 );
return 0;
}
if (wndPtr == WND_OTHER_PROCESS)
{
if (IsWindow16( msg->hwnd ))
ERR( "cannot dispatch msg to other process window %x\n", msg->hwnd );
if (IsWindow( hwnd ))
ERR( "cannot dispatch msg to other process window %x\n", hwnd );
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
......@@ -313,7 +313,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
WIN_ReleasePtr( wndPtr );
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 */
RedrawWindow( hwnd, NULL, 0,
RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
......
......@@ -333,7 +333,7 @@ BOOL16 WINAPI IsWindow16( HWND16 hwnd )
{
CURRENT_STACK16->es = USER_HeapSel;
/* 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,
}
/***********************************************************************
* 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)
*/
......
......@@ -1064,7 +1064,6 @@ LRESULT WINAPI DefHookProc16( INT16 code, WPARAM16 wParam, LPARAM lParam,
*/
BOOL16 WINAPI CallMsgFilter16( SEGPTR msg, INT16 code )
{
if (GetSysModalWindow16()) return FALSE;
if (HOOK_CallHooks16( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE;
return HOOK_CallHooks16( WH_MSGFILTER, code, 0, (LPARAM)msg );
}
......@@ -1120,7 +1119,6 @@ BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParam
*/
BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code )
{
if (GetSysModalWindow16()) return FALSE; /* ??? */
if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
return TRUE;
return HOOK_CallHooksA( WH_MSGFILTER, code, 0, (LPARAM)msg );
......@@ -1132,7 +1130,6 @@ BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code )
*/
BOOL WINAPI CallMsgFilterW( LPMSG msg, INT code )
{
if (GetSysModalWindow16()) return FALSE; /* ??? */
if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
return TRUE;
return HOOK_CallHooksW( WH_MSGFILTER, code, 0, (LPARAM)msg );
......
......@@ -26,8 +26,6 @@
#include "wingdi.h"
#include "winreg.h"
#include "wownt32.h"
#include "wine/winuser16.h"
#include "wine/winbase16.h"
#include "wine/unicode.h"
#include "win.h"
#include "wine/debug.h"
......@@ -2272,16 +2270,11 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
case SPY_SENDMESSAGE16:
case SPY_SENDMESSAGE:
{
char taskName[30];
HTASK16 hTask = GetWindowTask16( HWND_16(hWnd) );
char taskName[20];
DWORD tid = GetWindowThreadProcessId( hWnd, NULL );
if (hTask == GetCurrentTask()) strcpy( taskName, "self" );
else if (!hTask) strcpy( taskName, "Wine" );
else
{
sprintf( taskName, "task %04x ???", hTask );
GetModuleName16( hTask, taskName + 10, sizeof(taskName) - 10 );
}
if (tid == GetCurrentThreadId()) strcpy( taskName, "self" );
else sprintf( taskName, "tid %08lx", GetCurrentThreadId() );
if (iFlag == SPY_SENDMESSAGE16)
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 )
static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo )
{
BOOL16 wParam, bResult = 0;
POINT pt;
POINT pt, client_pt;
LPDRAGINFO16 ptrDragInfo = MapSL(spDragInfo);
RECT tempRect;
......@@ -3191,8 +3191,10 @@ static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo )
}
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);
bResult = SendMessage16( HWND_16(hQueryWnd), WM_QUERYDROPOBJECT, (WPARAM16)wParam, spDragInfo );
......
......@@ -29,7 +29,6 @@
#include "controls.h"
#include "user.h"
#include "win.h"
#include "hook.h"
#include "message.h"
#include "queue.h"
#include "winpos.h"
......@@ -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.@)
*/
UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
......
......@@ -209,7 +209,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
memset(&context, '\0', sizeof(context));
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.Eip = OFFSETOF(proc);
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