comparison test/testime.c @ 3132:88861448961f gsoc2009_IME

Add SDL_TEXTEDTING event to inform application about marked text.
author Jiang Jiang <gzjjgod@gmail.com>
date Wed, 01 Jul 2009 07:33:58 +0000
parents 009bd8f81947
children 84119fe89d26
comparison
equal deleted inserted replaced
3131:009bd8f81947 3132:88861448961f
109 SDL_Flip(screen); 109 SDL_Flip(screen);
110 110
111 SDL_StartTextInput(&markedRect); 111 SDL_StartTextInput(&markedRect);
112 break; 112 break;
113 113
114 case SDL_TEXTEDITING:
115 fprintf(stderr, "text editing \"%s\", selected range (%d, %d)\n",
116 event.edit.text, event.edit.start, event.edit.length);
117
118 SDL_FillRect(screen, &markedRect, backColor);
119 render_text(screen, font, event.edit.text, markedRect.x, markedRect.y, textColor);
120 SDL_Flip(screen);
121 break;
122
114 case SDL_QUIT: 123 case SDL_QUIT:
115 done = 1; 124 done = 1;
116 break; 125 break;
117 126
118 default: 127 default: