diff --git a/Makefile.am b/Makefile.am index 93cfaab0..c6d40e7e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,5 +17,5 @@ # 02110-1301 USA ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = eek src tests docs po +SUBDIRS = eek src tests bindings docs po DISTCHECK_CONFIGURE_FLAGS = --enable-introspection diff --git a/bindings/Makefile.am b/bindings/Makefile.am new file mode 100644 index 00000000..80dc8599 --- /dev/null +++ b/bindings/Makefile.am @@ -0,0 +1,23 @@ +# Copyright (C) 2010 Daiki Ueno +# Copyright (C) 2010 Red Hat, Inc. + +# 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 library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA + +if ENABLE_VALA +SUBDIRS = vala +else +SUBDIRS = +endif diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am new file mode 100644 index 00000000..b84b1327 --- /dev/null +++ b/bindings/vala/Makefile.am @@ -0,0 +1,50 @@ +# Copyright (C) 2010 Daiki Ueno +# Copyright (C) 2010 Red Hat, Inc. + +# 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 library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA + +vapidir = $(datadir)/vala/vapi +dist_vapi_DATA = \ + eek-$(EEK_API_VERSION).vapi \ + eek-clutter-$(EEK_API_VERSION).vapi \ + eek-gtk-$(EEK_API_VERSION).vapi \ + eek-xkb-$(EEK_API_VERSION).vapi \ + eek-xkl-$(EEK_API_VERSION).vapi +MAINTAINERCLEANFILES = $(dist_vapi_DATA) + +eek-$(EEK_API_VERSION).vapi: + vapigen --library eek-$(EEK_API_VERSION) \ + eek-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi + +eek-clutter-$(EEK_API_VERSION).vapi: + vapigen --vapidir=$(builddir) --library eek-clutter-$(EEK_API_VERSION) \ + --pkg eek-0.1 --pkg clutter-1.0 \ + eek-clutter-$(EEK_API_VERSION)/eek-clutter-$(EEK_API_VERSION).gi + +eek-gtk-$(EEK_API_VERSION).vapi: + vapigen --vapidir=$(builddir) --library eek-gtk-$(EEK_API_VERSION) \ + --pkg eek-0.1 --pkg gtk+-2.0 \ + eek-gtk-$(EEK_API_VERSION)/eek-gtk-$(EEK_API_VERSION).gi + +eek-xkb-$(EEK_API_VERSION).vapi: + vapigen --vapidir=$(builddir) --library eek-xkb-$(EEK_API_VERSION) \ + --pkg eek-0.1 \ + eek-xkb-$(EEK_API_VERSION)/eek-xkb-$(EEK_API_VERSION).gi + +eek-xkl-$(EEK_API_VERSION).vapi: + vapigen --vapidir=$(builddir) --library eek-xkl-$(EEK_API_VERSION) \ + --pkg eek-0.1 --pkg eek-xkb-0.1 \ + eek-xkl-$(EEK_API_VERSION)/eek-xkl-$(EEK_API_VERSION).gi diff --git a/bindings/vala/eek-0.1/eek-0.1.files b/bindings/vala/eek-0.1/eek-0.1.files new file mode 100644 index 00000000..7db4944b --- /dev/null +++ b/bindings/vala/eek-0.1/eek-0.1.files @@ -0,0 +1,9 @@ +include/eek-0.1/eek/eek-layout.h +include/eek-0.1/eek/eek-element.h +include/eek-0.1/eek/eek-container.h +include/eek-0.1/eek/eek-keyboard.h +include/eek-0.1/eek/eek-section.h +include/eek-0.1/eek/eek-key.h +include/eek-0.1/eek/eek-types.h +include/eek-0.1/eek/eek-keysym.h +lib/libeek.so diff --git a/bindings/vala/eek-0.1/eek-0.1.gi b/bindings/vala/eek-0.1/eek-0.1.gi new file mode 100644 index 00000000..d061292e --- /dev/null +++ b/bindings/vala/eek-0.1/eek-0.1.gi @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/vala/eek-0.1/eek-0.1.namespace b/bindings/vala/eek-0.1/eek-0.1.namespace new file mode 100644 index 00000000..c1fad3e6 --- /dev/null +++ b/bindings/vala/eek-0.1/eek-0.1.namespace @@ -0,0 +1 @@ +Eek diff --git a/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.files b/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.files new file mode 100644 index 00000000..c047a56a --- /dev/null +++ b/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.files @@ -0,0 +1,6 @@ +include/eek-0.1/eek/eek-clutter-keyboard.h +include/eek-0.1/eek/eek-clutter-section.h +include/eek-0.1/eek/eek-clutter-key.h +include/eek-0.1/eek/eek-clutter-drawing-context.h +lib/libeek-clutter.so + diff --git a/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.gi b/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.gi new file mode 100644 index 00000000..346b3763 --- /dev/null +++ b/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.gi @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.namespace b/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.namespace new file mode 100644 index 00000000..0ab07524 --- /dev/null +++ b/bindings/vala/eek-clutter-0.1/eek-clutter-0.1.namespace @@ -0,0 +1 @@ +EekClutter diff --git a/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.files b/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.files new file mode 100644 index 00000000..3f70cbcd --- /dev/null +++ b/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.files @@ -0,0 +1,3 @@ +include/eek-0.1/eek/eek-gtk-keyboard.h +include/eek-0.1/eek/eek-gtk.h +lib/libeek-gtk.so diff --git a/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.gi b/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.gi new file mode 100644 index 00000000..e44ef4b7 --- /dev/null +++ b/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.gi @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.namespace b/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.namespace new file mode 100644 index 00000000..babdd854 --- /dev/null +++ b/bindings/vala/eek-gtk-0.1/eek-gtk-0.1.namespace @@ -0,0 +1 @@ +EekGtk diff --git a/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.files b/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.files new file mode 100644 index 00000000..3832123e --- /dev/null +++ b/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.files @@ -0,0 +1,2 @@ +include/eek-0.1/eek/eek-xkb-layout.h +lib/libeek-xkb.so diff --git a/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.gi b/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.gi new file mode 100644 index 00000000..ed7ada20 --- /dev/null +++ b/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.gi @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.namespace b/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.namespace new file mode 100644 index 00000000..0cd3bb51 --- /dev/null +++ b/bindings/vala/eek-xkb-0.1/eek-xkb-0.1.namespace @@ -0,0 +1 @@ +EekXkb diff --git a/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.files b/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.files new file mode 100644 index 00000000..c80510df --- /dev/null +++ b/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.files @@ -0,0 +1,3 @@ +include/eek-0.1/eek/eek-xkl-layout.h +lib/libeek-xkl.so + diff --git a/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.gi b/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.gi new file mode 100644 index 00000000..6a718917 --- /dev/null +++ b/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.gi @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.namespace b/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.namespace new file mode 100644 index 00000000..128e238c --- /dev/null +++ b/bindings/vala/eek-xkl-0.1/eek-xkl-0.1.namespace @@ -0,0 +1 @@ +EekXkl diff --git a/configure.ac b/configure.ac index 04fb145e..a6eab51e 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,14 @@ PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], , PKG_CHECK_MODULES([LIBFAKEKEY], [libfakekey], , [AC_MSG_ERROR([libfakekey not found])]) +AC_MSG_CHECKING([whether you enable Vala language support]) +AC_ARG_ENABLE(vala, + AS_HELP_STRING([--enable-vala=no/yes], + [Enable Vala language binding default=yes]),, + enable_vala=yes) +AC_MSG_RESULT($enable_vala) +AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes]) + AC_MSG_CHECKING([whether you enable eekboard]) AC_ARG_ENABLE(eekboard, AS_HELP_STRING([--enable-eekboard=no/yes], @@ -96,13 +104,15 @@ AC_CONFIG_FILES([Makefile eek/Makefile src/Makefile tests/Makefile +bindings/Makefile +bindings/vala/Makefile docs/Makefile docs/reference/Makefile docs/reference/eek/Makefile po/Makefile.in -eek/libeek.pc -eek/libeek-clutter.pc -eek/libeek-gtk.pc -eek/libeek-xkb.pc -eek/libeek-xkl.pc]) +eek/eek-${EEK_API_VERSION}.pc +eek/eek-clutter-${EEK_API_VERSION}.pc +eek/eek-gtk-${EEK_API_VERSION}.pc +eek/eek-xkb-${EEK_API_VERSION}.pc +eek/eek-xkl-${EEK_API_VERSION}.pc]) AC_OUTPUT diff --git a/eek/Makefile.am b/eek/Makefile.am index e5a96e5f..ca064f47 100644 --- a/eek/Makefile.am +++ b/eek/Makefile.am @@ -46,7 +46,6 @@ libeek_la_SOURCES = \ eek-special-keysym-labels.h \ eek-unicode-keysym-labels.h \ eek-keyname-keysym-labels.h - libeek_la_CFLAGS = $(GOBJECT2_CFLAGS) libeek_la_LIBADD = $(GOBJECT2_LIBS) @@ -104,9 +103,11 @@ eek_HEADERS = \ $(top_srcdir)/eek/eek-layout.h \ $(top_srcdir)/eek/eek-keysym.h \ $(top_srcdir)/eek/eek-types.h \ + $(top_srcdir)/eek/eek-gtk-keyboard.h \ $(top_srcdir)/eek/eek-xkb-layout.h \ $(top_srcdir)/eek/eek-xkl-layout.h \ $(top_srcdir)/eek/eek.h \ + $(top_srcdir)/eek/eek-gtk.h \ $(top_srcdir)/eek/eek-xkb.h \ $(top_srcdir)/eek/eek-xkl.h @@ -115,6 +116,7 @@ eek_HEADERS += \ $(top_srcdir)/eek/eek-clutter-keyboard.h \ $(top_srcdir)/eek/eek-clutter-section.h \ $(top_srcdir)/eek/eek-clutter-key.h \ + $(top_srcdir)/eek/eek-clutter-drawing-context.h \ $(top_srcdir)/eek/eek-clutter.h endif @@ -128,11 +130,12 @@ eek-keyname-keysym-labels.h: keyname-keysym-labels.txt $(PYTHON) ./gen-keysym-labels.py keyname_keysym_labels < $< > $@ pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libeek.pc \ - libeek-clutter.pc \ - libeek-gtk.pc \ - libeek-xkb.pc \ - libeek-xkl.pc +pkgconfig_DATA = \ + eek-$(EEK_API_VERSION).pc \ + eek-clutter-$(EEK_API_VERSION).pc \ + eek-gtk-$(EEK_API_VERSION).pc \ + eek-xkb-$(EEK_API_VERSION).pc \ + eek-xkl-$(EEK_API_VERSION).pc DISTCLEANFILES = \ eek-special-keysym-labels.h \ @@ -156,7 +159,8 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) if HAVE_INTROSPECTION Eek-0.1.gir: libeek.la -Eek_0_1_gir_INCLUDES = GObject-2.0 +Eek_0_1_gir_SCANNERFLAGS = --strip-prefix=Eek --pkg=glib-2.0 +Eek_0_1_gir_INCLUDES = GLib-2.0 GObject-2.0 Eek_0_1_gir_CFLAGS = $(libeek_la_CFLAGS) Eek_0_1_gir_LIBS = libeek.la Eek_0_1_gir_FILES = $(libeek_la_SOURCES) @@ -199,4 +203,4 @@ typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) $(typelib_DATA) -endif \ No newline at end of file +endif diff --git a/eek/libeek.pc.in b/eek/eek-0.1.pc.in similarity index 97% rename from eek/libeek.pc.in rename to eek/eek-0.1.pc.in index 724d4a03..4b0db540 100644 --- a/eek/libeek.pc.in +++ b/eek/eek-0.1.pc.in @@ -25,6 +25,6 @@ Name: EEK Description: A Library to Create Keyboard-like UI URL: http://github.com/ueno/eekboard Version: @VERSION@ +Requires: gobject-2.0 Libs: -L${libdir} -leek -Libs.private: @GOBJECT2_LIBS@ Cflags: -I${includedir}/eek-@EEK_API_VERSION@ diff --git a/eek/libeek-clutter.pc.in b/eek/eek-clutter-0.1.pc.in similarity index 92% rename from eek/libeek-clutter.pc.in rename to eek/eek-clutter-0.1.pc.in index 8a89c9c1..6ca677a1 100644 --- a/eek/libeek-clutter.pc.in +++ b/eek/eek-clutter-0.1.pc.in @@ -25,6 +25,6 @@ Name: libeek-clutter Description: A Library to Create Keyboard-like UI (Clutter Support) URL: http://github.com/ueno/eekboard Version: @VERSION@ -Libs: -L${libdir} -leek -leek-clutter -Libs.private: @GOBJECT2_LIBS@ @CLUTTER_LIBS@ +Requires: eek-@EEK_API_VERSION@ clutter-1.0 +Libs: -L${libdir} -leek-clutter Cflags: -I${includedir}/eek-@EEK_API_VERSION@ diff --git a/eek/libeek-gtk.pc.in b/eek/eek-gtk-0.1.pc.in similarity index 93% rename from eek/libeek-gtk.pc.in rename to eek/eek-gtk-0.1.pc.in index 9925c707..89793047 100644 --- a/eek/libeek-gtk.pc.in +++ b/eek/eek-gtk-0.1.pc.in @@ -25,6 +25,6 @@ Name: libeek-gtk Description: A Library to Create Keyboard-like UI (GTK Support) URL: http://github.com/ueno/eekboard Version: @VERSION@ -Libs: -L${libdir} -leek -leek-gtk -Libs.private: @GOBJECT2_LIBS@ @GTK2_LIBS@ +Requires: eek-@EEK_API_VERSION@ gtk+-2.0 +Libs: -L${libdir} -leek-gtk Cflags: -I${includedir}/eek-@EEK_API_VERSION@ diff --git a/eek/libeek-xkb.pc.in b/eek/eek-xkb-0.1.pc.in similarity index 93% rename from eek/libeek-xkb.pc.in rename to eek/eek-xkb-0.1.pc.in index 278fad55..c6908440 100644 --- a/eek/libeek-xkb.pc.in +++ b/eek/eek-xkb-0.1.pc.in @@ -25,6 +25,6 @@ Name: libeek-xkb Description: A Library to Create Keyboard-like UI (XKB Support) URL: http://github.com/ueno/eekboard Version: @VERSION@ -Libs: -L${libdir} -leek -leek-xkb -Libs.private: @GTK2_LIBS@ @XKB_LIBS@ +Requires: eek-@EEK_API_VERSION@ gtk+-x11-2.0 +Libs: -L${libdir} -leek-xkb Cflags: -I${includedir}/eek-@EEK_API_VERSION@ diff --git a/eek/libeek-xkl.pc.in b/eek/eek-xkl-0.1.pc.in similarity index 95% rename from eek/libeek-xkl.pc.in rename to eek/eek-xkl-0.1.pc.in index 520062c4..9cbe9839 100644 --- a/eek/libeek-xkl.pc.in +++ b/eek/eek-xkl-0.1.pc.in @@ -25,6 +25,6 @@ Name: libeek-xkl Description: A Library to Create Keyboard-like UI (Libxklavier Support) URL: http://github.com/ueno/eekboard Version: @VERSION@ +Requires: eek-xkb-@EEK_API_VERSION@ libxklavier Libs: -L${libdir} -leek-xkl -Libs.private: @GTK2_LIBS@ @LIBXKLAVIER_LIBS@ Cflags: -I${includedir}/eek-@EEK_API_VERSION@