InputHandler // Expose generateStateOfCandidates().

This commit is contained in:
ShikiSuen 2022-11-30 22:33:02 +08:00
parent eb7076e318
commit d870d5ad2a
2 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ public protocol InputHandlerProtocol {
func clearComposerAndCalligrapher() func clearComposerAndCalligrapher()
func ensureKeyboardParser() func ensureKeyboardParser()
func handleEvent(_ event: NSEvent) -> Bool func handleEvent(_ event: NSEvent) -> Bool
func generateStateOfCandidates() -> IMEStateProtocol
func generateStateOfInputting(sansReading: Bool) -> IMEStateProtocol func generateStateOfInputting(sansReading: Bool) -> IMEStateProtocol
func generateStateOfAssociates(withPair pair: Megrez.Compositor.KeyValuePaired) -> IMEStateProtocol func generateStateOfAssociates(withPair pair: Megrez.Compositor.KeyValuePaired) -> IMEStateProtocol
func consolidateNode(candidate: (String, String), respectCursorPushing: Bool, preConsolidate: Bool) func consolidateNode(candidate: (String, String), respectCursorPushing: Bool, preConsolidate: Bool)

View File

@ -90,7 +90,7 @@ extension InputHandler {
/// ///
/// - Returns: /// - Returns:
func generateStateOfCandidates() -> IMEStateProtocol { public func generateStateOfCandidates() -> IMEStateProtocol {
IMEState.ofCandidates( IMEState.ofCandidates(
candidates: generateArrayOfCandidates(fixOrder: prefs.useFixecCandidateOrderOnSelection), candidates: generateArrayOfCandidates(fixOrder: prefs.useFixecCandidateOrderOnSelection),
displayTextSegments: compositor.walkedNodes.values, displayTextSegments: compositor.walkedNodes.values,