From f58b4d37c5d61d4fd5a03c36ba969435a2e68fad Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 23 Aug 2022 09:45:31 +0800 Subject: [PATCH] Repo // Remove useless headers. --- Source/3rdParty/Qwertyyb/ShiftKeyUpChecker.swift | 2 -- Source/Modules/ControllerModules/AppleKeyboardConverter.swift | 2 -- Source/Modules/ControllerModules/InputState.swift | 2 +- Source/Modules/ControllerModules/KeyHandler_Core.swift | 2 +- .../Modules/ControllerModules/KeyHandler_HandleCandidate.swift | 2 +- Source/Modules/ControllerModules/KeyHandler_HandleInput.swift | 2 +- Source/Modules/ControllerModules/KeyHandler_States.swift | 2 +- Source/Modules/ControllerModules/StringUtils.swift | 2 +- Source/Modules/ControllerModules/ctlInputMethod_Core.swift | 1 - .../ControllerModules/ctlInputMethod_HandleDisplay.swift | 1 - Source/Modules/IMEModules/IME.swift | 2 +- Source/Modules/IMEModules/InputSourceHelper.swift | 2 +- Source/Modules/LangModelRelated/mgrLangModel.swift | 2 +- Source/Modules/UIModules/PrefUI/ctlPrefUI.swift | 1 - Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift | 1 - Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift | 1 - 16 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Source/3rdParty/Qwertyyb/ShiftKeyUpChecker.swift b/Source/3rdParty/Qwertyyb/ShiftKeyUpChecker.swift index 43ae41b9..7985aa68 100644 --- a/Source/3rdParty/Qwertyyb/ShiftKeyUpChecker.swift +++ b/Source/3rdParty/Qwertyyb/ShiftKeyUpChecker.swift @@ -2,9 +2,7 @@ // ==================== // This code is released under the MIT license (SPDX-License-Identifier: MIT) -import Carbon import Cocoa -import Foundation extension Date { static func - (lhs: Date, rhs: Date) -> TimeInterval { diff --git a/Source/Modules/ControllerModules/AppleKeyboardConverter.swift b/Source/Modules/ControllerModules/AppleKeyboardConverter.swift index 61a02037..df3a8a45 100644 --- a/Source/Modules/ControllerModules/AppleKeyboardConverter.swift +++ b/Source/Modules/ControllerModules/AppleKeyboardConverter.swift @@ -6,8 +6,6 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa - enum AppleKeyboardConverter { static let arrDynamicBasicKeyLayout: [String] = [ "com.apple.keylayout.ZhuyinBopomofo", diff --git a/Source/Modules/ControllerModules/InputState.swift b/Source/Modules/ControllerModules/InputState.swift index 28a61cc8..e5735965 100644 --- a/Source/Modules/ControllerModules/InputState.swift +++ b/Source/Modules/ControllerModules/InputState.swift @@ -8,7 +8,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa +import Foundation // 註:所有 InputState 型別均不適合使用 Struct,因為 Struct 無法相互繼承派生。 diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 89d50c0f..f6c62541 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -12,7 +12,7 @@ /// 被封裝的「與 Megrez 組字引擎和 Tekkon 注拼引擎對接的」各種工具函式。 /// 注意:不要把 composer 注拼槽與 compositor 組字器這兩個概念搞混。 -import Cocoa +import Foundation // MARK: - 委任協定 (Delegate). diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift b/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift index ed2d5771..601ffd1d 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift @@ -10,7 +10,7 @@ /// 該檔案乃按鍵調度模組當中「用來規定在選字窗出現時的按鍵行為」的部分。 -import Cocoa +import Foundation // MARK: - § 對選字狀態進行調度 (Handle Candidate State). diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index 7d5ff2b5..bf46972f 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -11,7 +11,7 @@ /// 該檔案乃按鍵調度模組當中「用來規定當 IMK 接受按鍵訊號時且首次交給按鍵調度模組處理時、 /// 按鍵調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。 -import Cocoa +import Foundation // MARK: - § 根據狀態調度按鍵輸入 (Handle Input with States) diff --git a/Source/Modules/ControllerModules/KeyHandler_States.swift b/Source/Modules/ControllerModules/KeyHandler_States.swift index 6b2e258e..f39757bd 100644 --- a/Source/Modules/ControllerModules/KeyHandler_States.swift +++ b/Source/Modules/ControllerModules/KeyHandler_States.swift @@ -10,7 +10,7 @@ /// 該檔案乃按鍵調度模組的用以承載「根據按鍵行為來調控模式」的各種成員函式的部分。 -import Cocoa +import Foundation // MARK: - § 根據按鍵行為來調控模式的函式 (Functions Interact With States). diff --git a/Source/Modules/ControllerModules/StringUtils.swift b/Source/Modules/ControllerModules/StringUtils.swift index 7f418e7d..d1fcfd47 100644 --- a/Source/Modules/ControllerModules/StringUtils.swift +++ b/Source/Modules/ControllerModules/StringUtils.swift @@ -8,7 +8,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa +import Foundation /// Shiki's Notes: The cursor index in the IMK inline composition buffer /// still uses UTF16 index measurements. This means that any attempt of diff --git a/Source/Modules/ControllerModules/ctlInputMethod_Core.swift b/Source/Modules/ControllerModules/ctlInputMethod_Core.swift index d9a9cb70..bffdd2c1 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_Core.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_Core.swift @@ -8,7 +8,6 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa import InputMethodKit /// 輸入法控制模組,乃在輸入法端用以控制輸入行為的基礎型別。 diff --git a/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift b/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift index 70866837..a0c5e50f 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift @@ -9,7 +9,6 @@ // requirements defined in MIT License. import Cocoa -import Foundation // MARK: - Tooltip Display and Candidate Display Methods diff --git a/Source/Modules/IMEModules/IME.swift b/Source/Modules/IMEModules/IME.swift index ea7a76dd..ecde1e14 100644 --- a/Source/Modules/IMEModules/IME.swift +++ b/Source/Modules/IMEModules/IME.swift @@ -6,8 +6,8 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Carbon import Cocoa +import InputMethodKit // The namespace of this input method. public enum vChewing {} diff --git a/Source/Modules/IMEModules/InputSourceHelper.swift b/Source/Modules/IMEModules/InputSourceHelper.swift index db024a0b..cc105138 100644 --- a/Source/Modules/IMEModules/InputSourceHelper.swift +++ b/Source/Modules/IMEModules/InputSourceHelper.swift @@ -8,8 +8,8 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Carbon import Cocoa +import InputMethodKit public class InputSourceHelper: NSObject { @available(*, unavailable) diff --git a/Source/Modules/LangModelRelated/mgrLangModel.swift b/Source/Modules/LangModelRelated/mgrLangModel.swift index d6f721f8..218c58e7 100644 --- a/Source/Modules/LangModelRelated/mgrLangModel.swift +++ b/Source/Modules/LangModelRelated/mgrLangModel.swift @@ -8,7 +8,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa +import Foundation /// 我們不能讓 mgrLangModel 這個靜態管理器來承載下面這些副本變數。 /// 所以,這些副本變數只能放在 mgrLangModel 的外部。 diff --git a/Source/Modules/UIModules/PrefUI/ctlPrefUI.swift b/Source/Modules/UIModules/PrefUI/ctlPrefUI.swift index 11edc7c7..5cc2f2fe 100644 --- a/Source/Modules/UIModules/PrefUI/ctlPrefUI.swift +++ b/Source/Modules/UIModules/PrefUI/ctlPrefUI.swift @@ -6,7 +6,6 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa import SwiftUI extension NSImage { diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift index 94cb5253..da9738af 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift @@ -6,7 +6,6 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa import SwiftUI @available(macOS 10.15, *) diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift index cdef3340..8afb1697 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift @@ -6,7 +6,6 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Cocoa import SwiftUI @available(macOS 10.15, *)