Skip to content

Commit

Permalink
Changed copyright : Sun -> Oracle
Browse files Browse the repository at this point in the history
Added virtual keyboard functionality (with ibus patch)
  • Loading branch information
Naoyuki Ishimura committed Jul 1, 2010
1 parent 0c332a0 commit b0d2a69
Show file tree
Hide file tree
Showing 50 changed files with 2,672 additions and 117 deletions.
2 changes: 1 addition & 1 deletion COPYING
Expand Up @@ -8,7 +8,7 @@ is applied is otherwise unspecified.


-------------------------------------------------------------------- --------------------------------------------------------------------


Copyright (C) 2009-2010 Sun Microsystems, Inc All Rights Reserved. Copyright (C) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms. Use is subject to license terms.


This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The XKeyboard Config based engine for IBus # ibus-xkbc - The XKeyboard Config based engine for IBus
# #
# Copyright (c) 2009 Naoyuki Ishimura <naoyuki.ishimura@sun.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand All @@ -22,6 +22,7 @@ SUBDIRS = \
engine \ engine \
setup \ setup \
setup/xkbc \ setup/xkbc \
vkb \
icons \ icons \
m4 \ m4 \
po \ po \
Expand Down
Empty file modified autogen.sh 100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion configure.ac
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The Input Bus XKBC project # ibus-xkbc - The Input Bus XKBC project
# #
# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -78,6 +78,8 @@ engine/xkbc.engine
setup/Makefile setup/Makefile
setup/ibus-setup-xkbc setup/ibus-setup-xkbc
setup/xkbc/Makefile setup/xkbc/Makefile
vkb/Makefile
vkb/ibus-kbd-xkbc
icons/Makefile icons/Makefile
m4/Makefile m4/Makefile
help/Makefile help/Makefile
Expand Down
20 changes: 10 additions & 10 deletions engine/Makefile.am
@@ -1,8 +1,8 @@
# vim:set noet ts=4: # vim:set noet ts=4:
# #
# ibus-tmpl - The Input Bus template project # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand All @@ -20,10 +20,10 @@
# #
engine_xkbc_PYTHON = \ engine_xkbc_PYTHON = \
engine.py \ engine.py \
factory.py \ factory.py \
compose_tbl.py \ compose_tbl.py \
main.py \ main.py \
$(NULL) $(NULL)


engine_xkbcdir = $(datadir)/ibus-xkbc/engine engine_xkbcdir = $(datadir)/ibus-xkbc/engine


Expand All @@ -42,14 +42,14 @@ xkbc.xml: xkbc.xml.in
CLEANFILES = \ CLEANFILES = \
xkbc.xml \ xkbc.xml \
*.py \ *.py \
*.pyc \ *.pyc \
*.pyo \ *.pyo \
$(NULL) $(NULL)


EXTRA_DIST = \ EXTRA_DIST = \
ibus-engine-xkbc.in \ ibus-engine-xkbc.in \
xkbc.xml.in \ xkbc.xml.in \
$(NULL) $(NULL)


# test: # test:
# $(ENV) LANG=en_US PYTHONPATH=$(top_srcdir) $(PYTHON) $(srcdir)/main.py # $(ENV) LANG=en_US PYTHONPATH=$(top_srcdir) $(PYTHON) $(srcdir)/main.py
Expand Down
2 changes: 1 addition & 1 deletion engine/compose_tbl.py
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The Input Bus Keyboard Layout emulaton engine. # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved. # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions engine/engine.py
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The Input Bus Keyboard Layout emulaton engine. # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved. # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -53,7 +53,7 @@ def __init__(self, bus, object_path):
self.__compose_state = COMPOSE_END self.__compose_state = COMPOSE_END
self.__compose_dict = None self.__compose_dict = None


self.__xkbc = prefs_get_symbols_data() self.__xkbc = prefs_get_xkbc_db()
self.__prop_list = self._init_props() self.__prop_list = self._init_props()


self.__target_layout_name = prefs_get_last_layout() self.__target_layout_name = prefs_get_last_layout()
Expand Down
2 changes: 1 addition & 1 deletion engine/factory.py
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The Input Bus Keyboard Layout emulaton engine. # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved. # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
5 changes: 2 additions & 3 deletions engine/ibus-engine-xkbc.in
@@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
# vim:set noet ts=4: # vim:set noet ts=4:
# #
# ibus-tmpl - The Input Bus template project # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion engine/main.py
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The Input Bus Keyboard Layout emulaton engine. # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved. # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
6 changes: 3 additions & 3 deletions engine/xkbc.xml.in.in
Expand Up @@ -5,16 +5,16 @@
<description>XKBC Component</description> <description>XKBC Component</description>
<exec>${libexecdir}/ibus-engine-xkbc --ibus</exec> <exec>${libexecdir}/ibus-engine-xkbc --ibus</exec>
<version>@VERSION@</version> <version>@VERSION@</version>
<author>Naoyuki Ishimura &lt;naoyuki.ishimura@sun.com&gt;</author> <author>Naoyuki Ishimura &lt;naoyuki.ishimura@oracle.com&gt;</author>
<license>GPL</license> <license>GPL</license>
<homepage>http://code.google.com/p/ibus</homepage> <homepage>http://github.com/sun-im/ibus-xkbc</homepage>
<textdomain>ibus-xkbc</textdomain> <textdomain>ibus-xkbc</textdomain>


<engines> <engines>
<engine> <engine>
<name>xkbc</name> <name>xkbc</name>
<license>GPL</license> <license>GPL</license>
<author>Naoyuki Ishimura &lt;naoyuki.ishimura@sun.com&gt;</author> <author>Naoyuki Ishimura &lt;naoyuki.ishimura@oracle.com&gt;</author>
<icon>${pkgdatadir}/icons/ibus-xkbc.png</icon> <icon>${pkgdatadir}/icons/ibus-xkbc.png</icon>
<layout>us</layout> <layout>us</layout>
<longname>XKBC (Keyboard Emulation)</longname> <longname>XKBC (Keyboard Emulation)</longname>
Expand Down
6 changes: 3 additions & 3 deletions help/C/ibus-xkbc-C.omf
Expand Up @@ -2,10 +2,10 @@
<omf> <omf>
<resource> <resource>
<creator> <creator>
Sun Documentation Team Oracle Documentation Team
</creator> </creator>
<maintainer> <maintainer>
Sun Documentation Team Oracle Documentation Team
</maintainer> </maintainer>
<title> <title>
Keyboard Layout Emulation Input Method (XKBC) Keyboard Layout Emulation Input Method (XKBC)
Expand All @@ -25,6 +25,6 @@
<identifier url="ibus-xkbc.xml"/> <identifier url="ibus-xkbc.xml"/>
<language code="C"/> <language code="C"/>
<relation seriesid="00dc1156-d4c6-11d8-9917-c62edd84afcc"/> <relation seriesid="00dc1156-d4c6-11d8-9917-c62edd84afcc"/>
<rights type="GNU FDL" license.version="1.1" holder="Sun Microsystems"/> <rights type="GNU FDL" license.version="1.1" holder="Oracle and/or its affiliates"/>
</resource> </resource>
</omf> </omf>
4 changes: 2 additions & 2 deletions help/C/ibus-xkbc.xml
Expand Up @@ -3,9 +3,9 @@
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml"> <!ENTITY legal SYSTEM "legal.xml">
<!ENTITY appname "iBus XKBC"> <!ENTITY appname "iBus XKBC">
<!ENTITY author1 "Sun"> <!ENTITY author1 "Oracle">
<!ENTITY author2 "Input Method dev"> <!ENTITY author2 "Input Method dev">
<!ENTITY publisher "Sun Microsystems, Inc."> <!ENTITY publisher "Oracle">
<!ENTITY appversion "1.0"> <!ENTITY appversion "1.0">
<!ENTITY manrevision "1.0"> <!ENTITY manrevision "1.0">
<!ENTITY date "January 2010"> <!ENTITY date "January 2010">
Expand Down
18 changes: 13 additions & 5 deletions ibus-xkbc.spec.in
Expand Up @@ -3,10 +3,10 @@ Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Release: 1%{?dist} Release: 1%{?dist}
Summary: The XKBC engine for IBus input platform Summary: The XKBC engine for IBus input platform
License: GPL License: GPLv2
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/ URL: http://github.com/sun-im/ibus-xkbc/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source0: http://cloud.github.com/download/sun-im/ibus-xkbc/%{name}-%{version}.tar.gz


BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)


Expand All @@ -15,15 +15,17 @@ BuildRequires: libtool
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig


Requires: ibus >= 1.2.0.20090904 Requires: ibus >= %{require_ibus_version}


%description %description
The XKBC engine for IBus platform. It provides keyboard layout emulation input method. The XKBC engine for IBus platform.
It provides keyboard layout emulation input method.


%prep %prep
%setup -q %setup -q


%build %build
sh autogen.sh
%configure --disable-static %configure --disable-static
# make -C po update-gmo # make -C po update-gmo
make %{?_smp_mflags} make %{?_smp_mflags}
Expand All @@ -46,5 +48,11 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/ibus/component/* %{_datadir}/ibus/component/*


%changelog %changelog
* Wed Feb 04 2010 Peng Wu <pwu@redhat.com> - 1.2.0.20100115-3
- Correct home page url.

* Wed Feb 04 2010 Peng Wu <pwu@redhat.com> - 1.2.0.20100115-2
- Fixes koji build for F-13.

* Fri Oct 30 2009 Naoyuki Ishimura <naoyuki.ishimura@sun.com> - 0.1.0-1 * Fri Oct 30 2009 Naoyuki Ishimura <naoyuki.ishimura@sun.com> - 0.1.0-1
- The first version. - The first version.
4 changes: 2 additions & 2 deletions icons/Makefile.am
@@ -1,8 +1,8 @@
# vim:set noet ts=4: # vim:set noet ts=4:
# #
# ibus-tmpl - The Input Bus template project # ibus-xkbc - The XKeyboard Config based engine for IBus
# #
# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
108 changes: 108 additions & 0 deletions patches/ibus-1.3.3-on-nv-ss12.patch
@@ -0,0 +1,108 @@
diff -ruNa ibus-1.3.3.orig/bus/connection.c ibus-1.3.3/bus/connection.c
--- ibus-1.3.3.orig/bus/connection.c 2010-03-25 16:29:20.000000000 +0900
+++ ibus-1.3.3/bus/connection.c 2010-05-26 13:28:29.917200467 +0900
@@ -28,6 +28,7 @@

/* BusConnectionPriv */
struct _BusConnectionPrivate {
+ char dummy;
};
typedef struct _BusConnectionPrivate BusConnectionPrivate;

diff -ruNa ibus-1.3.3.orig/bus/dbusimpl.c ibus-1.3.3/bus/dbusimpl.c
--- ibus-1.3.3.orig/bus/dbusimpl.c 2010-03-25 16:29:20.000000000 +0900
+++ ibus-1.3.3/bus/dbusimpl.c 2010-05-25 15:15:17.717446408 +0900
@@ -804,6 +804,42 @@
/* ignore signal from local interface */
return FALSE;
}
+ /* for Virtual Keyboard support */
+ if (ibus_message_is_signal (message,
+ "org.freedesktop.IBus.VKB",
+ "SendText")) {
+ gboolean retval;
+ IBusText *text;
+ IBusError *error = NULL;
+
+ retval = ibus_message_get_args (message,
+ &error,
+ IBUS_TYPE_TEXT, &text,
+ G_TYPE_INVALID);
+
+ if (text) {
+ bus_input_context_send_text_to_last_focused (text);
+ }
+ return FALSE;
+ }
+ if (ibus_message_is_signal (message,
+ "org.freedesktop.IBus.VKB",
+ "SendKey")) {
+ gboolean retval;
+ guint keyval, state;
+ IBusError *error = NULL;
+
+ retval = ibus_message_get_args (message,
+ &error,
+ G_TYPE_UINT, &keyval,
+ G_TYPE_UINT, &state,
+ G_TYPE_INVALID);
+
+ bus_input_context_send_key_to_last_focused (keyval, 0, state);
+
+ return FALSE;
+ }
+

ibus_message_set_sender (message, bus_connection_get_unique_name (connection));

diff -ruNa ibus-1.3.3.orig/bus/dbusimpl.c ibus-1.3.3/bus/dbusimpl.c
--- ibus-1.3.3.orig/bus/inputcontext.c 2010-04-30 21:22:39.000000000 +0900
+++ ibus-1.3.3/bus/inputcontext.c 2010-05-25 15:13:47.390586237 +0900
@@ -1175,11 +1175,15 @@
return context->has_focus;
}

+static BusInputContext *target_context = NULL;
+
void
bus_input_context_focus_in (BusInputContext *context)
{
g_assert (BUS_IS_INPUT_CONTEXT (context));

+ target_context = context;
+
if (context->has_focus)
return;

@@ -1241,6 +1245,30 @@
}

void
+bus_input_context_send_text_to_last_focused (IBusText *text)
+{
+ if (target_context) {
+ bus_input_context_send_signal (target_context,
+ "CommitText",
+ IBUS_TYPE_TEXT, &text,
+ G_TYPE_INVALID);
+ }
+}
+
+void
+bus_input_context_send_key_to_last_focused (guint keyval, guint keycode, guint state)
+{
+ if (target_context) {
+ bus_input_context_send_signal (target_context,
+ "ForwardKeyEvent",
+ G_TYPE_UINT, &keyval,
+ G_TYPE_UINT, &keycode,
+ G_TYPE_UINT, &state,
+ G_TYPE_INVALID);
+ }
+}
+
+void
bus_input_context_focus_out (BusInputContext *context)
{
g_assert (BUS_IS_INPUT_CONTEXT (context));

4 changes: 2 additions & 2 deletions setup/Makefile.am
@@ -1,8 +1,8 @@
# vim:set noet ts=4: # vim:set noet ts=4:
# #
# ibus-pinyin - The PinYin engine for IBus # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion setup/hotkey.py
Expand Up @@ -2,7 +2,7 @@
# #
# ibus-xkbc - The Input Bus Keyboard Layout emulaton engine. # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved. # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down
5 changes: 2 additions & 3 deletions setup/ibus-setup-xkbc.in
@@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
# vim:set noet ts=4: # vim:set noet ts=4:
# #
# ibus-tmpl - The Input Bus template project # ibus-xkbc - The Input Bus Keyboard Layout emulaton engine.
# #
# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com> # Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009-2010 Sun Microsystems, Inc All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit b0d2a69

Please sign in to comment.