test/testime.c
branchgsoc2009_IME
changeset 3132 88861448961f
parent 3131 009bd8f81947
child 3133 84119fe89d26
--- a/test/testime.c	Wed Jul 01 05:52:17 2009 +0000
+++ b/test/testime.c	Wed Jul 01 07:33:58 2009 +0000
@@ -111,6 +111,15 @@
             SDL_StartTextInput(&markedRect);
             break;
 
+        case SDL_TEXTEDITING:
+            fprintf(stderr, "text editing \"%s\", selected range (%d, %d)\n",
+                    event.edit.text, event.edit.start, event.edit.length);
+
+            SDL_FillRect(screen, &markedRect, backColor);
+            render_text(screen, font, event.edit.text, markedRect.x, markedRect.y, textColor);
+            SDL_Flip(screen);
+            break;
+
         case SDL_QUIT:
             done = 1;
             break;