README.HG
author Sam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 20:49:16 -0700
changeset 6555 f2c03c06d987
parent 5072 2341ecc03388
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.
icculus@4421
     1
The latest development version of SDL is available via Mercurial.
icculus@4421
     2
Mercurial allows you to get up-to-the-minute fixes and enhancements;
icculus@4421
     3
as a developer works on a source tree, you can use "hg" to mirror that
icculus@1652
     4
source tree instead of waiting for an official release. Please look
icculus@4421
     5
at the Mercurial website ( http://mercurial.selenic.com/ ) for more
icculus@4421
     6
information on using hg, where you can also download software for
icculus@4421
     7
Mac OS X, Windows, and Unix systems.
icculus@1652
     8
icculus@4421
     9
  hg clone http://hg.libsdl.org/SDL
icculus@1652
    10
slouken@1759
    11
If you are building SDL with an IDE, you will need to copy the file
slouken@1759
    12
include/SDL_config.h.default to include/SDL_config.h before building.
icculus@1652
    13
slouken@1759
    14
If you are building SDL via configure, you will need to run autogen.sh
slouken@1759
    15
before running configure.
icculus@1652
    16
slouken@1759
    17
There is a web interface to the subversion repository at:
icculus@5072
    18
icculus@4421
    19
	http://hg.libsdl.org/SDL/
slouken@1759
    20
icculus@2708
    21
There is an RSS feed available at that URL, for those that want to
icculus@2708
    22
track commits in real time.
icculus@2708
    23