https://git.reactos.org/?p=reactos.git;a=commitdiff;h=df8c74e78b3fd217379a9d66cb1814dc2784d139

commit df8c74e78b3fd217379a9d66cb1814dc2784d139
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Sun Jan 30 09:38:04 2022 +0900
Commit:     GitHub <[email protected]>
CommitDate: Sun Jan 30 09:38:04 2022 +0900

    [INCLUDE] Rename <ddk/imm.h> as <ddk/immdev.h> (#4321)
    
    - Rename <ddk/imm.h> as <ddk/immdev.h>.
    - Delete sdk/include/reactos/wine/imm.h (this header is confusing and 
nonsense).
    - Changes related to it.
    CORE-11700
---
 dll/win32/imm32/precomp.h                          |  2 +-
 modules/rostests/apitests/imm32/precomp.h          |  2 +-
 modules/rostests/winetests/imm32/imm32.c           |  4 +++
 .../{reactos/wine/ddk/imm.h => ddk/immdev.h}       | 41 ++++++++++------------
 sdk/include/reactos/wine/imm.h                     |  2 --
 win32ss/user/user32/misc/imm.c                     |  2 +-
 6 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h
index a7a3b3c904a..533fa714d0e 100644
--- a/dll/win32/imm32/precomp.h
+++ b/dll/win32/imm32/precomp.h
@@ -27,7 +27,7 @@
 #include <winver.h>
 
 #include <imm.h>
-#include <ddk/imm.h>
+#include <ddk/immdev.h>
 
 #define NTOS_MODE_USER
 #include <ndk/umtypes.h>
diff --git a/modules/rostests/apitests/imm32/precomp.h 
b/modules/rostests/apitests/imm32/precomp.h
index f68c9347047..dbc03f99384 100644
--- a/modules/rostests/apitests/imm32/precomp.h
+++ b/modules/rostests/apitests/imm32/precomp.h
@@ -4,7 +4,7 @@
 #define WIN32_NO_STATUS
 #include <windows.h>
 #include <imm.h>
-#include <ddk/imm.h>
+#include <ddk/immdev.h>
 #include <pseh/pseh2.h>
 #include <ndk/umtypes.h>
 #include <ndk/pstypes.h>
diff --git a/modules/rostests/winetests/imm32/imm32.c 
b/modules/rostests/winetests/imm32/imm32.c
index 407dfe1f6f7..39222884f2b 100644
--- a/modules/rostests/winetests/imm32/imm32.c
+++ b/modules/rostests/winetests/imm32/imm32.c
@@ -24,7 +24,11 @@
 #include "winuser.h"
 #include "wingdi.h"
 #include "imm.h"
+#ifdef __REACTOS__
+#include "ddk/immdev.h"
+#else
 #include "ddk/imm.h"
+#endif
 
 static BOOL (WINAPI *pImmAssociateContextEx)(HWND,HIMC,DWORD);
 static BOOL (WINAPI *pImmIsUIMessageA)(HWND,UINT,WPARAM,LPARAM);
diff --git a/sdk/include/reactos/wine/ddk/imm.h b/sdk/include/ddk/immdev.h
similarity index 89%
rename from sdk/include/reactos/wine/ddk/imm.h
rename to sdk/include/ddk/immdev.h
index 4f5e16a3568..8addb828bb9 100644
--- a/sdk/include/reactos/wine/ddk/imm.h
+++ b/sdk/include/ddk/immdev.h
@@ -1,29 +1,22 @@
+/*
+ * PROJECT:     ReactOS headers
+ * LICENSE:     LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
+ * PURPOSE:     Providing DDK-compatible <immdev.h> and IME/IMM development 
helper
+ * COPYRIGHT:   Copyright 2021-2022 Katayama Hirofumi MZ 
<[email protected]>
+ */
 
-#ifndef _WINE_IMM_H_
-#define _WINE_IMM_H_
+#ifndef _IMMDEV_
+#define _IMMDEV_
+
+#pragma once
 
 #include <wingdi.h>
+#include <imm.h>
 
-#ifdef WINE_NO_UNICODE_MACROS
-# define WINELIB_NAME_AW(func) \
-    func##_must_be_suffixed_with_W_or_A_in_this_context \
-    func##_must_be_suffixed_with_W_or_A_in_this_context
-#else  /* WINE_NO_UNICODE_MACROS */
-# ifdef UNICODE
-#  define WINELIB_NAME_AW(func) func##W
-# else
-#  define WINELIB_NAME_AW(func) func##A
-# endif
-#endif  /* WINE_NO_UNICODE_MACROS */
-
-#ifdef WINE_NO_UNICODE_MACROS
-# define DECL_WINELIB_TYPE_AW(type)  /* nothing */
-#else
-# define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
+#ifdef __cplusplus
+extern "C" {
 #endif
 
-#include <psdk/imm.h>
-
 /* wParam for WM_IME_CONTROL */
 #define IMC_GETCONVERSIONMODE           0x0001
 #define IMC_GETSENTENCEMODE             0x0003
@@ -52,7 +45,7 @@ typedef struct _tagINPUTCONTEXT {
     HIMCC               hMsgBuf;
     DWORD               fdwInit;
     DWORD               dwReserve[3];
-} INPUTCONTEXT, *LPINPUTCONTEXT;
+} INPUTCONTEXT, *PINPUTCONTEXT, *LPINPUTCONTEXT;
 
 #ifdef _WIN64
 C_ASSERT(offsetof(INPUTCONTEXT, hWnd) == 0x0);
@@ -197,4 +190,8 @@ typedef struct IME_STATE
 C_ASSERT(sizeof(IME_STATE) == 0x18);
 #endif
 
-#endif /* _WINE_IMM_H_ */
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif  /* ndef _IMMDEV_ */
diff --git a/sdk/include/reactos/wine/imm.h b/sdk/include/reactos/wine/imm.h
deleted file mode 100644
index a41831db33f..00000000000
--- a/sdk/include/reactos/wine/imm.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#include "ddk/imm.h"
diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c
index 13f749926b4..ae711d1b70d 100644
--- a/win32ss/user/user32/misc/imm.c
+++ b/win32ss/user/user32/misc/imm.c
@@ -11,7 +11,7 @@
 
 #include <user32.h>
 #include <strsafe.h>
-#include <ddk/imm.h>
+#include <ddk/immdev.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(user32);
 

Reply via email to