You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
549 lines
14 KiB
549 lines
14 KiB
//+-------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
// Copyright (C) Microsoft Corporation, 1992-2000.
|
|
//
|
|
// File: msctfp.idl
|
|
//
|
|
// Contents: MSCTF private APIs
|
|
//
|
|
//
|
|
//--------------------------------------------------------------------------
|
|
|
|
cpp_quote("//=--------------------------------------------------------------------------=")
|
|
cpp_quote("// msctfp.h")
|
|
cpp_quote("//=--------------------------------------------------------------------------=")
|
|
cpp_quote("// (C) Copyright 1995-2000 Microsoft Corporation. All Rights Reserved.")
|
|
cpp_quote("//")
|
|
cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
|
|
cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
|
|
cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
|
|
cpp_quote("// PARTICULAR PURPOSE.")
|
|
cpp_quote("//=--------------------------------------------------------------------------=")
|
|
cpp_quote("")
|
|
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
|
|
cpp_quote("")
|
|
cpp_quote("//--------------------------------------------------------------------------")
|
|
cpp_quote("// MSCTF Private Interfaces.")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("#ifndef MSCTFP_DEFINED")
|
|
cpp_quote("#define MSCTFP_DEFINED")
|
|
cpp_quote("")
|
|
cpp_quote("#include <windows.h>")
|
|
cpp_quote("")
|
|
|
|
import "oaidl.idl";
|
|
import "msctf.idl";
|
|
|
|
//
|
|
// GUIDs for the Tips category. Each category contains Tips classes.
|
|
//
|
|
cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_REFERENCE;")
|
|
|
|
cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_PROOFING;")
|
|
|
|
cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SMARTTAG;")
|
|
|
|
cpp_quote("EXTERN_C const GUID GUID_TFCAT_PROPSTYLE_CUSTOM_COMPACT;")
|
|
|
|
cpp_quote("EXTERN_C const GUID GUID_SERVICE_TEXTSTORE;")
|
|
|
|
cpp_quote("EXTERN_C const GUID GUID_SERVICE_TF;")
|
|
|
|
//
|
|
// GUIDs for system predefined compartment for internal use only
|
|
//
|
|
cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_MSCANDIDATEUI_WINDOW;")
|
|
|
|
interface ITfSysHookSink;
|
|
|
|
cpp_quote("#define TF_LBU_CAPSKANAKEY 1")
|
|
cpp_quote("#define TF_LBU_NTCONSOLELANGCHANGE 2")
|
|
|
|
//
|
|
// GUIDs for system predefined conversion mode bias for internal use only
|
|
//
|
|
cpp_quote("EXTERN_C const GUID GUID_MODEBIAS_DEFAULT;")
|
|
|
|
//
|
|
// flags for TF_LBU_CAPSKANAKEY
|
|
//
|
|
cpp_quote("#define TF_LBUF_CAPS 0x0001")
|
|
cpp_quote("#define TF_LBUF_KANA 0x0002")
|
|
|
|
// new RequestEditSession flag, grants write access to properties, read access to text
|
|
const DWORD TF_ES_READ_PROPERTY_WRITE = 0x12;
|
|
|
|
//
|
|
// flags for PreservedKeyEx
|
|
//
|
|
cpp_quote("#define TF_PKEX_SYSHOTKEY 0x0001")
|
|
cpp_quote("#define TF_PKEX_NONEEDDIM 0x0002")
|
|
|
|
//
|
|
// flags for ActivateEx
|
|
//
|
|
cpp_quote("#define TF_TMAE_NOACTIVATETIP 0x0001")
|
|
|
|
//
|
|
// flags for KeyDownUpEx
|
|
//
|
|
cpp_quote("#define TF_KEY_MSCTFIME 0x0001")
|
|
cpp_quote("#define TF_KEY_TEST 0x0002")
|
|
cpp_quote("#define TF_KEY_INTERNAL 0x0004")
|
|
|
|
//
|
|
// ITfThreadMgr_P
|
|
//
|
|
// implemented by Cicero
|
|
//
|
|
// This is a private Interface of ITFThreadMgr.
|
|
//
|
|
//
|
|
//
|
|
[
|
|
object,
|
|
uuid(f65567a7-34a1-46f4-b5dd-8804aeb06ff7),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfThreadMgr_P_old : ITfThreadMgr
|
|
{
|
|
//
|
|
// AIMM1.2 want to know if the window is cicero aware or not.
|
|
// Because AIMM1.2 is filtering a window by wndclass,
|
|
// but both AIMM1.2 and Cicero aware Richedit can exist on same thread.
|
|
//
|
|
HRESULT GetAssociated([in] HWND hWnd,
|
|
[out] ITfDocumentMgr **ppdim);
|
|
|
|
HRESULT SetSysHookSink([in] ITfSysHookSink *pSink);
|
|
|
|
HRESULT RequestPostponedLock([in] ITfContext *pic);
|
|
|
|
HRESULT IsKeystrokeFeedEnabled([out] BOOL *pfEnabled);
|
|
};
|
|
|
|
//
|
|
// ITfThreadMgr_P
|
|
//
|
|
// implemented by Cicero
|
|
//
|
|
// This is a private Interface of ITFThreadMgr.
|
|
//
|
|
[
|
|
object,
|
|
uuid(7c6247a1-2884-4b7c-af24-f198047aa728),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfThreadMgr_P : ITfThreadMgr_P_old
|
|
{
|
|
HRESULT CallImm32HotkeyHanlder([in] WPARAM wParam, [in] LPARAM lParam, [out] BOOL *pbHandled);
|
|
HRESULT ActivateEx([out] TfClientId *ptid, [in] DWORD dwFlags);
|
|
}
|
|
|
|
//
|
|
// ITfKeystrokeMgr_P
|
|
//
|
|
[
|
|
object,
|
|
local,
|
|
uuid(53fa1bec-5be1-458e-ae70-a9f1dc843e81),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfKeystrokeMgr_P : ITfKeystrokeMgr
|
|
{
|
|
HRESULT PreserveKeyEx([in] TfClientId tid,
|
|
[in] REFGUID rguid,
|
|
[in] const TF_PRESERVEDKEY *prekey,
|
|
[in, size_is(cchDesc)] const WCHAR *pchDesc,
|
|
[in] ULONG cchDesc,
|
|
[in] DWORD dwFlags);
|
|
|
|
HRESULT KeyDownUpEx([in] WPARAM wParam,
|
|
[in] LPARAM lParam,
|
|
[in] DWORD dwFlags,
|
|
[out] BOOL *pfEaten);
|
|
};
|
|
|
|
//
|
|
// ITfSysHookSink
|
|
//
|
|
// implemented by AIMM layer
|
|
//
|
|
// This is a private Interface of ITFThreadMgr.
|
|
//
|
|
[
|
|
object,
|
|
uuid(495388DA-21A5-4852-8BB1-ED2F29DA8D60),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfSysHookSink : IUnknown
|
|
{
|
|
HRESULT OnPreFocusDIM([in] HWND hWnd);
|
|
HRESULT OnSysKeyboardProc([in] WPARAM wParam,
|
|
[in] LPARAM lParam);
|
|
HRESULT OnSysShellProc([in] int nCode,
|
|
[in] WPARAM wParam,
|
|
[in] LPARAM lParam);
|
|
};
|
|
|
|
//
|
|
// ITfStartReconversionNotifySink
|
|
//
|
|
// implemented by AIMM layer
|
|
//
|
|
[
|
|
object,
|
|
uuid(b9cd19cb-2919-4935-8768-ef30bae9a0cc),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfStartReconversionNotifySink : IUnknown
|
|
{
|
|
HRESULT StartReconversion();
|
|
HRESULT EndReconversion();
|
|
}
|
|
|
|
//
|
|
// ITfLangBarEventSink_P
|
|
//
|
|
// Implemented by Unified Tip bars.
|
|
// Callback for ITfLangBarMgr.
|
|
//
|
|
[
|
|
object,
|
|
uuid(7a460360-da21-4b09-a8a0-8a69e728d893),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfLangBarEventSink_P: IUnknown
|
|
{
|
|
HRESULT OnLangBarUpdate([in] UINT uPdate, [in] LPARAM lParam);
|
|
}
|
|
|
|
//
|
|
// ITfLangBarMgr_P
|
|
//
|
|
// Implemented by Unified Tip bars.
|
|
// Callback for ITfLangBarMgr.
|
|
//
|
|
[
|
|
object,
|
|
uuid(d72c0fa9-add5-4af0-8706-4fa9ae3e2eff),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfLangBarMgr_P: ITfLangBarMgr
|
|
{
|
|
HRESULT GetPrevShowFloatingStatus([out] DWORD *pdwFlags);
|
|
}
|
|
|
|
//
|
|
// ITfContext_P
|
|
//
|
|
// implemented by Cicero
|
|
//
|
|
// This is a private Interface of ITFContext.
|
|
//
|
|
[
|
|
object,
|
|
uuid(2dee47c8-704d-42a0-9983-ffeed659b64d),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfContext_P : ITfContext
|
|
{
|
|
HRESULT MapAppProperty([in] REFGUID guidAppProp,
|
|
[in] REFGUID guidProp);
|
|
|
|
HRESULT EnableLockRequestPosting([in] BOOL fEnable);
|
|
};
|
|
|
|
//
|
|
// ITfRangeChangeSink
|
|
//
|
|
// Implemented by an application/control.
|
|
//
|
|
// This is an interface we pulled from Cicero 1.0 because no one
|
|
// was using it.
|
|
[
|
|
object,
|
|
uuid(c1a0e6af-0d60-4800-9796-1fe8e85c0cca),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfRangeChangeSink : IUnknown
|
|
{
|
|
HRESULT OnChange([in] ITfRange *pRange);
|
|
};
|
|
|
|
//
|
|
// ITfFnAbort
|
|
//
|
|
[
|
|
object,
|
|
uuid(17f2317f-addb-49df-870e-66227bc51d1a),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfFnAbort : ITfFunction
|
|
{
|
|
HRESULT Abort([in] ITfContext *pic);
|
|
}
|
|
|
|
//
|
|
// ITfMouseTrackerAnchor
|
|
//
|
|
[
|
|
object,
|
|
uuid(f9f4e0f2-d600-4a4c-b144-77e201ebd1b0),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfMouseTrackerAnchor : IUnknown
|
|
{
|
|
HRESULT AdviseMouseSink([in] IAnchor *paStart,
|
|
[in] IAnchor *paEnd,
|
|
[in] ITfMouseSink *pSink,
|
|
[out] DWORD *pdwCookie);
|
|
|
|
HRESULT UnadviseMouseSink([in] DWORD dwCookie);
|
|
};
|
|
|
|
//
|
|
// ITfRangeAnchor
|
|
//
|
|
[
|
|
object,
|
|
uuid(8b99712b-5815-4bcc-b9a9-53db1c8d6755),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfRangeAnchor : ITfRange
|
|
{
|
|
HRESULT GetExtent([out] IAnchor **ppaStart,
|
|
[out] IAnchor **ppaEnd);
|
|
|
|
HRESULT SetExtent([in] IAnchor *paStart,
|
|
[in] IAnchor *paEnd);
|
|
}
|
|
|
|
typedef [uuid(af9f076f-4937-4285-8600-81dca5c31eb6)] struct TF_PERSISTENT_PROPERTY_HEADER_ANCHOR
|
|
{
|
|
GUID guidType; // property type
|
|
IAnchor *paStart; // range information of this property data
|
|
IAnchor *paEnd; // range information of this property data
|
|
ULONG cb; // the data size of pStream in BYTE count
|
|
DWORD dwPrivate; // private data
|
|
CLSID clsidTIP; // the original owner of the property data
|
|
} TF_PERSISTENT_PROPERTY_HEADER_ANCHOR;
|
|
|
|
|
|
//
|
|
// ITfPersistentPropertyLoaderAnchor
|
|
//
|
|
[
|
|
object,
|
|
uuid(2133f790-34c2-11d3-a745-0050040ab407),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfPersistentPropertyLoaderAnchor : IUnknown
|
|
{
|
|
HRESULT LoadProperty([in] const TF_PERSISTENT_PROPERTY_HEADER_ANCHOR *pHdr,
|
|
[out] IStream **ppStream);
|
|
}
|
|
|
|
//
|
|
// ITextStoreAnchorServices
|
|
//
|
|
[
|
|
object,
|
|
uuid(aa80e9fe-2021-11d2-93e0-0060b067b86e),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITextStoreAnchorServices : IUnknown
|
|
{
|
|
HRESULT Serialize([in] ITfProperty *pProp,
|
|
[in] ITfRange *pRange,
|
|
[out] TF_PERSISTENT_PROPERTY_HEADER_ANCHOR *pHdr,
|
|
[in] IStream *pStream);
|
|
|
|
HRESULT Unserialize([in] ITfProperty *pProp,
|
|
[in] const TF_PERSISTENT_PROPERTY_HEADER_ANCHOR *pHdr,
|
|
[in] IStream *pStream,
|
|
[in] ITfPersistentPropertyLoaderAnchor *pLoader);
|
|
|
|
HRESULT ForceLoadProperty([in] ITfProperty *pProp);
|
|
|
|
HRESULT CreateRange([in] IAnchor *paStart,
|
|
[in] IAnchor *paEnd,
|
|
[out] ITfRangeAnchor **ppRange);
|
|
};
|
|
|
|
//
|
|
// ITfProperty2
|
|
//
|
|
[
|
|
object,
|
|
uuid(db261faa-2142-486a-b5c6-d2101bc03d2e),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfProperty2 : ITfProperty
|
|
{
|
|
const DWORD TF_FNV_BACKWARD = 0x1;
|
|
const DWORD TF_FNV_NO_CONTAINED = 0x2;
|
|
|
|
HRESULT FindNextValue([in] TfEditCookie ec,
|
|
[in] ITfRange *pRangeQuery,
|
|
[in] TfAnchor tfAnchorQuery,
|
|
[in] DWORD dwFlags,
|
|
[out] BOOL *pfContained,
|
|
[out] ITfRange **ppRangeNextValue);
|
|
|
|
// Issue: should be FindNextValues, takes multiple properties
|
|
};
|
|
|
|
const ULONG TF_DA_PRIORITY_HIGHEST = 0;
|
|
const ULONG TF_DA_PRIORITY_DEFAULT_SPELLING = 8;
|
|
const ULONG TF_DA_PRIORITY_DEFAULT_GRAMMAR = 16;
|
|
const ULONG TF_DA_PRIORITY_DEFAULT = 24;
|
|
const ULONG TF_DA_PRIORITY_LOWEST = 31;
|
|
|
|
typedef struct
|
|
{
|
|
ULONG uPriority;
|
|
GUID guidProperty;
|
|
} TF_DA_PROPERTY;
|
|
|
|
//
|
|
// IEnumTfCollection
|
|
//
|
|
[
|
|
object,
|
|
uuid(1c760b20-ed66-4dbd-9ff1-68fc21c02922),
|
|
pointer_default(unique)
|
|
]
|
|
interface IEnumTfCollection : IUnknown
|
|
{
|
|
HRESULT Clone([out] IEnumTfCollection **ppClone);
|
|
|
|
HRESULT Next([in] ULONG ulCount,
|
|
[out, size_is(ulCount), length_is(*pcFetched)] TF_DA_PROPERTY *rgCollection,
|
|
[out] ULONG *pcFetched);
|
|
|
|
HRESULT Reset();
|
|
|
|
HRESULT Skip([in] ULONG ulCount);
|
|
};
|
|
|
|
//
|
|
// ITfDisplayAttributeCollectionMgr
|
|
//
|
|
[
|
|
object,
|
|
uuid(4e3d2d48-3c17-457d-84a1-f209476de897),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfDisplayAttributeCollectionMgr : IUnknown
|
|
{
|
|
HRESULT EnumCollections([out] IEnumTfCollection **ppEnum);
|
|
};
|
|
|
|
//
|
|
// ITfDisplayAttributeCollectionProvider
|
|
//
|
|
[
|
|
object,
|
|
uuid(3977526d-1a0a-435a-8d06-ecc9516b484f),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfDisplayAttributeCollectionProvider : IUnknown
|
|
{
|
|
HRESULT GetCollectionCount([out] ULONG *puCount);
|
|
|
|
HRESULT GetCollection([in] ULONG uCount,
|
|
[out, size_is(uCount), length_is(*pcGUIDsOut)] TF_DA_PROPERTY *prgProperty,
|
|
[out] ULONG *pcGUIDsOut);
|
|
};
|
|
|
|
typedef struct
|
|
{
|
|
ITfRange *pRange;
|
|
TF_DISPLAYATTRIBUTE tfDisplayAttr;
|
|
} TF_RENDERINGMARKUP;
|
|
|
|
//
|
|
// IEnumTfRenderingMarkup
|
|
//
|
|
[
|
|
object,
|
|
uuid(8c03d21b-95a7-4ba0-ae1b-7fce12a72930),
|
|
pointer_default(unique)
|
|
]
|
|
interface IEnumTfRenderingMarkup : IUnknown
|
|
{
|
|
HRESULT Clone([out] IEnumTfRenderingMarkup **ppClone);
|
|
|
|
HRESULT Next([in] ULONG ulCount,
|
|
[out, size_is(ulCount), length_is(*pcFetched)] TF_RENDERINGMARKUP *rgMarkup,
|
|
[out] ULONG *pcFetched);
|
|
|
|
HRESULT Reset();
|
|
|
|
HRESULT Skip([in] ULONG ulCount);
|
|
};
|
|
|
|
//
|
|
// ITfContextRenderingMarkup
|
|
//
|
|
[
|
|
object,
|
|
uuid(a305b1c0-c776-4523-bda0-7c5a2e0fef10),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfContextRenderingMarkup : IUnknown
|
|
{
|
|
const DWORD TF_GRM_INCLUDE_PROPERTY = 0x1;
|
|
|
|
HRESULT GetRenderingMarkup([in] TfEditCookie ec,
|
|
[in] DWORD dwFlags,
|
|
[in] ITfRange *pRangeCover,
|
|
[out] IEnumTfRenderingMarkup **ppEnum);
|
|
|
|
const DWORD TF_FRM_INCLUDE_PROPERTY = 0x1;
|
|
const DWORD TF_FRM_BACKWARD = 0x2;
|
|
const DWORD TF_FRM_NO_CONTAINED = 0x4;
|
|
const DWORD TF_FRM_NO_RANGE = 0x8;
|
|
|
|
HRESULT FindNextRenderingMarkup([in] TfEditCookie ec,
|
|
[in] DWORD dwFlags,
|
|
[in] ITfRange *pRangeQuery,
|
|
[in] TfAnchor tfAnchorQuery,
|
|
[out] ITfRange **ppRangeFound,
|
|
[out] TF_RENDERINGMARKUP *ptfRenderingMarkup);
|
|
};
|
|
|
|
//
|
|
// ITfBackgroundThreadMgr
|
|
//
|
|
[
|
|
object,
|
|
local,
|
|
uuid(38462b47-6127-4464-bd2f-46957c31ad0e),
|
|
pointer_default(unique)
|
|
]
|
|
interface ITfBackgroundThreadMgr : IUnknown
|
|
{
|
|
typedef BOOL (*TfBackgroundThreadCallback)([in] BOOL fCleanup, [in] void *pvPrivate);
|
|
typedef BOOL (*TfWakeAppBackgroundThreadProc)(void);
|
|
|
|
HRESULT AppInitBackgroundThread([in] TfWakeAppBackgroundThreadProc pfnWakeThread,
|
|
[out] TfBackgroundThreadCallback *ppfnCallback,
|
|
[out] void **ppvPrivate);
|
|
|
|
HRESULT AppUninitBackgroundThread();
|
|
|
|
HRESULT AdviseBackgroundCallback([in] TfBackgroundThreadCallback pfnCallback,
|
|
[in] void *pvPrivate,
|
|
[out] DWORD *pdwCookie);
|
|
|
|
HRESULT UnadviseBackgroundCallback([in] DWORD dwCookie);
|
|
|
|
HRESULT WakeBackgroundThread();
|
|
};
|
|
|
|
|
|
cpp_quote("#endif // MSCTFP_DEFINED")
|