輸入法開發(fā)——<三>接口,系統(tǒng),msctf.h
天殺的官方文檔,系統(tǒng)接口和用戶接口寫一篇文章里,不過不要擔(dān)心,屎山我來啃
你們看這個文章就好了,別忘了贊一個。本篇主要是 msctf.h 中所定義的接口。
C/C++ 并不支持 Interface. 在 Windows 中的實現(xiàn)方法類似 C callback 將方法的指針安裝到系統(tǒng)。
系統(tǒng)接口是由文本服務(wù)或應(yīng)用程序使用的
msctf.h 頭文件

IEnumITfCompositionView
以枚舉?ITfCompositionView 對象的方法獲得 ITfCompositionView 對象
以下 IEnum 描述都是相同的,枚舉獲取相應(yīng)對象用的
IEnumTfContexts
IEnumTfDisplayAttributeInfo
IEnumTfDocumentMgrs
IEnumTfFunctionProviders
IEnumTfInputProcessorProfiles
IEnumTfLanguageProfiles
IEnumTfProperties
IEnumTfPropertyValue
IEnumTfRanges
IEnumTfUIElements

ITextStoreACPServices
不知道干啥的
ITfClientId
用于獲取 ClientId
ITfCompartment
用于在 TSF Compartment 中 獲取/儲存 信息
ITfCompartmentMgr
可以獲取一個枚舉器,該枚舉器包含 CompartmentMgr 的 Compartment 的 GUID,獲取/清除 ITfCompartment 對象
ITfComposition
提供一個方法使文本處于未提交但可以被 應(yīng)用讀取、修改特效、不過依然可以被 IME 修改的狀態(tài)

用 ITfContextComposition 獲取
ITfCompositionView
應(yīng)用使用這個接口讀取 ITfComposition 中的文本
上面的 mathtype 就是用這個方法讀取 mat 后得到的
ITfConfigureSystemKeystrokeFeed
禁用 鍵擊 處理
ITfContext
編輯文本的重要接口之一
ITfContextComposition
用于獲取 ITfComposition
ITfContextOwnerCompositionServices
上下文的所有者可以用這個操控文本服務(wù)創(chuàng)建的?Composition?
ITfContextView
捕獲文本所在屏幕的位置、窗口等
ITfDisplayAttributeMgr
獲取和枚舉顯示屬性
通過 ITfDisplayAttributeInfo 接口以訪問單個顯示屬性
ITfDocumentMgr
用于創(chuàng)建、控制上 ITfContext 對象
ITfEditRecord
ITfTextEditSink 接口使用這個接口確認?ITfEditSession 工作時修改的內(nèi)容
ITfInputProcessorProfileMgr
用于管理輸入法配置
ITfInputProcessorProfiles
用于管理語言、鍵盤布局
ITfInputProcessorProfilesEx
ITfInputProcessorProfiles 的拓展
ITfKeystrokeMgr
用來與鍵盤管理器 ITfKeyEventSink 交互
ITfMessagePump
用于應(yīng)用從消息隊列中獲取消息
ITfMouseTracker
用于管理?ITfMouseSink
ITfProperty
修改屬性值
ITfQueryEmbedded
確定上下文是否可以接受嵌入對象
ITfRangeACP
用于基于文字的應(yīng)用訪問、控制 ITfRange 對象
ITfRangeBackup
拷貝、備份ITfRange 對象
ITfReadOnlyProperty
獲取屬性
ITfSource
安裝、卸載多個?Sink 接收器
ITfSourceSingle
安裝、卸載單個 Sink 接收器