Files
keyboard/Shared/KBInputProfileManager.h

49 lines
1.4 KiB
C
Raw Normal View History

2026-03-02 09:19:06 +08:00
//
// KBInputProfileManager.h
// KeyBoard
//
// 管理输入配置(语言 + 布局)的统一配置中心
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface KBInputProfileLayout : NSObject
@property (nonatomic, copy) NSString *variant;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *profileId;
@property (nonatomic, copy) NSString *layoutJsonId;
@property (nonatomic, copy) NSString *suggestionEngine;
@end
@interface KBInputProfile : NSObject
@property (nonatomic, copy) NSString *code;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *defaultSkinZip;
@property (nonatomic, strong) NSArray<KBInputProfileLayout *> *layouts;
@end
@interface KBInputProfileManager : NSObject
+ (instancetype)sharedManager;
/// 获取所有支持的语言配置
- (NSArray<KBInputProfile *> *)allProfiles;
/// 根据语言代码获取配置
- (nullable KBInputProfile *)profileForLanguageCode:(NSString *)languageCode;
/// 根据 profileId 获取布局配置
- (nullable KBInputProfileLayout *)layoutForProfileId:(NSString *)profileId;
/// 根据 profileId 获取对应的 layoutJsonId
- (nullable NSString *)layoutJsonIdForProfileId:(NSString *)profileId;
/// 根据 profileId 获取对应的联想引擎类型
- (nullable NSString *)suggestionEngineForProfileId:(NSString *)profileId;
@end
NS_ASSUME_NONNULL_END