mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 12:39:35 +00:00
[KBSWITCH][INPUT][SDK] Use <imm32_undoc.h>'s IS_IME_HKL (#6588)
Unify the private IMM32 macro definitions. Refactoring... JIRA issue: CORE-19361 - Define IS_SPECIAL_HKL macro in <imm32_undoc.h>. - Use IS_IME_HKL and IS_SPECIAL_HKL macros of <imm32_undoc.h>, in kbswitch and input modules.
This commit is contained in:
parent
e25d7d724d
commit
fcbcc5b30c
3 changed files with 12 additions and 19 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <shlobj.h>
|
||||
#include <shlwapi_undoc.h>
|
||||
#include <imm.h>
|
||||
#include <imm32_undoc.h>
|
||||
|
||||
/*
|
||||
* This program kbswitch is a mimic of Win2k's internat.exe.
|
||||
|
@ -26,13 +27,6 @@
|
|||
* won't be generated in Vista+.
|
||||
*/
|
||||
|
||||
#define IME_MASK (0xE0000000UL)
|
||||
#define SPECIAL_MASK (0xF0000000UL)
|
||||
|
||||
#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)
|
||||
#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)
|
||||
#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF))
|
||||
|
||||
#define WM_NOTIFYICONMSG (WM_USER + 248)
|
||||
|
||||
PKBSWITCHSETHOOKS KbSwitchSetHooks = NULL;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <setupapi.h>
|
||||
#include <strsafe.h>
|
||||
#include <cpl.h>
|
||||
#include <imm32_undoc.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
@ -83,17 +84,6 @@ DWORDfromString(const WCHAR *pszString)
|
|||
return wcstoul(pszString, &pszEnd, 16);
|
||||
}
|
||||
|
||||
#define IME_MASK (0xE0000000UL)
|
||||
#define SUBST_MASK (0xD0000000UL)
|
||||
#define SPECIAL_MASK (0xF0000000UL)
|
||||
|
||||
#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)
|
||||
#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)
|
||||
#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF))
|
||||
|
||||
#define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK)
|
||||
#define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK)
|
||||
|
||||
VOID GetSystemLibraryPath(LPWSTR pszPath, INT cchPath, LPCWSTR pszFileName);
|
||||
|
||||
#endif /* _INPUT_H */
|
||||
|
|
|
@ -13,7 +13,16 @@ extern "C" {
|
|||
|
||||
#include <immdev.h>
|
||||
|
||||
#define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000)
|
||||
#define IME_MASK (0xE0000000UL)
|
||||
#define SUBST_MASK (0xD0000000UL)
|
||||
#define SPECIAL_MASK (0xF0000000UL)
|
||||
|
||||
#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)
|
||||
#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)
|
||||
#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF))
|
||||
|
||||
#define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK)
|
||||
#define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK)
|
||||
|
||||
typedef struct tagIMEINFOEX
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue