ctlIME // +isAssociatedPhrasesMode for ctlCandidateDelegate.

This commit is contained in:
ShikiSuen 2022-08-14 10:26:28 +08:00
parent 1a52ddfaa2
commit 1fbf7f0c72
2 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,8 @@ extension ctlInputMethod: KeyHandlerDelegate {
// MARK: - Candidate Controller Delegate // MARK: - Candidate Controller Delegate
extension ctlInputMethod: ctlCandidateDelegate { extension ctlInputMethod: ctlCandidateDelegate {
var isAssociatedPhrasesMode: Bool { state is InputState.AssociatedPhrases }
func handleDelegateEvent(_ event: NSEvent!) -> Bool { func handleDelegateEvent(_ event: NSEvent!) -> Bool {
// Shift macOS 10.15 macOS // Shift macOS 10.15 macOS
if #available(macOS 10.15, *) { if #available(macOS 10.15, *) {

View File

@ -27,6 +27,7 @@ public class CandidateKeyLabel: NSObject {
} }
public protocol ctlCandidateDelegate: AnyObject { public protocol ctlCandidateDelegate: AnyObject {
var isAssociatedPhrasesMode: Bool { get }
func handleDelegateEvent(_ event: NSEvent!) -> Bool func handleDelegateEvent(_ event: NSEvent!) -> Bool
func candidateCountForController(_ controller: ctlCandidateProtocol) -> Int func candidateCountForController(_ controller: ctlCandidateProtocol) -> Int
func candidatesForController(_ controller: ctlCandidateProtocol) -> [(String, String)] func candidatesForController(_ controller: ctlCandidateProtocol) -> [(String, String)]