Repo // Comment updates.
This commit is contained in:
parent
9d51781eda
commit
d5fbcf5e2c
|
@ -15,7 +15,7 @@ extension vChewingLM {
|
|||
/// 的 LangModelProtocol 協定的模組、統籌且整理來自其它子模組的資料(包括使
|
||||
/// 用者語彙、繪文字模組、語彙濾除表、原廠語言模組等)。
|
||||
///
|
||||
/// LMI 型別為與輸入法按鍵調度模組直接溝通之唯一語言模組。當組字器開始根據給定的
|
||||
/// LMI 型別為與輸入法輸入調度模組直接溝通之唯一語言模組。當組字器開始根據給定的
|
||||
/// 讀音鏈構築語句時,LMI 會接收來自組字器的讀音、輪流檢查自身是否有可以匹配到的
|
||||
/// 單元圖結果,然後將結果整理為陣列、再回饋給組字器。
|
||||
///
|
||||
|
|
|
@ -11,7 +11,7 @@ import Megrez
|
|||
import Shared
|
||||
import Tekkon
|
||||
|
||||
/// 該檔案乃按鍵調度模組的核心部分,主要承接型別初期化內容、協定內容、以及
|
||||
/// 該檔案乃輸入調度模組的核心部分,主要承接型別初期化內容、協定內容、以及
|
||||
/// 被封裝的「與 Megrez 組字引擎和 Tekkon 注拼引擎對接的」各種工具函式。
|
||||
/// 注意:不要把 composer 注拼槽與 compositor 組字器這兩個概念搞混。
|
||||
|
||||
|
@ -48,7 +48,7 @@ public protocol InputHandlerDelegate {
|
|||
|
||||
// MARK: - 核心 (Kernel).
|
||||
|
||||
/// InputHandler 按鍵調度模組。
|
||||
/// InputHandler 輸入調度模組。
|
||||
public class InputHandler: InputHandlerProtocol {
|
||||
/// 委任物件 (SessionCtl),以便呼叫其中的函式。
|
||||
public var delegate: InputHandlerDelegate?
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// marks, or product names of Contributor, except as required to fulfill notice
|
||||
// requirements defined in MIT License.
|
||||
|
||||
/// 該檔案乃按鍵調度模組當中「用來規定在選字窗出現時的按鍵行為」的部分。
|
||||
/// 該檔案乃輸入調度模組當中「用來規定在選字窗出現時的按鍵行為」的部分。
|
||||
|
||||
import CandidateWindow
|
||||
import CocoaExtension
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// marks, or product names of Contributor, except as required to fulfill notice
|
||||
// requirements defined in MIT License.
|
||||
|
||||
/// 該檔案乃按鍵調度模組當中用來預處理 NSEvent 的模組。
|
||||
/// 該檔案乃輸入調度模組當中用來預處理 NSEvent 的模組。
|
||||
|
||||
import InputMethodKit
|
||||
import Shared
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
// marks, or product names of Contributor, except as required to fulfill notice
|
||||
// requirements defined in MIT License.
|
||||
|
||||
/// 該檔案乃按鍵調度模組當中「用來規定當 IMK 接受按鍵訊號時且首次交給按鍵調度模組處理時、
|
||||
/// 按鍵調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。
|
||||
/// 該檔案乃輸入調度模組當中「用來規定當 IMK 接受按鍵訊號時且首次交給輸入調度模組處理時、
|
||||
/// 輸入調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。
|
||||
|
||||
import CocoaExtension
|
||||
import IMKUtils
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// marks, or product names of Contributor, except as required to fulfill notice
|
||||
// requirements defined in MIT License.
|
||||
|
||||
/// 該檔案乃按鍵調度模組的用以承載「根據按鍵行為來調控模式」的各種成員函式的部分。
|
||||
/// 該檔案乃輸入調度模組的用以承載「根據按鍵行為來調控模式」的各種成員函式的部分。
|
||||
|
||||
import Megrez
|
||||
import Shared
|
||||
|
|
|
@ -61,7 +61,7 @@ public class SessionCtl: IMKInputController {
|
|||
}
|
||||
}
|
||||
|
||||
/// 按鍵調度模組的副本。
|
||||
/// 輸入調度模組的副本。
|
||||
var inputHandler: InputHandlerProtocol = InputHandler(
|
||||
lm: LMMgr.currentLM(), uom: LMMgr.currentUOM(), pref: PrefMgr.shared
|
||||
)
|
||||
|
@ -165,7 +165,7 @@ extension SessionCtl {
|
|||
}
|
||||
}
|
||||
|
||||
/// 重設按鍵調度模組,會將當前尚未遞交的內容遞交出去。
|
||||
/// 重設輸入調度模組,會將當前尚未遞交的內容遞交出去。
|
||||
public func resetInputHandler() {
|
||||
// 過濾掉尚未完成拼寫的注音。
|
||||
if state.type == .ofInputting, PrefMgr.shared.trimUnfinishedReadingsOnCommit {
|
||||
|
|
|
@ -34,7 +34,9 @@ extension SessionCtl {
|
|||
/// 針對某一個客體的 deactivateServer() 可能會在使用者切換到另一個客體應用
|
||||
/// 且開始敲字之後才會執行。這個過程會使得不同的 SessionCtl 副本之間出現
|
||||
/// 不必要的互相干涉、打斷彼此的工作。
|
||||
/// - Parameter newState: 新狀態。
|
||||
/// - Parameters:
|
||||
/// - newState: 新狀態。
|
||||
/// - replace: 是否取代現有狀態。
|
||||
public func handle(state newState: IMEStateProtocol, replace: Bool) {
|
||||
var previous = state
|
||||
if replace { state = newState }
|
||||
|
|
Loading…
Reference in New Issue