From 32a1d23c2a2daf7d4ef5f9ff85b19f4587b4ad1d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 16 Mar 2012 16:21:02 +0900 Subject: [PATCH] Simplify codebase. * Drop clutter support. * Unify eek-xkb into eek-xkl. * Generate vapi from gir instead of gi. --- bindings/vala/Eek-0.90.metadata | 1 + ...gtk-0.90.metadata => EekGtk-0.90.metadata} | 0 ...xkl-0.90.metadata => EekXkl-0.90.metadata} | 1 - bindings/vala/Makefile.am | 96 +- bindings/vala/eek-0.90.deps | 1 + bindings/vala/eek-0.90/eek-0.90.defines | 2 - bindings/vala/eek-0.90/eek-0.90.files | 17 - bindings/vala/eek-0.90/eek-0.90.gi | 1274 ----------------- bindings/vala/eek-0.90/eek-0.90.metadata | 24 - bindings/vala/eek-0.90/eek-0.90.namespace | 1 - .../eek-clutter-0.90/eek-clutter-0.90.defines | 2 - .../eek-clutter-0.90/eek-clutter-0.90.files | 2 - .../vala/eek-clutter-0.90/eek-clutter-0.90.gi | 28 - .../eek-clutter-0.90.metadata | 1 - .../eek-clutter-0.90.namespace | 1 - bindings/vala/eek-gtk-0.90.deps | 1 + .../vala/eek-gtk-0.90/eek-gtk-0.90.defines | 2 - bindings/vala/eek-gtk-0.90/eek-gtk-0.90.files | 2 - bindings/vala/eek-gtk-0.90/eek-gtk-0.90.gi | 26 - .../vala/eek-gtk-0.90/eek-gtk-0.90.namespace | 1 - .../vala/eek-xkb-0.90/eek-xkb-0.90.defines | 2 - bindings/vala/eek-xkb-0.90/eek-xkb-0.90.files | 2 - bindings/vala/eek-xkb-0.90/eek-xkb-0.90.gi | 73 - .../vala/eek-xkb-0.90/eek-xkb-0.90.metadata | 2 - .../vala/eek-xkb-0.90/eek-xkb-0.90.namespace | 1 - bindings/vala/eek-xkl-0.90.deps | 1 + .../vala/eek-xkl-0.90/eek-xkl-0.90.defines | 2 - bindings/vala/eek-xkl-0.90/eek-xkl-0.90.files | 2 - bindings/vala/eek-xkl-0.90/eek-xkl-0.90.gi | 105 -- .../vala/eek-xkl-0.90/eek-xkl-0.90.namespace | 1 - .../vala/eekboard-0.90/eekboard-0.90.defines | 2 - .../vala/eekboard-0.90/eekboard-0.90.files | 2 - bindings/vala/eekboard-0.90/eekboard-0.90.gi | 340 ----- .../vala/eekboard-0.90/eekboard-0.90.metadata | 1 - .../eekboard-0.90/eekboard-0.90.namespace | 1 - configure.ac | 44 +- data/org.fedorahosted.eekboard.gschema.xml.in | 5 - docs/reference/eek/Makefile.am | 15 +- docs/reference/eek/eek-sections.txt | 823 ++++++----- eek/Makefile.am | 80 +- eek/eek-clutter-0.90.pc.in | 30 - eek/eek-clutter-key.c | 307 ---- eek/eek-clutter-key.h | 63 - eek/eek-clutter-keyboard.c | 272 ---- eek/eek-clutter-keyboard.h | 67 - eek/eek-clutter-renderer.c | 235 --- eek/eek-clutter-renderer.h | 64 - eek/eek-clutter-section.c | 232 --- eek/eek-clutter-section.h | 62 - eek/eek-clutter.h | 26 - eek/eek-xkl-0.90.pc.in | 2 +- src/Makefile.am | 7 +- src/server-context-service.c | 96 +- tests/Makefile.am | 7 +- tests/eek-xkb-test.c | 53 - 55 files changed, 540 insertions(+), 3970 deletions(-) create mode 100644 bindings/vala/Eek-0.90.metadata rename bindings/vala/{eek-gtk-0.90/eek-gtk-0.90.metadata => EekGtk-0.90.metadata} (100%) rename bindings/vala/{eek-xkl-0.90/eek-xkl-0.90.metadata => EekXkl-0.90.metadata} (51%) create mode 100644 bindings/vala/eek-0.90.deps delete mode 100644 bindings/vala/eek-0.90/eek-0.90.defines delete mode 100644 bindings/vala/eek-0.90/eek-0.90.files delete mode 100644 bindings/vala/eek-0.90/eek-0.90.gi delete mode 100644 bindings/vala/eek-0.90/eek-0.90.metadata delete mode 100644 bindings/vala/eek-0.90/eek-0.90.namespace delete mode 100644 bindings/vala/eek-clutter-0.90/eek-clutter-0.90.defines delete mode 100644 bindings/vala/eek-clutter-0.90/eek-clutter-0.90.files delete mode 100644 bindings/vala/eek-clutter-0.90/eek-clutter-0.90.gi delete mode 100644 bindings/vala/eek-clutter-0.90/eek-clutter-0.90.metadata delete mode 100644 bindings/vala/eek-clutter-0.90/eek-clutter-0.90.namespace create mode 100644 bindings/vala/eek-gtk-0.90.deps delete mode 100644 bindings/vala/eek-gtk-0.90/eek-gtk-0.90.defines delete mode 100644 bindings/vala/eek-gtk-0.90/eek-gtk-0.90.files delete mode 100644 bindings/vala/eek-gtk-0.90/eek-gtk-0.90.gi delete mode 100644 bindings/vala/eek-gtk-0.90/eek-gtk-0.90.namespace delete mode 100644 bindings/vala/eek-xkb-0.90/eek-xkb-0.90.defines delete mode 100644 bindings/vala/eek-xkb-0.90/eek-xkb-0.90.files delete mode 100644 bindings/vala/eek-xkb-0.90/eek-xkb-0.90.gi delete mode 100644 bindings/vala/eek-xkb-0.90/eek-xkb-0.90.metadata delete mode 100644 bindings/vala/eek-xkb-0.90/eek-xkb-0.90.namespace create mode 100644 bindings/vala/eek-xkl-0.90.deps delete mode 100644 bindings/vala/eek-xkl-0.90/eek-xkl-0.90.defines delete mode 100644 bindings/vala/eek-xkl-0.90/eek-xkl-0.90.files delete mode 100644 bindings/vala/eek-xkl-0.90/eek-xkl-0.90.gi delete mode 100644 bindings/vala/eek-xkl-0.90/eek-xkl-0.90.namespace delete mode 100644 bindings/vala/eekboard-0.90/eekboard-0.90.defines delete mode 100644 bindings/vala/eekboard-0.90/eekboard-0.90.files delete mode 100644 bindings/vala/eekboard-0.90/eekboard-0.90.gi delete mode 100644 bindings/vala/eekboard-0.90/eekboard-0.90.metadata delete mode 100644 bindings/vala/eekboard-0.90/eekboard-0.90.namespace delete mode 100644 eek/eek-clutter-0.90.pc.in delete mode 100644 eek/eek-clutter-key.c delete mode 100644 eek/eek-clutter-key.h delete mode 100644 eek/eek-clutter-keyboard.c delete mode 100644 eek/eek-clutter-keyboard.h delete mode 100644 eek/eek-clutter-renderer.c delete mode 100644 eek/eek-clutter-renderer.h delete mode 100644 eek/eek-clutter-section.c delete mode 100644 eek/eek-clutter-section.h delete mode 100644 eek/eek-clutter.h delete mode 100644 tests/eek-xkb-test.c diff --git a/bindings/vala/Eek-0.90.metadata b/bindings/vala/Eek-0.90.metadata new file mode 100644 index 00000000..93e22fa2 --- /dev/null +++ b/bindings/vala/Eek-0.90.metadata @@ -0,0 +1 @@ +Eek cheader_filename="eek/eek.h" diff --git a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.metadata b/bindings/vala/EekGtk-0.90.metadata similarity index 100% rename from bindings/vala/eek-gtk-0.90/eek-gtk-0.90.metadata rename to bindings/vala/EekGtk-0.90.metadata diff --git a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.metadata b/bindings/vala/EekXkl-0.90.metadata similarity index 51% rename from bindings/vala/eek-xkl-0.90/eek-xkl-0.90.metadata rename to bindings/vala/EekXkl-0.90.metadata index 18930a26..9589ed35 100644 --- a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.metadata +++ b/bindings/vala/EekXkl-0.90.metadata @@ -1,2 +1 @@ EekXkl cheader_filename="eek/eek-xkl.h" -eek_xkl_layout_set_config hidden="1" diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 39c81843..7acccdd4 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -18,60 +18,66 @@ if ENABLE_VALA 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) +dist_vapi_DATA = \ + eek-$(EEK_API_VERSION).vapi \ + eek-$(EEK_API_VERSION).deps \ + eek-gtk-$(EEK_API_VERSION).vapi \ + eek-gtk-$(EEK_API_VERSION).deps \ + eek-xkl-$(EEK_API_VERSION).vapi \ + eek-xkl-$(EEK_API_VERSION).deps \ + $(NULL) -eek-$(EEK_API_VERSION).vapi: - $(VAPIGEN_V)$(VAPIGEN) \ - --library eek-$(EEK_API_VERSION) \ - --pkg gio-2.0 \ - eek-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi +EXTRA_DIST = \ + Eek-$(EEK_API_VERSION).metadata \ + EekGtk-$(EEK_API_VERSION).metadata \ + EekXkl-$(EEK_API_VERSION).metadata \ + $(NULL) -eek-clutter-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi - $(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \ - --library eek-clutter-$(EEK_API_VERSION) \ - --pkg eek-$(EEK_API_VERSION) \ - --pkg clutter-1.0 \ - --pkg gio-2.0 \ - --pkg atk \ - eek-clutter-$(EEK_API_VERSION)/eek-clutter-$(EEK_API_VERSION).gi +maintainer-clean-local: + rm -f *.vapi -eek-gtk-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi - $(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \ - --library eek-gtk-$(EEK_API_VERSION) \ - --pkg eek-$(EEK_API_VERSION) \ - --pkg gtk+-2.0 \ - eek-gtk-$(EEK_API_VERSION)/eek-gtk-$(EEK_API_VERSION).gi +eek_vapi_deps = \ + $(srcdir)/Eek-$(EEK_API_VERSION).metadata \ + | \ + $(top_srcdir)/eek/Eek-$(EEK_API_VERSION).gir \ + $(NULL) -eek-xkb-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi - $(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \ - --library eek-xkb-$(EEK_API_VERSION) \ - --pkg eek-$(EEK_API_VERSION) \ - --pkg gio-2.0 \ - eek-xkb-$(EEK_API_VERSION)/eek-xkb-$(EEK_API_VERSION).gi +eek-$(EEK_API_VERSION).vapi: $(eek_vapi_deps) + $(VAPIGEN_V)$(VAPIGEN) \ + --library eek-$(EEK_API_VERSION) \ + --pkg gio-2.0 \ + --metadatadir=$(srcdir) \ + $(top_srcdir)/eek/Eek-$(EEK_API_VERSION).gir -eek-xkl-$(EEK_API_VERSION).vapi: eek-xkb-$(EEK_API_VERSION).vapi - $(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \ - --library eek-xkl-$(EEK_API_VERSION) \ - --pkg eek-$(EEK_API_VERSION) \ - --pkg eek-xkb-$(EEK_API_VERSION) --pkg gio-2.0 \ - eek-xkl-$(EEK_API_VERSION)/eek-xkl-$(EEK_API_VERSION).gi +eek_gtk_vapi_deps = \ + $(srcdir)/EekGtk-$(EEK_API_VERSION).metadata \ + | \ + $(top_srcdir)/eek/EekGtk-$(EEK_API_VERSION).gir \ + $(NULL) -eekboard-$(EEK_API_VERSION).vapi: - $(VAPIGEN_V)$(VAPIGEN) \ - --library eekboard-$(EEK_API_VERSION) \ - --pkg eek-$(EEK_API_VERSION) \ - --pkg gio-2.0 \ - eek-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi +eek-gtk-$(EEK_API_VERSION).vapi: $(eek_gtk_vapi_deps) + $(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \ + --library eek-gtk-$(EEK_API_VERSION) \ + --pkg eek-$(EEK_API_VERSION) \ + --pkg gtk+-3.0 \ + --metadatadir=$(srcdir) \ + $(top_srcdir)/eek/EekGtk-$(EEK_API_VERSION).gir + +eek_xkl_vapi_deps = \ + $(srcdir)/EekXkl-$(EEK_API_VERSION).metadata \ + | \ + $(top_srcdir)/eek/EekXkl-$(EEK_API_VERSION).gir \ + $(NULL) + +eek-xkl-$(EEK_API_VERSION).vapi: $(eek_xkl_vapi_deps) + $(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \ + --library eek-xkl-$(EEK_API_VERSION) \ + --pkg eek-$(EEK_API_VERSION) \ + --metadatadir=$(srcdir) \ + $(top_srcdir)/eek/EekXkl-$(EEK_API_VERSION).gir # set up the verbosity rules to avoid some build noise VAPIGEN_V = $(VAPIGEN_V_$(V)) VAPIGEN_V_ = $(VAPIGEN_V_$(AM_DEFAULT_VERBOSITY)) VAPIGEN_V_0 = @echo " VAPIG " $@; endif - diff --git a/bindings/vala/eek-0.90.deps b/bindings/vala/eek-0.90.deps new file mode 100644 index 00000000..cd10dfde --- /dev/null +++ b/bindings/vala/eek-0.90.deps @@ -0,0 +1 @@ +gio-2.0 diff --git a/bindings/vala/eek-0.90/eek-0.90.defines b/bindings/vala/eek-0.90/eek-0.90.defines deleted file mode 100644 index 13f3e944..00000000 --- a/bindings/vala/eek-0.90/eek-0.90.defines +++ /dev/null @@ -1,2 +0,0 @@ --DEEK_COMPILATION=1 - diff --git a/bindings/vala/eek-0.90/eek-0.90.files b/bindings/vala/eek-0.90/eek-0.90.files deleted file mode 100644 index fca13821..00000000 --- a/bindings/vala/eek-0.90/eek-0.90.files +++ /dev/null @@ -1,17 +0,0 @@ -include/eek-0.90/eek/eek-container.h -include/eek-0.90/eek/eek-element.h -include/eek-0.90/eek/eek-enumtypes.h -include/eek-0.90/eek/eek-keyboard.h -include/eek-0.90/eek/eek-key.h -include/eek-0.90/eek/eek-keysym.h -include/eek-0.90/eek/eek-layout.h -include/eek-0.90/eek/eek-section.h -include/eek-0.90/eek/eek-serializable.h -include/eek-0.90/eek/eek-symbol.h -include/eek-0.90/eek/eek-symbol-matrix.h -include/eek-0.90/eek/eek-text.h -include/eek-0.90/eek/eek-theme.h -include/eek-0.90/eek/eek-types.h -include/eek-0.90/eek/eek-xml.h -include/eek-0.90/eek/eek-xml-layout.h -lib/libeek.so diff --git a/bindings/vala/eek-0.90/eek-0.90.gi b/bindings/vala/eek-0.90/eek-0.90.gi deleted file mode 100644 index 764a5abd..00000000 --- a/bindings/vala/eek-0.90/eek-0.90.gi +++ /dev/null @@ -1,1274 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/eek-0.90/eek-0.90.metadata b/bindings/vala/eek-0.90/eek-0.90.metadata deleted file mode 100644 index 027633a1..00000000 --- a/bindings/vala/eek-0.90/eek-0.90.metadata +++ /dev/null @@ -1,24 +0,0 @@ -Eek cheader_filename="eek/eek.h" - -EekBounds is_value_type="1" -eek_bounds_copy hidden="1" -eek_bounds_free hidden="1" - -EekPoint is_value_type="1" -eek_point_copy hidden="1" -eek_point_free hidden="1" - -EekOutline is_value_type="1" -eek_outline_copy hidden="1" -eek_outline_free hidden="1" - -EekColor is_value_type="1" -eek_color_copy hidden="1" -eek_color_free hidden="1" -eek_color_new hidden="1" - -eek_element_get_bounds.bounds is_out="1" -eek_element_get_absolute_position.x is_out="1" -eek_element_get_absolute_position.y is_out="1" -eek_element_get_symbol_index.group is_out="1" -eek_element_get_symbol_index.level is_out="1" diff --git a/bindings/vala/eek-0.90/eek-0.90.namespace b/bindings/vala/eek-0.90/eek-0.90.namespace deleted file mode 100644 index c1fad3e6..00000000 --- a/bindings/vala/eek-0.90/eek-0.90.namespace +++ /dev/null @@ -1 +0,0 @@ -Eek diff --git a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.defines b/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.defines deleted file mode 100644 index 13f3e944..00000000 --- a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.defines +++ /dev/null @@ -1,2 +0,0 @@ --DEEK_COMPILATION=1 - diff --git a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.files b/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.files deleted file mode 100644 index b50c0885..00000000 --- a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.files +++ /dev/null @@ -1,2 +0,0 @@ -include/eek-0.90/eek/eek-clutter-keyboard.h -lib/libeek-clutter.so diff --git a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.gi b/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.gi deleted file mode 100644 index a1152037..00000000 --- a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.gi +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.metadata b/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.metadata deleted file mode 100644 index 9e822223..00000000 --- a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.metadata +++ /dev/null @@ -1 +0,0 @@ -EekClutter cheader_filename="eek/eek-clutter.h" diff --git a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.namespace b/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.namespace deleted file mode 100644 index 0ab07524..00000000 --- a/bindings/vala/eek-clutter-0.90/eek-clutter-0.90.namespace +++ /dev/null @@ -1 +0,0 @@ -EekClutter diff --git a/bindings/vala/eek-gtk-0.90.deps b/bindings/vala/eek-gtk-0.90.deps new file mode 100644 index 00000000..8dd0dff3 --- /dev/null +++ b/bindings/vala/eek-gtk-0.90.deps @@ -0,0 +1 @@ +eek-0.90 diff --git a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.defines b/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.defines deleted file mode 100644 index 13f3e944..00000000 --- a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.defines +++ /dev/null @@ -1,2 +0,0 @@ --DEEK_COMPILATION=1 - diff --git a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.files b/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.files deleted file mode 100644 index cf47b04b..00000000 --- a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.files +++ /dev/null @@ -1,2 +0,0 @@ -include/eek-0.90/eek/eek-gtk-keyboard.h -lib/libeek-gtk.so diff --git a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.gi b/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.gi deleted file mode 100644 index baac52c4..00000000 --- a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.gi +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.namespace b/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.namespace deleted file mode 100644 index babdd854..00000000 --- a/bindings/vala/eek-gtk-0.90/eek-gtk-0.90.namespace +++ /dev/null @@ -1 +0,0 @@ -EekGtk diff --git a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.defines b/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.defines deleted file mode 100644 index 13f3e944..00000000 --- a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.defines +++ /dev/null @@ -1,2 +0,0 @@ --DEEK_COMPILATION=1 - diff --git a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.files b/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.files deleted file mode 100644 index 1eba01fd..00000000 --- a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.files +++ /dev/null @@ -1,2 +0,0 @@ -include/eek-0.90/eek/eek-xkb-layout.h -lib/libeek-xkb.so diff --git a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.gi b/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.gi deleted file mode 100644 index 891d532e..00000000 --- a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.gi +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.metadata b/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.metadata deleted file mode 100644 index 3161e099..00000000 --- a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.metadata +++ /dev/null @@ -1,2 +0,0 @@ -EekXkb cheader_filename="eek/eek-xkb.h" -eek_xkb_layout_set_names hidden="1" diff --git a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.namespace b/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.namespace deleted file mode 100644 index 0cd3bb51..00000000 --- a/bindings/vala/eek-xkb-0.90/eek-xkb-0.90.namespace +++ /dev/null @@ -1 +0,0 @@ -EekXkb diff --git a/bindings/vala/eek-xkl-0.90.deps b/bindings/vala/eek-xkl-0.90.deps new file mode 100644 index 00000000..8dd0dff3 --- /dev/null +++ b/bindings/vala/eek-xkl-0.90.deps @@ -0,0 +1 @@ +eek-0.90 diff --git a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.defines b/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.defines deleted file mode 100644 index 13f3e944..00000000 --- a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.defines +++ /dev/null @@ -1,2 +0,0 @@ --DEEK_COMPILATION=1 - diff --git a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.files b/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.files deleted file mode 100644 index 9de258ab..00000000 --- a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.files +++ /dev/null @@ -1,2 +0,0 @@ -include/eek-0.90/eek/eek-xkl-layout.h -lib/libeek-xkl.so diff --git a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.gi b/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.gi deleted file mode 100644 index 87b9928b..00000000 --- a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.gi +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.namespace b/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.namespace deleted file mode 100644 index 128e238c..00000000 --- a/bindings/vala/eek-xkl-0.90/eek-xkl-0.90.namespace +++ /dev/null @@ -1 +0,0 @@ -EekXkl diff --git a/bindings/vala/eekboard-0.90/eekboard-0.90.defines b/bindings/vala/eekboard-0.90/eekboard-0.90.defines deleted file mode 100644 index db1a80fc..00000000 --- a/bindings/vala/eekboard-0.90/eekboard-0.90.defines +++ /dev/null @@ -1,2 +0,0 @@ --DEEKBOARD_COMPILATION - diff --git a/bindings/vala/eekboard-0.90/eekboard-0.90.files b/bindings/vala/eekboard-0.90/eekboard-0.90.files deleted file mode 100644 index e404028a..00000000 --- a/bindings/vala/eekboard-0.90/eekboard-0.90.files +++ /dev/null @@ -1,2 +0,0 @@ -include/eekboard-0.90/eekboard -lib/libeekboard.so diff --git a/bindings/vala/eekboard-0.90/eekboard-0.90.gi b/bindings/vala/eekboard-0.90/eekboard-0.90.gi deleted file mode 100644 index 4b6414a4..00000000 --- a/bindings/vala/eekboard-0.90/eekboard-0.90.gi +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/eekboard-0.90/eekboard-0.90.metadata b/bindings/vala/eekboard-0.90/eekboard-0.90.metadata deleted file mode 100644 index 801914c7..00000000 --- a/bindings/vala/eekboard-0.90/eekboard-0.90.metadata +++ /dev/null @@ -1 +0,0 @@ -Eekboard cheader_filename="eekboard/eekboard.h" diff --git a/bindings/vala/eekboard-0.90/eekboard-0.90.namespace b/bindings/vala/eekboard-0.90/eekboard-0.90.namespace deleted file mode 100644 index 43adc02e..00000000 --- a/bindings/vala/eekboard-0.90/eekboard-0.90.namespace +++ /dev/null @@ -1 +0,0 @@ -Eekboard diff --git a/configure.ac b/configure.ac index 827702d3..c9d842d2 100644 --- a/configure.ac +++ b/configure.ac @@ -97,8 +97,6 @@ PKG_CHECK_MODULES([GTK], [ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gdk-$GTK_API_VERSION >= $GTK_REQUIRED], , [AC_MSG_ERROR([GTK not found])]) -PKG_CHECK_MODULES([XKB], [x11], , - [AC_MSG_ERROR([XKB support not found])]) PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], , [AC_MSG_ERROR([Libxklavier not found])]) PKG_CHECK_MODULES([LIBCROCO], [libcroco-0.6], , @@ -219,48 +217,11 @@ fi AC_MSG_RESULT($enable_vala) AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes]) -dnl clutter -AC_MSG_CHECKING([whether you enable clutter]) -AC_ARG_ENABLE(clutter, - AS_HELP_STRING([--enable-clutter=no/yes], - [Enable clutter user interface default=no]), - enable_clutter=$enableval, - enable_clutter=no) - -if test x$enable_clutter = xyes; then - PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], , enable_clutter=no) - if test x$enable_clutter = xyes; then - AC_DEFINE([HAVE_CLUTTER], [1], [Define if clutter is found]) - fi -fi -AM_CONDITIONAL(ENABLE_CLUTTER, [test x$enable_clutter = xyes]) -AC_MSG_RESULT($enable_clutter) - -dnl clutter-gtk -if test x$enable_clutter = xyes; then - AC_MSG_CHECKING([whether you enable clutter-gtk]) - AC_ARG_ENABLE(clutter-gtk, - AS_HELP_STRING([--enable-clutter-gtk=no/yes], - [Enable clutter user interface default=yes]), - enable_clutter_gtk=$enableval, - enable_clutter_gtk=yes) - - if test x$enable_clutter_gtk = xyes; then - PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0], , - enable_clutter_gtk=no) - if test x$enable_clutter_gtk = xyes; then - AC_DEFINE([HAVE_CLUTTER_GTK], [1], [Define if Clutter-Gtk is found]) - fi - fi - AC_MSG_RESULT($enable_clutter_gtk) -fi -AM_CONDITIONAL(ENABLE_CLUTTER_GTK, [test x$enable_clutter_gtk = xyes]) - dnl libcanberra AC_MSG_CHECKING([whether you enable libcanberra]) AC_ARG_ENABLE(libcanberra, AS_HELP_STRING([--enable-libcanberra=no/yes], - [Enable clutter user interface default=no]), + [Enable libcanberra user interface default=no]), enable_libcanberra=$enableval, enable_libcanberra=yes) @@ -309,9 +270,7 @@ examples/Makefile examples/eekxml/Makefile examples/simple-client/Makefile 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 eekboard/eekboard-${EEK_API_VERSION}.pc]) AC_OUTPUT @@ -323,7 +282,6 @@ Build options: Build static libs $enable_static CFLAGS $CFLAGS GTK version $with_gtk - Build Clutter UI $enable_clutter Build Vala binding $enable_vala Sound support $enable_libcanberra Build document $enable_gtk_doc diff --git a/data/org.fedorahosted.eekboard.gschema.xml.in b/data/org.fedorahosted.eekboard.gschema.xml.in index 130ea9dd..9cfae422 100644 --- a/data/org.fedorahosted.eekboard.gschema.xml.in +++ b/data/org.fedorahosted.eekboard.gschema.xml.in @@ -6,11 +6,6 @@ Keyboard types keyboard types. - - 'gtk' - GUI toolkit used to render keyboard - The name of GUI toolkit (either 'gtk' or 'clutter') used to render keyboard on screen. - 'atspi' Use the given focus listener diff --git a/docs/reference/eek/Makefile.am b/docs/reference/eek/Makefile.am index e3a94e5c..71a694be 100644 --- a/docs/reference/eek/Makefile.am +++ b/docs/reference/eek/Makefile.am @@ -79,16 +79,10 @@ EXTRA_HFILES= IGNORE_HFILES = \ config.h \ eek-renderer.h \ - eek-clutter-renderer.h \ - eek-clutter-section.h \ - eek-clutter-key.h \ eek-gtk-renderer.h \ eek-theme.h \ eek-theme-node.h \ eek-enumtypes.h -if !ENABLE_CLUTTER -IGNORE_HFILES += eek-clutter-keyboard.h eek-clutter.h -endif # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png @@ -111,17 +105,10 @@ expand_content_files=eek-overview.xml GTKDOC_CFLAGS = $(GIO2_CFLAGS) GTKDOC_LIBS = $(top_builddir)/eek/libeek.la \ $(top_builddir)/eek/libeek-gtk.la \ - $(top_builddir)/eek/libeek-xkb.la \ $(top_builddir)/eek/libeek-xkl.la \ $(GIO2_LIBS) \ $(GTK_LIBS) \ - $(XKB_LIBS) - -if ENABLE_CLUTTER -GTKDOC_LIBS += \ - $(top_builddir)/eek/libeek-clutter.la \ - $(CLUTTER_LIBS) -endif + $(LIBXKLAVIER_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/docs/reference/eek/eek-sections.txt b/docs/reference/eek/eek-sections.txt index 282247a6..ca0b64c0 100644 --- a/docs/reference/eek/eek-sections.txt +++ b/docs/reference/eek/eek-sections.txt @@ -1,159 +1,28 @@
-eek-keyboard -EekKeyboard -EekKeyboard -EekKeyboardClass -EekModifierKey -eek_keyboard_new -eek_keyboard_get_layout -eek_keyboard_get_size -eek_keyboard_set_size -eek_keyboard_set_symbol_index -eek_keyboard_get_symbol_index -eek_keyboard_set_group -eek_keyboard_set_level -eek_keyboard_get_group -eek_keyboard_get_level -eek_keyboard_set_modifier_behavior -eek_keyboard_get_modifier_behavior -eek_keyboard_set_modifiers -eek_keyboard_get_modifiers -eek_keyboard_create_section -eek_keyboard_find_key_by_keycode -eek_keyboard_add_outline -eek_keyboard_get_outline -eek_keyboard_set_num_lock_mask -eek_keyboard_get_num_lock_mask -eek_keyboard_set_alt_gr_mask -eek_keyboard_get_alt_gr_mask -eek_keyboard_get_pressed_keys -eek_keyboard_get_locked_keys -EekKeyboardPrivate - -EEK_KEYBOARD -EEK_IS_KEYBOARD -EEK_TYPE_KEYBOARD -eek_keyboard_get_type -EEK_KEYBOARD_CLASS -EEK_IS_KEYBOARD_CLASS -EEK_KEYBOARD_GET_CLASS +eek +eek_init
-eek-layout -EekLayout -EekLayout -EekLayoutClass - -EEK_LAYOUT -EEK_IS_LAYOUT -EEK_TYPE_LAYOUT -eek_layout_get_type -EEK_LAYOUT_CLASS -EEK_IS_LAYOUT_CLASS -EEK_LAYOUT_GET_CLASS +eek-clutter +
-eek-gtk-keyboard -EekGtkKeyboard -EekGtkKeyboard -EekGtkKeyboardClass -eek_gtk_keyboard_new -eek_gtk_keyboard_set_theme -EekGtkKeyboardPrivate +eek-clutter-key +EekClutterKey +EekClutterKey +EekClutterKeyClass +eek_clutter_key_new -EEK_GTK_KEYBOARD -EEK_IS_GTK_KEYBOARD -EEK_TYPE_GTK_KEYBOARD -eek_gtk_keyboard_get_type -EEK_GTK_KEYBOARD_CLASS -EEK_IS_GTK_KEYBOARD_CLASS -EEK_GTK_KEYBOARD_GET_CLASS -
- -
-eek-section -EekSection -EekSection -EekSectionClass -eek_section_set_angle -eek_section_get_angle -eek_section_get_n_rows -eek_section_add_row -eek_section_get_row -eek_section_create_key -eek_section_find_key_by_keycode -EekSectionPrivate - -EEK_SECTION -EEK_IS_SECTION -EEK_TYPE_SECTION -eek_section_get_type -EEK_SECTION_CLASS -EEK_IS_SECTION_CLASS -EEK_SECTION_GET_CLASS -
- -
-eek-text -EekText -EekText -EekTextClass -eek_text_new -eek_text_get_text -EekTextPrivate - -EEK_TEXT -EEK_IS_TEXT -EEK_TYPE_TEXT -eek_text_get_type -EEK_TEXT_CLASS -EEK_IS_TEXT_CLASS -EEK_TEXT_GET_CLASS -
- -
-eek-theme-context -eek_theme_context_new -eek_theme_context_set_theme -eek_theme_context_get_theme -eek_theme_context_set_resolution -eek_theme_context_set_default_resolution -eek_theme_context_get_resolution -eek_theme_context_set_font -eek_theme_context_get_font -eek_theme_context_get_root_node -EekThemeContextClass - -EEK_THEME_CONTEXT -EEK_IS_THEME_CONTEXT -EEK_TYPE_THEME_CONTEXT -eek_theme_context_get_type -EEK_THEME_CONTEXT_CLASS -EEK_IS_THEME_CONTEXT_CLASS -EEK_THEME_CONTEXT_GET_CLASS -
- -
-eek-container -EekContainer -EekCallback -EekCompareFunc -EekContainer -EekContainerClass -eek_container_foreach_child -eek_container_find -eek_container_add_child -EekContainerPrivate - -EEK_CONTAINER -EEK_IS_CONTAINER -EEK_TYPE_CONTAINER -eek_container_get_type -EEK_CONTAINER_CLASS -EEK_IS_CONTAINER_CLASS -EEK_CONTAINER_GET_CLASS +EEK_CLUTTER_KEY +EEK_CLUTTER_KEY_CLASS +EEK_CLUTTER_KEY_GET_CLASS +EEK_IS_CLUTTER_KEY +EEK_IS_CLUTTER_KEY_CLASS +EEK_TYPE_CLUTTER_KEY +EekClutterKeyPrivate +eek_clutter_key_get_type
@@ -163,145 +32,71 @@ EekClutterKeyboard EekClutterKeyboardClass eek_clutter_keyboard_new eek_clutter_keyboard_set_theme -EekClutterKeyboardPrivate EEK_CLUTTER_KEYBOARD -EEK_IS_CLUTTER_KEYBOARD -EEK_TYPE_CLUTTER_KEYBOARD -eek_clutter_keyboard_get_type EEK_CLUTTER_KEYBOARD_CLASS -EEK_IS_CLUTTER_KEYBOARD_CLASS EEK_CLUTTER_KEYBOARD_GET_CLASS +EEK_IS_CLUTTER_KEYBOARD +EEK_IS_CLUTTER_KEYBOARD_CLASS +EEK_TYPE_CLUTTER_KEYBOARD +EekClutterKeyboardPrivate +eek_clutter_keyboard_get_type
-eek-symbol -EekSymbol -EekSymbolCategory -EekSymbol -EekSymbolClass -eek_symbol_new -eek_symbol_set_name -eek_symbol_get_name -eek_symbol_set_label -eek_symbol_get_label -eek_symbol_set_category -eek_symbol_get_category -eek_symbol_get_modifier_mask -eek_symbol_set_modifier_mask -eek_symbol_is_modifier -eek_symbol_set_icon_name -eek_symbol_get_icon_name -eek_symbol_category_get_name -eek_symbol_category_from_name -EekSymbolPrivate +eek-clutter-renderer +EekClutterRenderer +EekClutterRenderer +EekClutterRendererClass +eek_clutter_renderer_new +eek_clutter_renderer_render_key -EEK_SYMBOL -EEK_IS_SYMBOL -EEK_TYPE_SYMBOL -eek_symbol_get_type -EEK_SYMBOL_CLASS -EEK_IS_SYMBOL_CLASS -EEK_SYMBOL_GET_CLASS +EEK_CLUTTER_RENDERER +EEK_CLUTTER_RENDERER_CLASS +EEK_CLUTTER_RENDERER_GET_CLASS +EEK_IS_CLUTTER_RENDERER +EEK_IS_CLUTTER_RENDERER_CLASS +EEK_TYPE_CLUTTER_RENDERER +EekClutterRendererPrivate +eek_clutter_renderer_get_type
-eek-xkl-layout -EekXklLayout -EekXklLayout -EekXklLayoutClass -eek_xkl_layout_new -eek_xkl_layout_set_config -eek_xkl_layout_set_config_full -eek_xkl_layout_set_model -eek_xkl_layout_set_layouts -eek_xkl_layout_set_variants -eek_xkl_layout_set_options -eek_xkl_layout_enable_option -eek_xkl_layout_disable_option -eek_xkl_layout_get_model -eek_xkl_layout_get_layouts -eek_xkl_layout_get_variants -eek_xkl_layout_get_options -eek_xkl_layout_get_option -EekXklLayoutPrivate +eek-clutter-section +EekClutterSection +EekClutterSection +EekClutterSectionClass +eek_clutter_section_new -EEK_XKL_LAYOUT -EEK_IS_XKL_LAYOUT -EEK_TYPE_XKL_LAYOUT -eek_xkl_layout_get_type -EEK_XKL_LAYOUT_CLASS -EEK_IS_XKL_LAYOUT_CLASS -EEK_XKL_LAYOUT_GET_CLASS +EEK_CLUTTER_SECTION +EEK_CLUTTER_SECTION_CLASS +EEK_CLUTTER_SECTION_GET_CLASS +EEK_IS_CLUTTER_SECTION +EEK_IS_CLUTTER_SECTION_CLASS +EEK_TYPE_CLUTTER_SECTION +EekClutterSectionPrivate +eek_clutter_section_get_type
-eek-xkb-layout -EekXkbLayout -EekXkbLayout -EekXkbLayoutClass -eek_xkb_layout_new -eek_xkb_layout_set_names -eek_xkb_layout_set_names_full -eek_xkb_layout_set_names_full_valist -eek_xkb_layout_set_keycodes -eek_xkb_layout_set_geometry -eek_xkb_layout_set_symbols -eek_xkb_layout_get_keycodes -eek_xkb_layout_get_geometry -eek_xkb_layout_get_symbols -EekXkbLayoutPrivate +eek-container +EekContainer +EekCallback +EekCompareFunc +EekContainer +EekContainerClass +eek_container_add_child +eek_container_find +eek_container_foreach_child -EEK_XKB_LAYOUT -EEK_IS_XKB_LAYOUT -EEK_TYPE_XKB_LAYOUT -eek_xkb_layout_get_type -EEK_XKB_LAYOUT_CLASS -EEK_IS_XKB_LAYOUT_CLASS -EEK_XKB_LAYOUT_GET_CLASS -
- -
-eek-key -EekKey -EekKey -EekKeyClass -eek_key_set_keycode -eek_key_get_keycode -eek_key_set_symbol_matrix -eek_key_get_symbol_matrix -eek_key_get_symbol -eek_key_get_symbol_with_fallback -eek_key_get_symbol_at_index -eek_key_set_index -eek_key_get_index -eek_key_set_oref -eek_key_get_oref -eek_key_is_pressed -eek_key_is_locked -EekKeyPrivate - -EEK_KEY -EEK_IS_KEY -EEK_TYPE_KEY -eek_key_get_type -EEK_KEY_CLASS -EEK_IS_KEY_CLASS -EEK_KEY_GET_CLASS -
- -
-eek-serializable -EekSerializable -EekSerializableIface -eek_serializable_serialize -eek_serializable_deserialize - -EEK_SERIALIZABLE -EEK_IS_SERIALIZABLE -EEK_TYPE_SERIALIZABLE -eek_serializable_get_type -EEK_SERIALIZABLE_GET_IFACE +EEK_CONTAINER +EEK_CONTAINER_CLASS +EEK_CONTAINER_GET_CLASS +EEK_IS_CONTAINER +EEK_IS_CONTAINER_CLASS +EEK_TYPE_CONTAINER +EekContainerPrivate +eek_container_get_type
@@ -309,70 +104,417 @@ EEK_SERIALIZABLE_GET_IFACE EekElement EekElement EekElementClass -eek_element_set_parent -eek_element_get_parent -eek_element_set_name -eek_element_get_name -eek_element_set_bounds -eek_element_get_bounds -eek_element_set_position -eek_element_set_size eek_element_get_absolute_position -eek_element_set_symbol_index -eek_element_get_symbol_index -eek_element_set_group -eek_element_set_level +eek_element_get_bounds eek_element_get_group eek_element_get_level -EekElementPrivate +eek_element_get_name +eek_element_get_parent +eek_element_get_symbol_index +eek_element_set_bounds +eek_element_set_group +eek_element_set_level +eek_element_set_name +eek_element_set_parent +eek_element_set_position +eek_element_set_size +eek_element_set_symbol_index EEK_ELEMENT -EEK_IS_ELEMENT -EEK_TYPE_ELEMENT -eek_element_get_type EEK_ELEMENT_CLASS -EEK_IS_ELEMENT_CLASS EEK_ELEMENT_GET_CLASS +EEK_IS_ELEMENT +EEK_IS_ELEMENT_CLASS +EEK_TYPE_ELEMENT +EekElementPrivate +eek_element_get_type
-eek-xml-layout -EekXmlLayout -EekXmlLayout -EekXmlLayoutClass -eek_xml_layout_new -eek_xml_layout_set_source -eek_xml_layout_get_source -EekXmlLayoutPrivate +eek-gtk + +
+ +
+eek-gtk-keyboard +EekGtkKeyboard +EekGtkKeyboard +EekGtkKeyboardClass +eek_gtk_keyboard_new +eek_gtk_keyboard_set_theme -EEK_XML_LAYOUT -EEK_IS_XML_LAYOUT -EEK_TYPE_XML_LAYOUT -eek_xml_layout_get_type -EEK_XML_LAYOUT_CLASS -EEK_IS_XML_LAYOUT_CLASS -EEK_XML_LAYOUT_GET_CLASS +EEK_GTK_KEYBOARD +EEK_GTK_KEYBOARD_CLASS +EEK_GTK_KEYBOARD_GET_CLASS +EEK_IS_GTK_KEYBOARD +EEK_IS_GTK_KEYBOARD_CLASS +EEK_TYPE_GTK_KEYBOARD +EekGtkKeyboardPrivate +eek_gtk_keyboard_get_type +
+ +
+eek-key +EekKey +EekKey +EekKeyClass +eek_key_get_index +eek_key_get_keycode +eek_key_get_oref +eek_key_get_symbol +eek_key_get_symbol_at_index +eek_key_get_symbol_matrix +eek_key_get_symbol_with_fallback +eek_key_is_locked +eek_key_is_pressed +eek_key_set_index +eek_key_set_keycode +eek_key_set_oref +eek_key_set_symbol_matrix + +EEK_IS_KEY +EEK_IS_KEY_CLASS +EEK_KEY +EEK_KEY_CLASS +EEK_KEY_GET_CLASS +EEK_TYPE_KEY +EekKeyPrivate +eek_key_get_type +
+ +
+eek-keyboard +EekKeyboard +EekKeyboard +EekKeyboardClass +EekModifierKey +eek_keyboard_add_outline +eek_keyboard_create_section +eek_keyboard_find_key_by_keycode +eek_keyboard_get_alt_gr_mask +eek_keyboard_get_group +eek_keyboard_get_layout +eek_keyboard_get_level +eek_keyboard_get_locked_keys +eek_keyboard_get_modifier_behavior +eek_keyboard_get_modifiers +eek_keyboard_get_num_lock_mask +eek_keyboard_get_outline +eek_keyboard_get_pressed_keys +eek_keyboard_get_size +eek_keyboard_get_symbol_index +eek_keyboard_new +eek_keyboard_set_alt_gr_mask +eek_keyboard_set_group +eek_keyboard_set_level +eek_keyboard_set_modifier_behavior +eek_keyboard_set_modifiers +eek_keyboard_set_num_lock_mask +eek_keyboard_set_size +eek_keyboard_set_symbol_index + +EEK_IS_KEYBOARD +EEK_IS_KEYBOARD_CLASS +EEK_KEYBOARD +EEK_KEYBOARD_CLASS +EEK_KEYBOARD_GET_CLASS +EEK_TYPE_KEYBOARD +EekKeyboardPrivate +eek_keyboard_get_type
eek-keysym EekKeysym -EEK_KEYSYM EekKeysym EekKeysymClass -eek_keysym_new eek_keysym_get_xkeysym +eek_keysym_new eek_keysym_new_from_name eek_keysym_new_with_modifier -EekKeysymPrivate EEK_INVALID_KEYSYM EEK_IS_KEYSYM -EEK_TYPE_KEYSYM -eek_keysym_get_type -EEK_KEYSYM_CLASS EEK_IS_KEYSYM_CLASS +EEK_KEYSYM +EEK_KEYSYM_CLASS EEK_KEYSYM_GET_CLASS +EEK_TYPE_KEYSYM +EekKeysymPrivate +eek_keysym_get_type +
+ +
+eek-layout +EekLayout +EekLayout +EekLayoutClass + +EEK_IS_LAYOUT +EEK_IS_LAYOUT_CLASS +EEK_LAYOUT +EEK_LAYOUT_CLASS +EEK_LAYOUT_GET_CLASS +EEK_TYPE_LAYOUT +eek_layout_get_type +
+ +
+eek-marshalers + +
+ +
+eek-section +EekSection +EekSection +EekSectionClass +eek_section_add_row +eek_section_create_key +eek_section_find_key_by_keycode +eek_section_get_angle +eek_section_get_n_rows +eek_section_get_row +eek_section_set_angle + +EEK_IS_SECTION +EEK_IS_SECTION_CLASS +EEK_SECTION +EEK_SECTION_CLASS +EEK_SECTION_GET_CLASS +EEK_TYPE_SECTION +EekSectionPrivate +eek_section_get_type +
+ +
+eek-serializable +EekSerializable +EekSerializableIface +eek_serializable_deserialize +eek_serializable_serialize + +EEK_IS_SERIALIZABLE +EEK_SERIALIZABLE +EEK_SERIALIZABLE_GET_IFACE +EEK_TYPE_SERIALIZABLE +eek_serializable_get_type +
+ +
+eek-special-keysym-entries + +
+ +
+eek-symbol +EekSymbol +EekSymbol +EekSymbolCategory +EekSymbolClass +eek_symbol_category_from_name +eek_symbol_category_get_name +eek_symbol_get_category +eek_symbol_get_icon_name +eek_symbol_get_label +eek_symbol_get_modifier_mask +eek_symbol_get_name +eek_symbol_is_modifier +eek_symbol_new +eek_symbol_set_category +eek_symbol_set_icon_name +eek_symbol_set_label +eek_symbol_set_modifier_mask +eek_symbol_set_name + +EEK_IS_SYMBOL +EEK_IS_SYMBOL_CLASS +EEK_SYMBOL +EEK_SYMBOL_CLASS +EEK_SYMBOL_GET_CLASS +EEK_TYPE_SYMBOL +EekSymbolPrivate +eek_symbol_get_type +
+ +
+eek-symbol-matrix +EekSymbolMatrix +eek_symbol_matrix_copy +eek_symbol_matrix_free +eek_symbol_matrix_get_symbol +eek_symbol_matrix_new +eek_symbol_matrix_set_symbol + +EEK_TYPE_SYMBOL_MATRIX +eek_symbol_matrix_get_type +
+ +
+eek-text +EekText +EekText +EekTextClass +eek_text_get_text +eek_text_new + +EEK_IS_TEXT +EEK_IS_TEXT_CLASS +EEK_TEXT +EEK_TEXT_CLASS +EEK_TEXT_GET_CLASS +EEK_TYPE_TEXT +EekTextPrivate +eek_text_get_type +
+ +
+eek-theme-context +EekThemeContextClass +eek_theme_context_get_font +eek_theme_context_get_resolution +eek_theme_context_get_root_node +eek_theme_context_get_theme +eek_theme_context_new +eek_theme_context_set_default_resolution +eek_theme_context_set_font +eek_theme_context_set_resolution +eek_theme_context_set_theme + +EEK_IS_THEME_CONTEXT +EEK_IS_THEME_CONTEXT_CLASS +EEK_THEME_CONTEXT +EEK_THEME_CONTEXT_CLASS +EEK_THEME_CONTEXT_GET_CLASS +EEK_TYPE_THEME_CONTEXT +eek_theme_context_get_type +
+ +
+eek-theme-private + +
+ +
+eek-types +EEK_INVALID_KEYCODE +EekBounds +EekColor +EekContainer +EekElement +EekGradientType +EekKey +EekKeyboard +EekKeysym +EekModifierBehavior +EekModifierType +EekOrientation +EekOutline +EekPoint +EekSection +EekSymbol +EekSymbolMatrix +EekText +EekTheme +EekThemeContext +EekThemeNode +I_ +eek_bounds_copy +eek_bounds_free +eek_bounds_long_side +eek_color_copy +eek_color_free +eek_color_new +eek_outline_copy +eek_outline_free +eek_point_copy +eek_point_free +eek_point_rotate + +EEK_TYPE_BOUNDS +EEK_TYPE_COLOR +EEK_TYPE_OUTLINE +EEK_TYPE_POINT +eek_bounds_get_type +eek_color_get_type +eek_outline_get_type +eek_point_get_type +
+ +
+eek-unicode-keysym-entries + +
+ +
+eek-xkb + +
+ +
+eek-xkb-layout +EekXkbLayout +EekXkbLayout +EekXkbLayoutClass +eek_xkb_layout_get_geometry +eek_xkb_layout_get_keycodes +eek_xkb_layout_get_symbols +eek_xkb_layout_new +eek_xkb_layout_set_geometry +eek_xkb_layout_set_keycodes +eek_xkb_layout_set_names +eek_xkb_layout_set_names_full +eek_xkb_layout_set_names_full_valist +eek_xkb_layout_set_symbols + +EEK_IS_XKB_LAYOUT +EEK_IS_XKB_LAYOUT_CLASS +EEK_TYPE_XKB_LAYOUT +EEK_XKB_LAYOUT +EEK_XKB_LAYOUT_CLASS +EEK_XKB_LAYOUT_GET_CLASS +EekXkbLayoutPrivate +eek_xkb_layout_get_type +
+ +
+eek-xkeysym-keysym-entries + +
+ +
+eek-xkl + +
+ +
+eek-xkl-layout +EekXklLayout +EekXklLayout +EekXklLayoutClass +eek_xkl_layout_disable_option +eek_xkl_layout_enable_option +eek_xkl_layout_get_layouts +eek_xkl_layout_get_model +eek_xkl_layout_get_option +eek_xkl_layout_get_options +eek_xkl_layout_get_variants +eek_xkl_layout_new +eek_xkl_layout_set_config +eek_xkl_layout_set_config_full +eek_xkl_layout_set_layouts +eek_xkl_layout_set_model +eek_xkl_layout_set_options +eek_xkl_layout_set_variants + +EEK_IS_XKL_LAYOUT +EEK_IS_XKL_LAYOUT_CLASS +EEK_TYPE_XKL_LAYOUT +EEK_XKL_LAYOUT +EEK_XKL_LAYOUT_CLASS +EEK_XKL_LAYOUT_GET_CLASS +EekXklLayoutPrivate +eek_xkl_layout_get_type
@@ -382,52 +524,21 @@ eek_keyboard_output
-eek-types -I_ -EEK_TYPE_POINT -EEK_TYPE_BOUNDS -EEK_TYPE_OUTLINE -EEK_TYPE_COLOR -EekOrientation -EekModifierBehavior -EekModifierType -EEK_INVALID_KEYCODE -EekPoint -eek_point_get_type -eek_point_copy -eek_point_free -eek_point_rotate -EekBounds -eek_bounds_get_type -eek_bounds_copy -eek_bounds_free -eek_bounds_long_side -EekOutline -eek_outline_get_type -eek_outline_copy -eek_outline_free -EekColor -eek_color_get_type -eek_color_new -eek_color_copy -eek_color_free -EekGradientType -
- -
-eek -eek_init -
- -
-eek-symbol-matrix -EekSymbolMatrix -EEK_TYPE_SYMBOL_MATRIX -eek_symbol_matrix_get_type -eek_symbol_matrix_new -eek_symbol_matrix_copy -eek_symbol_matrix_free -eek_symbol_matrix_set_symbol -eek_symbol_matrix_get_symbol +eek-xml-layout +EekXmlLayout +EekXmlLayout +EekXmlLayoutClass +eek_xml_layout_get_source +eek_xml_layout_new +eek_xml_layout_set_source + +EEK_IS_XML_LAYOUT +EEK_IS_XML_LAYOUT_CLASS +EEK_TYPE_XML_LAYOUT +EEK_XML_LAYOUT +EEK_XML_LAYOUT_CLASS +EEK_XML_LAYOUT_GET_CLASS +EekXmlLayoutPrivate +eek_xml_layout_get_type
diff --git a/eek/Makefile.am b/eek/Makefile.am index 4defb2c1..aec12fdc 100644 --- a/eek/Makefile.am +++ b/eek/Makefile.am @@ -19,13 +19,8 @@ lib_LTLIBRARIES = \ libeek.la \ libeek-gtk.la \ - libeek-xkb.la \ libeek-xkl.la -if ENABLE_CLUTTER -lib_LTLIBRARIES += libeek-clutter.la -endif - libeek_public_headers = \ $(srcdir)/eek-layout.h \ $(srcdir)/eek-element.h \ @@ -102,27 +97,6 @@ libeek_la_SOURCES = \ libeek_la_CFLAGS = -DEEK_COMPILATION=1 $(GIO2_CFLAGS) $(PANGOCAIRO_CFLAGS) $(LIBCROCO_CFLAGS) libeek_la_LIBADD = $(GIO2_LIBS) $(PANGOCAIRO_LIBS) $(LIBCROCO_LIBS) -lm -if ENABLE_CLUTTER -libeek_clutter_public_headers = \ - $(srcdir)/eek-clutter-keyboard.h \ - $(srcdir)/eek-clutter.h - -libeek_clutter_private_headers = \ - $(srcdir)/eek-clutter-section.h \ - $(srcdir)/eek-clutter-key.h \ - $(srcdir)/eek-clutter-renderer.h - -libeek_clutter_sources = \ - $(srcdir)/eek-clutter-keyboard.c \ - $(srcdir)/eek-clutter-section.c \ - $(srcdir)/eek-clutter-key.c \ - $(srcdir)/eek-clutter-renderer.c - -libeek_clutter_la_SOURCES = $(libeek_clutter_sources) -libeek_clutter_la_CFLAGS = -DEEK_COMPILATION=1 $(CLUTTER_CFLAGS) -libeek_clutter_la_LIBADD = libeek.la $(CLUTTER_LIBS) -endif - libeek_gtk_public_headers = \ $(srcdir)/eek-gtk-keyboard.h \ $(srcdir)/eek-gtk.h @@ -136,42 +110,30 @@ libeek_gtk_la_SOURCES = $(libeek_gtk_sources) libeek_gtk_la_CFLAGS = -DEEK_COMPILATION=1 $(GTK_CFLAGS) $(LIBCANBERRA_CFLAGS) libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(LIBCANBERRA_LIBS) -libeek_xkb_public_headers = \ +libeek_xkl_public_headers = \ + $(srcdir)/eek-xkl-layout.h \ + $(srcdir)/eek-xkl.h \ $(srcdir)/eek-xkb-layout.h \ $(srcdir)/eek-xkb.h -libeek_xkb_sources = \ - $(srcdir)/eek-xkb-layout.c - -libeek_xkb_la_SOURCES = $(libeek_xkb_sources) -libeek_xkb_la_CFLAGS = -DEEK_COMPILATION=1 $(XKB_CFLAGS) $(GTK_CFLAGS) -libeek_xkb_la_LIBADD = libeek.la $(XKB_LIBS) $(GTK_LIBS) - -libeek_xkl_public_headers = \ - $(srcdir)/eek-xkl-layout.h \ - $(srcdir)/eek-xkl.h - libeek_xkl_sources = \ + $(srcdir)/eek-xkb-layout.c \ $(srcdir)/eek-xkl-layout.c libeek_xkl_la_SOURCES = $(libeek_xkl_sources) libeek_xkl_la_CFLAGS = -DEEK_COMPILATION=1 $(LIBXKLAVIER_CFLAGS) $(GTK_CFLAGS) -libeek_xkl_la_LIBADD = libeek-xkb.la $(LIBXKLAVIER_LIBS) $(GTK_LIBS) +libeek_xkl_la_LIBADD = libeek.la $(LIBXKLAVIER_LIBS) $(GTK_LIBS) eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek eek_HEADERS = \ $(libeek_public_headers) \ $(srcdir)/eek-enumtypes.h \ - $(libeek_clutter_public_headers) \ $(libeek_gtk_public_headers) \ - $(libeek_xkb_public_headers) \ $(libeek_xkl_public_headers) noinst_HEADERS = \ $(libeek_private_headers) \ - $(libeek_clutter_private_headers) \ $(libeek_gtk_private_headers) \ - $(libeek_xkb_private_headers) \ $(libeek_xkl_private_headers) eek-special-keysym-entries.h: special-keysym-entries.txt @@ -208,13 +170,8 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ eek-$(EEK_API_VERSION).pc \ eek-gtk-$(EEK_API_VERSION).pc \ - eek-xkb-$(EEK_API_VERSION).pc \ eek-xkl-$(EEK_API_VERSION).pc -if ENABLE_CLUTTER -pkgconfig_DATA += eek-clutter-$(EEK_API_VERSION).pc -endif - CLEANFILES = DISTCLEANFILES = \ @@ -238,34 +195,21 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) if HAVE_INTROSPECTION Eek@EEK_LIBRARY_SUFFIX@.gir: libeek.la -Eek@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --strip-prefix=Eek --pkg=glib-2.0 +Eek@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --strip-prefix=Eek --pkg=glib-2.0 --pkg-export=eek-$(EEK_API_VERSION) Eek@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0 Eek@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_la_CFLAGS) Eek@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek.la Eek@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_sources) $(libeek_public_headers) $(srcdir)/eek-enumtypes.h EekGtk@EEK_LIBRARY_SUFFIX@.gir: libeek-gtk.la Eek@EEK_LIBRARY_SUFFIX@.gir +EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --pkg-export=eek-gtk-$(EEK_API_VERSION) EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Gtk-@GTK_API_VERSION@ Eek@EEK_LIBRARY_SUFFIX@ EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_gtk_la_CFLAGS) EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-gtk.la EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_gtk_sources) $(libeek_gtk_public_headers) -if ENABLE_CLUTTER -EekClutter@EEK_LIBRARY_SUFFIX@.gir: libeek-clutter.la Eek@EEK_LIBRARY_SUFFIX@.gir -EekClutter@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Clutter-1.0 Eek@EEK_LIBRARY_SUFFIX@ -EekClutter@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_clutter_la_CFLAGS) -EekClutter@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-clutter.la -EekClutter@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_clutter_sources) $(libeek_clutter_public_headers) -endif - -EekXkb@EEK_LIBRARY_SUFFIX@.gir: libeek-xkb.la Eek@EEK_LIBRARY_SUFFIX@.gir -EekXkb@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Eek@EEK_LIBRARY_SUFFIX@ -EekXkb@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_xkb_la_CFLAGS) -EekXkb@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-xkb.la -EekXkb@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_xkb_sources) $(libeek_xkb_public_headers) - -EekXkl@EEK_LIBRARY_SUFFIX@.gir: libeek-xkl.la EekXkb@EEK_LIBRARY_SUFFIX@.gir -EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 EekXkb@EEK_LIBRARY_SUFFIX@ +EekXkl@EEK_LIBRARY_SUFFIX@.gir: libeek-xkl.la Eek@EEK_LIBRARY_SUFFIX@.gir +EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Eek@EEK_LIBRARY_SUFFIX@ EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_xkl_la_CFLAGS) EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-xkl.la EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_xkl_sources) $(libeek_xkl_public_headers) @@ -273,14 +217,8 @@ EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_xkl_sources) $(libeek_xkl_publ INTROSPECTION_GIRS += \ Eek@EEK_LIBRARY_SUFFIX@.gir \ EekGtk@EEK_LIBRARY_SUFFIX@.gir \ - EekXkb@EEK_LIBRARY_SUFFIX@.gir \ EekXkl@EEK_LIBRARY_SUFFIX@.gir -if ENABLE_CLUTTER -INTROSPECTION_GIRS += \ - EekClutter@EEK_LIBRARY_SUFFIX@.gir -endif - girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) diff --git a/eek/eek-clutter-0.90.pc.in b/eek/eek-clutter-0.90.pc.in deleted file mode 100644 index 656e7d98..00000000 --- a/eek/eek-clutter-0.90.pc.in +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2010-2011 Daiki Ueno -# Copyright (C) 2010-2011 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 - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libeek-clutter -Description: A Library to Create Keyboard-like UI (Clutter Support) -URL: http://fedorahosted.org/eekboard/ -Version: @VERSION@ -Requires: eek-@EEK_API_VERSION@ clutter-1.0 -Libs: -L${libdir} -leek-clutter -Cflags: -I${includedir}/eek-@EEK_API_VERSION@ diff --git a/eek/eek-clutter-key.c b/eek/eek-clutter-key.c deleted file mode 100644 index 0c5f16e8..00000000 --- a/eek/eek-clutter-key.c +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#include "eek-clutter-key.h" - -enum { - PROP_0, - PROP_KEY, - PROP_RENDERER, - PROP_LAST -}; - -G_DEFINE_TYPE (EekClutterKey, eek_clutter_key, CLUTTER_TYPE_ACTOR); - -#define EEK_CLUTTER_KEY_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_CLUTTER_KEY, EekClutterKeyPrivate)) - -struct _EekClutterKeyPrivate -{ - EekKey *key; - EekClutterRenderer *renderer; - gulong pressed_handler; - gulong released_handler; -}; - -static void -on_pressed (EekKey *key, gpointer user_data) -{ - ClutterActor *actor = user_data, *parent; - - parent = clutter_actor_get_parent (actor); - clutter_actor_raise_top (parent); - clutter_actor_raise_top (actor); - clutter_actor_set_scale_with_gravity (actor, - 1.0, - 1.0, - CLUTTER_GRAVITY_CENTER); - - clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, 150, - "scale-x", 1.5, - "scale-y", 1.5, - NULL); -} - -static void -on_released (EekKey *key, gpointer user_data) -{ - ClutterActor *actor = user_data, *parent; - - parent = clutter_actor_get_parent (actor); - clutter_actor_raise_top (parent); - clutter_actor_raise_top (actor); - clutter_actor_set_scale_with_gravity (actor, - 1.5, - 1.5, - CLUTTER_GRAVITY_CENTER); - clutter_actor_animate (actor, CLUTTER_EASE_OUT_SINE, 150, - "scale-x", 1.0, - "scale-y", 1.0, - NULL); -} - -static void -set_position (ClutterActor *self) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - EekBounds bounds; - gdouble scale; - - eek_element_get_bounds (EEK_ELEMENT(priv->key), &bounds); - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - clutter_actor_set_position (self, bounds.x * scale, bounds.y * scale); -} - -static void -eek_clutter_key_real_realize (ClutterActor *self) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - - set_position (self); - clutter_actor_set_reactive (self, TRUE); - - priv->pressed_handler = - g_signal_connect (priv->key, "pressed", - G_CALLBACK(on_pressed), self); - priv->released_handler = - g_signal_connect (priv->key, "released", - G_CALLBACK(on_released), self); -} - -static void -eek_clutter_key_real_paint (ClutterActor *self) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - - set_position (self); - eek_clutter_renderer_render_key (priv->renderer, self, priv->key); -} - -static void -eek_clutter_key_real_get_preferred_width (ClutterActor *self, - gfloat for_height, - gfloat *min_width_p, - gfloat *natural_width_p) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - EekBounds bounds; - gdouble scale; - - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - eek_element_get_bounds (EEK_ELEMENT(priv->key), &bounds); - *min_width_p = 0.0f; - *natural_width_p = bounds.width * scale; -} - -static void -eek_clutter_key_real_get_preferred_height (ClutterActor *self, - gfloat for_width, - gfloat *min_height_p, - gfloat *natural_height_p) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - EekBounds bounds; - gdouble scale; - - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - eek_element_get_bounds (EEK_ELEMENT(priv->key), &bounds); - *min_height_p = 0.0f; - *natural_height_p = bounds.height * scale; -} - -static void -eek_clutter_key_real_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) -{ - CLUTTER_ACTOR_CLASS (eek_clutter_key_parent_class)-> - allocate (self, box, flags); -} - -static gboolean -eek_clutter_key_real_button_press_event (ClutterActor *self, - ClutterButtonEvent *event) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - - g_signal_emit_by_name (priv->key, "pressed"); - - return TRUE; -} - -static gboolean -eek_clutter_key_real_button_release_event (ClutterActor *self, - ClutterButtonEvent *event) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - - g_signal_emit_by_name (priv->key, "released"); - - return TRUE; -} - -static gboolean -eek_clutter_key_real_leave_event (ClutterActor *self, - ClutterCrossingEvent *event) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(self); - - if (eek_key_is_pressed (priv->key)) - g_signal_emit_by_name (priv->key, "released"); - - return TRUE; -} - -static void -eek_clutter_key_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(object); - - switch (prop_id) { - case PROP_KEY: - priv->key = g_value_get_object (value); - g_object_ref (priv->key); - break; - case PROP_RENDERER: - priv->renderer = g_value_get_object (value); - g_object_ref (priv->renderer); - break; - default: - g_object_set_property (object, - g_param_spec_get_name (pspec), - value); - break; - } -} - -static void -eek_clutter_key_dispose (GObject *object) -{ - EekClutterKeyPrivate *priv = EEK_CLUTTER_KEY_GET_PRIVATE(object); - - if (priv->renderer) { - g_object_unref (priv->renderer); - priv->renderer = NULL; - } - - if (priv->key) { - if (g_signal_handler_is_connected (priv->key, priv->pressed_handler)) - g_signal_handler_disconnect (priv->key, priv->pressed_handler); - if (g_signal_handler_is_connected (priv->key, priv->released_handler)) - g_signal_handler_disconnect (priv->key, priv->released_handler); - g_object_unref (priv->key); - priv->key = NULL; - } - - G_OBJECT_CLASS (eek_clutter_key_parent_class)->dispose (object); -} - -static void -eek_clutter_key_class_init (EekClutterKeyClass *klass) -{ - ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GParamSpec *pspec; - - g_type_class_add_private (gobject_class, - sizeof (EekClutterKeyPrivate)); - - actor_class->realize = eek_clutter_key_real_realize; - actor_class->paint = eek_clutter_key_real_paint; - actor_class->get_preferred_width = - eek_clutter_key_real_get_preferred_width; - actor_class->get_preferred_height = - eek_clutter_key_real_get_preferred_height; - actor_class->allocate = eek_clutter_key_real_allocate; - - /* signals */ - actor_class->button_press_event = - eek_clutter_key_real_button_press_event; - actor_class->button_release_event = - eek_clutter_key_real_button_release_event; - actor_class->leave_event = - eek_clutter_key_real_leave_event; - - gobject_class->set_property = eek_clutter_key_set_property; - gobject_class->dispose = eek_clutter_key_dispose; - - pspec = g_param_spec_object ("key", - "Key", - "Key", - EEK_TYPE_KEY, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE); - g_object_class_install_property (gobject_class, - PROP_KEY, - pspec); - - pspec = g_param_spec_object ("renderer", - "Renderer", - "Renderer", - EEK_TYPE_RENDERER, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE); - g_object_class_install_property (gobject_class, - PROP_RENDERER, - pspec); -} - -static void -eek_clutter_key_init (EekClutterKey *self) -{ - EekClutterKeyPrivate *priv; - priv = self->priv = EEK_CLUTTER_KEY_GET_PRIVATE (self); - priv->key = NULL; - priv->renderer = NULL; -} - -ClutterActor * -eek_clutter_key_new (EekKey *key, EekClutterRenderer *renderer) -{ - return g_object_new (EEK_TYPE_CLUTTER_KEY, - "key", key, - "renderer", renderer, - NULL); -} diff --git a/eek/eek-clutter-key.h b/eek/eek-clutter-key.h deleted file mode 100644 index aabb717e..00000000 --- a/eek/eek-clutter-key.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ -#ifndef EEK_CLUTTER_KEY_H -#define EEK_CLUTTER_KEY_H 1 - -#include -#include "eek-key.h" -#include "eek-clutter-renderer.h" - -G_BEGIN_DECLS -#define EEK_TYPE_CLUTTER_KEY (eek_clutter_key_get_type()) -#define EEK_CLUTTER_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_CLUTTER_KEY, EekClutterKey)) -#define EEK_CLUTTER_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_CLUTTER_KEY, EekClutterKeyClass)) -#define EEK_IS_CLUTTER_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_CLUTTER_KEY)) -#define EEK_IS_CLUTTER_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_CLUTTER_KEY)) -#define EEK_CLUTTER_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_CLUTTER_KEY, EekClutterKeyClass)) - -typedef struct _EekClutterKey EekClutterKey; -typedef struct _EekClutterKeyClass EekClutterKeyClass; -typedef struct _EekClutterKeyPrivate EekClutterKeyPrivate; - -struct _EekClutterKey -{ - /*< private >*/ - ClutterActor parent; - - /*< private >*/ - EekClutterKeyPrivate *priv; -}; - -struct _EekClutterKeyClass -{ - /*< private >*/ - ClutterActorClass parent_class; - - /*< private >*/ - /* padding */ - gpointer pdummy[24]; -}; - -GType eek_clutter_key_get_type (void) G_GNUC_CONST; -ClutterActor *eek_clutter_key_new (EekKey *key, - EekClutterRenderer *renderer); - -G_END_DECLS -#endif /* EEK_CLUTTER_KEY_H */ diff --git a/eek/eek-clutter-keyboard.c b/eek/eek-clutter-keyboard.c deleted file mode 100644 index 00bc6aba..00000000 --- a/eek/eek-clutter-keyboard.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ - -/** - * SECTION:eek-clutter-keyboard - * @short_description: a #ClutterActor displaying #EekKeyboard - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#include -#include - -#include "eek-clutter-keyboard.h" -#include "eek-clutter-section.h" -#include "eek-clutter-renderer.h" -#include "eek-keyboard.h" - -enum { - PROP_0, - PROP_KEYBOARD, - PROP_LAST -}; - -G_DEFINE_TYPE (EekClutterKeyboard, eek_clutter_keyboard, CLUTTER_TYPE_GROUP); - -#define EEK_CLUTTER_KEYBOARD_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_CLUTTER_KEYBOARD, EekClutterKeyboardPrivate)) - -struct _EekClutterKeyboardPrivate -{ - EekKeyboard *keyboard; - EekClutterRenderer *renderer; - EekTheme *theme; -}; - -struct _CreateSectionCallbackData { - ClutterActor *actor; - EekClutterRenderer *renderer; -}; -typedef struct _CreateSectionCallbackData CreateSectionCallbackData; - -static void -create_section (EekElement *element, gpointer user_data) -{ - CreateSectionCallbackData *data = user_data; - ClutterActor *section; - - section = eek_clutter_section_new (EEK_SECTION(element), data->renderer); - clutter_container_add_actor (CLUTTER_CONTAINER(data->actor), section); -} - -static void -eek_clutter_keyboard_real_realize (ClutterActor *self) -{ - EekClutterKeyboardPrivate *priv; - CreateSectionCallbackData data; - EekBounds bounds; - gdouble scale; - - priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self); - - if (priv->theme) - eek_renderer_set_theme (EEK_RENDERER(priv->renderer), priv->theme); - - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - clutter_actor_set_position (CLUTTER_ACTOR(self), - bounds.x * scale, - bounds.y * scale); - - data.actor = CLUTTER_ACTOR(self); - data.renderer = priv->renderer; - - eek_container_foreach_child (EEK_CONTAINER(priv->keyboard), - create_section, - &data); -} - -static void -eek_clutter_keyboard_real_get_preferred_width (ClutterActor *self, - float for_height, - float *min_width_p, - float *natural_width_p) -{ - EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self); - gdouble width; - - eek_renderer_get_size (EEK_RENDERER(priv->renderer), &width, NULL); - *min_width_p = 0.0f; - *natural_width_p = width; -} - -static void -eek_clutter_keyboard_real_get_preferred_height (ClutterActor *self, - float for_width, - float *min_height_p, - float *natural_height_p) -{ - EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self); - gdouble height; - - eek_renderer_get_size (EEK_RENDERER(priv->renderer), NULL, &height); - *min_height_p = 0.0f; - *natural_height_p = height; -} - -static void -eek_clutter_keyboard_real_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) -{ - EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self); - - eek_renderer_set_allocation_size (EEK_RENDERER(priv->renderer), - box->x2 - box->x1, - box->y2 - box->y1); - - CLUTTER_ACTOR_CLASS (eek_clutter_keyboard_parent_class)-> - allocate (self, box, flags); -} - -static void -create_renderer (EekClutterKeyboard *self) -{ - EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self); - PangoContext *pcontext; - PangoFontDescription *font; - EekBounds bounds; - - pcontext = clutter_actor_get_pango_context (CLUTTER_ACTOR(self)); - font = pango_font_description_from_string ("Sans 48px"); - pango_context_set_font_description (pcontext, font); - pango_font_description_free (font); - - priv->renderer = eek_clutter_renderer_new (priv->keyboard, pcontext); - - eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds); - eek_renderer_set_allocation_size (EEK_RENDERER(priv->renderer), - bounds.width, - bounds.height); -} - -static void -eek_clutter_keyboard_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(object); - - switch (prop_id) { - case PROP_KEYBOARD: - priv->keyboard = g_value_get_object (value); - g_object_ref (priv->keyboard); - create_renderer (EEK_CLUTTER_KEYBOARD(object)); - break; - default: - g_object_set_property (object, - g_param_spec_get_name (pspec), - value); - break; - } -} - -static void -eek_clutter_keyboard_dispose (GObject *object) -{ - EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(object); - - if (priv->renderer) { - g_object_unref (G_OBJECT(priv->renderer)); - priv->renderer = NULL; - } - - if (priv->keyboard) { - g_object_unref (priv->keyboard); - priv->keyboard = NULL; - } - - if (priv->theme) { - g_object_unref (priv->theme); - priv->keyboard = NULL; - } - - G_OBJECT_CLASS (eek_clutter_keyboard_parent_class)->dispose (object); -} - -static void -eek_clutter_keyboard_class_init (EekClutterKeyboardClass *klass) -{ - ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GParamSpec *pspec; - - g_type_class_add_private (gobject_class, - sizeof (EekClutterKeyboardPrivate)); - - actor_class->realize = - eek_clutter_keyboard_real_realize; - actor_class->get_preferred_width = - eek_clutter_keyboard_real_get_preferred_width; - actor_class->get_preferred_height = - eek_clutter_keyboard_real_get_preferred_height; - actor_class->allocate = eek_clutter_keyboard_real_allocate; - - gobject_class->set_property = eek_clutter_keyboard_set_property; - gobject_class->dispose = eek_clutter_keyboard_dispose; - - pspec = g_param_spec_object ("keyboard", - "Keyboard", - "Keyboard", - EEK_TYPE_KEYBOARD, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE); - g_object_class_install_property (gobject_class, - PROP_KEYBOARD, - pspec); -} - -static void -eek_clutter_keyboard_init (EekClutterKeyboard *self) -{ - EekClutterKeyboardPrivate *priv; - - priv = self->priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self); - priv->keyboard = NULL; - priv->renderer = NULL; -} - -/** - * eek_clutter_keyboard_new: - * @keyboard: an #EekKeyboard - * - * Create a new #ClutterActor displaying @keyboard. - * Returns: a #ClutterActor - */ -ClutterActor * -eek_clutter_keyboard_new (EekKeyboard *keyboard) -{ - return g_object_new (EEK_TYPE_CLUTTER_KEYBOARD, "keyboard", keyboard, NULL); -} - -void -eek_clutter_keyboard_set_theme (EekClutterKeyboard *keyboard, - EekTheme *theme) -{ - EekClutterKeyboardPrivate *priv; - - g_return_if_fail (EEK_IS_CLUTTER_KEYBOARD(keyboard)); - g_return_if_fail (EEK_IS_THEME(theme)); - - priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(keyboard); - priv->theme = g_object_ref (theme); -} diff --git a/eek/eek-clutter-keyboard.h b/eek/eek-clutter-keyboard.h deleted file mode 100644 index fd4f5bf3..00000000 --- a/eek/eek-clutter-keyboard.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION) -#error "Only can be included directly." -#endif - -#ifndef EEK_CLUTTER_KEYBOARD_H -#define EEK_CLUTTER_KEYBOARD_H 1 - -#include -#include "eek-keyboard.h" - -G_BEGIN_DECLS -#define EEK_TYPE_CLUTTER_KEYBOARD (eek_clutter_keyboard_get_type()) -#define EEK_CLUTTER_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_CLUTTER_KEYBOARD, EekClutterKeyboard)) -#define EEK_CLUTTER_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_CLUTTER_KEYBOARD, EekClutterKeyboardClass)) -#define EEK_IS_CLUTTER_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_CLUTTER_KEYBOARD)) -#define EEK_IS_CLUTTER_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_CLUTTER_KEYBOARD)) -#define EEK_CLUTTER_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_CLUTTER_KEYBOARD, EekClutterKeyboardClass)) - -typedef struct _EekClutterKeyboard EekClutterKeyboard; -typedef struct _EekClutterKeyboardClass EekClutterKeyboardClass; -typedef struct _EekClutterKeyboardPrivate EekClutterKeyboardPrivate; - -struct _EekClutterKeyboard -{ - /*< private >*/ - ClutterGroup parent; - - EekClutterKeyboardPrivate *priv; -}; - -struct _EekClutterKeyboardClass -{ - /*< private >*/ - ClutterGroupClass parent_class; - - /*< private >*/ - /* padding */ - gpointer pdummy[24]; -}; - -GType eek_clutter_keyboard_get_type (void) G_GNUC_CONST; -ClutterActor *eek_clutter_keyboard_new (EekKeyboard *keyboard); -void eek_clutter_keyboard_set_theme (EekClutterKeyboard *keyboard, - EekTheme *theme); - -G_END_DECLS -#endif /* EEK_CLUTTER_KEYBOARD_H */ diff --git a/eek/eek-clutter-renderer.c b/eek/eek-clutter-renderer.c deleted file mode 100644 index 3730fc54..00000000 --- a/eek/eek-clutter-renderer.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#include -#include -#include -#include -#include - -#include "eek-clutter-renderer.h" -#include "eek-key.h" - -G_DEFINE_TYPE (EekClutterRenderer, eek_clutter_renderer, EEK_TYPE_RENDERER); - -#define EEK_CLUTTER_RENDERER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_CLUTTER_RENDERER, EekClutterRendererPrivate)) - -struct _EekClutterRendererPrivate -{ - GHashTable *outline_texture_cache; -}; - -/* This routine is copied from librsvg: - Copyright © 2005 Dom Lachowicz - Copyright © 2005 Caleb Moore - Copyright © 2005 Red Hat, Inc. - */ -static void -cairo_pixels_to_pixbuf (guint8 *pixels, - int rowstride, - int height) -{ - int row; - - /* un-premultiply data */ - for (row = 0; row < height; row++) { - guint8 *row_data = (pixels + (row * rowstride)); - int i; - - for (i = 0; i < rowstride; i += 4) { - guint8 *b = &row_data[i]; - guint32 pixel; - guint8 alpha; - - memcpy (&pixel, b, sizeof (guint32)); - alpha = (pixel & 0xff000000) >> 24; - if (alpha == 0) { - b[0] = b[1] = b[2] = b[3] = 0; - } else { - b[0] = (((pixel & 0xff0000) >> 16) * 255 + alpha / 2) / alpha; - b[1] = (((pixel & 0x00ff00) >> 8) * 255 + alpha / 2) / alpha; - b[2] = (((pixel & 0x0000ff) >> 0) * 255 + alpha / 2) / alpha; - b[3] = alpha; - } - } - } -} - -static void -eek_clutter_renderer_finalize (GObject *object) -{ - EekClutterRendererPrivate *priv = EEK_CLUTTER_RENDERER_GET_PRIVATE(object); - g_hash_table_destroy (priv->outline_texture_cache); - G_OBJECT_CLASS (eek_clutter_renderer_parent_class)->finalize (object); -} - -static void -eek_clutter_renderer_class_init (EekClutterRendererClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - - g_type_class_add_private (gobject_class, - sizeof (EekClutterRendererPrivate)); - - gobject_class->finalize = eek_clutter_renderer_finalize; -} - -static void -eek_clutter_renderer_init (EekClutterRenderer *self) -{ - EekClutterRendererPrivate *priv; - - priv = self->priv = EEK_CLUTTER_RENDERER_GET_PRIVATE(self); - priv->outline_texture_cache = - g_hash_table_new_full (g_direct_hash, - g_direct_equal, - NULL, - cogl_handle_unref); -} - -void -eek_clutter_renderer_render_key (EekClutterRenderer *renderer, - ClutterActor *actor, - EekKey *key) -{ - EekClutterRendererPrivate *priv; - EekOutline *outline; - CoglHandle *outline_texture; - PangoLayout *layout; - PangoRectangle extents = { 0, }; - EekColor foreground; - CoglColor color; - ClutterGeometry geom; - gulong oref; - EekKeyboard *keyboard; - - g_assert (EEK_IS_CLUTTER_RENDERER(renderer)); - g_assert (CLUTTER_IS_ACTOR(actor)); - g_assert (EEK_IS_KEY(key)); - - oref = eek_key_get_oref (key); - g_object_get (renderer, "keyboard", &keyboard, NULL); - outline = eek_keyboard_get_outline (keyboard, oref); - g_object_unref (keyboard); - - priv = EEK_CLUTTER_RENDERER_GET_PRIVATE(renderer); - outline_texture = g_hash_table_lookup (priv->outline_texture_cache, - outline); - if (!outline_texture) { - gint rowstride; - guint8 *data; - cairo_surface_t *surface; - cairo_t *cr; - EekBounds bounds; - gdouble scale; - GdkPixbuf *pixbuf; - - eek_element_get_bounds (EEK_ELEMENT(key), &bounds); - scale = eek_renderer_get_scale (EEK_RENDERER(renderer)); - rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, - bounds.width * scale); - - data = g_malloc0 (rowstride * bounds.height); - surface = cairo_image_surface_create_for_data (data, - CAIRO_FORMAT_ARGB32, - bounds.width * scale, - bounds.height * scale, - rowstride); - cr = cairo_create (surface); - eek_renderer_render_key_outline (EEK_RENDERER(renderer), - cr, - key, - 1.0, - FALSE); - cairo_destroy (cr); - cairo_surface_destroy (surface); - cairo_pixels_to_pixbuf (data, rowstride, bounds.height * scale); - - pixbuf = gdk_pixbuf_new_from_data (data, - GDK_COLORSPACE_RGB, - TRUE, - 8, - bounds.width * scale, - bounds.height * scale, - rowstride, - (GdkPixbufDestroyNotify) g_free, - data); - - outline_texture = - cogl_texture_new_from_data (gdk_pixbuf_get_width (pixbuf), - gdk_pixbuf_get_height (pixbuf), - COGL_TEXTURE_NONE, - gdk_pixbuf_get_has_alpha (pixbuf) - ? COGL_PIXEL_FORMAT_RGBA_8888 - : COGL_PIXEL_FORMAT_RGB_888, - COGL_PIXEL_FORMAT_ANY, - gdk_pixbuf_get_rowstride (pixbuf), - gdk_pixbuf_get_pixels (pixbuf)); - g_object_unref (pixbuf); - - g_hash_table_insert (priv->outline_texture_cache, - outline, - outline_texture); - } - - clutter_actor_get_allocation_geometry (actor, &geom); - cogl_set_source_texture (outline_texture); - cogl_rectangle (0.0f, 0.0f, geom.width, geom.height); - - layout = eek_renderer_create_pango_layout (EEK_RENDERER(renderer)); - eek_renderer_render_key_label (EEK_RENDERER(renderer), layout, key); - pango_layout_get_extents (layout, NULL, &extents); - - eek_renderer_get_foreground_color (EEK_RENDERER(renderer), - EEK_ELEMENT(key), - &foreground); - - cogl_color_set_from_4f (&color, - foreground.red, - foreground.green, - foreground.blue, - foreground.alpha); - - cogl_pango_render_layout (layout, - (geom.width - extents.width / PANGO_SCALE) / 2, - (geom.height - extents.height / PANGO_SCALE) / 2, - &color, - 0); - g_object_unref (layout); -} - -EekClutterRenderer * -eek_clutter_renderer_new (EekKeyboard *keyboard, - PangoContext *pcontext) -{ - EekClutterRenderer *renderer; - - renderer = g_object_new (EEK_TYPE_CLUTTER_RENDERER, - "keyboard", keyboard, - "pango-context", pcontext, - NULL); - - return renderer; -} diff --git a/eek/eek-clutter-renderer.h b/eek/eek-clutter-renderer.h deleted file mode 100644 index 9ef07291..00000000 --- a/eek/eek-clutter-renderer.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ - -#ifndef EEK_CLUTTER_RENDERER_H -#define EEK_CLUTTER_RENDERER_H 1 - -#include "eek-renderer.h" - -G_BEGIN_DECLS - -#define EEK_TYPE_CLUTTER_RENDERER (eek_clutter_renderer_get_type()) -#define EEK_CLUTTER_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_CLUTTER_RENDERER, EekClutterRenderer)) -#define EEK_CLUTTER_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_CLUTTER_RENDERER, EekClutterRendererClass)) -#define EEK_IS_CLUTTER_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_CLUTTER_RENDERER)) -#define EEK_IS_CLUTTER_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_CLUTTER_RENDERER)) -#define EEK_CLUTTER_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_CLUTTER_RENDERER, EekClutterRendererClass)) - -typedef struct _EekClutterRenderer EekClutterRenderer; -typedef struct _EekClutterRendererClass EekClutterRendererClass; -typedef struct _EekClutterRendererPrivate EekClutterRendererPrivate; - -struct _EekClutterRenderer { - EekRenderer parent; - - EekClutterRendererPrivate *priv; -}; - -struct _EekClutterRendererClass -{ - EekRendererClass parent_class; - - /*< private >*/ - /* padding */ - gpointer pdummy[24]; -}; - -GType eek_clutter_renderer_get_type - (void) G_GNUC_CONST; -EekClutterRenderer *eek_clutter_renderer_new (EekKeyboard *keyboard, - PangoContext *pcontext); -void eek_clutter_renderer_render_key - (EekClutterRenderer *renderer, - ClutterActor *actor, - EekKey *key); - -G_END_DECLS -#endif /* EEK_CLUTTER_RENDERER_H */ diff --git a/eek/eek-clutter-section.c b/eek/eek-clutter-section.c deleted file mode 100644 index 7a82002c..00000000 --- a/eek/eek-clutter-section.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#include "eek-clutter-section.h" -#include "eek-clutter-key.h" - -enum { - PROP_0, - PROP_SECTION, - PROP_RENDERER, - PROP_LAST -}; - -G_DEFINE_TYPE (EekClutterSection, eek_clutter_section, CLUTTER_TYPE_GROUP); - -#define EEK_CLUTTER_SECTION_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_CLUTTER_SECTION, EekClutterSectionPrivate)) - -struct _EekClutterSectionPrivate -{ - EekSection *section; - EekClutterRenderer *renderer; -}; - -struct _CreateKeyCallbackData { - ClutterActor *actor; - EekClutterRenderer *renderer; -}; -typedef struct _CreateKeyCallbackData CreateKeyCallbackData; - -static void -create_key (EekElement *element, gpointer user_data) -{ - CreateKeyCallbackData *data = user_data; - ClutterActor *key; - - key = eek_clutter_key_new (EEK_KEY(element), data->renderer); - clutter_container_add_actor (CLUTTER_CONTAINER(data->actor), key); -} - -static void -set_position (ClutterActor *self) -{ - EekClutterSectionPrivate *priv = EEK_CLUTTER_SECTION_GET_PRIVATE(self); - EekBounds bounds; - gdouble scale; - - eek_element_get_bounds (EEK_ELEMENT(priv->section), &bounds); - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - clutter_actor_set_position (self, bounds.x * scale, bounds.y * scale); -} - -static void -eek_clutter_section_real_realize (ClutterActor *self) -{ - EekClutterSectionPrivate *priv = EEK_CLUTTER_SECTION_GET_PRIVATE(self); - CreateKeyCallbackData data; - - clutter_actor_set_rotation (self, - CLUTTER_Z_AXIS, - eek_section_get_angle (priv->section), - 0.0f, 0.0f, 0.0f); - set_position (self); - data.actor = self; - data.renderer = priv->renderer; - eek_container_foreach_child (EEK_CONTAINER(priv->section), - create_key, - &data); -} - -static void -eek_clutter_section_real_paint (ClutterActor *self) -{ - set_position (self); - CLUTTER_ACTOR_CLASS (eek_clutter_section_parent_class)-> - paint (self); -} - -static void -eek_clutter_section_real_get_preferred_width (ClutterActor *self, - float for_height, - float *min_width_p, - float *natural_width_p) -{ - EekClutterSectionPrivate *priv = EEK_CLUTTER_SECTION_GET_PRIVATE(self); - EekBounds bounds; - gdouble scale; - - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - eek_element_get_bounds (EEK_ELEMENT(priv->section), &bounds); - *min_width_p = 0.0f; - *natural_width_p = bounds.width * scale; -} - -static void -eek_clutter_section_real_get_preferred_height (ClutterActor *self, - float for_width, - float *min_height_p, - float *natural_height_p) -{ - EekClutterSectionPrivate *priv = EEK_CLUTTER_SECTION_GET_PRIVATE(self); - EekBounds bounds; - gdouble scale; - - scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer)); - eek_element_get_bounds (EEK_ELEMENT(priv->section), &bounds); - *min_height_p = 0.0f; - *natural_height_p = bounds.height * scale; -} - -static void -eek_clutter_section_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - EekClutterSectionPrivate *priv = EEK_CLUTTER_SECTION_GET_PRIVATE(object); - - switch (prop_id) { - case PROP_SECTION: - priv->section = g_value_get_object (value); - g_object_ref (priv->section); - break; - case PROP_RENDERER: - priv->renderer = g_value_get_object (value); - g_object_ref (priv->renderer); - break; - default: - g_object_set_property (object, - g_param_spec_get_name (pspec), - value); - break; - } -} - -static void -eek_clutter_section_dispose (GObject *object) -{ - EekClutterSectionPrivate *priv = EEK_CLUTTER_SECTION_GET_PRIVATE(object); - - if (priv->renderer) { - g_object_unref (priv->renderer); - priv->renderer = NULL; - } - - if (priv->section) { - g_object_unref (priv->section); - priv->section = NULL; - } - - G_OBJECT_CLASS (eek_clutter_section_parent_class)->dispose (object); -} - -static void -eek_clutter_section_class_init (EekClutterSectionClass *klass) -{ - ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GParamSpec *pspec; - - g_type_class_add_private (gobject_class, sizeof (EekClutterSectionPrivate)); - - actor_class->realize = - eek_clutter_section_real_realize; - actor_class->paint = - eek_clutter_section_real_paint; - actor_class->get_preferred_width = - eek_clutter_section_real_get_preferred_width; - actor_class->get_preferred_height = - eek_clutter_section_real_get_preferred_height; - - gobject_class->set_property = eek_clutter_section_set_property; - gobject_class->dispose = eek_clutter_section_dispose; - - pspec = g_param_spec_object ("section", - "Section", - "Section", - EEK_TYPE_SECTION, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE); - g_object_class_install_property (gobject_class, - PROP_SECTION, - pspec); - - pspec = g_param_spec_object ("renderer", - "Renderer", - "Renderer", - EEK_TYPE_RENDERER, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE); - g_object_class_install_property (gobject_class, - PROP_RENDERER, - pspec); -} - -static void -eek_clutter_section_init (EekClutterSection *self) -{ - EekClutterSectionPrivate *priv; - priv = self->priv = EEK_CLUTTER_SECTION_GET_PRIVATE (self); - priv->section = NULL; - priv->renderer = NULL; -} - -ClutterActor * -eek_clutter_section_new (EekSection *section, - EekClutterRenderer *renderer) -{ - return g_object_new (EEK_TYPE_CLUTTER_SECTION, - "section", section, - "renderer", renderer, - NULL); -} diff --git a/eek/eek-clutter-section.h b/eek/eek-clutter-section.h deleted file mode 100644 index e20aab11..00000000 --- a/eek/eek-clutter-section.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ -#ifndef EEK_CLUTTER_SECTION_H -#define EEK_CLUTTER_SECTION_H 1 - -#include -#include "eek-section.h" -#include "eek-clutter-renderer.h" - -G_BEGIN_DECLS -#define EEK_TYPE_CLUTTER_SECTION (eek_clutter_section_get_type()) -#define EEK_CLUTTER_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_CLUTTER_SECTION, EekClutterSection)) -#define EEK_CLUTTER_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_CLUTTER_SECTION, EekClutterSectionClass)) -#define EEK_IS_CLUTTER_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_CLUTTER_SECTION)) -#define EEK_IS_CLUTTER_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_CLUTTER_SECTION)) -#define EEK_CLUTTER_SECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_CLUTTER_SECTION, EekClutterSectionClass)) - -typedef struct _EekClutterSection EekClutterSection; -typedef struct _EekClutterSectionClass EekClutterSectionClass; -typedef struct _EekClutterSectionPrivate EekClutterSectionPrivate; - -struct _EekClutterSection -{ - /*< private >*/ - ClutterGroup parent; - - EekClutterSectionPrivate *priv; -}; - -struct _EekClutterSectionClass -{ - /*< private >*/ - ClutterGroupClass parent_class; - - /*< private >*/ - /* padding */ - gpointer pdummy[24]; -}; - -GType eek_clutter_section_get_type (void) G_GNUC_CONST; -ClutterActor *eek_clutter_section_new (EekSection *section, - EekClutterRenderer *renderer); - -G_END_DECLS -#endif /* EEK_CLUTTER_SECTION_H */ diff --git a/eek/eek-clutter.h b/eek/eek-clutter.h deleted file mode 100644 index 959d1cb8..00000000 --- a/eek/eek-clutter.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ -#ifndef EEK_CLUTTER_H -#define EEK_CLUTTER_H 1 - -#include "eek.h" -#include "eek-clutter-keyboard.h" - -#endif /* EEK_CLUTTER_H */ diff --git a/eek/eek-xkl-0.90.pc.in b/eek/eek-xkl-0.90.pc.in index f06eff5d..2994aedb 100644 --- a/eek/eek-xkl-0.90.pc.in +++ b/eek/eek-xkl-0.90.pc.in @@ -25,6 +25,6 @@ Name: libeek-xkl Description: A Library to Create Keyboard-like UI (Libxklavier Support) URL: http://fedorahosted.org/eekboard/ Version: @VERSION@ -Requires: eek-xkb-@EEK_API_VERSION@ libxklavier +Requires: eek-@EEK_API_VERSION@ libxklavier Libs: -L${libdir} -leek-xkl Cflags: -I${includedir}/eek-@EEK_API_VERSION@ diff --git a/src/Makefile.am b/src/Makefile.am index 80c460bf..cc7e9eb1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -79,11 +79,6 @@ eekboard_server_LDADD = \ $(GTK_LIBS) \ $(LIBXKLAVIER_LIBS) -if ENABLE_CLUTTER_GTK -eekboard_server_CFLAGS += $(CLUTTER_GTK_CFLAGS) -eekboard_server_LDADD += $(top_builddir)/eek/libeek-clutter.la $(CLUTTER_GTK_LIBS) -endif - if ENABLE_XDOCK eekboard_server_CFLAGS += $(XDOCK_CFLAGS) eekboard_server_LDADD += $(XDOCK_LIBS) @@ -100,4 +95,4 @@ noinst_HEADERS = \ $(eekboard_headers) \ $(eekboard_server_headers) -dist_pkgdata_DATA = preferences-dialog.ui \ No newline at end of file +dist_pkgdata_DATA = preferences-dialog.ui diff --git a/src/server-context-service.c b/src/server-context-service.c index 8ef4849a..2a849bae 100644 --- a/src/server-context-service.c +++ b/src/server-context-service.c @@ -25,28 +25,17 @@ #include #include -#if HAVE_CLUTTER_GTK -#include -#include "eek/eek-clutter.h" -#endif #include "eek/eek-gtk.h" #include "server-context-service.h" enum { PROP_0, - PROP_UI_TOOLKIT, PROP_SIZE_CONSTRAINT_LANDSCAPE, PROP_SIZE_CONSTRAINT_PORTRAIT, PROP_LAST }; -typedef enum { - UI_TOOLKIT_GTK, - UI_TOOLKIT_CLUTTER, - UI_TOOLKIT_DEFAULT = UI_TOOLKIT_GTK -} UIToolkitType; - typedef struct _ServerContextServiceClass ServerContextServiceClass; struct _ServerContextService { @@ -60,7 +49,6 @@ struct _ServerContextService { gulong notify_visible_handler; GSettings *settings; - UIToolkitType ui_toolkit; gdouble size_constraint_landscape[2]; gdouble size_constraint_portrait[2]; }; @@ -85,23 +73,6 @@ on_monitors_changed (GdkScreen *screen, set_geometry (context); } -#if HAVE_CLUTTER_GTK -static void -on_allocation_changed (ClutterActor *stage, - ClutterActorBox *box, - ClutterAllocationFlags flags, - gpointer user_data) -{ - ClutterActor *actor = - clutter_container_find_child_by_name (CLUTTER_CONTAINER(stage), - "keyboard"); - - clutter_actor_set_size (actor, - box->x2 - box->x1, - box->y2 - box->y1); -} -#endif - static void on_destroy (GtkWidget *widget, gpointer user_data) { @@ -284,22 +255,6 @@ set_geometry (ServerContextService *context) G_CALLBACK(on_size_allocate_set_dock), context); } else { - if (context->ui_toolkit == UI_TOOLKIT_CLUTTER) { -#if HAVE_CLUTTER_GTK - ClutterActor *stage = - gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED(context->widget)); - clutter_stage_set_user_resizable (CLUTTER_STAGE(stage), TRUE); - clutter_stage_set_minimum_size (CLUTTER_STAGE(stage), - bounds.width / 3, - bounds.height / 3); - g_signal_connect (stage, - "allocation-changed", - G_CALLBACK(on_allocation_changed), - NULL); -#else - g_return_if_reached (); -#endif - } gtk_widget_set_size_request (context->widget, bounds.width, bounds.height); @@ -321,11 +276,6 @@ update_widget (ServerContextService *context) gchar *theme_name, *theme_path; EekTheme *theme; -#if HAVE_CLUTTER_GTK - ClutterActor *stage, *actor; - ClutterColor stage_color = { 0xff, 0xff, 0xff, 0xff }; -#endif - if (context->widget) gtk_widget_destroy (context->widget); @@ -338,25 +288,9 @@ update_widget (ServerContextService *context) keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context)); eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds); - if (context->ui_toolkit == UI_TOOLKIT_CLUTTER) { -#if HAVE_CLUTTER_GTK - context->widget = gtk_clutter_embed_new (); - stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED(context->widget)); - actor = eek_clutter_keyboard_new (keyboard); - clutter_actor_set_name (actor, "keyboard"); - eek_clutter_keyboard_set_theme (EEK_CLUTTER_KEYBOARD(actor), theme); - g_object_unref (theme); - clutter_container_add_actor (CLUTTER_CONTAINER(stage), actor); - - clutter_stage_set_color (CLUTTER_STAGE(stage), &stage_color); -#else - g_return_if_reached (); -#endif - } else { - context->widget = eek_gtk_keyboard_new (keyboard); - eek_gtk_keyboard_set_theme (EEK_GTK_KEYBOARD(context->widget), theme); - g_object_unref (theme); - } + context->widget = eek_gtk_keyboard_new (keyboard); + eek_gtk_keyboard_set_theme (EEK_GTK_KEYBOARD(context->widget), theme); + g_object_unref (theme); if (!context->window) { context->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -426,21 +360,9 @@ server_context_service_set_property (GObject *object, GParamSpec *pspec) { ServerContextService *context = SERVER_CONTEXT_SERVICE(object); - const gchar *ui_toolkit; GVariant *variant; switch (prop_id) { - case PROP_UI_TOOLKIT: - ui_toolkit = g_value_get_string (value); - if (g_strcmp0 (ui_toolkit, "gtk") == 0) - context->ui_toolkit = UI_TOOLKIT_GTK; -#if HAVE_CLUTTER_GTK - else if (g_strcmp0 (ui_toolkit, "clutter") == 0) - context->ui_toolkit = UI_TOOLKIT_CLUTTER; -#endif /* HAVE_CLUTTER_GTK */ - else - g_warning ("unknown UI toolkit %s", ui_toolkit); - break; case PROP_SIZE_CONSTRAINT_LANDSCAPE: variant = g_value_get_variant (value); g_variant_get (variant, "(dd)", @@ -490,15 +412,6 @@ server_context_service_class_init (ServerContextServiceClass *klass) gobject_class->set_property = server_context_service_set_property; gobject_class->dispose = server_context_service_dispose; - pspec = g_param_spec_string ("ui-toolkit", - "UI toolkit", - "UI toolkit", - NULL, - G_PARAM_WRITABLE); - g_object_class_install_property (gobject_class, - PROP_UI_TOOLKIT, - pspec); - pspec = g_param_spec_variant ("size-constraint-landscape", "Size constraint landscape", "Size constraint landscape", @@ -540,9 +453,6 @@ server_context_service_init (ServerContextService *context) context); context->settings = g_settings_new ("org.fedorahosted.eekboard"); - g_settings_bind (context->settings, "ui-toolkit", - context, "ui-toolkit", - G_SETTINGS_BIND_GET); g_settings_bind_with_mapping (context->settings, "size-constraint-landscape", context, "size-constraint-landscape", G_SETTINGS_BIND_GET, diff --git a/tests/Makefile.am b/tests/Makefile.am index bf06b5ef..d8f9f18d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,16 +16,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA -INCLUDES = -I$(top_srcdir) $(GIO2_CFLAGS) $(GTK_CFLAGS) $(XKB_CFLAGS) +INCLUDES = -I$(top_srcdir) $(GIO2_CFLAGS) $(GTK_CFLAGS) $(LIBXKLAVIER_CFLAGS) -TESTS = eek-simple-test eek-xkb-test eek-xml-test +TESTS = eek-simple-test eek-xml-test noinst_PROGRAMS = $(TESTS) eek_simple_test_SOURCES = eek-simple-test.c eek_simple_test_LDADD = $(top_builddir)/eek/libeek.la $(GIO2_LIBS) -eek_xkb_test_SOURCES = eek-xkb-test.c -eek_xkb_test_LDADD = $(top_builddir)/eek/libeek.la $(top_builddir)/eek/libeek-xkb.la $(GIO2_LIBS) $(GTK_LIBS) - eek_xml_test_SOURCES = eek-xml-test.c eek_xml_test_LDADD = $(top_builddir)/eek/libeek.la $(top_builddir)/eek/libeek-xkl.la $(GIO2_LIBS) $(GTK_LIBS) diff --git a/tests/eek-xkb-test.c b/tests/eek-xkb-test.c deleted file mode 100644 index 92ed418b..00000000 --- a/tests/eek-xkb-test.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010-2011 Daiki Ueno - * Copyright (C) 2010-2011 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 - */ -#include "eek/eek-xkb.h" - -/* For gdk_x11_display_get_xdisplay(). See main(). */ -#include - -static void -test_create (void) -{ - EekLayout *layout; - const gchar *keycodes, *geometry, *symbols; - - layout = eek_xkb_layout_new (); - g_assert (layout); - keycodes = eek_xkb_layout_get_keycodes (EEK_XKB_LAYOUT(layout)); - g_assert (keycodes); - geometry = eek_xkb_layout_get_geometry (EEK_XKB_LAYOUT(layout)); - g_assert (geometry); - symbols = eek_xkb_layout_get_symbols (EEK_XKB_LAYOUT(layout)); - g_assert (symbols); - eek_xkb_layout_set_geometry (EEK_XKB_LAYOUT(layout), "winbook"); - geometry = eek_xkb_layout_get_geometry (EEK_XKB_LAYOUT(layout)); - g_assert_cmpstr (geometry, ==, "winbook"); - g_object_unref (layout); -} - -int -main (int argc, char **argv) -{ - g_type_init (); - g_test_init (&argc, &argv, NULL); - gtk_init (&argc, &argv); /* for gdk_x11_display_get_xdisplay() */ - g_test_add_func ("/eek-xkb-test/create", test_create); - return g_test_run (); -}