Commit 172e731c authored by Alexandre Julliard's avatar Alexandre Julliard

Moved most files from the windows directory to dlls/user.

parent 3abb5bd6
......@@ -15,56 +15,56 @@ SPEC_SRCS16 = \
user.exe.spec
C_SRCS = \
$(TOPOBJDIR)/windows/class.c \
$(TOPOBJDIR)/windows/clipboard.c \
$(TOPOBJDIR)/windows/cursoricon.c \
$(TOPOBJDIR)/windows/defdlg.c \
$(TOPOBJDIR)/windows/defwnd.c \
$(TOPOBJDIR)/windows/dialog.c \
$(TOPOBJDIR)/windows/driver.c \
$(TOPOBJDIR)/windows/input.c \
$(TOPOBJDIR)/windows/mdi.c \
$(TOPOBJDIR)/windows/msgbox.c \
$(TOPOBJDIR)/windows/multimon.c \
$(TOPOBJDIR)/windows/nonclient.c \
$(TOPOBJDIR)/windows/queue.c \
$(TOPOBJDIR)/windows/scroll.c \
$(TOPOBJDIR)/windows/spy.c \
$(TOPOBJDIR)/windows/syscolor.c \
$(TOPOBJDIR)/windows/user.c \
$(TOPOBJDIR)/windows/win.c \
$(TOPOBJDIR)/windows/winhelp.c \
$(TOPOBJDIR)/windows/winpos.c \
$(TOPOBJDIR)/windows/winproc.c \
button.c \
caret.c \
class.c \
clipboard.c \
combo.c \
cursoricon.c \
dde/client.c \
dde/ddeml16.c \
dde/misc.c \
dde/server.c \
defdlg.c \
defwnd.c \
desktop.c \
dialog.c \
dialog16.c \
edit.c \
exticon.c \
focus.c \
hook.c \
icontitle.c \
input.c \
listbox.c \
lstr.c \
mdi.c \
menu.c \
message.c \
misc.c \
msg16.c \
msgbox.c \
nonclient.c \
painting.c \
property.c \
resource.c \
scroll.c \
spy.c \
static.c \
sysparams.c \
text.c \
uitools.c \
user_main.c \
win.c \
winhelp.c \
winpos.c \
winproc.c \
wsprintf.c
C_SRCS16 = \
......
......@@ -57,7 +57,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
#define CF_REGFORMATBASE 0xC000
#define CF_REGFORMATBASE 0xC000
typedef struct
{
......@@ -322,20 +322,20 @@ BOOL WINAPI CloseClipboard(void)
if (CLIPBOARD_CloseClipboard())
{
if (bCBHasChanged)
{
if (bCBHasChanged)
{
HWND hWndViewer = GetClipboardViewer();
if (USER_Driver.pEndClipboardUpdate)
USER_Driver.pEndClipboardUpdate();
if (hWndViewer)
SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, 0, 0);
if (hWndViewer)
SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, 0, 0);
bCBHasChanged = FALSE;
}
bRet = TRUE;
bRet = TRUE;
}
return bRet;
......@@ -349,19 +349,19 @@ BOOL WINAPI CloseClipboard(void)
BOOL WINAPI EmptyClipboard(void)
{
CLIPBOARDINFO cbinfo;
TRACE("()\n");
if (!CLIPBOARD_GetClipboardInfo(&cbinfo) ||
~cbinfo.flags & CB_OPEN)
{
{
WARN("Clipboard not opened by calling task!\n");
SetLastError(ERROR_CLIPBOARD_NOT_OPEN);
return FALSE;
}
/* Destroy private objects */
if (cbinfo.hWndOwner)
if (cbinfo.hWndOwner)
SendMessageW(cbinfo.hWndOwner, WM_DESTROYCLIPBOARD, 0, 0);
/* Tell the driver to acquire the selection. The current owner
......@@ -369,22 +369,22 @@ BOOL WINAPI EmptyClipboard(void)
/* Assign ownership of the clipboard to the current client. We do
* this before acquiring the selection so that when we do acquire the
* selection and the selection loser gets notified, it can check if
* selection and the selection loser gets notified, it can check if
* it has lost the Wine clipboard ownership. If it did then it knows
* that a WM_DESTORYCLIPBOARD has already been sent. Otherwise it
* lost the selection to a X app and it should send the
* lost the selection to a X app and it should send the
* WM_DESTROYCLIPBOARD itself. */
CLIPBOARD_SetClipboardOwner(cbinfo.hWndOpen);
/* Acquire the selection. This will notify the previous owner
* to clear it's cache. */
if (USER_Driver.pAcquireClipboard)
* to clear it's cache. */
if (USER_Driver.pAcquireClipboard)
USER_Driver.pAcquireClipboard(cbinfo.hWndOpen);
/* Empty the local cache */
if (USER_Driver.pEmptyClipboard)
if (USER_Driver.pEmptyClipboard)
USER_Driver.pEmptyClipboard(FALSE);
bCBHasChanged = TRUE;
return TRUE;
......@@ -438,31 +438,31 @@ HWND WINAPI GetOpenClipboardWindow(void)
HWND WINAPI SetClipboardViewer( HWND hWnd )
{
HWND hwndPrev = 0;
SERVER_START_REQ( set_clipboard_info )
{
req->flags = SET_CB_VIEWER;
req->viewer = WIN_GetFullHandle(hWnd);
if (wine_server_call_err( req ))
{
{
ERR("Failed to set clipboard.\n");
}
else
}
else
{
hwndPrev = reply->old_viewer;
}
}
SERVER_END_REQ;
TRACE("(%p): returning %p\n", hWnd, hwndPrev);
return hwndPrev;
}
/**************************************************************************
* GetClipboardViewer (USER32.@)
* GetClipboardViewer (USER32.@)
*/
HWND WINAPI GetClipboardViewer(void)
{
......@@ -482,7 +482,7 @@ HWND WINAPI GetClipboardViewer(void)
/**************************************************************************
* ChangeClipboardChain (USER32.@)
* ChangeClipboardChain (USER32.@)
*/
BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
{
......@@ -491,13 +491,13 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
if (hWndViewer)
{
if (WIN_GetFullHandle(hWnd) == hWndViewer)
if (WIN_GetFullHandle(hWnd) == hWndViewer)
SetClipboardViewer(WIN_GetFullHandle(hWndNext));
else
else
bRet = !SendMessageW(hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext);
}
else
ERR("hWndViewer is lost\n");
ERR("hWndViewer is lost\n");
return bRet;
}
......
......@@ -236,7 +236,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
}
return 1;
}
case WM_NCDESTROY:
case WM_NCDESTROY:
if ((dlgInfo = (DIALOGINFO *)SetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO, 0 )))
{
/* Free dialog heap (if created) */
......@@ -249,21 +249,21 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
HeapFree( GetProcessHeap(), 0, dlgInfo );
}
/* Window clean-up */
return DefWindowProcA( hwnd, msg, wParam, lParam );
/* Window clean-up */
return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_SHOWWINDOW:
if (!wParam) DEFDLG_SaveFocus( hwnd );
return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_SHOWWINDOW:
if (!wParam) DEFDLG_SaveFocus( hwnd );
return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_ACTIVATE:
if (wParam) DEFDLG_RestoreFocus( hwnd );
else DEFDLG_SaveFocus( hwnd );
return 0;
case WM_ACTIVATE:
if (wParam) DEFDLG_RestoreFocus( hwnd );
else DEFDLG_SaveFocus( hwnd );
return 0;
case WM_SETFOCUS:
DEFDLG_RestoreFocus( hwnd );
return 0;
case WM_SETFOCUS:
DEFDLG_RestoreFocus( hwnd );
return 0;
case DM_SETDEFID:
if (dlgInfo && !(dlgInfo->flags & DF_END))
......@@ -279,9 +279,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
if ((hwndDefId = DEFDLG_FindDefButton( hwnd )))
return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID);
}
return 0;
return 0;
case WM_NEXTDLGCTL:
case WM_NEXTDLGCTL:
if (dlgInfo)
{
HWND hwndDest = (HWND)wParam;
......@@ -304,9 +304,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
SendMessageA( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 );
}
}
return DefWindowProcA( hwnd, msg, wParam, lParam );
return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_GETFONT:
case WM_GETFONT:
return dlgInfo ? (LRESULT)dlgInfo->hUserFont : 0;
case WM_CLOSE:
......@@ -315,7 +315,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
return 0;
case WM_NOTIFYFORMAT:
return DefWindowProcA( hwnd, msg, wParam, lParam );
return DefWindowProcA( hwnd, msg, wParam, lParam );
}
return 0;
}
......@@ -328,7 +328,7 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult)
/* see SDK 3.1 */
if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) ||
msg == WM_CTLCOLOR || msg == WM_COMPAREITEM ||
msg == WM_CTLCOLOR || msg == WM_COMPAREITEM ||
msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM ||
msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
return fResult;
......@@ -375,7 +375,7 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
}
/***********************************************************************
* DefDlgProc (USER.308)
* DefDlgProc (USER.308)
*/
LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
LPARAM lParam )
......@@ -434,7 +434,7 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
/***********************************************************************
* DefDlgProcA (USER32.@)
* DefDlgProcA (USER32.@)
*/
LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
......@@ -491,7 +491,7 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
/***********************************************************************
* DefDlgProcW (USER32.@)
* DefDlgProcW (USER32.@)
*/
LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
......
......@@ -245,11 +245,11 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
if (GET_WORD(p) == 0xffff) /* Is it an integer id? */
{
info->windowName = (LPCWSTR)(UINT)GET_WORD(p + 1);
p += 2;
p += 2;
}
else
{
info->windowName = (LPCWSTR)p;
info->windowName = (LPCWSTR)p;
p += strlenW( info->windowName ) + 1;
}
......@@ -419,7 +419,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
case 0xffff:
result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 );
p += 2;
TRACE(" MENU %04x\n", LOWORD(result->menuName) );
TRACE(" MENU %04x\n", LOWORD(result->menuName) );
break;
default:
result->menuName = (LPCWSTR)p;
......@@ -439,7 +439,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
case 0xffff:
result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 );
p += 2;
TRACE(" CLASS %04x\n", LOWORD(result->className) );
TRACE(" CLASS %04x\n", LOWORD(result->className) );
break;
default:
result->className = (LPCWSTR)p;
......@@ -458,7 +458,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
if (result->style & DS_SETFONT)
{
result->pointSize = GET_WORD(p);
result->pointSize = GET_WORD(p);
p++;
if (result->dialogEx)
{
......@@ -470,9 +470,9 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
result->weight = FW_DONTCARE;
result->italic = FALSE;
}
result->faceName = (LPCWSTR)p;
result->faceName = (LPCWSTR)p;
p += strlenW( result->faceName ) + 1;
TRACE(" FONT %d, %s, %d, %s\n",
TRACE(" FONT %d, %s, %d, %s\n",
result->pointSize, debugstr_w( result->faceName ),
result->weight, result->italic ? "TRUE" : "FALSE" );
}
......@@ -523,8 +523,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
* for both +ve and -ve template.pointSize */
HDC dc;
int pixels;
dc = GetDC(0);
pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72);
dc = GetDC(0);
pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72);
hUserFont = CreateFontW( -pixels, 0, 0, 0, template.weight,
template.italic, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
PROOF_QUALITY, FF_DONTCARE,
......@@ -634,9 +634,9 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
if (hUserFont) DeleteObject( hUserFont );
if (hMenu) DestroyMenu( hMenu );
if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner);
return 0;
return 0;
}
/* moved this from the top of the method to here as DIALOGINFO structure
will be valid only after WM_CREATE message has been handled in DefDlgProc
All the members of the structure get filled here using temp variables */
......@@ -649,7 +649,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
dlgInfo->idResult = 0;
dlgInfo->flags = flags;
dlgInfo->hDialogHeap = 0;
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
if (unicode) SetWindowLongPtrW( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
......@@ -673,11 +673,11 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
SetFocus( dlgInfo->hwndFocus );
}
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
{
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
}
return hwnd;
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
{
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
}
return hwnd;
}
if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
if( IsWindow(hwnd) ) DestroyWindow( hwnd );
......@@ -992,21 +992,21 @@ static HWND DIALOG_FindMsgDestination( HWND hwndDlg )
{
while (GetWindowLongA(hwndDlg, GWL_STYLE) & DS_CONTROL)
{
WND *pParent;
HWND hParent = GetParent(hwndDlg);
if (!hParent) break;
WND *pParent;
HWND hParent = GetParent(hwndDlg);
if (!hParent) break;
pParent = WIN_GetPtr(hParent);
if (!pParent || pParent == WND_OTHER_PROCESS || pParent == WND_DESKTOP) break;
pParent = WIN_GetPtr(hParent);
if (!pParent || pParent == WND_OTHER_PROCESS || pParent == WND_DESKTOP) break;
if (!(pParent->flags & WIN_ISDIALOG))
{
WIN_ReleasePtr(pParent);
break;
}
WIN_ReleasePtr(pParent);
if (!(pParent->flags & WIN_ISDIALOG))
{
WIN_ReleasePtr(pParent);
break;
}
WIN_ReleasePtr(pParent);
hwndDlg = hParent;
hwndDlg = hParent;
}
return hwndDlg;
......@@ -1623,12 +1623,12 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B
{
HWND hParent = GetParent(hwndCtrl);
while(hParent)
{
{
if(hParent == hwndMain) break;
retWnd = DIALOG_GetNextTabItem(hwndMain,GetParent(hParent),hParent,fPrevious );
if(retWnd) break;
hParent = GetParent(hParent);
}
}
if(!retWnd)
retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,NULL,fPrevious );
}
......
......@@ -496,17 +496,19 @@ UINT WINAPI GetKeyboardLayoutList(INT nBuff, HKL *layouts)
/***********************************************************************
* RegisterHotKey (USER32.@)
*/
BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) {
FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk);
return TRUE;
BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk)
{
FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk);
return TRUE;
}
/***********************************************************************
* UnregisterHotKey (USER32.@)
*/
BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) {
FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id);
return TRUE;
BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id)
{
FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id);
return TRUE;
}
/***********************************************************************
......@@ -639,9 +641,9 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id
/* has the mouse hovered long enough? */
if(TrackingList[i].iHoverTime <= TrackingList[i].tme.dwHoverTime)
{
posClient.x = pos.x;
posClient.y = pos.y;
ScreenToClient(hwnd, &posClient);
posClient.x = pos.x;
posClient.y = pos.y;
ScreenToClient(hwnd, &posClient);
if (nonclient) {
PostMessageW(TrackingList[i].tme.hwndTrack, WM_NCMOUSEHOVER,
get_key_state(), MAKELPARAM( posClient.x, posClient.y ));
......
......@@ -752,16 +752,16 @@ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw)
}
else
{
/* neither x nor cx are default. Check the y values .
* In the trace we see Outlook and Outlook Express using
* cy set to CW_USEDEFAULT when opening the address book.
*/
if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) {
RECT r;
FIXME("Strange use of CW_USEDEFAULT in nHeight\n");
SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0);
cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y;
}
/* neither x nor cx are default. Check the y values .
* In the trace we see Outlook and Outlook Express using
* cy set to CW_USEDEFAULT when opening the address book.
*/
if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) {
RECT r;
FIXME("Strange use of CW_USEDEFAULT in nHeight\n");
SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0);
cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y;
}
}
}
......@@ -1133,7 +1133,7 @@ HWND16 WINAPI CreateWindow16( LPCSTR className, LPCSTR windowName,
HINSTANCE16 instance, LPVOID data )
{
return CreateWindowEx16( 0, className, windowName, style,
x, y, width, height, parent, menu, instance, data );
x, y, width, height, parent, menu, instance, data );
}
......@@ -2990,26 +2990,26 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
while(1)
{
while (PeekMessageW( &msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE ))
while (PeekMessageW( &msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE ))
{
if( msg.message == WM_LBUTTONUP )
{
ReleaseCapture();
return 0;
{
ReleaseCapture();
return 0;
}
if( msg.message == WM_MOUSEMOVE )
{
{
POINT tmp;
tmp.x = LOWORD(msg.lParam);
tmp.y = HIWORD(msg.lParam);
if( !PtInRect( &rect, tmp ))
if( !PtInRect( &rect, tmp ))
{
ReleaseCapture();
return 1;
ReleaseCapture();
return 1;
}
}
}
}
WaitMessage();
WaitMessage();
}
return 0;
}
......
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