TODO
author Sam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 20:49:16 -0700
changeset 6555 f2c03c06d987
parent 6251 3e8c673cad58
child 6568 1a6b0ae81937
permissions -rw-r--r--
Fixed bug 1614 - SDL for Android does not implement TextInput API

Andrey Isakov 2012-10-03 08:30:25 PDT

I've found out in the process of porting one OS project to Android/SDL2 that
there is no support for TextInput events/APIs on Android.
So I implemented some kind of initial support of that feature, and at the very
least it seems to work fine with latin chars input with soft and hardware
keyboards on my Moto Milestone2. I've also tried playing around with more
complex IMEs, like japanese, logging the process and it seemed to work too. I'm
not sure since the app itself I am working on does not have support for
non-latin input.

The main point of the patch is to place a fake input view in the region
specified by SDL_SetTextInputRect and create a custom InputConnection for it.
The reason to make it a separate view is to support Android's pan&scan on input
feature properly. For details please refer to
http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
Even though the manual states that SetTextInputRect is used to determine the
IME variants position, I thought this would be a proper use for this too.
slouken@6251
     1
2.0 release checklist:
slouken@3702
     2
 * http://wiki.libsdl.org/moin.cgi/Roadmap
slouken@3563
     3
slouken@3544
     4
 * See why windows are being rearranged.  Is the shield window not up?
slouken@3544
     5
 * Make sure you can create and show a fullscreen window in one step
slouken@3562
     6
 * Write automated test case for multi-draw APIs
slouken@3690
     7
 * Implement assertion code on iPhone
slouken@3690
     8
 * Add __WINDOWS__ in addition to __WIN32__
slouken@3544
     9
slouken@3632
    10
 * Check 1.2 revisions:
slouken@3632
    11
	3554 - Need to resolve semantics for locking keys on different platforms
slouken@3632
    12
	4874 - Do we want screen rotation?  At what level?
slouken@3632
    13
	4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98
slouken@3632
    14
	4484, 4485 - Verify that SDL's Windows keyboard handling works correctly
slouken@3632
    15
	4865 - See if this is still needed (mouse coordinate clamping)
slouken@3632
    16
	4866 - See if this is still needed (blocking window repositioning)