From 79fa9f8a865633bed6f4aa6a0456b83cf8d8fb3b Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 21 Mar 2022 14:58:43 +1000 Subject: [PATCH] fix(windows): create header for keyman guids --- windows/src/engine/keyman32/Keyman32.vcxproj | 4 +++- .../src/engine/keyman32/Keyman32.vcxproj.filters | 8 +++++++- windows/src/engine/keyman32/globals.h | 4 ++-- windows/src/engine/keyman32/k32_globals.cpp | 2 -- windows/src/engine/keyman64/keyman64.vcxproj | 4 +++- .../src/engine/keyman64/keyman64.vcxproj.filters | 2 ++ windows/src/engine/kmtip/globals.cpp | 16 +++++++--------- windows/src/engine/kmtip/globals.h | 3 ++- windows/src/engine/kmtip/kmtip.vcxproj | 3 ++- windows/src/engine/kmtip/kmtip.vcxproj.filters | 6 ++++++ windows/src/global/inc/keymanengine.h | 1 + windows/src/global/inc/keymankeyboard_id.h | 16 ++++++++++++++++ windows/src/global/vc/keymankeyboard_id.cpp | 3 +++ 13 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 windows/src/global/inc/keymankeyboard_id.h create mode 100644 windows/src/global/vc/keymankeyboard_id.cpp diff --git a/windows/src/engine/keyman32/Keyman32.vcxproj b/windows/src/engine/keyman32/Keyman32.vcxproj index fbbfef2883..9f92337d32 100644 --- a/windows/src/engine/keyman32/Keyman32.vcxproj +++ b/windows/src/engine/keyman32/Keyman32.vcxproj @@ -173,6 +173,7 @@ + %(AdditionalIncludeDirectories) @@ -364,6 +365,7 @@ + @@ -397,4 +399,4 @@ - + \ No newline at end of file diff --git a/windows/src/engine/keyman32/Keyman32.vcxproj.filters b/windows/src/engine/keyman32/Keyman32.vcxproj.filters index e75258f2c5..9bbfa89ac5 100644 --- a/windows/src/engine/keyman32/Keyman32.vcxproj.filters +++ b/windows/src/engine/keyman32/Keyman32.vcxproj.filters @@ -138,6 +138,9 @@ Source Files + + Source Files + @@ -249,8 +252,11 @@ Header Files + + Header Files + - + \ No newline at end of file diff --git a/windows/src/engine/keyman32/globals.h b/windows/src/engine/keyman32/globals.h index 6c03cf8a1b..2d2a6d3e89 100644 --- a/windows/src/engine/keyman32/globals.h +++ b/windows/src/engine/keyman32/globals.h @@ -61,6 +61,8 @@ #include "serialkeyeventclient.h" #include "SharedBuffers.h" +#include "keymankeyboard_id.h" + class Globals { public: @@ -307,7 +309,5 @@ void WINAPI SetCustomPostKeyCallback(CUSTOMPOSTKEYCALLBACKPROC proc); extern BOOL isKeymanKeyboardActive; // is the active keyboard a Keyman keyboard -/* FE0420F1-38D1-4B4C-96BF-E7E20A74CFB7 Keyman keyboard guid */ -extern const CLSID c_clsidKMTipTextService; #endif diff --git a/windows/src/engine/keyman32/k32_globals.cpp b/windows/src/engine/keyman32/k32_globals.cpp index 66f1a90a9a..5bdf1b23c6 100644 --- a/windows/src/engine/keyman32/k32_globals.cpp +++ b/windows/src/engine/keyman32/k32_globals.cpp @@ -96,8 +96,6 @@ BOOL BOOL isKeymanKeyboardActive = FALSE; -const CLSID c_clsidKMTipTextService = {0xFE0420F1, 0x38D1, 0x4B4C, {0x96, 0xBF, 0xE7, 0xE2, 0x0A, 0x74, 0xCF, 0xB7}}; - static DWORD dwTlsIndex = TLS_OUT_OF_INDEXES; static CRITICAL_SECTION csGlobals; diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj index 4b5d5ef466..cea62fd082 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ b/windows/src/engine/keyman64/keyman64.vcxproj @@ -175,6 +175,7 @@ + @@ -282,6 +283,7 @@ + @@ -346,4 +348,4 @@ - + \ No newline at end of file diff --git a/windows/src/engine/keyman64/keyman64.vcxproj.filters b/windows/src/engine/keyman64/keyman64.vcxproj.filters index 3fa862afc9..1e467acd35 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj.filters +++ b/windows/src/engine/keyman64/keyman64.vcxproj.filters @@ -38,6 +38,7 @@ + @@ -86,6 +87,7 @@ + diff --git a/windows/src/engine/kmtip/globals.cpp b/windows/src/engine/kmtip/globals.cpp index f6567c5501..ebcb79478f 100644 --- a/windows/src/engine/kmtip/globals.cpp +++ b/windows/src/engine/kmtip/globals.cpp @@ -1,18 +1,18 @@ /* Name: globals Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 19 Jun 2007 Modified Date: 14 Aug 2014 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 19 Jun 2007 - mcdurdin - Initial comments 24 Oct 2012 - mcdurdin - I3481 - V9.0 - Eliminate unsafe calls in C++ 17 Nov 2012 - mcdurdin - I3563 - V9.0 - Add output to debug window for KMTIP logging @@ -33,8 +33,6 @@ LONG g_cRefDll = -1; // -1 /w no refs, for win95 InterlockedIncrement/Decrement CRITICAL_SECTION g_cs; -/* FE0420F1-38D1-4B4C-96BF-E7E20A74CFB7 */ -const CLSID c_clsidKMTipTextService = { 0xFE0420F1, 0x38D1, 0x4B4C, { 0x96, 0xBF, 0xE7, 0xE2, 0x0A, 0x74, 0xCF, 0xB7 } }; /* LOGGING diff --git a/windows/src/engine/kmtip/globals.h b/windows/src/engine/kmtip/globals.h index 6678bcfffd..4f071848d9 100644 --- a/windows/src/engine/kmtip/globals.h +++ b/windows/src/engine/kmtip/globals.h @@ -29,6 +29,7 @@ #ifndef GLOBALS_H #define GLOBALS_H +#include "keymankeyboard_id.h" #define assert(x) // @@ -106,7 +107,7 @@ extern CRITICAL_SECTION g_cs; extern DWORD g_dwDeepIntegration; // I4375 -extern const CLSID c_clsidKMTipTextService; +//extern const CLSID c_clsidKMTipTextService; extern const GUID c_guidKeymanDeadkeysProp; diff --git a/windows/src/engine/kmtip/kmtip.vcxproj b/windows/src/engine/kmtip/kmtip.vcxproj index c19f306a62..5d4fc2ade9 100644 --- a/windows/src/engine/kmtip/kmtip.vcxproj +++ b/windows/src/engine/kmtip/kmtip.vcxproj @@ -104,7 +104,6 @@ kmtip64 kmtip64 - NDEBUG;%(PreprocessorDefinitions) @@ -276,6 +275,7 @@ + @@ -417,6 +417,7 @@ + diff --git a/windows/src/engine/kmtip/kmtip.vcxproj.filters b/windows/src/engine/kmtip/kmtip.vcxproj.filters index 8efd2b5e3f..6d8cddfbea 100644 --- a/windows/src/engine/kmtip/kmtip.vcxproj.filters +++ b/windows/src/engine/kmtip/kmtip.vcxproj.filters @@ -69,6 +69,9 @@ Source Files + + Source Files\Framework + @@ -108,5 +111,8 @@ Header Files + + Header Files + \ No newline at end of file diff --git a/windows/src/global/inc/keymanengine.h b/windows/src/global/inc/keymanengine.h index 2d5eb00365..0d9e1e372a 100644 --- a/windows/src/global/inc/keymanengine.h +++ b/windows/src/global/inc/keymanengine.h @@ -265,6 +265,7 @@ void keybd_shift(LPINPUT pInputs, int* n, BOOL isReset, LPBYTE const kbd); #include "testkeymanfunctioning.h" #include "keynames.h" +#include "keymankeyboard_id.h" #include "crc32.h" diff --git a/windows/src/global/inc/keymankeyboard_id.h b/windows/src/global/inc/keymankeyboard_id.h new file mode 100644 index 0000000000..ed20773bad --- /dev/null +++ b/windows/src/global/inc/keymankeyboard_id.h @@ -0,0 +1,16 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * Name: KeymanKeyboardIID + * Description: Header file to include the keyman keyboard GUIDs + */ +#ifndef _keymankeyboard_id_h +#define _keymankeyboard_id_h + +//const c_clsidKMTipTextService: TGUID = '{FE0420F1-38D1-4B4C-96BF-E7E20A74CFB7}'; // version 10.0 +//const c_clsidKMTipTextService_90: TGUID = '{487EB753-DB93-48C5-9E6A-4398E777C61D}'; // I3663 // I4248 +//const c_clsidTextServicesFramework: TGUID = '{529A9E6B-6587-4F23-AB9E-9C7D683E3C50}'; +/* FE0420F1-38D1-4B4C-96BF-E7E20A74CFB7 Keyman keyboard guid */ +extern const CLSID c_clsidKMTipTextService; + +#endif diff --git a/windows/src/global/vc/keymankeyboard_id.cpp b/windows/src/global/vc/keymankeyboard_id.cpp new file mode 100644 index 0000000000..b2912e1900 --- /dev/null +++ b/windows/src/global/vc/keymankeyboard_id.cpp @@ -0,0 +1,3 @@ +#include "pch.h" + +const CLSID c_clsidKMTipTextService = {0xFE0420F1, 0x38D1, 0x4B4C, {0x96, 0xBF, 0xE7, 0xE2, 0x0A, 0x74, 0xCF, 0xB7}};