diff src/video/x11/SDL_x11dyn.c @ 2325:c7bcf84ba1b9

Next version of internationalized input for X11. On my machine (famous last words :-) with a US English keyboard and locale I can compose ` and e and get a text input event with the character รจ. You still get the keypress keyrelease events for the individual keys that go into composing the character.
author Bob Pendleton <bob@pendleton.com>
date Fri, 07 Mar 2008 20:54:11 +0000
parents 2c835d58faad
children 6fc50bdd88c0
line wrap: on
line diff
--- a/src/video/x11/SDL_x11dyn.c	Fri Mar 07 17:20:37 2008 +0000
+++ b/src/video/x11/SDL_x11dyn.c	Fri Mar 07 20:54:11 2008 +0000
@@ -98,6 +98,7 @@
 /* Annoying varargs entry point... */
 #ifdef X_HAVE_UTF8_STRING
 XIC(*pXCreateIC) (XIM,...) = NULL;
+char *(*pXGetICValues) (XIC, ...) = NULL;
 #endif
 
 /* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
@@ -128,6 +129,7 @@
 
 #ifdef X_HAVE_UTF8_STRING
             pXCreateIC = NULL;
+            pXGetICValues = NULL;
 #endif
 
             for (i = 0; i < SDL_TABLESIZE(x11libs); i++) {
@@ -165,6 +167,8 @@
 
 #ifdef X_HAVE_UTF8_STRING
         X11_GetSym("XCreateIC", &SDL_X11_HAVE_UTF8, (void **) &pXCreateIC);
+        X11_GetSym("XGetICValues", &SDL_X11_HAVE_UTF8,
+                   (void **) &pXGetICValues);
 #endif
 
         if (SDL_X11_HAVE_BASEXLIB) {
@@ -179,6 +183,7 @@
 #else
 #ifdef X_HAVE_UTF8_STRING
     pXCreateIC = XCreateIC;
+    pXGetICValues = XGetICValues;
 #endif
 #endif