Files
keyboard/CustomKeyboard/Manager/KBKeyboardLayoutResolver.h
2026-03-02 09:19:06 +08:00

38 lines
1.1 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// KBKeyboardLayoutResolver.h
// CustomKeyboard
//
// 扩展侧布局解析器:根据 profileId 解析对应的布局配置
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface KBKeyboardLayoutResolver : NSObject
+ (instancetype)sharedResolver;
/// 根据 profileId 获取对应的布局 JSON ID
/// @param profileId 输入配置 ID如 "es_ES_azerty"
/// @return 布局 JSON ID如 "letters_azerty"),如果未找到返回 "letters"
- (NSString *)layoutJsonIdForProfileId:(NSString *)profileId;
/// 根据 profileId 获取对应的联想引擎类型
/// @param profileId 输入配置 ID
/// @return 联想引擎类型(如 "latin", "pinyin_traditional", "bopomofo"
- (NSString *)suggestionEngineForProfileId:(NSString *)profileId;
/// 从 App Group 读取当前选中的 profileId
- (nullable NSString *)currentProfileId;
/// 从 App Group 读取当前选中的语言代码
- (nullable NSString *)currentLanguageCode;
/// 从 App Group 读取当前选中的布局变体
- (nullable NSString *)currentLayoutVariant;
@end
NS_ASSUME_NONNULL_END