Mercurial > sdl-ios-xcode
comparison src/events/SDL_keyboard.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 | 502adab079a4 |
children |
comparison
equal
deleted
inserted
replaced
3131:009bd8f81947 | 3132:88861448961f |
---|---|
850 posted = (SDL_PushEvent(&event) > 0); | 850 posted = (SDL_PushEvent(&event) > 0); |
851 } | 851 } |
852 return (posted); | 852 return (posted); |
853 } | 853 } |
854 | 854 |
855 int | |
856 SDL_SendEditingText(const char *text, int start, int length) | |
857 { | |
858 int posted; | |
859 | |
860 /* Post the event, if desired */ | |
861 posted = 0; | |
862 if (SDL_ProcessEvents[SDL_TEXTEDITING] == SDL_ENABLE) { | |
863 SDL_Event event; | |
864 event.edit.type = SDL_TEXTEDITING; | |
865 event.edit.start = start; | |
866 event.edit.length = length; | |
867 SDL_strlcpy(event.edit.text, text, SDL_arraysize(event.text.text)); | |
868 posted = (SDL_PushEvent(&event) > 0); | |
869 } | |
870 return (posted); | |
871 } | |
872 | |
855 void | 873 void |
856 SDL_KeyboardQuit(void) | 874 SDL_KeyboardQuit(void) |
857 { | 875 { |
858 int i; | 876 int i; |
859 | 877 |