this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Carbon: Add more TIS keyboard properties (used by Qt)

+19 -4
+3
src/frameworks/Carbon/HIToolbox/TextInputSources.h
··· 9 9 typedef struct __TISInputSource* TISInputSourceRef; 10 10 11 11 extern const CFStringRef kTISPropertyUnicodeKeyLayoutData; 12 + extern const CFStringRef kTISPropertyInputSourceLanguages; 13 + extern const CFStringRef kTISPropertyLocalizedName; 12 14 13 15 extern TISInputSourceRef TISCopyCurrentKeyboardLayoutInputSource(void); 16 + extern TISInputSourceRef TISCopyCurrentKeyboardInputSource(void); 14 17 15 18 extern void* TISGetInputSourceProperty(TISInputSourceRef inputSourceRef, CFStringRef key); 16 19
+14 -3
src/frameworks/Carbon/HIToolbox/TextInputSources.mm
··· 8 8 static int g_lastKeyboardLayoutId = -1; 9 9 static TISInputSourceRef g_lastKeyboardLayout = NULL; 10 10 11 + const CFStringRef kTISPropertyInputSourceLanguages = CFSTR("TISPropertyInputSourceLanguages"); 12 + const CFStringRef kTISPropertyLocalizedName = CFSTR("TISPropertyLocalizedName"); 13 + 14 + TISInputSourceRef TISCopyCurrentKeyboardInputSource(void) 15 + { 16 + return TISCopyCurrentKeyboardLayoutInputSource(); 17 + } 18 + 11 19 TISInputSourceRef TISCopyCurrentKeyboardLayoutInputSource(void) 12 20 { 13 21 NSDisplay* display = [NSClassFromString(@"NSDisplay") currentDisplay]; ··· 35 43 CFDataRef data = CFDataCreate(NULL, (UInt8*) layout, length); 36 44 free(layout); 37 45 38 - const void* keys[1] = { kTISPropertyUnicodeKeyLayoutData }; 39 - const void* values[1] = { data }; 40 - CFDictionaryRef dict = CFDictionaryCreate(NULL, keys, values, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 46 + NSString *name, *fullName; 47 + [display keyboardLayoutName: &name fullName:&fullName]; 48 + 49 + const void* keys[] = { kTISPropertyUnicodeKeyLayoutData, kTISPropertyLocalizedName, kTISPropertyInputSourceLanguages }; 50 + const void* values[] = { data, fullName, @[name] }; 51 + CFDictionaryRef dict = CFDictionaryCreate(NULL, keys, values, 3, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 41 52 42 53 CFRelease(data); 43 54
+2 -1
src/native/CMakeLists.txt
··· 11 11 wrap_elf(Xext libXext.so) 12 12 wrap_elf(XRandR libXrandr.so) 13 13 wrap_elf(Xcursor libXcursor.so) 14 + wrap_elf(xkbfile libxkbfile.so) 14 15 wrap_elf(cairo libcairo.so) 15 16 wrap_elf(EGL libEGL.so) 16 17 wrap_elf(fontconfig libfontconfig.so) 17 18 wrap_elf(dbus libdbus-1.so) 18 19 wrap_elf(GL libGL.so "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries") 19 - wrap_elf(GLU libGLU.so "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries") 20 + wrap_elf(GLU libGLU.so "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries")