From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/button.c | 10 +-------- dlls/user32/class.c | 13 ----------- dlls/user32/clipboard.c | 18 +-------------- dlls/user32/combo.c | 8 ------- dlls/user32/cursoricon.c | 17 +++----------- dlls/user32/dde_client.c | 13 ++--------- dlls/user32/dde_misc.c | 11 +--------- dlls/user32/dde_private.h | 3 +++ dlls/user32/dde_server.c | 13 ++--------- dlls/user32/defdlg.c | 10 +-------- dlls/user32/defwnd.c | 9 -------- dlls/user32/dialog.c | 17 +++----------- dlls/user32/edit.c | 12 ++-------- dlls/user32/focus.c | 8 ------- dlls/user32/hook.c | 12 ---------- dlls/user32/icontitle.c | 10 +-------- dlls/user32/input.c | 17 -------------- dlls/user32/mdi.c | 15 ++----------- dlls/user32/message.c | 19 +++------------- dlls/user32/nonclient.c | 7 ------ dlls/user32/scroll.c | 8 +------ dlls/user32/user_main.c | 15 +++---------- dlls/user32/user_private.h | 21 ++++++++++++++++++ dlls/user32/win.c | 10 +-------- dlls/user32/win.h | 45 -------------------------------------- dlls/user32/winpos.c | 1 - dlls/user32/winproc.c | 11 +--------- 27 files changed, 52 insertions(+), 301 deletions(-) delete mode 100644 dlls/user32/win.h
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index afc0f53134a..2c661ffcce0 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -38,18 +38,10 @@ * - BN_UNPUSHED/BN_UNHILITE */
-#include <stdarg.h> -#include <string.h> -#include <stdlib.h> - #define OEMRESOURCE
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "controls.h" -#include "win.h" #include "user_private.h" +#include "controls.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(button); diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 4e55b3bcc33..0cfdf552a5d 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -19,21 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <assert.h> -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "win.h" #include "user_private.h" #include "controls.h" -#include "wine/server.h" -#include "wine/list.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(class); diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index 7e5a3e0b022..8ae20e53189 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -24,24 +24,8 @@ */
#include <assert.h> -#include <stdarg.h> -#include <stdlib.h> -#include <sys/types.h> -#include <fcntl.h> -#include <string.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" #include "user_private.h" -#include "win.h" - -#include "wine/list.h" +#include "winnls.h" #include "wine/server.h" #include "wine/debug.h"
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 31deadb2ba9..5ea61c607be 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -21,18 +21,10 @@ * - CB_SETTOPINDEX */
-#include <stdarg.h> -#include <string.h> - #define OEMRESOURCE
-#include "windef.h" -#include "winbase.h" -#include "ntuser.h" #include "user_private.h" -#include "win.h" #include "controls.h" -#include "winternl.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(combo); diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 3e83ada3ee5..0bfaca130d7 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -24,23 +24,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <assert.h> -#include <stdarg.h> -#include <string.h> -#include <stdlib.h> #include <png.h> +#include <stdlib.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winerror.h" -#include "winnls.h" -#include "wine/exception.h" -#include "wine/server.h" -#include "controls.h" -#include "win.h" #include "user_private.h" -#include "wine/list.h" +#include "controls.h" +#include "wine/exception.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(cursor); diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c index dae520bfeb3..bdfb19ea9c4 100644 --- a/dlls/user32/dde_client.c +++ b/dlls/user32/dde_client.c @@ -23,18 +23,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> -#include <string.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "dde.h" -#include "ddeml.h" -#include "win.h" -#include "wine/debug.h" +#include "user_private.h" #include "dde_private.h" +#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ddeml);
diff --git a/dlls/user32/dde_misc.c b/dlls/user32/dde_misc.c index 1751a5f481a..39b439976cd 100644 --- a/dlls/user32/dde_misc.c +++ b/dlls/user32/dde_misc.c @@ -23,16 +23,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "dde.h" -#include "ddeml.h" -#include "win.h" +#include "user_private.h" #include "dde_private.h" #include "wine/debug.h"
diff --git a/dlls/user32/dde_private.h b/dlls/user32/dde_private.h index 7e3d9769127..9766e6a9c42 100644 --- a/dlls/user32/dde_private.h +++ b/dlls/user32/dde_private.h @@ -25,6 +25,9 @@ #ifndef __WINE_DDEML_PRIVATE_H #define __WINE_DDEML_PRIVATE_H
+#include "dde.h" +#include "ddeml.h" + /* defined in atom.c file. */ #define MAX_ATOM_LEN 255 diff --git a/dlls/user32/dde_server.c b/dlls/user32/dde_server.c index 7f5dff5605c..ecc7fbaee34 100644 --- a/dlls/user32/dde_server.c +++ b/dlls/user32/dde_server.c @@ -23,19 +23,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> -#include <string.h> #include <wchar.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "dde.h" -#include "ddeml.h" -#include "win.h" -#include "wine/debug.h" +#include "user_private.h" #include "dde_private.h" +#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ddeml);
diff --git a/dlls/user32/defdlg.c b/dlls/user32/defdlg.c index 238951aa21c..88b64ee469c 100644 --- a/dlls/user32/defdlg.c +++ b/dlls/user32/defdlg.c @@ -18,16 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "controls.h" -#include "win.h" #include "user_private.h" -#include "wine/debug.h" +#include "controls.h"
/*********************************************************************** diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 34a4f294429..b4b42b86ae1 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -19,15 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <string.h> -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "imm.h" -#include "win.h" #include "user_private.h" #include "controls.h" #include "wine/debug.h" diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 9773f67df13..68c0d804ca7 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -18,22 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <ctype.h> -#include <errno.h> -#include <limits.h> #include <stdlib.h> -#include <stdarg.h> -#include <stdio.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "controls.h" -#include "win.h" +#include <limits.h> +#include <errno.h> #include "user_private.h" +#include "controls.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dialog); diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 49cf2751f0a..e48d63f2870 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -27,18 +27,10 @@ * */
-#include <stdarg.h> -#include <string.h> #include <stdlib.h> - -#include "windef.h" -#include "winbase.h" -#include "winnt.h" -#include "win.h" -#include "imm.h" -#include "usp10.h" -#include "controls.h" #include "user_private.h" +#include "controls.h" +#include "usp10.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(edit); diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c index bf80777ca97..2d15aa9c6e7 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c @@ -20,14 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "win.h" -#include "imm.h" #include "user_private.h" #include "wine/server.h"
diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index 4a905eb8e5e..cb4b20d6252 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -62,21 +62,9 @@ * WH_MOUSE_LL Implemented but should use SendMessage instead */
-#include <stdarg.h> -#include <assert.h> - -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" -#include "win.h" #include "user_private.h" -#include "wine/server.h" #include "wine/asm.h" #include "wine/debug.h" -#include "winternl.h"
WINE_DEFAULT_DEBUG_CHANNEL(hook); WINE_DECLARE_DEBUG_CHANNEL(relay); diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index 718da3006e2..cce3f45250f 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -18,16 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> -#include <stdio.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" +#include "user_private.h" #include "controls.h" -#include "win.h"
static BOOL bMultiLineTitle; static HFONT hIconTitleFont; diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 106f890da7a..aa03a46a900 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -24,25 +24,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include <ctype.h> -#include <assert.h> - #define NONAMELESSUNION
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "winternl.h" -#include "winerror.h" -#include "win.h" #include "user_private.h" #include "dbt.h" #include "wine/server.h" diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index be567e6024d..ce608b3ba9f 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -80,23 +80,12 @@ * */
-#include <stdlib.h> -#include <stdarg.h> -#include <stdio.h> -#include <string.h> -#include <math.h> - #define OEMRESOURCE
-#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wingdi.h" -#include "winuser.h" +#include <math.h> +#include "user_private.h" #include "wownt32.h" -#include "win.h" #include "controls.h" -#include "user_private.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mdi); diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 7be93d94e39..744aa8cb9bd 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -19,28 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <assert.h> -#include <stdarg.h> - #define NONAMELESSUNION #define NONAMELESSSTRUCT + #include "ntstatus.h" #define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" -#include "winnls.h" -#include "dbt.h" -#include "dde.h" -#include "imm.h" -#include "hidusage.h" -#include "ddk/imm.h" -#include "wine/server.h" #include "user_private.h" -#include "win.h" #include "controls.h" +#include "dde.h" +#include "wine/server.h" #include "wine/debug.h" #include "wine/exception.h"
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 095bcb3e24d..a6b72f74997 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -18,13 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "win.h" #include "user_private.h" #include "controls.h" #include "wine/debug.h" diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 976f88ea7dd..788b5091698 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -19,15 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" +#include "user_private.h" #include "controls.h" -#include "win.h" #include "wine/debug.h" -#include "user_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(scroll);
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index f16f8e04464..bb728907b01 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -18,21 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdarg.h> -#include <stdio.h> -#include <string.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" +#include "user_private.h" +#include "controls.h" #include "imm.h" #include "ddk/imm.h" - -#include "controls.h" -#include "user_private.h" -#include "win.h" #include "wine/debug.h" -#include "wine/exception.h" +
WINE_DEFAULT_DEBUG_CHANNEL(graphics); WINE_DECLARE_DEBUG_CHANNEL(message); diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index a67c22cdc39..f4169ebb642 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -27,6 +27,7 @@ #include "wingdi.h" #include "ntuser.h" #include "winreg.h" +#include "winnls.h" #include "wine/heap.h"
#define GET_WORD(ptr) (*(const WORD *)(ptr)) @@ -162,4 +163,24 @@ void WINAPI USER_ScrollBarDraw(HWND, HDC, INT, enum SCROLL_HITTEST, INT, INT, INT, BOOL) DECLSPEC_HIDDEN; struct scroll_info *SCROLL_GetInternalInfo( HWND hwnd, INT nBar, BOOL alloc );
+/* Window functions */ +BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; +HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN; +HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN; +HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN; +ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) DECLSPEC_HIDDEN; +HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode ) DECLSPEC_HIDDEN; +HWND *WIN_ListChildren( HWND hwnd ) DECLSPEC_HIDDEN; +void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id ) DECLSPEC_HIDDEN; +HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags, BOOL inherit, + ACCESS_MASK access ) DECLSPEC_HIDDEN; + +static inline void mirror_rect( const RECT *window_rect, RECT *rect ) +{ + int width = window_rect->right - window_rect->left; + int tmp = rect->left; + rect->left = width - rect->right; + rect->right = width - tmp; +} + #endif /* __WINE_USER_PRIVATE_H */ diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 6b40f25dd46..0605f94abe1 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -18,19 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <assert.h> -#include <stdlib.h> -#include <string.h> -#include <limits.h> - #include "user_private.h" -#include "winnls.h" +#include "controls.h" #include "winver.h" #include "wine/server.h" #include "wine/asm.h" -#include "win.h" -#include "controls.h" -#include "winerror.h" #include "wine/exception.h" #include "wine/debug.h"
diff --git a/dlls/user32/win.h b/dlls/user32/win.h deleted file mode 100644 index 18774928354..00000000000 --- a/dlls/user32/win.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Window definitions - * - * Copyright 1993 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __WINE_WIN_H -#define __WINE_WIN_H - -#include "user_private.h" - - /* Window functions */ -extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; -extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN; -extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN; -extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN; -extern ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) DECLSPEC_HIDDEN; -extern HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode ) DECLSPEC_HIDDEN; -extern HWND *WIN_ListChildren( HWND hwnd ) DECLSPEC_HIDDEN; -extern void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id ) DECLSPEC_HIDDEN; -extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags, BOOL inherit, ACCESS_MASK access ) DECLSPEC_HIDDEN; - -static inline void mirror_rect( const RECT *window_rect, RECT *rect ) -{ - int width = window_rect->right - window_rect->left; - int tmp = rect->left; - rect->left = width - rect->right; - rect->right = width - tmp; -} - -#endif /* __WINE_WIN_H */ diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 97a2228d00c..cee549d1ea9 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -20,7 +20,6 @@ */
#include "user_private.h" -#include "win.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(win); diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index deae1a061f8..2ca802e647a 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -19,18 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <assert.h> -#include <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wingdi.h" +#include "user_private.h" #include "controls.h" -#include "win.h" #include "dbt.h" -#include "user_private.h" #include "wine/asm.h" #include "wine/debug.h"