Compare commits
2 Commits
wip-input-
...
static-lin
| Author | SHA1 | Date | |
|---|---|---|---|
| f167a0e44a | |||
| 1804b28a0d |
@ -4,10 +4,6 @@ stages:
|
||||
- build
|
||||
|
||||
before_script:
|
||||
- apt-get -y update
|
||||
- apt-get -y install wget gnupg2
|
||||
- echo "deb http://ci.puri.sm/ scratch librem5" > /etc/apt/sources.list.d/ci.list
|
||||
- wget -O- https://ci.puri.sm/ci-repo.key | apt-key add -
|
||||
- apt-get -y update
|
||||
- apt-get -y build-dep .
|
||||
|
||||
@ -16,6 +12,8 @@ build_meson:
|
||||
tags:
|
||||
- librem5
|
||||
script:
|
||||
- meson . _build/ -Ddepdatadir=/usr/share
|
||||
- ninja -C _build install
|
||||
- mkdir -p ../build
|
||||
- meson ../build/
|
||||
- cd ../build
|
||||
- ninja install
|
||||
|
||||
|
||||
41
Makefile.am
Normal file
41
Makefile.am
Normal file
@ -0,0 +1,41 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = eek eekboard src tests bindings docs po data examples
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
|
||||
AUTOMAKE_OPTIONS = foreign # allow README.md to exist
|
||||
|
||||
|
||||
GITIGNOREFILES = \
|
||||
INSTALL \
|
||||
aclocal.m4 \
|
||||
compile \
|
||||
config.guess \
|
||||
config.h.in \
|
||||
config.sub \
|
||||
depcomp \
|
||||
gtk-doc.make \
|
||||
install-sh \
|
||||
ltmain.sh \
|
||||
m4 \
|
||||
missing \
|
||||
mkinstalldirs \
|
||||
$(NULL)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
21
bindings/Makefile.am
Normal file
21
bindings/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
SUBDIRS = vala
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
96
bindings/vala/Makefile.am
Normal file
96
bindings/vala/Makefile.am
Normal file
@ -0,0 +1,96 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
NULL =
|
||||
|
||||
if ENABLE_VALA
|
||||
vapidir = $(datadir)/vala/vapi
|
||||
dist_vapi_DATA = \
|
||||
eek-$(EEK_API_VERSION).vapi \
|
||||
eek-$(EEK_API_VERSION).deps \
|
||||
eek-gtk-$(EEK_API_VERSION).vapi \
|
||||
eek-gtk-$(EEK_API_VERSION).deps \
|
||||
eek-xkl-$(EEK_API_VERSION).vapi \
|
||||
eek-xkl-$(EEK_API_VERSION).deps \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST = \
|
||||
Eek-$(EEK_API_VERSION).metadata \
|
||||
EekGtk-$(EEK_API_VERSION).metadata \
|
||||
EekXkl-$(EEK_API_VERSION).metadata \
|
||||
$(NULL)
|
||||
|
||||
GITIGNOREFILES = \
|
||||
eek-$(EEK_API_VERSION).vapi \
|
||||
eek-gtk-$(EEK_API_VERSION).vapi \
|
||||
eek-xkl-$(EEK_API_VERSION).vapi \
|
||||
$(NULL)
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f *.vapi
|
||||
|
||||
eek_vapi_deps = \
|
||||
$(srcdir)/Eek-$(EEK_API_VERSION).metadata \
|
||||
| \
|
||||
$(top_builddir)/eek/Eek-$(EEK_API_VERSION).gir \
|
||||
$(NULL)
|
||||
|
||||
eek-$(EEK_API_VERSION).vapi: $(eek_vapi_deps)
|
||||
$(VAPIGEN_V)$(VAPIGEN) \
|
||||
--library eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
--metadatadir=$(srcdir) \
|
||||
$(top_builddir)/eek/Eek-$(EEK_API_VERSION).gir
|
||||
|
||||
eek_gtk_vapi_deps = \
|
||||
$(srcdir)/EekGtk-$(EEK_API_VERSION).metadata \
|
||||
| \
|
||||
$(top_builddir)/eek/EekGtk-$(EEK_API_VERSION).gir \
|
||||
$(NULL)
|
||||
|
||||
eek-gtk-$(EEK_API_VERSION).vapi: $(eek_gtk_vapi_deps)
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-gtk-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
--pkg gtk+-3.0 \
|
||||
--metadatadir=$(srcdir) \
|
||||
$(top_builddir)/eek/EekGtk-$(EEK_API_VERSION).gir
|
||||
|
||||
eek_xkl_vapi_deps = \
|
||||
$(srcdir)/EekXkl-$(EEK_API_VERSION).metadata \
|
||||
| \
|
||||
$(top_builddir)/eek/EekXkl-$(EEK_API_VERSION).gir \
|
||||
$(NULL)
|
||||
|
||||
eek-xkl-$(EEK_API_VERSION).vapi: $(eek_xkl_vapi_deps)
|
||||
$(VAPIGEN_V)$(VAPIGEN) \
|
||||
--vapidir=$(builddir) \
|
||||
--library eek-xkl-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
--metadatadir=$(srcdir) \
|
||||
$(top_builddir)/eek/EekXkl-$(EEK_API_VERSION).gir
|
||||
|
||||
# set up the verbosity rules to avoid some build noise
|
||||
VAPIGEN_V = $(VAPIGEN_V_$(V))
|
||||
VAPIGEN_V_ = $(VAPIGEN_V_$(AM_DEFAULT_VERBOSITY))
|
||||
VAPIGEN_V_0 = @echo " VAPIG " $@;
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
245
configure.ac
Normal file
245
configure.ac
Normal file
@ -0,0 +1,245 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
dnl AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_INIT([eekboard], [1.0.8], [ueno@unixuser.org])
|
||||
|
||||
dnl Init automake
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
AC_GNU_SOURCE
|
||||
|
||||
dnl Support silent build
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl Check for programs
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CXX
|
||||
|
||||
# define PACKAGE_VERSION_* variables
|
||||
AM_DISABLE_STATIC
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
LT_INIT
|
||||
IT_PROG_INTLTOOL([0.35.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_LIBRARY_SUFFIX="-$EEK_API_VERSION"
|
||||
|
||||
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_PATH_GLIB_2_0
|
||||
PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.26.0], ,
|
||||
[AC_MSG_ERROR([GLib2 not found])])
|
||||
PKG_CHECK_MODULES([GIO2], [gio-2.0], ,
|
||||
[AC_MSG_ERROR([Gio2 not found])])
|
||||
GLIB_GSETTINGS
|
||||
|
||||
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo], ,
|
||||
[AC_MSG_ERROR([PangoCairo not found])])
|
||||
PKG_CHECK_MODULES([GTK], [
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
gdk-$GTK_API_VERSION >= $GTK_REQUIRED], ,
|
||||
[AC_MSG_ERROR([GTK not found])])
|
||||
PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], ,
|
||||
[AC_MSG_ERROR([Libxklavier not found])])
|
||||
PKG_CHECK_MODULES([LIBCROCO], [libcroco-0.6], ,
|
||||
[AC_MSG_ERROR([libcroco not found])])
|
||||
|
||||
dnl use XTest to generate key events
|
||||
AC_MSG_CHECKING([whether you enable XTest])
|
||||
AC_ARG_ENABLE(xtest,
|
||||
AS_HELP_STRING([--enable-xtest=no/yes],
|
||||
[Enable XTest default=yes]),
|
||||
enable_xtest=$enableval,
|
||||
enable_xtest=yes)
|
||||
|
||||
if test x$enable_xtest = xyes; then
|
||||
PKG_CHECK_MODULES([XTEST], [xtst], , enable_xtest=no)
|
||||
if test x$enable_xtest = xyes; then
|
||||
AC_DEFINE([HAVE_XTEST], [1], [Define if XTest is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_XTEST, [test x$enable_xtest = xyes])
|
||||
AC_MSG_RESULT($enable_xtest)
|
||||
|
||||
dnl use X to mark the fullscreen window as dock
|
||||
AC_MSG_CHECKING([whether you enable X dock])
|
||||
AC_ARG_ENABLE(x-dock,
|
||||
AS_HELP_STRING([--enable-x-dock=no/yes],
|
||||
[Enable X dock default=yes]),
|
||||
enable_x_dock=$enableval,
|
||||
enable_x_dock=yes)
|
||||
|
||||
if test x$enable_x_dock = xyes; then
|
||||
PKG_CHECK_MODULES([XDOCK], [x11], , enable_x_dock=no)
|
||||
if test x$enable_x_dock = xyes; then
|
||||
AC_DEFINE([HAVE_XDOCK], [1], [Define if X dock is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_XDOCK, [test x$enable_x_dock = xyes])
|
||||
AC_MSG_RESULT($enable_x_dock)
|
||||
|
||||
focus_listeners="ibus"
|
||||
keystroke_listeners=""
|
||||
|
||||
dnl use AT-SPI 2 to capture focus/keystroke events
|
||||
AC_MSG_CHECKING([whether you enable AT-SPI 2 event handling])
|
||||
AC_ARG_ENABLE(atspi,
|
||||
AS_HELP_STRING([--enable-atspi=no/yes],
|
||||
[Enable AT-SPI 2 event handling default=yes]),
|
||||
enable_atspi=$enableval,
|
||||
enable_atspi=yes)
|
||||
|
||||
if test x$enable_atspi = xyes; then
|
||||
PKG_CHECK_MODULES([ATSPI2], [atspi-2], , enable_atspi=no)
|
||||
if test x$enable_atspi = xyes; then
|
||||
AC_DEFINE([HAVE_ATSPI], [1], [Define if AT-SPI 2 is found])
|
||||
focus_listeners="atspi $focus_listeners"
|
||||
keystroke_listeners="atspi $keystroke_listeners"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($enable_atspi)
|
||||
AM_CONDITIONAL(ENABLE_ATSPI, [test x$enable_atspi = xyes])
|
||||
|
||||
if test -n "$focus_listeners"; then
|
||||
AC_DEFINE(ENABLE_FOCUS_LISTENER, [1], [Define if eekboard can follow focus changes])
|
||||
fi
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([0.9.0])
|
||||
|
||||
dnl Vala langauge binding
|
||||
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=$enableval,
|
||||
enable_vala=yes)
|
||||
if test x$enable_vala = xyes; then
|
||||
if test "x$INTROSPECTION_SCANNER" = x; then
|
||||
enable_vala=no
|
||||
AC_MSG_WARN([GObject-Introspection must be enabled for Vala bindings])
|
||||
fi
|
||||
|
||||
AM_PROG_VALAC([0.10.0])
|
||||
have_vala=yes
|
||||
|
||||
AC_PATH_PROG(VALAC, valac, valac)
|
||||
AC_SUBST(VALAC)
|
||||
AC_SUBST(VALAFLAGS)
|
||||
|
||||
AC_PATH_PROG([VAPIGEN], [vapigen], [false])
|
||||
|
||||
if test "x$VAPIGEN" = "xfalse"; then
|
||||
enable_vala=no
|
||||
AC_MSG_WARN([vapigen not found. Was vala compiled with --enable-vapigen?])
|
||||
fi
|
||||
|
||||
AC_SUBST(VAPIGEN)
|
||||
fi
|
||||
AC_MSG_RESULT($enable_vala)
|
||||
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
|
||||
|
||||
dnl libcanberra
|
||||
AC_MSG_CHECKING([whether you enable libcanberra])
|
||||
AC_ARG_ENABLE(libcanberra,
|
||||
AS_HELP_STRING([--enable-libcanberra=no/yes],
|
||||
[Enable libcanberra user interface default=no]),
|
||||
enable_libcanberra=$enableval,
|
||||
enable_libcanberra=yes)
|
||||
|
||||
if test x$enable_libcanberra = xyes; then
|
||||
PKG_CHECK_MODULES([LIBCANBERRA], [libcanberra-gtk3], , enable_libcanberra=no)
|
||||
if test x$enable_libcanberra = xyes; then
|
||||
AC_DEFINE([HAVE_LIBCANBERRA], [1], [Define if libcanberra is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_LIBCANBERRA, [test x$enable_libcanberra = xyes])
|
||||
AC_MSG_RESULT($enable_libcanberra)
|
||||
|
||||
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
||||
|
||||
dnl define GETTEXT_* variables
|
||||
GETTEXT_PACKAGE=$PACKAGE
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
eek/Makefile
|
||||
eekboard/Makefile
|
||||
src/Makefile
|
||||
tests/Makefile
|
||||
bindings/Makefile
|
||||
bindings/vala/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
docs/reference/eek/Makefile
|
||||
docs/reference/eekboard/Makefile
|
||||
po/Makefile.in
|
||||
data/Makefile
|
||||
data/icons/Makefile
|
||||
data/icons/16x16/Makefile
|
||||
data/icons/22x22/Makefile
|
||||
data/icons/24x24/Makefile
|
||||
data/icons/32x32/Makefile
|
||||
data/icons/48x48/Makefile
|
||||
data/icons/scalable/Makefile
|
||||
data/themes/Makefile
|
||||
data/keyboards/Makefile
|
||||
examples/Makefile
|
||||
examples/simple-client/Makefile
|
||||
eek/eek-${EEK_API_VERSION}.pc
|
||||
eek/eek-gtk-${EEK_API_VERSION}.pc
|
||||
eek/eek-xkl-${EEK_API_VERSION}.pc
|
||||
eekboard/eekboard-${EEK_API_VERSION}.pc])
|
||||
AC_OUTPUT
|
||||
AC_MSG_RESULT([
|
||||
Build options:
|
||||
Version $VERSION
|
||||
Install prefix $prefix
|
||||
Build shared libs $enable_shared
|
||||
Build static libs $enable_static
|
||||
CFLAGS $CFLAGS
|
||||
Build Vala binding $enable_vala
|
||||
Sound support $enable_libcanberra
|
||||
Build document $enable_gtk_doc
|
||||
Focus listeners $focus_listeners
|
||||
Keystroke listeners $keystroke_listeners
|
||||
])
|
||||
|
||||
|
||||
35
data/Makefile.am
Normal file
35
data/Makefile.am
Normal file
@ -0,0 +1,35 @@
|
||||
SUBDIRS = icons themes keyboards
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
gsettings_schemas_in_files = org.fedorahosted.eekboard.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(gsettings_schemas_in_files:.gschema.xml.in=.gschema.xml)
|
||||
|
||||
servicedir = $(datadir)/dbus-1/services
|
||||
service_in_files = eekboard-server.service.in
|
||||
service_DATA = $(service_in_files:.service.in=.service)
|
||||
|
||||
$(service_DATA): $(service_in_files) Makefile
|
||||
$(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" $< > $@
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_in_files = eekboard.desktop.in
|
||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||
|
||||
if ENABLE_ATSPI
|
||||
autostartdir = $(sysconfdir)/xdg/autostart
|
||||
autostart_in_files = eekboard-autostart.desktop.in
|
||||
autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
|
||||
endif
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
CLEANFILES = $(service_DATA) $(desktop_DATA) $(gsettings_SCHEMAS)
|
||||
EXTRA_DIST = $(service_in_files) $(desktop_in_files) $(gsettings_schemas_in_files)
|
||||
|
||||
if ENABLE_ATSPI
|
||||
CLEANFILES += $(autostart_DATA)
|
||||
EXTRA_DIST += $(autostart_in_files)
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
20
data/dbus/sm.puri.OSK0.xml
Normal file
20
data/dbus/sm.puri.OSK0.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||
<interface name="sm.puri.OSK0">
|
||||
<method name="SetVisible">
|
||||
<arg name="visible" type="b" direction="in"/>
|
||||
<doc:doc><doc:description>
|
||||
Switch keyboard visibility
|
||||
</doc:description></doc:doc>
|
||||
</method>
|
||||
<method name="GetVisible">
|
||||
<arg name="visible" type="b" direction="out"/>
|
||||
<doc:doc><doc:description>
|
||||
Get keyboard visibility
|
||||
</doc:description></doc:doc>
|
||||
</method>
|
||||
<property name="Visible" type="b" access="read">
|
||||
</property>
|
||||
</interface>
|
||||
</node>
|
||||
17
data/icons/16x16/Makefile.am
Normal file
17
data/icons/16x16/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
size = 16x16
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
BIN
data/icons/16x16/eekboard.png
Normal file
BIN
data/icons/16x16/eekboard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 606 B |
17
data/icons/22x22/Makefile.am
Normal file
17
data/icons/22x22/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
size = 22x22
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
BIN
data/icons/22x22/eekboard.png
Normal file
BIN
data/icons/22x22/eekboard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 892 B |
17
data/icons/24x24/Makefile.am
Normal file
17
data/icons/24x24/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
size = 24x24
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
BIN
data/icons/24x24/eekboard.png
Normal file
BIN
data/icons/24x24/eekboard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 957 B |
17
data/icons/32x32/Makefile.am
Normal file
17
data/icons/32x32/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
size = 32x32
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
BIN
data/icons/32x32/eekboard.png
Normal file
BIN
data/icons/32x32/eekboard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
17
data/icons/48x48/Makefile.am
Normal file
17
data/icons/48x48/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
size = 48x48
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
BIN
data/icons/48x48/eekboard.png
Normal file
BIN
data/icons/48x48/eekboard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
3
data/icons/Makefile.am
Normal file
3
data/icons/Makefile.am
Normal file
@ -0,0 +1,3 @@
|
||||
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 scalable
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
15
data/icons/scalable/Makefile.am
Normal file
15
data/icons/scalable/Makefile.am
Normal file
@ -0,0 +1,15 @@
|
||||
icondir = $(datadir)/icons/hicolor/scalable/apps
|
||||
dist_icon_DATA = eekboard.svg
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
3486
data/icons/scalable/eekboard.svg
Normal file
3486
data/icons/scalable/eekboard.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 472 KiB |
40
data/keyboards/Makefile.am
Normal file
40
data/keyboards/Makefile.am
Normal file
@ -0,0 +1,40 @@
|
||||
keyboardsdir = $(pkgdatadir)/keyboards
|
||||
|
||||
nobase_dist_keyboards_DATA = \
|
||||
keyboards.xml \
|
||||
geometry/compact.xml \
|
||||
symbols/ar.xml \
|
||||
symbols/be.xml \
|
||||
symbols/fa.xml \
|
||||
symbols/he.xml \
|
||||
symbols/ja-kana.xml \
|
||||
symbols/kk.xml \
|
||||
symbols/ks.xml \
|
||||
symbols/my.xml \
|
||||
symbols/ru.xml \
|
||||
symbols/th.xml \
|
||||
symbols/ua.xml \
|
||||
symbols/ug.xml \
|
||||
symbols/us.xml \
|
||||
symbols/zh-bopomofo.xml \
|
||||
$(inscript_symbols) \
|
||||
$(NULL)
|
||||
|
||||
inscript_symbols = \
|
||||
symbols/as-inscript.xml \
|
||||
symbols/bn-inscript.xml \
|
||||
symbols/gu-inscript.xml \
|
||||
symbols/hi-inscript.xml \
|
||||
symbols/kn-inscript.xml \
|
||||
symbols/ks-inscript.xml \
|
||||
symbols/mai-inscript.xml \
|
||||
symbols/ml-inscript.xml \
|
||||
symbols/mr-inscript.xml \
|
||||
symbols/or-inscript.xml \
|
||||
symbols/pa-inscript.xml \
|
||||
symbols/sd-inscript.xml \
|
||||
symbols/ta-inscript.xml \
|
||||
symbols/te-inscript.xml \
|
||||
$(NULL)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@ -1,11 +1,102 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0.000000" y="0.000000" width="426.0000" height="296.5853"/>
|
||||
<bounds x="0.000000" y="0.000000" width="640.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<bounds x="15.60975" y="15.60975" width="640.0000" height="39.02439"/>
|
||||
<row orientation="1">
|
||||
<key keycode="9" name="ESC" oref="outline2">
|
||||
<bounds x="3.121951" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="67" name="FK01" oref="outline2">
|
||||
<bounds x="84.29268" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="68" name="FK02" oref="outline2">
|
||||
<bounds x="124.8780" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="69" name="FK03" oref="outline2">
|
||||
<bounds x="165.4634" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="70" name="FK04" oref="outline2">
|
||||
<bounds x="206.0487" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="71" name="FK05" oref="outline2">
|
||||
<bounds x="266.9268" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="72" name="FK06" oref="outline2">
|
||||
<bounds x="307.5121" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="73" name="FK07" oref="outline2">
|
||||
<bounds x="348.0975" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="74" name="FK08" oref="outline2">
|
||||
<bounds x="388.6829" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="75" name="FK09" oref="outline2">
|
||||
<bounds x="449.5609" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="76" name="FK10" oref="outline2">
|
||||
<bounds x="490.1463" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="95" name="FK11" oref="outline2">
|
||||
<bounds x="530.7317" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="96" name="FK12" oref="outline2">
|
||||
<bounds x="571.3170" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="15.60975" y="78.04878" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="49" name="TLDE" oref="outline2">
|
||||
<bounds x="3.121951" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="10" name="AE01" oref="outline2">
|
||||
<bounds x="43.70731" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="11" name="AE02" oref="outline2">
|
||||
<bounds x="84.29268" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="12" name="AE03" oref="outline2">
|
||||
<bounds x="124.8780" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="13" name="AE04" oref="outline2">
|
||||
<bounds x="165.4634" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="14" name="AE05" oref="outline2">
|
||||
<bounds x="206.0487" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="15" name="AE06" oref="outline2">
|
||||
<bounds x="245.0731" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="16" name="AE07" oref="outline2">
|
||||
<bounds x="285.6585" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="17" name="AE08" oref="outline2">
|
||||
<bounds x="326.2439" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="18" name="AE09" oref="outline2">
|
||||
<bounds x="366.8292" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="19" name="AE10" oref="outline2">
|
||||
<bounds x="407.4146" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="20" name="AE11" oref="outline2">
|
||||
<bounds x="448.0000" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="21" name="AE12" oref="outline2">
|
||||
<bounds x="488.5853" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="22" name="BKSP" oref="outline13">
|
||||
<bounds x="529.1707" y="1.560976" width="79.60975" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
<row orientation="1">
|
||||
<key keycode="23" name="TAB" oref="outline4">
|
||||
<bounds x="3.121951" y="42.14634" width="59.31707" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="24" name="AD01" oref="outline2">
|
||||
<bounds x="65.56097" y="42.14634" width="37.46341" height="52.44877"/>
|
||||
<bounds x="65.56097" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="25" name="AD02" oref="outline2">
|
||||
<bounds x="106.1463" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
@ -34,11 +125,20 @@
|
||||
<key keycode="33" name="AD10" oref="outline2">
|
||||
<bounds x="429.2682" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="34" name="AD11" oref="outline2">
|
||||
<bounds x="468.2926" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="35" name="AD12" oref="outline2">
|
||||
<bounds x="508.8780" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="51" name="BKSL" oref="outline5">
|
||||
<bounds x="549.4634" y="42.14634" width="59.31707" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="66" name="CAPS" oref="outline6">
|
||||
<bounds x="3.121951" y="82.73170" width="68.68292" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="38" name="AC01" oref="outline2">
|
||||
<bounds x="76.48780" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
@ -66,12 +166,18 @@
|
||||
<key keycode="46" name="AC09" oref="outline2">
|
||||
<bounds x="399.6097" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="47" name="AC10" oref="outline2">
|
||||
<bounds x="438.6341" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="48" name="AC11" oref="outline2">
|
||||
<bounds x="479.2195" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="36" name="RTRN" oref="outline7">
|
||||
<bounds x="519.8048" y="82.73170" width="88.97561" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="50" name="LFSH" oref="altline">
|
||||
<key keycode="50" name="LFSH" oref="outline8">
|
||||
<bounds x="3.121951" y="121.7560" width="88.97561" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="52" name="AB01" oref="outline2">
|
||||
@ -95,95 +201,113 @@
|
||||
<key keycode="58" name="AB07" oref="outline2">
|
||||
<bounds x="337.1707" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="22" name="BKSP" oref="altline">
|
||||
<bounds x="529.1707" y="1.560976" width="79.60975" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="37" name="LCTL" oref="altline">
|
||||
<bounds x="62.43902" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="66" name="ALTGR" oref="altline">
|
||||
<bounds x="113.9512" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="65" name="SPCE" oref="spaceline">
|
||||
<bounds x="165.4634" y="162.3414" width="217.5853" height="37.46341"/>
|
||||
<key keycode="59" name="AB08" oref="outline2">
|
||||
<bounds x="377.7560" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="60" name="AB09" oref="outline2">
|
||||
<bounds x="418.3414" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
<bounds x="418.3414" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="36" name="RTRN" oref="outline7">
|
||||
<bounds x="519.8048" y="82.73170" width="88.97561" height="37.46341"/>
|
||||
<key keycode="61" name="AB10" oref="outline2">
|
||||
<bounds x="458.9268" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="62" name="RTSH" oref="outline9">
|
||||
<bounds x="499.5121" y="121.7560" width="109.2682" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
<row orientation="1">
|
||||
<key keycode="149" name="I149" oref="outline10">
|
||||
<bounds x="3.121951" y="162.3414" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="37" name="LCTL" oref="outline1">
|
||||
<bounds x="62.43902" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="64" name="LALT" oref="outline1">
|
||||
<bounds x="113.9512" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="65" name="SPCE" oref="outline3">
|
||||
<bounds x="165.4634" y="162.3414" width="217.5853" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="113" name="LEFT" oref="outline1">
|
||||
<bounds x="368.0487" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="111" name="UP" oref="outline1">
|
||||
<bounds x="419.43894" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="116" name="DOWN" oref="outline1">
|
||||
<bounds x="470.82918" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="114" name="RGHT" oref="outline1">
|
||||
<bounds x="522.21942" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="150" name="I150" oref="outline10">
|
||||
<bounds x="573.60966" y="162.3414" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="37.46341" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<outline id="outline1" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="48.39024" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="59.31707" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="59.31707" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="68.68292" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="88.97561" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="88.97561" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="109.2682" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="37.46341" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="79.60975" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<outline id="outline3" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="150.5853" y="0.000000"/>
|
||||
<point x="150.5853" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
<point x="217.5853" y="0.000000"/>
|
||||
<point x="217.5853" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
|
||||
@ -102,52 +102,42 @@
|
||||
<key keycode="24" name="AD01">
|
||||
<keysym keyval="113">q</keysym>
|
||||
<keysym keyval="81">Q</keysym>
|
||||
<keysym keyval="49">1</keysym>
|
||||
</key>
|
||||
<key keycode="25" name="AD02">
|
||||
<keysym keyval="119">w</keysym>
|
||||
<keysym keyval="87">W</keysym>
|
||||
<keysym keyval="50">2</keysym>
|
||||
</key>
|
||||
<key keycode="26" name="AD03">
|
||||
<keysym keyval="101">e</keysym>
|
||||
<keysym keyval="69">E</keysym>
|
||||
<keysym keyval="51">3</keysym>
|
||||
</key>
|
||||
<key keycode="27" name="AD04">
|
||||
<keysym keyval="114">r</keysym>
|
||||
<keysym keyval="82">R</keysym>
|
||||
<keysym keyval="52">4</keysym>
|
||||
</key>
|
||||
<key keycode="28" name="AD05">
|
||||
<keysym keyval="116">t</keysym>
|
||||
<keysym keyval="84">T</keysym>
|
||||
<keysym keyval="53">5</keysym>
|
||||
</key>
|
||||
<key keycode="29" name="AD06">
|
||||
<keysym keyval="121">y</keysym>
|
||||
<keysym keyval="89">Y</keysym>
|
||||
<keysym keyval="54">6</keysym>
|
||||
</key>
|
||||
<key keycode="30" name="AD07">
|
||||
<keysym keyval="117">u</keysym>
|
||||
<keysym keyval="85">U</keysym>
|
||||
<keysym keyval="55">7</keysym>
|
||||
</key>
|
||||
<key keycode="31" name="AD08">
|
||||
<keysym keyval="105">i</keysym>
|
||||
<keysym keyval="73">I</keysym>
|
||||
<keysym keyval="56">8</keysym>
|
||||
</key>
|
||||
<key keycode="32" name="AD09">
|
||||
<keysym keyval="111">o</keysym>
|
||||
<keysym keyval="79">O</keysym>
|
||||
<keysym keyval="57">9</keysym>
|
||||
</key>
|
||||
<key keycode="33" name="AD10">
|
||||
<keysym keyval="112">p</keysym>
|
||||
<keysym keyval="80">P</keysym>
|
||||
<keysym keyval="48">0</keysym>
|
||||
</key>
|
||||
<key keycode="34" name="AD11">
|
||||
<keysym keyval="91">bracketleft</keysym>
|
||||
@ -161,53 +151,44 @@
|
||||
<keysym keyval="92">backslash</keysym>
|
||||
<keysym keyval="124">bar</keysym>
|
||||
</key>
|
||||
<key keycode="66" name="ALTGR">
|
||||
<key keycode="66" name="CAPS">
|
||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
||||
</key>
|
||||
<key keycode="38" name="AC01">
|
||||
<keysym keyval="97">a</keysym>
|
||||
<keysym keyval="65">A</keysym>
|
||||
<keysym keyval="64">at</keysym>
|
||||
</key>
|
||||
<key keycode="39" name="AC02">
|
||||
<keysym keyval="115">s</keysym>
|
||||
<keysym keyval="83">S</keysym>
|
||||
<keysym keyval="35">numbersign</keysym>
|
||||
</key>
|
||||
<key keycode="40" name="AC03">
|
||||
<keysym keyval="100">d</keysym>
|
||||
<keysym keyval="68">D</keysym>
|
||||
<keysym keyval="36">dollar</keysym>
|
||||
</key>
|
||||
<key keycode="41" name="AC04">
|
||||
<keysym keyval="102">f</keysym>
|
||||
<keysym keyval="70">F</keysym>
|
||||
<keysym keyval="37">percent</keysym>
|
||||
</key>
|
||||
<key keycode="42" name="AC05">
|
||||
<keysym keyval="103">g</keysym>
|
||||
<keysym keyval="71">G</keysym>
|
||||
<keysym keyval="38">ampersand</keysym>
|
||||
</key>
|
||||
<key keycode="43" name="AC06">
|
||||
<keysym keyval="104">h</keysym>
|
||||
<keysym keyval="72">H</keysym>
|
||||
<keysym keyval="45">minus</keysym>
|
||||
</key>
|
||||
<key keycode="44" name="AC07">
|
||||
<keysym keyval="106">j</keysym>
|
||||
<keysym keyval="74">J</keysym>
|
||||
<keysym keyval="95">underscore</keysym>
|
||||
</key>
|
||||
<key keycode="45" name="AC08">
|
||||
<keysym keyval="107">k</keysym>
|
||||
<keysym keyval="75">K</keysym>
|
||||
<keysym keyval="123">braceleft</keysym>
|
||||
</key>
|
||||
<key keycode="46" name="AC09">
|
||||
<keysym keyval="108">l</keysym>
|
||||
<keysym keyval="76">L</keysym>
|
||||
<keysym keyval="125">braceright</keysym>
|
||||
</key>
|
||||
<key keycode="47" name="AC10">
|
||||
<keysym keyval="59">semicolon</keysym>
|
||||
@ -226,37 +207,30 @@
|
||||
<key keycode="52" name="AB01">
|
||||
<keysym keyval="122">z</keysym>
|
||||
<keysym keyval="90">Z</keysym>
|
||||
<keysym keyval="43">plus</keysym>
|
||||
</key>
|
||||
<key keycode="53" name="AB02">
|
||||
<keysym keyval="120">x</keysym>
|
||||
<keysym keyval="88">X</keysym>
|
||||
<keysym keyval="34">quotedbl</keysym>
|
||||
</key>
|
||||
<key keycode="54" name="AB03">
|
||||
<keysym keyval="99">c</keysym>
|
||||
<keysym keyval="67">C</keysym>
|
||||
<keysym keyval="39">quoteright</keysym>
|
||||
</key>
|
||||
<key keycode="55" name="AB04">
|
||||
<keysym keyval="118">v</keysym>
|
||||
<keysym keyval="86">V</keysym>
|
||||
<keysym keyval="58">colon</keysym>
|
||||
</key>
|
||||
<key keycode="56" name="AB05">
|
||||
<keysym keyval="98">b</keysym>
|
||||
<keysym keyval="66">B</keysym>
|
||||
<keysym keyval="59">semicolon</keysym>
|
||||
</key>
|
||||
<key keycode="57" name="AB06">
|
||||
<keysym keyval="110">n</keysym>
|
||||
<keysym keyval="78">N</keysym>
|
||||
<keysym keyval="33">exclam</keysym>
|
||||
</key>
|
||||
<key keycode="58" name="AB07">
|
||||
<keysym keyval="109">m</keysym>
|
||||
<keysym keyval="77">M</keysym>
|
||||
<keysym keyval="63">question</keysym>
|
||||
</key>
|
||||
<key keycode="59" name="AB08">
|
||||
<keysym keyval="44">comma</keysym>
|
||||
|
||||
@ -14,6 +14,10 @@ install_data(
|
||||
install_dir: pkgdatadir + '/keyboards/geometry/',
|
||||
)
|
||||
|
||||
install_data('dbus/sm.puri.OSK0.xml',
|
||||
install_dir: dbusdir
|
||||
)
|
||||
|
||||
symbols = [
|
||||
'ar.xml',
|
||||
'as-inscript.xml',
|
||||
|
||||
4
data/themes/Makefile.am
Normal file
4
data/themes/Makefile.am
Normal file
@ -0,0 +1,4 @@
|
||||
themedir = $(pkgdatadir)/themes
|
||||
dist_theme_DATA = default.css
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@ -5,14 +5,18 @@
|
||||
}
|
||||
|
||||
.key {
|
||||
color: #deddda;
|
||||
background: #464448;
|
||||
border-width: 0.5px;
|
||||
border-color: #5e5c64;
|
||||
border-radius: 2px;
|
||||
color: #ffffff;
|
||||
background-gradient-direction: vertical;
|
||||
background-gradient-start: rgba(0, 0, 0, 255);
|
||||
background-gradient-end: rgba(64, 64, 64, 255);
|
||||
border-width: 2px;
|
||||
border-color: rgba(128, 128, 128, 255);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.key:active {
|
||||
background: #1c71d8;
|
||||
border-color: #3584e4;
|
||||
background-gradient-direction: vertical;
|
||||
background-gradient-start: rgba(0, 0, 255, 255);
|
||||
background-gradient-end: rgba(64, 64, 255, 255);
|
||||
border-color: rgba(160, 160, 255, 255);
|
||||
}
|
||||
|
||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,9 +1,3 @@
|
||||
squeekboard (1.0.10) unstable; urgency=medium
|
||||
|
||||
* Use a shared DBus definition
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Tue, 02 Jul 2019 20:12:02 +0000
|
||||
|
||||
squeekboard (1.0.9) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@ -11,7 +11,6 @@ Build-Depends:
|
||||
libcroco3-dev,
|
||||
libwayland-dev (>= 1.16),
|
||||
rustc,
|
||||
virtboard,
|
||||
wayland-protocols (>= 1.14)
|
||||
Standards-Version: 4.1.3
|
||||
Homepage: https://source.puri.sm/Librem5/squeekboard
|
||||
@ -19,6 +18,7 @@ Homepage: https://source.puri.sm/Librem5/squeekboard
|
||||
Package: squeekboard
|
||||
Architecture: linux-any
|
||||
Depends:
|
||||
libstd-rust-1.34 (= 1.34.2+dfsg1-1),
|
||||
${shlibs:Depends}
|
||||
${misc:Depends}
|
||||
Description: On-screen keyboard for Wayland
|
||||
|
||||
2
debian/rules
vendored
2
debian/rules
vendored
@ -3,6 +3,6 @@
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh $@ --builddirectory=_build --buildsystem=meson
|
||||
dh $@ --builddirectory=_build
|
||||
|
||||
override_dh_autoreconf:
|
||||
|
||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@ -1 +0,0 @@
|
||||
3.0 (native)
|
||||
21
docs/Makefile.am
Normal file
21
docs/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
SUBDIRS = reference
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
21
docs/reference/Makefile.am
Normal file
21
docs/reference/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
SUBDIRS = eek eekboard
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
133
docs/reference/eek/Makefile.am
Normal file
133
docs/reference/eek/Makefile.am
Normal file
@ -0,0 +1,133 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# We require automake 1.6 at least.
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# This is a blank Makefile.am for using gtk-doc.
|
||||
# Copy this to your project's API docs directory and modify the variables to
|
||||
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
|
||||
# of using the various options.
|
||||
|
||||
# The name of the module, e.g. 'glib'.
|
||||
DOC_MODULE=eek
|
||||
|
||||
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
|
||||
#DOC_MODULE_VERSION=2
|
||||
|
||||
|
||||
# The top-level SGML file. You can change this if you want to.
|
||||
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir).
|
||||
# gtk-doc will search all .c & .h files beneath here for inline comments
|
||||
# documenting the functions and macros.
|
||||
# e.g. DOC_SOURCE_DIR=../../../gtk
|
||||
DOC_SOURCE_DIR=../../../eek
|
||||
|
||||
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
|
||||
SCANGOBJ_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
|
||||
SCAN_OPTIONS=--rebuild-types --deprecated-guards="EEK_DISABLE_DEPRECATED"
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb.
|
||||
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
# Extra options to supply to gtkdoc-mktmpl
|
||||
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
|
||||
MKTMPL_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-mkhtml
|
||||
MKHTML_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref. Not normally needed.
|
||||
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
# Used for dependencies. The docs will be rebuilt if any of these change.
|
||||
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
|
||||
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||
HFILE_GLOB=$(top_srcdir)/eek/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/eek/*.c
|
||||
|
||||
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
|
||||
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
|
||||
EXTRA_HFILES=
|
||||
|
||||
# Header files to ignore when scanning. Use base file name, no paths
|
||||
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
|
||||
IGNORE_HFILES = \
|
||||
config.h \
|
||||
eek-renderer.h \
|
||||
eek-gtk-renderer.h \
|
||||
eek-theme.h \
|
||||
eek-theme-node.h \
|
||||
eek-enumtypes.h
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
||||
HTML_IMAGES=
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
|
||||
content_files=eek-overview.xml
|
||||
|
||||
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
|
||||
# These files must be listed here *and* in content_files
|
||||
# e.g. expand_content_files=running.sgml
|
||||
expand_content_files=eek-overview.xml
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
|
||||
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
|
||||
# signals and properties.
|
||||
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
|
||||
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
|
||||
GTKDOC_CFLAGS = $(GIO2_CFLAGS)
|
||||
GTKDOC_LIBS = $(top_builddir)/eek/libeek.la \
|
||||
$(top_builddir)/eek/libeek-gtk.la \
|
||||
$(top_builddir)/eek/libeek-xkl.la \
|
||||
$(GIO2_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(LIBXKLAVIER_LIBS)
|
||||
|
||||
# This includes the standard gtk-doc make rules, copied by gtkdocize.
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
# e.g. EXTRA_DIST += version.xml.in
|
||||
EXTRA_DIST +=
|
||||
|
||||
# Files not to distribute
|
||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
|
||||
#DISTCLEANFILES +=
|
||||
|
||||
# Comment this out if you want your docs-status tested during 'make check'
|
||||
if ENABLE_GTK_DOC
|
||||
#TESTS_ENVIRONMENT = cd $(srcsrc) &&
|
||||
#TESTS = $(GTKDOC_CHECK)
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/gtk-doc.mk
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
122
docs/reference/eekboard/Makefile.am
Normal file
122
docs/reference/eekboard/Makefile.am
Normal file
@ -0,0 +1,122 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# We require automake 1.6 at least.
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# This is a blank Makefile.am for using gtk-doc.
|
||||
# Copy this to your project's API docs directory and modify the variables to
|
||||
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
|
||||
# of using the various options.
|
||||
|
||||
# The name of the module, e.g. 'glib'.
|
||||
DOC_MODULE=eekboard
|
||||
|
||||
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
|
||||
#DOC_MODULE_VERSION=2
|
||||
|
||||
|
||||
# The top-level SGML file. You can change this if you want to.
|
||||
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir).
|
||||
# gtk-doc will search all .c & .h files beneath here for inline comments
|
||||
# documenting the functions and macros.
|
||||
# e.g. DOC_SOURCE_DIR=../../../gtk
|
||||
DOC_SOURCE_DIR=../../../eekboard
|
||||
|
||||
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
|
||||
SCANGOBJ_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
|
||||
SCAN_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb.
|
||||
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
# Extra options to supply to gtkdoc-mktmpl
|
||||
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
|
||||
MKTMPL_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-mkhtml
|
||||
MKHTML_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref. Not normally needed.
|
||||
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
# Used for dependencies. The docs will be rebuilt if any of these change.
|
||||
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
|
||||
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||
HFILE_GLOB=$(top_srcdir)/eekboard/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/eekboard/*.c
|
||||
|
||||
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
|
||||
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
|
||||
EXTRA_HFILES=
|
||||
|
||||
# Header files to ignore when scanning. Use base file name, no paths
|
||||
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
|
||||
IGNORE_HFILES=config.h eekboard.h
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
||||
HTML_IMAGES=
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
|
||||
# content_files=eekboard-overview.xml
|
||||
|
||||
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
|
||||
# These files must be listed here *and* in content_files
|
||||
# e.g. expand_content_files=running.sgml
|
||||
# expand_content_files=eekboard-overview.xml
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
|
||||
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
|
||||
# signals and properties.
|
||||
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
|
||||
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
|
||||
GTKDOC_CFLAGS = $(GIO2_CFLAGS)
|
||||
GTKDOC_LIBS = $(top_builddir)/eekboard/libeekboard.la $(GIO2_LIBS)
|
||||
|
||||
# This includes the standard gtk-doc make rules, copied by gtkdocize.
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
# e.g. EXTRA_DIST += version.xml.in
|
||||
# EXTRA_DIST +=
|
||||
|
||||
# Files not to distribute
|
||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
|
||||
#DISTCLEANFILES +=
|
||||
|
||||
# Comment this out if you want your docs-status tested during 'make check'
|
||||
if ENABLE_GTK_DOC
|
||||
#TESTS_ENVIRONMENT = cd $(srcsrc) &&
|
||||
#TESTS = $(GTKDOC_CHECK)
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/gtk-doc.mk
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
298
eek/Makefile.am
Normal file
298
eek/Makefile.am
Normal file
@ -0,0 +1,298 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
NULL =
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
libeek.la \
|
||||
libeek-gtk.la \
|
||||
libeek-xkl.la \
|
||||
$(NULL)
|
||||
|
||||
libeek_public_headers = \
|
||||
$(srcdir)/eek-layout.h \
|
||||
$(srcdir)/eek-element.h \
|
||||
$(srcdir)/eek-container.h \
|
||||
$(srcdir)/eek-keyboard.h \
|
||||
$(srcdir)/eek-section.h \
|
||||
$(srcdir)/eek-key.h \
|
||||
$(srcdir)/eek-symbol.h \
|
||||
$(srcdir)/eek-keysym.h \
|
||||
$(srcdir)/eek-text.h \
|
||||
$(srcdir)/eek-symbol-matrix.h \
|
||||
$(srcdir)/eek-types.h \
|
||||
$(srcdir)/eek-xml.h \
|
||||
$(srcdir)/eek-xml-layout.h \
|
||||
$(srcdir)/eek-serializable.h \
|
||||
$(srcdir)/eek-theme.h \
|
||||
$(srcdir)/eek.h \
|
||||
$(NULL)
|
||||
|
||||
libeek_private_headers = \
|
||||
$(srcdir)/eek-renderer.h \
|
||||
$(libeek_keysym_headers) \
|
||||
$(builddir)/eek-marshalers.h \
|
||||
$(srcdir)/eek-theme-context.h \
|
||||
$(srcdir)/eek-theme-private.h \
|
||||
$(srcdir)/eek-theme-node.h \
|
||||
$(NULL)
|
||||
|
||||
libeek_sources = \
|
||||
$(srcdir)/eek.c \
|
||||
$(srcdir)/eek-layout.c \
|
||||
$(srcdir)/eek-element.c \
|
||||
$(srcdir)/eek-container.c \
|
||||
$(srcdir)/eek-keyboard.c \
|
||||
$(srcdir)/eek-section.c \
|
||||
$(srcdir)/eek-key.c \
|
||||
$(srcdir)/eek-symbol-matrix.c \
|
||||
$(srcdir)/eek-symbol.c \
|
||||
$(srcdir)/eek-keysym.c \
|
||||
$(srcdir)/eek-text.c \
|
||||
$(srcdir)/eek-types.c \
|
||||
$(srcdir)/eek-serializable.c \
|
||||
$(srcdir)/eek-xml.c \
|
||||
$(srcdir)/eek-xml-layout.c \
|
||||
$(srcdir)/eek-renderer.c \
|
||||
$(srcdir)/eek-keyboard-drawing.c \
|
||||
$(srcdir)/eek-theme.c \
|
||||
$(srcdir)/eek-theme-context.c \
|
||||
$(srcdir)/eek-theme-node.c \
|
||||
$(NULL)
|
||||
|
||||
libeek_keysym_headers = \
|
||||
$(builddir)/eek-special-keysym-entries.h \
|
||||
$(builddir)/eek-unicode-keysym-entries.h \
|
||||
$(builddir)/eek-xkeysym-keysym-entries.h \
|
||||
$(NULL)
|
||||
|
||||
libeek_enumtypes_sources = \
|
||||
$(builddir)/eek-enumtypes.c \
|
||||
$(builddir)/eek-enumtypes.h \
|
||||
$(NULL)
|
||||
|
||||
libeek_marshalers_sources = \
|
||||
$(builddir)/eek-marshalers.c \
|
||||
$(builddir)/eek-marshalers.h \
|
||||
$(NULL)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(libeek_keysym_headers) \
|
||||
$(libeek_enumtypes_sources) \
|
||||
$(libeek_marshalers_sources) \
|
||||
$(NULL)
|
||||
|
||||
libeek_la_SOURCES = \
|
||||
$(libeek_sources) \
|
||||
$(builddir)/eek-enumtypes.c \
|
||||
$(builddir)/eek-marshalers.c \
|
||||
$(NULL)
|
||||
|
||||
libeek_la_CFLAGS = \
|
||||
-DEEK_COMPILATION=1 \
|
||||
-DKEYBOARDSDIR=\"$(pkgdatadir)/keyboards\" \
|
||||
$(GIO2_CFLAGS) \
|
||||
$(PANGOCAIRO_CFLAGS) \
|
||||
$(LIBCROCO_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libeek_la_LIBADD = \
|
||||
$(GIO2_LIBS) \
|
||||
$(PANGOCAIRO_LIBS) \
|
||||
$(LIBCROCO_LIBS) \
|
||||
-lm \
|
||||
$(NULL)
|
||||
|
||||
libeek_gtk_public_headers = \
|
||||
$(srcdir)/eek-gtk-keyboard.h \
|
||||
$(srcdir)/eek-gtk.h \
|
||||
$(NULL)
|
||||
libeek_gtk_private_headers = \
|
||||
$(srcdir)/eek-gtk-renderer.h \
|
||||
$(NULL)
|
||||
libeek_gtk_sources = \
|
||||
$(srcdir)/eek-gtk-keyboard.c \
|
||||
$(srcdir)/eek-gtk-renderer.c \
|
||||
$(NULL)
|
||||
|
||||
libeek_gtk_la_SOURCES = $(libeek_gtk_sources)
|
||||
libeek_gtk_la_CFLAGS = -DEEK_COMPILATION=1 $(GTK_CFLAGS) $(LIBCANBERRA_CFLAGS)
|
||||
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(LIBCANBERRA_LIBS)
|
||||
|
||||
libeek_xkl_public_headers = \
|
||||
$(srcdir)/eek-xkl-layout.h \
|
||||
$(srcdir)/eek-xkl.h \
|
||||
$(srcdir)/eek-xkb-layout.h \
|
||||
$(srcdir)/eek-xkb.h \
|
||||
$(NULL)
|
||||
|
||||
libeek_xkl_sources = \
|
||||
$(srcdir)/eek-xkb-layout.c \
|
||||
$(srcdir)/eek-xkl-layout.c \
|
||||
$(NULL)
|
||||
|
||||
libeek_xkl_la_SOURCES = $(libeek_xkl_sources)
|
||||
libeek_xkl_la_CFLAGS = -DEEK_COMPILATION=1 $(LIBXKLAVIER_CFLAGS)
|
||||
libeek_xkl_la_LIBADD = libeek.la $(LIBXKLAVIER_LIBS)
|
||||
|
||||
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
||||
eek_HEADERS = \
|
||||
$(libeek_public_headers) \
|
||||
$(builddir)/eek-enumtypes.h \
|
||||
$(libeek_gtk_public_headers) \
|
||||
$(libeek_xkl_public_headers) \
|
||||
$(NULL)
|
||||
|
||||
noinst_HEADERS = \
|
||||
$(libeek_private_headers) \
|
||||
$(libeek_gtk_private_headers) \
|
||||
$(libeek_xkl_private_headers) \
|
||||
$(NULL)
|
||||
|
||||
eek-special-keysym-entries.h: special-keysym-entries.txt
|
||||
$(AM_V_GEN) $(PYTHON) $(srcdir)/gen-keysym-entries.py \
|
||||
special_keysym_entries \
|
||||
< $< > $@
|
||||
eek-unicode-keysym-entries.h: unicode-keysym-entries.txt
|
||||
$(AM_V_GEN) $(PYTHON) $(srcdir)/gen-keysym-entries.py \
|
||||
unicode_keysym_entries \
|
||||
< $< > $@
|
||||
eek-xkeysym-keysym-entries.h: xkeysym-keysym-entries.txt
|
||||
$(AM_V_GEN) $(PYTHON) $(srcdir)/gen-keysym-entries.py \
|
||||
xkeysym_keysym_entries \
|
||||
< $< > $@
|
||||
|
||||
eek-enumtypes.h: $(libeek_public_headers) eek-enumtypes.h.template
|
||||
$(AM_V_GEN) $(GLIB_MKENUMS) \
|
||||
--template $(srcdir)/eek-enumtypes.h.template \
|
||||
$(libeek_public_headers) > eek-enumtypes.h.tmp && \
|
||||
mv eek-enumtypes.h.tmp eek-enumtypes.h
|
||||
|
||||
eek-enumtypes.c: $(libeek_public_headers) eek-enumtypes.c.template
|
||||
$(AM_V_GEN) $(GLIB_MKENUMS) \
|
||||
--template $(srcdir)/eek-enumtypes.c.template \
|
||||
$(libeek_public_headers) > eek-enumtypes.c.tmp && \
|
||||
mv eek-enumtypes.c.tmp eek-enumtypes.c
|
||||
|
||||
# gen marshal
|
||||
eek-marshalers.h: eek-marshalers.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_eek_marshal $(srcdir)/eek-marshalers.list \
|
||||
--header --internal > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
eek-marshalers.c: eek-marshalers.list eek-marshalers.h
|
||||
$(AM_V_GEN) (echo "#include \"eek-marshalers.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=_eek_marshal \
|
||||
$(srcdir)/eek-marshalers.list --body --internal) > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
eek-$(EEK_API_VERSION).pc \
|
||||
eek-gtk-$(EEK_API_VERSION).pc \
|
||||
eek-xkl-$(EEK_API_VERSION).pc \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES =
|
||||
|
||||
DISTCLEANFILES = \
|
||||
$(BUILT_SOURCES) \
|
||||
$(pkgconfig_DATA) \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST = \
|
||||
gen-keysym-entries.py \
|
||||
special-keysym-entries.txt \
|
||||
unicode-keysym-entries.txt \
|
||||
xkeysym-keysym-entries.txt \
|
||||
eek-enumtypes.h.template \
|
||||
eek-enumtypes.c.template \
|
||||
eek-marshalers.list \
|
||||
$(NULL)
|
||||
|
||||
-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 = \
|
||||
--identifier-prefix=Eek \
|
||||
--symbol-prefix=eek \
|
||||
--pkg=glib-2.0 \
|
||||
--pkg-export=eek-$(EEK_API_VERSION) \
|
||||
$(NULL)
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_la_CFLAGS)
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek.la
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_FILES = \
|
||||
$(libeek_sources) \
|
||||
$(libeek_public_headers) \
|
||||
$(builddir)/eek-enumtypes.h \
|
||||
$(NULL)
|
||||
|
||||
EekGtk@EEK_LIBRARY_SUFFIX@.gir: libeek-gtk.la Eek@EEK_LIBRARY_SUFFIX@.gir
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = \
|
||||
--identifier-prefix=Eek \
|
||||
--symbol-prefix=eek \
|
||||
--pkg-export=eek-gtk-$(EEK_API_VERSION) \
|
||||
$(NULL)
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = \
|
||||
GObject-2.0 \
|
||||
Gtk-@GTK_API_VERSION@ \
|
||||
Eek@EEK_LIBRARY_SUFFIX@ \
|
||||
$(NULL)
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_gtk_la_CFLAGS)
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-gtk.la
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_FILES = \
|
||||
$(libeek_gtk_sources) \
|
||||
$(libeek_gtk_public_headers) \
|
||||
$(NULL)
|
||||
|
||||
EekXkl@EEK_LIBRARY_SUFFIX@.gir: libeek-xkl.la Eek@EEK_LIBRARY_SUFFIX@.gir
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = \
|
||||
--identifier-prefix=Eek \
|
||||
--symbol-prefix=eek \
|
||||
$(NULL)
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Eek@EEK_LIBRARY_SUFFIX@
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_xkl_la_CFLAGS)
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-xkl.la
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_FILES = \
|
||||
$(libeek_xkl_sources) \
|
||||
$(libeek_xkl_public_headers) \
|
||||
$(NULL)
|
||||
|
||||
INTROSPECTION_GIRS += \
|
||||
Eek@EEK_LIBRARY_SUFFIX@.gir \
|
||||
EekGtk@EEK_LIBRARY_SUFFIX@.gir \
|
||||
EekXkl@EEK_LIBRARY_SUFFIX@.gir \
|
||||
$(NULL)
|
||||
|
||||
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
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@ -66,7 +66,7 @@ struct _EekKeyPrivate
|
||||
EekSymbolMatrix *symbol_matrix;
|
||||
gint column;
|
||||
gint row;
|
||||
gulong oref; // UI outline reference
|
||||
gulong oref;
|
||||
gboolean is_pressed;
|
||||
gboolean is_locked;
|
||||
};
|
||||
|
||||
@ -199,21 +199,32 @@ void
|
||||
_eek_rounded_polygon (cairo_t *cr,
|
||||
gdouble radius,
|
||||
EekPoint *points,
|
||||
guint num_points)
|
||||
gint num_points)
|
||||
{
|
||||
gint i, j;
|
||||
|
||||
cairo_move_to (cr,
|
||||
(gdouble) (points[num_points - 1].x +
|
||||
points[0].x) / 2,
|
||||
(gdouble) (points[num_points - 1].y +
|
||||
points[0].y) / 2);
|
||||
|
||||
for (guint i = 0; i < num_points; i++) {
|
||||
guint j = (i + 1) % num_points;
|
||||
|
||||
#ifdef KBDRAW_DEBUG
|
||||
printf (" rounded polygon of radius %f:\n", radius);
|
||||
#endif
|
||||
for (i = 0; i < num_points; i++) {
|
||||
j = (i + 1) % num_points;
|
||||
rounded_corner (cr, (gdouble) points[i].x,
|
||||
(gdouble) points[i].y,
|
||||
(gdouble) (points[i].x + points[j].x) / 2,
|
||||
(gdouble) (points[i].y + points[j].y) / 2,
|
||||
radius);
|
||||
}
|
||||
#ifdef KBDRAW_DEBUG
|
||||
printf (" corner (%d, %d) -> (%d, %d):\n",
|
||||
points[i].x, points[i].y, points[j].x,
|
||||
points[j].y);
|
||||
#endif
|
||||
};
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ void eek_keyboard_press_key(EekKeyboard *keyboard, EekKey *key, guint32 timestam
|
||||
// "Borrowed" from eek-context-service; doesn't influence the state but forwards the event
|
||||
|
||||
guint keycode = eek_key_get_keycode (key);
|
||||
EekModifierType modifiers = eek_keyboard_get_modifiers (keyboard);
|
||||
guint modifiers = eek_keyboard_get_modifiers (keyboard);
|
||||
|
||||
emit_key_activated(keyboard->manager, keyboard, keycode, symbol, modifiers, TRUE, timestamp);
|
||||
}
|
||||
|
||||
@ -48,8 +48,6 @@ typedef struct _EekKeyboardPrivate EekKeyboardPrivate;
|
||||
*
|
||||
* Contains the state of the physical keyboard.
|
||||
*
|
||||
* Is also a graphical element...
|
||||
*
|
||||
* The #EekKeyboard structure contains only private data and should
|
||||
* only be accessed using the provided API.
|
||||
*/
|
||||
|
||||
@ -177,7 +177,7 @@ get_modifier_mask (guint xkeysym)
|
||||
case EEK_KEYSYM_Shift_Lock:
|
||||
return EEK_SHIFT_MASK;
|
||||
case EEK_KEYSYM_ISO_Level3_Shift:
|
||||
return EEK_BUTTON1_MASK;
|
||||
return EEK_MOD5_MASK;
|
||||
case EEK_KEYSYM_Control_L:
|
||||
case EEK_KEYSYM_Control_R:
|
||||
return EEK_CONTROL_MASK;
|
||||
|
||||
@ -79,7 +79,7 @@ typedef struct _TextProperty TextProperty;
|
||||
extern void _eek_rounded_polygon (cairo_t *cr,
|
||||
gdouble radius,
|
||||
EekPoint *points,
|
||||
guint num_points);
|
||||
gint num_points);
|
||||
|
||||
static void eek_renderer_real_render_key_label (EekRenderer *self,
|
||||
PangoLayout *layout,
|
||||
@ -116,8 +116,8 @@ create_keyboard_surface_key_callback (EekElement *element,
|
||||
cairo_rectangle (data->cr,
|
||||
0.0,
|
||||
0.0,
|
||||
bounds.width * priv->scale + 100,
|
||||
bounds.height * priv->scale + 100);
|
||||
bounds.width * priv->scale,
|
||||
bounds.height * priv->scale);
|
||||
cairo_clip (data->cr);
|
||||
render_key (data->renderer, data->cr, EEK_KEY(element), FALSE);
|
||||
|
||||
@ -205,6 +205,8 @@ render_key_outline (EekRenderer *renderer,
|
||||
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(renderer);
|
||||
EekOutline *outline;
|
||||
EekBounds bounds;
|
||||
gdouble scale;
|
||||
gint i;
|
||||
guint oref;
|
||||
EekThemeNode *theme_node;
|
||||
EekColor foreground, background, gradient_start, gradient_end, border_color;
|
||||
@ -231,14 +233,14 @@ render_key_outline (EekRenderer *renderer,
|
||||
border_width = eek_theme_node_get_border_width (theme_node,
|
||||
EEK_SIDE_TOP);
|
||||
border_radius = eek_theme_node_get_border_radius (theme_node,
|
||||
EEK_CORNER_TOPLEFT);
|
||||
EEK_SIDE_TOP);
|
||||
eek_theme_node_get_border_color (theme_node, EEK_SIDE_TOP,
|
||||
&border_color);
|
||||
} else {
|
||||
foreground = priv->default_foreground_color;
|
||||
background = priv->default_background_color;
|
||||
gradient_type = EEK_GRADIENT_NONE;
|
||||
border_width = (gint)round(priv->border_width);
|
||||
border_width = priv->border_width;
|
||||
border_radius = -1;
|
||||
border_color.red = ABS(background.red - foreground.red) * 0.7;
|
||||
border_color.green = ABS(background.green - foreground.green) * 0.7;
|
||||
@ -246,15 +248,21 @@ render_key_outline (EekRenderer *renderer,
|
||||
border_color.alpha = foreground.alpha;
|
||||
}
|
||||
|
||||
/* need to rescale so that the border fit inside the clipping
|
||||
region */
|
||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||
scale = MIN((bounds.width - border_width * 2) / bounds.width,
|
||||
(bounds.height - border_width * 2) / bounds.height);
|
||||
|
||||
outline = eek_outline_copy (outline);
|
||||
for (guint i = 0; i < outline->num_points; i++) {
|
||||
outline->points[i].x *= priv->scale;
|
||||
outline->points[i].y *= priv->scale;
|
||||
for (i = 0; i < outline->num_points; i++) {
|
||||
outline->points[i].x *= priv->scale * scale;
|
||||
outline->points[i].y *= priv->scale * scale;
|
||||
}
|
||||
|
||||
cairo_translate (cr,
|
||||
border_width * priv->scale,
|
||||
border_width * priv->scale);
|
||||
border_width * priv->scale * scale,
|
||||
border_width * priv->scale * scale);
|
||||
|
||||
if (gradient_type != EEK_GRADIENT_NONE) {
|
||||
cairo_pattern_t *pat;
|
||||
@ -332,10 +340,6 @@ render_key_outline (EekRenderer *renderer,
|
||||
outline->num_points);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_translate (cr,
|
||||
-border_width * priv->scale,
|
||||
-border_width * priv->scale);
|
||||
|
||||
eek_outline_free (outline);
|
||||
}
|
||||
|
||||
@ -460,11 +464,10 @@ render_key (EekRenderer *self,
|
||||
if (!outline_surface) {
|
||||
cairo_t *cr;
|
||||
|
||||
// Outline will be drawn on the outside of the button, so the surface needs to be bigger than the button
|
||||
outline_surface =
|
||||
cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
(int)ceil(bounds.width) + 10,
|
||||
(int)ceil(bounds.height) + 10);
|
||||
bounds.width,
|
||||
bounds.height);
|
||||
cr = cairo_create (outline_surface);
|
||||
|
||||
/* blank background */
|
||||
@ -637,7 +640,7 @@ eek_renderer_real_render_key_label (EekRenderer *self,
|
||||
|
||||
size = calculate_font_size (self, base_font, FALSE);
|
||||
priv->font = pango_font_description_copy (base_font);
|
||||
pango_font_description_set_size (priv->font, size * 0.6);
|
||||
pango_font_description_set_size (priv->font, size);
|
||||
}
|
||||
|
||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||
|
||||
@ -129,7 +129,7 @@ static EekKey *
|
||||
eek_section_real_create_key (EekSection *self,
|
||||
guint keycode,
|
||||
gint column_index,
|
||||
guint row_index)
|
||||
gint row_index)
|
||||
{
|
||||
EekKey *key;
|
||||
gint num_rows;
|
||||
@ -479,80 +479,3 @@ eek_section_create_key (EekSection *section,
|
||||
column,
|
||||
row);
|
||||
}
|
||||
|
||||
static void keysizer(EekElement *element, gpointer user_data) {
|
||||
EekKey *key = EEK_KEY(element);
|
||||
EekKeyboard *keyboard = EEK_KEYBOARD(user_data);
|
||||
uint oref = eek_key_get_oref (key);
|
||||
EekOutline *outline = eek_keyboard_get_outline (keyboard, oref);
|
||||
if (outline && outline->num_points > 0) {
|
||||
double minx = outline->points[0].x;
|
||||
double maxx = minx;
|
||||
double miny = outline->points[0].y;
|
||||
double maxy = miny;
|
||||
for (uint i = 1; i < outline->num_points; i++) {
|
||||
EekPoint p = outline->points[i];
|
||||
if (p.x < minx) {
|
||||
minx = p.x;
|
||||
} else if (p.x > maxx) {
|
||||
maxx = p.x;
|
||||
}
|
||||
|
||||
if (p.y < miny) {
|
||||
miny = p.y;
|
||||
} else if (p.y > maxy) {
|
||||
maxy = p.y;
|
||||
}
|
||||
}
|
||||
EekBounds key_bounds = {0};
|
||||
eek_element_get_bounds(element, &key_bounds);
|
||||
key_bounds.height = maxy - miny;
|
||||
key_bounds.width = maxx - minx;
|
||||
eek_element_set_bounds(element, &key_bounds);
|
||||
}
|
||||
}
|
||||
|
||||
struct keys_info {
|
||||
uint count;
|
||||
double total_width;
|
||||
double biggest_height;
|
||||
};
|
||||
|
||||
static void keycounter (EekElement *element, gpointer user_data) {
|
||||
struct keys_info *data = user_data;
|
||||
data->count++;
|
||||
EekBounds key_bounds = {0};
|
||||
eek_element_get_bounds(element, &key_bounds);
|
||||
data->total_width += key_bounds.width;
|
||||
if (key_bounds.height > data->biggest_height) {
|
||||
data->biggest_height = key_bounds.height;
|
||||
}
|
||||
}
|
||||
|
||||
const double keyspacing = 4.0;
|
||||
|
||||
static void keyplacer(EekElement *element, gpointer user_data) {
|
||||
double *current_offset = user_data;
|
||||
EekBounds key_bounds = {0};
|
||||
eek_element_get_bounds(element, &key_bounds);
|
||||
key_bounds.x = *current_offset;
|
||||
key_bounds.y = 0;
|
||||
eek_element_set_bounds(element, &key_bounds);
|
||||
*current_offset += key_bounds.width + keyspacing;
|
||||
}
|
||||
|
||||
void eek_section_place_keys(EekSection *section, EekKeyboard *keyboard)
|
||||
{
|
||||
eek_container_foreach_child(EEK_CONTAINER(section), keysizer, keyboard);
|
||||
|
||||
struct keys_info keyinfo = {0};
|
||||
eek_container_foreach_child(EEK_CONTAINER(section), keycounter, &keyinfo);
|
||||
EekBounds section_bounds = {0};
|
||||
eek_element_get_bounds(EEK_ELEMENT(section), §ion_bounds);
|
||||
|
||||
double key_offset = (section_bounds.width - (keyinfo.total_width + (keyinfo.count - 1) * keyspacing)) / 2;
|
||||
eek_container_foreach_child(EEK_CONTAINER(section), keyplacer, &key_offset);
|
||||
|
||||
section_bounds.height = keyinfo.biggest_height;
|
||||
eek_element_set_bounds(EEK_ELEMENT(section), §ion_bounds);
|
||||
}
|
||||
|
||||
@ -127,7 +127,5 @@ EekKey *eek_section_create_key (EekSection *section,
|
||||
EekKey *eek_section_find_key_by_keycode (EekSection *section,
|
||||
guint keycode);
|
||||
|
||||
void eek_section_place_keys (EekSection *section, EekKeyboard *keyboard);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_SECTION_H */
|
||||
|
||||
@ -214,7 +214,7 @@ struct _EekOutline
|
||||
/*< public >*/
|
||||
gdouble corner_radius;
|
||||
EekPoint *points;
|
||||
guint num_points;
|
||||
gint num_points;
|
||||
};
|
||||
|
||||
GType eek_outline_get_type (void) G_GNUC_CONST;
|
||||
|
||||
@ -362,6 +362,9 @@ geometry_start_element_callback (GMarkupParseContext *pcontext,
|
||||
eek_element_set_bounds (EEK_ELEMENT(data->keyboard), &bounds);
|
||||
else if (g_strcmp0 (data->element_stack->data, "section") == 0)
|
||||
eek_element_set_bounds (EEK_ELEMENT(data->section), &bounds);
|
||||
else if (g_strcmp0 (data->element_stack->data, "key") == 0)
|
||||
eek_element_set_bounds (EEK_ELEMENT(data->key), &bounds);
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -501,6 +504,7 @@ geometry_end_element_callback (GMarkupParseContext *pcontext,
|
||||
{
|
||||
GeometryParseData *data = user_data;
|
||||
GSList *head = data->element_stack;
|
||||
gint i;
|
||||
|
||||
g_free (head->data);
|
||||
data->element_stack = g_slist_next (data->element_stack);
|
||||
@ -532,8 +536,7 @@ geometry_end_element_callback (GMarkupParseContext *pcontext,
|
||||
outline->num_points = g_slist_length (data->points);
|
||||
outline->points = g_slice_alloc0 (sizeof (EekPoint) *
|
||||
outline->num_points);
|
||||
guint i;
|
||||
for (i = 0, head = data->points = g_slist_reverse (data->points);
|
||||
for (head = data->points = g_slist_reverse (data->points), i = 0;
|
||||
head && i < outline->num_points;
|
||||
head = g_slist_next (head), i++) {
|
||||
memcpy (&outline->points[i], head->data, sizeof (EekPoint));
|
||||
@ -637,13 +640,13 @@ symbols_start_element_callback (GMarkupParseContext *pcontext,
|
||||
|
||||
data->key = eek_keyboard_find_key_by_keycode (data->keyboard,
|
||||
keycode);
|
||||
/*if (data->key == NULL) {
|
||||
if (data->key == NULL) {
|
||||
g_set_error (error,
|
||||
G_MARKUP_ERROR,
|
||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
"no such keycode %u", keycode);
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
attribute = get_attribute (attribute_names, attribute_values,
|
||||
"groups");
|
||||
@ -718,10 +721,6 @@ symbols_end_element_callback (GMarkupParseContext *pcontext,
|
||||
text = g_strndup (data->text->str, data->text->len);
|
||||
|
||||
if (g_strcmp0 (element_name, "key") == 0) {
|
||||
if (!data->key) {
|
||||
return;
|
||||
}
|
||||
|
||||
gint num_symbols = g_slist_length (data->symbols);
|
||||
gint levels = num_symbols / data->groups;
|
||||
EekSymbolMatrix *matrix = eek_symbol_matrix_new (data->groups,
|
||||
@ -949,7 +948,7 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
|
||||
|
||||
/* Use pre-defined modifier mask here. */
|
||||
eek_keyboard_set_num_lock_mask (keyboard, EEK_MOD2_MASK);
|
||||
eek_keyboard_set_alt_gr_mask (keyboard, EEK_BUTTON1_MASK);
|
||||
eek_keyboard_set_alt_gr_mask (keyboard, EEK_MOD5_MASK);
|
||||
|
||||
return keyboard;
|
||||
}
|
||||
@ -1133,38 +1132,6 @@ eek_xml_keyboard_desc_free (EekXmlKeyboardDesc *desc)
|
||||
g_slice_free (EekXmlKeyboardDesc, desc);
|
||||
}
|
||||
|
||||
struct place_data {
|
||||
double desired_width;
|
||||
double current_offset;
|
||||
EekKeyboard *keyboard;
|
||||
};
|
||||
|
||||
const double section_spacing = 7.0;
|
||||
|
||||
static void section_placer(EekElement *element, gpointer user_data) {
|
||||
struct place_data *data = (struct place_data*)user_data;
|
||||
|
||||
EekBounds section_bounds = {0};
|
||||
eek_element_get_bounds(element, §ion_bounds);
|
||||
section_bounds.width = data->desired_width;
|
||||
eek_element_set_bounds(element, §ion_bounds);
|
||||
|
||||
// Sections are rows now. Gather up all the keys and adjust their bounds.
|
||||
eek_section_place_keys(EEK_SECTION(element), EEK_KEYBOARD(data->keyboard));
|
||||
|
||||
eek_element_get_bounds(element, §ion_bounds);
|
||||
section_bounds.y = data->current_offset;
|
||||
eek_element_set_bounds(element, §ion_bounds);
|
||||
data->current_offset += section_bounds.height + section_spacing;
|
||||
}
|
||||
|
||||
static void section_counter(EekElement *element, gpointer user_data) {
|
||||
double *total_height = user_data;
|
||||
EekBounds section_bounds = {0};
|
||||
eek_element_get_bounds(element, §ion_bounds);
|
||||
*total_height += section_bounds.height + section_spacing;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_geometry (const gchar *path, EekKeyboard *keyboard, GError **error)
|
||||
{
|
||||
@ -1217,27 +1184,6 @@ parse_geometry (const gchar *path, EekKeyboard *keyboard, GError **error)
|
||||
}
|
||||
g_hash_table_destroy (oref_hash);
|
||||
|
||||
/* Order rows */
|
||||
// This needs to be done after outlines, because outlines define key sizes
|
||||
// TODO: do this only for rows without bounds
|
||||
|
||||
// The keyboard width is given by the user via screen size. The height will be given dynamically.
|
||||
// TODO: calculate max line width beforehand for button centering. Leave keyboard centering to the renderer later
|
||||
EekBounds keyboard_bounds = {0};
|
||||
eek_element_get_bounds(EEK_ELEMENT(keyboard), &keyboard_bounds);
|
||||
|
||||
struct place_data placer_data = {
|
||||
.desired_width = keyboard_bounds.width,
|
||||
.current_offset = 0,
|
||||
.keyboard = keyboard,
|
||||
};
|
||||
eek_container_foreach_child(EEK_CONTAINER(keyboard), section_placer, &placer_data);
|
||||
|
||||
double total_height = 0;
|
||||
eek_container_foreach_child(EEK_CONTAINER(keyboard), section_counter, &total_height);
|
||||
keyboard_bounds.height = total_height;
|
||||
eek_element_set_bounds(EEK_ELEMENT(keyboard), &keyboard_bounds);
|
||||
|
||||
geometry_parse_data_free (data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
0xFF9E "Ins" EEK_SYMBOL_CATEGORY_FUNCTION
|
||||
0xFF9F "Del" EEK_SYMBOL_CATEGORY_FUNCTION
|
||||
# aliases
|
||||
0xFE03 "123" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||
0xFE03 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||
0xFE04 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||
0xFE05 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||
0xFE08 "Next" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||
|
||||
136
eekboard/Makefile.am
Normal file
136
eekboard/Makefile.am
Normal file
@ -0,0 +1,136 @@
|
||||
# Copyright (C) 2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
NULL =
|
||||
|
||||
lib_LTLIBRARIES = libeekboard.la
|
||||
|
||||
libeekboard_headers = \
|
||||
$(srcdir)/eekboard-service.h \
|
||||
$(srcdir)/eekboard-context-service.h \
|
||||
$(srcdir)/eekboard-client.h \
|
||||
$(srcdir)/eekboard-context.h \
|
||||
$(srcdir)/eekboard-xklutil.h \
|
||||
$(NULL)
|
||||
|
||||
libeekboard_private_headers = \
|
||||
$(builddir)/eekboard-marshalers.h \
|
||||
$(NULL)
|
||||
|
||||
libeekboard_sources = \
|
||||
$(srcdir)/eekboard-service.c \
|
||||
$(srcdir)/eekboard-context-service.c \
|
||||
$(srcdir)/eekboard-client.c \
|
||||
$(srcdir)/eekboard-context.c \
|
||||
$(srcdir)/eekboard-xklutil.c \
|
||||
$(NULL)
|
||||
|
||||
libeekboard_marshalers_sources = \
|
||||
$(builddir)/eekboard-marshalers.c \
|
||||
$(builddir)/eekboard-marshalers.h \
|
||||
$(NULL)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(libeekboard_marshalers_sources) \
|
||||
$(NULL)
|
||||
|
||||
libeekboard_la_SOURCES = \
|
||||
$(libeekboard_sources) \
|
||||
$(builddir)/eekboard-marshalers.c \
|
||||
$(NULL)
|
||||
|
||||
libeekboard_la_CFLAGS = \
|
||||
-DEEKBOARD_COMPILATION=1 \
|
||||
-DKEYBOARDDIR=\"$(pkgdatadir)/keyboards\" \
|
||||
-I$(top_srcdir) \
|
||||
$(GIO2_CFLAGS) \
|
||||
$(LIBXKLAVIER_CFLAGS) \
|
||||
$(NULL)
|
||||
libeekboard_la_LIBADD = \
|
||||
$(top_builddir)/eek/libeek.la \
|
||||
$(top_builddir)/eek/libeek-xkl.la \
|
||||
$(GIO2_LIBS) \
|
||||
$(LIBXKLAVIER_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
eekboarddir = $(includedir)/eekboard-$(EEK_API_VERSION)/eekboard
|
||||
eekboard_HEADERS = $(libeekboard_headers)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
eekboard-$(EEK_API_VERSION).pc \
|
||||
$(NULL)
|
||||
DISTCLEANFILES = \
|
||||
$(BUILT_SOURCES) \
|
||||
$(pkgconfig_DATA) \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES =
|
||||
|
||||
EXTRA_DIST = eekboard-marshalers.list
|
||||
|
||||
# gen marshal
|
||||
eekboard-marshalers.h: eekboard-marshalers.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_eekboard_marshal \
|
||||
$(srcdir)/eekboard-marshalers.list --header --internal \
|
||||
> $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
eekboard-marshalers.c: eekboard-marshalers.list eekboard-marshalers.h
|
||||
$(AM_V_GEN) (echo "#include \"eekboard-marshalers.h\""; \
|
||||
$(GLIB_GENMARSHAL) \
|
||||
--prefix=_eekboard_marshal \
|
||||
$(srcdir)/eekboard-marshalers.list --body --internal) \
|
||||
> $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
INTROSPECTION_GIRS =
|
||||
INTROSPECTION_SCANNER_ARGS = \
|
||||
--add-include-path=$(builddir) \
|
||||
--add-include-path=$(top_builddir)/eek \
|
||||
$(NULL)
|
||||
INTROSPECTION_COMPILER_ARGS = \
|
||||
--includedir=$(builddir) \
|
||||
--includedir=$(top_builddir)/eek \
|
||||
$(NULL)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
Eekboard@EEK_LIBRARY_SUFFIX@.gir: libeekboard.la
|
||||
Eekboard@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = \
|
||||
--identifier-prefix=Eekboard \
|
||||
--symbol-prefix=eekboard \
|
||||
$(NULL)
|
||||
Eekboard@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = Eek@EEK_LIBRARY_SUFFIX@
|
||||
Eekboard@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeekboard_la_CFLAGS)
|
||||
Eekboard@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeekboard.la
|
||||
Eekboard@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeekboard_sources) $(libeekboard_headers)
|
||||
|
||||
INTROSPECTION_GIRS += Eekboard@EEK_LIBRARY_SUFFIX@.gir
|
||||
|
||||
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
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@ -136,9 +136,6 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
|
||||
}
|
||||
}
|
||||
keyboard = eek_keyboard_new (self, layout, CSW, CSH);
|
||||
if (!keyboard) {
|
||||
g_error("Failed to create a keyboard");
|
||||
}
|
||||
g_object_unref (layout);
|
||||
|
||||
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||
|
||||
@ -34,8 +34,7 @@ typedef struct {
|
||||
struct xkb_keymap *keymap; // unowned copy
|
||||
XkbDescRec *xkb;
|
||||
guint modifier_keycodes[8];
|
||||
guint modifier_indices[MOD_IDX_LAST];
|
||||
guint group;
|
||||
gint group;
|
||||
} SeatEmitter;
|
||||
|
||||
|
||||
@ -115,7 +114,7 @@ get_keycode_from_gdk_keymap (SeatEmitter *emitter,
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < n_keys; i++)
|
||||
if ((guint)keys[i].group == emitter->group)
|
||||
if (keys[i].group == emitter->group)
|
||||
best_match = &keys[i];
|
||||
|
||||
if (!best_match) {
|
||||
@ -141,23 +140,25 @@ int send_virtual_keyboard_key(
|
||||
}
|
||||
|
||||
static void
|
||||
send_fake_modifiers_events (SeatEmitter *emitter,
|
||||
send_fake_modifier_key_event (SeatEmitter *emitter,
|
||||
EekModifierType modifiers,
|
||||
gboolean is_pressed,
|
||||
uint32_t timestamp)
|
||||
{
|
||||
(void)timestamp;
|
||||
unsigned long i;
|
||||
|
||||
uint32_t proto_modifiers = 0;
|
||||
if (modifiers & EEK_SHIFT_MASK) {
|
||||
proto_modifiers |= 1<<MOD_IDX_SHIFT;
|
||||
for (i = 0; i < G_N_ELEMENTS(emitter->modifier_keycodes); i++) {
|
||||
if (modifiers & (1 << i)) {
|
||||
guint keycode = emitter->modifier_keycodes[i];
|
||||
printf("Trying to send a modifier %ld press %d\n", i, is_pressed);
|
||||
g_return_if_fail (keycode > 0);
|
||||
|
||||
send_virtual_keyboard_key (emitter->virtual_keyboard,
|
||||
keycode,
|
||||
is_pressed,
|
||||
timestamp);
|
||||
}
|
||||
}
|
||||
if (modifiers & EEK_CONTROL_MASK) {
|
||||
proto_modifiers |= 1<<MOD_IDX_CTRL;
|
||||
}
|
||||
if (modifiers & EEK_MOD1_MASK) {
|
||||
proto_modifiers |= 1<<MOD_IDX_ALT;
|
||||
}
|
||||
zwp_virtual_keyboard_v1_modifiers(emitter->virtual_keyboard, proto_modifiers, 0, 0, emitter->group);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -189,14 +190,19 @@ send_fake_key_event (SeatEmitter *emitter,
|
||||
keyboard_modifiers &= (unsigned)~EEK_SHIFT_MASK;
|
||||
keyboard_modifiers &= (unsigned)~EEK_LOCK_MASK;
|
||||
/* FIXME: may need to remap ISO_Level3_Shift and NumLock */
|
||||
#if 0
|
||||
keyboard_modifiers &= ~EEK_MOD5_MASK;
|
||||
keyboard_modifiers &= ~client->alt_gr_mask;
|
||||
keyboard_modifiers &= ~client->num_lock_mask;
|
||||
#endif
|
||||
|
||||
modifiers |= keyboard_modifiers;
|
||||
|
||||
send_fake_modifiers_events (emitter, modifiers, timestamp);
|
||||
send_fake_modifier_key_event (emitter, modifiers, TRUE, timestamp);
|
||||
|
||||
// There's something magical about subtracting/adding 8 to keycodes for some reason
|
||||
send_virtual_keyboard_key (emitter->virtual_keyboard, keycode - 8, (unsigned)pressed, timestamp);
|
||||
send_fake_modifiers_events (emitter, modifiers, timestamp);
|
||||
send_fake_modifier_key_event (emitter, modifiers, FALSE, timestamp);
|
||||
|
||||
if (old_keysym != xkeysym)
|
||||
replace_keycode (emitter, keycode, &old_keysym);
|
||||
@ -205,7 +211,7 @@ send_fake_key_event (SeatEmitter *emitter,
|
||||
static void
|
||||
send_fake_key_events (SeatEmitter *emitter,
|
||||
EekSymbol *symbol,
|
||||
EekModifierType keyboard_modifiers,
|
||||
guint keyboard_modifiers,
|
||||
gboolean pressed,
|
||||
uint32_t timestamp)
|
||||
{
|
||||
@ -247,48 +253,12 @@ send_fake_key_events (SeatEmitter *emitter,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Finds the first key code for each modifier and saves it in modifier_keycodes */
|
||||
static void
|
||||
update_modifier_info (SeatEmitter *client)
|
||||
{
|
||||
client->modifier_indices[MOD_IDX_SHIFT] = xkb_keymap_mod_get_index(client->keymap, XKB_MOD_NAME_SHIFT);
|
||||
client->modifier_indices[MOD_IDX_CAPS] = xkb_keymap_mod_get_index(client->keymap, XKB_MOD_NAME_CAPS);
|
||||
client->modifier_indices[MOD_IDX_CTRL] = xkb_keymap_mod_get_index(client->keymap, XKB_MOD_NAME_CTRL);
|
||||
client->modifier_indices[MOD_IDX_ALT] = xkb_keymap_mod_get_index(client->keymap, XKB_MOD_NAME_ALT);
|
||||
client->modifier_indices[MOD_IDX_NUM] = xkb_keymap_mod_get_index(client->keymap, XKB_MOD_NAME_NUM);
|
||||
client->modifier_indices[MOD_IDX_MOD3] = xkb_keymap_mod_get_index(client->keymap, "Mod3");
|
||||
client->modifier_indices[MOD_IDX_LOGO] = xkb_keymap_mod_get_index(client->keymap, XKB_MOD_NAME_LOGO);
|
||||
client->modifier_indices[MOD_IDX_ALTGR] = xkb_keymap_mod_get_index(client->keymap, "Mod5");
|
||||
client->modifier_indices[MOD_IDX_NUMLK] = xkb_keymap_mod_get_index(client->keymap, "NumLock");
|
||||
client->modifier_indices[MOD_IDX_ALSO_ALT] = xkb_keymap_mod_get_index(client->keymap, "Alt");
|
||||
client->modifier_indices[MOD_IDX_LVL3] = xkb_keymap_mod_get_index(client->keymap, "LevelThree");
|
||||
client->modifier_indices[MOD_IDX_LALT] = xkb_keymap_mod_get_index(client->keymap, "LAlt");
|
||||
client->modifier_indices[MOD_IDX_RALT] = xkb_keymap_mod_get_index(client->keymap, "RAlt");
|
||||
client->modifier_indices[MOD_IDX_RCONTROL] = xkb_keymap_mod_get_index(client->keymap, "RControl");
|
||||
client->modifier_indices[MOD_IDX_LCONTROL] = xkb_keymap_mod_get_index(client->keymap, "LControl");
|
||||
client->modifier_indices[MOD_IDX_SCROLLLK] = xkb_keymap_mod_get_index(client->keymap, "ScrollLock");
|
||||
client->modifier_indices[MOD_IDX_LVL5] = xkb_keymap_mod_get_index(client->keymap, "LevelFive");
|
||||
client->modifier_indices[MOD_IDX_ALSO_ALTGR] = xkb_keymap_mod_get_index(client->keymap, "AltGr");
|
||||
client->modifier_indices[MOD_IDX_META] = xkb_keymap_mod_get_index(client->keymap, "Meta");
|
||||
client->modifier_indices[MOD_IDX_SUPER] = xkb_keymap_mod_get_index(client->keymap, "Super");
|
||||
client->modifier_indices[MOD_IDX_HYPER] = xkb_keymap_mod_get_index(client->keymap, "Hyper");
|
||||
|
||||
/*
|
||||
for (xkb_mod_index_t i = 0;
|
||||
i < xkb_keymap_num_mods(client->keymap);
|
||||
i++) {
|
||||
g_log("squeek", G_LOG_LEVEL_DEBUG, "%s", xkb_keymap_mod_get_name(client->keymap, i));
|
||||
}*/
|
||||
}
|
||||
|
||||
void
|
||||
emit_key_activated (EekboardContextService *manager,
|
||||
EekKeyboard *keyboard,
|
||||
guint keycode,
|
||||
EekSymbol *symbol,
|
||||
EekModifierType modifiers,
|
||||
guint modifiers,
|
||||
gboolean pressed,
|
||||
uint32_t timestamp)
|
||||
{
|
||||
@ -322,6 +292,72 @@ emit_key_activated (EekboardContextService *manager,
|
||||
SeatEmitter emitter = {0};
|
||||
emitter.virtual_keyboard = manager->virtual_keyboard;
|
||||
emitter.keymap = keyboard->keymap;
|
||||
update_modifier_info (&emitter);
|
||||
send_fake_key_events (&emitter, symbol, modifiers, pressed, timestamp);
|
||||
}
|
||||
|
||||
/* Finds the first key code for each modifier and saves it in modifier_keycodes */
|
||||
static void
|
||||
update_modifier_keycodes (SeatEmitter *client)
|
||||
{
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
Display *xdisplay = NULL; // GDK_DISPLAY_XDISPLAY (display);
|
||||
return; // FIXME: need to get those codes somehow
|
||||
XModifierKeymap *mods;
|
||||
gint i, j;
|
||||
|
||||
//mods = XGetModifierMapping (xdisplay);
|
||||
for (i = 0; i < 8; i++) {
|
||||
client->modifier_keycodes[i] = 0;
|
||||
for (j = 0; j < mods->max_keypermod; j++) {
|
||||
KeyCode keycode = mods->modifiermap[mods->max_keypermod * i + j];
|
||||
if (keycode != 0) {
|
||||
client->modifier_keycodes[i] = keycode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//XFreeModifiermap (mods);
|
||||
}
|
||||
|
||||
gboolean
|
||||
client_enable_xtest (SeatEmitter *client)
|
||||
{
|
||||
//GdkDisplay *display = gdk_display_get_default ();
|
||||
//Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
|
||||
int opcode, event_base, error_base, major_version, minor_version;
|
||||
|
||||
/* FIXME: need at least to fetch an xkb keymap (but what for?)
|
||||
g_assert (display);
|
||||
|
||||
if (!XTestQueryExtension (xdisplay,
|
||||
&event_base, &error_base,
|
||||
&major_version, &minor_version)) {
|
||||
g_warning ("XTest extension is not available");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!XkbQueryExtension (xdisplay,
|
||||
&opcode, &event_base, &error_base,
|
||||
&major_version, &minor_version)) {
|
||||
g_warning ("Xkb extension is not available");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!client->xkb)
|
||||
client->xkb = XkbGetMap (xdisplay, XkbKeySymsMask, XkbUseCoreKbd);
|
||||
g_assert (client->xkb);
|
||||
*/
|
||||
update_modifier_keycodes (client);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
client_disable_xtest (SeatEmitter *client)
|
||||
{
|
||||
//if (client->xkb) {
|
||||
// XkbFreeKeyboard (client->xkb, 0, TRUE); /* free_all = TRUE */
|
||||
//client->xkb = NULL;
|
||||
//}
|
||||
}
|
||||
//#endif /* HAVE_XTEST */
|
||||
|
||||
@ -9,36 +9,6 @@
|
||||
|
||||
#include "virtual-keyboard-unstable-v1-client-protocol.h"
|
||||
|
||||
/// Indices obtained by xkb_keymap_mod_get_name
|
||||
enum mod_indices {
|
||||
MOD_IDX_SHIFT,
|
||||
MOD_IDX_CAPS,
|
||||
MOD_IDX_CTRL,
|
||||
MOD_IDX_ALT,
|
||||
MOD_IDX_NUM,
|
||||
MOD_IDX_MOD3,
|
||||
MOD_IDX_LOGO,
|
||||
MOD_IDX_ALTGR,
|
||||
MOD_IDX_NUMLK, // Caution, not sure which is the right one
|
||||
MOD_IDX_ALSO_ALT, // Not sure why, alt emits the first alt on my setup
|
||||
MOD_IDX_LVL3,
|
||||
|
||||
// Not sure if the next 4 are used at all
|
||||
MOD_IDX_LALT,
|
||||
MOD_IDX_RALT,
|
||||
MOD_IDX_RCONTROL,
|
||||
MOD_IDX_LCONTROL,
|
||||
|
||||
MOD_IDX_SCROLLLK,
|
||||
MOD_IDX_LVL5,
|
||||
MOD_IDX_ALSO_ALTGR, // Not used on my layout
|
||||
MOD_IDX_META,
|
||||
MOD_IDX_SUPER,
|
||||
MOD_IDX_HYPER,
|
||||
|
||||
MOD_IDX_LAST,
|
||||
};
|
||||
|
||||
void
|
||||
emit_key_activated (EekboardContextService *manager, EekKeyboard *keyboard,
|
||||
guint keycode,
|
||||
|
||||
3
examples/Makefile.am
Normal file
3
examples/Makefile.am
Normal file
@ -0,0 +1,3 @@
|
||||
SUBDIRS = simple-client
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
3
examples/simple-client/Makefile.am
Normal file
3
examples/simple-client/Makefile.am
Normal file
@ -0,0 +1,3 @@
|
||||
EXTRA_DIST = simple-client
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
218
git.mk
Normal file
218
git.mk
Normal file
@ -0,0 +1,218 @@
|
||||
# git.mk
|
||||
#
|
||||
# Copyright 2009, Red Hat, Inc.
|
||||
# Copyright 2010,2011 Behdad Esfahbod
|
||||
# Written by Behdad Esfahbod
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# is permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved.
|
||||
#
|
||||
# The canonical source for this file is https://github.com/behdad/git.mk.
|
||||
#
|
||||
# To use in your project, import this file in your git repo's toplevel,
|
||||
# then do "make -f git.mk". This modifies all Makefile.am files in
|
||||
# your project to -include git.mk. Remember to add that line to new
|
||||
# Makefile.am files you create in your project, or just rerun the
|
||||
# "make -f git.mk".
|
||||
#
|
||||
# This enables automatic .gitignore generation. If you need to ignore
|
||||
# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
|
||||
# But think twice before doing that. If a file has to be in .gitignore,
|
||||
# chances are very high that it's a generated file and should be in one
|
||||
# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
|
||||
#
|
||||
# The only case that you need to manually add a file to GITIGNOREFILES is
|
||||
# when remove files in one of mostlyclean-local, clean-local, distclean-local,
|
||||
# or maintainer-clean-local make targets.
|
||||
#
|
||||
# Note that for files like editor backup, etc, there are better places to
|
||||
# ignore them. See "man gitignore".
|
||||
#
|
||||
# If "make maintainer-clean" removes the files but they are not recognized
|
||||
# by this script (that is, if "git status" shows untracked files still), send
|
||||
# me the output of "git status" as well as your Makefile.am and Makefile for
|
||||
# the directories involved and I'll diagnose.
|
||||
#
|
||||
# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
|
||||
# Makefile.am.sample in the git.mk git repo.
|
||||
#
|
||||
# Don't EXTRA_DIST this file. It is supposed to only live in git clones,
|
||||
# not tarballs. It serves no useful purpose in tarballs and clutters the
|
||||
# build dir.
|
||||
#
|
||||
# This file knows how to handle autoconf, automake, libtool, gtk-doc,
|
||||
# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu.
|
||||
#
|
||||
#
|
||||
# KNOWN ISSUES:
|
||||
#
|
||||
# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
|
||||
# submodule doesn't find us. If you have configure.{in,ac} files in
|
||||
# subdirs, add a proxy git.mk file in those dirs that simply does:
|
||||
# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste.
|
||||
# And add those files to git. See vte/gnome-pty-helper/git.mk for
|
||||
# example.
|
||||
#
|
||||
|
||||
git-all: git-mk-install
|
||||
|
||||
git-mk-install:
|
||||
@echo Installing git makefile
|
||||
@any_failed=; \
|
||||
find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \
|
||||
if grep 'include .*/git.mk' $$x >/dev/null; then \
|
||||
echo $$x already includes git.mk; \
|
||||
else \
|
||||
failed=; \
|
||||
echo "Updating $$x"; \
|
||||
{ cat $$x; \
|
||||
echo ''; \
|
||||
echo '-include $$(top_srcdir)/git.mk'; \
|
||||
} > $$x.tmp || failed=1; \
|
||||
if test x$$failed = x; then \
|
||||
mv $$x.tmp $$x || failed=1; \
|
||||
fi; \
|
||||
if test x$$failed = x; then : else \
|
||||
echo Failed updating $$x; >&2 \
|
||||
any_failed=1; \
|
||||
fi; \
|
||||
fi; done; test -z "$$any_failed"
|
||||
|
||||
.PHONY: git-all git-mk-install
|
||||
|
||||
|
||||
### .gitignore generation
|
||||
|
||||
$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
|
||||
$(AM_V_GEN) \
|
||||
{ \
|
||||
if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
|
||||
for x in \
|
||||
$(DOC_MODULE)-decl-list.txt \
|
||||
$(DOC_MODULE)-decl.txt \
|
||||
tmpl/$(DOC_MODULE)-unused.sgml \
|
||||
"tmpl/*.bak" \
|
||||
xml html \
|
||||
; do echo /$$x; done; \
|
||||
fi; \
|
||||
if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
|
||||
for lc in $(DOC_LINGUAS); do \
|
||||
for x in \
|
||||
$(if $(DOC_MODULE),$(DOC_MODULE).xml) \
|
||||
$(DOC_PAGES) \
|
||||
$(DOC_INCLUDES) \
|
||||
; do echo /$$lc/$$x; done; \
|
||||
done; \
|
||||
for x in \
|
||||
$(_DOC_OMF_ALL) \
|
||||
$(_DOC_DSK_ALL) \
|
||||
$(_DOC_HTML_ALL) \
|
||||
$(_DOC_MOFILES) \
|
||||
$(DOC_H_FILE) \
|
||||
"*/.xml2po.mo" \
|
||||
"*/*.omf.out" \
|
||||
; do echo /$$x; done; \
|
||||
fi; \
|
||||
if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
|
||||
for lc in $(HELP_LINGUAS); do \
|
||||
for x in \
|
||||
$(HELP_FILES) \
|
||||
"$$lc.stamp" \
|
||||
"$$lc.mo" \
|
||||
; do echo /$$lc/$$x; done; \
|
||||
done; \
|
||||
fi; \
|
||||
if test "x$(gsettings_SCHEMAS)" = x; then :; else \
|
||||
for x in \
|
||||
$(gsettings_SCHEMAS:.xml=.valid) \
|
||||
$(gsettings__enum_file) \
|
||||
; do echo /$$x; done; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/po/Makefile.in.in; then \
|
||||
for x in \
|
||||
po/Makefile.in.in \
|
||||
po/Makefile.in \
|
||||
po/Makefile \
|
||||
po/POTFILES \
|
||||
po/stamp-it \
|
||||
po/.intltool-merge-cache \
|
||||
"po/*.gmo" \
|
||||
"po/*.mo" \
|
||||
po/$(GETTEXT_PACKAGE).pot \
|
||||
intltool-extract.in \
|
||||
intltool-merge.in \
|
||||
intltool-update.in \
|
||||
; do echo /$$x; done; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/configure; then \
|
||||
for x in \
|
||||
autom4te.cache \
|
||||
configure \
|
||||
config.h \
|
||||
stamp-h1 \
|
||||
libtool \
|
||||
config.lt \
|
||||
; do echo /$$x; done; \
|
||||
fi; \
|
||||
if test "x$(DEJATOOL)" = x; then :; else \
|
||||
for x in \
|
||||
$(DEJATOOL) \
|
||||
; do echo /$$x.sum; echo /$$x.log; done; \
|
||||
echo /site.exp; \
|
||||
fi; \
|
||||
for x in \
|
||||
.gitignore \
|
||||
$(GITIGNOREFILES) \
|
||||
$(CLEANFILES) \
|
||||
$(PROGRAMS) \
|
||||
$(check_PROGRAMS) \
|
||||
$(EXTRA_PROGRAMS) \
|
||||
$(LTLIBRARIES) \
|
||||
so_locations \
|
||||
.libs _libs \
|
||||
$(MOSTLYCLEANFILES) \
|
||||
"*.$(OBJEXT)" \
|
||||
"*.lo" \
|
||||
$(DISTCLEANFILES) \
|
||||
$(am__CONFIG_DISTCLEAN_FILES) \
|
||||
$(CONFIG_CLEAN_FILES) \
|
||||
TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
|
||||
"*.tab.c" \
|
||||
$(MAINTAINERCLEANFILES) \
|
||||
$(BUILT_SOURCES) \
|
||||
$(DEPDIR) \
|
||||
Makefile \
|
||||
Makefile.in \
|
||||
"*.orig" \
|
||||
"*.rej" \
|
||||
"*.bak" \
|
||||
"*~" \
|
||||
".*.sw[nop]" \
|
||||
".dirstamp" \
|
||||
; do echo /$$x; done; \
|
||||
} | \
|
||||
sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
|
||||
sed 's@/[.]/@/@g' | \
|
||||
LC_ALL=C sort | uniq > $@.tmp && \
|
||||
mv $@.tmp $@;
|
||||
|
||||
all: $(srcdir)/.gitignore gitignore-recurse-maybe
|
||||
gitignore-recurse-maybe:
|
||||
@if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
|
||||
fi;
|
||||
gitignore-recurse:
|
||||
@for subdir in $(DIST_SUBDIRS); do \
|
||||
case " $(SUBDIRS) " in \
|
||||
*" $$subdir "*) :;; \
|
||||
*) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \
|
||||
esac; \
|
||||
done
|
||||
gitignore: $(srcdir)/.gitignore gitignore-recurse
|
||||
|
||||
maintainer-clean: gitignore-clean
|
||||
gitignore-clean:
|
||||
-rm -f $(srcdir)/.gitignore
|
||||
|
||||
.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
|
||||
@ -1,7 +1,7 @@
|
||||
project(
|
||||
'squeekboard',
|
||||
'c', 'rust',
|
||||
version: '1.0.10',
|
||||
version: '1.0.9',
|
||||
license: 'GPLv3',
|
||||
meson_version: '>=0.43.0',
|
||||
default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ],
|
||||
@ -19,12 +19,7 @@ endif
|
||||
prefix = get_option('prefix')
|
||||
datadir = join_paths(prefix, get_option('datadir'))
|
||||
pkgdatadir = join_paths(datadir, meson.project_name())
|
||||
if get_option('depdatadir') == ''
|
||||
depdatadir = datadir
|
||||
else
|
||||
depdatadir = get_option('depdatadir')
|
||||
endif
|
||||
dbusdir = join_paths(depdatadir, 'dbus-1/interfaces')
|
||||
dbusdir = join_paths(datadir, 'dbus-1/interfaces')
|
||||
|
||||
subdir('data')
|
||||
subdir('protocols')
|
||||
|
||||
@ -1 +0,0 @@
|
||||
option('depdatadir', type : 'string', value : '', description : 'System data path. Will be searched for definitions instead of datadir when provided')
|
||||
@ -11,7 +11,6 @@ gen_scanner_client_code = generator(wl_scanner,
|
||||
|
||||
wl_protos = [
|
||||
wl_protocol_dir + '/stable/xdg-shell/xdg-shell.xml',
|
||||
wl_protocol_dir + '/unstable/text-input/text-input-unstable-v3.xml',
|
||||
'wlr-layer-shell-unstable-v1.xml',
|
||||
'virtual-keyboard-unstable-v1.xml',
|
||||
'input-method-unstable-v2.xml',
|
||||
|
||||
96
src/Makefile.am
Normal file
96
src/Makefile.am
Normal file
@ -0,0 +1,96 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
bin_PROGRAMS = \
|
||||
eekboard \
|
||||
$(NULL)
|
||||
|
||||
libexec_PROGRAMS = \
|
||||
eekboard-setup \
|
||||
$(NULL)
|
||||
|
||||
eekboard_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GIO2_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(XKB_CFLAGS) \
|
||||
$(LIBXKLAVIER_CFLAGS) \
|
||||
-DLIBEXECDIR=\"$(libexecdir)\" \
|
||||
$(NULL)
|
||||
|
||||
eekboard_LDADD = \
|
||||
$(top_builddir)/eekboard/libeekboard.la \
|
||||
$(top_builddir)/eek/libeek.la \
|
||||
$(top_builddir)/eek/libeek-xkl.la \
|
||||
$(GIO2_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(XKB_LIBS) \
|
||||
$(LIBXKLAVIER_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
if ENABLE_XTEST
|
||||
eekboard_CFLAGS += $(XTEST_CFLAGS)
|
||||
eekboard_LDADD += $(XTEST_LIBS)
|
||||
endif
|
||||
|
||||
if ENABLE_ATSPI
|
||||
eekboard_CFLAGS += $(ATSPI2_CFLAGS)
|
||||
eekboard_LDADD += $(ATSPI2_LIBS)
|
||||
endif
|
||||
|
||||
eekboard_headers = \
|
||||
client.h \
|
||||
$(NULL)
|
||||
|
||||
eekboard_SOURCES = \
|
||||
client.c \
|
||||
client-main.c \
|
||||
$(NULL)
|
||||
|
||||
eekboard_setup_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GIO2_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(XKB_CFLAGS) \
|
||||
$(LIBXKLAVIER_CFLAGS) \
|
||||
-DPKGDATADIR=\"$(pkgdatadir)\" \
|
||||
$(NULL)
|
||||
|
||||
eekboard_setup_headers = \
|
||||
preferences-dialog.h \
|
||||
$(NULL)
|
||||
|
||||
eekboard_setup_SOURCES = \
|
||||
preferences-dialog.c \
|
||||
setup-main.c \
|
||||
$(NULL)
|
||||
|
||||
eekboard_setup_LDADD = \
|
||||
$(top_builddir)/eek/libeek.la \
|
||||
$(GIO2_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
dist_pkgdata_DATA = preferences-dialog.ui
|
||||
|
||||
noinst_HEADERS = \
|
||||
$(eekboard_headers) \
|
||||
$(eekboard_setup_headers) \
|
||||
$(NULL)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@ -1,20 +1,13 @@
|
||||
gnome = import('gnome')
|
||||
dbus_src = gnome.gdbus_codegen(
|
||||
'sm.puri.OSK0',
|
||||
join_paths(dbusdir, 'sm.puri.OSK0.xml')
|
||||
'../data/dbus/sm.puri.OSK0.xml'
|
||||
)
|
||||
|
||||
squeek_enum_headers = [
|
||||
'squeek-input-method.h',
|
||||
]
|
||||
|
||||
squeek_enums = gnome.mkenums_simple('squeek-enumtypes', sources: squeek_enum_headers)
|
||||
|
||||
sources = [
|
||||
'imservice.c',
|
||||
'server-context-service.c',
|
||||
'server-main.c',
|
||||
'squeek-input-method.c',
|
||||
'wayland.c',
|
||||
'../eek/eek.c',
|
||||
'../eek/eek-container.c',
|
||||
@ -40,7 +33,6 @@ sources = [
|
||||
'../eek/layersurface.c',
|
||||
dbus_src,
|
||||
enums,
|
||||
squeek_enums,
|
||||
keysym_entries,
|
||||
marshalers,
|
||||
'../eekboard/keymap.c',
|
||||
@ -54,7 +46,6 @@ sources = [
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
|
||||
deps = [
|
||||
# dependency('glib-2.0', version: '>=2.26.0'),
|
||||
dependency('gio-2.0', version: '>=2.26.0'),
|
||||
@ -64,21 +55,19 @@ deps = [
|
||||
dependency('xkbcommon'),
|
||||
cc.find_library('m'),
|
||||
cc.find_library('rt'),
|
||||
cc.find_library('dl'),
|
||||
cc.find_library('pthread'),
|
||||
cc.find_library('libstd-79f126b09196cdf2'),
|
||||
# dependency('libxklavier'), # FIXME remove
|
||||
]
|
||||
|
||||
# Replacement for eekboard-server
|
||||
rslib = static_library(
|
||||
'rslib',
|
||||
sources: ['imservice.rs'],
|
||||
rust_crate_type: 'staticlib'
|
||||
sources: ['imservice.rs']
|
||||
)
|
||||
|
||||
squeekboard = executable('squeekboard',
|
||||
sources,
|
||||
link_with: rslib,
|
||||
link_with: [rslib],
|
||||
include_directories: [include_directories('..'), include_directories('../eek')],
|
||||
dependencies: deps,
|
||||
install: true,
|
||||
|
||||
@ -143,40 +143,6 @@ static const struct wl_registry_listener registry_listener = {
|
||||
registry_handle_global_remove
|
||||
};
|
||||
|
||||
#define SESSION_NAME "sm.puri.OSK0"
|
||||
|
||||
GDBusProxy *_proxy = NULL;
|
||||
|
||||
static void
|
||||
session_register(void) {
|
||||
char *autostart_id = getenv("DESKTOP_AUTOSTART_ID");
|
||||
if (!autostart_id) {
|
||||
g_debug("No autostart id");
|
||||
autostart_id = "";
|
||||
}
|
||||
GError *error = NULL;
|
||||
_proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL,
|
||||
"org.gnome.SessionManager", "/org/gnome/SessionManager",
|
||||
"org.gnome.SessionManager", NULL, &error);
|
||||
if (error) {
|
||||
g_warning("Could not connect to session manager: %s\n",
|
||||
error->message);
|
||||
g_clear_error(&error);
|
||||
return;
|
||||
}
|
||||
|
||||
g_dbus_proxy_call_sync(_proxy, "RegisterClient",
|
||||
g_variant_new("(ss)", SESSION_NAME, autostart_id),
|
||||
G_DBUS_CALL_FLAGS_NONE, 1000, NULL, &error);
|
||||
if (error) {
|
||||
g_warning("Could not register to session manager: %s\n",
|
||||
error->message);
|
||||
g_clear_error(&error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@ -295,8 +261,6 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
session_register();
|
||||
|
||||
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
g_signal_connect (service, "destroyed", G_CALLBACK(on_destroyed), loop);
|
||||
|
||||
@ -1,544 +0,0 @@
|
||||
/* squeek-input-method.c */
|
||||
#include "squeek-input-method.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct _SqueekInputMethodPrivate {
|
||||
struct zwp_input_method_v2 *input_method;
|
||||
|
||||
gchar *surrounding_text;
|
||||
gchar *preedit_string;
|
||||
|
||||
guint serial;
|
||||
|
||||
guint cursor;
|
||||
guint anchor;
|
||||
|
||||
guint hint;
|
||||
guint purpose;
|
||||
|
||||
gboolean active : 1;
|
||||
gboolean available : 1;
|
||||
} SqueekInputMethodPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(SqueekInputMethod, squeek_input_method, G_TYPE_OBJECT)
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - implement signals for 'done' and ... (?)
|
||||
* - take it for a spin
|
||||
* - fix things
|
||||
* - look at 'zwp_input_popup_surface_v2' and think about it for a while
|
||||
* ....
|
||||
* - add some gir documentation
|
||||
* - double check: everyting
|
||||
*
|
||||
* - MOVE ON
|
||||
*/
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_AVAILABLE,
|
||||
PROP_ACTIVE,
|
||||
PROP_CURSOR_POSITION,
|
||||
PROP_ANCHOR_POSITION,
|
||||
PROP_CONTENT_HINT,
|
||||
PROP_CONTENT_PURPOSE,
|
||||
PROP_SURROUNDING_TEXT,
|
||||
PROP_PREEDIT_STRING,
|
||||
LAST_PROP
|
||||
};
|
||||
|
||||
static GParamSpec *properties[LAST_PROP];
|
||||
|
||||
/* input-method signals */
|
||||
static void
|
||||
squeek_input_method_activate(SqueekInputMethod *self)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
if (!priv->active) {
|
||||
priv->active = TRUE;
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_ACTIVE]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_deactivate(SqueekInputMethod *self)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
if (priv->active) {
|
||||
priv->active = FALSE;
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_ACTIVE]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_surrounding_text(SqueekInputMethod *self,
|
||||
const gchar *text,
|
||||
guint cursor,
|
||||
guint anchor)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
g_clear_pointer(&priv->surrounding_text, g_free);
|
||||
|
||||
priv->surrounding_text = g_strdup(text);
|
||||
priv->cursor = cursor;
|
||||
priv->anchor = anchor;
|
||||
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_SURROUNDING_TEXT]);
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_CURSOR_POSITION]);
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_ANCHOR_POSITION]);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_text_change_cause(SqueekInputMethod *self,
|
||||
guint cause)
|
||||
{
|
||||
fprintf(stderr, "%s: not implemented\n", __func__);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_content_type(SqueekInputMethod *self,
|
||||
guint hint,
|
||||
guint purpose)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
priv->hint = hint;
|
||||
priv->purpose = purpose;
|
||||
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_CONTENT_HINT]);
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_CONTENT_PURPOSE]);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_done(SqueekInputMethod *self)
|
||||
{
|
||||
/*
|
||||
Atomically applies state changes recently sent to the client.
|
||||
|
||||
The done event establishes and updates the state of the client, and
|
||||
must be issued after any changes to apply them.
|
||||
|
||||
Text input state (content purpose, content hint, surrounding text, and
|
||||
change cause) is conceptually double-buffered within an input method
|
||||
context.
|
||||
|
||||
Events modify the pending state, as opposed to the current state in use
|
||||
by the input method. A done event atomically applies all pending state,
|
||||
replacing the current state. After done, the new pending state is as
|
||||
documented for each related request.
|
||||
|
||||
Events must be applied in the order of arrival.
|
||||
|
||||
Neither current nor pending state are modified unless noted otherwise.
|
||||
*/
|
||||
|
||||
fprintf(stderr, "%s: not implemented\n", __func__);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_unavailable(SqueekInputMethod *self)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
priv->available = FALSE;
|
||||
|
||||
g_clear_pointer(&priv->input_method, zwp_input_method_v2_destroy);
|
||||
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_AVAILABLE]);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_input_method_activate(void *data,
|
||||
struct zwp_input_method_v2 *input_method)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->activate(data);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_input_method_deactivate(void *data,
|
||||
struct zwp_input_method_v2 *input_method)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->deactivate(data);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_surrounding_text(void *data,
|
||||
struct zwp_input_method_v2 *input_method,
|
||||
const char *text,
|
||||
uint32_t cursor,
|
||||
uint32_t anchor)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->surrounding_text(data, text, cursor, anchor);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_text_change_cause(void *data,
|
||||
struct zwp_input_method_v2 *input_method,
|
||||
uint32_t cause)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->text_change_cause(data, cause);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_content_type(void *data,
|
||||
struct zwp_input_method_v2 *input_method,
|
||||
uint32_t hint,
|
||||
uint32_t purpose)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->content_type(data, hint, purpose);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_done(void *data,
|
||||
struct zwp_input_method_v2 *input_method)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->done(data);
|
||||
}
|
||||
|
||||
static void
|
||||
imservice_handle_unavailable(void *data,
|
||||
struct zwp_input_method_v2 *input_method)
|
||||
{
|
||||
g_return_if_fail(data && SQUEEK_IS_INPUT_METHOD(data));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(data)->unavailable(data);
|
||||
}
|
||||
|
||||
static const struct zwp_input_method_v2_listener input_method_listener = {
|
||||
.activate = imservice_handle_input_method_activate,
|
||||
.deactivate = imservice_handle_input_method_deactivate,
|
||||
.surrounding_text = imservice_handle_surrounding_text,
|
||||
.text_change_cause = imservice_handle_text_change_cause,
|
||||
.content_type = imservice_handle_content_type,
|
||||
.done = imservice_handle_done,
|
||||
.unavailable = imservice_handle_unavailable,
|
||||
};
|
||||
|
||||
/* input-method requests */
|
||||
static void
|
||||
squeek_input_method_real_commit_string(SqueekInputMethod *self,
|
||||
const gchar *string)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
zwp_input_method_v2_commit_string(priv->input_method,
|
||||
string);
|
||||
}
|
||||
|
||||
void
|
||||
squeek_input_method_commit_string(SqueekInputMethod *self,
|
||||
const gchar *string)
|
||||
{
|
||||
g_return_if_fail(self && SQUEEK_IS_INPUT_METHOD(self));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(self)->commit_string(self,
|
||||
string);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_real_preedit_string(SqueekInputMethod *self,
|
||||
const gchar *text,
|
||||
gint cursor_begin,
|
||||
gint cursor_end)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
g_clear_pointer(&priv->preedit_string, g_free);
|
||||
priv->preedit_string = g_strdup(text);
|
||||
|
||||
/* TODO: think about cursor_[begin|end] */
|
||||
|
||||
zwp_input_method_v2_preedit_string(priv->input_method,
|
||||
priv->preedit_string,
|
||||
cursor_begin,
|
||||
cursor_end);
|
||||
|
||||
g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_PREEDIT_STRING]);
|
||||
}
|
||||
|
||||
void
|
||||
squeek_input_method_preedit_string(SqueekInputMethod *self,
|
||||
const gchar *text,
|
||||
gint cursor_begin,
|
||||
gint cursor_end)
|
||||
{
|
||||
g_return_if_fail(self && SQUEEK_IS_INPUT_METHOD(self));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(self)->preedit_string(self,
|
||||
text,
|
||||
cursor_begin,
|
||||
cursor_end);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_real_delete_surrounding_text(SqueekInputMethod *self,
|
||||
guint before_length,
|
||||
guint after_length)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
zwp_input_method_v2_delete_surrounding_text(priv->input_method,
|
||||
before_length,
|
||||
after_length);
|
||||
}
|
||||
|
||||
void
|
||||
squeek_input_method_delete_surrounding_text(SqueekInputMethod *self,
|
||||
guint before_length,
|
||||
guint after_length)
|
||||
{
|
||||
g_return_if_fail(self && SQUEEK_IS_INPUT_METHOD(self));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(self)->delete_surrounding_text(self,
|
||||
before_length,
|
||||
after_length);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_real_commit(SqueekInputMethod *self)
|
||||
{
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
g_return_if_fail(priv->available);
|
||||
|
||||
zwp_input_method_v2_commit(priv->input_method,
|
||||
priv->serial++);
|
||||
}
|
||||
|
||||
void
|
||||
squeek_input_method_commit(SqueekInputMethod *self)
|
||||
{
|
||||
g_return_if_fail(self && SQUEEK_IS_INPUT_METHOD(self));
|
||||
|
||||
SQUEEK_INPUT_METHOD_GET_CLASS(self)->commit(self);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_dispose(GObject *object)
|
||||
{
|
||||
SqueekInputMethod *self = SQUEEK_INPUT_METHOD(object);
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
priv->active = FALSE;
|
||||
priv->available = FALSE;
|
||||
|
||||
g_clear_pointer(&priv->input_method, zwp_input_method_v2_destroy);
|
||||
|
||||
G_OBJECT_CLASS(squeek_input_method_parent_class)->dispose(object);
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_init(SqueekInputMethod *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_get_property(GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SqueekInputMethod *self = SQUEEK_INPUT_METHOD(object);
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_AVAILABLE:
|
||||
g_value_set_boolean(value, priv->available);
|
||||
break;
|
||||
case PROP_ACTIVE:
|
||||
g_value_set_boolean(value, priv->active);
|
||||
break;
|
||||
case PROP_CURSOR_POSITION:
|
||||
g_value_set_uint(value, priv->cursor);
|
||||
break;
|
||||
case PROP_ANCHOR_POSITION:
|
||||
g_value_set_uint(value, priv->anchor);
|
||||
break;
|
||||
case PROP_CONTENT_HINT:
|
||||
g_value_set_flags(value, priv->hint);
|
||||
break;
|
||||
case PROP_CONTENT_PURPOSE:
|
||||
g_value_set_enum(value, priv->purpose);
|
||||
break;
|
||||
case PROP_SURROUNDING_TEXT:
|
||||
g_value_set_string(value, priv->surrounding_text);
|
||||
break;
|
||||
case PROP_PREEDIT_STRING:
|
||||
g_value_set_string(value, priv->preedit_string);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_set_property(GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SqueekInputMethod *self = SQUEEK_INPUT_METHOD(object);
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_ACTIVE:
|
||||
priv->active = g_value_get_boolean(value);
|
||||
|
||||
break;
|
||||
|
||||
/* FIXME: should preedit string be writable without setting cursor? */
|
||||
case PROP_PREEDIT_STRING:
|
||||
g_clear_pointer(&priv->preedit_string, g_free);
|
||||
priv->preedit_string = g_strdup(g_value_get_string(value));
|
||||
|
||||
break;
|
||||
|
||||
case PROP_AVAILABLE:
|
||||
/* fall-through: not writable */
|
||||
case PROP_CURSOR_POSITION:
|
||||
/* fall-through: not writable */
|
||||
case PROP_ANCHOR_POSITION:
|
||||
/* fall-through: not writable */
|
||||
case PROP_CONTENT_HINT:
|
||||
/* fall-through: not writable */
|
||||
case PROP_CONTENT_PURPOSE:
|
||||
/* fall-through: not writable */
|
||||
case PROP_SURROUNDING_TEXT:
|
||||
/* fall-through: not writable */
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
squeek_input_method_class_init(SqueekInputMethodClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
||||
|
||||
object_class->dispose = squeek_input_method_dispose;
|
||||
object_class->get_property = squeek_input_method_get_property;
|
||||
object_class->set_property = squeek_input_method_set_property;
|
||||
|
||||
/* events */
|
||||
klass->activate = squeek_input_method_activate;
|
||||
klass->deactivate = squeek_input_method_deactivate;
|
||||
klass->surrounding_text = squeek_input_method_surrounding_text;
|
||||
klass->text_change_cause = squeek_input_method_text_change_cause;
|
||||
klass->content_type = squeek_input_method_content_type;
|
||||
klass->done = squeek_input_method_done;
|
||||
klass->unavailable = squeek_input_method_unavailable;
|
||||
|
||||
/* requests */
|
||||
klass->commit_string = squeek_input_method_real_commit_string;
|
||||
klass->preedit_string = squeek_input_method_real_preedit_string;
|
||||
klass->delete_surrounding_text = squeek_input_method_real_delete_surrounding_text;
|
||||
klass->commit = squeek_input_method_real_commit;
|
||||
|
||||
properties[PROP_AVAILABLE] =
|
||||
g_param_spec_boolean("available",
|
||||
"available",
|
||||
"Availability of this input method (destroy if FALSE)",
|
||||
FALSE,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_ACTIVE] =
|
||||
g_param_spec_boolean("active",
|
||||
"active",
|
||||
"This input method is active",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
properties[PROP_CURSOR_POSITION] =
|
||||
g_param_spec_uint("cursor-position",
|
||||
"cursor-position",
|
||||
"The position of the cursor in characters",
|
||||
0, G_MAXUINT, 0,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_ANCHOR_POSITION] =
|
||||
g_param_spec_uint("anchor-position",
|
||||
"anchor-position",
|
||||
"Offset where the current selection starts, or the same as cursor-position",
|
||||
0, G_MAXUINT, 0,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_CONTENT_HINT] =
|
||||
g_param_spec_flags("content-hint",
|
||||
"content-hint",
|
||||
"Hint to guide the behaviour of the input method",
|
||||
SQUEEK_TYPE_INPUT_METHOD_HINT,
|
||||
SQUEEK_INPUT_METHOD_HINT_NONE,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_CONTENT_PURPOSE] =
|
||||
g_param_spec_enum("content-purpose",
|
||||
"content-purpose",
|
||||
"The purpose of a text input",
|
||||
SQUEEK_TYPE_INPUT_METHOD_PURPOSE,
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_NORMAL,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_SURROUNDING_TEXT] =
|
||||
g_param_spec_string("surrounding-text",
|
||||
"surrounding-text",
|
||||
"The text surrounding the cursor",
|
||||
"",
|
||||
G_PARAM_READABLE);
|
||||
|
||||
properties[PROP_PREEDIT_STRING] =
|
||||
g_param_spec_string("preedit-string",
|
||||
"preedit-string",
|
||||
"Pre-edit string",
|
||||
"",
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties(object_class, LAST_PROP, properties);
|
||||
}
|
||||
|
||||
SqueekInputMethod *
|
||||
squeek_input_method_new(struct zwp_input_method_manager_v2 *manager,
|
||||
struct wl_seat *seat)
|
||||
{
|
||||
SqueekInputMethod *self = g_object_new(SQUEEK_TYPE_INPUT_METHOD, NULL);
|
||||
SqueekInputMethodPrivate *priv = squeek_input_method_get_instance_private(self);
|
||||
|
||||
priv->input_method = zwp_input_method_manager_v2_get_input_method(manager, seat);
|
||||
|
||||
zwp_input_method_v2_add_listener(priv->input_method, &input_method_listener, self);
|
||||
|
||||
return self;
|
||||
}
|
||||
@ -1,181 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "input-method-unstable-v2-client-protocol.h"
|
||||
#include "text-input-unstable-v3-client-protocol.h"
|
||||
#include "squeek-enumtypes.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SQUEEK_TYPE_INPUT_METHOD (squeek_input_method_get_type())
|
||||
G_DECLARE_DERIVABLE_TYPE(SqueekInputMethod, squeek_input_method, SQUEEK, INPUT_METHOD, GObject)
|
||||
|
||||
typedef enum {
|
||||
/**
|
||||
* no special behavior
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_NONE = ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE,
|
||||
/**
|
||||
* suggest word completions
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_COMPLETION = ZWP_TEXT_INPUT_V3_CONTENT_HINT_COMPLETION,
|
||||
/**
|
||||
* suggest word corrections
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_SPELLCHECK = ZWP_TEXT_INPUT_V3_CONTENT_HINT_SPELLCHECK,
|
||||
/**
|
||||
* switch to uppercase letters at the start of a sentence
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_AUTO_CAPITALIZATION = ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION,
|
||||
/**
|
||||
* prefer lowercase letters
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_LOWERCASE = ZWP_TEXT_INPUT_V3_CONTENT_HINT_LOWERCASE,
|
||||
/**
|
||||
* prefer uppercase letters
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_UPPERCASE = ZWP_TEXT_INPUT_V3_CONTENT_HINT_UPPERCASE,
|
||||
/**
|
||||
* prefer casing for titles and headings (can be language dependent)
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_TITLECASE = ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE,
|
||||
/**
|
||||
* characters should be hidden
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_HIDDEN_TEXT = ZWP_TEXT_INPUT_V3_CONTENT_HINT_HIDDEN_TEXT,
|
||||
/**
|
||||
* typed text should not be stored
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_SENSITIVE_DATA = ZWP_TEXT_INPUT_V3_CONTENT_HINT_SENSITIVE_DATA,
|
||||
/**
|
||||
* just Latin characters should be entered
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_LATIN = ZWP_TEXT_INPUT_V3_CONTENT_HINT_LATIN,
|
||||
/**
|
||||
* the text input is multiline
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_HINT_MULTILINE = ZWP_TEXT_INPUT_V3_CONTENT_HINT_MULTILINE,
|
||||
} SqueekInputMethodHint;
|
||||
|
||||
typedef enum {
|
||||
/**
|
||||
* default input, allowing all characters
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_NORMAL = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL,
|
||||
/**
|
||||
* allow only alphabetic characters
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_ALPHA = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ALPHA,
|
||||
/**
|
||||
* allow only digits
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_DIGITS = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DIGITS,
|
||||
/**
|
||||
* input a number (including decimal separator and sign)
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_NUMBER = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NUMBER,
|
||||
/**
|
||||
* input a phone number
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_PHONE = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PHONE,
|
||||
/**
|
||||
* input an URL
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_URL = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_URL,
|
||||
/**
|
||||
* input an email address
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_EMAIL = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_EMAIL,
|
||||
/**
|
||||
* input a name of a person
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_NAME = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NAME,
|
||||
/**
|
||||
* input a password (combine with sensitive_data hint)
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_PASSWORD = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD,
|
||||
/**
|
||||
* input is a numeric password (combine with sensitive_data hint)
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_PIN = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN,
|
||||
/**
|
||||
* input a date
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_DATE = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATE,
|
||||
/**
|
||||
* input a time
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_TIME = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TIME,
|
||||
/**
|
||||
* input a date and time
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_DATETIME = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATETIME,
|
||||
/**
|
||||
* input for a terminal
|
||||
*/
|
||||
SQUEEK_INPUT_METHOD_PURPOSE_TERMINAL = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL,
|
||||
} SqueekInputMethodPurpose;
|
||||
|
||||
|
||||
struct _SqueekInputMethodClass {
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* input-method signals */
|
||||
void (*activate) (SqueekInputMethod *self);
|
||||
|
||||
void (*deactivate) (SqueekInputMethod *self);
|
||||
|
||||
void (*surrounding_text) (SqueekInputMethod *self,
|
||||
const gchar *text,
|
||||
guint cursor,
|
||||
guint anchor);
|
||||
|
||||
void (*text_change_cause) (SqueekInputMethod *self,
|
||||
guint cause);
|
||||
|
||||
void (*content_type) (SqueekInputMethod *self,
|
||||
guint hint,
|
||||
guint purpose);
|
||||
|
||||
void (*done) (SqueekInputMethod *self);
|
||||
|
||||
void (*unavailable) (SqueekInputMethod *self);
|
||||
|
||||
/* input-method requests */
|
||||
void (*commit_string) (SqueekInputMethod *self,
|
||||
const gchar *string);
|
||||
|
||||
void (*preedit_string) (SqueekInputMethod *self,
|
||||
const gchar *text,
|
||||
gint cursor_begin,
|
||||
gint cursor_end);
|
||||
|
||||
void (*delete_surrounding_text) (SqueekInputMethod *self,
|
||||
guint before_length,
|
||||
guint after_length);
|
||||
|
||||
|
||||
void (*commit) (SqueekInputMethod *self);
|
||||
};
|
||||
|
||||
void squeek_input_method_commit_string (SqueekInputMethod *self,
|
||||
const gchar *string);
|
||||
|
||||
void squeek_input_method_preedit_string (SqueekInputMethod *self,
|
||||
const gchar *text,
|
||||
gint cursor_begin,
|
||||
gint cursor_end);
|
||||
|
||||
void squeek_input_method_delete_surrounding_text(SqueekInputMethod *self,
|
||||
guint before_length,
|
||||
guint after_length);
|
||||
|
||||
void squeek_input_method_commit (SqueekInputMethod *self);
|
||||
|
||||
SqueekInputMethod *squeek_input_method_new (struct zwp_input_method_manager_v2 *manager,
|
||||
struct wl_seat *seat);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
32
tests/Makefile.am
Normal file
32
tests/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
INCLUDES = -I$(top_srcdir) $(GIO2_CFLAGS) $(GTK_CFLAGS) $(LIBXKLAVIER_CFLAGS)
|
||||
|
||||
TESTS_ENVIRONMENT = EEKBOARD_KEYBOARDSDIR=$(top_srcdir)/data/keyboards
|
||||
|
||||
TESTS = eek-simple-test eek-xml-test
|
||||
noinst_PROGRAMS = $(TESTS)
|
||||
|
||||
eek_simple_test_SOURCES = eek-simple-test.c
|
||||
eek_simple_test_LDADD = $(top_builddir)/eek/libeek.la $(GIO2_LIBS)
|
||||
|
||||
eek_xml_test_SOURCES = eek-xml-test.c
|
||||
eek_xml_test_LDADD = $(top_builddir)/eek/libeek.la $(top_builddir)/eek/libeek-xkl.la $(GIO2_LIBS) $(GTK_LIBS)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
Reference in New Issue
Block a user