diff options
author | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 17:48:28 +0000 |
---|---|---|
committer | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 17:48:28 +0000 |
commit | 59cd28095f835828dac26ec612ccf8ba3cc91d94 (patch) | |
tree | edb7d6422fc9ed390d971d048bddeba800b4acd8 /ui/ui.gyp | |
parent | 5e81f89f6fc228016212bedba35a62d067f742ea (diff) | |
download | chromium_src-59cd28095f835828dac26ec612ccf8ba3cc91d94.zip chromium_src-59cd28095f835828dac26ec612ccf8ba3cc91d94.tar.gz chromium_src-59cd28095f835828dac26ec612ccf8ba3cc91d94.tar.bz2 |
Implements ui::InputMethodLinuxX11 which is a IME bridge from/to gtk-immodule. This class makes it possible that a non-GTK+-based program (i.e. Linux Aura) communicates with IMEs through gtk-immodule.
The basic approach of this CL is:
1. Translate a XKeyEvent to a GdkEventKey.
2. Send the GDK event to IMEs through gtk-immodule.
3. Pass results to a ui::TextInputClient.
I understand that a key concept of Aura is to get rid of platform-dependent GUI framework such as GTK+. However, gtk-immodule is not necessarily GUI framework, and it manages a tons of IMEs gracefully. So I think it's acceptable and worth using gtk-immodule.
Most of implementation is quite simple, but this CL includes the following non-trivial hacks.
a. Environmental variable IBUS_ENABLE_SYNC_MODE is set to true.
The reason is described as a comment in chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
b. This CL renames ui/base/gtk/gtk_im_context_util.{cc,h} to ui/base/ime/composition_text_util_pango.{cc,h}.
ui::InputMethodGtkImModule uses ui::ExtractCompositionTextFromGtkPreedit() utility function in the file. However, if toolkit_uses_gtk==0 in gyp, files starting with "gtk_" or in "gtk" directory are removed from build targets (see build/filename_rules.gypi). So I had to move and rename the files, so they're not in "gtk" directory or starting with "gtk_".
My justification for this renaming is that the utility function does not directly depend on GTK+. The function compiles without a GTK library. So I think this is okay.
BUG=133476
TEST=Done manually.
Review URL: https://codereview.chromium.org/25880002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/ui.gyp')
-rw-r--r-- | ui/ui.gyp | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -182,8 +182,6 @@ 'base/gtk/gtk_floating_container.cc', 'base/gtk/gtk_floating_container.h', 'base/gtk/gtk_hig_constants.h', - 'base/gtk/gtk_im_context_util.cc', - 'base/gtk/gtk_im_context_util.h', 'base/gtk/gtk_screen_util.cc', 'base/gtk/gtk_screen_util.h', 'base/gtk/gtk_signal.h', |