Mercurial > sdl-ios-xcode
comparison src/events/SDL_keyboard.c @ 3280:00cace2d9080
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 19 Sep 2009 13:29:40 +0000 |
parents | dc1eb82ffdaa |
children | 98a819296cdc |
comparison
equal
deleted
inserted
replaced
3279:fd207dce9f94 | 3280:00cace2d9080 |
---|---|
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 |