INSTALL
author Sam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 20:49:16 -0700
changeset 6555 f2c03c06d987
parent 3561 00e7c6b7eb03
child 6878 30579e86ac24
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.
     1 
     2 To compile and install SDL:
     3 
     4     0.  If you have downloaded this from the website, skip to the next step.
     5         If you have checked this out from subversion, you'll need to run
     6         ./autogen.sh to build the configure script. 
     7 
     8     1.  Run './configure; make; make install'
     9 
    10         If you are compiling for Windows using gcc, read the FAQ at:
    11         http://www.libsdl.org/faq.php?action=listentries&category=4#42
    12 
    13         If you are compiling using Visual C++ on Win32, you should read
    14         the file VisualC.html
    15 
    16     2.  Look at the example programs in ./test, and check out the HTML
    17         documentation in ./docs to see how to use the SDL library.
    18 
    19     3.  Join the SDL developer mailing list by sending E-mail to
    20     	sdl-request@libsdl.org
    21         and put "subscribe" in the subject of the message.
    22 
    23         Or alternatively you can use the web interface:
    24             http://www.libsdl.org/mailing-list.php
    25 
    26 That's it!
    27 Sam Lantinga <slouken@libsdl.org>