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

commit 3a2c2cbe6031aa1506f286ca859bb6e94ff8267c
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Wed Dec 13 07:36:20 2023 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Wed Dec 13 07:36:20 2023 +0900

    [SDK][UUID] Add ctffunc.idl (#6157)
    
    - Add ctffunc.idl to sdk/include/psdk.
    - Modify uuid.
    CORE-19362
---
 sdk/include/psdk/CMakeLists.txt |   1 +
 sdk/include/psdk/ctffunc.idl    | 480 ++++++++++++++++++++++++++++++++++++++++
 sdk/lib/uuid/CMakeLists.txt     |   4 +-
 sdk/lib/uuid/ctffunc_g.c        |  29 +++
 4 files changed, 512 insertions(+), 2 deletions(-)

diff --git a/sdk/include/psdk/CMakeLists.txt b/sdk/include/psdk/CMakeLists.txt
index 36540fa1317..360082e103b 100644
--- a/sdk/include/psdk/CMakeLists.txt
+++ b/sdk/include/psdk/CMakeLists.txt
@@ -29,6 +29,7 @@ list(APPEND SOURCE
     cor.idl
     cordebug.idl
 #   crtrow.idl
+    ctffunc.idl
     ctxtcall.idl
 #   dbccmd.idl
 #   dbcses.idl
diff --git a/sdk/include/psdk/ctffunc.idl b/sdk/include/psdk/ctffunc.idl
new file mode 100644
index 00000000000..8bf9b5e2af8
--- /dev/null
+++ b/sdk/include/psdk/ctffunc.idl
@@ -0,0 +1,480 @@
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+import "msctf.idl";
+import "ctfutb.idl";
+#endif
+
+typedef enum
+{
+    STYLE_ACTIVE_SELECTION = 0,
+    STYLE_IMPLIED_SELECTION = 0x1
+} TfIntegratableCandidateListSelectionStyle;
+
+typedef enum
+{
+    GETIF_RESMGR = 0,
+    GETIF_RECOCONTEXT = 0x1,
+    GETIF_RECOGNIZER = 0x2,
+    GETIF_VOICE = 0x3,
+    GETIF_DICTGRAM = 0x4,
+    GETIF_RECOGNIZERNOINIT = 0x5
+} TfSapiObject;
+
+typedef struct TF_LMLATTELEMENT
+{
+    DWORD dwFrameStart;
+    DWORD dwFrameLen;
+    DWORD dwFlags;
+    union {
+        INT iCost;
+    };
+    BSTR  bstrText;
+} TF_LMLATTELEMENT;
+
+cpp_quote("EXTERN_C const CLSID CLSID_SapiLayr;")
+
+interface IEnumTfCandidates;
+interface IEnumTfLatticeElements;
+interface ITfCandidateList;
+interface ITfCandidateString;
+interface ITfFnAdviseText;
+interface ITfFnBalloon;
+interface ITfFnConfigure;
+interface ITfFnConfigureRegisterEudc;
+interface ITfFnConfigureRegisterWord;
+interface ITfFnGetLinguisticAlternates;
+interface ITfFnGetPreferredTouchKeyboardLayout;
+interface ITfFnGetSAPIObject;
+interface ITfFnLMInternal;
+interface ITfFnLMProcessor;
+interface ITfFnLangProfileUtil;
+interface ITfFnPlayBack;
+interface ITfFnPropertyUIStatus;
+interface ITfFnReconversion;
+interface ITfFnSearchCandidateProvider;
+interface ITfFnShowHelp;
+interface ITfFunction;
+interface ITfIntegratableCandidateListUIElement;
+interface ITfLMLattice;
+interface IUIManagerEventSink;
+
+[
+  object,
+  uuid(defb1926-6c80-4ce8-87d4-d6b72b812bde),
+  pointer_default(unique)
+]
+interface IEnumTfCandidates : IUnknown
+{
+    HRESULT Clone(
+        [out] IEnumTfCandidates **ppEnum);
+
+    HRESULT Next(
+        [in]  ULONG              ulCount,
+        [out] ITfCandidateString **ppCand,
+        [out] ULONG              *pcFetched);
+
+    HRESULT Reset(void);
+
+    HRESULT Skip(
+        [in] ULONG ulCount);
+}
+
+[
+  object,
+  uuid(56988052-47da-4a05-911a-e3d941f17145),
+  pointer_default(unique)
+]
+interface IEnumTfLatticeElements : IUnknown
+{
+    HRESULT Clone(
+        [out] IEnumTfLatticeElements **ppEnum);
+
+    HRESULT Next(
+        [in]  ULONG            ulCount,
+        [out] TF_LMLATTELEMENT *rgsElements,
+        [out] ULONG            *pcFetched);
+
+    HRESULT Reset(void);
+
+    HRESULT Skip(
+        [in] ULONG ulCount);
+}
+
+[
+  object,
+  uuid(a3ad50fb-9bdb-49e3-a843-6c76520fbf5d),
+  pointer_default(unique)
+]
+interface ITfCandidateList : IUnknown
+{
+    typedef enum
+    {
+        CAND_FINALIZED = 0,
+        CAND_SELECTED = 0x1,
+        CAND_CANCELED = 0x2
+    } TfCandidateResult;
+
+    HRESULT EnumCandidates(
+        [out] IEnumTfCandidates **ppEnum);
+
+    HRESULT GetCandidate(
+        [in]  ULONG              nIndex,
+        [out] ITfCandidateString **ppCand);
+
+    HRESULT GetCandidateNum(
+        [out] ULONG *pnCnt);
+
+    HRESULT SetResult(
+        [in] ULONG             nIndex,
+        [in] TfCandidateResult imcr);
+}
+
+[
+  object,
+  uuid(581f317e-fd9d-443f-b972-ed00467c5d40),
+  pointer_default(unique)
+]
+interface ITfCandidateString : IUnknown
+{
+    HRESULT GetString(
+        [out] BSTR *pbstr);
+
+    HRESULT GetIndex(
+        [out] ULONG *pnIndex);
+}
+
+[
+  object,
+  uuid(3527268b-7d53-4dd9-92b7-7296ae461249),
+  pointer_default(unique)
+]
+interface ITfFnAdviseText : IUnknown
+{
+    HRESULT OnTextUpdate(
+        [in] ITfRange    *pRange,
+        [in] const WCHAR *pchText,
+        [in] LONG        cch);
+
+    HRESULT OnLatticeUpdate(
+        [in] ITfRange     *pRange,
+        [in] ITfLMLattice *pLattice);
+}
+
+[
+  object,
+  uuid(3bab89e4-5fbe-45f4-a5bc-dca36ad225a8),
+  pointer_default(unique)
+]
+interface ITfFnBalloon : IUnknown
+{
+    HRESULT UpdateBalloon(
+        [in] TfLBBalloonStyle style,
+        [in] const WCHAR      *pch,
+        [in] ULONG            cch);
+}
+
+[
+  object,
+  uuid(88f567c6-1757-49f8-a1b2-89234c1eeff9),
+  pointer_default(unique)
+]
+interface ITfFnConfigure : IUnknown
+{
+    HRESULT Show(
+        [in] HWND    hwndParent,
+        [in] LANGID  langid,
+        [in] REFGUID rguidProfile);
+}
+
+[
+  object,
+  uuid(b5e26ff5-d7ad-4304-913f-21a2ed95a1b0),
+  pointer_default(unique)
+]
+interface ITfFnConfigureRegisterEudc : IUnknown
+{
+    HRESULT Show(
+        [in] HWND    hwndParent,
+        [in] LANGID  langid,
+        [in] REFGUID rguidProfile,
+             BSTR    bstrRegistered);
+}
+
+[
+  object,
+  uuid(bb95808a-6d8f-4bca-8400-5390b586aedf),
+  pointer_default(unique)
+]
+interface ITfFnConfigureRegisterWord : IUnknown
+{
+    HRESULT Show(
+        [in] HWND    hwndParent,
+        [in] LANGID  langid,
+        [in] REFGUID rguidProfile,
+        [in] BSTR    bstrRegistered);
+}
+
+[
+  object,
+  uuid(db593490-098f-11d3-8df0-00105a2799b5),
+  pointer_default(unique)
+]
+interface ITfFunction : IUnknown
+{
+    HRESULT GetDisplayName(
+        [out] BSTR *pbstrName);
+}
+
+[
+  object,
+  uuid(ea163ce2-7a65-4506-82a3-c528215da64e),
+  pointer_default(unique)
+]
+interface ITfFnGetLinguisticAlternates : ITfFunction
+{
+    HRESULT GetAlternates(
+        [in]  ITfRange         *pRange,
+        [out] ITfCandidateList **ppCandidateList);
+}
+
+[
+  object,
+  uuid(5f309a41-590a-4acc-a97f-d8efff13fdfc),
+  pointer_default(unique)
+]
+interface ITfFnGetPreferredTouchKeyboardLayout : ITfFunction
+{
+    typedef enum
+    {
+        TKBLT_UNDEFINED = 0,
+        TKBLT_CLASSIC = 1,
+        TKBLT_OPTIMIZED = 2
+    } TKBLayoutType;
+
+    HRESULT GetLayout(
+        [out] TKBLayoutType *pTKBLayoutType,
+        [out] WORD          *pwPreferredLayoutId);
+}
+
+[
+  object,
+  uuid(5c0ab7ea-167d-4f59-bfb5-4693755e90ca),
+  pointer_default(unique)
+]
+interface ITfFnGetSAPIObject : IUnknown
+{
+    HRESULT Get(
+        [in]  TfSapiObject sObj,
+        [out] IUnknown     **ppunk);
+}
+
+[
+  object,
+  uuid(04b825b1-ac9a-4f7b-b5ad-c7168f1ee445),
+  pointer_default(unique)
+]
+interface ITfFnLMInternal : IUnknown
+{
+    HRESULT ProcessLattice(
+        [in] ITfRange *pRange);
+}
+
+[
+  object,
+  uuid(7afbf8e7-ac4b-4082-b058-890899d3a010),
+  pointer_default(unique)
+]
+interface ITfFnLMProcessor : IUnknown
+{
+    HRESULT QueryRange(
+        [in]  ITfRange *pRange,
+        [out] ITfRange **ppNewRange,
+        [out] BOOL     *pfAccepted);
+
+    HRESULT QueryLangID(
+        [in]  LANGID langid,
+        [out] BOOL   *pfAccepted);
+
+    HRESULT GetReconversion(
+        [in]  ITfRange         *pRange,
+        [out] ITfCandidateList **ppCandList);
+
+    HRESULT Reconvert(
+        [in] ITfRange *pRange);
+
+    HRESULT QueryKey(
+        [in]  BOOL   fUp,
+        [in]  WPARAM vKey,
+        [in]  LPARAM lparamKeydata,
+        [out] BOOL   *pfInterested);
+
+    HRESULT InvokeKey(
+        [in] BOOL   fUp,
+        [in] WPARAM vKey,
+        [in] LPARAM lparamKeyData);
+
+    HRESULT InvokeFunc(
+        [in] ITfContext *pic,
+        [in] REFGUID    refguidFunc);
+}
+
+[
+  object,
+  uuid(a87a8574-a6c1-4e15-99f0-3d3965f548eb),
+  pointer_default(unique)
+]
+interface ITfFnLangProfileUtil : IUnknown
+{
+    HRESULT RegisterActiveProfiles(void);
+
+    HRESULT IsProfileAvailableForLang(
+        [in]  LANGID langid,
+        [out] BOOL   *pfAvailable);
+}
+
+[
+  object,
+  uuid(a3a416a4-0f64-11d3-b5b7-00c04fc324a1),
+  pointer_default(unique)
+]
+interface ITfFnPlayBack : IUnknown
+{
+    HRESULT QueryRange(
+        [in]  ITfRange *pRange,
+        [out] ITfRange **ppNewRange,
+        [out] BOOL     *pfPlayable);
+
+    HRESULT Play(
+        [in] ITfRange *pRange);
+}
+
+[
+  object,
+  uuid(2338ac6e-2b9d-44c0-a75e-ee64f256b3bd),
+  pointer_default(unique)
+]
+interface ITfFnPropertyUIStatus : IUnknown
+{
+    HRESULT GetStatus(
+        [in]  REFGUID refguidProp,
+        [out] DWORD   *pdw);
+
+    HRESULT SetStatus(
+        [in] REFGUID refguidProp,
+        [in] DWORD   dw);
+}
+
+[
+  object,
+  uuid(4cea93c0-0a58-11d3-8df0-00105a2799b5),
+  pointer_default(unique)
+]
+interface ITfFnReconversion : IUnknown
+{
+    HRESULT QueryRange(
+        [in]  ITfRange *pRange,
+              ITfRange **ppNewRange,
+        [out] BOOL     *pfConvertable);
+
+    HRESULT GetReconversion(
+        [in]  ITfRange         *pRange,
+        [out] ITfCandidateList **ppCandList
+    );
+
+    HRESULT Reconvert(
+        [in] ITfRange *pRange);
+}
+
+[
+  object,
+  uuid(87a2ad8f-f27b-4920-8501-67602280175d),
+  pointer_default(unique)
+]
+interface ITfFnSearchCandidateProvider : IUnknown
+{
+    HRESULT GetSearchCandidates(
+        [in]  BSTR             bstrQuery,
+        [in]  BSTR             bstrApplicationId,
+        [out] ITfCandidateList **pplist);
+
+    HRESULT SetResult(
+        [in] BSTR bstrQuery,
+        [in] BSTR bstrApplicationID,
+        [in] BSTR bstrResult);
+}
+
+[
+  object,
+  uuid(5ab1d30c-094d-4c29-8ea5-0bf59be87bf3),
+  pointer_default(unique)
+]
+interface ITfFnShowHelp : IUnknown
+{
+    HRESULT Show(
+        [in] HWND hwndParent);
+}
+
+[
+  object,
+  uuid(5ab1d30c-094d-4c29-8ea5-0bf59be87bf3),
+  pointer_default(unique)
+]
+interface ITfIntegratableCandidateListUIElement : IUnknown
+{
+    HRESULT SetIntegrationStyle(
+        [in] GUID guidIntegrationStyle);
+
+    HRESULT GetSelectionStyle(
+        [out] TfIntegratableCandidateListSelectionStyle *ptfSelectionStyle);
+
+    HRESULT OnKeyDown(
+        [in]  WPARAM wParam,
+        [in]  LPARAM lParam,
+        [out] BOOL   *pfEaten);
+
+    HRESULT ShowCandidateNumbers(
+        [out] BOOL *pfShow);
+
+    HRESULT FinalizeExactCompositionString(void);
+}
+
+[
+  object,
+  uuid(d4236675-a5bf-4570-9d42-5d6d7b02d59b),
+  pointer_default(unique)
+]
+interface ITfLMLattice : IUnknown
+{
+    HRESULT QueryType(
+        [in]  REFGUID rguidType,
+        [out] BOOL    *pfSupported);
+
+    HRESULT EnumLatticeElements(
+        [in]  DWORD                  dwFrameStart,
+        [in]  REFGUID                rguidType,
+        [out] IEnumTfLatticeElements **ppEnum);
+}
+
+[
+  object,
+  uuid(cd91d690-a7e8-4265-9b38-8bb3bbaba7de),
+  pointer_default(unique)
+]
+interface IUIManagerEventSink : IUnknown
+{
+    HRESULT OnWindowOpening(
+        [in] RECT *prcBounds);
+
+    HRESULT OnWindowOpened(
+        [in] RECT *prcBounds);
+
+    HRESULT OnWindowUpdating(
+        [in] RECT *prcUpdatedBounds);
+
+    HRESULT OnWindowUpdated(
+        [in] RECT *prcUpdatedBounds);
+
+    HRESULT OnWindowClosing(void);
+
+    HRESULT OnWindowClosed(void);
+}
diff --git a/sdk/lib/uuid/CMakeLists.txt b/sdk/lib/uuid/CMakeLists.txt
index d1f1392b256..9ebde406866 100644
--- a/sdk/lib/uuid/CMakeLists.txt
+++ b/sdk/lib/uuid/CMakeLists.txt
@@ -22,7 +22,7 @@ list(APPEND IDL_SOURCES
     comcat.idl
     commoncontrols.idl
 #    confpriv.idl
-#    ctffunc.idl
+    ctffunc.idl
 #    ctfbui.idl
 #    ctfspui.idl
 #    ctfutb.idl
@@ -200,7 +200,7 @@ list(APPEND SOURCE
 #    bthguid.c
 #    cluscfgguids.c
     cmdtreeiid.c
-#    ctffunc_g.c
+    ctffunc_g.c
 #    ctfspui_g.c
 #    hnclsid.c
     ieguids.c
diff --git a/sdk/lib/uuid/ctffunc_g.c b/sdk/lib/uuid/ctffunc_g.c
new file mode 100644
index 00000000000..ca0705b30f8
--- /dev/null
+++ b/sdk/lib/uuid/ctffunc_g.c
@@ -0,0 +1,29 @@
+
+#include <initguid.h>
+
+DEFINE_GUID(CLSID_SapiLayr,                             0xDCBD6FA8, 0x032F, 
0x11D3, 0xB5, 0xB1, 0x00, 0xC0, 0x4F, 0xC3, 0x24, 0xA1);
+
+DEFINE_GUID(IID_IEnumTfCandidates,                      0xDEFB1926, 0x6C80, 
0x4CE8, 0x87, 0xD4, 0xD6, 0xB7, 0x2B, 0x81, 0x2B, 0xDE);
+DEFINE_GUID(IID_IEnumTfLatticeElements,                 0x56988052, 0x47DA, 
0x4A05, 0x91, 0x1A, 0xE3, 0xD9, 0x41, 0xF1, 0x71, 0x45);
+DEFINE_GUID(IID_ITfCandidateList,                       0xA3AD50FB, 0x9BDB, 
0x49E3, 0xA8, 0x43, 0x6C, 0x76, 0x52, 0x0F, 0xBF, 0x5D);
+DEFINE_GUID(IID_ITfCandidateString,                     0x581F317E, 0xFD9D, 
0x443F, 0xB9, 0x72, 0xED, 0x00, 0x46, 0x7C, 0x5D, 0x40);
+DEFINE_GUID(IID_ITfFnAdviseText,                        0x3527268B, 0x7D53, 
0x4DD9, 0x92, 0xB7, 0x72, 0x96, 0xAE, 0x46, 0x12, 0x49);
+DEFINE_GUID(IID_ITfFnBalloon,                           0x3BAB89E4, 0x5FBE, 
0x45F4, 0xA5, 0xBC, 0xDC, 0xA3, 0x6A, 0xD2, 0x25, 0xA8);
+DEFINE_GUID(IID_ITfFnConfigure,                         0x88F567C6, 0x1757, 
0x49F8, 0xA1, 0xB2, 0x89, 0x23, 0x4C, 0x1E, 0xEF, 0xF9);
+DEFINE_GUID(IID_ITfFnConfigureRegisterEudc,             0xB5E26FF5, 0xD7AD, 
0x4304, 0x91, 0x3F, 0x21, 0xA2, 0xED, 0x95, 0xA1, 0xB0);
+DEFINE_GUID(IID_ITfFnConfigureRegisterWord,             0xBB95808A, 0x6D8F, 
0x4BCA, 0x84, 0x00, 0x53, 0x90, 0xB5, 0x86, 0xAE, 0xDF);
+DEFINE_GUID(IID_ITfFnGetLinguisticAlternates,           0xEA163CE2, 0x7A65, 
0x4506, 0x82, 0xA3, 0xC5, 0x28, 0x21, 0x5D, 0xA6, 0x4E);
+DEFINE_GUID(IID_ITfFnGetPreferredTouchKeyboardLayout,   0x5F309A41, 0x590A, 
0x4ACC, 0xA9, 0x7F, 0xD8, 0xEF, 0xFF, 0x13, 0xFD, 0xFC);
+DEFINE_GUID(IID_ITfFnGetSAPIObject,                     0x5C0AB7EA, 0x167D, 
0x4F59, 0xBF, 0xB5, 0x46, 0x93, 0x75, 0x5E, 0x90, 0xCA);
+DEFINE_GUID(IID_ITfFnLMInternal,                        0x04B825B1, 0xAC9A, 
0x4F7B, 0xB5, 0xAD, 0xC7, 0x16, 0x8F, 0x1E, 0xE4, 0x45);
+DEFINE_GUID(IID_ITfFnLMProcessor,                       0x7AFBF8E7, 0xAC4B, 
0x4082, 0xB0, 0x58, 0x89, 0x08, 0x99, 0xD3, 0xA0, 0x10);
+DEFINE_GUID(IID_ITfFnLangProfileUtil,                   0xA87A8574, 0xA6C1, 
0x4E15, 0x99, 0xF0, 0x3D, 0x39, 0x65, 0xF5, 0x48, 0xEB);
+DEFINE_GUID(IID_ITfFnPlayBack,                          0xA3A416A4, 0x0F64, 
0x11D3, 0xB5, 0xB7, 0x00, 0xC0, 0x4F, 0xC3, 0x24, 0xA1);
+DEFINE_GUID(IID_ITfFnPropertyUIStatus,                  0x2338AC6E, 0x2B9D, 
0x44C0, 0xA7, 0x5E, 0xEE, 0x64, 0xF2, 0x56, 0xB3, 0xBD);
+DEFINE_GUID(IID_ITfFnReconversion,                      0x4CEA93C0, 0x0A58, 
0x11D3, 0x8D, 0xF0, 0x00, 0x10, 0x5A, 0x27, 0x99, 0xB5);
+DEFINE_GUID(IID_ITfFnSearchCandidateProvider,           0x87A2AD8F, 0xF27B, 
0x4920, 0x85, 0x01, 0x67, 0x60, 0x22, 0x80, 0x17, 0x5D);
+DEFINE_GUID(IID_ITfFnShowHelp,                          0x5AB1D30C, 0x094D, 
0x4C29, 0x8E, 0xA5, 0x0B, 0xF5, 0x9B, 0xE8, 0x7B, 0xF3);
+DEFINE_GUID(IID_ITfFunction,                            0xDB593490, 0x098F, 
0x11D3, 0x8D, 0xF0, 0x00, 0x10, 0x5A, 0x27, 0x99, 0xB5);
+DEFINE_GUID(IID_ITfIntegratableCandidateListUIElement,  0x5AB1D30C, 0x094D, 
0x4C29, 0x8E, 0xA5, 0x0B, 0xF5, 0x9B, 0xE8, 0x7B, 0xF3);
+DEFINE_GUID(IID_ITfLMLattice,                           0x3527268B, 0x7D53, 
0x4DD9, 0x92, 0xB7, 0x72, 0x96, 0xAE, 0x46, 0x12, 0x49);
+DEFINE_GUID(IID_IUIManagerEventSink,                    0xCD91D690, 0xA7E8, 
0x4265, 0x9B, 0x38, 0x8B, 0xB3, 0xBB, 0xAB, 0xA7, 0xDE);

Reply via email to