src \
util \
client \
+ engine \
data \
m4 \
po \
src/ibusversion.h
src/tests/Makefile
bus/Makefile
+engine/Makefile
+engine/simple.xml.in
util/Makefile
util/IMdkit/Makefile
data/Makefile
--- /dev/null
+# vim:set noet ts=4:
+#
+# ibus - The Input Bus
+#
+# Copyright (c) 2010, Google Inc. All rights reserved.
+# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA
+
+libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la
+
+INCLUDES = \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ $(NULL)
+
+AM_CFLAGS = \
+ @GLIB2_CFLAGS@ \
+ @GIO2_CFLAGS@ \
+ @GTHREAD2_CFLAGS@ \
+ $(INCLUDES) \
+ -DG_LOG_DOMAIN=\"IBUS\" \
+ -DPKGDATADIR=\"$(pkgdatadir)\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DBINDIR=\"@bindir@\" \
+ -DIBUS_DISABLE_DEPRECATED \
+ -Wno-unused-variable \
+ -Wno-unused-but-set-variable \
+ -Wno-unused-function \
+ $(NULL)
+
+AM_LDADD = \
+ @GOBJECT2_LIBS@ \
+ @GLIB2_LIBS@ \
+ @GIO2_LIBS@ \
+ @GTHREAD2_LIBS@ \
+ $(libibus) \
+ $(NULL)
+
+AM_VALAFLAGS = \
+ --vapidir=$(top_builddir)/bindings/vala \
+ --pkg=ibus-1.0 \
+ $(NULL)
+
+libexec_PROGRAMS = \
+ ibus-engine-simple \
+ $(NULL)
+
+ibus_engine_simple_SOURCES = \
+ main.vala \
+ $(NULL)
+ibus_engine_simple_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(NULL)
+ibus_engine_simple_LDADD = \
+ $(AM_LDADD) \
+ $(NULL)
+ibus_engine_simple_DEPENDENCIES = \
+ $(libibus) \
+ $(NULL)
+
+component_DATA = \
+ simple.xml \
+ $(NULL)
+
+componentdir = $(pkgdatadir)/component
+
+CLEANFILES = \
+ simple.xml \
+ $(NULL)
+
+EXTRA_DIST = \
+ simple.xml.in.in \
+ $(NULL)
+
+simple.xml: simple.xml.in
+ $(AM_V_GEN) \
+ ( \
+ libexecdir=${libexecdir}; \
+ s=`cat $<`; \
+ eval "echo \"$${s}\""; \
+ ) > $@
+
+$(libibus):
+ $(MAKE) -C $(top_builddir)/src
+
+-include $(top_srcdir)/git.mk
--- /dev/null
+/* vim:set et sts=4 sw=4:
+ *
+ * ibus - The Input Bus
+ *
+ * Copyright(c) 2011 Peng Huang <shawn.p.huang@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ */
+
+using IBus;
+
+class DummyEngine : IBus.EngineSimple {
+}
+
+public int main(string[] args) {
+ IBus.init();
+
+ IBus.Bus bus = new IBus.Bus();
+ if (!bus.is_connected()) {
+ warning("ibus-daemon does not exist.");
+ return 1;
+ }
+
+ uint flags =
+ IBus.BusNameFlag.REPLACE_EXISTING |
+ IBus.BusNameFlag.ALLOW_REPLACEMENT;
+ uint retval = bus.request_name("org.freedesktop.IBus.Simple", flags);
+
+ if (retval == 0) {
+ warning("Registry bus name org.freedesktop.IBus.Simple failed!");
+ return 1;
+ }
+
+ bus.disconnected.connect((bus) => {
+ debug("bus disconnected");
+ IBus.quit();
+ });
+
+ IBus.Factory factory = new IBus.Factory(bus.get_connection());
+
+ int id = 0;
+
+ factory.create_engine.connect((factory, name) => {
+ const string path = "/org/freedesktop/IBus/engine/simple/%d";
+ IBus.Engine engine = new IBus.Engine.type(
+ typeof(IBus.EngineSimple), name,
+ path.printf(++id), bus.get_connection());
+ return engine;
+ });
+
+ IBus.main();
+
+ return 0;
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<component>
+ <name>org.freedesktop.IBus.Simple</name>
+ <description>A table based simple engine</description>
+ <exec>${libexecdir}/ibus-engine-simple</exec>
+ <version>@VERSION@</version>
+ <author>Peng Huang <shawn.p.huang@gmail.com></author>
+ <license>GPL</license>
+ <homepage>http://code.google.com/p/ibus</homepage>
+ <textdomain>ibus</textdomain>
+</component>
* IBusFactory::create-engine:
* @factory: the factory which received the signal
* @engine_name: the engine_name which received the signal
- * @returns: (transfer none): An IBusEngine
+ * @returns: (transfer full): An IBusEngine
*
* The ::create-engine signal is a signal to create IBusEngine
* with @engine_name, which gets emitted when IBusFactory