Jacek Caban : user32: Don't include ntuser_private.h.
Alexandre Julliard
julliard at winehq.org
Mon Aug 8 15:17:51 CDT 2022
Module: wine
Branch: master
Commit: 1e640b5e7f91dddf483501b67896fa344e8cc572
URL: https://gitlab.winehq.org/wine/wine/-/commit/1e640b5e7f91dddf483501b67896fa344e8cc572
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jul 29 21:41:44 2022 +0200
user32: Don't include ntuser_private.h.
---
dlls/user32/controls.h | 3 +--
dlls/user32/dialog.c | 2 ++
dlls/user32/user_private.h | 14 +-------------
dlls/user32/win.c | 7 +++++++
dlls/user32/win.h | 7 -------
dlls/win32u/ntuser_private.h | 10 ----------
include/ntuser.h | 10 ++++++++++
7 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index 66c2d1af2da..613de0af6c2 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -21,8 +21,7 @@
#ifndef __WINE_CONTROLS_H
#define __WINE_CONTROLS_H
-#include "winuser.h"
-#include "../win32u/ntuser_private.h"
+#include "ntuser.h"
extern LRESULT WINAPI ImeWndProcA(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
extern LRESULT WINAPI ImeWndProcW(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
index 00d315f9ff7..c8d1596a01b 100644
--- a/dlls/user32/dialog.c
+++ b/dlls/user32/dialog.c
@@ -39,6 +39,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(dialog);
+#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
+
/* Dialog control information */
typedef struct
{
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 77a5ba54929..06a358376a8 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -25,21 +25,14 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
-#include "../win32u/ntuser_private.h"
+#include "ntuser.h"
#include "winreg.h"
-#include "winternl.h"
-#include "hidusage.h"
#include "wine/heap.h"
#define GET_WORD(ptr) (*(const WORD *)(ptr))
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
#define GET_LONG(ptr) (*(const LONG *)(ptr))
-#define WINE_MOUSE_HANDLE ((HANDLE)1)
-#define WINE_KEYBOARD_HANDLE ((HANDLE)2)
-
-struct received_message_info;
-
/* data to store state for A/W mappings of WM_CHAR */
struct wm_char_mapping_data
{
@@ -47,11 +40,6 @@ struct wm_char_mapping_data
MSG get_msg;
};
-static inline struct user_thread_info *get_user_thread_info(void)
-{
- return (struct user_thread_info *)NtCurrentTeb()->Win32ClientInfo;
-}
-
extern HMODULE user32_module DECLSPEC_HIDDEN;
extern BOOL post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD dest_tid,
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 8ba4b6ea69e..fa2ae2e9da4 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -121,6 +121,13 @@ BOOL is_desktop_window( HWND hwnd )
}
+/* check if hwnd is a broadcast magic handle */
+static inline BOOL is_broadcast( HWND hwnd )
+{
+ return hwnd == HWND_BROADCAST || hwnd == HWND_TOPMOST;
+}
+
+
/***********************************************************************
* WIN_IsCurrentProcess
*
diff --git a/dlls/user32/win.h b/dlls/user32/win.h
index 5107a606414..ffd4f37d5f0 100644
--- a/dlls/user32/win.h
+++ b/dlls/user32/win.h
@@ -21,14 +21,7 @@
#ifndef __WINE_WIN_H
#define __WINE_WIN_H
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winuser.h>
-
#include "user_private.h"
-#include "wine/server_protocol.h"
/* Window functions */
extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h
index 0f25ede6b2b..3b74a2ae83a 100644
--- a/dlls/win32u/ntuser_private.h
+++ b/dlls/win32u/ntuser_private.h
@@ -26,7 +26,6 @@
#include "wine/list.h"
-#define WM_SYSTIMER 0x0118
#define WM_POPUPSYSTEMMENU 0x0313
enum system_timer_id
@@ -205,15 +204,6 @@ struct scroll_bar_win_data
#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
-/* message spy definitions */
-
-#define SPY_DISPATCHMESSAGE 0x0100
-#define SPY_SENDMESSAGE 0x0101
-#define SPY_DEFWNDPROC 0x0102
-
-#define SPY_RESULT_OK 0x0001
-#define SPY_RESULT_DEFWND 0x0002
-
/* info about the message currently being received by the current thread */
struct received_message_info
{
diff --git a/include/ntuser.h b/include/ntuser.h
index 07b5afe7919..e3694bde779 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -267,6 +267,14 @@ struct unpack_dde_message_params
#define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
#define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
+/* message spy definitions */
+#define SPY_DISPATCHMESSAGE 0x0100
+#define SPY_SENDMESSAGE 0x0101
+#define SPY_DEFWNDPROC 0x0102
+
+#define SPY_RESULT_OK 0x0001
+#define SPY_RESULT_DEFWND 0x0002
+
/* NtUserMessageCall codes */
enum
{
@@ -456,6 +464,8 @@ enum wine_internal_message
#define IME_INTERNAL_ACTIVATE 0x17
#define IME_INTERNAL_DEACTIVATE 0x18
+#define WM_SYSTIMER 0x0118
+
/* the various structures that can be sent in messages, in platform-independent layout */
struct packed_CREATESTRUCTW
{
More information about the wine-cvs
mailing list