38 lines
1.1 KiB
Objective-C
38 lines
1.1 KiB
Objective-C
//
|
||
// 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
|