Compare commits
70 Commits
eekboard-0
...
eekboard-0
| Author | SHA1 | Date | |
|---|---|---|---|
| f562e8c212 | |||
| 8ff00226e2 | |||
| c72c75083c | |||
| 862a54eac3 | |||
| 12bc18e1ba | |||
| f045bd0d50 | |||
| dfe06468ed | |||
| 3fda8da1a5 | |||
| d0a5715f8c | |||
| 6b83bb8503 | |||
| 69f1dba96a | |||
| dcbdd7ff63 | |||
| 9b28a011e7 | |||
| 350598dc55 | |||
| ae9df021c2 | |||
| d7cb78ecf5 | |||
| ef2e9acf1e | |||
| 7f52069e41 | |||
| 9a5c0d9cdc | |||
| 551fb17e02 | |||
| b5b9864033 | |||
| a2d2ef3a5e | |||
| b09a586357 | |||
| 70f3bc5308 | |||
| 8bc7b754bc | |||
| 3d5160455a | |||
| 983cc22761 | |||
| 6d80e4cacb | |||
| 1c5a271177 | |||
| e4891ccf6b | |||
| 48bfc7485f | |||
| 2e297ab1ef | |||
| 828fc553b4 | |||
| 08e1a6c69a | |||
| 039ea44520 | |||
| 65c1abbe27 | |||
| 0ab5a0f114 | |||
| 94219bd31e | |||
| 7c2457e659 | |||
| a156453301 | |||
| c2e53ec9a9 | |||
| 687b2a83b4 | |||
| a1f7d628bb | |||
| 789ee66836 | |||
| 9ec42b66f3 | |||
| b2b44a0810 | |||
| 59076afcb5 | |||
| 5ab24250bc | |||
| 273b0653da | |||
| b583cfb9f6 | |||
| 84cdf6ec78 | |||
| 4623d78e0d | |||
| 89cc9ffa46 | |||
| 27ddc144e0 | |||
| 6e54383d1d | |||
| e955bb11fa | |||
| f08c926945 | |||
| fdb083bb12 | |||
| e604e6af22 | |||
| 9aabdc0812 | |||
| a388d9e6e1 | |||
| 4dab7af44d | |||
| 60a0c199eb | |||
| de7f31f067 | |||
| ae4e29a968 | |||
| f50a8a98f4 | |||
| b3903bcc7f | |||
| bc38ac837b | |||
| c2c1a79046 | |||
| b902e759cb |
4
.gitignore
vendored
4
.gitignore
vendored
@ -34,6 +34,8 @@ eek/eek-special-keysym-labels.h
|
|||||||
eek/eek-unicode-keysym-labels.h
|
eek/eek-unicode-keysym-labels.h
|
||||||
eek/eek-keyname-keysym-labels.h
|
eek/eek-keyname-keysym-labels.h
|
||||||
eek/*.pc
|
eek/*.pc
|
||||||
|
eek/*.gir
|
||||||
|
eek/*.typelib
|
||||||
tests/eek-simple-test
|
tests/eek-simple-test
|
||||||
tests/eek-xkb-test
|
tests/eek-xkb-test
|
||||||
src/eekboard
|
src/eekboard
|
||||||
@ -51,4 +53,4 @@ po/*.gmo
|
|||||||
po/Makefile.in.in
|
po/Makefile.in.in
|
||||||
po/POTFILES
|
po/POTFILES
|
||||||
po/stamp-it
|
po/stamp-it
|
||||||
|
bindings/vala/*.vapi
|
||||||
|
|||||||
@ -17,4 +17,6 @@
|
|||||||
# 02110-1301 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
SUBDIRS = eek src tests docs po
|
SUBDIRS = eek src tests bindings docs po
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
|
||||||
|
EXTRA_DIST = eekboard-sample.conf
|
||||||
|
|||||||
10
TODO
10
TODO
@ -1,12 +1,14 @@
|
|||||||
- packaging
|
- packaging
|
||||||
-- GIR
|
|
||||||
-- .spec
|
|
||||||
-- debian
|
-- debian
|
||||||
-- add more tests
|
-- add more tests
|
||||||
|
|
||||||
- eekboard
|
- eekboard
|
||||||
-- a11y
|
-- rewrite in Vala
|
||||||
|
|
||||||
- libeek
|
- libeek
|
||||||
-- matchbox-keyboard layout engine
|
-- CSS based themes
|
||||||
|
-- Caribou layout engine (XML)
|
||||||
|
-- matchbox-keyboard layout engine (XML)
|
||||||
-- delay initialization of XKB and XKL layouts
|
-- delay initialization of XKB and XKL layouts
|
||||||
|
-- add mechanism to change appearances (colors?) of UI widgets
|
||||||
|
depending on modifier states
|
||||||
|
|||||||
@ -19,6 +19,7 @@ which gnome-autogen.sh || {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
|
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
|
||||||
REQUIRED_AUTOMAKE_VERSION=1.8
|
REQUIRED_AUTOMAKE_VERSION=1.10
|
||||||
|
REQUIRED_AUTOCONF_VERSION=2.60
|
||||||
|
|
||||||
. gnome-autogen.sh
|
. gnome-autogen.sh
|
||||||
|
|||||||
23
bindings/Makefile.am
Normal file
23
bindings/Makefile.am
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright (C) 2010 Daiki Ueno <ueno@unixuser.org>
|
||||||
|
# Copyright (C) 2010 Red Hat, Inc.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2 of
|
||||||
|
# the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
# This library is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
# 02110-1301 USA
|
||||||
|
|
||||||
|
if ENABLE_VALA
|
||||||
|
SUBDIRS = vala
|
||||||
|
else
|
||||||
|
SUBDIRS =
|
||||||
|
endif
|
||||||
50
bindings/vala/Makefile.am
Normal file
50
bindings/vala/Makefile.am
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Copyright (C) 2010 Daiki Ueno <ueno@unixuser.org>
|
||||||
|
# Copyright (C) 2010 Red Hat, Inc.
|
||||||
|
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2 of
|
||||||
|
# the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
# This library is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
# 02110-1301 USA
|
||||||
|
|
||||||
|
vapidir = $(datadir)/vala/vapi
|
||||||
|
dist_vapi_DATA = \
|
||||||
|
eek-$(EEK_API_VERSION).vapi \
|
||||||
|
eek-clutter-$(EEK_API_VERSION).vapi \
|
||||||
|
eek-gtk-$(EEK_API_VERSION).vapi \
|
||||||
|
eek-xkb-$(EEK_API_VERSION).vapi \
|
||||||
|
eek-xkl-$(EEK_API_VERSION).vapi
|
||||||
|
MAINTAINERCLEANFILES = $(dist_vapi_DATA)
|
||||||
|
|
||||||
|
eek-$(EEK_API_VERSION).vapi:
|
||||||
|
vapigen --library eek-$(EEK_API_VERSION) \
|
||||||
|
eek-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
|
eek-clutter-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||||
|
vapigen --vapidir=$(builddir) --library eek-clutter-$(EEK_API_VERSION) \
|
||||||
|
--pkg eek-0.1 --pkg clutter-1.0 \
|
||||||
|
eek-clutter-$(EEK_API_VERSION)/eek-clutter-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
|
eek-gtk-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||||
|
vapigen --vapidir=$(builddir) --library eek-gtk-$(EEK_API_VERSION) \
|
||||||
|
--pkg eek-0.1 --pkg gtk+-2.0 \
|
||||||
|
eek-gtk-$(EEK_API_VERSION)/eek-gtk-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
|
eek-xkb-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||||
|
vapigen --vapidir=$(builddir) --library eek-xkb-$(EEK_API_VERSION) \
|
||||||
|
--pkg eek-0.1 \
|
||||||
|
eek-xkb-$(EEK_API_VERSION)/eek-xkb-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
|
eek-xkl-$(EEK_API_VERSION).vapi: eek-xkb-$(EEK_API_VERSION).vapi
|
||||||
|
vapigen --vapidir=$(builddir) --library eek-xkl-$(EEK_API_VERSION) \
|
||||||
|
--pkg eek-0.1 --pkg eek-xkb-0.1 \
|
||||||
|
eek-xkl-$(EEK_API_VERSION)/eek-xkl-$(EEK_API_VERSION).gi
|
||||||
9
bindings/vala/eek-0.1/eek-0.1.files
Normal file
9
bindings/vala/eek-0.1/eek-0.1.files
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
include/eek-0.1/eek/eek-layout.h
|
||||||
|
include/eek-0.1/eek/eek-element.h
|
||||||
|
include/eek-0.1/eek/eek-container.h
|
||||||
|
include/eek-0.1/eek/eek-keyboard.h
|
||||||
|
include/eek-0.1/eek/eek-section.h
|
||||||
|
include/eek-0.1/eek/eek-key.h
|
||||||
|
include/eek-0.1/eek/eek-types.h
|
||||||
|
include/eek-0.1/eek/eek-keysym.h
|
||||||
|
lib/libeek.so
|
||||||
680
bindings/vala/eek-0.1/eek-0.1.gi
Normal file
680
bindings/vala/eek-0.1/eek-0.1.gi
Normal file
@ -0,0 +1,680 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<api version="1.0">
|
||||||
|
<namespace name="Eek">
|
||||||
|
<function name="keysym_get_category" symbol="eek_keysym_get_category">
|
||||||
|
<return-type type="EekKeysymCategory"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keysym" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</function>
|
||||||
|
<function name="keysym_to_string" symbol="eek_keysym_to_string">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keysym" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</function>
|
||||||
|
<callback name="EekCallback">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="user_data" type="gpointer"/>
|
||||||
|
</parameters>
|
||||||
|
</callback>
|
||||||
|
<callback name="EekCompareFunc">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="user_data" type="gpointer"/>
|
||||||
|
</parameters>
|
||||||
|
</callback>
|
||||||
|
<boxed name="EekBounds" type-name="EekBounds" get-type="eek_bounds_get_type">
|
||||||
|
<field name="x" type="gdouble"/>
|
||||||
|
<field name="y" type="gdouble"/>
|
||||||
|
<field name="width" type="gdouble"/>
|
||||||
|
<field name="height" type="gdouble"/>
|
||||||
|
</boxed>
|
||||||
|
<boxed name="EekKeysymMatrix" type-name="EekKeysymMatrix" get-type="eek_keysym_matrix_get_type">
|
||||||
|
<field name="data" type="guint*"/>
|
||||||
|
<field name="num_groups" type="gint"/>
|
||||||
|
<field name="num_levels" type="gint"/>
|
||||||
|
</boxed>
|
||||||
|
<boxed name="EekOutline" type-name="EekOutline" get-type="eek_outline_get_type">
|
||||||
|
<field name="corner_radius" type="gdouble"/>
|
||||||
|
<field name="points" type="EekPoint*"/>
|
||||||
|
<field name="num_points" type="gint"/>
|
||||||
|
</boxed>
|
||||||
|
<boxed name="EekPoint" type-name="EekPoint" get-type="eek_point_get_type">
|
||||||
|
<field name="x" type="gdouble"/>
|
||||||
|
<field name="y" type="gdouble"/>
|
||||||
|
</boxed>
|
||||||
|
<enum name="EekKeysymCategory">
|
||||||
|
<member name="EEK_KEYSYM_CATEGORY_LETTER" value="0"/>
|
||||||
|
<member name="EEK_KEYSYM_CATEGORY_FUNCTION" value="1"/>
|
||||||
|
<member name="EEK_KEYSYM_CATEGORY_KEYNAME" value="2"/>
|
||||||
|
<member name="EEK_KEYSYM_CATEGORY_UNKNOWN" value="3"/>
|
||||||
|
<member name="EEK_KEYSYM_CATEGORY_LAST" value="3"/>
|
||||||
|
</enum>
|
||||||
|
<enum name="EekOrientation">
|
||||||
|
<member name="EEK_ORIENTATION_VERTICAL" value="0"/>
|
||||||
|
<member name="EEK_ORIENTATION_HORIZONTAL" value="1"/>
|
||||||
|
<member name="EEK_ORIENTATION_INVALID" value="-1"/>
|
||||||
|
</enum>
|
||||||
|
<object name="EekContainer" parent="EekElement" type-name="EekContainer" get-type="eek_container_get_type">
|
||||||
|
<method name="find" symbol="eek_container_find">
|
||||||
|
<return-type type="EekElement*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="container" type="EekContainer*"/>
|
||||||
|
<parameter name="func" type="EekCompareFunc"/>
|
||||||
|
<parameter name="user_data" type="gpointer"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="find_by_position" symbol="eek_container_find_by_position">
|
||||||
|
<return-type type="EekElement*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="container" type="EekContainer*"/>
|
||||||
|
<parameter name="x" type="gdouble"/>
|
||||||
|
<parameter name="y" type="gdouble"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="foreach_child" symbol="eek_container_foreach_child">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="container" type="EekContainer*"/>
|
||||||
|
<parameter name="callback" type="EekCallback"/>
|
||||||
|
<parameter name="user_data" type="gpointer"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<signal name="child-added" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekContainer*"/>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<signal name="child-removed" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekContainer*"/>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<vfunc name="add_child">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekContainer*"/>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="find">
|
||||||
|
<return-type type="EekElement*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekContainer*"/>
|
||||||
|
<parameter name="func" type="EekCompareFunc"/>
|
||||||
|
<parameter name="user_data" type="gpointer"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="foreach_child">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekContainer*"/>
|
||||||
|
<parameter name="callback" type="EekCallback"/>
|
||||||
|
<parameter name="user_data" type="gpointer"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="remove_child">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekContainer*"/>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
</object>
|
||||||
|
<object name="EekElement" parent="GInitiallyUnowned" type-name="EekElement" get-type="eek_element_get_type">
|
||||||
|
<method name="get_absolute_position" symbol="eek_element_get_absolute_position">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="x" type="gdouble*"/>
|
||||||
|
<parameter name="y" type="gdouble*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_bounds" symbol="eek_element_get_bounds">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="bounds" type="EekBounds*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_name" symbol="eek_element_get_name">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_parent" symbol="eek_element_get_parent">
|
||||||
|
<return-type type="EekElement*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_bounds" symbol="eek_element_set_bounds">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="bounds" type="EekBounds*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_name" symbol="eek_element_set_name">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="name" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_parent" symbol="eek_element_set_parent">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="element" type="EekElement*"/>
|
||||||
|
<parameter name="parent" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<property name="bounds" type="EekBounds*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="name" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<vfunc name="get_bounds">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekElement*"/>
|
||||||
|
<parameter name="bounds" type="EekBounds*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_name">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_parent">
|
||||||
|
<return-type type="EekElement*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_bounds">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekElement*"/>
|
||||||
|
<parameter name="bounds" type="EekBounds*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_name">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekElement*"/>
|
||||||
|
<parameter name="name" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_parent">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekElement*"/>
|
||||||
|
<parameter name="parent" type="EekElement*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
</object>
|
||||||
|
<object name="EekKey" parent="EekElement" type-name="EekKey" get-type="eek_key_get_type">
|
||||||
|
<method name="get_index" symbol="eek_key_get_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="column" type="gint*"/>
|
||||||
|
<parameter name="row" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_keycode" symbol="eek_key_get_keycode">
|
||||||
|
<return-type type="guint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_keysym" symbol="eek_key_get_keysym">
|
||||||
|
<return-type type="guint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_keysym_index" symbol="eek_key_get_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="group" type="gint*"/>
|
||||||
|
<parameter name="level" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_keysyms" symbol="eek_key_get_keysyms">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="keysyms" type="guint**"/>
|
||||||
|
<parameter name="num_groups" type="gint*"/>
|
||||||
|
<parameter name="num_levels" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_outline" symbol="eek_key_get_outline">
|
||||||
|
<return-type type="EekOutline*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_index" symbol="eek_key_set_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="column" type="gint"/>
|
||||||
|
<parameter name="row" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_keycode" symbol="eek_key_set_keycode">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="keycode" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_keysym_index" symbol="eek_key_set_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="group" type="gint"/>
|
||||||
|
<parameter name="level" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_keysyms" symbol="eek_key_set_keysyms">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="keysyms" type="guint*"/>
|
||||||
|
<parameter name="num_groups" type="gint"/>
|
||||||
|
<parameter name="num_levels" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_outline" symbol="eek_key_set_outline">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
<parameter name="outline" type="EekOutline*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<property name="column" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="group" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="keycode" type="guint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="keysyms" type="EekKeysymMatrix*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="level" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="outline" type="gpointer" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="row" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<signal name="pressed" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<signal name="released" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<vfunc name="get_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="column" type="gint*"/>
|
||||||
|
<parameter name="row" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_keycode">
|
||||||
|
<return-type type="guint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_keysym">
|
||||||
|
<return-type type="guint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="group" type="gint*"/>
|
||||||
|
<parameter name="level" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_keysyms">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="keysyms" type="guint**"/>
|
||||||
|
<parameter name="num_groups" type="gint*"/>
|
||||||
|
<parameter name="num_levels" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_outline">
|
||||||
|
<return-type type="EekOutline*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="column" type="gint"/>
|
||||||
|
<parameter name="row" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_keycode">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="keycode" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="group" type="gint"/>
|
||||||
|
<parameter name="level" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_keysyms">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="keysyms" type="guint*"/>
|
||||||
|
<parameter name="num_groups" type="gint"/>
|
||||||
|
<parameter name="num_levels" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_outline">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKey*"/>
|
||||||
|
<parameter name="outline" type="EekOutline*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
</object>
|
||||||
|
<object name="EekKeyboard" parent="EekContainer" type-name="EekKeyboard" get-type="eek_keyboard_get_type">
|
||||||
|
<method name="create_section" symbol="eek_keyboard_create_section">
|
||||||
|
<return-type type="EekSection*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="find_key_by_keycode" symbol="eek_keyboard_find_key_by_keycode">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
<parameter name="keycode" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_keysym_index" symbol="eek_keyboard_get_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
<parameter name="group" type="gint*"/>
|
||||||
|
<parameter name="level" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="realize" symbol="eek_keyboard_realize">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_keysym_index" symbol="eek_keyboard_set_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
<parameter name="group" type="gint"/>
|
||||||
|
<parameter name="level" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_layout" symbol="eek_keyboard_set_layout">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
<parameter name="layout" type="EekLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<property name="group" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="level" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<signal name="key-pressed" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="object" type="EekKeyboard*"/>
|
||||||
|
<parameter name="p0" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<signal name="key-released" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="object" type="EekKeyboard*"/>
|
||||||
|
<parameter name="p0" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<vfunc name="create_section">
|
||||||
|
<return-type type="EekSection*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="find_key_by_keycode">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKeyboard*"/>
|
||||||
|
<parameter name="keycode" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKeyboard*"/>
|
||||||
|
<parameter name="group" type="gint*"/>
|
||||||
|
<parameter name="level" type="gint*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="realize">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_keysym_index">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKeyboard*"/>
|
||||||
|
<parameter name="group" type="gint"/>
|
||||||
|
<parameter name="level" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_layout">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekKeyboard*"/>
|
||||||
|
<parameter name="layout" type="EekLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
</object>
|
||||||
|
<object name="EekSection" parent="EekContainer" type-name="EekSection" get-type="eek_section_get_type">
|
||||||
|
<method name="add_row" symbol="eek_section_add_row">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
<parameter name="num_columns" type="gint"/>
|
||||||
|
<parameter name="orientation" type="EekOrientation"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="create_key" symbol="eek_section_create_key">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
<parameter name="column" type="gint"/>
|
||||||
|
<parameter name="row" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="find_key_by_keycode" symbol="eek_section_find_key_by_keycode">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
<parameter name="keycode" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_angle" symbol="eek_section_get_angle">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_n_rows" symbol="eek_section_get_n_rows">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_row" symbol="eek_section_get_row">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
<parameter name="index" type="gint"/>
|
||||||
|
<parameter name="num_columns" type="gint*"/>
|
||||||
|
<parameter name="orientation" type="EekOrientation*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_angle" symbol="eek_section_set_angle">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekSection*"/>
|
||||||
|
<parameter name="angle" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<property name="angle" type="gint" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<signal name="key-pressed" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="object" type="EekSection*"/>
|
||||||
|
<parameter name="p0" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<signal name="key-released" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="object" type="EekSection*"/>
|
||||||
|
<parameter name="p0" type="EekKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<vfunc name="add_row">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
<parameter name="num_columns" type="gint"/>
|
||||||
|
<parameter name="orientation" type="EekOrientation"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="create_key">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
<parameter name="row" type="gint"/>
|
||||||
|
<parameter name="column" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="find_key_by_keycode">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
<parameter name="keycode" type="guint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_angle">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_n_rows">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_row">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
<parameter name="index" type="gint"/>
|
||||||
|
<parameter name="num_columns" type="gint*"/>
|
||||||
|
<parameter name="orientation" type="EekOrientation*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="set_angle">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekSection*"/>
|
||||||
|
<parameter name="angle" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
</object>
|
||||||
|
<interface name="EekLayout" type-name="EekLayout" get-type="eek_layout_get_type">
|
||||||
|
<method name="apply" symbol="eek_layout_apply">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekLayout*"/>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_group" symbol="eek_layout_get_group">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<signal name="changed" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<signal name="group-changed" when="FIRST">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekLayout*"/>
|
||||||
|
<parameter name="group" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</signal>
|
||||||
|
<vfunc name="apply">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekLayout*"/>
|
||||||
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
<vfunc name="get_group">
|
||||||
|
<return-type type="gint"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="self" type="EekLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</vfunc>
|
||||||
|
</interface>
|
||||||
|
<constant name="EEK_CONTAINER_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_ELEMENT_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_KEYBOARD_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_KEYSYM_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_KEY_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_LAYOUT_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_SECTION_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_TYPES_H" type="int" value="1"/>
|
||||||
|
</namespace>
|
||||||
|
</api>
|
||||||
1
bindings/vala/eek-0.1/eek-0.1.metadata
Normal file
1
bindings/vala/eek-0.1/eek-0.1.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
Eek cheader_filename="eek/eek.h"
|
||||||
1
bindings/vala/eek-0.1/eek-0.1.namespace
Normal file
1
bindings/vala/eek-0.1/eek-0.1.namespace
Normal file
@ -0,0 +1 @@
|
|||||||
|
Eek
|
||||||
6
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.files
Normal file
6
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.files
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
include/eek-0.1/eek/eek-clutter-keyboard.h
|
||||||
|
include/eek-0.1/eek/eek-clutter-section.h
|
||||||
|
include/eek-0.1/eek/eek-clutter-key.h
|
||||||
|
include/eek-0.1/eek/eek-clutter-drawing-context.h
|
||||||
|
lib/libeek-clutter.so
|
||||||
|
|
||||||
85
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.gi
Normal file
85
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.gi
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<api version="1.0">
|
||||||
|
<namespace name="EekClutter">
|
||||||
|
<object name="EekClutterDrawingContext" parent="GInitiallyUnowned" type-name="EekClutterDrawingContext" get-type="eek_clutter_drawing_context_get_type">
|
||||||
|
<method name="get_category_font" symbol="eek_clutter_drawing_context_get_category_font">
|
||||||
|
<return-type type="PangoFontDescription*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||||
|
<parameter name="category" type="EekKeysymCategory"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_outline_texture" symbol="eek_clutter_drawing_context_get_outline_texture">
|
||||||
|
<return-type type="ClutterActor*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||||
|
<parameter name="outline" type="EekOutline*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_clutter_drawing_context_new">
|
||||||
|
<return-type type="EekClutterDrawingContext*"/>
|
||||||
|
</constructor>
|
||||||
|
<method name="set_category_font" symbol="eek_clutter_drawing_context_set_category_font">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||||
|
<parameter name="category" type="EekKeysymCategory"/>
|
||||||
|
<parameter name="fonts" type="PangoFontDescription*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_outline_texture" symbol="eek_clutter_drawing_context_set_outline_texture">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||||
|
<parameter name="outline" type="EekOutline*"/>
|
||||||
|
<parameter name="texture" type="ClutterActor*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
</object>
|
||||||
|
<object name="EekClutterKey" parent="EekKey" type-name="EekClutterKey" get-type="eek_clutter_key_get_type">
|
||||||
|
<method name="get_actor" symbol="eek_clutter_key_get_actor">
|
||||||
|
<return-type type="ClutterActor*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="key" type="EekClutterKey*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_clutter_key_new">
|
||||||
|
<return-type type="EekKey*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||||
|
<parameter name="column" type="gint"/>
|
||||||
|
<parameter name="row" type="gint"/>
|
||||||
|
</parameters>
|
||||||
|
</constructor>
|
||||||
|
</object>
|
||||||
|
<object name="EekClutterKeyboard" parent="EekKeyboard" type-name="EekClutterKeyboard" get-type="eek_clutter_keyboard_get_type">
|
||||||
|
<method name="get_actor" symbol="eek_clutter_keyboard_get_actor">
|
||||||
|
<return-type type="ClutterActor*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekClutterKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_clutter_keyboard_new">
|
||||||
|
<return-type type="EekKeyboard*"/>
|
||||||
|
</constructor>
|
||||||
|
</object>
|
||||||
|
<object name="EekClutterSection" parent="EekSection" type-name="EekClutterSection" get-type="eek_clutter_section_get_type">
|
||||||
|
<method name="get_actor" symbol="eek_clutter_section_get_actor">
|
||||||
|
<return-type type="ClutterActor*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="section" type="EekClutterSection*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_clutter_section_new">
|
||||||
|
<return-type type="EekSection*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||||
|
</parameters>
|
||||||
|
</constructor>
|
||||||
|
</object>
|
||||||
|
<constant name="EEK_CLUTTER_DRAWING_CONTEXT_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_CLUTTER_KEYBOARD_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_CLUTTER_KEY_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_CLUTTER_SECTION_H" type="int" value="1"/>
|
||||||
|
</namespace>
|
||||||
|
</api>
|
||||||
1
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.metadata
Normal file
1
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekClutter cheader_filename="eek/eek-clutter.h"
|
||||||
1
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.namespace
Normal file
1
bindings/vala/eek-clutter-0.1/eek-clutter-0.1.namespace
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekClutter
|
||||||
3
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.files
Normal file
3
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include/eek-0.1/eek/eek-gtk-keyboard.h
|
||||||
|
include/eek-0.1/eek/eek-gtk.h
|
||||||
|
lib/libeek-gtk.so
|
||||||
18
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.gi
Normal file
18
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.gi
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<api version="1.0">
|
||||||
|
<namespace name="EekGtk">
|
||||||
|
<object name="EekGtkKeyboard" parent="EekKeyboard" type-name="EekGtkKeyboard" get-type="eek_gtk_keyboard_get_type">
|
||||||
|
<method name="get_widget" symbol="eek_gtk_keyboard_get_widget">
|
||||||
|
<return-type type="GtkWidget*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="keyboard" type="EekGtkKeyboard*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_gtk_keyboard_new">
|
||||||
|
<return-type type="EekKeyboard*"/>
|
||||||
|
</constructor>
|
||||||
|
</object>
|
||||||
|
<constant name="EEK_GTK_H" type="int" value="1"/>
|
||||||
|
<constant name="EEK_GTK_KEYBOARD_H" type="int" value="1"/>
|
||||||
|
</namespace>
|
||||||
|
</api>
|
||||||
1
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.metadata
Normal file
1
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekGtk cheader_filename="eek/eek-gtk.h"
|
||||||
1
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.namespace
Normal file
1
bindings/vala/eek-gtk-0.1/eek-gtk-0.1.namespace
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekGtk
|
||||||
2
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.files
Normal file
2
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.files
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
include/eek-0.1/eek/eek-xkb-layout.h
|
||||||
|
lib/libeek-xkb.so
|
||||||
65
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.gi
Normal file
65
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.gi
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<api version="1.0">
|
||||||
|
<namespace name="EekXkb">
|
||||||
|
<object name="EekXkbLayout" parent="GInitiallyUnowned" type-name="EekXkbLayout" get-type="eek_xkb_layout_get_type">
|
||||||
|
<implements>
|
||||||
|
<interface name="EekLayout"/>
|
||||||
|
</implements>
|
||||||
|
<method name="get_geometry" symbol="eek_xkb_layout_get_geometry">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_keycodes" symbol="eek_xkb_layout_get_keycodes">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_symbols" symbol="eek_xkb_layout_get_symbols">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_xkb_layout_new">
|
||||||
|
<return-type type="EekLayout*"/>
|
||||||
|
</constructor>
|
||||||
|
<method name="set_geometry" symbol="eek_xkb_layout_set_geometry">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
<parameter name="geometry" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_keycodes" symbol="eek_xkb_layout_set_keycodes">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
<parameter name="keycodes" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<!--
|
||||||
|
<method name="set_names" symbol="eek_xkb_layout_set_names">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
<parameter name="names" type="XkbComponentNamesRec*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
-->
|
||||||
|
<method name="set_symbols" symbol="eek_xkb_layout_set_symbols">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXkbLayout*"/>
|
||||||
|
<parameter name="symbols" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<property name="geometry" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="keycodes" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="symbols" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
</object>
|
||||||
|
<constant name="EEK_XKB_LAYOUT_H" type="int" value="1"/>
|
||||||
|
</namespace>
|
||||||
|
</api>
|
||||||
1
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.metadata
Normal file
1
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekXkb cheader_filename="eek/eek-xkb.h"
|
||||||
1
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.namespace
Normal file
1
bindings/vala/eek-xkb-0.1/eek-xkb-0.1.namespace
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekXkb
|
||||||
3
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.files
Normal file
3
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include/eek-0.1/eek/eek-xkl-layout.h
|
||||||
|
lib/libeek-xkl.so
|
||||||
|
|
||||||
91
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.gi
Normal file
91
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.gi
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<api version="1.0">
|
||||||
|
<namespace name="EekXkl">
|
||||||
|
<object name="EekXklLayout" parent="EekXkbLayout" type-name="EekXklLayout" get-type="eek_xkl_layout_get_type">
|
||||||
|
<implements>
|
||||||
|
<interface name="EekLayout"/>
|
||||||
|
</implements>
|
||||||
|
<method name="disable_option" symbol="eek_xkl_layout_disable_option">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="option" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="enable_option" symbol="eek_xkl_layout_enable_option">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="option" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_layouts" symbol="eek_xkl_layout_get_layouts">
|
||||||
|
<return-type type="gchar**"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_model" symbol="eek_xkl_layout_get_model">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_option" symbol="eek_xkl_layout_get_option">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="option" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_options" symbol="eek_xkl_layout_get_options">
|
||||||
|
<return-type type="gchar**"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="get_variants" symbol="eek_xkl_layout_get_variants">
|
||||||
|
<return-type type="gchar**"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor name="new" symbol="eek_xkl_layout_new">
|
||||||
|
<return-type type="EekLayout*"/>
|
||||||
|
</constructor>
|
||||||
|
<method name="set_layouts" symbol="eek_xkl_layout_set_layouts">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="layouts" type="gchar**"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_model" symbol="eek_xkl_layout_set_model">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="model" type="gchar*"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_options" symbol="eek_xkl_layout_set_options">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="options" type="gchar**"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="set_variants" symbol="eek_xkl_layout_set_variants">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="layout" type="EekXklLayout*"/>
|
||||||
|
<parameter name="variants" type="gchar**"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<property name="layouts" type="GStrv*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="model" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="options" type="GStrv*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
<property name="variants" type="GStrv*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||||
|
</object>
|
||||||
|
<constant name="EEK_XKL_LAYOUT_H" type="int" value="1"/>
|
||||||
|
</namespace>
|
||||||
|
</api>
|
||||||
1
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.metadata
Normal file
1
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekXkl cheader_filename="eek/eek-xkl.h"
|
||||||
1
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.namespace
Normal file
1
bindings/vala/eek-xkl-0.1/eek-xkl-0.1.namespace
Normal file
@ -0,0 +1 @@
|
|||||||
|
EekXkl
|
||||||
118
configure.ac
118
configure.ac
@ -16,7 +16,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02110-1301 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
AC_INIT([eekboard], [0.0.1], [ueno@unixuser.org])
|
AC_INIT([eekboard], [0.0.6], [ueno@unixuser.org])
|
||||||
AC_CONFIG_SRCDIR([configure.ac])
|
AC_CONFIG_SRCDIR([configure.ac])
|
||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
@ -25,6 +25,50 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||||||
LT_INIT
|
LT_INIT
|
||||||
IT_PROG_INTLTOOL([0.35.0])
|
IT_PROG_INTLTOOL([0.35.0])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([which gtk+ version to compile against])
|
||||||
|
AC_ARG_WITH([gtk],
|
||||||
|
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
|
||||||
|
[case "$with_gtk" in
|
||||||
|
2.0|3.0) ;;
|
||||||
|
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
|
||||||
|
esac],
|
||||||
|
[with_gtk=2.0])
|
||||||
|
AC_MSG_RESULT([$with_gtk])
|
||||||
|
|
||||||
|
case "$with_gtk" in
|
||||||
|
2.0) GTK_API_VERSION=2.0
|
||||||
|
GTK_REQUIRED=2.14.0
|
||||||
|
EEK_API_VERSION=0.1
|
||||||
|
EEK_API_MAJOR_VERSION=0
|
||||||
|
EEK_API_MINOR_VERSION=1
|
||||||
|
EEK_API_PC_VERSION=0.1
|
||||||
|
EEK_LIBRARY_SUFFIX="-$EEK_API_VERSION"
|
||||||
|
;;
|
||||||
|
3.0) GTK_API_VERSION=3.0
|
||||||
|
GTK_REQUIRED=2.91.0
|
||||||
|
# EEK_API_VERSION=0.90
|
||||||
|
# EEK_API_MAJOR_VERSION=0
|
||||||
|
# EEK_API_MINOR_VERSION=90
|
||||||
|
# EEK_API_PC_VERSION=0.90
|
||||||
|
EEK_API_VERSION=0.1
|
||||||
|
EEK_API_MAJOR_VERSION=0
|
||||||
|
EEK_API_MINOR_VERSION=1
|
||||||
|
EEK_API_PC_VERSION=0.1
|
||||||
|
EEK_LIBRARY_SUFFIX="-$EEK_API_VERSION"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SUBST([GTK_API_VERSION])
|
||||||
|
AC_SUBST([EEK_API_VERSION])
|
||||||
|
AC_SUBST([EEK_API_MAJOR_VERSION])
|
||||||
|
AC_SUBST([EEK_API_MINOR_VERSION])
|
||||||
|
AC_SUBST([EEK_API_PC_VERSION])
|
||||||
|
AC_SUBST([EEK_LIBRARY_SUFFIX])
|
||||||
|
AC_SUBST([EEK_LIBRARY_SUFFIX_U],[AS_TR_SH([$EEK_LIBRARY_SUFFIX])])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
|
||||||
|
AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
|
||||||
|
|
||||||
PKG_CHECK_MODULES([GLIB2], [glib-2.0], ,
|
PKG_CHECK_MODULES([GLIB2], [glib-2.0], ,
|
||||||
[AC_MSG_ERROR([GLib2 not found])])
|
[AC_MSG_ERROR([GLib2 not found])])
|
||||||
PKG_CHECK_MODULES([GOBJECT2], [gobject-2.0], ,
|
PKG_CHECK_MODULES([GOBJECT2], [gobject-2.0], ,
|
||||||
@ -33,14 +77,46 @@ PKG_CHECK_MODULES([CAIRO], [cairo], ,
|
|||||||
[AC_MSG_ERROR([Cairo not found])])
|
[AC_MSG_ERROR([Cairo not found])])
|
||||||
PKG_CHECK_MODULES([PANGO], [pango], ,
|
PKG_CHECK_MODULES([PANGO], [pango], ,
|
||||||
[AC_MSG_ERROR([Pango not found])])
|
[AC_MSG_ERROR([Pango not found])])
|
||||||
PKG_CHECK_MODULES([GTK2], [gtk+-2.0 gdk-2.0], ,
|
PKG_CHECK_MODULES([GTK], [
|
||||||
[AC_MSG_ERROR([GTK2 not found])])
|
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||||
|
gdk-$GTK_API_VERSION >= $GTK_REQUIRED], ,
|
||||||
|
[AC_MSG_ERROR([GTK not found])])
|
||||||
|
PKG_CHECK_MODULES([GCONF2], [gconf-2.0], ,
|
||||||
|
[AC_MSG_ERROR([GConf not found])])
|
||||||
PKG_CHECK_MODULES([XKB], [x11], ,
|
PKG_CHECK_MODULES([XKB], [x11], ,
|
||||||
[AC_MSG_ERROR([XKB support not found])])
|
[AC_MSG_ERROR([XKB support not found])])
|
||||||
PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], ,
|
PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], ,
|
||||||
[AC_MSG_ERROR([Libxklavier not found])])
|
[AC_MSG_ERROR([Libxklavier not found])])
|
||||||
PKG_CHECK_MODULES([LIBFAKEKEY], [libfakekey], ,
|
PKG_CHECK_MODULES([LIBFAKEKEY], [libfakekey], ,
|
||||||
[AC_MSG_ERROR([libfakekey not found])])
|
[AC_MSG_ERROR([libfakekey not found])])
|
||||||
|
PKG_CHECK_MODULES([CSPI], [cspi-1.0], ,
|
||||||
|
[AC_MSG_ERROR([AT-SPI C not found])])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([NOTIFY], [libnotify], ,
|
||||||
|
[AC_MSG_ERROR([libnotify not found])])
|
||||||
|
|
||||||
|
dnl libnotify >= 0.7.0 omitted the feature to attach notification to widget.
|
||||||
|
need_libnotify_attach_workaround=0
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$NOTIFY_CFLAGS"
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
LIBS="$NOTIFY_LIBS"
|
||||||
|
AC_TRY_LINK([#include <libnotify/notification.h>],
|
||||||
|
[notify_notification_new (NULL, NULL, NULL);], ,
|
||||||
|
[need_libnotify_attach_workaround=1])
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
AC_DEFINE_UNQUOTED([NEED_LIBNOTIFY_ATTACH_WORKAROUND],
|
||||||
|
$need_libnotify_attach_workaround,
|
||||||
|
[Define if notify_notification_new work around is needed])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether you enable Vala language support])
|
||||||
|
AC_ARG_ENABLE(vala,
|
||||||
|
AS_HELP_STRING([--enable-vala=no/yes],
|
||||||
|
[Enable Vala language binding default=yes]),,
|
||||||
|
enable_vala=yes)
|
||||||
|
AC_MSG_RESULT($enable_vala)
|
||||||
|
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether you enable eekboard])
|
AC_MSG_CHECKING([whether you enable eekboard])
|
||||||
AC_ARG_ENABLE(eekboard,
|
AC_ARG_ENABLE(eekboard,
|
||||||
@ -61,24 +137,20 @@ if test x$enable_clutter = xyes; then
|
|||||||
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], ,
|
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], ,
|
||||||
[AC_MSG_ERROR([Clutter not found -- install it or add --disable-clutter])])
|
[AC_MSG_ERROR([Clutter not found -- install it or add --disable-clutter])])
|
||||||
AC_DEFINE([HAVE_CLUTTER], [1], [Define if Clutter is found])
|
AC_DEFINE([HAVE_CLUTTER], [1], [Define if Clutter is found])
|
||||||
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-0.90],
|
have_clutter_gtk=0
|
||||||
[enable_clutter_gtk=yes])
|
need_swap_event_workaround=0
|
||||||
if test x$enable_clutter_gtk = xno; then
|
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0], [have_clutter_gtk=1],
|
||||||
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-0.10],
|
[PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-0.10 clutter-x11-1.0],
|
||||||
[enable_clutter_gtk=yes])
|
[have_clutter_gtk=1; need_swap_event_workaround=1])])
|
||||||
fi
|
AC_DEFINE_UNQUOTED([HAVE_CLUTTER_GTK], $have_clutter_gtk,
|
||||||
if test x$enable_clutter_gtk = xyes; then
|
[Define if Clutter-Gtk is found])
|
||||||
AC_DEFINE([HAVE_CLUTTER_GTK], [1], [Define if Clutter-Gtk is found])
|
AC_DEFINE_UNQUOTED([NEED_SWAP_EVENT_WORKAROUND], $need_swap_event_workaround,
|
||||||
fi
|
[Define if GLX_INTEL_swap_event work around is needed])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_CLUTTER, [test x$enable_clutter = xyes])
|
AM_CONDITIONAL(HAVE_CLUTTER, [test x$enable_clutter = xyes])
|
||||||
AM_CONDITIONAL(HAVE_CLUTTER_GTK, [test x$enable_clutter_gtk = xyes])
|
|
||||||
|
|
||||||
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
||||||
|
|
||||||
EEK_API_VERSION=0.1
|
|
||||||
AC_SUBST(EEK_API_VERSION)
|
|
||||||
|
|
||||||
dnl to re-generate eek/*-keysym-labels.txt
|
dnl to re-generate eek/*-keysym-labels.txt
|
||||||
AC_CHECK_PROGS([PYTHON], [python])
|
AC_CHECK_PROGS([PYTHON], [python])
|
||||||
|
|
||||||
@ -89,18 +161,22 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only
|
|||||||
AM_GLIB_GNU_GETTEXT
|
AM_GLIB_GNU_GETTEXT
|
||||||
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
||||||
|
|
||||||
|
GOBJECT_INTROSPECTION_CHECK([0.6.7])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([eek/config.h])
|
AC_CONFIG_HEADERS([eek/config.h])
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
eek/Makefile
|
eek/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
|
bindings/Makefile
|
||||||
|
bindings/vala/Makefile
|
||||||
docs/Makefile
|
docs/Makefile
|
||||||
docs/reference/Makefile
|
docs/reference/Makefile
|
||||||
docs/reference/eek/Makefile
|
docs/reference/eek/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
eek/libeek.pc
|
eek/eek-${EEK_API_VERSION}.pc
|
||||||
eek/libeek-clutter.pc
|
eek/eek-clutter-${EEK_API_VERSION}.pc
|
||||||
eek/libeek-gtk.pc
|
eek/eek-gtk-${EEK_API_VERSION}.pc
|
||||||
eek/libeek-xkb.pc
|
eek/eek-xkb-${EEK_API_VERSION}.pc
|
||||||
eek/libeek-xkl.pc])
|
eek/eek-xkl-${EEK_API_VERSION}.pc])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<bookinfo>
|
<bookinfo>
|
||||||
<title>libeek Reference Manual</title>
|
<title>libeek Reference Manual</title>
|
||||||
<releaseinfo>
|
<releaseinfo>
|
||||||
for libeek 0.0.1.
|
for libeek 0.0.5.
|
||||||
</releaseinfo>
|
</releaseinfo>
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010</year>
|
<year>2010</year>
|
||||||
|
|||||||
@ -4,23 +4,25 @@
|
|||||||
|
|
||||||
<para>libeek is a library to create keyboard-like user interface.
|
<para>libeek is a library to create keyboard-like user interface.
|
||||||
Since it is designed as simple as possible, it provides only two
|
Since it is designed as simple as possible, it provides only two
|
||||||
kinds of objects. One is <emphasis>keyboard element</emphasis>
|
kind of objects. One is <emphasis>keyboard element</emphasis>
|
||||||
(derived from #EekElement) and another is <emphasis>keyboard
|
(objects derived from #EekElement) and another is
|
||||||
layout engine</emphasis> (which implements the #EekLayout
|
<emphasis>keyboard layout engine</emphasis> (objects which
|
||||||
interface).</para>
|
implements the #EekLayout interface).</para>
|
||||||
|
|
||||||
<para>A keyboard element represents either a keyboard
|
<para>A keyboard element represents either a keyboard
|
||||||
(#EekKeyboard), a section (#EekSection), or a key (#EekKey). Each
|
(#EekKeyboard), a section (#EekSection), or a key (#EekKey). Each
|
||||||
element implements the Builder design pattern so that it can be
|
element implements the Builder design pattern so that it can map
|
||||||
converted into a UI widget (#ClutterActor, #GtkDrawingArea,
|
itself to different UI widgets (#ClutterActor, #GtkDrawingArea,
|
||||||
aso).</para>
|
aso).</para>
|
||||||
|
|
||||||
<para>A layout engine arranges keyboard elements using information
|
<para>A layout engine arranges keyboard elements using information
|
||||||
from external configuration mechanisms (libxklavier, XKB,
|
from external configuration mechanisms (libxklavier, XKB,
|
||||||
matchbox-keyboard layouts in XML, aso)</para>
|
matchbox-keyboard layouts in XML, aso)</para>
|
||||||
|
|
||||||
<para>Here is a sample code which creates a keyboard-like #ClutterActor using the system keyboard layout using libxklavier:</para>
|
<para>Here is a sample code which demonstrates (1) keyboard
|
||||||
|
elements are arranged with the system keyboard layout using
|
||||||
|
libxklavier and (2) keyboard elements are mapped into
|
||||||
|
#ClutterActor:</para>
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
EekKeyboard *keyboard;
|
EekKeyboard *keyboard;
|
||||||
@ -40,14 +42,26 @@ clutter_group_add (CLUTTER_GROUP(stage),
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>One of the most interesting features of libeek is that UI
|
<para>The most interesting feature of libeek is that developer can
|
||||||
backends can be switched easily. For example, to create a
|
choose arbitrary combination of UI toolkits and layout engine
|
||||||
keyboard-like #GtkWidget instead of #ClutterActor, all you need is
|
supported by libeek. For example, to create a keyboard-like
|
||||||
to replace eek_clutter_keyboard_new() with eek_gtk_keyboard_new()
|
#GtkWidget instead of #ClutterActor, all you need is to replace
|
||||||
and eek_clutter_keyboard_get_actor() with
|
eek_clutter_keyboard_new() with eek_gtk_keyboard_new() and
|
||||||
eek_gtk_keyboard_get_widget().</para>
|
eek_clutter_keyboard_get_actor() with
|
||||||
|
eek_gtk_keyboard_get_widget(). Similarly, if you want to use XKB
|
||||||
|
configuration directly (without libxklavier), you will only need to
|
||||||
|
replace eek_xkl_layout_new () with eek_xkb_layout_new().</para>
|
||||||
|
|
||||||
<para>There is logical represention (model) of keyboard distinct from the UI widget (view). More precisely, a keyboard is represented as a tree of #EekElement -- #EekKeyboard contains one or more #EekSection's and #EekSection contains one or more #EekKey's. Each element can be event source when user events on the UI widget occurs. For example, with the following code, when a user pushed a key widget with keycode 0x38 assigned, on_a_pressed will be called.</para>
|
<para>To achieve portability across different UI toolkits,
|
||||||
|
there is a seperate represention of keyboard elements apart from
|
||||||
|
the actual UI widgets. For example, a keyboard is represented as a tree of
|
||||||
|
#EekElement -- #EekKeyboard contains one or more #EekSection's and
|
||||||
|
#EekSection contains one or more #EekKey's. Each element may emit
|
||||||
|
events when user pushes the corresponding UI widget.</para>
|
||||||
|
<para>
|
||||||
|
Here is another sample code which demonstrates logical events on
|
||||||
|
#EekElement:
|
||||||
|
</para>
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* Find a key element in the logical keyboard. */
|
/* Find a key element in the logical keyboard. */
|
||||||
@ -55,6 +69,6 @@ EekKey *key = eek_keyboard_find_key_by_keycode (keyboard, 0x38);
|
|||||||
g_signal_connect (key, "pressed", on_a_pressed);
|
g_signal_connect (key, "pressed", on_a_pressed);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
<para>In this way, application developers do not need to know the differences between the underlying UI widgets after creation.</para>
|
<para>When user pushed a widget which looks like "a" key (i.e. keycode 0x38), on_a_pressed will be called.</para>
|
||||||
</partintro>
|
</partintro>
|
||||||
</part>
|
</part>
|
||||||
|
|||||||
@ -123,6 +123,7 @@ EekXklLayoutClass
|
|||||||
EekXklLayoutPrivate
|
EekXklLayoutPrivate
|
||||||
eek_xkl_layout_new
|
eek_xkl_layout_new
|
||||||
eek_xkl_layout_set_config
|
eek_xkl_layout_set_config
|
||||||
|
eek_xkl_layout_set_config_full
|
||||||
eek_xkl_layout_set_model
|
eek_xkl_layout_set_model
|
||||||
eek_xkl_layout_set_layouts
|
eek_xkl_layout_set_layouts
|
||||||
eek_xkl_layout_set_variants
|
eek_xkl_layout_set_variants
|
||||||
@ -131,6 +132,9 @@ eek_xkl_layout_get_model
|
|||||||
eek_xkl_layout_get_layouts
|
eek_xkl_layout_get_layouts
|
||||||
eek_xkl_layout_get_variants
|
eek_xkl_layout_get_variants
|
||||||
eek_xkl_layout_get_options
|
eek_xkl_layout_get_options
|
||||||
|
eek_xkl_layout_disable_option
|
||||||
|
eek_xkl_layout_enable_option
|
||||||
|
eek_xkl_layout_get_option
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
EEK_XKL_LAYOUT
|
EEK_XKL_LAYOUT
|
||||||
EEK_IS_XKL_LAYOUT
|
EEK_IS_XKL_LAYOUT
|
||||||
@ -149,6 +153,7 @@ EekXkbLayoutClass
|
|||||||
EekXkbLayoutPrivate
|
EekXkbLayoutPrivate
|
||||||
eek_xkb_layout_new
|
eek_xkb_layout_new
|
||||||
eek_xkb_layout_set_names
|
eek_xkb_layout_set_names
|
||||||
|
eek_xkb_layout_set_names_full
|
||||||
eek_xkb_layout_set_keycodes
|
eek_xkb_layout_set_keycodes
|
||||||
eek_xkb_layout_set_geometry
|
eek_xkb_layout_set_geometry
|
||||||
eek_xkb_layout_set_symbols
|
eek_xkb_layout_set_symbols
|
||||||
|
|||||||
213
eek/Makefile.am
213
eek/Makefile.am
@ -27,95 +27,97 @@ lib_LTLIBRARIES += libeek-clutter.la
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
libeek_la_SOURCES = \
|
libeek_la_SOURCES = \
|
||||||
eek-layout.c \
|
$(srcdir)/eek-layout.c \
|
||||||
eek-layout.h \
|
$(srcdir)/eek-layout.h \
|
||||||
eek-element.c \
|
$(srcdir)/eek-element.c \
|
||||||
eek-element.h \
|
$(srcdir)/eek-element.h \
|
||||||
eek-container.c \
|
$(srcdir)/eek-container.c \
|
||||||
eek-container.h \
|
$(srcdir)/eek-container.h \
|
||||||
eek-keyboard.c \
|
$(srcdir)/eek-keyboard.c \
|
||||||
eek-keyboard.h \
|
$(srcdir)/eek-keyboard.h \
|
||||||
eek-section.c \
|
$(srcdir)/eek-section.c \
|
||||||
eek-section.h \
|
$(srcdir)/eek-section.h \
|
||||||
eek-key.c \
|
$(srcdir)/eek-key.c \
|
||||||
eek-key.h \
|
$(srcdir)/eek-key.h \
|
||||||
eek-types.h \
|
$(srcdir)/eek-types.h \
|
||||||
eek-types.c \
|
$(srcdir)/eek-types.c \
|
||||||
eek-keysym.h \
|
$(srcdir)/eek-keysym.h \
|
||||||
eek-keysym.c \
|
$(srcdir)/eek-keysym.c \
|
||||||
eek-special-keysym-labels.h \
|
$(srcdir)/eek-special-keysym-labels.h \
|
||||||
eek-unicode-keysym-labels.h \
|
$(srcdir)/eek-unicode-keysym-labels.h \
|
||||||
eek-keyname-keysym-labels.h
|
$(srcdir)/eek-keyname-keysym-labels.h
|
||||||
|
libeek_la_CFLAGS = $(GOBJECT2_CFLAGS)
|
||||||
libeek_la_CFLAGS = $(GOBJECT2_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS)
|
libeek_la_LIBADD = $(GOBJECT2_LIBS) -lm
|
||||||
libeek_la_LIBADD = $(GOBJECT2_LIBS) $(CAIRO_LIBS) $(PANGO_LIBS)
|
|
||||||
|
|
||||||
if HAVE_CLUTTER
|
if HAVE_CLUTTER
|
||||||
libeek_clutter_la_SOURCES = \
|
libeek_clutter_la_SOURCES = \
|
||||||
eek-clutter-keyboard.c \
|
$(srcdir)/eek-clutter-keyboard.c \
|
||||||
eek-clutter-keyboard.h \
|
$(srcdir)/eek-clutter-keyboard.h \
|
||||||
eek-clutter-section.c \
|
$(srcdir)/eek-clutter-section.c \
|
||||||
eek-clutter-section.h \
|
$(srcdir)/eek-clutter-section.h \
|
||||||
eek-clutter-key.c \
|
$(srcdir)/eek-clutter-key.c \
|
||||||
eek-clutter-key.h \
|
$(srcdir)/eek-clutter-key.h \
|
||||||
eek-clutter-key-actor.c \
|
$(srcdir)/eek-clutter-key-actor.c \
|
||||||
eek-clutter-key-actor.h \
|
$(srcdir)/eek-clutter-key-actor.h \
|
||||||
eek-clutter-drawing-context.c \
|
$(srcdir)/eek-clutter-drawing-context.c \
|
||||||
eek-clutter-drawing-context.h \
|
$(srcdir)/eek-clutter-drawing-context.h \
|
||||||
eek-drawing.h \
|
$(srcdir)/eek-drawing.h \
|
||||||
eek-drawing.c \
|
$(srcdir)/eek-drawing.c \
|
||||||
eek-clutter.h
|
$(srcdir)/eek-clutter.h
|
||||||
|
|
||||||
libeek_clutter_la_CFLAGS = $(CLUTTER_CFLAGS)
|
libeek_clutter_la_CFLAGS = $(CLUTTER_CFLAGS) $(CAIRO_LIBS) $(PANGO_LIBS)
|
||||||
libeek_clutter_la_LIBADD = libeek.la $(CLUTTER_LIBS)
|
libeek_clutter_la_LIBADD = libeek.la $(CLUTTER_LIBS) $(CAIRO_LIBS) $(PANGO_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libeek_gtk_la_SOURCES = \
|
libeek_gtk_la_SOURCES = \
|
||||||
eek-gtk-keyboard.c \
|
$(srcdir)/eek-gtk-keyboard.c \
|
||||||
eek-gtk-keyboard.h \
|
$(srcdir)/eek-gtk-keyboard.h \
|
||||||
eek-drawing.h \
|
$(srcdir)/eek-drawing.h \
|
||||||
eek-drawing.c \
|
$(srcdir)/eek-drawing.c \
|
||||||
eek-gtk.h
|
$(srcdir)/eek-gtk.h
|
||||||
|
|
||||||
libeek_gtk_la_CFLAGS = $(GTK2_CFLAGS)
|
libeek_gtk_la_CFLAGS = $(GTK_CFLAGS) $(CAIRO_LIBS) $(PANGO_LIBS)
|
||||||
libeek_gtk_la_LIBADD = libeek.la $(GTK2_LIBS)
|
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(CAIRO_LIBS) $(PANGO_LIBS)
|
||||||
|
|
||||||
libeek_xkb_la_SOURCES = \
|
libeek_xkb_la_SOURCES = \
|
||||||
eek-xkb-layout.h \
|
$(srcdir)/eek-xkb-layout.h \
|
||||||
eek-xkb-layout.c
|
$(srcdir)/eek-xkb-layout.c
|
||||||
|
|
||||||
libeek_xkb_la_CFLAGS = $(GTK2_CFLAGS) $(XKB_CFLAGS)
|
libeek_xkb_la_CFLAGS = $(XKB_CFLAGS) $(GTK_CFLAGS)
|
||||||
libeek_xkb_la_LIBADD = libeek.la $(GTK2_LIBS) $(XKB_LIBS)
|
libeek_xkb_la_LIBADD = libeek.la $(XKB_LIBS) $(GTK_LIBS)
|
||||||
|
|
||||||
libeek_xkl_la_SOURCES = \
|
libeek_xkl_la_SOURCES = \
|
||||||
eek-xkl-layout.h \
|
$(srcdir)/eek-xkl-layout.h \
|
||||||
eek-xkl-layout.c
|
$(srcdir)/eek-xkl-layout.c
|
||||||
|
|
||||||
libeek_xkl_la_CFLAGS = $(GTK2_CFLAGS) $(LIBXKLAVIER_CFLAGS)
|
libeek_xkl_la_CFLAGS = $(LIBXKLAVIER_CFLAGS) $(GTK_CFLAGS)
|
||||||
libeek_xkl_la_LIBADD = libeek-xkb.la $(GTK2_LIBS) $(LIBXKLAVIER_LIBS)
|
libeek_xkl_la_LIBADD = libeek-xkb.la $(LIBXKLAVIER_LIBS) $(GTK_LIBS)
|
||||||
|
|
||||||
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
||||||
eek_HEADERS = \
|
eek_HEADERS = \
|
||||||
$(top_srcdir)/eek/eek-element.h \
|
$(srcdir)/eek-element.h \
|
||||||
$(top_srcdir)/eek/eek-container.h \
|
$(srcdir)/eek-container.h \
|
||||||
$(top_srcdir)/eek/eek-keyboard.h \
|
$(srcdir)/eek-keyboard.h \
|
||||||
$(top_srcdir)/eek/eek-section.h \
|
$(srcdir)/eek-section.h \
|
||||||
$(top_srcdir)/eek/eek-key.h \
|
$(srcdir)/eek-key.h \
|
||||||
$(top_srcdir)/eek/eek-layout.h \
|
$(srcdir)/eek-layout.h \
|
||||||
$(top_srcdir)/eek/eek-keysym.h \
|
$(srcdir)/eek-keysym.h \
|
||||||
$(top_srcdir)/eek/eek-types.h \
|
$(srcdir)/eek-types.h \
|
||||||
$(top_srcdir)/eek/eek-xkb-layout.h \
|
$(srcdir)/eek-gtk-keyboard.h \
|
||||||
$(top_srcdir)/eek/eek-xkl-layout.h \
|
$(srcdir)/eek-xkb-layout.h \
|
||||||
$(top_srcdir)/eek/eek.h \
|
$(srcdir)/eek-xkl-layout.h \
|
||||||
$(top_srcdir)/eek/eek-xkb.h \
|
$(srcdir)/eek.h \
|
||||||
$(top_srcdir)/eek/eek-xkl.h
|
$(srcdir)/eek-gtk.h \
|
||||||
|
$(srcdir)/eek-xkb.h \
|
||||||
|
$(srcdir)/eek-xkl.h
|
||||||
|
|
||||||
if HAVE_CLUTTER
|
if HAVE_CLUTTER
|
||||||
eek_HEADERS += \
|
eek_HEADERS += \
|
||||||
$(top_srcdir)/eek/eek-clutter-keyboard.h \
|
$(srcdir)/eek-clutter-keyboard.h \
|
||||||
$(top_srcdir)/eek/eek-clutter-section.h \
|
$(srcdir)/eek-clutter-section.h \
|
||||||
$(top_srcdir)/eek/eek-clutter-key.h \
|
$(srcdir)/eek-clutter-key.h \
|
||||||
$(top_srcdir)/eek/eek-clutter.h
|
$(srcdir)/eek-clutter-drawing-context.h \
|
||||||
|
$(srcdir)/eek-clutter.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
eek-keysym.c: eek-special-keysym-labels.h eek-unicode-keysym-labels.h eek-keyname-keysym-labels.h
|
eek-keysym.c: eek-special-keysym-labels.h eek-unicode-keysym-labels.h eek-keyname-keysym-labels.h
|
||||||
@ -128,11 +130,12 @@ eek-keyname-keysym-labels.h: keyname-keysym-labels.txt
|
|||||||
$(PYTHON) ./gen-keysym-labels.py keyname_keysym_labels < $< > $@
|
$(PYTHON) ./gen-keysym-labels.py keyname_keysym_labels < $< > $@
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libeek.pc \
|
pkgconfig_DATA = \
|
||||||
libeek-clutter.pc \
|
eek-$(EEK_API_VERSION).pc \
|
||||||
libeek-gtk.pc \
|
eek-clutter-$(EEK_API_VERSION).pc \
|
||||||
libeek-xkb.pc \
|
eek-gtk-$(EEK_API_VERSION).pc \
|
||||||
libeek-xkl.pc
|
eek-xkb-$(EEK_API_VERSION).pc \
|
||||||
|
eek-xkl-$(EEK_API_VERSION).pc
|
||||||
|
|
||||||
DISTCLEANFILES = \
|
DISTCLEANFILES = \
|
||||||
eek-special-keysym-labels.h \
|
eek-special-keysym-labels.h \
|
||||||
@ -145,3 +148,65 @@ EXTRA_DIST = \
|
|||||||
special-keysym-labels.txt \
|
special-keysym-labels.txt \
|
||||||
unicode-keysym-labels.txt \
|
unicode-keysym-labels.txt \
|
||||||
keyname-keysym-labels.txt
|
keyname-keysym-labels.txt
|
||||||
|
|
||||||
|
CLEANFILES =
|
||||||
|
|
||||||
|
-include $(INTROSPECTION_MAKEFILE)
|
||||||
|
INTROSPECTION_GIRS =
|
||||||
|
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir)
|
||||||
|
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_INCLUDES = GLib-2.0 GObject-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_la_SOURCES)
|
||||||
|
|
||||||
|
EekGtk@EEK_LIBRARY_SUFFIX@.gir: libeek-gtk.la Eek@EEK_LIBRARY_SUFFIX@.gir
|
||||||
|
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_la_SOURCES)
|
||||||
|
|
||||||
|
if HAVE_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_la_SOURCES)
|
||||||
|
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_la_SOURCES)
|
||||||
|
|
||||||
|
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_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_la_SOURCES)
|
||||||
|
|
||||||
|
INTROSPECTION_GIRS += \
|
||||||
|
Eek@EEK_LIBRARY_SUFFIX@.gir \
|
||||||
|
EekGtk@EEK_LIBRARY_SUFFIX@.gir \
|
||||||
|
EekXkb@EEK_LIBRARY_SUFFIX@.gir \
|
||||||
|
EekXkl@EEK_LIBRARY_SUFFIX@.gir
|
||||||
|
|
||||||
|
if HAVE_CLUTTER
|
||||||
|
INTROSPECTION_GIRS += \
|
||||||
|
EekClutter@EEK_LIBRARY_SUFFIX@.gir
|
||||||
|
endif
|
||||||
|
|
||||||
|
girdir = $(datadir)/gir-1.0
|
||||||
|
gir_DATA = $(INTROSPECTION_GIRS)
|
||||||
|
|
||||||
|
typelibdir = $(libdir)/girepository-1.0
|
||||||
|
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||||
|
|
||||||
|
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||||
|
endif
|
||||||
|
|||||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: EEK
|
Name: EEK
|
||||||
Description: A Library to Create Keyboard-like UI
|
Description: A Library to Create Keyboard-like UI
|
||||||
URL: http://github.com/ueno/eekboard
|
URL: http://ueno.github.com/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
|
Requires: gobject-2.0
|
||||||
Libs: -L${libdir} -leek
|
Libs: -L${libdir} -leek
|
||||||
Libs.private: @GOBJECT2_LIBS@
|
|
||||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-clutter
|
Name: libeek-clutter
|
||||||
Description: A Library to Create Keyboard-like UI (Clutter Support)
|
Description: A Library to Create Keyboard-like UI (Clutter Support)
|
||||||
URL: http://github.com/ueno/eekboard
|
URL: http://ueno.github.com/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -leek -leek-clutter
|
Requires: eek-@EEK_API_VERSION@ clutter-1.0
|
||||||
Libs.private: @GOBJECT2_LIBS@ @CLUTTER_LIBS@
|
Libs: -L${libdir} -leek-clutter
|
||||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||||
@ -52,6 +52,7 @@ struct _EekClutterKeyActorPrivate
|
|||||||
EekClutterDrawingContext *context;
|
EekClutterDrawingContext *context;
|
||||||
EekKey *key;
|
EekKey *key;
|
||||||
ClutterActor *texture;
|
ClutterActor *texture;
|
||||||
|
gboolean is_pressed;
|
||||||
};
|
};
|
||||||
|
|
||||||
static ClutterActor *get_texture (EekClutterKeyActor *actor);
|
static ClutterActor *get_texture (EekClutterKeyActor *actor);
|
||||||
@ -103,28 +104,6 @@ eek_clutter_key_actor_real_paint (ClutterActor *self)
|
|||||||
g_object_unref (layout);
|
g_object_unref (layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: This is a workaround for the bug
|
|
||||||
* http://bugzilla.openedhand.com/show_bug.cgi?id=2137 A developer
|
|
||||||
* says this is not a right way to solve the original problem.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
eek_clutter_key_actor_real_get_preferred_width (ClutterActor *self,
|
|
||||||
gfloat for_height,
|
|
||||||
gfloat *min_width_p,
|
|
||||||
gfloat *natural_width_p)
|
|
||||||
{
|
|
||||||
PangoLayout *layout;
|
|
||||||
|
|
||||||
/* Draw the label on the key - just to validate the glyph cache. */
|
|
||||||
layout = clutter_actor_create_pango_layout (self, NULL);
|
|
||||||
draw_key_on_layout (EEK_CLUTTER_KEY_ACTOR(self), layout);
|
|
||||||
cogl_pango_ensure_glyph_cache_for_layout (layout);
|
|
||||||
g_object_unref (layout);
|
|
||||||
|
|
||||||
CLUTTER_ACTOR_CLASS (eek_clutter_key_actor_parent_class)->
|
|
||||||
get_preferred_width (self, for_height, min_width_p, natural_width_p);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eek_clutter_key_actor_real_pressed (EekClutterKeyActor *self)
|
eek_clutter_key_actor_real_pressed (EekClutterKeyActor *self)
|
||||||
{
|
{
|
||||||
@ -181,12 +160,6 @@ eek_clutter_key_actor_class_init (EekClutterKeyActorClass *klass)
|
|||||||
sizeof (EekClutterKeyActorPrivate));
|
sizeof (EekClutterKeyActorPrivate));
|
||||||
|
|
||||||
actor_class->paint = eek_clutter_key_actor_real_paint;
|
actor_class->paint = eek_clutter_key_actor_real_paint;
|
||||||
/* FIXME: This is a workaround for the bug
|
|
||||||
* http://bugzilla.openedhand.com/show_bug.cgi?id=2137 A developer
|
|
||||||
* says this is not a right way to solve the original problem.
|
|
||||||
*/
|
|
||||||
actor_class->get_preferred_width =
|
|
||||||
eek_clutter_key_actor_real_get_preferred_width;
|
|
||||||
|
|
||||||
gobject_class->dispose = eek_clutter_key_actor_dispose;
|
gobject_class->dispose = eek_clutter_key_actor_dispose;
|
||||||
|
|
||||||
@ -223,8 +196,11 @@ on_button_press_event (ClutterActor *actor,
|
|||||||
EekClutterKeyActorPrivate *priv =
|
EekClutterKeyActorPrivate *priv =
|
||||||
EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(actor);
|
EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(actor);
|
||||||
|
|
||||||
/* priv->key will send back PRESSED event of actor. */
|
if (!priv->is_pressed) {
|
||||||
g_signal_emit_by_name (priv->key, "pressed");
|
priv->is_pressed = TRUE;
|
||||||
|
/* priv->key will send back PRESSED event of actor. */
|
||||||
|
g_signal_emit_by_name (priv->key, "pressed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -235,8 +211,27 @@ on_button_release_event (ClutterActor *actor,
|
|||||||
EekClutterKeyActorPrivate *priv =
|
EekClutterKeyActorPrivate *priv =
|
||||||
EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(actor);
|
EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(actor);
|
||||||
|
|
||||||
/* priv->key will send back RELEASED event of actor. */
|
if (priv->is_pressed) {
|
||||||
g_signal_emit_by_name (priv->key, "released");
|
priv->is_pressed = FALSE;
|
||||||
|
/* priv->key will send back RELEASED event of actor. */
|
||||||
|
g_signal_emit_by_name (priv->key, "released");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
on_leave_event (ClutterActor *actor,
|
||||||
|
ClutterEvent *event,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
EekClutterKeyActorPrivate *priv =
|
||||||
|
EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(actor);
|
||||||
|
|
||||||
|
if (priv->is_pressed) {
|
||||||
|
priv->is_pressed = FALSE;
|
||||||
|
/* priv->key will send back RELEASED event of actor. */
|
||||||
|
g_signal_emit_by_name (priv->key, "released");
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -247,12 +242,15 @@ eek_clutter_key_actor_init (EekClutterKeyActor *self)
|
|||||||
priv = self->priv = EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(self);
|
priv = self->priv = EEK_CLUTTER_KEY_ACTOR_GET_PRIVATE(self);
|
||||||
priv->key = NULL;
|
priv->key = NULL;
|
||||||
priv->texture = NULL;
|
priv->texture = NULL;
|
||||||
|
|
||||||
clutter_actor_set_reactive (CLUTTER_ACTOR(self), TRUE);
|
clutter_actor_set_reactive (CLUTTER_ACTOR(self), TRUE);
|
||||||
|
|
||||||
g_signal_connect (self, "button-press-event",
|
g_signal_connect (self, "button-press-event",
|
||||||
G_CALLBACK (on_button_press_event), NULL);
|
G_CALLBACK (on_button_press_event), NULL);
|
||||||
g_signal_connect (self, "button-release-event",
|
g_signal_connect (self, "button-release-event",
|
||||||
G_CALLBACK (on_button_release_event), NULL);
|
G_CALLBACK (on_button_release_event), NULL);
|
||||||
|
g_signal_connect (self, "leave-event",
|
||||||
|
G_CALLBACK (on_leave_event), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
|
|||||||
@ -231,23 +231,16 @@ eek_container_find (EekContainer *container,
|
|||||||
user_data);
|
user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct _FbpData
|
|
||||||
{
|
|
||||||
EekKey *key;
|
|
||||||
gint x, y;
|
|
||||||
};
|
|
||||||
typedef struct _FbpData FbpData;
|
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
compare_element_by_position (EekElement *element, gpointer user_data)
|
compare_element_by_position (EekElement *element, gpointer user_data)
|
||||||
{
|
{
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
FbpData *data = user_data;
|
EekPoint *point = user_data;
|
||||||
|
|
||||||
eek_element_get_bounds (element, &bounds);
|
eek_element_get_bounds (element, &bounds);
|
||||||
if (bounds.x <= data->x && bounds.y <= data->y &&
|
if (bounds.x <= point->x && bounds.y <= point->y &&
|
||||||
data->x <= (bounds.x + bounds.width) &&
|
point->x <= (bounds.x + bounds.width) &&
|
||||||
data->y <= (bounds.y + bounds.height))
|
point->y <= (bounds.y + bounds.height))
|
||||||
return 0;
|
return 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -258,13 +251,13 @@ eek_container_find_by_position (EekContainer *container,
|
|||||||
gdouble y)
|
gdouble y)
|
||||||
{
|
{
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
FbpData data;
|
EekPoint point;
|
||||||
|
|
||||||
g_return_val_if_fail (EEK_IS_CONTAINER(container), NULL);
|
g_return_val_if_fail (EEK_IS_CONTAINER(container), NULL);
|
||||||
eek_element_get_bounds (EEK_ELEMENT(container), &bounds);
|
eek_element_get_bounds (EEK_ELEMENT(container), &bounds);
|
||||||
data.x = x - bounds.x;
|
point.x = x - bounds.x;
|
||||||
data.y = y - bounds.y;
|
point.y = y - bounds.y;
|
||||||
return eek_container_find (container,
|
return eek_container_find (container,
|
||||||
compare_element_by_position,
|
compare_element_by_position,
|
||||||
&data);
|
&point);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,7 +90,7 @@ egf_key_callback (EekElement *element,
|
|||||||
gdouble font_size;
|
gdouble font_size;
|
||||||
guint keysym;
|
guint keysym;
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
const gchar *label;
|
gchar *label;
|
||||||
|
|
||||||
keysym = eek_key_get_keysym (key);
|
keysym = eek_key_get_keysym (key);
|
||||||
if (keysym == EEK_INVALID_KEYSYM ||
|
if (keysym == EEK_INVALID_KEYSYM ||
|
||||||
@ -99,9 +99,12 @@ egf_key_callback (EekElement *element,
|
|||||||
|
|
||||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||||
label = eek_keysym_to_string (keysym);
|
label = eek_keysym_to_string (keysym);
|
||||||
|
if (!label)
|
||||||
|
return;
|
||||||
font_size = get_font_size (label, &bounds, data->layout);
|
font_size = get_font_size (label, &bounds, data->layout);
|
||||||
if (font_size < data->font_size && font_size >= data->minimum_font_size)
|
if (font_size < data->font_size && font_size >= data->minimum_font_size)
|
||||||
data->font_size = font_size;
|
data->font_size = font_size;
|
||||||
|
g_free (label);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -214,7 +217,7 @@ eek_draw_key_label (cairo_t *cr,
|
|||||||
{
|
{
|
||||||
guint keysym;
|
guint keysym;
|
||||||
EekKeysymCategory category;
|
EekKeysymCategory category;
|
||||||
const gchar *label;
|
gchar *label;
|
||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
PangoRectangle logical_rect = { 0, };
|
PangoRectangle logical_rect = { 0, };
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
@ -242,6 +245,7 @@ eek_draw_key_label (cairo_t *cr,
|
|||||||
(bounds.width - logical_rect.width / PANGO_SCALE) / 2,
|
(bounds.width - logical_rect.width / PANGO_SCALE) / 2,
|
||||||
(bounds.height - logical_rect.height / PANGO_SCALE) / 2);
|
(bounds.height - logical_rect.height / PANGO_SCALE) / 2);
|
||||||
pango_cairo_show_layout (cr, layout);
|
pango_cairo_show_layout (cr, layout);
|
||||||
|
g_free (label);
|
||||||
g_object_unref (layout);
|
g_object_unref (layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -351,3 +351,45 @@ eek_element_get_absolute_position (EekElement *element,
|
|||||||
*x = ax;
|
*x = ax;
|
||||||
*y = ay;
|
*y = ay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eek_element_set_position:
|
||||||
|
* @element: an #EekElement
|
||||||
|
* @x: X coordinate of top left corner
|
||||||
|
* @y: Y coordinate of top left corner
|
||||||
|
*
|
||||||
|
* Set the relative position of @element.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
eek_element_set_position (EekElement *element,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y)
|
||||||
|
{
|
||||||
|
EekBounds bounds;
|
||||||
|
|
||||||
|
eek_element_get_bounds (element, &bounds);
|
||||||
|
bounds.x = x;
|
||||||
|
bounds.y = y;
|
||||||
|
eek_element_set_bounds (element, &bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eek_element_set_size:
|
||||||
|
* @element: an #EekElement
|
||||||
|
* @width: width of @element
|
||||||
|
* @height: height of @element
|
||||||
|
*
|
||||||
|
* Set the size of @element.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
eek_element_set_size (EekElement *element,
|
||||||
|
gdouble width,
|
||||||
|
gdouble height)
|
||||||
|
{
|
||||||
|
EekBounds bounds;
|
||||||
|
|
||||||
|
eek_element_get_bounds (element, &bounds);
|
||||||
|
bounds.width = width;
|
||||||
|
bounds.height = height;
|
||||||
|
eek_element_set_bounds (element, &bounds);
|
||||||
|
}
|
||||||
|
|||||||
@ -81,6 +81,13 @@ void eek_element_set_bounds (EekElement *element,
|
|||||||
void eek_element_get_bounds (EekElement *element,
|
void eek_element_get_bounds (EekElement *element,
|
||||||
EekBounds *bounds);
|
EekBounds *bounds);
|
||||||
|
|
||||||
|
void eek_element_set_position (EekElement *element,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y);
|
||||||
|
void eek_element_set_size (EekElement *element,
|
||||||
|
gdouble width,
|
||||||
|
gdouble height);
|
||||||
|
|
||||||
void eek_element_get_absolute_position (EekElement *element,
|
void eek_element_get_absolute_position (EekElement *element,
|
||||||
gdouble *x,
|
gdouble *x,
|
||||||
gdouble *y);
|
gdouble *y);
|
||||||
|
|||||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-gtk
|
Name: libeek-gtk
|
||||||
Description: A Library to Create Keyboard-like UI (GTK Support)
|
Description: A Library to Create Keyboard-like UI (GTK Support)
|
||||||
URL: http://github.com/ueno/eekboard
|
URL: http://ueno.github.com/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -leek -leek-gtk
|
Requires: eek-@EEK_API_VERSION@ gtk+-@GTK_API_VERSION@
|
||||||
Libs.private: @GOBJECT2_LIBS@ @GTK2_LIBS@
|
Libs: -L${libdir} -leek-gtk
|
||||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||||
@ -23,6 +23,7 @@
|
|||||||
* @short_description: #EekKeyboard that can be converted into a #GtkWidget
|
* @short_description: #EekKeyboard that can be converted into a #GtkWidget
|
||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -40,27 +41,32 @@ G_DEFINE_TYPE (EekGtkKeyboard, eek_gtk_keyboard, EEK_TYPE_KEYBOARD);
|
|||||||
#define EEK_GTK_KEYBOARD_GET_PRIVATE(obj) \
|
#define EEK_GTK_KEYBOARD_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardPrivate))
|
||||||
|
|
||||||
#define SCALE 1.5
|
enum {
|
||||||
|
KEY_SURFACE_NORMAL = 0,
|
||||||
|
KEY_SURFACE_LARGE,
|
||||||
|
KEY_SURFACE_LAST
|
||||||
|
};
|
||||||
|
|
||||||
|
static const gdouble key_surface_scale[KEY_SURFACE_LAST] = {
|
||||||
|
1.0,
|
||||||
|
1.5
|
||||||
|
};
|
||||||
|
|
||||||
struct _EekGtkKeyboardPrivate
|
struct _EekGtkKeyboardPrivate
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
|
||||||
/* pixmap of entire keyboard (for expose event) */
|
cairo_surface_t *keyboard_surface;
|
||||||
GdkPixmap *pixmap;
|
GHashTable *key_surfaces;
|
||||||
|
|
||||||
/* mapping from outline pointer to pixmap */
|
|
||||||
GHashTable *outline_textures;
|
|
||||||
|
|
||||||
/* mapping from outline pointer to large pixmap */
|
|
||||||
GHashTable *large_outline_textures;
|
|
||||||
|
|
||||||
PangoFontDescription *fonts[EEK_KEYSYM_CATEGORY_LAST];
|
PangoFontDescription *fonts[EEK_KEYSYM_CATEGORY_LAST];
|
||||||
|
|
||||||
gdouble scale;
|
gdouble scale;
|
||||||
|
|
||||||
|
EekKey *key;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void prepare_keyboard_pixmap (EekGtkKeyboard *keyboard);
|
static void prepare_keyboard_surface (EekGtkKeyboard *keyboard);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eek_gtk_keyboard_real_set_keysym_index (EekKeyboard *self,
|
eek_gtk_keyboard_real_set_keysym_index (EekKeyboard *self,
|
||||||
@ -76,18 +82,26 @@ eek_gtk_keyboard_real_set_keysym_index (EekKeyboard *self,
|
|||||||
EekGtkKeyboard *keyboard = EEK_GTK_KEYBOARD(self);
|
EekGtkKeyboard *keyboard = EEK_GTK_KEYBOARD(self);
|
||||||
EekGtkKeyboardPrivate *priv =
|
EekGtkKeyboardPrivate *priv =
|
||||||
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
|
GtkStyle *style;
|
||||||
GtkStateType state;
|
GtkStateType state;
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
|
cairo_t *cr;
|
||||||
|
|
||||||
prepare_keyboard_pixmap (keyboard);
|
if (!priv->widget || !gtk_widget_get_realized (priv->widget))
|
||||||
state = gtk_widget_get_state (GTK_WIDGET (priv->widget));
|
return;
|
||||||
gtk_widget_get_allocation (GTK_WIDGET (priv->widget), &allocation);
|
|
||||||
gdk_draw_drawable (gtk_widget_get_window (priv->widget),
|
prepare_keyboard_surface (keyboard);
|
||||||
gtk_widget_get_style (priv->widget)->fg_gc[state],
|
gtk_widget_get_allocation (priv->widget, &allocation);
|
||||||
priv->pixmap,
|
|
||||||
0, 0,
|
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (priv->widget)));
|
||||||
0, 0,
|
style = gtk_widget_get_style (priv->widget);
|
||||||
allocation.width, allocation.height);
|
state = gtk_widget_get_state (priv->widget);
|
||||||
|
gdk_cairo_set_source_color (cr, &style->fg[state]);
|
||||||
|
|
||||||
|
cairo_set_source_surface (cr, priv->keyboard_surface, 0, 0);
|
||||||
|
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
|
||||||
|
cairo_fill (cr);
|
||||||
|
cairo_destroy (cr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,11 +123,11 @@ eek_gtk_keyboard_finalize (GObject *object)
|
|||||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(object);
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(object);
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_hash_table_unref (priv->outline_textures);
|
g_hash_table_unref (priv->key_surfaces);
|
||||||
g_hash_table_unref (priv->large_outline_textures);
|
|
||||||
|
|
||||||
for (i = 0; i < EEK_KEYSYM_CATEGORY_LAST; i++)
|
for (i = 0; i < EEK_KEYSYM_CATEGORY_LAST; i++)
|
||||||
pango_font_description_free (priv->fonts[i]);
|
pango_font_description_free (priv->fonts[i]);
|
||||||
|
G_OBJECT_CLASS (eek_gtk_keyboard_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -130,6 +144,17 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
|||||||
gobject_class->finalize = eek_gtk_keyboard_finalize;
|
gobject_class->finalize = eek_gtk_keyboard_finalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
key_surface_free (gpointer user_data)
|
||||||
|
{
|
||||||
|
cairo_surface_t **key_surfaces = user_data;
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
for (i = 0; i < KEY_SURFACE_LAST; i++)
|
||||||
|
cairo_surface_destroy (key_surfaces[i]);
|
||||||
|
g_slice_free1 (sizeof (cairo_surface_t *) * KEY_SURFACE_LAST, key_surfaces);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
||||||
{
|
{
|
||||||
@ -137,19 +162,15 @@ eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
|||||||
|
|
||||||
priv = self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
priv = self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||||
priv->widget = NULL;
|
priv->widget = NULL;
|
||||||
priv->pixmap = NULL;
|
priv->keyboard_surface = NULL;
|
||||||
priv->outline_textures =
|
priv->key_surfaces =
|
||||||
g_hash_table_new_full (g_direct_hash,
|
g_hash_table_new_full (g_direct_hash,
|
||||||
g_direct_equal,
|
g_direct_equal,
|
||||||
NULL,
|
NULL,
|
||||||
g_object_unref);
|
key_surface_free);
|
||||||
priv->large_outline_textures =
|
|
||||||
g_hash_table_new_full (g_direct_hash,
|
|
||||||
g_direct_equal,
|
|
||||||
NULL,
|
|
||||||
g_object_unref);
|
|
||||||
memset (priv->fonts, 0, sizeof priv->fonts);
|
memset (priv->fonts, 0, sizeof priv->fonts);
|
||||||
priv->scale = 1.0;
|
priv->scale = 1.0;
|
||||||
|
priv->key = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -171,6 +192,9 @@ struct _DrawingContext
|
|||||||
};
|
};
|
||||||
typedef struct _DrawingContext DrawingContext;
|
typedef struct _DrawingContext DrawingContext;
|
||||||
|
|
||||||
|
static void on_key_pressed (EekKey *key, gpointer user_data);
|
||||||
|
static void on_key_released (EekKey *key, gpointer user_data);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prepare_keyboard_pixmap_key_callback (EekElement *element,
|
prepare_keyboard_pixmap_key_callback (EekElement *element,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@ -181,31 +205,44 @@ prepare_keyboard_pixmap_key_callback (EekElement *element,
|
|||||||
EekKey *key = EEK_KEY(element);
|
EekKey *key = EEK_KEY(element);
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
EekOutline *outline;
|
EekOutline *outline;
|
||||||
GdkPixmap *texture;
|
cairo_surface_t **key_surfaces;
|
||||||
|
|
||||||
eek_element_get_bounds (element, &bounds);
|
eek_element_get_bounds (element, &bounds);
|
||||||
|
|
||||||
outline = eek_key_get_outline (key);
|
g_signal_connect (key, "pressed", G_CALLBACK(on_key_pressed),
|
||||||
texture = g_hash_table_lookup (priv->outline_textures, outline);
|
context->keyboard);
|
||||||
if (!texture) {
|
g_signal_connect (key, "released", G_CALLBACK(on_key_released),
|
||||||
cairo_t *cr;
|
context->keyboard);
|
||||||
|
|
||||||
texture =
|
outline = eek_key_get_outline (key);
|
||||||
gdk_pixmap_new (gtk_widget_get_window (GTK_WIDGET (priv->widget)),
|
key_surfaces = g_hash_table_lookup (priv->key_surfaces, outline);
|
||||||
bounds.width, bounds.height, -1);
|
if (!key_surfaces) {
|
||||||
cr = gdk_cairo_create (GDK_DRAWABLE (texture));
|
cairo_t *cr;
|
||||||
gdk_cairo_set_source_color (cr, context->bg);
|
gint i;
|
||||||
cairo_rectangle (cr, 0, 0, bounds.width, bounds.height);
|
|
||||||
gdk_cairo_set_source_color (cr, context->fg);
|
key_surfaces = g_slice_alloc (sizeof (cairo_surface_t *) *
|
||||||
eek_draw_outline (cr, outline);
|
KEY_SURFACE_LAST);
|
||||||
cairo_destroy (cr);
|
for (i = 0; i < KEY_SURFACE_LAST; i++) {
|
||||||
g_hash_table_insert (priv->outline_textures, outline, texture);
|
gdouble scale = key_surface_scale[i];
|
||||||
|
key_surfaces[i] = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||||
|
bounds.width * scale,
|
||||||
|
bounds.height * scale);
|
||||||
|
cr = cairo_create (key_surfaces[i]);
|
||||||
|
cairo_scale (cr, priv->scale * scale, priv->scale * scale);
|
||||||
|
gdk_cairo_set_source_color (cr, context->bg);
|
||||||
|
cairo_rectangle (cr, 0, 0, bounds.width, bounds.height);
|
||||||
|
gdk_cairo_set_source_color (cr, context->fg);
|
||||||
|
eek_draw_outline (cr, outline);
|
||||||
|
cairo_destroy (cr);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_hash_table_insert (priv->key_surfaces, outline, key_surfaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_save (context->cr);
|
cairo_save (context->cr);
|
||||||
cairo_translate (context->cr, bounds.x, bounds.y);
|
|
||||||
|
|
||||||
gdk_cairo_set_source_pixmap (context->cr, texture, 0, 0);
|
cairo_translate (context->cr, bounds.x, bounds.y);
|
||||||
|
cairo_set_source_surface (context->cr, key_surfaces[0], 0, 0);
|
||||||
cairo_rectangle (context->cr, 0, 0, bounds.width, bounds.height);
|
cairo_rectangle (context->cr, 0, 0, bounds.width, bounds.height);
|
||||||
cairo_fill (context->cr);
|
cairo_fill (context->cr);
|
||||||
|
|
||||||
@ -222,12 +259,15 @@ prepare_keyboard_pixmap_section_callback (EekElement *element,
|
|||||||
{
|
{
|
||||||
DrawingContext *context = user_data;
|
DrawingContext *context = user_data;
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
|
gint angle;
|
||||||
|
|
||||||
eek_element_get_bounds (element, &bounds);
|
eek_element_get_bounds (element, &bounds);
|
||||||
|
angle = eek_section_get_angle (EEK_SECTION(element));
|
||||||
cairo_save (context->cr);
|
cairo_save (context->cr);
|
||||||
cairo_translate (context->cr,
|
cairo_translate (context->cr,
|
||||||
bounds.x,
|
bounds.x,
|
||||||
bounds.y);
|
bounds.y);
|
||||||
|
cairo_rotate (context->cr, angle * M_PI / 180);
|
||||||
eek_container_foreach_child (EEK_CONTAINER(element),
|
eek_container_foreach_child (EEK_CONTAINER(element),
|
||||||
prepare_keyboard_pixmap_key_callback,
|
prepare_keyboard_pixmap_key_callback,
|
||||||
context);
|
context);
|
||||||
@ -235,48 +275,119 @@ prepare_keyboard_pixmap_section_callback (EekElement *element,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drawing_context_init (DrawingContext *context, EekGtkKeyboard *keyboard)
|
drawing_context_init (DrawingContext *context,
|
||||||
|
cairo_t *cr,
|
||||||
|
EekGtkKeyboard *keyboard)
|
||||||
{
|
{
|
||||||
EekGtkKeyboardPrivate *priv = keyboard->priv;
|
EekGtkKeyboardPrivate *priv = keyboard->priv;
|
||||||
|
GtkStyle *style;
|
||||||
GtkStateType state;
|
GtkStateType state;
|
||||||
|
|
||||||
state = gtk_widget_get_state (GTK_WIDGET (priv->widget));
|
context->cr = cr;
|
||||||
context->keyboard = keyboard;
|
context->keyboard = keyboard;
|
||||||
context->fg = >k_widget_get_style (GTK_WIDGET (priv->widget))->fg[state];
|
|
||||||
context->bg = >k_widget_get_style (GTK_WIDGET (priv->widget))->bg[state];
|
style = gtk_widget_get_style (priv->widget);
|
||||||
|
state = gtk_widget_get_state (priv->widget);
|
||||||
|
context->fg = &style->fg[state];
|
||||||
|
context->bg = &style->bg[state];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prepare_keyboard_pixmap (EekGtkKeyboard *keyboard)
|
prepare_keyboard_surface (EekGtkKeyboard *keyboard)
|
||||||
{
|
{
|
||||||
EekGtkKeyboardPrivate *priv = keyboard->priv;
|
EekGtkKeyboardPrivate *priv = keyboard->priv;
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
|
GtkStyle *style;
|
||||||
GtkStateType state;
|
GtkStateType state;
|
||||||
DrawingContext context;
|
DrawingContext context;
|
||||||
|
cairo_t *cr;
|
||||||
|
|
||||||
gtk_widget_get_allocation (GTK_WIDGET (priv->widget), &allocation);
|
gtk_widget_get_allocation (priv->widget, &allocation);
|
||||||
priv->pixmap =
|
priv->keyboard_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||||
gdk_pixmap_new (gtk_widget_get_window (GTK_WIDGET (priv->widget)),
|
allocation.width,
|
||||||
allocation.width, allocation.height, -1);
|
allocation.height);
|
||||||
|
|
||||||
/* blank background */
|
/* blank background */
|
||||||
state = gtk_widget_get_state (GTK_WIDGET (priv->widget));
|
cr = cairo_create (priv->keyboard_surface);
|
||||||
gdk_draw_rectangle
|
cairo_scale (cr, priv->scale, priv->scale);
|
||||||
(priv->pixmap,
|
|
||||||
gtk_widget_get_style (GTK_WIDGET(priv->widget))->base_gc[state],
|
style = gtk_widget_get_style (priv->widget);
|
||||||
TRUE,
|
state = gtk_widget_get_state (priv->widget);
|
||||||
0, 0, allocation.width, allocation.height);
|
gdk_cairo_set_source_color (cr, &style->base[state]);
|
||||||
|
|
||||||
|
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
|
||||||
|
cairo_fill (cr);
|
||||||
|
|
||||||
/* draw sections on the canvas */
|
/* draw sections on the canvas */
|
||||||
drawing_context_init (&context, keyboard);
|
drawing_context_init (&context, cr, keyboard);
|
||||||
context.cr = gdk_cairo_create (GDK_DRAWABLE (priv->pixmap));
|
|
||||||
cairo_scale (context.cr, priv->scale, priv->scale);
|
|
||||||
eek_container_foreach_child (EEK_CONTAINER(keyboard),
|
eek_container_foreach_child (EEK_CONTAINER(keyboard),
|
||||||
prepare_keyboard_pixmap_section_callback,
|
prepare_keyboard_pixmap_section_callback,
|
||||||
&context);
|
&context);
|
||||||
cairo_destroy (context.cr);
|
cairo_destroy (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
redraw_keyboard (cairo_t *cr,
|
||||||
|
EekGtkKeyboard *keyboard,
|
||||||
|
gint x,
|
||||||
|
gint y,
|
||||||
|
gint width,
|
||||||
|
gint height)
|
||||||
|
{
|
||||||
|
EekGtkKeyboardPrivate *priv =
|
||||||
|
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
|
GtkStyle *style;
|
||||||
|
GtkStateType state;
|
||||||
|
|
||||||
|
style = gtk_widget_get_style (priv->widget);
|
||||||
|
state = gtk_widget_get_state (priv->widget);
|
||||||
|
|
||||||
|
if (!priv->keyboard_surface) {
|
||||||
|
PangoFontDescription *base_font;
|
||||||
|
PangoContext *context;
|
||||||
|
PangoLayout *layout;
|
||||||
|
|
||||||
|
/* compute font sizes which fit in each key shape */
|
||||||
|
context = gtk_widget_get_pango_context (priv->widget);
|
||||||
|
layout = pango_layout_new (context);
|
||||||
|
base_font = style->font_desc;
|
||||||
|
pango_layout_set_font_description (layout, base_font);
|
||||||
|
eek_get_fonts (EEK_KEYBOARD(keyboard), layout, priv->fonts);
|
||||||
|
g_object_unref (layout);
|
||||||
|
|
||||||
|
prepare_keyboard_surface (keyboard);
|
||||||
|
}
|
||||||
|
g_return_val_if_fail (priv->keyboard_surface, FALSE);
|
||||||
|
|
||||||
|
gdk_cairo_set_source_color (cr, &style->fg[state]);
|
||||||
|
|
||||||
|
cairo_set_source_surface (cr,
|
||||||
|
priv->keyboard_surface,
|
||||||
|
x, y);
|
||||||
|
cairo_rectangle (cr, x, y, width, height);
|
||||||
|
cairo_fill (cr);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if GTK_CHECK_VERSION (2, 91, 2)
|
||||||
|
static gboolean
|
||||||
|
on_draw (GtkWidget *widget,
|
||||||
|
cairo_t *cr,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
EekGtkKeyboard *keyboard = user_data;
|
||||||
|
EekGtkKeyboardPrivate *priv =
|
||||||
|
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
|
GtkAllocation allocation;
|
||||||
|
|
||||||
|
g_return_val_if_fail (widget == priv->widget, FALSE);
|
||||||
|
|
||||||
|
gtk_widget_get_allocation (priv->widget, &allocation);
|
||||||
|
|
||||||
|
redraw_keyboard (cr, keyboard, 0, 0, allocation.width, allocation.height);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#else
|
||||||
static gboolean
|
static gboolean
|
||||||
on_expose_event (GtkWidget *widget,
|
on_expose_event (GtkWidget *widget,
|
||||||
GdkEventExpose *event,
|
GdkEventExpose *event,
|
||||||
@ -285,159 +396,179 @@ on_expose_event (GtkWidget *widget,
|
|||||||
EekGtkKeyboard *keyboard = user_data;
|
EekGtkKeyboard *keyboard = user_data;
|
||||||
EekGtkKeyboardPrivate *priv =
|
EekGtkKeyboardPrivate *priv =
|
||||||
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
GtkStateType state = gtk_widget_get_state (widget);
|
cairo_t *cr;
|
||||||
|
|
||||||
if (!priv->pixmap) {
|
g_return_val_if_fail (widget == priv->widget, FALSE);
|
||||||
/* compute font sizes which fit in each key shape */
|
|
||||||
PangoFontDescription *base_font;
|
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (priv->widget)));
|
||||||
PangoContext *context;
|
redraw_keyboard (cr, keyboard,
|
||||||
PangoLayout *layout;
|
event->area.x, event->area.y,
|
||||||
|
event->area.width, event->area.height);
|
||||||
|
cairo_destroy (cr);
|
||||||
|
|
||||||
context = gtk_widget_get_pango_context (priv->widget);
|
|
||||||
layout = pango_layout_new (context);
|
|
||||||
base_font = gtk_widget_get_style (priv->widget)->font_desc;
|
|
||||||
pango_layout_set_font_description (layout, base_font);
|
|
||||||
eek_get_fonts (EEK_KEYBOARD(keyboard), layout, priv->fonts);
|
|
||||||
|
|
||||||
prepare_keyboard_pixmap (keyboard);
|
|
||||||
}
|
|
||||||
g_return_val_if_fail (priv->pixmap, FALSE);
|
|
||||||
|
|
||||||
gdk_draw_drawable (gtk_widget_get_window (widget),
|
|
||||||
gtk_widget_get_style (widget)->fg_gc[state],
|
|
||||||
priv->pixmap,
|
|
||||||
event->area.x, event->area.y,
|
|
||||||
event->area.x, event->area.y,
|
|
||||||
event->area.width, event->area.height);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
key_enlarge (EekGtkKeyboard *keyboard, EekKey *key)
|
redraw_key (cairo_t *cr,
|
||||||
|
EekKey *key,
|
||||||
|
gint key_surface_type,
|
||||||
|
EekGtkKeyboard *keyboard)
|
||||||
{
|
{
|
||||||
EekGtkKeyboardPrivate *priv =
|
EekGtkKeyboardPrivate *priv =
|
||||||
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
EekOutline *outline;
|
EekOutline *outline;
|
||||||
gdouble ax, ay;
|
gdouble x, y;
|
||||||
GdkPixmap *pixmap, *texture;
|
int width, height;
|
||||||
DrawingContext context;
|
GtkStyle *style;
|
||||||
GtkStateType state;
|
GtkStateType state;
|
||||||
cairo_t *cr;
|
cairo_surface_t **key_surfaces, *large_surface;
|
||||||
|
|
||||||
drawing_context_init (&context, keyboard);
|
g_return_if_fail (priv->keyboard_surface);
|
||||||
|
|
||||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
|
||||||
eek_element_get_absolute_position (EEK_ELEMENT(key), &ax, &ay);
|
|
||||||
|
|
||||||
outline = eek_key_get_outline (key);
|
outline = eek_key_get_outline (key);
|
||||||
texture = g_hash_table_lookup (priv->large_outline_textures, outline);
|
key_surfaces = g_hash_table_lookup (priv->key_surfaces, outline);
|
||||||
if (!texture) {
|
g_return_if_fail (key_surfaces);
|
||||||
texture =
|
|
||||||
gdk_pixmap_new (gtk_widget_get_window (GTK_WIDGET (priv->widget)),
|
large_surface = key_surfaces[KEY_SURFACE_LARGE];
|
||||||
bounds.width * SCALE, bounds.height * SCALE, -1);
|
width = cairo_image_surface_get_width (large_surface);
|
||||||
cr = gdk_cairo_create (GDK_DRAWABLE (texture));
|
height = cairo_image_surface_get_height (large_surface);
|
||||||
cairo_scale (cr, SCALE, SCALE);
|
|
||||||
gdk_cairo_set_source_color (cr, context.bg);
|
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||||
cairo_rectangle (cr, 0, 0, bounds.width, bounds.height);
|
eek_element_get_absolute_position (EEK_ELEMENT(key), &x, &y);
|
||||||
gdk_cairo_set_source_color (cr, context.fg);
|
|
||||||
eek_draw_outline (cr, outline);
|
x -= (width - bounds.width) / 2;
|
||||||
cairo_destroy (cr);
|
y -= (height - bounds.height) / 2;
|
||||||
g_hash_table_insert (priv->large_outline_textures, outline, texture);
|
|
||||||
|
style = gtk_widget_get_style (priv->widget);
|
||||||
|
state = gtk_widget_get_state (priv->widget);
|
||||||
|
gdk_cairo_set_source_color (cr, &style->fg[state]);
|
||||||
|
|
||||||
|
switch (key_surface_type) {
|
||||||
|
case KEY_SURFACE_NORMAL:
|
||||||
|
cairo_set_source_surface (cr, priv->keyboard_surface, 0, 0);
|
||||||
|
cairo_scale (cr, priv->scale, priv->scale);
|
||||||
|
cairo_rectangle (cr, x, y, width, height);
|
||||||
|
cairo_fill (cr);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KEY_SURFACE_LARGE:
|
||||||
|
cairo_scale (cr, priv->scale, priv->scale);
|
||||||
|
cairo_set_source_surface (cr, large_surface, x, y);
|
||||||
|
cairo_rectangle (cr, x, y, width, height);
|
||||||
|
cairo_fill (cr);
|
||||||
|
|
||||||
|
cairo_move_to (cr, x, y);
|
||||||
|
gdk_cairo_set_source_color (cr, &style->fg[state]);
|
||||||
|
|
||||||
|
cairo_scale (cr,
|
||||||
|
key_surface_scale[KEY_SURFACE_LARGE],
|
||||||
|
key_surface_scale[KEY_SURFACE_LARGE]);
|
||||||
|
eek_draw_key_label (cr, key, priv->fonts);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pixmap =
|
|
||||||
gdk_pixmap_new (gtk_widget_get_window (GTK_WIDGET (priv->widget)),
|
|
||||||
bounds.width * SCALE * priv->scale,
|
|
||||||
bounds.height * SCALE * priv->scale, -1);
|
|
||||||
cr = gdk_cairo_create (GDK_DRAWABLE (pixmap));
|
|
||||||
cairo_scale (cr, priv->scale, priv->scale);
|
|
||||||
gdk_cairo_set_source_pixmap (cr, texture, 0, 0);
|
|
||||||
cairo_rectangle (cr, 0, 0, bounds.width * SCALE, bounds.height * SCALE);
|
|
||||||
cairo_fill (cr);
|
|
||||||
|
|
||||||
cairo_move_to (cr, 0, 0);
|
|
||||||
cairo_scale (cr, SCALE, SCALE);
|
|
||||||
gdk_cairo_set_source_color (cr, context.fg);
|
|
||||||
eek_draw_key_label (cr, key, priv->fonts);
|
|
||||||
cairo_destroy (cr);
|
|
||||||
|
|
||||||
state = gtk_widget_get_state (GTK_WIDGET (priv->widget));
|
|
||||||
gdk_draw_drawable (gtk_widget_get_window (priv->widget),
|
|
||||||
gtk_widget_get_style (priv->widget)->fg_gc[state],
|
|
||||||
pixmap,
|
|
||||||
0, 0,
|
|
||||||
(ax - (bounds.width * SCALE - bounds.width) / 2) *
|
|
||||||
priv->scale,
|
|
||||||
(ay - (bounds.height * SCALE - bounds.height) / 2) *
|
|
||||||
priv->scale,
|
|
||||||
bounds.width * SCALE * priv->scale,
|
|
||||||
bounds.height * SCALE * priv->scale);
|
|
||||||
g_object_unref (pixmap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
key_shrink (EekGtkKeyboard *keyboard, EekKey *key)
|
on_key_pressed (EekKey *key, gpointer user_data)
|
||||||
{
|
{
|
||||||
EekGtkKeyboardPrivate *priv =
|
EekGtkKeyboard *keyboard = user_data;
|
||||||
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
EekBounds bounds;
|
cairo_t *cr;
|
||||||
gdouble ax, ay;
|
|
||||||
GtkStateType state;
|
|
||||||
|
|
||||||
g_return_if_fail (priv->pixmap);
|
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (priv->widget)));
|
||||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
redraw_key (cr, key, KEY_SURFACE_LARGE, keyboard);
|
||||||
eek_element_get_absolute_position (EEK_ELEMENT(key), &ax, &ay);
|
cairo_destroy (cr);
|
||||||
state = gtk_widget_get_state (GTK_WIDGET (priv->widget));
|
|
||||||
|
|
||||||
ax -= (bounds.width * SCALE - bounds.width) / 2;
|
priv->key = key;
|
||||||
ay -= (bounds.height * SCALE - bounds.height) / 2;
|
}
|
||||||
|
|
||||||
gdk_draw_drawable (gtk_widget_get_window (priv->widget),
|
static void
|
||||||
gtk_widget_get_style (priv->widget)->fg_gc[state],
|
on_key_released (EekKey *key, gpointer user_data)
|
||||||
priv->pixmap,
|
{
|
||||||
ax * priv->scale, ay * priv->scale,
|
EekGtkKeyboard *keyboard = user_data;
|
||||||
ax * priv->scale, ay * priv->scale,
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
bounds.width * SCALE * priv->scale,
|
cairo_t *cr;
|
||||||
bounds.height * SCALE * priv->scale);
|
|
||||||
|
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (priv->widget)));
|
||||||
|
if (priv->key) {
|
||||||
|
redraw_key (cr, priv->key, KEY_SURFACE_NORMAL, keyboard);
|
||||||
|
priv->key = NULL;
|
||||||
|
}
|
||||||
|
redraw_key (cr, key, KEY_SURFACE_NORMAL, keyboard);
|
||||||
|
cairo_destroy (cr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
press_key (EekGtkKeyboard *keyboard, EekKey *key)
|
||||||
|
{
|
||||||
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
|
if (priv->key != key)
|
||||||
|
g_signal_emit_by_name (key, "pressed", keyboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
release_key (EekGtkKeyboard *keyboard)
|
||||||
|
{
|
||||||
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
|
|
||||||
|
if (priv->key)
|
||||||
|
g_signal_emit_by_name (priv->key, "released", keyboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
on_key_event (GtkWidget *widget,
|
||||||
|
GdkEventKey *event,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
EekGtkKeyboard *keyboard = user_data;
|
||||||
|
EekKey *key;
|
||||||
|
|
||||||
|
key = eek_keyboard_find_key_by_keycode (EEK_KEYBOARD(keyboard),
|
||||||
|
event->hardware_keycode);
|
||||||
|
if (!key)
|
||||||
|
return FALSE;
|
||||||
|
switch (event->type) {
|
||||||
|
case GDK_KEY_PRESS:
|
||||||
|
press_key (keyboard, key);
|
||||||
|
return TRUE;
|
||||||
|
case GDK_KEY_RELEASE:
|
||||||
|
release_key (keyboard);
|
||||||
|
return TRUE;
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
on_button_event (GtkWidget *widget,
|
on_button_event (GtkWidget *widget,
|
||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
EekElement *keyboard = user_data, *section, *key;
|
EekGtkKeyboard *keyboard = EEK_GTK_KEYBOARD(user_data);
|
||||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
EekBounds bounds;
|
EekKey *key;
|
||||||
gdouble x, y;
|
gdouble x, y;
|
||||||
|
|
||||||
x = (gdouble)event->x / priv->scale;
|
x = (gdouble)event->x / priv->scale;
|
||||||
y = (gdouble)event->y / priv->scale;
|
y = (gdouble)event->y / priv->scale;
|
||||||
section = eek_container_find_by_position (EEK_CONTAINER(keyboard), x, y);
|
key = eek_keyboard_find_key_by_position (EEK_KEYBOARD(keyboard), x, y);
|
||||||
if (section) {
|
if (key)
|
||||||
eek_element_get_bounds (keyboard, &bounds);
|
switch (event->type) {
|
||||||
x -= bounds.x;
|
case GDK_BUTTON_PRESS:
|
||||||
y -= bounds.y;
|
press_key (EEK_GTK_KEYBOARD(keyboard), key);
|
||||||
key = eek_container_find_by_position (EEK_CONTAINER(section),
|
return TRUE;
|
||||||
x,
|
case GDK_BUTTON_RELEASE:
|
||||||
y);
|
release_key (EEK_GTK_KEYBOARD(keyboard));
|
||||||
if (key)
|
return TRUE;
|
||||||
switch (event->type) {
|
default:
|
||||||
case GDK_BUTTON_PRESS:
|
return FALSE;
|
||||||
key_enlarge (EEK_GTK_KEYBOARD(keyboard), EEK_KEY(key));
|
}
|
||||||
g_signal_emit_by_name (keyboard, "key-pressed", key);
|
|
||||||
return TRUE;
|
|
||||||
case GDK_BUTTON_RELEASE:
|
|
||||||
key_shrink (EEK_GTK_KEYBOARD(keyboard), EEK_KEY(key));
|
|
||||||
g_signal_emit_by_name (keyboard, "key-released", key);
|
|
||||||
return TRUE;
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_size_allocate (GtkWidget *widget,
|
on_size_allocate (GtkWidget *widget,
|
||||||
GtkAllocation *allocation,
|
GtkAllocation *allocation,
|
||||||
@ -447,12 +578,10 @@ on_size_allocate (GtkWidget *widget,
|
|||||||
EekGtkKeyboardPrivate *priv =
|
EekGtkKeyboardPrivate *priv =
|
||||||
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||||
EekBounds bounds;
|
EekBounds bounds;
|
||||||
GdkPixmap *pixmap;
|
|
||||||
|
|
||||||
if (priv->pixmap) {
|
if (priv->keyboard_surface) {
|
||||||
pixmap = priv->pixmap;
|
cairo_surface_destroy (priv->keyboard_surface);
|
||||||
priv->pixmap = NULL;
|
priv->keyboard_surface = NULL;
|
||||||
g_object_unref (pixmap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
|
eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
|
||||||
@ -460,6 +589,7 @@ on_size_allocate (GtkWidget *widget,
|
|||||||
allocation->width / bounds.width :
|
allocation->width / bounds.width :
|
||||||
allocation->height / bounds.height;
|
allocation->height / bounds.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
eek_gtk_keyboard_get_widget (EekGtkKeyboard *keyboard)
|
eek_gtk_keyboard_get_widget (EekGtkKeyboard *keyboard)
|
||||||
{
|
{
|
||||||
@ -474,12 +604,22 @@ eek_gtk_keyboard_get_widget (EekGtkKeyboard *keyboard)
|
|||||||
gtk_widget_set_events (priv->widget,
|
gtk_widget_set_events (priv->widget,
|
||||||
GDK_EXPOSURE_MASK |
|
GDK_EXPOSURE_MASK |
|
||||||
GDK_KEY_PRESS_MASK |
|
GDK_KEY_PRESS_MASK |
|
||||||
|
GDK_KEY_RELEASE_MASK |
|
||||||
GDK_BUTTON_PRESS_MASK |
|
GDK_BUTTON_PRESS_MASK |
|
||||||
GDK_BUTTON_RELEASE_MASK);
|
GDK_BUTTON_RELEASE_MASK);
|
||||||
|
#if GTK_CHECK_VERSION (2, 91, 2)
|
||||||
|
g_signal_connect (priv->widget, "draw",
|
||||||
|
G_CALLBACK (on_draw), keyboard);
|
||||||
|
#else
|
||||||
g_signal_connect (priv->widget, "expose_event",
|
g_signal_connect (priv->widget, "expose_event",
|
||||||
G_CALLBACK (on_expose_event), keyboard);
|
G_CALLBACK (on_expose_event), keyboard);
|
||||||
|
#endif
|
||||||
g_signal_connect (priv->widget, "size-allocate",
|
g_signal_connect (priv->widget, "size-allocate",
|
||||||
G_CALLBACK (on_size_allocate), keyboard);
|
G_CALLBACK (on_size_allocate), keyboard);
|
||||||
|
g_signal_connect (priv->widget, "key-press-event",
|
||||||
|
G_CALLBACK (on_key_event), keyboard);
|
||||||
|
g_signal_connect (priv->widget, "key-release-event",
|
||||||
|
G_CALLBACK (on_key_event), keyboard);
|
||||||
g_signal_connect (priv->widget, "button-press-event",
|
g_signal_connect (priv->widget, "button-press-event",
|
||||||
G_CALLBACK (on_button_event), keyboard);
|
G_CALLBACK (on_button_event), keyboard);
|
||||||
g_signal_connect (priv->widget, "button-release-event",
|
g_signal_connect (priv->widget, "button-release-event",
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#ifndef EEK_GTK_KEYBOARD_H
|
#ifndef EEK_GTK_KEYBOARD_H
|
||||||
#define EEK_GTK_KEYBOARD_H 1
|
#define EEK_GTK_KEYBOARD_H 1
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "eek-keyboard.h"
|
#include "eek-keyboard.h"
|
||||||
|
|
||||||
|
|||||||
@ -226,13 +226,17 @@ eek_key_real_get_keysym_index (EekKey *self,
|
|||||||
static void
|
static void
|
||||||
eek_key_real_pressed (EekKey *key)
|
eek_key_real_pressed (EekKey *key)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
g_debug ("pressed %X", eek_key_get_keycode (key));
|
g_debug ("pressed %X", eek_key_get_keycode (key));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eek_key_real_released (EekKey *key)
|
eek_key_real_released (EekKey *key)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
g_debug ("released %X", eek_key_get_keycode (key));
|
g_debug ("released %X", eek_key_get_keycode (key));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@ -484,3 +484,70 @@ eek_keyboard_find_key_by_keycode (EekKeyboard *keyboard,
|
|||||||
return EEK_KEYBOARD_GET_CLASS(keyboard)->find_key_by_keycode (keyboard,
|
return EEK_KEYBOARD_GET_CLASS(keyboard)->find_key_by_keycode (keyboard,
|
||||||
keycode);
|
keycode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct _FkbpData {
|
||||||
|
gdouble x;
|
||||||
|
gdouble y;
|
||||||
|
EekKey *key;
|
||||||
|
};
|
||||||
|
typedef struct _FkbpData FkbpData;
|
||||||
|
|
||||||
|
static gint
|
||||||
|
compare_section_by_position (EekElement *element, gpointer user_data)
|
||||||
|
{
|
||||||
|
EekSection *section = EEK_SECTION(element);
|
||||||
|
EekPoint *point = user_data;
|
||||||
|
gint angle;
|
||||||
|
EekBounds bounds;
|
||||||
|
EekPoint rotated;
|
||||||
|
|
||||||
|
eek_element_get_bounds (element, &bounds);
|
||||||
|
rotated.x = point->x - bounds.x;
|
||||||
|
rotated.y = point->y - bounds.y;
|
||||||
|
angle = eek_section_get_angle (section);
|
||||||
|
eek_point_rotate (&rotated, -angle);
|
||||||
|
|
||||||
|
if (0 <= rotated.x && 0 <= rotated.y &&
|
||||||
|
rotated.x <= bounds.width &&
|
||||||
|
rotated.y <= bounds.height)
|
||||||
|
return 0;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fkbp_foreach_child_callback (EekElement *element,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
FkbpData *data = user_data;
|
||||||
|
EekPoint point;
|
||||||
|
|
||||||
|
if (!data->key) {
|
||||||
|
point.x = data->x;
|
||||||
|
point.y = data->y;
|
||||||
|
if (compare_section_by_position (element, &point) == 0) {
|
||||||
|
data->key = eek_section_find_key_by_position (EEK_SECTION(element),
|
||||||
|
point.x,
|
||||||
|
point.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EekKey *
|
||||||
|
eek_keyboard_find_key_by_position (EekKeyboard *keyboard,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y)
|
||||||
|
{
|
||||||
|
FkbpData data;
|
||||||
|
EekSection *section;
|
||||||
|
EekBounds bounds;
|
||||||
|
|
||||||
|
eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
|
||||||
|
data.x = x - bounds.x;
|
||||||
|
data.y = y - bounds.y;
|
||||||
|
data.key = NULL;
|
||||||
|
/* eek_container_find() cannot be used here since sections may overlap. */
|
||||||
|
eek_container_foreach_child (EEK_CONTAINER(keyboard),
|
||||||
|
fkbp_foreach_child_callback,
|
||||||
|
&data);
|
||||||
|
return data.key;
|
||||||
|
}
|
||||||
|
|||||||
@ -83,22 +83,25 @@ struct _EekKeyboardClass
|
|||||||
gpointer pdummy[24];
|
gpointer pdummy[24];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType eek_keyboard_get_type (void) G_GNUC_CONST;
|
GType eek_keyboard_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
void eek_keyboard_set_keysym_index (EekKeyboard *keyboard,
|
void eek_keyboard_set_keysym_index (EekKeyboard *keyboard,
|
||||||
gint group,
|
gint group,
|
||||||
gint level);
|
gint level);
|
||||||
void eek_keyboard_get_keysym_index (EekKeyboard *keyboard,
|
void eek_keyboard_get_keysym_index (EekKeyboard *keyboard,
|
||||||
gint *group,
|
gint *group,
|
||||||
gint *level);
|
gint *level);
|
||||||
|
|
||||||
EekSection *eek_keyboard_create_section (EekKeyboard *keyboard);
|
EekSection *eek_keyboard_create_section (EekKeyboard *keyboard);
|
||||||
|
|
||||||
void eek_keyboard_set_layout (EekKeyboard *keyboard,
|
void eek_keyboard_set_layout (EekKeyboard *keyboard,
|
||||||
EekLayout *layout);
|
EekLayout *layout);
|
||||||
void eek_keyboard_realize (EekKeyboard *keyboard);
|
void eek_keyboard_realize (EekKeyboard *keyboard);
|
||||||
EekKey *eek_keyboard_find_key_by_keycode (EekKeyboard *keyboard,
|
EekKey *eek_keyboard_find_key_by_keycode (EekKeyboard *keyboard,
|
||||||
guint keycode);
|
guint keycode);
|
||||||
|
EekKey *eek_keyboard_find_key_by_position (EekKeyboard *keyboard,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* EEK_KEYBOARD_H */
|
#endif /* EEK_KEYBOARD_H */
|
||||||
|
|||||||
@ -41,7 +41,7 @@ struct eek_keysym_label {
|
|||||||
#include "eek-unicode-keysym-labels.h"
|
#include "eek-unicode-keysym-labels.h"
|
||||||
#include "eek-keyname-keysym-labels.h"
|
#include "eek-keyname-keysym-labels.h"
|
||||||
|
|
||||||
static G_CONST_RETURN gchar *
|
static gchar *
|
||||||
unichar_to_utf8 (gunichar uc)
|
unichar_to_utf8 (gunichar uc)
|
||||||
{
|
{
|
||||||
if (g_unichar_isgraph (uc)) {
|
if (g_unichar_isgraph (uc)) {
|
||||||
@ -65,7 +65,7 @@ keysym_label_compare (const void *key0, const void *key1)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
find_keysym (guint keysym,
|
find_keysym (guint keysym,
|
||||||
const gchar **label,
|
gchar **label,
|
||||||
EekKeysymCategory *category)
|
EekKeysymCategory *category)
|
||||||
{
|
{
|
||||||
struct eek_keysym_label bsearch_key, *bsearch_val;
|
struct eek_keysym_label bsearch_key, *bsearch_val;
|
||||||
@ -144,10 +144,10 @@ find_keysym (guint keysym,
|
|||||||
*
|
*
|
||||||
* Return a string representation of @keysym.
|
* Return a string representation of @keysym.
|
||||||
*/
|
*/
|
||||||
G_CONST_RETURN gchar *
|
gchar *
|
||||||
eek_keysym_to_string (guint keysym)
|
eek_keysym_to_string (guint keysym)
|
||||||
{
|
{
|
||||||
const gchar *label;
|
gchar *label;
|
||||||
|
|
||||||
if (find_keysym (keysym, &label, NULL))
|
if (find_keysym (keysym, &label, NULL))
|
||||||
return label;
|
return label;
|
||||||
|
|||||||
@ -51,10 +51,11 @@ typedef enum {
|
|||||||
EEK_KEYSYM_CATEGORY_FUNCTION,
|
EEK_KEYSYM_CATEGORY_FUNCTION,
|
||||||
EEK_KEYSYM_CATEGORY_KEYNAME,
|
EEK_KEYSYM_CATEGORY_KEYNAME,
|
||||||
EEK_KEYSYM_CATEGORY_UNKNOWN,
|
EEK_KEYSYM_CATEGORY_UNKNOWN,
|
||||||
|
/*< private >*/
|
||||||
EEK_KEYSYM_CATEGORY_LAST = EEK_KEYSYM_CATEGORY_UNKNOWN
|
EEK_KEYSYM_CATEGORY_LAST = EEK_KEYSYM_CATEGORY_UNKNOWN
|
||||||
} EekKeysymCategory;
|
} EekKeysymCategory;
|
||||||
|
|
||||||
G_CONST_RETURN gchar *eek_keysym_to_string (guint keysym);
|
gchar *eek_keysym_to_string (guint keysym);
|
||||||
EekKeysymCategory eek_keysym_get_category (guint keysym);
|
EekKeysymCategory eek_keysym_get_category (guint keysym);
|
||||||
|
|
||||||
#endif /* EEK_KEYSYM_H */
|
#endif /* EEK_KEYSYM_H */
|
||||||
|
|||||||
@ -438,3 +438,26 @@ eek_section_find_key_by_keycode (EekSection *section,
|
|||||||
return EEK_SECTION_GET_CLASS(section)->find_key_by_keycode (section,
|
return EEK_SECTION_GET_CLASS(section)->find_key_by_keycode (section,
|
||||||
keycode);
|
keycode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EekKey *
|
||||||
|
eek_section_find_key_by_position (EekSection *section,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y)
|
||||||
|
{
|
||||||
|
gint angle;
|
||||||
|
EekBounds bounds;
|
||||||
|
EekPoint point;
|
||||||
|
EekElement *key;
|
||||||
|
|
||||||
|
eek_element_get_bounds (EEK_ELEMENT(section), &bounds);
|
||||||
|
point.x = x - bounds.x;
|
||||||
|
point.y = y - bounds.y;
|
||||||
|
angle = eek_section_get_angle (section);
|
||||||
|
eek_point_rotate (&point, -angle);
|
||||||
|
key = eek_container_find_by_position (EEK_CONTAINER(section),
|
||||||
|
point.x + bounds.x,
|
||||||
|
point.y + bounds.y);
|
||||||
|
if (!key)
|
||||||
|
return NULL;
|
||||||
|
return EEK_KEY(key);
|
||||||
|
}
|
||||||
|
|||||||
@ -86,27 +86,30 @@ struct _EekSectionClass
|
|||||||
gpointer pdummy[24];
|
gpointer pdummy[24];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType eek_section_get_type (void) G_GNUC_CONST;
|
GType eek_section_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
void eek_section_set_angle (EekSection *section,
|
void eek_section_set_angle (EekSection *section,
|
||||||
gint angle);
|
gint angle);
|
||||||
gint eek_section_get_angle (EekSection *section);
|
gint eek_section_get_angle (EekSection *section);
|
||||||
|
|
||||||
gint eek_section_get_n_rows (EekSection *section);
|
gint eek_section_get_n_rows (EekSection *section);
|
||||||
void eek_section_add_row (EekSection *section,
|
void eek_section_add_row (EekSection *section,
|
||||||
gint num_columns,
|
gint num_columns,
|
||||||
EekOrientation orientation);
|
EekOrientation orientation);
|
||||||
void eek_section_get_row (EekSection *section,
|
void eek_section_get_row (EekSection *section,
|
||||||
gint index,
|
gint index,
|
||||||
gint *num_columns,
|
gint *num_columns,
|
||||||
EekOrientation *orientation);
|
EekOrientation *orientation);
|
||||||
|
|
||||||
EekKey *eek_section_create_key (EekSection *section,
|
EekKey *eek_section_create_key (EekSection *section,
|
||||||
gint column,
|
gint column,
|
||||||
gint row);
|
gint row);
|
||||||
|
|
||||||
EekKey *eek_section_find_key_by_keycode (EekSection *section,
|
EekKey *eek_section_find_key_by_keycode (EekSection *section,
|
||||||
guint keycode);
|
guint keycode);
|
||||||
|
EekKey *eek_section_find_key_by_position (EekSection *section,
|
||||||
|
gdouble x,
|
||||||
|
gdouble y);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* EEK_SECTION_H */
|
#endif /* EEK_SECTION_H */
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
#include "eek-types.h"
|
#include "eek-types.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/* EekKeysymMatrix */
|
/* EekKeysymMatrix */
|
||||||
static EekKeysymMatrix *
|
static EekKeysymMatrix *
|
||||||
@ -81,6 +82,18 @@ eek_point_get_type (void)
|
|||||||
return our_type;
|
return our_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
eek_point_rotate (EekPoint *point, gint angle)
|
||||||
|
{
|
||||||
|
gdouble r, phi;
|
||||||
|
|
||||||
|
phi = atan2 (point->y, point->x);
|
||||||
|
r = sqrt (point->x * point->x + point->y * point->y);
|
||||||
|
phi += angle * M_PI / 180;
|
||||||
|
point->x = r * cos (phi);
|
||||||
|
point->y = r * sin (phi);
|
||||||
|
}
|
||||||
|
|
||||||
/* EekBounds */
|
/* EekBounds */
|
||||||
static EekBounds *
|
static EekBounds *
|
||||||
eek_bounds_copy (const EekBounds *bounds)
|
eek_bounds_copy (const EekBounds *bounds)
|
||||||
|
|||||||
@ -24,6 +24,12 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define EEK_TYPE_KEYSYM_MATRIX (eek_keysym_matrix_get_type ())
|
||||||
|
#define EEK_TYPE_POINT (eek_point_get_type ())
|
||||||
|
#define EEK_TYPE_BOUNDS (eek_bounds_get_type ())
|
||||||
|
#define EEK_TYPE_OUTLINE (eek_outline_get_type ())
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EekOrientation:
|
* EekOrientation:
|
||||||
* @EEK_ORIENTATION_VERTICAL: the elements will be arranged vertically
|
* @EEK_ORIENTATION_VERTICAL: the elements will be arranged vertically
|
||||||
@ -45,6 +51,11 @@ typedef struct _EekKey EekKey;
|
|||||||
typedef struct _EekSection EekSection;
|
typedef struct _EekSection EekSection;
|
||||||
typedef struct _EekKeyboard EekKeyboard;
|
typedef struct _EekKeyboard EekKeyboard;
|
||||||
|
|
||||||
|
typedef struct _EekKeysymMatrix EekKeysymMatrix;
|
||||||
|
typedef struct _EekPoint EekPoint;
|
||||||
|
typedef struct _EekBounds EekBounds;
|
||||||
|
typedef struct _EekOutline EekOutline;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EekKeysymMatrix:
|
* EekKeysymMatrix:
|
||||||
* @data: array of keysyms
|
* @data: array of keysyms
|
||||||
@ -59,9 +70,7 @@ struct _EekKeysymMatrix
|
|||||||
gint num_groups;
|
gint num_groups;
|
||||||
gint num_levels;
|
gint num_levels;
|
||||||
};
|
};
|
||||||
typedef struct _EekKeysymMatrix EekKeysymMatrix;
|
|
||||||
|
|
||||||
#define EEK_TYPE_KEYSYM_MATRIX (eek_keysym_matrix_get_type ())
|
|
||||||
GType eek_keysym_matrix_get_type (void) G_GNUC_CONST;
|
GType eek_keysym_matrix_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,10 +85,10 @@ struct _EekPoint
|
|||||||
gdouble x;
|
gdouble x;
|
||||||
gdouble y;
|
gdouble y;
|
||||||
};
|
};
|
||||||
typedef struct _EekPoint EekPoint;
|
|
||||||
|
|
||||||
#define EEK_TYPE_POINT (eek_point_get_type ())
|
|
||||||
GType eek_point_get_type (void) G_GNUC_CONST;
|
GType eek_point_get_type (void) G_GNUC_CONST;
|
||||||
|
void eek_point_rotate (EekPoint *point,
|
||||||
|
gint angle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EekBounds:
|
* EekBounds:
|
||||||
@ -88,18 +97,17 @@ GType eek_point_get_type (void) G_GNUC_CONST;
|
|||||||
* @width: width of the box
|
* @width: width of the box
|
||||||
* @height: height of the box
|
* @height: height of the box
|
||||||
*
|
*
|
||||||
* 2D bounding box
|
* The rectangle containing an element's bounding box.
|
||||||
*/
|
*/
|
||||||
struct _EekBounds
|
struct _EekBounds
|
||||||
{
|
{
|
||||||
|
/*< public >*/
|
||||||
gdouble x;
|
gdouble x;
|
||||||
gdouble y;
|
gdouble y;
|
||||||
gdouble width;
|
gdouble width;
|
||||||
gdouble height;
|
gdouble height;
|
||||||
};
|
};
|
||||||
typedef struct _EekBounds EekBounds;
|
|
||||||
|
|
||||||
#define EEK_TYPE_BOUNDS (eek_bounds_get_type ())
|
|
||||||
GType eek_bounds_get_type (void) G_GNUC_CONST;
|
GType eek_bounds_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
G_INLINE_FUNC gdouble
|
G_INLINE_FUNC gdouble
|
||||||
@ -122,9 +130,7 @@ struct _EekOutline
|
|||||||
EekPoint *points;
|
EekPoint *points;
|
||||||
gint num_points;
|
gint num_points;
|
||||||
};
|
};
|
||||||
typedef struct _EekOutline EekOutline;
|
|
||||||
|
|
||||||
#define EEK_TYPE_OUTLINE (eek_outline_get_type ())
|
|
||||||
GType eek_outline_get_type (void) G_GNUC_CONST;
|
GType eek_outline_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-xkb
|
Name: libeek-xkb
|
||||||
Description: A Library to Create Keyboard-like UI (XKB Support)
|
Description: A Library to Create Keyboard-like UI (XKB Support)
|
||||||
URL: http://github.com/ueno/eekboard
|
URL: http://ueno.github.com/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -leek -leek-xkb
|
Requires: eek-@EEK_API_VERSION@ gtk+-x11-@GTK_API_VERSION@
|
||||||
Libs.private: @GTK2_LIBS@ @XKB_LIBS@
|
Libs: -L${libdir} -leek-xkb
|
||||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||||
@ -31,6 +31,7 @@
|
|||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#include <X11/extensions/XKBgeom.h>
|
#include <X11/extensions/XKBgeom.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -169,8 +170,10 @@ create_key (EekXkbLayout *layout,
|
|||||||
outline->num_points = xkboutline->num_points;
|
outline->num_points = xkboutline->num_points;
|
||||||
outline->points = g_new0 (EekPoint, outline->num_points);
|
outline->points = g_new0 (EekPoint, outline->num_points);
|
||||||
for (i = 0; i < xkboutline->num_points; i++) {
|
for (i = 0; i < xkboutline->num_points; i++) {
|
||||||
outline->points[i].x = xkb_to_pixmap_coord(layout, xkboutline->points[i].x);
|
outline->points[i].x =
|
||||||
outline->points[i].y = xkb_to_pixmap_coord(layout, xkboutline->points[i].y);
|
xkb_to_pixmap_coord(layout, xkboutline->points[i].x);
|
||||||
|
outline->points[i].y =
|
||||||
|
xkb_to_pixmap_coord(layout, xkboutline->points[i].y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_hash_table_insert (priv->outline_hash, xkbshape, outline);
|
g_hash_table_insert (priv->outline_hash, xkbshape, outline);
|
||||||
@ -418,7 +421,8 @@ eek_xkb_layout_real_get_group (EekLayout *self)
|
|||||||
EekXkbLayoutPrivate *priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
|
EekXkbLayoutPrivate *priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
|
||||||
XkbStateRec state;
|
XkbStateRec state;
|
||||||
|
|
||||||
g_return_val_if_fail (XkbGetState (priv->display, XkbUseCoreKbd, &state), -1);
|
g_return_val_if_fail (XkbGetState (priv->display, XkbUseCoreKbd, &state),
|
||||||
|
-1);
|
||||||
return state.group;
|
return state.group;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,7 +568,7 @@ eek_xkb_layout_new (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eek_xkb_layout_set_names:
|
* eek_xkb_layout_set_names: (skip)
|
||||||
* @layout: an #EekXkbLayout
|
* @layout: an #EekXkbLayout
|
||||||
* @names: XKB component names
|
* @names: XKB component names
|
||||||
*
|
*
|
||||||
@ -607,6 +611,70 @@ eek_xkb_layout_set_names (EekXkbLayout *layout, XkbComponentNamesRec *names)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eek_xkb_layout_set_names_full:
|
||||||
|
* @layout: an #EekXkbLayout
|
||||||
|
* @Varargs: pairs of component name and value, terminated by NULL.
|
||||||
|
*
|
||||||
|
* Set the XKB component names to @layout. This function is merely a
|
||||||
|
* wrapper around eek_xkb_layout_set_names() to avoid passing a
|
||||||
|
* pointer of XkbComponentNamesRec, which is not currently available
|
||||||
|
* in the gobject-introspection repository.
|
||||||
|
*
|
||||||
|
* Available component names are: keymap, keycodes, types, compat,
|
||||||
|
* symbols, geometry.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the component name is successfully set, %FALSE otherwise
|
||||||
|
* Since: 0.0.2
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
eek_xkb_layout_set_names_full (EekXkbLayout *layout,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
va_list var_args;
|
||||||
|
va_start (var_args, layout);
|
||||||
|
eek_xkb_layout_set_names_full_valist (layout, var_args);
|
||||||
|
va_end (var_args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eek_xkb_layout_set_names_full_valist:
|
||||||
|
* @layout: an #EekXkbLayout
|
||||||
|
* @var_args: <type>va_list</type> of pairs of component name and value.
|
||||||
|
*
|
||||||
|
* See eek_xkb_layout_set_names_full(), this version takes a
|
||||||
|
* <type>va_list</type> for language bindings to use.
|
||||||
|
*
|
||||||
|
* Since: 0.0.5
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
eek_xkb_layout_set_names_full_valist (EekXkbLayout *layout,
|
||||||
|
va_list var_args)
|
||||||
|
{
|
||||||
|
XkbComponentNamesRec names;
|
||||||
|
gchar *name, *value;
|
||||||
|
|
||||||
|
memset (&names, 0, sizeof names);
|
||||||
|
name = va_arg (var_args, gchar *);
|
||||||
|
while (name) {
|
||||||
|
value = va_arg (var_args, gchar *);
|
||||||
|
if (g_strcmp0 (name, "keymap") == 0)
|
||||||
|
names.keymap = (char *)value;
|
||||||
|
else if (g_strcmp0 (name, "keycodes") == 0)
|
||||||
|
names.keycodes = (char *)value;
|
||||||
|
else if (g_strcmp0 (name, "types") == 0)
|
||||||
|
names.types = (char *)value;
|
||||||
|
else if (g_strcmp0 (name, "compat") == 0)
|
||||||
|
names.compat = (char *)value;
|
||||||
|
else if (g_strcmp0 (name, "symbols") == 0)
|
||||||
|
names.symbols = (char *)value;
|
||||||
|
else if (g_strcmp0 (name, "geometry") == 0)
|
||||||
|
names.geometry = (char *)value;
|
||||||
|
name = va_arg (var_args, gchar *);
|
||||||
|
}
|
||||||
|
return eek_xkb_layout_set_names (layout, &names);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eek_xkb_layout_set_keycodes:
|
* eek_xkb_layout_set_keycodes:
|
||||||
* @layout: an #EekXkbLayout
|
* @layout: an #EekXkbLayout
|
||||||
|
|||||||
@ -60,6 +60,14 @@ EekLayout *eek_xkb_layout_new (void);
|
|||||||
|
|
||||||
gboolean eek_xkb_layout_set_names (EekXkbLayout *layout,
|
gboolean eek_xkb_layout_set_names (EekXkbLayout *layout,
|
||||||
XkbComponentNamesRec *names);
|
XkbComponentNamesRec *names);
|
||||||
|
|
||||||
|
gboolean eek_xkb_layout_set_names_full
|
||||||
|
(EekXkbLayout *layout,
|
||||||
|
...);
|
||||||
|
gboolean eek_xkb_layout_set_names_full_valist
|
||||||
|
(EekXkbLayout *layout,
|
||||||
|
va_list var_args);
|
||||||
|
|
||||||
gboolean eek_xkb_layout_set_keycodes
|
gboolean eek_xkb_layout_set_keycodes
|
||||||
(EekXkbLayout *layout,
|
(EekXkbLayout *layout,
|
||||||
const gchar *keycodes);
|
const gchar *keycodes);
|
||||||
|
|||||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-xkl
|
Name: libeek-xkl
|
||||||
Description: A Library to Create Keyboard-like UI (Libxklavier Support)
|
Description: A Library to Create Keyboard-like UI (Libxklavier Support)
|
||||||
URL: http://github.com/ueno/eekboard
|
URL: http://ueno.github.com/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
|
Requires: eek-xkb-@EEK_API_VERSION@ libxklavier
|
||||||
Libs: -L${libdir} -leek-xkl
|
Libs: -L${libdir} -leek-xkl
|
||||||
Libs.private: @GTK2_LIBS@ @LIBXKLAVIER_LIBS@
|
|
||||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||||
@ -318,7 +318,7 @@ merge_xkl_config_rec (XklConfigRec *dst, XklConfigRec *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eek_xkl_layout_set_config:
|
* eek_xkl_layout_set_config: (skip)
|
||||||
* @layout: an #EekXklLayout
|
* @layout: an #EekXklLayout
|
||||||
* @config: Libxklavier configuration
|
* @config: Libxklavier configuration
|
||||||
*
|
*
|
||||||
@ -345,6 +345,43 @@ eek_xkl_layout_set_config (EekXklLayout *layout,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eek_xkl_layout_set_config_full:
|
||||||
|
* @layout: an #EekXklLayout
|
||||||
|
* @model: Libxklavier model name
|
||||||
|
* @layouts: Libxklavier layouts
|
||||||
|
* @variants: Libxklavier variants
|
||||||
|
* @options: Libxklavier options
|
||||||
|
*
|
||||||
|
* Reconfigure @layout with @model, @layouts, @variants, and @options.
|
||||||
|
* This function is merely a wrapper around
|
||||||
|
* eek_xkl_layout_set_config() to avoid passing a pointer of
|
||||||
|
* XklConfigRec, which is not currently available in the
|
||||||
|
* gobject-introspection repository.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the component name is successfully set, %FALSE otherwise
|
||||||
|
* Since: 0.0.2
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
eek_xkl_layout_set_config_full (EekXklLayout *layout,
|
||||||
|
gchar *model,
|
||||||
|
gchar **layouts,
|
||||||
|
gchar **variants,
|
||||||
|
gchar **options)
|
||||||
|
{
|
||||||
|
XklConfigRec *config;
|
||||||
|
gboolean success;
|
||||||
|
|
||||||
|
config = xkl_config_rec_new ();
|
||||||
|
config->model = g_strdup (model);
|
||||||
|
config->layouts = g_strdupv (layouts);
|
||||||
|
config->variants = g_strdupv (variants);
|
||||||
|
config->options = g_strdupv (options);
|
||||||
|
success = eek_xkl_layout_set_config (layout, config);
|
||||||
|
g_object_unref (config);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eek_xkl_layout_set_model:
|
* eek_xkl_layout_set_model:
|
||||||
* @layout: an #EekXklLayout
|
* @layout: an #EekXklLayout
|
||||||
@ -363,7 +400,11 @@ eek_xkl_layout_set_model (EekXklLayout *layout,
|
|||||||
|
|
||||||
g_return_val_if_fail (priv, FALSE);
|
g_return_val_if_fail (priv, FALSE);
|
||||||
config = xkl_config_rec_new ();
|
config = xkl_config_rec_new ();
|
||||||
config->model = (gchar *)model;
|
/* config->model will be freed on g_object_unref (config) */
|
||||||
|
if (model)
|
||||||
|
config->model = g_strdup (model);
|
||||||
|
else
|
||||||
|
config->model = NULL;
|
||||||
success = eek_xkl_layout_set_config (layout, config);
|
success = eek_xkl_layout_set_config (layout, config);
|
||||||
g_object_unref (config);
|
g_object_unref (config);
|
||||||
return success;
|
return success;
|
||||||
@ -387,7 +428,11 @@ eek_xkl_layout_set_layouts (EekXklLayout *layout,
|
|||||||
|
|
||||||
g_return_val_if_fail (priv, FALSE);
|
g_return_val_if_fail (priv, FALSE);
|
||||||
config = xkl_config_rec_new ();
|
config = xkl_config_rec_new ();
|
||||||
config->layouts = layouts;
|
/* config->layouts will be freed on g_object_unref (config) */
|
||||||
|
if (layouts)
|
||||||
|
config->layouts = g_strdupv (layouts);
|
||||||
|
else
|
||||||
|
config->layouts = layouts;
|
||||||
success = eek_xkl_layout_set_config (layout, config);
|
success = eek_xkl_layout_set_config (layout, config);
|
||||||
g_object_unref (config);
|
g_object_unref (config);
|
||||||
return success;
|
return success;
|
||||||
@ -411,7 +456,11 @@ eek_xkl_layout_set_variants (EekXklLayout *layout,
|
|||||||
|
|
||||||
g_return_val_if_fail (priv, FALSE);
|
g_return_val_if_fail (priv, FALSE);
|
||||||
config = xkl_config_rec_new ();
|
config = xkl_config_rec_new ();
|
||||||
config->variants = variants;
|
/* config->variants will be freed on g_object_unref (config) */
|
||||||
|
if (variants)
|
||||||
|
config->variants = g_strdupv (variants);
|
||||||
|
else
|
||||||
|
config->variants = NULL;
|
||||||
success = eek_xkl_layout_set_config (layout, config);
|
success = eek_xkl_layout_set_config (layout, config);
|
||||||
g_object_unref (config);
|
g_object_unref (config);
|
||||||
return success;
|
return success;
|
||||||
@ -435,7 +484,11 @@ eek_xkl_layout_set_options (EekXklLayout *layout,
|
|||||||
|
|
||||||
g_return_val_if_fail (priv, FALSE);
|
g_return_val_if_fail (priv, FALSE);
|
||||||
config = xkl_config_rec_new ();
|
config = xkl_config_rec_new ();
|
||||||
config->options = options;
|
/* config->options will be freed on g_object_unref (config) */
|
||||||
|
if (options)
|
||||||
|
config->options = options;
|
||||||
|
else
|
||||||
|
config->options = NULL;
|
||||||
success = eek_xkl_layout_set_config (layout, config);
|
success = eek_xkl_layout_set_config (layout, config);
|
||||||
g_object_unref (config);
|
g_object_unref (config);
|
||||||
return success;
|
return success;
|
||||||
@ -512,7 +565,7 @@ eek_xkl_layout_get_model (EekXklLayout *layout)
|
|||||||
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
||||||
|
|
||||||
g_return_val_if_fail (priv, NULL);
|
g_return_val_if_fail (priv, NULL);
|
||||||
return priv->config->model;
|
return g_strdup (priv->config->model);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -528,7 +581,7 @@ eek_xkl_layout_get_layouts (EekXklLayout *layout)
|
|||||||
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
||||||
|
|
||||||
g_return_val_if_fail (priv, NULL);
|
g_return_val_if_fail (priv, NULL);
|
||||||
return priv->config->layouts;
|
return g_strdupv (priv->config->layouts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -544,7 +597,7 @@ eek_xkl_layout_get_variants (EekXklLayout *layout)
|
|||||||
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
||||||
|
|
||||||
g_return_val_if_fail (priv, NULL);
|
g_return_val_if_fail (priv, NULL);
|
||||||
return priv->config->variants;
|
return g_strdupv (priv->config->variants);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -560,7 +613,7 @@ eek_xkl_layout_get_options (EekXklLayout *layout)
|
|||||||
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
|
||||||
|
|
||||||
g_return_val_if_fail (priv, NULL);
|
g_return_val_if_fail (priv, NULL);
|
||||||
return priv->config->options;
|
return g_strdupv (priv->config->options);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#ifndef EEK_XKL_LAYOUT_H
|
#ifndef EEK_XKL_LAYOUT_H
|
||||||
#define EEK_XKL_LAYOUT_H 1
|
#define EEK_XKL_LAYOUT_H 1
|
||||||
|
|
||||||
|
#include <libxklavier/xklavier.h>
|
||||||
#include "eek-xkb-layout.h"
|
#include "eek-xkb-layout.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@ -53,32 +54,38 @@ struct _EekXklLayoutClass
|
|||||||
gpointer pdummy[24];
|
gpointer pdummy[24];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType eek_xkl_layout_get_type (void) G_GNUC_CONST;
|
GType eek_xkl_layout_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
EekLayout *eek_xkl_layout_new (void);
|
EekLayout *eek_xkl_layout_new (void);
|
||||||
|
|
||||||
gboolean eek_xkl_layout_set_config (EekXklLayout *layout,
|
gboolean eek_xkl_layout_set_config (EekXklLayout *layout,
|
||||||
XklConfigRec *config);
|
XklConfigRec *config);
|
||||||
|
|
||||||
gboolean eek_xkl_layout_set_model (EekXklLayout *layout,
|
gboolean eek_xkl_layout_set_config_full (EekXklLayout *layout,
|
||||||
const gchar *model);
|
gchar *model,
|
||||||
gboolean eek_xkl_layout_set_layouts (EekXklLayout *layout,
|
gchar **layouts,
|
||||||
gchar **layouts);
|
gchar **variants,
|
||||||
gboolean eek_xkl_layout_set_variants (EekXklLayout *layout,
|
gchar **options);
|
||||||
gchar **variants);
|
|
||||||
gboolean eek_xkl_layout_set_options (EekXklLayout *layout,
|
|
||||||
gchar **options);
|
|
||||||
gboolean eek_xkl_layout_enable_option (EekXklLayout *layout,
|
|
||||||
const gchar *option);
|
|
||||||
gboolean eek_xkl_layout_disable_option (EekXklLayout *layout,
|
|
||||||
const gchar *option);
|
|
||||||
|
|
||||||
gchar *eek_xkl_layout_get_model (EekXklLayout *layout);
|
gboolean eek_xkl_layout_set_model (EekXklLayout *layout,
|
||||||
gchar **eek_xkl_layout_get_layouts (EekXklLayout *layout);
|
const gchar *model);
|
||||||
gchar **eek_xkl_layout_get_variants (EekXklLayout *layout);
|
gboolean eek_xkl_layout_set_layouts (EekXklLayout *layout,
|
||||||
gchar **eek_xkl_layout_get_options (EekXklLayout *layout);
|
gchar **layouts);
|
||||||
gboolean eek_xkl_layout_get_option (EekXklLayout *layout,
|
gboolean eek_xkl_layout_set_variants (EekXklLayout *layout,
|
||||||
const gchar *option);
|
gchar **variants);
|
||||||
|
gboolean eek_xkl_layout_set_options (EekXklLayout *layout,
|
||||||
|
gchar **options);
|
||||||
|
gboolean eek_xkl_layout_enable_option (EekXklLayout *layout,
|
||||||
|
const gchar *option);
|
||||||
|
gboolean eek_xkl_layout_disable_option (EekXklLayout *layout,
|
||||||
|
const gchar *option);
|
||||||
|
|
||||||
|
gchar *eek_xkl_layout_get_model (EekXklLayout *layout);
|
||||||
|
gchar **eek_xkl_layout_get_layouts (EekXklLayout *layout);
|
||||||
|
gchar **eek_xkl_layout_get_variants (EekXklLayout *layout);
|
||||||
|
gchar **eek_xkl_layout_get_options (EekXklLayout *layout);
|
||||||
|
gboolean eek_xkl_layout_get_option (EekXklLayout *layout,
|
||||||
|
const gchar *option);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* #ifndef EEK_XKL_LAYOUT_H */
|
#endif /* #ifndef EEK_XKL_LAYOUT_H */
|
||||||
|
|||||||
23
eekboard-sample.conf
Normal file
23
eekboard-sample.conf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<eekboard>
|
||||||
|
<config>
|
||||||
|
<name>Thai Kinesis</name>
|
||||||
|
<model>kinesis</model>
|
||||||
|
<layouts>pc+us+th(pat)</layouts>
|
||||||
|
</config>
|
||||||
|
<config>
|
||||||
|
<name>Tifinagh Typematrix</name>
|
||||||
|
<model>tm2030USB-106</model>
|
||||||
|
<layouts>pc+us+ma(tifinagh-extended-phonetic)</layouts>
|
||||||
|
</config>
|
||||||
|
<config>
|
||||||
|
<name>Indic Bengali Microsoft Natural</name>
|
||||||
|
<model>microsoft</model>
|
||||||
|
<layouts>pc+us+in(ben)</layouts>
|
||||||
|
</config>
|
||||||
|
<config>
|
||||||
|
<name>US Generic 104-key PC</name>
|
||||||
|
<model>pc104</model>
|
||||||
|
<layouts>pc+us</layouts>
|
||||||
|
</config>
|
||||||
|
</eekboard>
|
||||||
54
po/ja.po
54
po/ja.po
@ -6,10 +6,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: eekboard 0.0.0\n"
|
"Project-Id-Version: eekboard 0.0.3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2010-06-21 12:42+0900\n"
|
"POT-Creation-Date: 2010-06-23 16:52+0900\n"
|
||||||
"PO-Revision-Date: 2010-06-21 12:45+0900\n"
|
"PO-Revision-Date: 2010-06-23 16:55+0900\n"
|
||||||
"Last-Translator: Daiki Ueno <ueno@unixuser.org>\n"
|
"Last-Translator: Daiki Ueno <ueno@unixuser.org>\n"
|
||||||
"Language-Team: Japanese\n"
|
"Language-Team: Japanese\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -17,46 +17,74 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
#: ../src/eekboard.c:195
|
#: ../src/eekboard.c:198
|
||||||
msgid "_File"
|
msgid "_File"
|
||||||
msgstr "ファイル"
|
msgstr "ファイル"
|
||||||
|
|
||||||
#: ../src/eekboard.c:196
|
#: ../src/eekboard.c:199
|
||||||
msgid "_Keyboard"
|
msgid "_Keyboard"
|
||||||
msgstr "キーボード"
|
msgstr "キーボード"
|
||||||
|
|
||||||
#: ../src/eekboard.c:197
|
#: ../src/eekboard.c:200
|
||||||
msgid "_Help"
|
msgid "_Help"
|
||||||
msgstr "ヘルプ"
|
msgstr "ヘルプ"
|
||||||
|
|
||||||
#: ../src/eekboard.c:199
|
#: ../src/eekboard.c:202
|
||||||
msgid "Country"
|
msgid "Country"
|
||||||
msgstr "国"
|
msgstr "国"
|
||||||
|
|
||||||
#: ../src/eekboard.c:201
|
#: ../src/eekboard.c:204
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "言語"
|
msgstr "言語"
|
||||||
|
|
||||||
#: ../src/eekboard.c:203
|
#: ../src/eekboard.c:206
|
||||||
msgid "Model"
|
msgid "Model"
|
||||||
msgstr "モデル"
|
msgstr "モデル"
|
||||||
|
|
||||||
#: ../src/eekboard.c:205
|
#: ../src/eekboard.c:208
|
||||||
msgid "Layout"
|
msgid "Layout"
|
||||||
msgstr "レイアウト"
|
msgstr "レイアウト"
|
||||||
|
|
||||||
#: ../src/eekboard.c:207
|
#: ../src/eekboard.c:210
|
||||||
msgid "Option"
|
msgid "Option"
|
||||||
msgstr "オプション"
|
msgstr "オプション"
|
||||||
|
|
||||||
#: ../src/eekboard.c:214
|
#: ../src/eekboard.c:217
|
||||||
msgid "Monitor Key Typing"
|
msgid "Monitor Key Typing"
|
||||||
msgstr "打鍵をモニタ"
|
msgstr "打鍵をモニタ"
|
||||||
|
|
||||||
#: ../src/eekboard.c:232
|
#: ../src/eekboard.c:232
|
||||||
|
msgid "Keyboard model to display"
|
||||||
|
msgstr "表示するキーボードのモデル"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:234
|
||||||
|
msgid "Keyboard layouts to display, separated with commas"
|
||||||
|
msgstr "表示するキーボードのレイアウト,カンマ区切り"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:236
|
||||||
|
msgid "Keyboard layout options to display, separated with commas"
|
||||||
|
msgstr "表示するキーボードのオプション,カンマ区切り"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:238
|
||||||
|
msgid "List keyboard models"
|
||||||
|
msgstr "キーボードのモデルを一覧"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:240
|
||||||
|
msgid "List all available keyboard layouts and variants"
|
||||||
|
msgstr "利用可能なキーボードのレイアウトとバリアントを一覧"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:242
|
||||||
|
msgid "List all available keyboard layout options"
|
||||||
|
msgstr "利用可能なキーボードのレイアウトオプションを一覧"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:244
|
||||||
|
msgid "Display version"
|
||||||
|
msgstr "バージョンを表示"
|
||||||
|
|
||||||
|
#: ../src/eekboard.c:261
|
||||||
msgid "A virtual keyboard for GNOME"
|
msgid "A virtual keyboard for GNOME"
|
||||||
msgstr "GNOME 向け仮想キーボード"
|
msgstr "GNOME 向け仮想キーボード"
|
||||||
|
|
||||||
#: ../src/eekboard.c:236
|
#: ../src/eekboard.c:265
|
||||||
msgid "Eekboard web site"
|
msgid "Eekboard web site"
|
||||||
msgstr "Eekboard のウェブサイト"
|
msgstr "Eekboard のウェブサイト"
|
||||||
|
|||||||
@ -22,27 +22,28 @@ eekboard_CFLAGS = \
|
|||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
$(GOBJECT2_CFLAGS) \
|
$(GOBJECT2_CFLAGS) \
|
||||||
$(GTK2_CFLAGS) \
|
$(GTK2_CFLAGS) \
|
||||||
|
$(GCONF2_CFLAGS) \
|
||||||
$(XKB_CFLAGS) \
|
$(XKB_CFLAGS) \
|
||||||
$(LIBXKLAVIER_CFLAGS) \
|
$(LIBXKLAVIER_CFLAGS) \
|
||||||
$(LIBFAKEKEY_CFLAGS)
|
$(LIBFAKEKEY_CFLAGS) \
|
||||||
|
$(CSPI_CFLAGS) \
|
||||||
|
$(NOTIFY_CFLAGS)
|
||||||
|
|
||||||
eekboard_LDFLAGS = \
|
eekboard_LDFLAGS = \
|
||||||
$(top_builddir)/eek/libeek.la \
|
$(top_builddir)/eek/libeek.la \
|
||||||
$(top_builddir)/eek/libeek-xkl.la \
|
$(top_builddir)/eek/libeek-xkl.la \
|
||||||
$(top_builddir)/eek/libeek-gtk.la \
|
$(top_builddir)/eek/libeek-gtk.la \
|
||||||
$(GOBJECT2_LIBS) \
|
$(GOBJECT2_LIBS) \
|
||||||
$(GTK2_CFLAGS) \
|
$(GTK2_LIBS) \
|
||||||
|
$(GCONF2_LIBS) \
|
||||||
$(XKB_LIBS) \
|
$(XKB_LIBS) \
|
||||||
$(LIBXKLAVIER_LIBS) \
|
$(LIBXKLAVIER_LIBS) \
|
||||||
$(LIBFAKEKEY_LIBS)
|
$(LIBFAKEKEY_LIBS) \
|
||||||
|
$(CSPI_LIBS) \
|
||||||
|
$(NOTIFY_LIBS)
|
||||||
|
|
||||||
if HAVE_CLUTTER
|
if HAVE_CLUTTER
|
||||||
eekboard_CFLAGS += $(CLUTTER_CFLAGS)
|
eekboard_CFLAGS += $(CLUTTER_CFLAGS) $(CLUTTER_GTK_CFLAGS)
|
||||||
eekboard_LDFLAGS += $(CLUTTER_LIBS)
|
eekboard_LDFLAGS += $(CLUTTER_LIBS) $(top_builddir)/eek/libeek-clutter.la $(CLUTTER_GTK_LIBS)
|
||||||
endif
|
|
||||||
|
|
||||||
if HAVE_CLUTTER_GTK
|
|
||||||
eekboard_CFLAGS += $(CLUTTER_GTK_CFLAGS)
|
|
||||||
eekboard_LDFLAGS += $(top_builddir)/eek/libeek-clutter.la $(CLUTTER_GTK_LIBS)
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
814
src/eekboard.c
814
src/eekboard.c
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02110-1301 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
INCLUDES = -I$(top_srcdir) $(GOBJECT2_CFLAGS) $(GTK2_CFLAGS) $(XKB_CFLAGS)
|
INCLUDES = -I$(top_srcdir) $(GOBJECT2_CFLAGS) $(GTK_CFLAGS) $(XKB_CFLAGS)
|
||||||
|
|
||||||
TESTS = eek-simple-test eek-xkb-test
|
TESTS = eek-simple-test eek-xkb-test
|
||||||
noinst_PROGRAMS = $(TESTS)
|
noinst_PROGRAMS = $(TESTS)
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
#include "eek.h"
|
#include "eek/eek.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_create (void)
|
test_create (void)
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
#include "eek-xkb.h"
|
#include "eek/eek-xkb.h"
|
||||||
|
|
||||||
/* For gdk_x11_display_get_xdisplay(). See main(). */
|
/* For gdk_x11_display_get_xdisplay(). See main(). */
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user