SessionCtl // Attempt to do annotations with IMKCandidates.

This commit is contained in:
ShikiSuen 2022-10-24 11:04:09 +08:00
parent 5fbc2fb728
commit 11d2ce635d
1 changed files with 11 additions and 14 deletions

View File

@ -7,6 +7,7 @@
// requirements defined in MIT License. // requirements defined in MIT License.
import Foundation import Foundation
import Shared
import Tekkon import Tekkon
// MARK: - IMKCandidates // MARK: - IMKCandidates
@ -53,20 +54,16 @@ extension SessionCtl {
} }
/// IMK /// IMK
/// - Parameter _: /// - Parameter currentSelection:
public override func candidateSelectionChanged(_: NSAttributedString!) { public override func candidateSelectionChanged(_ currentSelection: NSAttributedString!) {
// guard let currentCandidate = currentSelection?.string, !currentCandidate.isEmpty else { return }
// IMKServer.commitCompositionWithReply() commitComposition() let annotation = reverseLookup(for: currentCandidate).joined(separator: "\n")
// inputHandler guard !annotation.isEmpty else { return }
vCLog("Current Annotation: \(annotation)")
// DispatchQueue.main.async {
guard let imkCandidates = self.ctlCandidateCurrent as? CtlCandidateIMK else { return }
// imkCandidates.showAnnotation(.init(string: annotation))
// ctlCandidateIMK identifier }
// NSNotFound NSLog identifier
// console ips
// candidateSelected() identifier NSNotFound
// IMK 西
} }
/// IMK /// IMK