|
|
|
@ -421,6 +421,7 @@ KEYBT* createKeyBt(const UCKeyboardLayout* keyLayout, int vkk) |
|
|
|
|
|
|
|
|
|
void UBPlatformUtils::initializeKeyboardLayouts() |
|
|
|
|
{ |
|
|
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
|
|
|
|
CFStringRef keys[] = { kTISPropertyInputSourceCategory, kTISPropertyInputSourceIsEnableCapable, kTISPropertyInputSourceIsSelectCapable }; |
|
|
|
|
const void* values[] = { kTISCategoryKeyboardInputSource, kCFBooleanTrue, kCFBooleanTrue }; |
|
|
|
|
CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)keys, (const void **)values, 3, NULL, NULL); |
|
|
|
@ -501,7 +502,7 @@ void UBPlatformUtils::initializeKeyboardLayouts() |
|
|
|
|
QString ID = QStringFromStringRef(sr); |
|
|
|
|
|
|
|
|
|
sr = (CFStringRef) TISGetInputSourceProperty(keyLayoutRef, kTISPropertyLocalizedName); |
|
|
|
|
QString fullName = QStringFromStringRef(sr); |
|
|
|
|
QString fullName = QString::fromUtf8([sr UTF8String], strlen([sr UTF8String])); |
|
|
|
|
|
|
|
|
|
CFArrayRef langs = (CFArrayRef) TISGetInputSourceProperty(keyLayoutRef, kTISPropertyInputSourceLanguages); |
|
|
|
|
|
|
|
|
@ -534,7 +535,7 @@ void UBPlatformUtils::initializeKeyboardLayouts() |
|
|
|
|
for(int i=0; i<nKeyboardLayouts; i++) |
|
|
|
|
keyboardLayouts[i] = result[i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[pool drain]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBPlatformUtils::destroyKeyboardLayouts() |
|
|
|
|