[SDK][CICERO] Replace msctf_undoc.h with msctf_undoc.idl (#8060)

Follow-up of #8057. Generally, the IDL
file is a higher level than the header file.
JIRA issue: CORE-19361
- Modify CMakeLists.txt.
- Add sdk/include/reactos/CMakeLists.txt.
- Add reactos_idls CMake target in
- sdk/include/reactos/CMakeLists.txt
  to process IDL files.
- Add reactos_idls dependency to cicero.
- Delete msctf_undoc.h and add
  msctf_undoc.idl.
This commit is contained in:
Katayama Hirofumi MZ 2025-06-02 06:53:42 +09:00 committed by GitHub
parent 52ca35327e
commit 1286711ac4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 148 additions and 149 deletions

View file

@ -347,8 +347,7 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
add_subdirectory(sdk/include/xdk)
add_subdirectory(sdk/include/psdk)
add_subdirectory(sdk/include/dxsdk)
add_subdirectory(sdk/include/reactos/wine)
add_subdirectory(sdk/include/reactos/mc)
add_subdirectory(sdk/include/reactos)
add_subdirectory(sdk/include/asm)
if(ARCH MATCHES "64$")

View file

@ -10,6 +10,6 @@ list(APPEND SOURCE
add_library(cicero STATIC ${SOURCE})
target_compile_definitions(cicero PRIVATE UNICODE _UNICODE)
add_dependencies(cicero psdk)
add_dependencies(cicero psdk reactos_idls)
target_include_directories(cicero INTERFACE
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}>)

View file

@ -0,0 +1,13 @@
add_subdirectory(wine)
add_subdirectory(mc)
add_definitions(-D_MIDL_USE_GUIDDEF_)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND SOURCE
msctf_undoc.idl)
add_idl_headers(reactos_idls ${SOURCE})
add_dependencies(reactos_idls psdk)

View file

@ -1,146 +0,0 @@
/*
* PROJECT: ReactOS Kernel
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Private header for msctf.dll
* COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
#include <msctf.h>
#include <inputscope.h>
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_GUID(IID_ITfRangeAnchor, 0x8B99712B, 0x5815, 0x4BCC, 0xB9, 0xA9, 0x53, 0xDB, 0x1C, 0x8D, 0x67, 0x55);
#define INTERFACE ITfRangeAnchor
DECLARE_INTERFACE_(ITfRangeAnchor, IUnknown)
{
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
STDMETHOD(GetFormattedText)(
_In_ TfEditCookie ec,
_Out_ IDataObject **ppDataObject) PURE;
STDMETHOD(GetEmbedded)(
_In_ TfEditCookie ec,
_In_ REFGUID rguidService,
_In_ REFIID riid,
_Out_ IUnknown **ppunk) PURE;
STDMETHOD(InsertEmbedded)(
_In_ TfEditCookie ec,
_In_ DWORD dwFlags,
_In_ IDataObject *pDataObject) PURE;
STDMETHOD(ShiftStart)(
_In_ TfEditCookie ec,
_In_ LONG cchReq,
_Out_ LONG *pcch,
_In_ const TF_HALTCOND *pHalt) PURE;
STDMETHOD(ShiftEnd)(
_In_ TfEditCookie ec,
_In_ LONG cchReq,
_Out_ LONG *pcch,
_In_ const TF_HALTCOND *pHalt) PURE;
STDMETHOD(ShiftStartToRange)(
_In_ TfEditCookie ec,
_Inout_ ITfRange *pRange,
_In_ TfAnchor aPos) PURE;
STDMETHOD(ShiftEndToRange)(
_In_ TfEditCookie ec,
_Inout_ ITfRange *pRange,
_In_ TfAnchor aPos) PURE;
STDMETHOD(ShiftStartRegion)(
_In_ TfEditCookie ec,
_In_ TfShiftDir dir,
_Out_ BOOL *pfNoRegion) PURE;
STDMETHOD(ShiftEndRegion)(
_In_ TfEditCookie ec,
_In_ TfShiftDir dir,
_Out_ BOOL *pfNoRegion) PURE;
STDMETHOD(IsEmpty)(
_In_ TfEditCookie ec,
_Out_ BOOL *pfEmpty) PURE;
STDMETHOD(Collapse)(
_In_ TfEditCookie ec,
_In_ TfAnchor aPos) PURE;
STDMETHOD(IsEqualStart)(
_In_ TfEditCookie ec,
_In_ ITfRange *pWith,
_In_ TfAnchor aPos,
_Out_ BOOL *pfEqual) PURE;
STDMETHOD(IsEqualEnd)(
_In_ TfEditCookie ec,
_In_ ITfRange *pWith,
_In_ TfAnchor aPos,
_Out_ BOOL *pfEqual) PURE;
STDMETHOD(CompareStart)(
_In_ TfEditCookie ec,
_Inout_ ITfRange *pWith,
_In_ TfAnchor aPos,
_Out_ LONG *plResult) PURE;
STDMETHOD(CompareEnd)(
_In_ TfEditCookie ec,
_In_ ITfRange *pWith,
_In_ TfAnchor aPos,
_Out_ LONG *plResult) PURE;
STDMETHOD(AdjustForInsert)(
_In_ TfEditCookie ec,
_In_ ULONG cchInsert,
_Out_ BOOL *pfInsertOk) PURE;
STDMETHOD(GetGravity)(
_Out_ TfGravity *pgStart,
_Out_ TfGravity *pgEnd) PURE;
STDMETHOD(SetGravity)(
_In_ TfEditCookie ec,
_In_ TfGravity gStart,
_In_ TfGravity gEnd) PURE;
STDMETHOD(Clone)(_Out_ ITfRange **ppClone) PURE;
STDMETHOD(GetContext)(_Out_ ITfContext **ppContext) PURE;
};
#undef INTERFACE
BOOL WINAPI TF_InitSystem(VOID);
BOOL WINAPI TF_UninitSystem(VOID);
HRESULT WINAPI TF_GetGlobalCompartment(_Out_ ITfCompartmentMgr **ppCompMgr);
HRESULT WINAPI TF_PostAllThreadMsg(_In_opt_ WPARAM wParam, _In_ DWORD dwFlags);
HANDLE WINAPI TF_CreateCicLoadMutex(_Out_ LPBOOL pfWinLogon);
HRESULT WINAPI TF_InvalidAssemblyListCache(VOID);
HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(VOID);
HICON WINAPI TF_GetLangIcon(_In_ LANGID LangID, _Out_writes_(cchText) PWSTR pszText, _In_ INT cchText);
VOID WINAPI TF_InitMlngInfo(VOID);
INT WINAPI TF_MlngInfoCount(VOID);
INT WINAPI TF_GetMlngIconIndex(_In_ INT iKL);
HICON WINAPI TF_InatExtractIcon(_In_ INT iKL);
HRESULT WINAPI TF_RunInputCPL(VOID);
LONG WINAPI TF_CheckThreadInputIdle(_In_ DWORD dwThreadId, _In_ DWORD dwMilliseconds);
BOOL WINAPI TF_IsInMarshaling(_In_ DWORD dwThreadId);
// This is intentionally misspelled to match the original name:
BOOL WINAPI TF_IsFullScreenWindowAcitvated(VOID);
HRESULT WINAPI TF_CUASAppFix(_In_ LPCSTR pszName);
HRESULT WINAPI TF_ClearLangBarAddIns(_In_ REFGUID rguid);
HRESULT WINAPI TF_GetInputScope(_In_opt_ HWND hWnd, _Out_ ITfInputScope **ppInputScope);
BOOL WINAPI TF_DllDetachInOther(VOID);
BOOL WINAPI
TF_GetMlngHKL(
_In_ INT iKL,
_Out_opt_ HKL *phKL,
_Out_writes_opt_(cchText) LPWSTR pszText,
_In_ INT cchText);
BOOL WINAPI
TF_GetThreadFlags(
_In_ DWORD dwThreadId,
_Out_ LPDWORD pdwFlags1,
_Out_ LPDWORD pdwFlags2,
_Out_ LPDWORD pdwFlags3);
#ifdef __cplusplus
} // extern "C"
#endif

View file

@ -0,0 +1,133 @@
/*
* PROJECT: ReactOS header
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Private header for msctf.dll
* COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
import "msctf.idl";
import "inputscope.idl";
[
object,
uuid(8b99712b-5815-4bcc-b9a9-53db1c8d6755),
pointer_default(unique)
]
interface ITfRangeAnchor : IUnknown
{
HRESULT GetFormattedText(
[in] TfEditCookie ec,
[out] IDataObject **ppDataObject);
HRESULT GetEmbedded(
[in] TfEditCookie ec,
[in] REFGUID rguidService,
[in] REFIID riid,
[out] IUnknown **ppunk);
HRESULT InsertEmbedded(
[in] TfEditCookie ec,
[in] DWORD dwFlags,
[in] IDataObject *pDataObject);
HRESULT ShiftStart(
[in] TfEditCookie ec,
[in] LONG cchReq,
[out] LONG *pcch,
[in] const TF_HALTCOND *pHalt);
HRESULT ShiftEnd(
[in] TfEditCookie ec,
[in] LONG cchReq,
[out] LONG *pcch,
[in] const TF_HALTCOND *pHalt);
HRESULT ShiftStartToRange(
[in] TfEditCookie ec,
[in] ITfRange *pRange,
[in] TfAnchor aPos);
HRESULT ShiftEndToRange(
[in] TfEditCookie ec,
[in] ITfRange *pRange,
[in] TfAnchor aPos);
HRESULT ShiftStartRegion(
[in] TfEditCookie ec,
[in] TfShiftDir dir,
[out] BOOL *pfNoRegion);
HRESULT ShiftEndRegion(
[in] TfEditCookie ec,
[in] TfShiftDir dir,
[out] BOOL *pfNoRegion);
HRESULT IsEmpty(
[in] TfEditCookie ec,
[out] BOOL *pfEmpty);
HRESULT Collapse(
[in] TfEditCookie ec,
[in] TfAnchor aPos);
HRESULT IsEqualStart(
[in] TfEditCookie ec,
[in] ITfRange *pWith,
[in] TfAnchor aPos,
[out] BOOL *pfEqual);
HRESULT IsEqualEnd(
[in] TfEditCookie ec,
[in] ITfRange *pWith,
[in] TfAnchor aPos,
[out] BOOL *pfEqual);
HRESULT CompareStart(
[in] TfEditCookie ec,
[in] ITfRange *pWith,
[in] TfAnchor aPos,
[out] LONG *plResult);
HRESULT CompareEnd(
[in] TfEditCookie ec,
[in] ITfRange *pWith,
[in] TfAnchor aPos,
[out] LONG *plResult);
HRESULT AdjustForInsert(
[in] TfEditCookie ec,
[in] ULONG cchInsert,
[out] BOOL *pfInsertOk);
HRESULT GetGravity(
[out] TfGravity *pgStart,
[out] TfGravity *pgEnd);
HRESULT SetGravity(
[in] TfEditCookie ec,
[in] TfGravity gStart,
[in] TfGravity gEnd);
HRESULT Clone([out] ITfRange **ppClone);
HRESULT GetContext([out] ITfContext **ppContext);
}
cpp_quote("BOOL WINAPI TF_InitSystem(VOID);")
cpp_quote("BOOL WINAPI TF_UninitSystem(VOID);")
cpp_quote("HRESULT WINAPI TF_GetGlobalCompartment(_Out_ ITfCompartmentMgr **ppCompMgr);")
cpp_quote("HRESULT WINAPI TF_PostAllThreadMsg(_In_opt_ WPARAM wParam, _In_ DWORD dwFlags);")
cpp_quote("HANDLE WINAPI TF_CreateCicLoadMutex(_Out_ LPBOOL pfWinLogon);")
cpp_quote("HRESULT WINAPI TF_InvalidAssemblyListCache(VOID);")
cpp_quote("HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(VOID);")
cpp_quote("HICON WINAPI TF_GetLangIcon(_In_ LANGID LangID, _Out_writes_(cchText) PWSTR pszText, _In_ INT cchText);")
cpp_quote("VOID WINAPI TF_InitMlngInfo(VOID);")
cpp_quote("INT WINAPI TF_MlngInfoCount(VOID);")
cpp_quote("INT WINAPI TF_GetMlngIconIndex(_In_ INT iKL);")
cpp_quote("HICON WINAPI TF_InatExtractIcon(_In_ INT iKL);")
cpp_quote("HRESULT WINAPI TF_RunInputCPL(VOID);")
cpp_quote("LONG WINAPI TF_CheckThreadInputIdle(_In_ DWORD dwThreadId, _In_ DWORD dwMilliseconds);")
cpp_quote("BOOL WINAPI TF_IsInMarshaling(_In_ DWORD dwThreadId);")
cpp_quote("// This is intentionally misspelled to match the original name:")
cpp_quote("BOOL WINAPI TF_IsFullScreenWindowAcitvated(VOID);")
cpp_quote("HRESULT WINAPI TF_CUASAppFix(_In_ LPCSTR pszName);")
cpp_quote("HRESULT WINAPI TF_ClearLangBarAddIns(_In_ REFGUID rguid);")
cpp_quote("HRESULT WINAPI TF_GetInputScope(_In_opt_ HWND hWnd, _Out_ ITfInputScope **ppInputScope);")
cpp_quote("BOOL WINAPI TF_DllDetachInOther(VOID);")
cpp_quote("BOOL WINAPI")
cpp_quote("TF_GetMlngHKL(")
cpp_quote(" _In_ INT iKL,")
cpp_quote(" _Out_opt_ HKL *phKL,")
cpp_quote(" _Out_writes_opt_(cchText) LPWSTR pszText,")
cpp_quote(" _In_ INT cchText);")
cpp_quote("BOOL WINAPI")
cpp_quote("TF_GetThreadFlags(")
cpp_quote(" _In_ DWORD dwThreadId,")
cpp_quote(" _Out_ LPDWORD pdwFlags1,")
cpp_quote(" _Out_ LPDWORD pdwFlags2,")
cpp_quote(" _Out_ LPDWORD pdwFlags3);")