lispgames / cl-sdl2

Common Lisp bindings for SDL2 using C2FFI.
MIT License
308 stars 82 forks source link

Make SDL_TextEditingEvent / SDL_TextInputEvent return string as text #145

Closed VitoVan closed 2 years ago

VitoVan commented 2 years ago

SDL_TextEditingEvent / SDL_TextInputEvent both have a data field text, which is char[32] in C.

The current implementation returns a fixnum in Lisp.

This PR makes them return as a string.

I'm not sure if this is appropriate, but I failed to find way to get the text without using sdl2kit. The sdl2kit CLOP approach feels a little overburden for me. So I am looking for a more simple way to get the text.

May you have a good day and be happy.