Compare commits
	
		
			3 Commits
		
	
	
		
			silence-wa
			...
			v1.0.10+nm
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 50d597d4e7 | |||
| 52e1e73bf3 | |||
| a354fe2247 | 
							
								
								
									
										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,6 +1,6 @@
 | 
				
			|||||||
<?xml version="1.0"?>
 | 
					<?xml version="1.0"?>
 | 
				
			||||||
<geometry version="0.90">
 | 
					<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="410.0000" height="296.5853"/>
 | 
				
			||||||
  <section angle="0">
 | 
					  <section angle="0">
 | 
				
			||||||
    <bounds x="0" y="0" width="608.7804" height="201.3658"/>
 | 
					    <bounds x="0" y="0" width="608.7804" height="201.3658"/>
 | 
				
			||||||
    <row orientation="1">
 | 
					    <row orientation="1">
 | 
				
			||||||
@ -106,7 +106,7 @@
 | 
				
			|||||||
      <key keycode="37" name="LCTL" oref="altline">
 | 
					      <key keycode="37" name="LCTL" oref="altline">
 | 
				
			||||||
	<bounds x="62.43902" y="162.3414" width="48.39024" height="37.46341"/>
 | 
						<bounds x="62.43902" y="162.3414" width="48.39024" height="37.46341"/>
 | 
				
			||||||
      </key>
 | 
					      </key>
 | 
				
			||||||
      <key keycode="66" name="ALTGR" oref="altline">
 | 
					      <key keycode="64" name="LALT" oref="altline">
 | 
				
			||||||
	<bounds x="113.9512" y="162.3414" width="48.39024" height="37.46341"/>
 | 
						<bounds x="113.9512" y="162.3414" width="48.39024" height="37.46341"/>
 | 
				
			||||||
      </key>
 | 
					      </key>
 | 
				
			||||||
      <key keycode="65" name="SPCE" oref="spaceline">
 | 
					      <key keycode="65" name="SPCE" oref="spaceline">
 | 
				
			||||||
 | 
				
			|||||||
@ -102,52 +102,42 @@
 | 
				
			|||||||
  <key keycode="24" name="AD01">
 | 
					  <key keycode="24" name="AD01">
 | 
				
			||||||
    <keysym keyval="113">q</keysym>
 | 
					    <keysym keyval="113">q</keysym>
 | 
				
			||||||
    <keysym keyval="81">Q</keysym>
 | 
					    <keysym keyval="81">Q</keysym>
 | 
				
			||||||
    <keysym keyval="49">1</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="25" name="AD02">
 | 
					  <key keycode="25" name="AD02">
 | 
				
			||||||
    <keysym keyval="119">w</keysym>
 | 
					    <keysym keyval="119">w</keysym>
 | 
				
			||||||
    <keysym keyval="87">W</keysym>
 | 
					    <keysym keyval="87">W</keysym>
 | 
				
			||||||
    <keysym keyval="50">2</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="26" name="AD03">
 | 
					  <key keycode="26" name="AD03">
 | 
				
			||||||
    <keysym keyval="101">e</keysym>
 | 
					    <keysym keyval="101">e</keysym>
 | 
				
			||||||
    <keysym keyval="69">E</keysym>
 | 
					    <keysym keyval="69">E</keysym>
 | 
				
			||||||
    <keysym keyval="51">3</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="27" name="AD04">
 | 
					  <key keycode="27" name="AD04">
 | 
				
			||||||
    <keysym keyval="114">r</keysym>
 | 
					    <keysym keyval="114">r</keysym>
 | 
				
			||||||
    <keysym keyval="82">R</keysym>
 | 
					    <keysym keyval="82">R</keysym>
 | 
				
			||||||
    <keysym keyval="52">4</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="28" name="AD05">
 | 
					  <key keycode="28" name="AD05">
 | 
				
			||||||
    <keysym keyval="116">t</keysym>
 | 
					    <keysym keyval="116">t</keysym>
 | 
				
			||||||
    <keysym keyval="84">T</keysym>
 | 
					    <keysym keyval="84">T</keysym>
 | 
				
			||||||
    <keysym keyval="53">5</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="29" name="AD06">
 | 
					  <key keycode="29" name="AD06">
 | 
				
			||||||
    <keysym keyval="121">y</keysym>
 | 
					    <keysym keyval="121">y</keysym>
 | 
				
			||||||
    <keysym keyval="89">Y</keysym>
 | 
					    <keysym keyval="89">Y</keysym>
 | 
				
			||||||
    <keysym keyval="54">6</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="30" name="AD07">
 | 
					  <key keycode="30" name="AD07">
 | 
				
			||||||
    <keysym keyval="117">u</keysym>
 | 
					    <keysym keyval="117">u</keysym>
 | 
				
			||||||
    <keysym keyval="85">U</keysym>
 | 
					    <keysym keyval="85">U</keysym>
 | 
				
			||||||
    <keysym keyval="55">7</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="31" name="AD08">
 | 
					  <key keycode="31" name="AD08">
 | 
				
			||||||
    <keysym keyval="105">i</keysym>
 | 
					    <keysym keyval="105">i</keysym>
 | 
				
			||||||
    <keysym keyval="73">I</keysym>
 | 
					    <keysym keyval="73">I</keysym>
 | 
				
			||||||
    <keysym keyval="56">8</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="32" name="AD09">
 | 
					  <key keycode="32" name="AD09">
 | 
				
			||||||
    <keysym keyval="111">o</keysym>
 | 
					    <keysym keyval="111">o</keysym>
 | 
				
			||||||
    <keysym keyval="79">O</keysym>
 | 
					    <keysym keyval="79">O</keysym>
 | 
				
			||||||
    <keysym keyval="57">9</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="33" name="AD10">
 | 
					  <key keycode="33" name="AD10">
 | 
				
			||||||
    <keysym keyval="112">p</keysym>
 | 
					    <keysym keyval="112">p</keysym>
 | 
				
			||||||
    <keysym keyval="80">P</keysym>
 | 
					    <keysym keyval="80">P</keysym>
 | 
				
			||||||
    <keysym keyval="48">0</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="34" name="AD11">
 | 
					  <key keycode="34" name="AD11">
 | 
				
			||||||
    <keysym keyval="91">bracketleft</keysym>
 | 
					    <keysym keyval="91">bracketleft</keysym>
 | 
				
			||||||
@ -161,53 +151,44 @@
 | 
				
			|||||||
    <keysym keyval="92">backslash</keysym>
 | 
					    <keysym keyval="92">backslash</keysym>
 | 
				
			||||||
    <keysym keyval="124">bar</keysym>
 | 
					    <keysym keyval="124">bar</keysym>
 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="66" name="ALTGR">
 | 
					  <key keycode="66" name="CAPS">
 | 
				
			||||||
    <keysym keyval="65027">ISO_Level3_Shift</keysym>
 | 
					    <keysym keyval="65027">ISO_Level3_Shift</keysym>
 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="38" name="AC01">
 | 
					  <key keycode="38" name="AC01">
 | 
				
			||||||
    <keysym keyval="97">a</keysym>
 | 
					    <keysym keyval="97">a</keysym>
 | 
				
			||||||
    <keysym keyval="65">A</keysym>
 | 
					    <keysym keyval="65">A</keysym>
 | 
				
			||||||
    <keysym keyval="64">at</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="39" name="AC02">
 | 
					  <key keycode="39" name="AC02">
 | 
				
			||||||
    <keysym keyval="115">s</keysym>
 | 
					    <keysym keyval="115">s</keysym>
 | 
				
			||||||
    <keysym keyval="83">S</keysym>
 | 
					    <keysym keyval="83">S</keysym>
 | 
				
			||||||
    <keysym keyval="35">numbersign</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="40" name="AC03">
 | 
					  <key keycode="40" name="AC03">
 | 
				
			||||||
    <keysym keyval="100">d</keysym>
 | 
					    <keysym keyval="100">d</keysym>
 | 
				
			||||||
    <keysym keyval="68">D</keysym>
 | 
					    <keysym keyval="68">D</keysym>
 | 
				
			||||||
    <keysym keyval="36">dollar</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="41" name="AC04">
 | 
					  <key keycode="41" name="AC04">
 | 
				
			||||||
    <keysym keyval="102">f</keysym>
 | 
					    <keysym keyval="102">f</keysym>
 | 
				
			||||||
    <keysym keyval="70">F</keysym>
 | 
					    <keysym keyval="70">F</keysym>
 | 
				
			||||||
    <keysym keyval="37">percent</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="42" name="AC05">
 | 
					  <key keycode="42" name="AC05">
 | 
				
			||||||
    <keysym keyval="103">g</keysym>
 | 
					    <keysym keyval="103">g</keysym>
 | 
				
			||||||
    <keysym keyval="71">G</keysym>
 | 
					    <keysym keyval="71">G</keysym>
 | 
				
			||||||
    <keysym keyval="38">ampersand</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="43" name="AC06">
 | 
					  <key keycode="43" name="AC06">
 | 
				
			||||||
    <keysym keyval="104">h</keysym>
 | 
					    <keysym keyval="104">h</keysym>
 | 
				
			||||||
    <keysym keyval="72">H</keysym>
 | 
					    <keysym keyval="72">H</keysym>
 | 
				
			||||||
    <keysym keyval="45">minus</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="44" name="AC07">
 | 
					  <key keycode="44" name="AC07">
 | 
				
			||||||
    <keysym keyval="106">j</keysym>
 | 
					    <keysym keyval="106">j</keysym>
 | 
				
			||||||
    <keysym keyval="74">J</keysym>
 | 
					    <keysym keyval="74">J</keysym>
 | 
				
			||||||
    <keysym keyval="95">underscore</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="45" name="AC08">
 | 
					  <key keycode="45" name="AC08">
 | 
				
			||||||
    <keysym keyval="107">k</keysym>
 | 
					    <keysym keyval="107">k</keysym>
 | 
				
			||||||
    <keysym keyval="75">K</keysym>
 | 
					    <keysym keyval="75">K</keysym>
 | 
				
			||||||
    <keysym keyval="123">braceleft</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="46" name="AC09">
 | 
					  <key keycode="46" name="AC09">
 | 
				
			||||||
    <keysym keyval="108">l</keysym>
 | 
					    <keysym keyval="108">l</keysym>
 | 
				
			||||||
    <keysym keyval="76">L</keysym>
 | 
					    <keysym keyval="76">L</keysym>
 | 
				
			||||||
    <keysym keyval="125">braceright</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="47" name="AC10">
 | 
					  <key keycode="47" name="AC10">
 | 
				
			||||||
    <keysym keyval="59">semicolon</keysym>
 | 
					    <keysym keyval="59">semicolon</keysym>
 | 
				
			||||||
@ -226,37 +207,30 @@
 | 
				
			|||||||
  <key keycode="52" name="AB01">
 | 
					  <key keycode="52" name="AB01">
 | 
				
			||||||
    <keysym keyval="122">z</keysym>
 | 
					    <keysym keyval="122">z</keysym>
 | 
				
			||||||
    <keysym keyval="90">Z</keysym>
 | 
					    <keysym keyval="90">Z</keysym>
 | 
				
			||||||
    <keysym keyval="43">plus</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="53" name="AB02">
 | 
					  <key keycode="53" name="AB02">
 | 
				
			||||||
    <keysym keyval="120">x</keysym>
 | 
					    <keysym keyval="120">x</keysym>
 | 
				
			||||||
    <keysym keyval="88">X</keysym>
 | 
					    <keysym keyval="88">X</keysym>
 | 
				
			||||||
    <keysym keyval="34">quotedbl</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="54" name="AB03">
 | 
					  <key keycode="54" name="AB03">
 | 
				
			||||||
    <keysym keyval="99">c</keysym>
 | 
					    <keysym keyval="99">c</keysym>
 | 
				
			||||||
    <keysym keyval="67">C</keysym>
 | 
					    <keysym keyval="67">C</keysym>
 | 
				
			||||||
    <keysym keyval="39">quoteright</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="55" name="AB04">
 | 
					  <key keycode="55" name="AB04">
 | 
				
			||||||
    <keysym keyval="118">v</keysym>
 | 
					    <keysym keyval="118">v</keysym>
 | 
				
			||||||
    <keysym keyval="86">V</keysym>
 | 
					    <keysym keyval="86">V</keysym>
 | 
				
			||||||
    <keysym keyval="58">colon</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="56" name="AB05">
 | 
					  <key keycode="56" name="AB05">
 | 
				
			||||||
    <keysym keyval="98">b</keysym>
 | 
					    <keysym keyval="98">b</keysym>
 | 
				
			||||||
    <keysym keyval="66">B</keysym>
 | 
					    <keysym keyval="66">B</keysym>
 | 
				
			||||||
    <keysym keyval="59">semicolon</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="57" name="AB06">
 | 
					  <key keycode="57" name="AB06">
 | 
				
			||||||
    <keysym keyval="110">n</keysym>
 | 
					    <keysym keyval="110">n</keysym>
 | 
				
			||||||
    <keysym keyval="78">N</keysym>
 | 
					    <keysym keyval="78">N</keysym>
 | 
				
			||||||
    <keysym keyval="33">exclam</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="58" name="AB07">
 | 
					  <key keycode="58" name="AB07">
 | 
				
			||||||
    <keysym keyval="109">m</keysym>
 | 
					    <keysym keyval="109">m</keysym>
 | 
				
			||||||
    <keysym keyval="77">M</keysym>
 | 
					    <keysym keyval="77">M</keysym>
 | 
				
			||||||
    <keysym keyval="63">question</keysym>
 | 
					 | 
				
			||||||
  </key>
 | 
					  </key>
 | 
				
			||||||
  <key keycode="59" name="AB08">
 | 
					  <key keycode="59" name="AB08">
 | 
				
			||||||
    <keysym keyval="44">comma</keysym>
 | 
					    <keysym keyval="44">comma</keysym>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										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
 | 
				
			||||||
							
								
								
									
										8
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@ -1,3 +1,11 @@
 | 
				
			|||||||
 | 
					squeekboard (1.0.10+nmu1) amber-phone; urgency=medium
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * Add dbus protocol definition.
 | 
				
			||||||
 | 
					    This let's us drop the virtboard build dependency.
 | 
				
			||||||
 | 
					  * debian: Drop virtboard build-dependency
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 -- Guido Günther <agx@sigxcpu.org>  Mon, 07 Oct 2019 09:31:18 +0200
 | 
				
			||||||
 | 
					
 | 
				
			||||||
squeekboard (1.0.10) unstable; urgency=medium
 | 
					squeekboard (1.0.10) unstable; urgency=medium
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  * Use a shared DBus definition
 | 
					  * Use a shared DBus definition
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@ -11,7 +11,6 @@ Build-Depends:
 | 
				
			|||||||
 libcroco3-dev,
 | 
					 libcroco3-dev,
 | 
				
			||||||
 libwayland-dev (>= 1.16),
 | 
					 libwayland-dev (>= 1.16),
 | 
				
			||||||
 rustc,
 | 
					 rustc,
 | 
				
			||||||
 virtboard,
 | 
					 | 
				
			||||||
 wayland-protocols (>= 1.14)
 | 
					 wayland-protocols (>= 1.14)
 | 
				
			||||||
Standards-Version: 4.1.3
 | 
					Standards-Version: 4.1.3
 | 
				
			||||||
Homepage: https://source.puri.sm/Librem5/squeekboard
 | 
					Homepage: https://source.puri.sm/Librem5/squeekboard
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@ -3,6 +3,6 @@
 | 
				
			|||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 | 
					export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%:
 | 
					%:
 | 
				
			||||||
	dh $@ --builddirectory=_build --buildsystem=meson
 | 
						dh $@ --builddirectory=_build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
override_dh_autoreconf:
 | 
					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
 | 
				
			||||||
@ -40,19 +40,23 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static guint signals[LAST_SIGNAL] = { 0, };
 | 
					static guint signals[LAST_SIGNAL] = { 0, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekContainerPrivate
 | 
					G_DEFINE_ABSTRACT_TYPE (EekContainer, eek_container, EEK_TYPE_ELEMENT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_CONTAINER_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_CONTAINER, EekContainerPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekContainerPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    GList *head;
 | 
					    GList *head;
 | 
				
			||||||
    GList *last;
 | 
					    GList *last;
 | 
				
			||||||
} EekContainerPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (EekContainer, eek_container, EEK_TYPE_ELEMENT)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_container_real_add_child (EekContainer *self,
 | 
					eek_container_real_add_child (EekContainer *self,
 | 
				
			||||||
                              EekElement   *child)
 | 
					                              EekElement   *child)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekContainerPrivate *priv = eek_container_get_instance_private (self);
 | 
					    EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(child));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(child));
 | 
				
			||||||
    g_object_ref (child);
 | 
					    g_object_ref (child);
 | 
				
			||||||
@ -71,7 +75,7 @@ static void
 | 
				
			|||||||
eek_container_real_remove_child (EekContainer *self,
 | 
					eek_container_real_remove_child (EekContainer *self,
 | 
				
			||||||
                                 EekElement   *child)
 | 
					                                 EekElement   *child)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekContainerPrivate *priv = eek_container_get_instance_private (self);
 | 
					    EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
 | 
				
			||||||
    GList *head;
 | 
					    GList *head;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(child));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(child));
 | 
				
			||||||
@ -90,7 +94,7 @@ eek_container_real_foreach_child (EekContainer *self,
 | 
				
			|||||||
                                  EekCallback   callback,
 | 
					                                  EekCallback   callback,
 | 
				
			||||||
                                  gpointer      user_data)
 | 
					                                  gpointer      user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekContainerPrivate *priv = eek_container_get_instance_private (self);
 | 
					    EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
 | 
				
			||||||
    GList *head;
 | 
					    GList *head;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (head = priv->head; head; head = g_list_next (head))
 | 
					    for (head = priv->head; head; head = g_list_next (head))
 | 
				
			||||||
@ -102,7 +106,7 @@ eek_container_real_find (EekContainer *self,
 | 
				
			|||||||
                         EekCompareFunc func,
 | 
					                         EekCompareFunc func,
 | 
				
			||||||
                         gpointer user_data)
 | 
					                         gpointer user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekContainerPrivate *priv = eek_container_get_instance_private (self);
 | 
					    EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
 | 
				
			||||||
    GList *head;
 | 
					    GList *head;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    head = g_list_find_custom (priv->head, user_data, (GCompareFunc)func);
 | 
					    head = g_list_find_custom (priv->head, user_data, (GCompareFunc)func);
 | 
				
			||||||
@ -114,8 +118,7 @@ eek_container_real_find (EekContainer *self,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_container_dispose (GObject *object)
 | 
					eek_container_dispose (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekContainer        *self = EEK_CONTAINER (object);
 | 
					    EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(object);
 | 
				
			||||||
    EekContainerPrivate *priv = eek_container_get_instance_private (self);
 | 
					 | 
				
			||||||
    GList *head;
 | 
					    GList *head;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (head = priv->head; head; head = priv->head) {
 | 
					    for (head = priv->head; head; head = priv->head) {
 | 
				
			||||||
@ -131,6 +134,9 @@ eek_container_class_init (EekContainerClass *klass)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekContainerPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    klass->add_child = eek_container_real_add_child;
 | 
					    klass->add_child = eek_container_real_add_child;
 | 
				
			||||||
    klass->remove_child = eek_container_real_remove_child;
 | 
					    klass->remove_child = eek_container_real_remove_child;
 | 
				
			||||||
    klass->foreach_child = eek_container_real_foreach_child;
 | 
					    klass->foreach_child = eek_container_real_foreach_child;
 | 
				
			||||||
@ -183,7 +189,7 @@ eek_container_class_init (EekContainerClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_container_init (EekContainer *self)
 | 
					eek_container_init (EekContainer *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_CONTAINER_GET_PRIVATE(self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,14 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_CONTAINER (eek_container_get_type())
 | 
					#define EEK_TYPE_CONTAINER (eek_container_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekContainer, eek_container, EEK, CONTAINER, EekElement)
 | 
					#define EEK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_CONTAINER, EekContainer))
 | 
				
			||||||
 | 
					#define EEK_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_CONTAINER, EekContainerClass))
 | 
				
			||||||
 | 
					#define EEK_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_CONTAINER))
 | 
				
			||||||
 | 
					#define EEK_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_CONTAINER))
 | 
				
			||||||
 | 
					#define EEK_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_CONTAINER, EekContainerClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekContainerClass EekContainerClass;
 | 
				
			||||||
 | 
					typedef struct _EekContainerPrivate EekContainerPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekCallback:
 | 
					 * EekCallback:
 | 
				
			||||||
@ -43,6 +50,14 @@ G_DECLARE_DERIVABLE_TYPE (EekContainer, eek_container, EEK, CONTAINER, EekElemen
 | 
				
			|||||||
typedef void (*EekCallback) (EekElement *element, gpointer user_data);
 | 
					typedef void (*EekCallback) (EekElement *element, gpointer user_data);
 | 
				
			||||||
typedef gint (*EekCompareFunc) (EekElement *element, gpointer user_data);
 | 
					typedef gint (*EekCompareFunc) (EekElement *element, gpointer user_data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekContainer
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekElement parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekContainerPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekContainerClass:
 | 
					 * EekContainerClass:
 | 
				
			||||||
 * @foreach_child: virtual function for iterating over the container's children
 | 
					 * @foreach_child: virtual function for iterating over the container's children
 | 
				
			||||||
 | 
				
			|||||||
@ -52,16 +52,20 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static guint signals[LAST_SIGNAL] = { 0, };
 | 
					static guint signals[LAST_SIGNAL] = { 0, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekElementPrivate
 | 
					G_DEFINE_ABSTRACT_TYPE (EekElement, eek_element, G_TYPE_OBJECT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_ELEMENT_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_ELEMENT, EekElementPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekElementPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    gchar *name;
 | 
					    gchar *name;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    EekElement *parent;
 | 
					    EekElement *parent;
 | 
				
			||||||
    gint group;
 | 
					    gint group;
 | 
				
			||||||
    gint level;
 | 
					    gint level;
 | 
				
			||||||
} EekElementPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (EekElement, eek_element, G_TYPE_OBJECT)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_element_real_symbol_index_changed (EekElement *self,
 | 
					eek_element_real_symbol_index_changed (EekElement *self,
 | 
				
			||||||
@ -74,8 +78,7 @@ eek_element_real_symbol_index_changed (EekElement *self,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_element_finalize (GObject *object)
 | 
					eek_element_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekElement        *self = EEK_ELEMENT (object);
 | 
					    EekElementPrivate *priv = EEK_ELEMENT_GET_PRIVATE(object);
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_free (priv->name);
 | 
					    g_free (priv->name);
 | 
				
			||||||
    G_OBJECT_CLASS (eek_element_parent_class)->finalize (object);
 | 
					    G_OBJECT_CLASS (eek_element_parent_class)->finalize (object);
 | 
				
			||||||
@ -143,6 +146,9 @@ eek_element_class_init (EekElementClass *klass)
 | 
				
			|||||||
    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec        *pspec;
 | 
					    GParamSpec        *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekElementPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* signals */
 | 
					    /* signals */
 | 
				
			||||||
    klass->symbol_index_changed = eek_element_real_symbol_index_changed;
 | 
					    klass->symbol_index_changed = eek_element_real_symbol_index_changed;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -232,8 +238,9 @@ eek_element_class_init (EekElementClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_element_init (EekElement *self)
 | 
					eek_element_init (EekElement *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (self);
 | 
					    EekElementPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv = self->priv = EEK_ELEMENT_GET_PRIVATE(self);
 | 
				
			||||||
    priv->group = -1;
 | 
					    priv->group = -1;
 | 
				
			||||||
    priv->level = -1;
 | 
					    priv->level = -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -252,12 +259,10 @@ eek_element_set_parent (EekElement *element,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
				
			||||||
    g_return_if_fail (parent == NULL || EEK_IS_ELEMENT(parent));
 | 
					    g_return_if_fail (parent == NULL || EEK_IS_ELEMENT(parent));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					    if (element->priv->parent == parent)
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->parent == parent)
 | 
					 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->parent != NULL) {
 | 
					    if (element->priv->parent != NULL) {
 | 
				
			||||||
        /* release self-reference acquired when setting parent */
 | 
					        /* release self-reference acquired when setting parent */
 | 
				
			||||||
        g_object_unref (element);
 | 
					        g_object_unref (element);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -266,7 +271,7 @@ eek_element_set_parent (EekElement *element,
 | 
				
			|||||||
        g_object_ref (element);
 | 
					        g_object_ref (element);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->parent = parent;
 | 
					    element->priv->parent = parent;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -280,10 +285,7 @@ EekElement *
 | 
				
			|||||||
eek_element_get_parent (EekElement *element)
 | 
					eek_element_get_parent (EekElement *element)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_ELEMENT(element), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_ELEMENT(element), NULL);
 | 
				
			||||||
 | 
					    return element->priv->parent;
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->parent;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -298,11 +300,8 @@ eek_element_set_name (EekElement  *element,
 | 
				
			|||||||
                      const gchar *name)
 | 
					                      const gchar *name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
				
			||||||
 | 
					    g_free (element->priv->name);
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					    element->priv->name = g_strdup (name);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_free (priv->name);
 | 
					 | 
				
			||||||
    priv->name = g_strdup (name);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -316,10 +315,7 @@ const gchar *
 | 
				
			|||||||
eek_element_get_name (EekElement  *element)
 | 
					eek_element_get_name (EekElement  *element)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_ELEMENT(element), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_ELEMENT(element), NULL);
 | 
				
			||||||
 | 
					    return element->priv->name;
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->name;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -336,10 +332,7 @@ eek_element_set_bounds (EekElement  *element,
 | 
				
			|||||||
                        EekBounds   *bounds)
 | 
					                        EekBounds   *bounds)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
				
			||||||
 | 
					    memcpy (&element->priv->bounds, bounds, sizeof(EekBounds));
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    memcpy (&priv->bounds, bounds, sizeof(EekBounds));
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -357,10 +350,7 @@ eek_element_get_bounds (EekElement  *element,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
				
			||||||
    g_return_if_fail (bounds != NULL);
 | 
					    g_return_if_fail (bounds != NULL);
 | 
				
			||||||
 | 
					    memcpy (bounds, &element->priv->bounds, sizeof(EekBounds));
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    memcpy (bounds, &priv->bounds, sizeof(EekBounds));
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -496,14 +486,11 @@ eek_element_set_group (EekElement *element,
 | 
				
			|||||||
                       gint        group)
 | 
					                       gint        group)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
				
			||||||
 | 
					    if (element->priv->group != group) {
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					        element->priv->group = group;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->group != group) {
 | 
					 | 
				
			||||||
        priv->group = group;
 | 
					 | 
				
			||||||
        g_object_notify (G_OBJECT(element), "group");
 | 
					        g_object_notify (G_OBJECT(element), "group");
 | 
				
			||||||
        g_signal_emit (element, signals[SYMBOL_INDEX_CHANGED], 0,
 | 
					        g_signal_emit (element, signals[SYMBOL_INDEX_CHANGED], 0,
 | 
				
			||||||
                       group, priv->level);
 | 
					                       group, element->priv->level);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -522,14 +509,11 @@ eek_element_set_level (EekElement *element,
 | 
				
			|||||||
                       gint        level)
 | 
					                       gint        level)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
					    g_return_if_fail (EEK_IS_ELEMENT(element));
 | 
				
			||||||
 | 
					    if (element->priv->level != level) {
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					        element->priv->level = level;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->level != level) {
 | 
					 | 
				
			||||||
        priv->level = level;
 | 
					 | 
				
			||||||
        g_object_notify (G_OBJECT(element), "level");
 | 
					        g_object_notify (G_OBJECT(element), "level");
 | 
				
			||||||
        g_signal_emit (element, signals[SYMBOL_INDEX_CHANGED], 0,
 | 
					        g_signal_emit (element, signals[SYMBOL_INDEX_CHANGED], 0,
 | 
				
			||||||
                       priv->group, level);
 | 
					                       element->priv->group, level);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -546,10 +530,7 @@ gint
 | 
				
			|||||||
eek_element_get_group (EekElement *element)
 | 
					eek_element_get_group (EekElement *element)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_ELEMENT(element), -1);
 | 
					    g_return_val_if_fail (EEK_IS_ELEMENT(element), -1);
 | 
				
			||||||
 | 
					    return element->priv->group;
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->group;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -565,8 +546,5 @@ gint
 | 
				
			|||||||
eek_element_get_level (EekElement *element)
 | 
					eek_element_get_level (EekElement *element)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_ELEMENT(element), -1);
 | 
					    g_return_val_if_fail (EEK_IS_ELEMENT(element), -1);
 | 
				
			||||||
 | 
					    return element->priv->level;
 | 
				
			||||||
    EekElementPrivate *priv = eek_element_get_instance_private (element);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->level;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,22 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
#define EEK_TYPE_ELEMENT (eek_element_get_type())
 | 
					#define EEK_TYPE_ELEMENT (eek_element_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekElement, eek_element, EEK, ELEMENT, GObject)
 | 
					#define EEK_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_ELEMENT, EekElement))
 | 
				
			||||||
 | 
					#define EEK_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_ELEMENT, EekElementClass))
 | 
				
			||||||
 | 
					#define EEK_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_ELEMENT))
 | 
				
			||||||
 | 
					#define EEK_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_ELEMENT))
 | 
				
			||||||
 | 
					#define EEK_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_ELEMENT, EekElementClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekElementClass   EekElementClass;
 | 
				
			||||||
 | 
					typedef struct _EekElementPrivate EekElementPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekElement
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekElementPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekElementClass
 | 
					struct _EekElementClass
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,6 @@
 | 
				
			|||||||
#include <canberra-gtk.h>
 | 
					#include <canberra-gtk.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <math.h>
 | 
					 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "eek-gtk-keyboard.h"
 | 
					#include "eek-gtk-keyboard.h"
 | 
				
			||||||
@ -47,13 +46,18 @@ enum {
 | 
				
			|||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					G_DEFINE_TYPE (EekGtkKeyboard, eek_gtk_keyboard, GTK_TYPE_DRAWING_AREA);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_GTK_KEYBOARD_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* since 2.91.5 GDK_DRAWABLE was removed and gdk_cairo_create takes
 | 
					/* since 2.91.5 GDK_DRAWABLE was removed and gdk_cairo_create takes
 | 
				
			||||||
   GdkWindow as the argument */
 | 
					   GdkWindow as the argument */
 | 
				
			||||||
#ifndef GDK_DRAWABLE
 | 
					#ifndef GDK_DRAWABLE
 | 
				
			||||||
#define GDK_DRAWABLE(x) (x)
 | 
					#define GDK_DRAWABLE(x) (x)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekGtkKeyboardPrivate
 | 
					struct _EekGtkKeyboardPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRenderer *renderer;
 | 
					    EekRenderer *renderer;
 | 
				
			||||||
    EekKeyboard *keyboard;
 | 
					    EekKeyboard *keyboard;
 | 
				
			||||||
@ -61,11 +65,7 @@ typedef struct _EekGtkKeyboardPrivate
 | 
				
			|||||||
    gulong key_unlocked_handler;
 | 
					    gulong key_unlocked_handler;
 | 
				
			||||||
    gulong symbol_index_changed_handler;
 | 
					    gulong symbol_index_changed_handler;
 | 
				
			||||||
    EekTheme *theme;
 | 
					    EekTheme *theme;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
    GdkEventSequence *sequence; // unowned reference
 | 
					 | 
				
			||||||
} EekGtkKeyboardPrivate;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekGtkKeyboard, eek_gtk_keyboard, GTK_TYPE_DRAWING_AREA)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void       on_key_pressed          (EekKey      *key,
 | 
					static void       on_key_pressed          (EekKey      *key,
 | 
				
			||||||
                                           EekGtkKeyboard *self);
 | 
					                                           EekGtkKeyboard *self);
 | 
				
			||||||
@ -106,8 +106,7 @@ static gboolean
 | 
				
			|||||||
eek_gtk_keyboard_real_draw (GtkWidget *self,
 | 
					eek_gtk_keyboard_real_draw (GtkWidget *self,
 | 
				
			||||||
                            cairo_t   *cr)
 | 
					                            cairo_t   *cr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv =
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
	    eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
 | 
					 | 
				
			||||||
    GtkAllocation allocation;
 | 
					    GtkAllocation allocation;
 | 
				
			||||||
    GList *list, *head;
 | 
					    GList *list, *head;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -149,8 +148,7 @@ static void
 | 
				
			|||||||
eek_gtk_keyboard_real_size_allocate (GtkWidget     *self,
 | 
					eek_gtk_keyboard_real_size_allocate (GtkWidget     *self,
 | 
				
			||||||
                                     GtkAllocation *allocation)
 | 
					                                     GtkAllocation *allocation)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv =
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
	    eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->renderer)
 | 
					    if (priv->renderer)
 | 
				
			||||||
        eek_renderer_set_allocation_size (priv->renderer,
 | 
					        eek_renderer_set_allocation_size (priv->renderer,
 | 
				
			||||||
@ -163,7 +161,7 @@ eek_gtk_keyboard_real_size_allocate (GtkWidget     *self,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void depress(EekGtkKeyboard *self,
 | 
					static void depress(EekGtkKeyboard *self,
 | 
				
			||||||
                    gdouble x, gdouble y, guint32 time) {
 | 
					                    gdouble x, gdouble y, guint32 time) {
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
    EekKey *key = eek_renderer_find_key_by_position (priv->renderer, x, y);
 | 
					    EekKey *key = eek_renderer_find_key_by_position (priv->renderer, x, y);
 | 
				
			||||||
    if (key) {
 | 
					    if (key) {
 | 
				
			||||||
        eek_keyboard_press_key(priv->keyboard, key, time);
 | 
					        eek_keyboard_press_key(priv->keyboard, key, time);
 | 
				
			||||||
@ -173,7 +171,7 @@ static void depress(EekGtkKeyboard *self,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void drag(EekGtkKeyboard *self,
 | 
					static void drag(EekGtkKeyboard *self,
 | 
				
			||||||
                 gdouble x, gdouble y, guint32 time) {
 | 
					                 gdouble x, gdouble y, guint32 time) {
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
    EekKey *key = eek_renderer_find_key_by_position (priv->renderer, x, y);
 | 
					    EekKey *key = eek_renderer_find_key_by_position (priv->renderer, x, y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (key) {
 | 
					    if (key) {
 | 
				
			||||||
@ -199,7 +197,7 @@ static void drag(EekGtkKeyboard *self,
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void release(EekGtkKeyboard *self, guint32 time) {
 | 
					static void release(EekGtkKeyboard *self, guint32 time) {
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    GList *list = eek_keyboard_get_pressed_keys (priv->keyboard);
 | 
					    GList *list = eek_keyboard_get_pressed_keys (priv->keyboard);
 | 
				
			||||||
    for (GList *head = list; head; head = g_list_next (head)) {
 | 
					    for (GList *head = list; head; head = g_list_next (head)) {
 | 
				
			||||||
@ -245,22 +243,19 @@ eek_gtk_keyboard_real_motion_notify_event (GtkWidget      *self,
 | 
				
			|||||||
// Only one touch stream at a time allowed. Others will be completely ignored.
 | 
					// Only one touch stream at a time allowed. Others will be completely ignored.
 | 
				
			||||||
static gboolean
 | 
					static gboolean
 | 
				
			||||||
handle_touch_event (GtkWidget      *widget,
 | 
					handle_touch_event (GtkWidget      *widget,
 | 
				
			||||||
                    GdkEventTouch *event)
 | 
					                    GdkEventTouch *event) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    EekGtkKeyboard *self = EEK_GTK_KEYBOARD(widget);
 | 
					    EekGtkKeyboard *self = EEK_GTK_KEYBOARD(widget);
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (event->type == GDK_TOUCH_BEGIN) {
 | 
					    if (event->type == GDK_TOUCH_BEGIN) {
 | 
				
			||||||
        if (priv->sequence) {
 | 
					        if (self->sequence) {
 | 
				
			||||||
            // Ignore second and following touch points
 | 
					            // Ignore second and following touch points
 | 
				
			||||||
            return FALSE;
 | 
					            return FALSE;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        priv->sequence = event->sequence;
 | 
					        self->sequence = event->sequence;
 | 
				
			||||||
        depress(self, event->x, event->y, event->time);
 | 
					        depress(self, event->x, event->y, event->time);
 | 
				
			||||||
        return TRUE;
 | 
					        return TRUE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->sequence != event->sequence) {
 | 
					    if (self->sequence != event->sequence) {
 | 
				
			||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -270,16 +265,16 @@ handle_touch_event (GtkWidget     *widget,
 | 
				
			|||||||
    if (event->type == GDK_TOUCH_END || event->type == GDK_TOUCH_CANCEL) {
 | 
					    if (event->type == GDK_TOUCH_END || event->type == GDK_TOUCH_CANCEL) {
 | 
				
			||||||
        // TODO: can the event have different coords than the previous update event?
 | 
					        // TODO: can the event have different coords than the previous update event?
 | 
				
			||||||
        release(self, event->time);
 | 
					        release(self, event->time);
 | 
				
			||||||
        priv->sequence = NULL;
 | 
					        self->sequence = NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_gtk_keyboard_real_unmap (GtkWidget *self)
 | 
					eek_gtk_keyboard_real_unmap (GtkWidget *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv =
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
	    eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->keyboard) {
 | 
					    if (priv->keyboard) {
 | 
				
			||||||
        GList *list, *head;
 | 
					        GList *list, *head;
 | 
				
			||||||
@ -306,9 +301,7 @@ eek_gtk_keyboard_real_query_tooltip (GtkWidget  *widget,
 | 
				
			|||||||
                                     gboolean    keyboard_tooltip,
 | 
					                                     gboolean    keyboard_tooltip,
 | 
				
			||||||
                                     GtkTooltip *tooltip)
 | 
					                                     GtkTooltip *tooltip)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboard        *self = EEK_GTK_KEYBOARD (widget);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    EekKey *key;
 | 
					    EekKey *key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    key = eek_renderer_find_key_by_position (priv->renderer,
 | 
					    key = eek_renderer_find_key_by_position (priv->renderer,
 | 
				
			||||||
@ -329,7 +322,7 @@ static void
 | 
				
			|||||||
eek_gtk_keyboard_set_keyboard (EekGtkKeyboard *self,
 | 
					eek_gtk_keyboard_set_keyboard (EekGtkKeyboard *self,
 | 
				
			||||||
                               EekKeyboard    *keyboard)
 | 
					                               EekKeyboard    *keyboard)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
    priv->keyboard = g_object_ref (keyboard);
 | 
					    priv->keyboard = g_object_ref (keyboard);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->key_locked_handler =
 | 
					    priv->key_locked_handler =
 | 
				
			||||||
@ -365,8 +358,7 @@ eek_gtk_keyboard_set_property (GObject      *object,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_gtk_keyboard_dispose (GObject *object)
 | 
					eek_gtk_keyboard_dispose (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboard        *self = EEK_GTK_KEYBOARD (object);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(object);
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->renderer) {
 | 
					    if (priv->renderer) {
 | 
				
			||||||
        g_object_unref (priv->renderer);
 | 
					        g_object_unref (priv->renderer);
 | 
				
			||||||
@ -415,6 +407,9 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekGtkKeyboardPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    widget_class->realize = eek_gtk_keyboard_real_realize;
 | 
					    widget_class->realize = eek_gtk_keyboard_real_realize;
 | 
				
			||||||
    widget_class->unmap = eek_gtk_keyboard_real_unmap;
 | 
					    widget_class->unmap = eek_gtk_keyboard_real_unmap;
 | 
				
			||||||
    widget_class->draw = eek_gtk_keyboard_real_draw;
 | 
					    widget_class->draw = eek_gtk_keyboard_real_draw;
 | 
				
			||||||
@ -445,7 +440,7 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_gtk_keyboard_init (EekGtkKeyboard *self)
 | 
					eek_gtk_keyboard_init (EekGtkKeyboard *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -484,67 +479,23 @@ magnify_bounds (GtkWidget *self,
 | 
				
			|||||||
    large_bounds->y = CLAMP(y, 0, allocation.height - large_bounds->height);
 | 
					    large_bounds->y = CLAMP(y, 0, allocation.height - large_bounds->height);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Alleviate the asymmetry between drawing a pressed key and a released key,
 | 
					 | 
				
			||||||
 * and consistently draw to the exact same area.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * By saving the dirty rectangle we can limit drawing of the backbuffer to
 | 
					 | 
				
			||||||
 * the screen as well, eg gdk_window_invalidate_rect() instead of
 | 
					 | 
				
			||||||
 * gtk_widget_queue_draw() which redraws the entire widget.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * b1 is mandatory, b2 is optional
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
static GdkRectangle
 | 
					 | 
				
			||||||
clip_bounds_to_dirty_rectangle (cairo_t *cr, EekBounds *b1, EekBounds *b2)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    if (b2)
 | 
					 | 
				
			||||||
        cairo_rectangle (cr, b2->x, b2->y, b2->width, b2->height);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    cairo_rectangle (cr, b1->x, b1->y, b1->width, b1->height);
 | 
					 | 
				
			||||||
    cairo_clip (cr);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /*
 | 
					 | 
				
			||||||
     * save the clipped region to a bounding box so we can limit
 | 
					 | 
				
			||||||
     * the drawing of the backbuffer to the screen to the same area
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    cairo_rectangle_t bbox;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    cairo_clip_extents (cr, &bbox.x, &bbox.y, &bbox.width, &bbox.height);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* convert double to int, making sure r strictly covers bbox to avoid
 | 
					 | 
				
			||||||
     * artefacts. floor() is unnecessary, ceil() is not */
 | 
					 | 
				
			||||||
    GdkRectangle r = {
 | 
					 | 
				
			||||||
        floor (bbox.x),
 | 
					 | 
				
			||||||
        floor (bbox.y),
 | 
					 | 
				
			||||||
        ceil  (bbox.width),
 | 
					 | 
				
			||||||
        ceil  (bbox.height)
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return r;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
render_pressed_key (GtkWidget *widget,
 | 
					render_pressed_key (GtkWidget *widget,
 | 
				
			||||||
                    EekKey    *key)
 | 
					                    EekKey    *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboard        *self = EEK_GTK_KEYBOARD (widget);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					 | 
				
			||||||
    EekBounds bounds, large_bounds;
 | 
					    EekBounds bounds, large_bounds;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    GdkWindow         *window  = gtk_widget_get_window (widget);
 | 
					 | 
				
			||||||
    cairo_region_t    *region  = gdk_window_get_clip_region (window);
 | 
					 | 
				
			||||||
    GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
 | 
					 | 
				
			||||||
    cairo_t           *cr      = gdk_drawing_context_get_cairo_context (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
 | 
					    eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
 | 
				
			||||||
    magnify_bounds (widget, &bounds, &large_bounds, 1.5);
 | 
					    magnify_bounds (widget, &bounds, &large_bounds, 1.5);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*
 | 
					    GdkWindow *window = GDK_DRAWABLE (gtk_widget_get_window (widget));
 | 
				
			||||||
     * clip to limit drawing to backbuffer and save clip region to dirty_rect
 | 
					    cairo_region_t *region = gdk_window_get_clip_region (window);
 | 
				
			||||||
     * to limit redrawing of the backbuffer to the same area
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    GdkRectangle dirty_rect = clip_bounds_to_dirty_rectangle (cr, &bounds, &large_bounds);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    GdkDrawingContext *context = gdk_window_begin_draw_frame(
 | 
				
			||||||
 | 
					        window, region
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    cairo_t *cr = gdk_drawing_context_get_cairo_context(context);
 | 
				
			||||||
    cairo_save (cr);
 | 
					    cairo_save (cr);
 | 
				
			||||||
    cairo_translate (cr, bounds.x, bounds.y);
 | 
					    cairo_translate (cr, bounds.x, bounds.y);
 | 
				
			||||||
    eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
 | 
					    eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
 | 
				
			||||||
@ -556,82 +507,59 @@ render_pressed_key (GtkWidget *widget,
 | 
				
			|||||||
    cairo_restore (cr);
 | 
					    cairo_restore (cr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gdk_window_end_draw_frame(window, context);
 | 
					    gdk_window_end_draw_frame(window, context);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    cairo_region_destroy(region);
 | 
					    cairo_region_destroy(region);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* force immediate drawing of the backbuffer to the screen */
 | 
					 | 
				
			||||||
    gdk_window_invalidate_rect (window, &dirty_rect, FALSE);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
render_locked_key (GtkWidget *widget,
 | 
					render_locked_key (GtkWidget *widget,
 | 
				
			||||||
                   EekKey    *key)
 | 
					                   EekKey    *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboard        *self = EEK_GTK_KEYBOARD (widget);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
 | 
					    cairo_t *cr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    GdkWindow         *window  = gtk_widget_get_window (widget);
 | 
					    cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
 | 
				
			||||||
    cairo_region_t    *region  = gdk_window_get_clip_region (window);
 | 
					 | 
				
			||||||
    GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
 | 
					 | 
				
			||||||
    cairo_t           *cr      = gdk_drawing_context_get_cairo_context (context);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
 | 
					    eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /*
 | 
					 | 
				
			||||||
     * clip to limit drawing to backbuffer and save clip region to dirty_rect
 | 
					 | 
				
			||||||
     * to limit redrawing of the backbuffer to the same area
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    GdkRectangle dirty_rect = clip_bounds_to_dirty_rectangle (cr, &bounds, NULL);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    cairo_translate (cr, bounds.x, bounds.y);
 | 
					    cairo_translate (cr, bounds.x, bounds.y);
 | 
				
			||||||
    eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
 | 
					    eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gdk_window_end_draw_frame (window, context);
 | 
					    cairo_destroy (cr);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    cairo_region_destroy (region);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* force immediate drawing of the backbuffer to the screen */
 | 
					 | 
				
			||||||
    gdk_window_invalidate_rect (window, &dirty_rect, FALSE);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
render_released_key (GtkWidget *widget,
 | 
					render_released_key (GtkWidget *widget,
 | 
				
			||||||
                     EekKey    *key)
 | 
					                     EekKey    *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboard        *self = EEK_GTK_KEYBOARD (widget);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					 | 
				
			||||||
    EekBounds bounds, large_bounds;
 | 
					    EekBounds bounds, large_bounds;
 | 
				
			||||||
 | 
					    cairo_t *cr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    GdkWindow         *window  = gtk_widget_get_window (widget);
 | 
					    cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
 | 
				
			||||||
    cairo_region_t    *region  = gdk_window_get_clip_region (window);
 | 
					 | 
				
			||||||
    GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
 | 
					 | 
				
			||||||
    cairo_t           *cr      = gdk_drawing_context_get_cairo_context (context);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
 | 
					    eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
 | 
				
			||||||
    magnify_bounds (widget, &bounds, &large_bounds, 1.5);
 | 
					    magnify_bounds (widget, &bounds, &large_bounds, 2.0);
 | 
				
			||||||
 | 
					    cairo_rectangle (cr,
 | 
				
			||||||
    /*
 | 
					                     large_bounds.x,
 | 
				
			||||||
     * clip to limit drawing to backbuffer and save clip region to dirty_rect
 | 
					                     large_bounds.y,
 | 
				
			||||||
     * to limit redrawing of the backbuffer to the same area
 | 
					                     large_bounds.width,
 | 
				
			||||||
     */
 | 
					                     large_bounds.height);
 | 
				
			||||||
    GdkRectangle dirty_rect = clip_bounds_to_dirty_rectangle(cr, &bounds, &large_bounds);
 | 
					    cairo_rectangle (cr,
 | 
				
			||||||
 | 
					                     bounds.x,
 | 
				
			||||||
 | 
					                     bounds.y,
 | 
				
			||||||
 | 
					                     bounds.width,
 | 
				
			||||||
 | 
					                     bounds.height);
 | 
				
			||||||
 | 
					    cairo_clip (cr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_renderer_render_keyboard (priv->renderer, cr);
 | 
					    eek_renderer_render_keyboard (priv->renderer, cr);
 | 
				
			||||||
 | 
					    cairo_destroy (cr);
 | 
				
			||||||
    gdk_window_end_draw_frame (window, context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    cairo_region_destroy (region);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* force immediate drawing of the backbuffer to the screen */
 | 
					 | 
				
			||||||
    gdk_window_invalidate_rect (window, &dirty_rect, FALSE);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
on_key_pressed (EekKey      *key,
 | 
					on_key_pressed (EekKey      *key,
 | 
				
			||||||
                EekGtkKeyboard *self)
 | 
					                EekGtkKeyboard *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* renderer may have not been set yet if the widget is a popup */
 | 
					    /* renderer may have not been set yet if the widget is a popup */
 | 
				
			||||||
    if (!priv->renderer)
 | 
					    if (!priv->renderer)
 | 
				
			||||||
@ -652,7 +580,7 @@ static void
 | 
				
			|||||||
on_key_released (EekKey      *key,
 | 
					on_key_released (EekKey      *key,
 | 
				
			||||||
                 EekGtkKeyboard *self)
 | 
					                 EekGtkKeyboard *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* renderer may have not been set yet if the widget is a popup */
 | 
					    /* renderer may have not been set yet if the widget is a popup */
 | 
				
			||||||
    if (!priv->renderer)
 | 
					    if (!priv->renderer)
 | 
				
			||||||
@ -675,7 +603,7 @@ on_key_locked (EekKeyboard *keyboard,
 | 
				
			|||||||
               gpointer     user_data)
 | 
					               gpointer     user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    GtkWidget *widget = user_data;
 | 
					    GtkWidget *widget = user_data;
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (user_data);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* renderer may have not been set yet if the widget is a popup */
 | 
					    /* renderer may have not been set yet if the widget is a popup */
 | 
				
			||||||
    if (!priv->renderer)
 | 
					    if (!priv->renderer)
 | 
				
			||||||
@ -690,7 +618,7 @@ on_key_unlocked (EekKeyboard *keyboard,
 | 
				
			|||||||
                 gpointer     user_data)
 | 
					                 gpointer     user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    GtkWidget *widget = user_data;
 | 
					    GtkWidget *widget = user_data;
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (user_data);
 | 
					    EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* renderer may have not been set yet if the widget is a popup */
 | 
					    /* renderer may have not been set yet if the widget is a popup */
 | 
				
			||||||
    if (!priv->renderer)
 | 
					    if (!priv->renderer)
 | 
				
			||||||
@ -714,9 +642,11 @@ void
 | 
				
			|||||||
eek_gtk_keyboard_set_theme (EekGtkKeyboard *keyboard,
 | 
					eek_gtk_keyboard_set_theme (EekGtkKeyboard *keyboard,
 | 
				
			||||||
                            EekTheme       *theme)
 | 
					                            EekTheme       *theme)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekGtkKeyboardPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_GTK_KEYBOARD(keyboard));
 | 
					    g_return_if_fail (EEK_IS_GTK_KEYBOARD(keyboard));
 | 
				
			||||||
    g_return_if_fail (EEK_IS_THEME(theme));
 | 
					    g_return_if_fail (EEK_IS_THEME(theme));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (keyboard);
 | 
					    priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
 | 
				
			||||||
    priv->theme = g_object_ref (theme);
 | 
					    priv->theme = g_object_ref (theme);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,25 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
#define EEK_TYPE_GTK_KEYBOARD (eek_gtk_keyboard_get_type())
 | 
					#define EEK_TYPE_GTK_KEYBOARD (eek_gtk_keyboard_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekGtkKeyboard, eek_gtk_keyboard, EEK, GTK_KEYBOARD, GtkDrawingArea)
 | 
					#define EEK_GTK_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboard))
 | 
				
			||||||
 | 
					#define EEK_GTK_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardClass))
 | 
				
			||||||
 | 
					#define EEK_IS_GTK_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_GTK_KEYBOARD))
 | 
				
			||||||
 | 
					#define EEK_IS_GTK_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_GTK_KEYBOARD))
 | 
				
			||||||
 | 
					#define EEK_GTK_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekGtkKeyboard EekGtkKeyboard;
 | 
				
			||||||
 | 
					typedef struct _EekGtkKeyboardClass EekGtkKeyboardClass;
 | 
				
			||||||
 | 
					typedef struct _EekGtkKeyboardPrivate EekGtkKeyboardPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekGtkKeyboard
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GtkDrawingArea parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    GdkEventSequence *sequence; // unowned reference
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekGtkKeyboardPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekGtkKeyboardClass
 | 
					struct _EekGtkKeyboardClass
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,13 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static guint signals[LAST_SIGNAL] = { 0, };
 | 
					static guint signals[LAST_SIGNAL] = { 0, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekKeyPrivate
 | 
					G_DEFINE_TYPE (EekKey, eek_key, EEK_TYPE_ELEMENT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_KEY_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEY, EekKeyPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekKeyPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    guint keycode;
 | 
					    guint keycode;
 | 
				
			||||||
    EekSymbolMatrix *symbol_matrix;
 | 
					    EekSymbolMatrix *symbol_matrix;
 | 
				
			||||||
@ -63,14 +69,12 @@ typedef struct _EekKeyPrivate
 | 
				
			|||||||
    gulong oref; // UI outline reference
 | 
					    gulong oref; // UI outline reference
 | 
				
			||||||
    gboolean is_pressed;
 | 
					    gboolean is_pressed;
 | 
				
			||||||
    gboolean is_locked;
 | 
					    gboolean is_locked;
 | 
				
			||||||
} EekKeyPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekKey, eek_key, EEK_TYPE_ELEMENT)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_key_real_locked (EekKey *self)
 | 
					eek_key_real_locked (EekKey *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (self);
 | 
					    EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->is_locked = TRUE;
 | 
					    priv->is_locked = TRUE;
 | 
				
			||||||
#if DEBUG
 | 
					#if DEBUG
 | 
				
			||||||
@ -81,7 +85,7 @@ eek_key_real_locked (EekKey *self)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_key_real_unlocked (EekKey *self)
 | 
					eek_key_real_unlocked (EekKey *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (self);
 | 
					    EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->is_locked = FALSE;
 | 
					    priv->is_locked = FALSE;
 | 
				
			||||||
#if DEBUG
 | 
					#if DEBUG
 | 
				
			||||||
@ -92,11 +96,8 @@ eek_key_real_unlocked (EekKey *self)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_key_finalize (GObject *object)
 | 
					eek_key_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKey        *self = EEK_KEY (object);
 | 
					    EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(object);
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    eek_symbol_matrix_free (priv->symbol_matrix);
 | 
					    eek_symbol_matrix_free (priv->symbol_matrix);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    G_OBJECT_CLASS (eek_key_parent_class)->finalize (object);
 | 
					    G_OBJECT_CLASS (eek_key_parent_class)->finalize (object);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -173,6 +174,9 @@ eek_key_class_init (EekKeyClass *klass)
 | 
				
			|||||||
    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec        *pspec;
 | 
					    GParamSpec        *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekKeyPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->set_property = eek_key_set_property;
 | 
					    gobject_class->set_property = eek_key_set_property;
 | 
				
			||||||
    gobject_class->get_property = eek_key_get_property;
 | 
					    gobject_class->get_property = eek_key_get_property;
 | 
				
			||||||
    gobject_class->finalize     = eek_key_finalize;
 | 
					    gobject_class->finalize     = eek_key_finalize;
 | 
				
			||||||
@ -281,7 +285,9 @@ eek_key_class_init (EekKeyClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_key_init (EekKey *self)
 | 
					eek_key_init (EekKey *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (self);
 | 
					    EekKeyPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv = self->priv = EEK_KEY_GET_PRIVATE(self);
 | 
				
			||||||
    priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
 | 
					    priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -301,10 +307,7 @@ eek_key_set_keycode (EekKey *key,
 | 
				
			|||||||
                     guint   keycode)
 | 
					                     guint   keycode)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_KEY (key));
 | 
					    g_return_if_fail (EEK_IS_KEY (key));
 | 
				
			||||||
 | 
					    key->priv->keycode = keycode;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->keycode = keycode;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -318,10 +321,7 @@ guint
 | 
				
			|||||||
eek_key_get_keycode (EekKey *key)
 | 
					eek_key_get_keycode (EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_KEY (key), EEK_INVALID_KEYCODE);
 | 
					    g_return_val_if_fail (EEK_IS_KEY (key), EEK_INVALID_KEYCODE);
 | 
				
			||||||
 | 
					    return key->priv->keycode;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->keycode;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -337,10 +337,8 @@ eek_key_set_symbol_matrix (EekKey          *key,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_KEY(key));
 | 
					    g_return_if_fail (EEK_IS_KEY(key));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					    eek_symbol_matrix_free (key->priv->symbol_matrix);
 | 
				
			||||||
 | 
					    key->priv->symbol_matrix = eek_symbol_matrix_copy (matrix);
 | 
				
			||||||
    eek_symbol_matrix_free (priv->symbol_matrix);
 | 
					 | 
				
			||||||
    priv->symbol_matrix = eek_symbol_matrix_copy (matrix);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -354,10 +352,7 @@ EekSymbolMatrix *
 | 
				
			|||||||
eek_key_get_symbol_matrix (EekKey *key)
 | 
					eek_key_get_symbol_matrix (EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_KEY(key), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_KEY(key), NULL);
 | 
				
			||||||
 | 
					    return key->priv->symbol_matrix;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->symbol_matrix;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -445,7 +440,7 @@ eek_key_get_symbol_at_index (EekKey *key,
 | 
				
			|||||||
                             gint    fallback_group,
 | 
					                             gint    fallback_group,
 | 
				
			||||||
                             gint    fallback_level)
 | 
					                             gint    fallback_level)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					    EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(key);
 | 
				
			||||||
    gint num_symbols;
 | 
					    gint num_symbols;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (fallback_group >= 0, NULL);
 | 
					    g_return_val_if_fail (fallback_group >= 0, NULL);
 | 
				
			||||||
@ -497,14 +492,12 @@ eek_key_set_index (EekKey *key,
 | 
				
			|||||||
    g_return_if_fail (0 <= column);
 | 
					    g_return_if_fail (0 <= column);
 | 
				
			||||||
    g_return_if_fail (0 <= row);
 | 
					    g_return_if_fail (0 <= row);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					    if (key->priv->column != column) {
 | 
				
			||||||
 | 
					        key->priv->column = column;
 | 
				
			||||||
    if (priv->column != column) {
 | 
					 | 
				
			||||||
        priv->column = column;
 | 
					 | 
				
			||||||
        g_object_notify (G_OBJECT(key), "column");
 | 
					        g_object_notify (G_OBJECT(key), "column");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (priv->row != row) {
 | 
					    if (key->priv->row != row) {
 | 
				
			||||||
        priv->row = row;
 | 
					        key->priv->row = row;
 | 
				
			||||||
        g_object_notify (G_OBJECT(key), "row");
 | 
					        g_object_notify (G_OBJECT(key), "row");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -525,12 +518,10 @@ eek_key_get_index (EekKey *key,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_KEY(key));
 | 
					    g_return_if_fail (EEK_IS_KEY(key));
 | 
				
			||||||
    g_return_if_fail (column != NULL || row != NULL);
 | 
					    g_return_if_fail (column != NULL || row != NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (column != NULL)
 | 
					    if (column != NULL)
 | 
				
			||||||
        *column = priv->column;
 | 
					        *column = key->priv->column;
 | 
				
			||||||
    if (row != NULL)
 | 
					    if (row != NULL)
 | 
				
			||||||
        *row = priv->row;
 | 
					        *row = key->priv->row;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -545,11 +536,8 @@ eek_key_set_oref (EekKey *key,
 | 
				
			|||||||
                  guint   oref)
 | 
					                  guint   oref)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_KEY(key));
 | 
					    g_return_if_fail (EEK_IS_KEY(key));
 | 
				
			||||||
 | 
					    if (key->priv->oref != oref) {
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					        key->priv->oref = oref;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->oref != oref) {
 | 
					 | 
				
			||||||
        priv->oref = oref;
 | 
					 | 
				
			||||||
        g_object_notify (G_OBJECT(key), "oref");
 | 
					        g_object_notify (G_OBJECT(key), "oref");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -565,10 +553,7 @@ guint
 | 
				
			|||||||
eek_key_get_oref (EekKey *key)
 | 
					eek_key_get_oref (EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_KEY (key), 0);
 | 
					    g_return_val_if_fail (EEK_IS_KEY (key), 0);
 | 
				
			||||||
 | 
					    return key->priv->oref;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->oref;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -581,10 +566,7 @@ gboolean
 | 
				
			|||||||
eek_key_is_pressed (EekKey *key)
 | 
					eek_key_is_pressed (EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_KEY(key), FALSE);
 | 
					    g_return_val_if_fail (EEK_IS_KEY(key), FALSE);
 | 
				
			||||||
 | 
					    return key->priv->is_pressed;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->is_pressed;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -597,17 +579,11 @@ gboolean
 | 
				
			|||||||
eek_key_is_locked (EekKey *key)
 | 
					eek_key_is_locked (EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_KEY(key), FALSE);
 | 
					    g_return_val_if_fail (EEK_IS_KEY(key), FALSE);
 | 
				
			||||||
 | 
					    return key->priv->is_locked;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->is_locked;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void eek_key_set_pressed(EekKey *key, gboolean value)
 | 
					void eek_key_set_pressed(EekKey *key, gboolean value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_KEY(key));
 | 
					    g_return_if_fail (EEK_IS_KEY(key));
 | 
				
			||||||
 | 
					    key->priv->is_pressed = value;
 | 
				
			||||||
    EekKeyPrivate *priv = eek_key_get_instance_private (key);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->is_pressed = value;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,31 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_KEY (eek_key_get_type())
 | 
					#define EEK_TYPE_KEY (eek_key_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE(EekKey, eek_key, EEK, KEY, EekElement)
 | 
					#define EEK_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_KEY, EekKey))
 | 
				
			||||||
 | 
					#define EEK_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_KEY, EekKeyClass))
 | 
				
			||||||
 | 
					#define EEK_IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_KEY))
 | 
				
			||||||
 | 
					#define EEK_IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_KEY))
 | 
				
			||||||
 | 
					#define EEK_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_KEY, EekKeyClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekKeyClass EekKeyClass;
 | 
				
			||||||
 | 
					typedef struct _EekKeyPrivate EekKeyPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekKey:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Contains information about the state of a key.
 | 
				
			||||||
 | 
					 * TODO: rewrite as a plain struct
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekKey structure contains only private data and should only be
 | 
				
			||||||
 | 
					 * accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekKey
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekElement parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekKeyPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekKeyClass:
 | 
					 * EekKeyClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -50,10 +50,9 @@
 | 
				
			|||||||
#define EEK_KEYSYM_Hyper_L 0xffed
 | 
					#define EEK_KEYSYM_Hyper_L 0xffed
 | 
				
			||||||
#define EEK_KEYSYM_Hyper_R 0xffee
 | 
					#define EEK_KEYSYM_Hyper_R 0xffee
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekKeysymPrivate
 | 
					struct _EekKeysymPrivate {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    guint xkeysym;
 | 
					    guint xkeysym;
 | 
				
			||||||
} EekKeysymPrivate;
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekKeysymEntry {
 | 
					struct _EekKeysymEntry {
 | 
				
			||||||
    guint xkeysym;
 | 
					    guint xkeysym;
 | 
				
			||||||
@ -69,11 +68,12 @@ typedef struct _EekKeysymEntry EekKeysymEntry;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
 | 
					static void eek_serializable_iface_init (EekSerializableIface *iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_DEFINE_TYPE_EXTENDED (EekKeysym, eek_keysym, EEK_TYPE_SYMBOL,
 | 
					G_DEFINE_TYPE_WITH_CODE (EekKeysym, eek_keysym, EEK_TYPE_SYMBOL,
 | 
				
			||||||
			0, /* GTypeFlags */
 | 
					 | 
				
			||||||
			G_ADD_PRIVATE (EekKeysym)
 | 
					 | 
				
			||||||
                         G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
 | 
					                         G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
 | 
				
			||||||
                                               eek_serializable_iface_init))
 | 
					                                                eek_serializable_iface_init));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_KEYSYM_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYSYM, EekKeysymPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static EekSerializableIface *eek_keysym_parent_serializable_iface;
 | 
					static EekSerializableIface *eek_keysym_parent_serializable_iface;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -81,8 +81,7 @@ static void
 | 
				
			|||||||
eek_keysym_real_serialize (EekSerializable *self,
 | 
					eek_keysym_real_serialize (EekSerializable *self,
 | 
				
			||||||
                           GVariantBuilder *builder)
 | 
					                           GVariantBuilder *builder)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeysymPrivate *priv = eek_keysym_get_instance_private (
 | 
					    EekKeysymPrivate *priv = EEK_KEYSYM_GET_PRIVATE(self);
 | 
				
			||||||
		    EEK_KEYSYM(self));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_keysym_parent_serializable_iface->serialize (self, builder);
 | 
					    eek_keysym_parent_serializable_iface->serialize (self, builder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -94,8 +93,7 @@ eek_keysym_real_deserialize (EekSerializable *self,
 | 
				
			|||||||
                             GVariant        *variant,
 | 
					                             GVariant        *variant,
 | 
				
			||||||
                             gsize            index)
 | 
					                             gsize            index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeysymPrivate *priv = eek_keysym_get_instance_private (
 | 
					    EekKeysymPrivate *priv = EEK_KEYSYM_GET_PRIVATE(self);
 | 
				
			||||||
		    EEK_KEYSYM(self));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    index = eek_keysym_parent_serializable_iface->deserialize (self,
 | 
					    index = eek_keysym_parent_serializable_iface->deserialize (self,
 | 
				
			||||||
                                                               variant,
 | 
					                                                               variant,
 | 
				
			||||||
@ -179,7 +177,7 @@ get_modifier_mask (guint xkeysym)
 | 
				
			|||||||
    case EEK_KEYSYM_Shift_Lock:
 | 
					    case EEK_KEYSYM_Shift_Lock:
 | 
				
			||||||
        return EEK_SHIFT_MASK;
 | 
					        return EEK_SHIFT_MASK;
 | 
				
			||||||
    case EEK_KEYSYM_ISO_Level3_Shift:
 | 
					    case EEK_KEYSYM_ISO_Level3_Shift:
 | 
				
			||||||
        return EEK_BUTTON1_MASK;
 | 
					        return EEK_MOD5_MASK;
 | 
				
			||||||
    case EEK_KEYSYM_Control_L:
 | 
					    case EEK_KEYSYM_Control_L:
 | 
				
			||||||
    case EEK_KEYSYM_Control_R:
 | 
					    case EEK_KEYSYM_Control_R:
 | 
				
			||||||
        return EEK_CONTROL_MASK;
 | 
					        return EEK_CONTROL_MASK;
 | 
				
			||||||
@ -202,13 +200,15 @@ get_modifier_mask (guint xkeysym)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_keysym_class_init (EekKeysymClass *klass)
 | 
					eek_keysym_class_init (EekKeysymClass *klass)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekKeysymPrivate));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_keysym_init (EekKeysym *self)
 | 
					eek_keysym_init (EekKeysym *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_KEYSYM_GET_PRIVATE(self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -291,7 +291,7 @@ eek_keysym_new_with_modifier (guint           xkeysym,
 | 
				
			|||||||
        g_slice_free (EekKeysymEntry, unichar_entry);
 | 
					        g_slice_free (EekKeysymEntry, unichar_entry);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv = eek_keysym_get_instance_private (keysym);
 | 
					    priv = EEK_KEYSYM_GET_PRIVATE(keysym);
 | 
				
			||||||
    priv->xkeysym = xkeysym;
 | 
					    priv->xkeysym = xkeysym;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return keysym;
 | 
					    return keysym;
 | 
				
			||||||
@ -345,6 +345,6 @@ eek_keysym_get_xkeysym (EekKeysym *keysym)
 | 
				
			|||||||
    EekKeysymPrivate *priv;
 | 
					    EekKeysymPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_assert (EEK_IS_KEYSYM(keysym));
 | 
					    g_assert (EEK_IS_KEYSYM(keysym));
 | 
				
			||||||
    priv = eek_keysym_get_instance_private (keysym);
 | 
					    priv = EEK_KEYSYM_GET_PRIVATE(keysym);
 | 
				
			||||||
    return priv->xkeysym;
 | 
					    return priv->xkeysym;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -38,7 +38,27 @@ G_BEGIN_DECLS
 | 
				
			|||||||
#define EEK_INVALID_KEYSYM (0)
 | 
					#define EEK_INVALID_KEYSYM (0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_KEYSYM (eek_keysym_get_type())
 | 
					#define EEK_TYPE_KEYSYM (eek_keysym_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekKeysym, eek_keysym, EEK, KEYSYM, EekSymbol)
 | 
					#define EEK_KEYSYM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_KEYSYM, EekKeysym))
 | 
				
			||||||
 | 
					#define EEK_KEYSYM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_KEYSYM, EekKeysymClass))
 | 
				
			||||||
 | 
					#define EEK_IS_KEYSYM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_KEYSYM))
 | 
				
			||||||
 | 
					#define EEK_IS_KEYSYM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_KEYSYM))
 | 
				
			||||||
 | 
					#define EEK_KEYSYM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_KEYSYM, EekKeysymClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekKeysymClass EekKeysymClass;
 | 
				
			||||||
 | 
					typedef struct _EekKeysymPrivate EekKeysymPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekKeysym:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekKeysym structure contains only private data and should only
 | 
				
			||||||
 | 
					 * be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekKeysym {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekSymbol parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekKeysymPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekKeysymClass {
 | 
					struct _EekKeysymClass {
 | 
				
			||||||
    /*< private >*/
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
				
			|||||||
@ -34,7 +34,7 @@
 | 
				
			|||||||
#include "eek-keyboard.h"
 | 
					#include "eek-keyboard.h"
 | 
				
			||||||
#include "eekboard/eekboard-context-service.h"
 | 
					#include "eekboard/eekboard-context-service.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_DEFINE_ABSTRACT_TYPE (EekLayout, eek_layout, G_TYPE_OBJECT)
 | 
					G_DEFINE_ABSTRACT_TYPE (EekLayout, eek_layout, G_TYPE_OBJECT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_layout_class_init (EekLayoutClass *klass)
 | 
					eek_layout_class_init (EekLayoutClass *klass)
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,20 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_LAYOUT (eek_layout_get_type())
 | 
					#define EEK_TYPE_LAYOUT (eek_layout_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekLayout, eek_layout, EEK, LAYOUT, GObject)
 | 
					#define EEK_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_LAYOUT, EekLayout))
 | 
				
			||||||
 | 
					#define EEK_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_LAYOUT, EekLayoutClass))
 | 
				
			||||||
 | 
					#define EEK_IS_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_LAYOUT, EekLayoutClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekLayoutClass EekLayoutClass;
 | 
				
			||||||
 | 
					typedef struct _EekLayout EekLayout;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekLayout
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekLayoutClass:
 | 
					 * EekLayoutClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -36,7 +36,12 @@ enum {
 | 
				
			|||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekRendererPrivate
 | 
					G_DEFINE_TYPE (EekRenderer, eek_renderer, G_TYPE_OBJECT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_RENDERER_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_RENDERER, EekRendererPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekRendererPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKeyboard *keyboard;
 | 
					    EekKeyboard *keyboard;
 | 
				
			||||||
    PangoContext *pcontext;
 | 
					    PangoContext *pcontext;
 | 
				
			||||||
@ -57,9 +62,7 @@ typedef struct _EekRendererPrivate
 | 
				
			|||||||
    gulong symbol_index_changed_handler;
 | 
					    gulong symbol_index_changed_handler;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekTheme *theme;
 | 
					    EekTheme *theme;
 | 
				
			||||||
} EekRendererPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekRenderer, eek_renderer, G_TYPE_OBJECT)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const EekColor DEFAULT_FOREGROUND_COLOR = {0.3, 0.3, 0.3, 1.0};
 | 
					static const EekColor DEFAULT_FOREGROUND_COLOR = {0.3, 0.3, 0.3, 1.0};
 | 
				
			||||||
static const EekColor DEFAULT_BACKGROUND_COLOR = {1.0, 1.0, 1.0, 1.0};
 | 
					static const EekColor DEFAULT_BACKGROUND_COLOR = {1.0, 1.0, 1.0, 1.0};
 | 
				
			||||||
@ -103,7 +106,7 @@ create_keyboard_surface_key_callback (EekElement *element,
 | 
				
			|||||||
                                      gpointer    user_data)
 | 
					                                      gpointer    user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    CreateKeyboardSurfaceCallbackData *data = user_data;
 | 
					    CreateKeyboardSurfaceCallbackData *data = user_data;
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (data->renderer);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(data->renderer);
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    cairo_save (data->cr);
 | 
					    cairo_save (data->cr);
 | 
				
			||||||
@ -126,7 +129,7 @@ create_keyboard_surface_section_callback (EekElement *element,
 | 
				
			|||||||
                                          gpointer    user_data)
 | 
					                                          gpointer    user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    CreateKeyboardSurfaceCallbackData *data = user_data;
 | 
					    CreateKeyboardSurfaceCallbackData *data = user_data;
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (data->renderer);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(data->renderer);
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    gint angle;
 | 
					    gint angle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -148,7 +151,7 @@ create_keyboard_surface_section_callback (EekElement *element,
 | 
				
			|||||||
static cairo_surface_t *
 | 
					static cairo_surface_t *
 | 
				
			||||||
create_keyboard_surface (EekRenderer *renderer)
 | 
					create_keyboard_surface (EekRenderer *renderer)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(renderer);
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    cairo_surface_t *keyboard_surface;
 | 
					    cairo_surface_t *keyboard_surface;
 | 
				
			||||||
    CreateKeyboardSurfaceCallbackData data;
 | 
					    CreateKeyboardSurfaceCallbackData data;
 | 
				
			||||||
@ -199,7 +202,7 @@ render_key_outline (EekRenderer *renderer,
 | 
				
			|||||||
                    EekKey      *key,
 | 
					                    EekKey      *key,
 | 
				
			||||||
                    gboolean     active)
 | 
					                    gboolean     active)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(renderer);
 | 
				
			||||||
    EekOutline *outline;
 | 
					    EekOutline *outline;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    guint oref;
 | 
					    guint oref;
 | 
				
			||||||
@ -243,9 +246,7 @@ render_key_outline (EekRenderer *renderer,
 | 
				
			|||||||
        border_color.alpha = foreground.alpha;
 | 
					        border_color.alpha = foreground.alpha;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_element_get_bounds(EEK_ELEMENT(key), &bounds);
 | 
					 | 
				
			||||||
    outline = eek_outline_copy (outline);
 | 
					    outline = eek_outline_copy (outline);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (guint i = 0; i < outline->num_points; i++) {
 | 
					    for (guint i = 0; i < outline->num_points; i++) {
 | 
				
			||||||
        outline->points[i].x *= priv->scale;
 | 
					        outline->points[i].x *= priv->scale;
 | 
				
			||||||
        outline->points[i].y *= priv->scale;
 | 
					        outline->points[i].y *= priv->scale;
 | 
				
			||||||
@ -350,7 +351,7 @@ static void
 | 
				
			|||||||
calculate_font_size_key_callback (EekElement *element, gpointer user_data)
 | 
					calculate_font_size_key_callback (EekElement *element, gpointer user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    CalculateFontSizeCallbackData *data = user_data;
 | 
					    CalculateFontSizeCallbackData *data = user_data;
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (data->renderer);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(data->renderer);
 | 
				
			||||||
    gdouble sx, sy;
 | 
					    gdouble sx, sy;
 | 
				
			||||||
    PangoFontDescription *font;
 | 
					    PangoFontDescription *font;
 | 
				
			||||||
    PangoRectangle extents = { 0, };
 | 
					    PangoRectangle extents = { 0, };
 | 
				
			||||||
@ -410,7 +411,7 @@ calculate_font_size (EekRenderer                *renderer,
 | 
				
			|||||||
                     const PangoFontDescription *base_font,
 | 
					                     const PangoFontDescription *base_font,
 | 
				
			||||||
                     gboolean                    ascii)
 | 
					                     gboolean                    ascii)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(renderer);
 | 
				
			||||||
    CalculateFontSizeCallbackData data;
 | 
					    CalculateFontSizeCallbackData data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    data.size = G_MAXDOUBLE;
 | 
					    data.size = G_MAXDOUBLE;
 | 
				
			||||||
@ -429,7 +430,7 @@ render_key (EekRenderer *self,
 | 
				
			|||||||
            EekKey      *key,
 | 
					            EekKey      *key,
 | 
				
			||||||
            gboolean     active)
 | 
					            gboolean     active)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
 | 
				
			||||||
    EekOutline *outline;
 | 
					    EekOutline *outline;
 | 
				
			||||||
    cairo_surface_t *outline_surface;
 | 
					    cairo_surface_t *outline_surface;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
@ -602,7 +603,7 @@ eek_renderer_real_render_key_label (EekRenderer *self,
 | 
				
			|||||||
                                    PangoLayout *layout,
 | 
					                                    PangoLayout *layout,
 | 
				
			||||||
                                    EekKey      *key)
 | 
					                                    EekKey      *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
 | 
				
			||||||
    EekSymbol *symbol;
 | 
					    EekSymbol *symbol;
 | 
				
			||||||
    EekSymbolCategory category;
 | 
					    EekSymbolCategory category;
 | 
				
			||||||
    const gchar *label;
 | 
					    const gchar *label;
 | 
				
			||||||
@ -695,7 +696,7 @@ static void
 | 
				
			|||||||
eek_renderer_real_render_keyboard (EekRenderer *self,
 | 
					eek_renderer_real_render_keyboard (EekRenderer *self,
 | 
				
			||||||
                                   cairo_t     *cr)
 | 
					                                   cairo_t     *cr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
 | 
				
			||||||
    cairo_pattern_t *source;
 | 
					    cairo_pattern_t *source;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (priv->keyboard);
 | 
					    g_return_if_fail (priv->keyboard);
 | 
				
			||||||
@ -717,8 +718,7 @@ eek_renderer_set_property (GObject      *object,
 | 
				
			|||||||
                           const GValue *value,
 | 
					                           const GValue *value,
 | 
				
			||||||
                           GParamSpec   *pspec)
 | 
					                           GParamSpec   *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(object);
 | 
				
			||||||
		    EEK_RENDERER(object));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_KEYBOARD:
 | 
					    case PROP_KEYBOARD:
 | 
				
			||||||
@ -746,8 +746,7 @@ eek_renderer_get_property (GObject    *object,
 | 
				
			|||||||
                           GValue     *value,
 | 
					                           GValue     *value,
 | 
				
			||||||
                           GParamSpec *pspec)
 | 
					                           GParamSpec *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(object);
 | 
				
			||||||
		    EEK_RENDERER(object));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_KEYBOARD:
 | 
					    case PROP_KEYBOARD:
 | 
				
			||||||
@ -762,8 +761,7 @@ eek_renderer_get_property (GObject    *object,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_renderer_dispose (GObject *object)
 | 
					eek_renderer_dispose (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRenderer        *self = EEK_RENDERER (object);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(object);
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->keyboard) {
 | 
					    if (priv->keyboard) {
 | 
				
			||||||
        if (g_signal_handler_is_connected (priv->keyboard,
 | 
					        if (g_signal_handler_is_connected (priv->keyboard,
 | 
				
			||||||
@ -787,9 +785,7 @@ eek_renderer_dispose (GObject *object)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_renderer_finalize (GObject *object)
 | 
					eek_renderer_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRenderer        *self = EEK_RENDERER(object);
 | 
					    EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(object);
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_hash_table_destroy (priv->outline_surface_cache);
 | 
					    g_hash_table_destroy (priv->outline_surface_cache);
 | 
				
			||||||
    g_hash_table_destroy (priv->active_outline_surface_cache);
 | 
					    g_hash_table_destroy (priv->active_outline_surface_cache);
 | 
				
			||||||
    pango_font_description_free (priv->ascii_font);
 | 
					    pango_font_description_free (priv->ascii_font);
 | 
				
			||||||
@ -803,6 +799,9 @@ eek_renderer_class_init (EekRendererClass *klass)
 | 
				
			|||||||
    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec        *pspec;
 | 
					    GParamSpec        *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekRendererPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    klass->render_key_label = eek_renderer_real_render_key_label;
 | 
					    klass->render_key_label = eek_renderer_real_render_key_label;
 | 
				
			||||||
    klass->render_key_outline = eek_renderer_real_render_key_outline;
 | 
					    klass->render_key_outline = eek_renderer_real_render_key_outline;
 | 
				
			||||||
    klass->render_key = eek_renderer_real_render_key;
 | 
					    klass->render_key = eek_renderer_real_render_key;
 | 
				
			||||||
@ -835,8 +834,9 @@ eek_renderer_class_init (EekRendererClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_renderer_init (EekRenderer *self)
 | 
					eek_renderer_init (EekRenderer *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
 | 
					    EekRendererPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv = self->priv = EEK_RENDERER_GET_PRIVATE(self);
 | 
				
			||||||
    priv->keyboard = NULL;
 | 
					    priv->keyboard = NULL;
 | 
				
			||||||
    priv->pcontext = NULL;
 | 
					    priv->pcontext = NULL;
 | 
				
			||||||
    priv->default_foreground_color = DEFAULT_FOREGROUND_COLOR;
 | 
					    priv->default_foreground_color = DEFAULT_FOREGROUND_COLOR;
 | 
				
			||||||
@ -863,17 +863,15 @@ eek_renderer_init (EekRenderer *self)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
invalidate (EekRenderer *renderer)
 | 
					invalidate (EekRenderer *renderer)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    if (renderer->priv->outline_surface_cache)
 | 
				
			||||||
 | 
					        g_hash_table_remove_all (renderer->priv->outline_surface_cache);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->outline_surface_cache)
 | 
					    if (renderer->priv->active_outline_surface_cache)
 | 
				
			||||||
        g_hash_table_remove_all (priv->outline_surface_cache);
 | 
					        g_hash_table_remove_all (renderer->priv->active_outline_surface_cache);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->active_outline_surface_cache)
 | 
					    if (renderer->priv->keyboard_surface) {
 | 
				
			||||||
        g_hash_table_remove_all (priv->active_outline_surface_cache);
 | 
					        cairo_surface_destroy (renderer->priv->keyboard_surface);
 | 
				
			||||||
 | 
					        renderer->priv->keyboard_surface = NULL;
 | 
				
			||||||
    if (priv->keyboard_surface) {
 | 
					 | 
				
			||||||
        cairo_surface_destroy (priv->keyboard_surface);
 | 
					 | 
				
			||||||
        priv->keyboard_surface = NULL;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -908,12 +906,10 @@ eek_renderer_set_allocation_size (EekRenderer *renderer,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
    g_return_if_fail (width > 0.0 && height > 0.0);
 | 
					    g_return_if_fail (width > 0.0 && height > 0.0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    renderer->priv->allocation_width = width;
 | 
				
			||||||
 | 
					    renderer->priv->allocation_height = height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->allocation_width = width;
 | 
					    eek_element_get_bounds (EEK_ELEMENT(renderer->priv->keyboard), &bounds);
 | 
				
			||||||
    priv->allocation_height = height;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (bounds.height * width / bounds.width <= height)
 | 
					    if (bounds.height * width / bounds.width <= height)
 | 
				
			||||||
        scale = width / bounds.width;
 | 
					        scale = width / bounds.width;
 | 
				
			||||||
@ -926,8 +922,8 @@ eek_renderer_set_allocation_size (EekRenderer *renderer,
 | 
				
			|||||||
            scale = bounds.height / height;
 | 
					            scale = bounds.height / height;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (scale != priv->scale) {
 | 
					    if (scale != renderer->priv->scale) {
 | 
				
			||||||
        priv->scale = scale;
 | 
					        renderer->priv->scale = scale;
 | 
				
			||||||
        invalidate (renderer);
 | 
					        invalidate (renderer);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -941,13 +937,11 @@ eek_renderer_get_size (EekRenderer *renderer,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    eek_element_get_bounds (EEK_ELEMENT(renderer->priv->keyboard), &bounds);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
 | 
					 | 
				
			||||||
    if (width)
 | 
					    if (width)
 | 
				
			||||||
        *width = bounds.width * priv->scale;
 | 
					        *width = bounds.width * renderer->priv->scale;
 | 
				
			||||||
    if (height)
 | 
					    if (height)
 | 
				
			||||||
        *height = bounds.height * priv->scale;
 | 
					        *height = bounds.height * renderer->priv->scale;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
@ -966,22 +960,20 @@ eek_renderer_get_key_bounds (EekRenderer *renderer,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_KEY(key));
 | 
					    g_return_if_fail (EEK_IS_KEY(key));
 | 
				
			||||||
    g_return_if_fail (bounds != NULL);
 | 
					    g_return_if_fail (bounds != NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    section = eek_element_get_parent (EEK_ELEMENT(key));
 | 
					    section = eek_element_get_parent (EEK_ELEMENT(key));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_element_get_bounds (EEK_ELEMENT(key), bounds);
 | 
					    eek_element_get_bounds (EEK_ELEMENT(key), bounds);
 | 
				
			||||||
    eek_element_get_bounds (section, §ion_bounds);
 | 
					    eek_element_get_bounds (section, §ion_bounds);
 | 
				
			||||||
    eek_element_get_bounds (EEK_ELEMENT(priv->keyboard),
 | 
					    eek_element_get_bounds (EEK_ELEMENT(renderer->priv->keyboard),
 | 
				
			||||||
                            &keyboard_bounds);
 | 
					                            &keyboard_bounds);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!rotate) {
 | 
					    if (!rotate) {
 | 
				
			||||||
        bounds->x += keyboard_bounds.x + section_bounds.x;
 | 
					        bounds->x += keyboard_bounds.x + section_bounds.x;
 | 
				
			||||||
        bounds->y += keyboard_bounds.y + section_bounds.y;
 | 
					        bounds->y += keyboard_bounds.y + section_bounds.y;
 | 
				
			||||||
        bounds->x *= priv->scale;
 | 
					        bounds->x *= renderer->priv->scale;
 | 
				
			||||||
        bounds->y *= priv->scale;
 | 
					        bounds->y *= renderer->priv->scale;
 | 
				
			||||||
        bounds->width *= priv->scale;
 | 
					        bounds->width *= renderer->priv->scale;
 | 
				
			||||||
        bounds->height *= priv->scale;
 | 
					        bounds->height *= renderer->priv->scale;
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    points[0].x = bounds->x;
 | 
					    points[0].x = bounds->x;
 | 
				
			||||||
@ -1013,30 +1005,24 @@ eek_renderer_get_key_bounds (EekRenderer *renderer,
 | 
				
			|||||||
    bounds->y = keyboard_bounds.y + section_bounds.y + min.y;
 | 
					    bounds->y = keyboard_bounds.y + section_bounds.y + min.y;
 | 
				
			||||||
    bounds->width = (max.x - min.x);
 | 
					    bounds->width = (max.x - min.x);
 | 
				
			||||||
    bounds->height = (max.y - min.y);
 | 
					    bounds->height = (max.y - min.y);
 | 
				
			||||||
    bounds->x *= priv->scale;
 | 
					    bounds->x *= renderer->priv->scale;
 | 
				
			||||||
    bounds->y *= priv->scale;
 | 
					    bounds->y *= renderer->priv->scale;
 | 
				
			||||||
    bounds->width *= priv->scale;
 | 
					    bounds->width *= renderer->priv->scale;
 | 
				
			||||||
    bounds->height *= priv->scale;
 | 
					    bounds->height *= renderer->priv->scale;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
gdouble
 | 
					gdouble
 | 
				
			||||||
eek_renderer_get_scale (EekRenderer *renderer)
 | 
					eek_renderer_get_scale (EekRenderer *renderer)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_RENDERER(renderer), 0);
 | 
					    g_return_val_if_fail (EEK_IS_RENDERER(renderer), 0);
 | 
				
			||||||
 | 
					    return renderer->priv->scale;
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->scale;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PangoLayout *
 | 
					PangoLayout *
 | 
				
			||||||
eek_renderer_create_pango_layout (EekRenderer  *renderer)
 | 
					eek_renderer_create_pango_layout (EekRenderer  *renderer)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_RENDERER(renderer), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_RENDERER(renderer), NULL);
 | 
				
			||||||
 | 
					    return pango_layout_new (renderer->priv->pcontext);
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return pango_layout_new (priv->pcontext);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
@ -1114,9 +1100,7 @@ eek_renderer_set_default_foreground_color (EekRenderer    *renderer,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
    g_return_if_fail (color);
 | 
					    g_return_if_fail (color);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    memcpy (&renderer->priv->default_foreground_color, color, sizeof(EekColor));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    memcpy (&priv->default_foreground_color, color, sizeof(EekColor));
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
@ -1126,9 +1110,7 @@ eek_renderer_set_default_background_color (EekRenderer    *renderer,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
    g_return_if_fail (color);
 | 
					    g_return_if_fail (color);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    memcpy (&renderer->priv->default_background_color, color, sizeof(EekColor));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    memcpy (&priv->default_background_color, color, sizeof(EekColor));
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
@ -1141,13 +1123,11 @@ eek_renderer_get_foreground_color (EekRenderer *renderer,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
    g_return_if_fail (color);
 | 
					    g_return_if_fail (color);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    theme_node = g_object_get_data (G_OBJECT(element), "theme-node");
 | 
					    theme_node = g_object_get_data (G_OBJECT(element), "theme-node");
 | 
				
			||||||
    if (theme_node)
 | 
					    if (theme_node)
 | 
				
			||||||
        eek_theme_node_get_foreground_color (theme_node, color);
 | 
					        eek_theme_node_get_foreground_color (theme_node, color);
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        memcpy (color, &priv->default_foreground_color,
 | 
					        memcpy (color, &renderer->priv->default_foreground_color,
 | 
				
			||||||
                sizeof(EekColor));
 | 
					                sizeof(EekColor));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1161,13 +1141,11 @@ eek_renderer_get_background_color (EekRenderer *renderer,
 | 
				
			|||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
    g_return_if_fail (color);
 | 
					    g_return_if_fail (color);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    theme_node = g_object_get_data (G_OBJECT(element), "theme-node");
 | 
					    theme_node = g_object_get_data (G_OBJECT(element), "theme-node");
 | 
				
			||||||
    if (theme_node)
 | 
					    if (theme_node)
 | 
				
			||||||
        eek_theme_node_get_background_color (theme_node, color);
 | 
					        eek_theme_node_get_background_color (theme_node, color);
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        memcpy (color, &priv->default_background_color,
 | 
					        memcpy (color, &renderer->priv->default_background_color,
 | 
				
			||||||
                sizeof(EekColor));
 | 
					                sizeof(EekColor));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1230,14 +1208,12 @@ find_key_by_position_key_callback (EekElement *element,
 | 
				
			|||||||
    points[3].x = points[0].x;
 | 
					    points[3].x = points[0].x;
 | 
				
			||||||
    points[3].y = points[2].y;
 | 
					    points[3].y = points[2].y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (data->renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (i = 0; i < G_N_ELEMENTS(points); i++) {
 | 
					    for (i = 0; i < G_N_ELEMENTS(points); i++) {
 | 
				
			||||||
        eek_point_rotate (&points[i], data->angle);
 | 
					        eek_point_rotate (&points[i], data->angle);
 | 
				
			||||||
        points[i].x += data->origin.x;
 | 
					        points[i].x += data->origin.x;
 | 
				
			||||||
        points[i].y += data->origin.y;
 | 
					        points[i].y += data->origin.y;
 | 
				
			||||||
        points[i].x *= priv->scale;
 | 
					        points[i].x *= data->renderer->priv->scale;
 | 
				
			||||||
        points[i].y *= priv->scale;
 | 
					        points[i].y *= data->renderer->priv->scale;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    b1 = sign (&data->point, &points[0], &points[1]) < 0.0;
 | 
					    b1 = sign (&data->point, &points[0], &points[1]) < 0.0;
 | 
				
			||||||
@ -1292,14 +1268,12 @@ eek_renderer_find_key_by_position (EekRenderer *renderer,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_RENDERER(renderer), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_RENDERER(renderer), NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    eek_element_get_bounds (EEK_ELEMENT(renderer->priv->keyboard), &bounds);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
 | 
					    if (x < bounds.x * renderer->priv->scale ||
 | 
				
			||||||
 | 
					        y < bounds.y * renderer->priv->scale ||
 | 
				
			||||||
    if (x < bounds.x * priv->scale ||
 | 
					        x > bounds.width * renderer->priv->scale ||
 | 
				
			||||||
        y < bounds.y * priv->scale ||
 | 
					        y > bounds.height * renderer->priv->scale)
 | 
				
			||||||
        x > bounds.width * priv->scale ||
 | 
					 | 
				
			||||||
        y > bounds.height * priv->scale)
 | 
					 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    data.point.x = x;
 | 
					    data.point.x = x;
 | 
				
			||||||
@ -1309,7 +1283,7 @@ eek_renderer_find_key_by_position (EekRenderer *renderer,
 | 
				
			|||||||
    data.key = NULL;
 | 
					    data.key = NULL;
 | 
				
			||||||
    data.renderer = renderer;
 | 
					    data.renderer = renderer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_container_find (EEK_CONTAINER(priv->keyboard),
 | 
					    eek_container_find (EEK_CONTAINER(renderer->priv->keyboard),
 | 
				
			||||||
                        find_key_by_position_section_callback,
 | 
					                        find_key_by_position_section_callback,
 | 
				
			||||||
                        &data);
 | 
					                        &data);
 | 
				
			||||||
    return data.key;
 | 
					    return data.key;
 | 
				
			||||||
@ -1329,11 +1303,9 @@ create_theme_node_key_callback (EekElement *element,
 | 
				
			|||||||
    CreateThemeNodeData *data = user_data;
 | 
					    CreateThemeNodeData *data = user_data;
 | 
				
			||||||
    EekThemeNode *theme_node;
 | 
					    EekThemeNode *theme_node;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (data->renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    theme_node = eek_theme_node_new (data->context,
 | 
					    theme_node = eek_theme_node_new (data->context,
 | 
				
			||||||
                                     data->parent,
 | 
					                                     data->parent,
 | 
				
			||||||
                                     priv->theme,
 | 
					                                     data->renderer->priv->theme,
 | 
				
			||||||
                                     EEK_TYPE_KEY,
 | 
					                                     EEK_TYPE_KEY,
 | 
				
			||||||
                                     eek_element_get_name (element),
 | 
					                                     eek_element_get_name (element),
 | 
				
			||||||
                                     "key",
 | 
					                                     "key",
 | 
				
			||||||
@ -1346,7 +1318,7 @@ create_theme_node_key_callback (EekElement *element,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    theme_node = eek_theme_node_new (data->context,
 | 
					    theme_node = eek_theme_node_new (data->context,
 | 
				
			||||||
                                     data->parent,
 | 
					                                     data->parent,
 | 
				
			||||||
                                     priv->theme,
 | 
					                                     data->renderer->priv->theme,
 | 
				
			||||||
                                     EEK_TYPE_KEY,
 | 
					                                     EEK_TYPE_KEY,
 | 
				
			||||||
                                     eek_element_get_name (element),
 | 
					                                     eek_element_get_name (element),
 | 
				
			||||||
                                     "key",
 | 
					                                     "key",
 | 
				
			||||||
@ -1365,11 +1337,9 @@ create_theme_node_section_callback (EekElement *element,
 | 
				
			|||||||
    CreateThemeNodeData *data = user_data;
 | 
					    CreateThemeNodeData *data = user_data;
 | 
				
			||||||
    EekThemeNode *theme_node, *parent;
 | 
					    EekThemeNode *theme_node, *parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (data->renderer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    theme_node = eek_theme_node_new (data->context,
 | 
					    theme_node = eek_theme_node_new (data->context,
 | 
				
			||||||
                                     data->parent,
 | 
					                                     data->parent,
 | 
				
			||||||
                                     priv->theme,
 | 
					                                     data->renderer->priv->theme,
 | 
				
			||||||
                                     EEK_TYPE_SECTION,
 | 
					                                     EEK_TYPE_SECTION,
 | 
				
			||||||
                                     eek_element_get_name (element),
 | 
					                                     eek_element_get_name (element),
 | 
				
			||||||
                                     "section",
 | 
					                                     "section",
 | 
				
			||||||
@ -1398,25 +1368,22 @@ eek_renderer_set_theme (EekRenderer *renderer,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
					    g_return_if_fail (EEK_IS_RENDERER(renderer));
 | 
				
			||||||
    g_return_if_fail (EEK_IS_THEME(theme));
 | 
					    g_return_if_fail (EEK_IS_THEME(theme));
 | 
				
			||||||
 | 
					    g_return_if_fail (renderer->priv->keyboard);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
 | 
					    if (renderer->priv->theme)
 | 
				
			||||||
 | 
					        g_object_unref (renderer->priv->theme);
 | 
				
			||||||
    g_return_if_fail (priv->keyboard);
 | 
					    renderer->priv->theme = g_object_ref (theme);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->theme)
 | 
					 | 
				
			||||||
        g_object_unref (priv->theme);
 | 
					 | 
				
			||||||
    priv->theme = g_object_ref (theme);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    theme_context = eek_theme_context_new ();
 | 
					    theme_context = eek_theme_context_new ();
 | 
				
			||||||
    theme_node = eek_theme_node_new (theme_context,
 | 
					    theme_node = eek_theme_node_new (theme_context,
 | 
				
			||||||
                                     NULL,
 | 
					                                     NULL,
 | 
				
			||||||
                                     priv->theme,
 | 
					                                     renderer->priv->theme,
 | 
				
			||||||
                                     EEK_TYPE_KEYBOARD,
 | 
					                                     EEK_TYPE_KEYBOARD,
 | 
				
			||||||
                                     "keyboard",
 | 
					                                     "keyboard",
 | 
				
			||||||
                                     "keyboard",
 | 
					                                     "keyboard",
 | 
				
			||||||
                                     NULL,
 | 
					                                     NULL,
 | 
				
			||||||
                                     NULL);
 | 
					                                     NULL);
 | 
				
			||||||
    g_object_set_data_full (G_OBJECT(priv->keyboard),
 | 
					    g_object_set_data_full (G_OBJECT(renderer->priv->keyboard),
 | 
				
			||||||
                            "theme-node",
 | 
					                            "theme-node",
 | 
				
			||||||
                            theme_node,
 | 
					                            theme_node,
 | 
				
			||||||
                            (GDestroyNotify)g_object_unref);
 | 
					                            (GDestroyNotify)g_object_unref);
 | 
				
			||||||
@ -1424,7 +1391,7 @@ eek_renderer_set_theme (EekRenderer *renderer,
 | 
				
			|||||||
    data.context = theme_context;
 | 
					    data.context = theme_context;
 | 
				
			||||||
    data.parent = theme_node;
 | 
					    data.parent = theme_node;
 | 
				
			||||||
    data.renderer = renderer;
 | 
					    data.renderer = renderer;
 | 
				
			||||||
    eek_container_foreach_child (EEK_CONTAINER(priv->keyboard),
 | 
					    eek_container_foreach_child (EEK_CONTAINER(renderer->priv->keyboard),
 | 
				
			||||||
                                 create_theme_node_section_callback,
 | 
					                                 create_theme_node_section_callback,
 | 
				
			||||||
                                 &data);
 | 
					                                 &data);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,21 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_RENDERER (eek_renderer_get_type())
 | 
					#define EEK_TYPE_RENDERER (eek_renderer_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekRenderer, eek_renderer, EEK, RENDERER, GObject)
 | 
					#define EEK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_RENDERER, EekRenderer))
 | 
				
			||||||
 | 
					#define EEK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_RENDERER, EekRendererClass))
 | 
				
			||||||
 | 
					#define EEK_IS_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_RENDERER))
 | 
				
			||||||
 | 
					#define EEK_IS_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_RENDERER))
 | 
				
			||||||
 | 
					#define EEK_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_RENDERER, EekRendererClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekRenderer EekRenderer;
 | 
				
			||||||
 | 
					typedef struct _EekRendererClass EekRendererClass;
 | 
				
			||||||
 | 
					typedef struct _EekRendererPrivate EekRendererPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekRenderer {
 | 
				
			||||||
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekRendererPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekRendererClass
 | 
					struct _EekRendererClass
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -52,6 +52,11 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static guint signals[LAST_SIGNAL] = { 0, };
 | 
					static guint signals[LAST_SIGNAL] = { 0, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					G_DEFINE_TYPE (EekSection, eek_section, EEK_TYPE_CONTAINER);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_SECTION_GET_PRIVATE(obj)                           \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_SECTION, EekSectionPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekRow
 | 
					struct _EekRow
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    gint num_columns;
 | 
					    gint num_columns;
 | 
				
			||||||
@ -60,19 +65,17 @@ struct _EekRow
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
typedef struct _EekRow EekRow;
 | 
					typedef struct _EekRow EekRow;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekSectionPrivate
 | 
					struct _EekSectionPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    gint angle;
 | 
					    gint angle;
 | 
				
			||||||
    GSList *rows;
 | 
					    GSList *rows;
 | 
				
			||||||
    EekModifierType modifiers;
 | 
					    EekModifierType modifiers;
 | 
				
			||||||
} EekSectionPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekSection, eek_section, EEK_TYPE_CONTAINER)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static gint
 | 
					static gint
 | 
				
			||||||
eek_section_real_get_n_rows (EekSection *self)
 | 
					eek_section_real_get_n_rows (EekSection *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return g_slist_length (priv->rows);
 | 
					    return g_slist_length (priv->rows);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -82,7 +85,7 @@ eek_section_real_add_row (EekSection    *self,
 | 
				
			|||||||
                          gint           num_columns,
 | 
					                          gint           num_columns,
 | 
				
			||||||
                          EekOrientation orientation)
 | 
					                          EekOrientation orientation)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
 | 
				
			||||||
    EekRow *row;
 | 
					    EekRow *row;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    row = g_slice_new (EekRow);
 | 
					    row = g_slice_new (EekRow);
 | 
				
			||||||
@ -97,7 +100,7 @@ eek_section_real_get_row (EekSection     *self,
 | 
				
			|||||||
                          gint           *num_columns,
 | 
					                          gint           *num_columns,
 | 
				
			||||||
                          EekOrientation *orientation)
 | 
					                          EekOrientation *orientation)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
 | 
				
			||||||
    EekRow *row;
 | 
					    EekRow *row;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    row = g_slist_nth_data (priv->rows, index);
 | 
					    row = g_slist_nth_data (priv->rows, index);
 | 
				
			||||||
@ -126,7 +129,7 @@ static EekKey *
 | 
				
			|||||||
eek_section_real_create_key (EekSection *self,
 | 
					eek_section_real_create_key (EekSection *self,
 | 
				
			||||||
                             guint       keycode,
 | 
					                             guint       keycode,
 | 
				
			||||||
                             gint        column_index,
 | 
					                             gint        column_index,
 | 
				
			||||||
                             gint        row_index)
 | 
					                             guint        row_index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekKey *key;
 | 
					    EekKey *key;
 | 
				
			||||||
    gint num_rows;
 | 
					    gint num_rows;
 | 
				
			||||||
@ -135,9 +138,7 @@ eek_section_real_create_key (EekSection *self,
 | 
				
			|||||||
    num_rows = eek_section_get_n_rows (self);
 | 
					    num_rows = eek_section_get_n_rows (self);
 | 
				
			||||||
    g_return_val_if_fail (0 <= row_index && row_index < num_rows, NULL);
 | 
					    g_return_val_if_fail (0 <= row_index && row_index < num_rows, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    row = g_slist_nth_data (self->priv->rows, row_index);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    row = g_slist_nth_data (priv->rows, row_index);
 | 
					 | 
				
			||||||
    if (row->num_columns < column_index + 1)
 | 
					    if (row->num_columns < column_index + 1)
 | 
				
			||||||
        row->num_columns = column_index + 1;
 | 
					        row->num_columns = column_index + 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -157,7 +158,7 @@ eek_section_real_create_key (EekSection *self,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
set_level_from_modifiers (EekSection *self)
 | 
					set_level_from_modifiers (EekSection *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
 | 
				
			||||||
    EekKeyboard *keyboard;
 | 
					    EekKeyboard *keyboard;
 | 
				
			||||||
    EekModifierType num_lock_mask;
 | 
					    EekModifierType num_lock_mask;
 | 
				
			||||||
    gint level = -1;
 | 
					    gint level = -1;
 | 
				
			||||||
@ -172,7 +173,7 @@ set_level_from_modifiers (EekSection *self)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_section_real_key_pressed (EekSection *self, EekKey *key)
 | 
					eek_section_real_key_pressed (EekSection *self, EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
 | 
				
			||||||
    EekSymbol *symbol;
 | 
					    EekSymbol *symbol;
 | 
				
			||||||
    EekKeyboard *keyboard;
 | 
					    EekKeyboard *keyboard;
 | 
				
			||||||
    EekModifierBehavior behavior;
 | 
					    EekModifierBehavior behavior;
 | 
				
			||||||
@ -194,7 +195,7 @@ eek_section_real_key_pressed (EekSection *self, EekKey *key)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_section_real_key_released (EekSection *self, EekKey *key)
 | 
					eek_section_real_key_released (EekSection *self, EekKey *key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
 | 
				
			||||||
    EekSymbol *symbol;
 | 
					    EekSymbol *symbol;
 | 
				
			||||||
    EekKeyboard *keyboard;
 | 
					    EekKeyboard *keyboard;
 | 
				
			||||||
    EekModifierBehavior behavior;
 | 
					    EekModifierBehavior behavior;
 | 
				
			||||||
@ -224,8 +225,7 @@ eek_section_real_key_released (EekSection *self, EekKey *key)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_section_finalize (GObject *object)
 | 
					eek_section_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSection        *self = EEK_SECTION (object);
 | 
					    EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(object);
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (self);
 | 
					 | 
				
			||||||
    GSList *head;
 | 
					    GSList *head;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (head = priv->rows; head; head = g_slist_next (head))
 | 
					    for (head = priv->rows; head; head = g_slist_next (head))
 | 
				
			||||||
@ -291,6 +291,8 @@ eek_section_class_init (EekSectionClass *klass)
 | 
				
			|||||||
    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec        *pspec;
 | 
					    GParamSpec        *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekSectionPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    klass->get_n_rows = eek_section_real_get_n_rows;
 | 
					    klass->get_n_rows = eek_section_real_get_n_rows;
 | 
				
			||||||
    klass->add_row = eek_section_real_add_row;
 | 
					    klass->add_row = eek_section_real_add_row;
 | 
				
			||||||
    klass->get_row = eek_section_real_get_row;
 | 
					    klass->get_row = eek_section_real_get_row;
 | 
				
			||||||
@ -365,7 +367,7 @@ eek_section_class_init (EekSectionClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_section_init (EekSection *self)
 | 
					eek_section_init (EekSection *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_SECTION_GET_PRIVATE (self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -380,11 +382,8 @@ eek_section_set_angle (EekSection  *section,
 | 
				
			|||||||
                       gint         angle)
 | 
					                       gint         angle)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SECTION(section));
 | 
					    g_return_if_fail (EEK_IS_SECTION(section));
 | 
				
			||||||
 | 
					    if (section->priv->angle != angle) {
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (section);
 | 
					        section->priv->angle = angle;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->angle != angle) {
 | 
					 | 
				
			||||||
        priv->angle = angle;
 | 
					 | 
				
			||||||
        g_object_notify (G_OBJECT(section), "angle");
 | 
					        g_object_notify (G_OBJECT(section), "angle");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -399,10 +398,7 @@ gint
 | 
				
			|||||||
eek_section_get_angle (EekSection *section)
 | 
					eek_section_get_angle (EekSection *section)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SECTION(section), -1);
 | 
					    g_return_val_if_fail (EEK_IS_SECTION(section), -1);
 | 
				
			||||||
 | 
					    return section->priv->angle;
 | 
				
			||||||
    EekSectionPrivate *priv = eek_section_get_instance_private (section);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->angle;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -533,7 +529,7 @@ static void keycounter (EekElement *element, gpointer user_data) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const double keyspacing = 4.0;
 | 
					const double keyspacing = 3.0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void keyplacer(EekElement *element, gpointer user_data) {
 | 
					static void keyplacer(EekElement *element, gpointer user_data) {
 | 
				
			||||||
    double *current_offset = user_data;
 | 
					    double *current_offset = user_data;
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,28 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_SECTION (eek_section_get_type())
 | 
					#define EEK_TYPE_SECTION (eek_section_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE(EekSection, eek_section, EEK, SECTION, EekContainer)
 | 
					#define EEK_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_SECTION, EekSection))
 | 
				
			||||||
 | 
					#define EEK_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_SECTION, EekSectionClass))
 | 
				
			||||||
 | 
					#define EEK_IS_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_SECTION))
 | 
				
			||||||
 | 
					#define EEK_IS_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_SECTION))
 | 
				
			||||||
 | 
					#define EEK_SECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_SECTION, EekSectionClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekSectionClass EekSectionClass;
 | 
				
			||||||
 | 
					typedef struct _EekSectionPrivate EekSectionPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekSection:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekSection structure contains only private data and should
 | 
				
			||||||
 | 
					 * only be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekSection
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekContainer parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekSectionPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekSectionClass:
 | 
					 * EekSectionClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -44,31 +44,29 @@ enum {
 | 
				
			|||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekSymbolPrivate
 | 
					struct _EekSymbolPrivate {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    gchar *name;
 | 
					    gchar *name;
 | 
				
			||||||
    gchar *label;
 | 
					    gchar *label;
 | 
				
			||||||
    EekSymbolCategory category;
 | 
					    EekSymbolCategory category;
 | 
				
			||||||
    EekModifierType modifier_mask;
 | 
					    EekModifierType modifier_mask;
 | 
				
			||||||
    gchar *icon_name;
 | 
					    gchar *icon_name;
 | 
				
			||||||
    gchar *tooltip;
 | 
					    gchar *tooltip;
 | 
				
			||||||
} EekSymbolPrivate;
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
 | 
					static void eek_serializable_iface_init (EekSerializableIface *iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_DEFINE_TYPE_EXTENDED (EekSymbol,
 | 
					G_DEFINE_TYPE_WITH_CODE (EekSymbol, eek_symbol, G_TYPE_OBJECT,
 | 
				
			||||||
			eek_symbol,
 | 
					 | 
				
			||||||
			G_TYPE_OBJECT,
 | 
					 | 
				
			||||||
			0, /* GTypeFlags */
 | 
					 | 
				
			||||||
			G_ADD_PRIVATE (EekSymbol)
 | 
					 | 
				
			||||||
                         G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
 | 
					                         G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
 | 
				
			||||||
                                               eek_serializable_iface_init))
 | 
					                                                eek_serializable_iface_init));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_SYMBOL_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_SYMBOL, EekSymbolPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_symbol_real_serialize (EekSerializable *self,
 | 
					eek_symbol_real_serialize (EekSerializable *self,
 | 
				
			||||||
                           GVariantBuilder *builder)
 | 
					                           GVariantBuilder *builder)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (EEK_SYMBOL (self));
 | 
					    EekSymbolPrivate *priv = EEK_SYMBOL_GET_PRIVATE(self);
 | 
				
			||||||
#define NOTNULL(s) ((s) != NULL ? (s) : "")
 | 
					#define NOTNULL(s) ((s) != NULL ? (s) : "")
 | 
				
			||||||
    g_variant_builder_add (builder, "s", NOTNULL(priv->name));
 | 
					    g_variant_builder_add (builder, "s", NOTNULL(priv->name));
 | 
				
			||||||
    g_variant_builder_add (builder, "s", NOTNULL(priv->label));
 | 
					    g_variant_builder_add (builder, "s", NOTNULL(priv->label));
 | 
				
			||||||
@ -84,7 +82,7 @@ eek_symbol_real_deserialize (EekSerializable *self,
 | 
				
			|||||||
                             GVariant        *variant,
 | 
					                             GVariant        *variant,
 | 
				
			||||||
                             gsize            index)
 | 
					                             gsize            index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (EEK_SYMBOL (self));
 | 
					    EekSymbolPrivate *priv = EEK_SYMBOL_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_variant_get_child (variant, index++, "s", &priv->name);
 | 
					    g_variant_get_child (variant, index++, "s", &priv->name);
 | 
				
			||||||
    g_variant_get_child (variant, index++, "s", &priv->label);
 | 
					    g_variant_get_child (variant, index++, "s", &priv->label);
 | 
				
			||||||
@ -174,8 +172,7 @@ eek_symbol_get_property (GObject    *object,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_symbol_finalize (GObject *object)
 | 
					eek_symbol_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSymbol        *self = EEK_SYMBOL (object);
 | 
					    EekSymbolPrivate *priv = EEK_SYMBOL_GET_PRIVATE(object);
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_free (priv->name);
 | 
					    g_free (priv->name);
 | 
				
			||||||
    g_free (priv->label);
 | 
					    g_free (priv->label);
 | 
				
			||||||
@ -190,6 +187,8 @@ eek_symbol_class_init (EekSymbolClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekSymbolPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->set_property = eek_symbol_set_property;
 | 
					    gobject_class->set_property = eek_symbol_set_property;
 | 
				
			||||||
    gobject_class->get_property = eek_symbol_get_property;
 | 
					    gobject_class->get_property = eek_symbol_get_property;
 | 
				
			||||||
    gobject_class->finalize = eek_symbol_finalize;
 | 
					    gobject_class->finalize = eek_symbol_finalize;
 | 
				
			||||||
@ -242,8 +241,9 @@ eek_symbol_class_init (EekSymbolClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_symbol_init (EekSymbol *self)
 | 
					eek_symbol_init (EekSymbol *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (self);
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv = self->priv = EEK_SYMBOL_GET_PRIVATE(self);
 | 
				
			||||||
    priv->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
 | 
					    priv->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -270,10 +270,11 @@ void
 | 
				
			|||||||
eek_symbol_set_name (EekSymbol   *symbol,
 | 
					eek_symbol_set_name (EekSymbol   *symbol,
 | 
				
			||||||
                     const gchar *name)
 | 
					                     const gchar *name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
					    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_free (priv->name);
 | 
					    g_free (priv->name);
 | 
				
			||||||
    priv->name = g_strdup (name);
 | 
					    priv->name = g_strdup (name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -287,10 +288,11 @@ eek_symbol_set_name (EekSymbol   *symbol,
 | 
				
			|||||||
const gchar *
 | 
					const gchar *
 | 
				
			||||||
eek_symbol_get_name (EekSymbol *symbol)
 | 
					eek_symbol_get_name (EekSymbol *symbol)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->name == NULL || *priv->name == '\0')
 | 
					    if (priv->name == NULL || *priv->name == '\0')
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    return priv->name;
 | 
					    return priv->name;
 | 
				
			||||||
@ -307,10 +309,11 @@ void
 | 
				
			|||||||
eek_symbol_set_label (EekSymbol   *symbol,
 | 
					eek_symbol_set_label (EekSymbol   *symbol,
 | 
				
			||||||
                      const gchar *label)
 | 
					                      const gchar *label)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
					    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_free (priv->label);
 | 
					    g_free (priv->label);
 | 
				
			||||||
    priv->label = g_strdup (label);
 | 
					    priv->label = g_strdup (label);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -324,10 +327,11 @@ eek_symbol_set_label (EekSymbol   *symbol,
 | 
				
			|||||||
const gchar *
 | 
					const gchar *
 | 
				
			||||||
eek_symbol_get_label (EekSymbol *symbol)
 | 
					eek_symbol_get_label (EekSymbol *symbol)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->label == NULL || *priv->label == '\0')
 | 
					    if (priv->label == NULL || *priv->label == '\0')
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    return priv->label;
 | 
					    return priv->label;
 | 
				
			||||||
@ -344,10 +348,11 @@ void
 | 
				
			|||||||
eek_symbol_set_category (EekSymbol        *symbol,
 | 
					eek_symbol_set_category (EekSymbol        *symbol,
 | 
				
			||||||
                         EekSymbolCategory category)
 | 
					                         EekSymbolCategory category)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
					    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->category = category;
 | 
					    priv->category = category;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -360,10 +365,11 @@ eek_symbol_set_category (EekSymbol        *symbol,
 | 
				
			|||||||
EekSymbolCategory
 | 
					EekSymbolCategory
 | 
				
			||||||
eek_symbol_get_category (EekSymbol *symbol)
 | 
					eek_symbol_get_category (EekSymbol *symbol)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), EEK_SYMBOL_CATEGORY_UNKNOWN);
 | 
					    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), EEK_SYMBOL_CATEGORY_UNKNOWN);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->category;
 | 
					    return priv->category;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -378,10 +384,11 @@ void
 | 
				
			|||||||
eek_symbol_set_modifier_mask (EekSymbol      *symbol,
 | 
					eek_symbol_set_modifier_mask (EekSymbol      *symbol,
 | 
				
			||||||
                              EekModifierType mask)
 | 
					                              EekModifierType mask)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
					    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->modifier_mask = mask;
 | 
					    priv->modifier_mask = mask;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -394,10 +401,11 @@ eek_symbol_set_modifier_mask (EekSymbol      *symbol,
 | 
				
			|||||||
EekModifierType
 | 
					EekModifierType
 | 
				
			||||||
eek_symbol_get_modifier_mask (EekSymbol *symbol)
 | 
					eek_symbol_get_modifier_mask (EekSymbol *symbol)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), 0);
 | 
					    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->modifier_mask;
 | 
					    return priv->modifier_mask;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -425,10 +433,11 @@ void
 | 
				
			|||||||
eek_symbol_set_icon_name (EekSymbol   *symbol,
 | 
					eek_symbol_set_icon_name (EekSymbol   *symbol,
 | 
				
			||||||
                          const gchar *icon_name)
 | 
					                          const gchar *icon_name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
					    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_free (priv->icon_name);
 | 
					    g_free (priv->icon_name);
 | 
				
			||||||
    priv->icon_name = g_strdup (icon_name);
 | 
					    priv->icon_name = g_strdup (icon_name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -442,10 +451,11 @@ eek_symbol_set_icon_name (EekSymbol   *symbol,
 | 
				
			|||||||
const gchar *
 | 
					const gchar *
 | 
				
			||||||
eek_symbol_get_icon_name (EekSymbol *symbol)
 | 
					eek_symbol_get_icon_name (EekSymbol *symbol)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->icon_name == NULL || *priv->icon_name == '\0')
 | 
					    if (priv->icon_name == NULL || *priv->icon_name == '\0')
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    return priv->icon_name;
 | 
					    return priv->icon_name;
 | 
				
			||||||
@ -462,10 +472,11 @@ void
 | 
				
			|||||||
eek_symbol_set_tooltip (EekSymbol   *symbol,
 | 
					eek_symbol_set_tooltip (EekSymbol   *symbol,
 | 
				
			||||||
                        const gchar *tooltip)
 | 
					                        const gchar *tooltip)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
					    g_return_if_fail (EEK_IS_SYMBOL(symbol));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_free (priv->tooltip);
 | 
					    g_free (priv->tooltip);
 | 
				
			||||||
    priv->tooltip = g_strdup (tooltip);
 | 
					    priv->tooltip = g_strdup (tooltip);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -479,10 +490,11 @@ eek_symbol_set_tooltip (EekSymbol   *symbol,
 | 
				
			|||||||
const gchar *
 | 
					const gchar *
 | 
				
			||||||
eek_symbol_get_tooltip (EekSymbol *symbol)
 | 
					eek_symbol_get_tooltip (EekSymbol *symbol)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
					    g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekSymbolPrivate *priv = eek_symbol_get_instance_private (symbol);
 | 
					    priv = EEK_SYMBOL_GET_PRIVATE(symbol);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->tooltip == NULL || *priv->tooltip == '\0')
 | 
					    if (priv->tooltip == NULL || *priv->tooltip == '\0')
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    return priv->tooltip;
 | 
					    return priv->tooltip;
 | 
				
			||||||
 | 
				
			|||||||
@ -59,7 +59,27 @@ typedef enum {
 | 
				
			|||||||
} EekSymbolCategory;
 | 
					} EekSymbolCategory;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_SYMBOL (eek_symbol_get_type())
 | 
					#define EEK_TYPE_SYMBOL (eek_symbol_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE(EekSymbol, eek_symbol, EEK, SYMBOL, GObject)
 | 
					#define EEK_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_SYMBOL, EekSymbol))
 | 
				
			||||||
 | 
					#define EEK_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_SYMBOL, EekSymbolClass))
 | 
				
			||||||
 | 
					#define EEK_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_SYMBOL))
 | 
				
			||||||
 | 
					#define EEK_IS_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_SYMBOL))
 | 
				
			||||||
 | 
					#define EEK_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_SYMBOL, EekSymbolClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekSymbolClass EekSymbolClass;
 | 
				
			||||||
 | 
					typedef struct _EekSymbolPrivate EekSymbolPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekSymbol:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekSymbol structure contains only private data and should only
 | 
				
			||||||
 | 
					 * be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekSymbol {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekSymbolPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekSymbolClass:
 | 
					 * EekSymbolClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -36,20 +36,18 @@ enum {
 | 
				
			|||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekTextPrivate
 | 
					struct _EekTextPrivate {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    gchar *text;
 | 
					    gchar *text;
 | 
				
			||||||
} EekTextPrivate;
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
 | 
					static void eek_serializable_iface_init (EekSerializableIface *iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_DEFINE_TYPE_EXTENDED (EekText,
 | 
					G_DEFINE_TYPE_WITH_CODE (EekText, eek_text, EEK_TYPE_SYMBOL,
 | 
				
			||||||
			eek_text,
 | 
					 | 
				
			||||||
			EEK_TYPE_SYMBOL,
 | 
					 | 
				
			||||||
			0, /* GTypeFlags */
 | 
					 | 
				
			||||||
			G_ADD_PRIVATE (EekText)
 | 
					 | 
				
			||||||
                         G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
 | 
					                         G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
 | 
				
			||||||
                                               eek_serializable_iface_init))
 | 
					                                                eek_serializable_iface_init));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_TEXT_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_TEXT, EekTextPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static EekSerializableIface *eek_text_parent_serializable_iface;
 | 
					static EekSerializableIface *eek_text_parent_serializable_iface;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -57,7 +55,7 @@ static void
 | 
				
			|||||||
eek_text_real_serialize (EekSerializable *self,
 | 
					eek_text_real_serialize (EekSerializable *self,
 | 
				
			||||||
                         GVariantBuilder *builder)
 | 
					                         GVariantBuilder *builder)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekTextPrivate *priv = eek_text_get_instance_private (EEK_TEXT (self));
 | 
					    EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eek_text_parent_serializable_iface->serialize (self, builder);
 | 
					    eek_text_parent_serializable_iface->serialize (self, builder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -69,7 +67,7 @@ eek_text_real_deserialize (EekSerializable *self,
 | 
				
			|||||||
                           GVariant        *variant,
 | 
					                           GVariant        *variant,
 | 
				
			||||||
                           gsize            index)
 | 
					                           gsize            index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekTextPrivate *priv = eek_text_get_instance_private (EEK_TEXT (self));
 | 
					    EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    index = eek_text_parent_serializable_iface->deserialize (self,
 | 
					    index = eek_text_parent_serializable_iface->deserialize (self,
 | 
				
			||||||
                                                             variant,
 | 
					                                                             variant,
 | 
				
			||||||
@ -95,9 +93,7 @@ eek_text_set_property (GObject      *object,
 | 
				
			|||||||
                       const GValue *value,
 | 
					                       const GValue *value,
 | 
				
			||||||
                       GParamSpec   *pspec)
 | 
					                       GParamSpec   *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekText        *self = EEK_TEXT (object);
 | 
					    EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(object);
 | 
				
			||||||
    EekTextPrivate *priv = eek_text_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_TEXT:
 | 
					    case PROP_TEXT:
 | 
				
			||||||
        g_free (priv->text);
 | 
					        g_free (priv->text);
 | 
				
			||||||
@ -115,9 +111,7 @@ eek_text_get_property (GObject    *object,
 | 
				
			|||||||
                         GValue     *value,
 | 
					                         GValue     *value,
 | 
				
			||||||
                         GParamSpec *pspec)
 | 
					                         GParamSpec *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekText        *self = EEK_TEXT (object);
 | 
					    EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(object);
 | 
				
			||||||
    EekTextPrivate *priv = eek_text_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_TEXT:
 | 
					    case PROP_TEXT:
 | 
				
			||||||
        g_value_set_string (value, priv->text);
 | 
					        g_value_set_string (value, priv->text);
 | 
				
			||||||
@ -131,8 +125,7 @@ eek_text_get_property (GObject    *object,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_text_finalize (GObject *object)
 | 
					eek_text_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekText        *self = EEK_TEXT (object);
 | 
					    EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(object);
 | 
				
			||||||
    EekTextPrivate *priv = eek_text_get_instance_private (self);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_free (priv->text);
 | 
					    g_free (priv->text);
 | 
				
			||||||
    G_OBJECT_CLASS (eek_text_parent_class)->finalize (object);
 | 
					    G_OBJECT_CLASS (eek_text_parent_class)->finalize (object);
 | 
				
			||||||
@ -144,6 +137,8 @@ eek_text_class_init (EekTextClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekTextPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->set_property = eek_text_set_property;
 | 
					    gobject_class->set_property = eek_text_set_property;
 | 
				
			||||||
    gobject_class->get_property = eek_text_get_property;
 | 
					    gobject_class->get_property = eek_text_get_property;
 | 
				
			||||||
    gobject_class->finalize = eek_text_finalize;
 | 
					    gobject_class->finalize = eek_text_finalize;
 | 
				
			||||||
@ -159,7 +154,7 @@ eek_text_class_init (EekTextClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_text_init (EekText *self)
 | 
					eek_text_init (EekText *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_TEXT_GET_PRIVATE(self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EekText *
 | 
					EekText *
 | 
				
			||||||
@ -181,7 +176,7 @@ eek_text_new (const gchar *text)
 | 
				
			|||||||
const gchar *
 | 
					const gchar *
 | 
				
			||||||
eek_text_get_text (EekText *text)
 | 
					eek_text_get_text (EekText *text)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekTextPrivate *priv = eek_text_get_instance_private (text);
 | 
					    EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(text);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return priv->text;
 | 
					    return priv->text;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,27 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_TEXT (eek_text_get_type())
 | 
					#define EEK_TYPE_TEXT (eek_text_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE(EekText, eek_text, EEK, TEXT, EekSymbol)
 | 
					#define EEK_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_TEXT, EekText))
 | 
				
			||||||
 | 
					#define EEK_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_TEXT, EekTextClass))
 | 
				
			||||||
 | 
					#define EEK_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_TEXT))
 | 
				
			||||||
 | 
					#define EEK_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_TEXT))
 | 
				
			||||||
 | 
					#define EEK_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_TEXT, EekTextClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekTextClass EekTextClass;
 | 
				
			||||||
 | 
					typedef struct _EekTextPrivate EekTextPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekText:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekText structure contains only private data and should only
 | 
				
			||||||
 | 
					 * be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekText {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekSymbol parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekTextPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekTextClass {
 | 
					struct _EekTextClass {
 | 
				
			||||||
    /*< private >*/
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
				
			|||||||
@ -89,11 +89,9 @@ static void eek_theme_node_finalize           (GObject                 *object);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static const EekColor BLACK_COLOR = { 0, 0, 0, 0xff };
 | 
					static const EekColor BLACK_COLOR = { 0, 0, 0, 0xff };
 | 
				
			||||||
static const EekColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
 | 
					static const EekColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
 | 
				
			||||||
#if 0  // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-const-variable =====
 | 
					 | 
				
			||||||
static const EekColor DEFAULT_SUCCESS_COLOR = { 0x4e, 0x9a, 0x06, 0xff };
 | 
					static const EekColor DEFAULT_SUCCESS_COLOR = { 0x4e, 0x9a, 0x06, 0xff };
 | 
				
			||||||
static const EekColor DEFAULT_WARNING_COLOR = { 0xf5, 0x79, 0x3e, 0xff };
 | 
					static const EekColor DEFAULT_WARNING_COLOR = { 0xf5, 0x79, 0x3e, 0xff };
 | 
				
			||||||
static const EekColor DEFAULT_ERROR_COLOR = { 0xcc, 0x00, 0x00, 0xff };
 | 
					static const EekColor DEFAULT_ERROR_COLOR = { 0xcc, 0x00, 0x00, 0xff };
 | 
				
			||||||
#endif // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-const-variable =====
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eek_theme_node_init (EekThemeNode *self)
 | 
					eek_theme_node_init (EekThemeNode *self)
 | 
				
			||||||
 | 
				
			|||||||
@ -52,13 +52,20 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void initable_iface_init (GInitableIface *initable_iface);
 | 
					static void initable_iface_init (GInitableIface *initable_iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					G_DEFINE_TYPE_WITH_CODE (EekXkbLayout, eek_xkb_layout, EEK_TYPE_LAYOUT,
 | 
				
			||||||
 | 
					                         G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
 | 
				
			||||||
 | 
					                                                initable_iface_init));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_XKB_LAYOUT_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_XKB_LAYOUT, EekXkbLayoutPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
    PROP_0,
 | 
					    PROP_0,
 | 
				
			||||||
    PROP_DISPLAY,
 | 
					    PROP_DISPLAY,
 | 
				
			||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekXkbLayoutPrivate
 | 
					struct _EekXkbLayoutPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* Configuration names that should synch'ed to the symbolic names
 | 
					    /* Configuration names that should synch'ed to the symbolic names
 | 
				
			||||||
       in priv->xkb->names.  Since we use GLib's memory allocator,
 | 
					       in priv->xkb->names.  Since we use GLib's memory allocator,
 | 
				
			||||||
@ -75,13 +82,7 @@ typedef struct _EekXkbLayoutPrivate
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    gint scale_numerator;
 | 
					    gint scale_numerator;
 | 
				
			||||||
    gint scale_denominator;
 | 
					    gint scale_denominator;
 | 
				
			||||||
} EekXkbLayoutPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_EXTENDED (EekXkbLayout, eek_xkb_layout, EEK_TYPE_LAYOUT,
 | 
					 | 
				
			||||||
			0, /* GTypeFlags */
 | 
					 | 
				
			||||||
			G_ADD_PRIVATE(EekXkbLayout)
 | 
					 | 
				
			||||||
                        G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
 | 
					 | 
				
			||||||
                                               initable_iface_init))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static guint    find_keycode             (EekXkbLayout *layout,
 | 
					static guint    find_keycode             (EekXkbLayout *layout,
 | 
				
			||||||
                                          gchar        *key_name);
 | 
					                                          gchar        *key_name);
 | 
				
			||||||
@ -100,7 +101,7 @@ G_INLINE_FUNC gint
 | 
				
			|||||||
xkb_to_pixmap_coord (EekXkbLayout *layout,
 | 
					xkb_to_pixmap_coord (EekXkbLayout *layout,
 | 
				
			||||||
                     gint          n)
 | 
					                     gint          n)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
    return n * priv->scale_numerator / priv->scale_denominator;
 | 
					    return n * priv->scale_numerator / priv->scale_denominator;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -108,7 +109,7 @@ G_INLINE_FUNC gdouble
 | 
				
			|||||||
xkb_to_pixmap_double (EekXkbLayout *layout,
 | 
					xkb_to_pixmap_double (EekXkbLayout *layout,
 | 
				
			||||||
                     gdouble       d)
 | 
					                     gdouble       d)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
    return d * priv->scale_numerator / priv->scale_denominator;
 | 
					    return d * priv->scale_numerator / priv->scale_denominator;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -126,7 +127,7 @@ create_key (EekXkbLayout *layout,
 | 
				
			|||||||
    XkbBoundsRec *xkbbounds;
 | 
					    XkbBoundsRec *xkbbounds;
 | 
				
			||||||
    XkbShapeRec *xkbshape;
 | 
					    XkbShapeRec *xkbshape;
 | 
				
			||||||
    XkbOutlineRec *xkboutline;
 | 
					    XkbOutlineRec *xkboutline;
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
    EekKey *key;
 | 
					    EekKey *key;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    EekSymbolMatrix *matrix = NULL;
 | 
					    EekSymbolMatrix *matrix = NULL;
 | 
				
			||||||
@ -236,7 +237,7 @@ create_section (EekXkbLayout  *layout,
 | 
				
			|||||||
                XkbSectionRec *xkbsection)
 | 
					                XkbSectionRec *xkbsection)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    XkbGeometryRec *xkbgeometry;
 | 
					    XkbGeometryRec *xkbgeometry;
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv;
 | 
				
			||||||
    EekSection *section;
 | 
					    EekSection *section;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    gchar *name;
 | 
					    gchar *name;
 | 
				
			||||||
@ -248,6 +249,7 @@ create_section (EekXkbLayout  *layout,
 | 
				
			|||||||
    bounds.width = xkb_to_pixmap_coord(layout, xkbsection->width);
 | 
					    bounds.width = xkb_to_pixmap_coord(layout, xkbsection->width);
 | 
				
			||||||
    bounds.height = xkb_to_pixmap_coord(layout, xkbsection->height);
 | 
					    bounds.height = xkb_to_pixmap_coord(layout, xkbsection->height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv = layout->priv;
 | 
				
			||||||
    xkbgeometry = priv->xkb->geom;
 | 
					    xkbgeometry = priv->xkb->geom;
 | 
				
			||||||
    section = eek_keyboard_create_section (keyboard);
 | 
					    section = eek_keyboard_create_section (keyboard);
 | 
				
			||||||
    name = XGetAtomName (priv->display, xkbsection->name);
 | 
					    name = XGetAtomName (priv->display, xkbsection->name);
 | 
				
			||||||
@ -291,7 +293,7 @@ create_section (EekXkbLayout  *layout,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
create_keyboard (EekXkbLayout *layout, EekKeyboard *keyboard)
 | 
					create_keyboard (EekXkbLayout *layout, EekKeyboard *keyboard)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
    XkbGeometryRec *xkbgeometry;
 | 
					    XkbGeometryRec *xkbgeometry;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
    gint i;
 | 
					    gint i;
 | 
				
			||||||
@ -335,8 +337,7 @@ eek_xkb_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
    eek_element_set_bounds (EEK_ELEMENT(keyboard), &bounds);
 | 
					    eek_element_set_bounds (EEK_ELEMENT(keyboard), &bounds);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* resolve modifiers dynamically assigned at run time */
 | 
					    /* resolve modifiers dynamically assigned at run time */
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (
 | 
					    EekXkbLayoutPrivate *priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
 | 
				
			||||||
		    EEK_XKB_LAYOUT(self));
 | 
					 | 
				
			||||||
    eek_keyboard_set_num_lock_mask (keyboard,
 | 
					    eek_keyboard_set_num_lock_mask (keyboard,
 | 
				
			||||||
                                    XkbKeysymToModifiers (priv->display,
 | 
					                                    XkbKeysymToModifiers (priv->display,
 | 
				
			||||||
                                                          XK_Num_Lock));
 | 
					                                                          XK_Num_Lock));
 | 
				
			||||||
@ -357,8 +358,7 @@ eek_xkb_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_xkb_layout_finalize (GObject *object)
 | 
					eek_xkb_layout_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (
 | 
					    EekXkbLayoutPrivate *priv = EEK_XKB_LAYOUT_GET_PRIVATE (object);
 | 
				
			||||||
		    EEK_XKB_LAYOUT (object));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_free (priv->names.keycodes);
 | 
					    g_free (priv->names.keycodes);
 | 
				
			||||||
    g_free (priv->names.geometry);
 | 
					    g_free (priv->names.geometry);
 | 
				
			||||||
@ -374,11 +374,10 @@ eek_xkb_layout_set_property (GObject      *object,
 | 
				
			|||||||
                             GParamSpec   *pspec)
 | 
					                             GParamSpec   *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayout *layout = EEK_XKB_LAYOUT (object);
 | 
					    EekXkbLayout *layout = EEK_XKB_LAYOUT (object);
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_DISPLAY:
 | 
					    case PROP_DISPLAY:
 | 
				
			||||||
        priv->display = g_value_get_pointer (value);
 | 
					        layout->priv->display = g_value_get_pointer (value);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -393,11 +392,10 @@ eek_xkb_layout_get_property (GObject    *object,
 | 
				
			|||||||
                             GParamSpec *pspec)
 | 
					                             GParamSpec *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayout *layout = EEK_XKB_LAYOUT (object);
 | 
					    EekXkbLayout *layout = EEK_XKB_LAYOUT (object);
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_DISPLAY:
 | 
					    case PROP_DISPLAY:
 | 
				
			||||||
        g_value_set_pointer (value, priv->display);
 | 
					        g_value_set_pointer (value, layout->priv->display);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -412,6 +410,8 @@ eek_xkb_layout_class_init (EekXkbLayoutClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekXkbLayoutPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    layout_class->create_keyboard = eek_xkb_layout_real_create_keyboard;
 | 
					    layout_class->create_keyboard = eek_xkb_layout_real_create_keyboard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->finalize = eek_xkb_layout_finalize;
 | 
					    gobject_class->finalize = eek_xkb_layout_finalize;
 | 
				
			||||||
@ -429,14 +429,14 @@ eek_xkb_layout_class_init (EekXkbLayoutClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_xkb_layout_init (EekXkbLayout *self)
 | 
					eek_xkb_layout_init (EekXkbLayout *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static gboolean
 | 
					static gboolean
 | 
				
			||||||
get_names_from_server (EekXkbLayout *layout,
 | 
					get_names_from_server (EekXkbLayout *layout,
 | 
				
			||||||
                       GError      **error)
 | 
					                       GError      **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
    gchar *name;
 | 
					    gchar *name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XkbGetNames (priv->display, XkbAllNamesMask, priv->xkb);
 | 
					    XkbGetNames (priv->display, XkbAllNamesMask, priv->xkb);
 | 
				
			||||||
@ -516,21 +516,19 @@ eek_xkb_layout_set_names (EekXkbLayout         *layout,
 | 
				
			|||||||
                          XkbComponentNamesRec *names,
 | 
					                          XkbComponentNamesRec *names,
 | 
				
			||||||
                          GError              **error)
 | 
					                          GError              **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    if (g_strcmp0 (names->keycodes, layout->priv->names.keycodes)) {
 | 
				
			||||||
 | 
					        g_free (layout->priv->names.keycodes);
 | 
				
			||||||
    if (g_strcmp0 (names->keycodes, priv->names.keycodes)) {
 | 
					        layout->priv->names.keycodes = g_strdup (names->keycodes);
 | 
				
			||||||
        g_free (priv->names.keycodes);
 | 
					 | 
				
			||||||
        priv->names.keycodes = g_strdup (names->keycodes);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (g_strcmp0 (names->geometry, priv->names.geometry)) {
 | 
					    if (g_strcmp0 (names->geometry, layout->priv->names.geometry)) {
 | 
				
			||||||
        g_free (priv->names.geometry);
 | 
					        g_free (layout->priv->names.geometry);
 | 
				
			||||||
        priv->names.geometry = g_strdup (names->geometry);
 | 
					        layout->priv->names.geometry = g_strdup (names->geometry);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (g_strcmp0 (names->symbols, priv->names.symbols)) {
 | 
					    if (g_strcmp0 (names->symbols, layout->priv->names.symbols)) {
 | 
				
			||||||
        g_free (priv->names.symbols);
 | 
					        g_free (layout->priv->names.symbols);
 | 
				
			||||||
        priv->names.symbols = g_strdup (names->symbols);
 | 
					        layout->priv->names.symbols = g_strdup (names->symbols);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return get_keyboard_from_server (layout, error);
 | 
					    return get_keyboard_from_server (layout, error);
 | 
				
			||||||
@ -540,7 +538,7 @@ static gboolean
 | 
				
			|||||||
get_keyboard_from_server (EekXkbLayout *layout,
 | 
					get_keyboard_from_server (EekXkbLayout *layout,
 | 
				
			||||||
                          GError      **error)
 | 
					                          GError      **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->xkb) {
 | 
					    if (priv->xkb) {
 | 
				
			||||||
        XkbFreeKeyboard (priv->xkb, 0, True);
 | 
					        XkbFreeKeyboard (priv->xkb, 0, True);
 | 
				
			||||||
@ -591,7 +589,7 @@ find_keycode (EekXkbLayout *layout, gchar *key_name)
 | 
				
			|||||||
    XkbKeyAliasPtr palias;
 | 
					    XkbKeyAliasPtr palias;
 | 
				
			||||||
    guint is_name_matched;
 | 
					    guint is_name_matched;
 | 
				
			||||||
    gchar *src, *dst;
 | 
					    gchar *src, *dst;
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!priv->xkb)
 | 
					    if (!priv->xkb)
 | 
				
			||||||
        return EEK_INVALID_KEYCODE;
 | 
					        return EEK_INVALID_KEYCODE;
 | 
				
			||||||
@ -644,7 +642,7 @@ setup_scaling (EekXkbLayout *layout,
 | 
				
			|||||||
               gdouble       width,
 | 
					               gdouble       width,
 | 
				
			||||||
               gdouble       height)
 | 
					               gdouble       height)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXkbLayoutPrivate *priv = eek_xkb_layout_get_instance_private (layout);
 | 
					    EekXkbLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_if_fail (priv->xkb);
 | 
					    g_return_if_fail (priv->xkb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,23 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_XKB_LAYOUT (eek_xkb_layout_get_type())
 | 
					#define EEK_TYPE_XKB_LAYOUT (eek_xkb_layout_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekXkbLayout, eek_xkb_layout, EEK, XKB_LAYOUT, EekLayout)
 | 
					#define EEK_XKB_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_XKB_LAYOUT, EekXkbLayout))
 | 
				
			||||||
 | 
					#define EEK_XKB_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_XKB_LAYOUT, EekXkbLayoutClass))
 | 
				
			||||||
 | 
					#define EEK_IS_XKB_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_XKB_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_IS_XKB_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_XKB_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_XKB_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_XKB_LAYOUT, EekXkbLayoutClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekXkbLayout        EekXkbLayout;
 | 
				
			||||||
 | 
					typedef struct _EekXkbLayoutClass   EekXkbLayoutClass;
 | 
				
			||||||
 | 
					typedef struct _EekXkbLayoutPrivate EekXkbLayoutPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekXkbLayout
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekLayout parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekXkbLayoutPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekXkbLayoutClass
 | 
					struct _EekXkbLayoutClass
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -42,6 +42,13 @@ static GInitableIface *parent_initable_iface;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void initable_iface_init (GInitableIface *initable_iface);
 | 
					static void initable_iface_init (GInitableIface *initable_iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					G_DEFINE_TYPE_WITH_CODE (EekXklLayout, eek_xkl_layout, EEK_TYPE_XKB_LAYOUT,
 | 
				
			||||||
 | 
					                         G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
 | 
				
			||||||
 | 
					                                                initable_iface_init));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_XKL_LAYOUT_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_XKL_LAYOUT, EekXklLayoutPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
    PROP_0,
 | 
					    PROP_0,
 | 
				
			||||||
    PROP_MODEL,
 | 
					    PROP_MODEL,
 | 
				
			||||||
@ -51,17 +58,11 @@ enum {
 | 
				
			|||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekXklLayoutPrivate
 | 
					struct _EekXklLayoutPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    XklEngine *engine;
 | 
					    XklEngine *engine;
 | 
				
			||||||
    XklConfigRec *config;
 | 
					    XklConfigRec *config;
 | 
				
			||||||
} EekXklLayoutPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_EXTENDED (EekXklLayout, eek_xkl_layout, EEK_TYPE_XKB_LAYOUT,
 | 
					 | 
				
			||||||
			0, /* GTypeFlags */
 | 
					 | 
				
			||||||
			G_ADD_PRIVATE (EekXklLayout)
 | 
					 | 
				
			||||||
                        G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
 | 
					 | 
				
			||||||
                                               initable_iface_init))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* from gnome-keyboard-properties-xkbpv.c:
 | 
					/* from gnome-keyboard-properties-xkbpv.c:
 | 
				
			||||||
 *  BAD STYLE: Taken from xklavier_private_xkb.h
 | 
					 *  BAD STYLE: Taken from xklavier_private_xkb.h
 | 
				
			||||||
@ -82,8 +83,7 @@ static gboolean set_xkb_component_names (EekXklLayout *layout,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_xkl_layout_dispose (GObject *object)
 | 
					eek_xkl_layout_dispose (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (object);
 | 
				
			||||||
		    EEK_XKL_LAYOUT (object));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->config) {
 | 
					    if (priv->config) {
 | 
				
			||||||
        g_object_unref (priv->config);
 | 
					        g_object_unref (priv->config);
 | 
				
			||||||
@ -157,6 +157,8 @@ eek_xkl_layout_class_init (EekXklLayoutClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekXklLayoutPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->dispose = eek_xkl_layout_dispose;
 | 
					    gobject_class->dispose = eek_xkl_layout_dispose;
 | 
				
			||||||
    gobject_class->set_property = eek_xkl_layout_set_property;
 | 
					    gobject_class->set_property = eek_xkl_layout_set_property;
 | 
				
			||||||
    gobject_class->get_property = eek_xkl_layout_get_property;
 | 
					    gobject_class->get_property = eek_xkl_layout_get_property;
 | 
				
			||||||
@ -213,7 +215,7 @@ eek_xkl_layout_class_init (EekXklLayoutClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_xkl_layout_init (EekXklLayout *self)
 | 
					eek_xkl_layout_init (EekXklLayout *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_XKL_LAYOUT_GET_PRIVATE (self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -264,7 +266,7 @@ gboolean
 | 
				
			|||||||
eek_xkl_layout_set_config (EekXklLayout *layout,
 | 
					eek_xkl_layout_set_config (EekXklLayout *layout,
 | 
				
			||||||
                           XklConfigRec *config)
 | 
					                           XklConfigRec *config)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
    XklConfigRec *c;
 | 
					    XklConfigRec *c;
 | 
				
			||||||
    gboolean retval;
 | 
					    gboolean retval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -327,7 +329,7 @@ gboolean
 | 
				
			|||||||
eek_xkl_layout_set_model (EekXklLayout *layout,
 | 
					eek_xkl_layout_set_model (EekXklLayout *layout,
 | 
				
			||||||
                          const gchar  *model)
 | 
					                          const gchar  *model)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
    XklConfigRec *config;
 | 
					    XklConfigRec *config;
 | 
				
			||||||
    gboolean retval;
 | 
					    gboolean retval;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@ -355,7 +357,7 @@ gboolean
 | 
				
			|||||||
eek_xkl_layout_set_layouts (EekXklLayout *layout,
 | 
					eek_xkl_layout_set_layouts (EekXklLayout *layout,
 | 
				
			||||||
                            gchar       **layouts)
 | 
					                            gchar       **layouts)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
    XklConfigRec *config;
 | 
					    XklConfigRec *config;
 | 
				
			||||||
    gboolean retval;
 | 
					    gboolean retval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -383,7 +385,7 @@ gboolean
 | 
				
			|||||||
eek_xkl_layout_set_variants (EekXklLayout *layout,
 | 
					eek_xkl_layout_set_variants (EekXklLayout *layout,
 | 
				
			||||||
                             gchar       **variants)
 | 
					                             gchar       **variants)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
    XklConfigRec *config;
 | 
					    XklConfigRec *config;
 | 
				
			||||||
    gboolean retval;
 | 
					    gboolean retval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -411,7 +413,7 @@ gboolean
 | 
				
			|||||||
eek_xkl_layout_set_options (EekXklLayout *layout,
 | 
					eek_xkl_layout_set_options (EekXklLayout *layout,
 | 
				
			||||||
                            gchar       **options)
 | 
					                            gchar       **options)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
    XklConfigRec *config;
 | 
					    XklConfigRec *config;
 | 
				
			||||||
    gboolean retval;
 | 
					    gboolean retval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -495,7 +497,7 @@ eek_xkl_layout_disable_option (EekXklLayout *layout,
 | 
				
			|||||||
gchar *
 | 
					gchar *
 | 
				
			||||||
eek_xkl_layout_get_model (EekXklLayout *layout)
 | 
					eek_xkl_layout_get_model (EekXklLayout *layout)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (priv, NULL);
 | 
					    g_return_val_if_fail (priv, NULL);
 | 
				
			||||||
    return g_strdup (priv->config->model);
 | 
					    return g_strdup (priv->config->model);
 | 
				
			||||||
@ -511,7 +513,7 @@ eek_xkl_layout_get_model (EekXklLayout *layout)
 | 
				
			|||||||
gchar **
 | 
					gchar **
 | 
				
			||||||
eek_xkl_layout_get_layouts (EekXklLayout *layout)
 | 
					eek_xkl_layout_get_layouts (EekXklLayout *layout)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (priv, NULL);
 | 
					    g_return_val_if_fail (priv, NULL);
 | 
				
			||||||
    return g_strdupv (priv->config->layouts);
 | 
					    return g_strdupv (priv->config->layouts);
 | 
				
			||||||
@ -527,7 +529,7 @@ eek_xkl_layout_get_layouts (EekXklLayout *layout)
 | 
				
			|||||||
gchar **
 | 
					gchar **
 | 
				
			||||||
eek_xkl_layout_get_variants (EekXklLayout *layout)
 | 
					eek_xkl_layout_get_variants (EekXklLayout *layout)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (priv, NULL);
 | 
					    g_return_val_if_fail (priv, NULL);
 | 
				
			||||||
    return g_strdupv (priv->config->variants);
 | 
					    return g_strdupv (priv->config->variants);
 | 
				
			||||||
@ -543,7 +545,7 @@ eek_xkl_layout_get_variants (EekXklLayout *layout)
 | 
				
			|||||||
gchar **
 | 
					gchar **
 | 
				
			||||||
eek_xkl_layout_get_options (EekXklLayout *layout)
 | 
					eek_xkl_layout_get_options (EekXklLayout *layout)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = EEK_XKL_LAYOUT_GET_PRIVATE (layout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_return_val_if_fail (priv, NULL);
 | 
					    g_return_val_if_fail (priv, NULL);
 | 
				
			||||||
    return g_strdupv (priv->config->options);
 | 
					    return g_strdupv (priv->config->options);
 | 
				
			||||||
@ -552,7 +554,7 @@ eek_xkl_layout_get_options (EekXklLayout *layout)
 | 
				
			|||||||
static gboolean
 | 
					static gboolean
 | 
				
			||||||
set_xkb_component_names (EekXklLayout *layout, XklConfigRec *config)
 | 
					set_xkb_component_names (EekXklLayout *layout, XklConfigRec *config)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					    EekXklLayoutPrivate *priv = layout->priv;
 | 
				
			||||||
    XkbComponentNamesRec names;
 | 
					    XkbComponentNamesRec names;
 | 
				
			||||||
    gboolean retval = FALSE;
 | 
					    gboolean retval = FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -626,22 +628,21 @@ initable_init (GInitable    *initable,
 | 
				
			|||||||
               GError      **error)
 | 
					               GError      **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXklLayout *layout = EEK_XKL_LAYOUT (initable);
 | 
					    EekXklLayout *layout = EEK_XKL_LAYOUT (initable);
 | 
				
			||||||
    EekXklLayoutPrivate *priv = eek_xkl_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
    Display *display;
 | 
					    Display *display;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!parent_initable_iface->init (initable, cancellable, error))
 | 
					    if (!parent_initable_iface->init (initable, cancellable, error))
 | 
				
			||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->config = xkl_config_rec_new ();
 | 
					    layout->priv->config = xkl_config_rec_new ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_object_get (G_OBJECT (initable),
 | 
					    g_object_get (G_OBJECT (initable),
 | 
				
			||||||
                  "display", &display,
 | 
					                  "display", &display,
 | 
				
			||||||
                  NULL);
 | 
					                  NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->engine = xkl_engine_get_instance (display);
 | 
					    layout->priv->engine = xkl_engine_get_instance (display);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!xkl_config_rec_get_from_server (priv->config,
 | 
					    if (!xkl_config_rec_get_from_server (layout->priv->config,
 | 
				
			||||||
                                         priv->engine)) {
 | 
					                                         layout->priv->engine)) {
 | 
				
			||||||
        g_set_error (error,
 | 
					        g_set_error (error,
 | 
				
			||||||
                     EEK_ERROR,
 | 
					                     EEK_ERROR,
 | 
				
			||||||
                     EEK_ERROR_LAYOUT_ERROR,
 | 
					                     EEK_ERROR_LAYOUT_ERROR,
 | 
				
			||||||
@ -649,7 +650,7 @@ initable_init (GInitable    *initable,
 | 
				
			|||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    set_xkb_component_names (layout, priv->config);
 | 
					    set_xkb_component_names (layout, layout->priv->config);
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,23 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_XKL_LAYOUT (eek_xkl_layout_get_type())
 | 
					#define EEK_TYPE_XKL_LAYOUT (eek_xkl_layout_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekXklLayout, eek_xkl_layout, EEK, XKL_LAYOUT, EekLayout)
 | 
					#define EEK_XKL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_XKL_LAYOUT, EekXklLayout))
 | 
				
			||||||
 | 
					#define EEK_XKL_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_XKL_LAYOUT, EekXklLayoutClass))
 | 
				
			||||||
 | 
					#define EEK_IS_XKL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_XKL_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_IS_XKL_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_XKL_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_XKL_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_XKL_LAYOUT, EekXklLayoutClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekXklLayout        EekXklLayout;
 | 
				
			||||||
 | 
					typedef struct _EekXklLayoutClass   EekXklLayoutClass;
 | 
				
			||||||
 | 
					typedef struct _EekXklLayoutPrivate EekXklLayoutPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekXklLayout
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekXkbLayout parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekXklLayoutPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekXklLayoutClass
 | 
					struct _EekXklLayoutClass
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -43,18 +43,19 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void initable_iface_init (GInitableIface *initable_iface);
 | 
					static void initable_iface_init (GInitableIface *initable_iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekXmlLayoutPrivate
 | 
					G_DEFINE_TYPE_WITH_CODE (EekXmlLayout, eek_xml_layout, EEK_TYPE_LAYOUT,
 | 
				
			||||||
 | 
					                         G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
 | 
				
			||||||
 | 
					                                                initable_iface_init));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEK_XML_LAYOUT_GET_PRIVATE(obj)                                  \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_XML_LAYOUT, EekXmlLayoutPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekXmlLayoutPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    gchar *id;
 | 
					    gchar *id;
 | 
				
			||||||
    gchar *keyboards_dir;
 | 
					    gchar *keyboards_dir;
 | 
				
			||||||
    EekXmlKeyboardDesc *desc;
 | 
					    EekXmlKeyboardDesc *desc;
 | 
				
			||||||
} EekXmlLayoutPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_EXTENDED (EekXmlLayout, eek_xml_layout, EEK_TYPE_LAYOUT,
 | 
					 | 
				
			||||||
			0, /* GTypeFlags */
 | 
					 | 
				
			||||||
			G_ADD_PRIVATE(EekXmlLayout)
 | 
					 | 
				
			||||||
                        G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
 | 
					 | 
				
			||||||
                                               initable_iface_init))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_DEFINE_BOXED_TYPE(EekXmlKeyboardDesc, eek_xml_keyboard_desc, eek_xml_keyboard_desc_copy, eek_xml_keyboard_desc_free);
 | 
					G_DEFINE_BOXED_TYPE(EekXmlKeyboardDesc, eek_xml_keyboard_desc, eek_xml_keyboard_desc_copy, eek_xml_keyboard_desc_free);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -902,7 +903,6 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
                                     gdouble    initial_height)
 | 
					                                     gdouble    initial_height)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXmlLayout *layout = EEK_XML_LAYOUT (self);
 | 
					    EekXmlLayout *layout = EEK_XML_LAYOUT (self);
 | 
				
			||||||
    EekXmlLayoutPrivate *priv = eek_xml_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
    gboolean retval;
 | 
					    gboolean retval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Create an empty keyboard to which geometry and symbols
 | 
					    /* Create an empty keyboard to which geometry and symbols
 | 
				
			||||||
@ -911,8 +911,8 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
    keyboard->manager = manager;
 | 
					    keyboard->manager = manager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Read geometry information. */
 | 
					    /* Read geometry information. */
 | 
				
			||||||
    gchar *filename = g_strdup_printf ("%s.xml", priv->desc->geometry);
 | 
					    gchar *filename = g_strdup_printf ("%s.xml", layout->priv->desc->geometry);
 | 
				
			||||||
    gchar *path = g_build_filename (priv->keyboards_dir, "geometry", filename, NULL);
 | 
					    gchar *path = g_build_filename (layout->priv->keyboards_dir, "geometry", filename, NULL);
 | 
				
			||||||
    g_free (filename);
 | 
					    g_free (filename);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    GError *error = NULL;
 | 
					    GError *error = NULL;
 | 
				
			||||||
@ -921,7 +921,7 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
    if (!retval) {
 | 
					    if (!retval) {
 | 
				
			||||||
        g_object_unref (keyboard);
 | 
					        g_object_unref (keyboard);
 | 
				
			||||||
        g_warning ("can't parse geometry file %s: %s",
 | 
					        g_warning ("can't parse geometry file %s: %s",
 | 
				
			||||||
                   priv->desc->geometry,
 | 
					                   layout->priv->desc->geometry,
 | 
				
			||||||
                   error->message);
 | 
					                   error->message);
 | 
				
			||||||
        g_error_free (error);
 | 
					        g_error_free (error);
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
@ -929,8 +929,8 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /* Read symbols information. */
 | 
					    /* Read symbols information. */
 | 
				
			||||||
    GList *loaded = NULL;
 | 
					    GList *loaded = NULL;
 | 
				
			||||||
    retval = parse_symbols_with_prerequisites (priv->keyboards_dir,
 | 
					    retval = parse_symbols_with_prerequisites (layout->priv->keyboards_dir,
 | 
				
			||||||
                                               priv->desc->symbols,
 | 
					                                               layout->priv->desc->symbols,
 | 
				
			||||||
                                               keyboard,
 | 
					                                               keyboard,
 | 
				
			||||||
                                               &loaded,
 | 
					                                               &loaded,
 | 
				
			||||||
                                               &error);
 | 
					                                               &error);
 | 
				
			||||||
@ -938,7 +938,7 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
    if (!retval) {
 | 
					    if (!retval) {
 | 
				
			||||||
        g_object_unref (keyboard);
 | 
					        g_object_unref (keyboard);
 | 
				
			||||||
        g_warning ("can't parse symbols file %s: %s",
 | 
					        g_warning ("can't parse symbols file %s: %s",
 | 
				
			||||||
                   priv->desc->symbols,
 | 
					                   layout->priv->desc->symbols,
 | 
				
			||||||
                   error->message);
 | 
					                   error->message);
 | 
				
			||||||
        g_error_free (error);
 | 
					        g_error_free (error);
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
@ -949,7 +949,7 @@ eek_xml_layout_real_create_keyboard (EekboardContextService *manager,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /* Use pre-defined modifier mask here. */
 | 
					    /* Use pre-defined modifier mask here. */
 | 
				
			||||||
    eek_keyboard_set_num_lock_mask (keyboard, EEK_MOD2_MASK);
 | 
					    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;
 | 
					    return keyboard;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -961,12 +961,10 @@ eek_xml_layout_set_property (GObject      *object,
 | 
				
			|||||||
                             GParamSpec   *pspec)
 | 
					                             GParamSpec   *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXmlLayout *layout = EEK_XML_LAYOUT (object);
 | 
					    EekXmlLayout *layout = EEK_XML_LAYOUT (object);
 | 
				
			||||||
    EekXmlLayoutPrivate *priv = eek_xml_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_ID:
 | 
					    case PROP_ID:
 | 
				
			||||||
        g_free (priv->id);
 | 
					        g_free (layout->priv->id);
 | 
				
			||||||
        priv->id = g_value_dup_string (value);
 | 
					        layout->priv->id = g_value_dup_string (value);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -981,11 +979,9 @@ eek_xml_layout_get_property (GObject    *object,
 | 
				
			|||||||
                             GParamSpec *pspec)
 | 
					                             GParamSpec *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXmlLayout *layout = EEK_XML_LAYOUT (object);
 | 
					    EekXmlLayout *layout = EEK_XML_LAYOUT (object);
 | 
				
			||||||
    EekXmlLayoutPrivate *priv = eek_xml_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_ID:
 | 
					    case PROP_ID:
 | 
				
			||||||
        g_value_set_string (value, priv->id);
 | 
					        g_value_set_string (value, layout->priv->id);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -996,8 +992,7 @@ eek_xml_layout_get_property (GObject    *object,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_xml_layout_finalize (GObject *object)
 | 
					eek_xml_layout_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXmlLayoutPrivate *priv = eek_xml_layout_get_instance_private (
 | 
					    EekXmlLayoutPrivate *priv = EEK_XML_LAYOUT_GET_PRIVATE (object);
 | 
				
			||||||
		    EEK_XML_LAYOUT (object));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_free (priv->id);
 | 
					    g_free (priv->id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1016,6 +1011,8 @@ eek_xml_layout_class_init (EekXmlLayoutClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class, sizeof (EekXmlLayoutPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    layout_class->create_keyboard = eek_xml_layout_real_create_keyboard;
 | 
					    layout_class->create_keyboard = eek_xml_layout_real_create_keyboard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->set_property = eek_xml_layout_set_property;
 | 
					    gobject_class->set_property = eek_xml_layout_set_property;
 | 
				
			||||||
@ -1034,7 +1031,7 @@ eek_xml_layout_class_init (EekXmlLayoutClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eek_xml_layout_init (EekXmlLayout *self)
 | 
					eek_xml_layout_init (EekXmlLayout *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEK_XML_LAYOUT_GET_PRIVATE (self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EekLayout *
 | 
					EekLayout *
 | 
				
			||||||
@ -1053,17 +1050,16 @@ initable_init (GInitable    *initable,
 | 
				
			|||||||
               GError      **error)
 | 
					               GError      **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekXmlLayout *layout = EEK_XML_LAYOUT (initable);
 | 
					    EekXmlLayout *layout = EEK_XML_LAYOUT (initable);
 | 
				
			||||||
    EekXmlLayoutPrivate *priv = eek_xml_layout_get_instance_private (layout);
 | 
					 | 
				
			||||||
    GList *keyboards, *p;
 | 
					    GList *keyboards, *p;
 | 
				
			||||||
    gchar *path;
 | 
					    gchar *path;
 | 
				
			||||||
    EekXmlKeyboardDesc *desc;
 | 
					    EekXmlKeyboardDesc *desc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->keyboards_dir = (gchar *) g_getenv ("EEKBOARD_KEYBOARDSDIR");
 | 
					    layout->priv->keyboards_dir = (gchar *) g_getenv ("EEKBOARD_KEYBOARDSDIR");
 | 
				
			||||||
    if (priv->keyboards_dir == NULL)
 | 
					    if (layout->priv->keyboards_dir == NULL)
 | 
				
			||||||
        priv->keyboards_dir = KEYBOARDSDIR;
 | 
					        layout->priv->keyboards_dir = KEYBOARDSDIR;
 | 
				
			||||||
    priv->keyboards_dir = g_strdup (priv->keyboards_dir);
 | 
					    layout->priv->keyboards_dir = g_strdup (layout->priv->keyboards_dir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    path = g_build_filename (priv->keyboards_dir, "keyboards.xml", NULL);
 | 
					    path = g_build_filename (layout->priv->keyboards_dir, "keyboards.xml", NULL);
 | 
				
			||||||
    keyboards = parse_keyboards (path, error);
 | 
					    keyboards = parse_keyboards (path, error);
 | 
				
			||||||
    g_free (path);
 | 
					    g_free (path);
 | 
				
			||||||
    if (error && *error)
 | 
					    if (error && *error)
 | 
				
			||||||
@ -1071,7 +1067,7 @@ initable_init (GInitable    *initable,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    for (p = keyboards; p; p = p->next) {
 | 
					    for (p = keyboards; p; p = p->next) {
 | 
				
			||||||
        desc = p->data;
 | 
					        desc = p->data;
 | 
				
			||||||
        if (g_strcmp0 (desc->id, priv->id) == 0)
 | 
					        if (g_strcmp0 (desc->id, layout->priv->id) == 0)
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (p == NULL) {
 | 
					    if (p == NULL) {
 | 
				
			||||||
@ -1079,12 +1075,12 @@ initable_init (GInitable    *initable,
 | 
				
			|||||||
                     EEK_ERROR,
 | 
					                     EEK_ERROR,
 | 
				
			||||||
                     EEK_ERROR_LAYOUT_ERROR,
 | 
					                     EEK_ERROR_LAYOUT_ERROR,
 | 
				
			||||||
                     "no such keyboard %s",
 | 
					                     "no such keyboard %s",
 | 
				
			||||||
                     priv->id);
 | 
					                     layout->priv->id);
 | 
				
			||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    keyboards = g_list_remove_link (keyboards, p);
 | 
					    keyboards = g_list_remove_link (keyboards, p);
 | 
				
			||||||
    priv->desc = p->data;
 | 
					    layout->priv->desc = p->data;
 | 
				
			||||||
    g_list_free_1 (p);
 | 
					    g_list_free_1 (p);
 | 
				
			||||||
    g_list_free_full (keyboards, (GDestroyNotify) keyboard_desc_free);
 | 
					    g_list_free_full (keyboards, (GDestroyNotify) keyboard_desc_free);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,29 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEK_TYPE_XML_LAYOUT (eek_xml_layout_get_type())
 | 
					#define EEK_TYPE_XML_LAYOUT (eek_xml_layout_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekXmlLayout, eek_xml_layout, EEK, XML_LAYOUT, EekLayout)
 | 
					#define EEK_XML_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_XML_LAYOUT, EekXmlLayout))
 | 
				
			||||||
 | 
					#define EEK_XML_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_XML_LAYOUT, EekXmlLayoutClass))
 | 
				
			||||||
 | 
					#define EEK_IS_XML_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_XML_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_IS_XML_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_XML_LAYOUT))
 | 
				
			||||||
 | 
					#define EEK_XML_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_XML_LAYOUT, EekXmlLayoutClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekXmlLayout        EekXmlLayout;
 | 
				
			||||||
 | 
					typedef struct _EekXmlLayoutClass   EekXmlLayoutClass;
 | 
				
			||||||
 | 
					typedef struct _EekXmlLayoutPrivate EekXmlLayoutPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekXmlLayout:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekXmlLayout structure contains only private data and should
 | 
				
			||||||
 | 
					 * only be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekXmlLayout
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    EekLayout parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekXmlLayoutPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekXmlLayoutClass:
 | 
					 * EekXmlLayoutClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -38,5 +38,9 @@
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
eek_init (void)
 | 
					eek_init (void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    g_type_init ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_ref (EEK_TYPE_SYMBOL);
 | 
				
			||||||
 | 
					    g_type_class_ref (EEK_TYPE_KEYSYM);
 | 
				
			||||||
 | 
					    g_type_class_ref (EEK_TYPE_TEXT);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,7 @@
 | 
				
			|||||||
0xFF9E "Ins" EEK_SYMBOL_CATEGORY_FUNCTION
 | 
					0xFF9E "Ins" EEK_SYMBOL_CATEGORY_FUNCTION
 | 
				
			||||||
0xFF9F "Del" EEK_SYMBOL_CATEGORY_FUNCTION
 | 
					0xFF9F "Del" EEK_SYMBOL_CATEGORY_FUNCTION
 | 
				
			||||||
# aliases
 | 
					# aliases
 | 
				
			||||||
0xFE03 "123" EEK_SYMBOL_CATEGORY_KEYNAME
 | 
					0xFE03 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
 | 
				
			||||||
0xFE04 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
 | 
					0xFE04 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
 | 
				
			||||||
0xFE05 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
 | 
					0xFE05 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
 | 
				
			||||||
0xFE08 "Next" 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
 | 
				
			||||||
@ -36,12 +36,15 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static guint signals[LAST_SIGNAL] = { 0, };
 | 
					static guint signals[LAST_SIGNAL] = { 0, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekboardClientPrivate
 | 
					G_DEFINE_TYPE (EekboardClient, eekboard_client, G_TYPE_DBUS_PROXY);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEKBOARD_CLIENT_GET_PRIVATE(obj)                                \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_CLIENT, EekboardClientPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekboardClientPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    GHashTable *context_hash;
 | 
					    GHashTable *context_hash;
 | 
				
			||||||
} EekboardClientPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekboardClient, eekboard_client, G_TYPE_DBUS_PROXY)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void send_destroy_context (EekboardClient  *client,
 | 
					static void send_destroy_context (EekboardClient  *client,
 | 
				
			||||||
                                  EekboardContext *context,
 | 
					                                  EekboardContext *context,
 | 
				
			||||||
@ -50,7 +53,7 @@ static void send_destroy_context (EekboardClient  *client,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_client_real_destroyed (EekboardClient *self)
 | 
					eekboard_client_real_destroyed (EekboardClient *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (self);
 | 
					    EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // g_debug ("eekboard_client_real_destroyed");
 | 
					    // g_debug ("eekboard_client_real_destroyed");
 | 
				
			||||||
    g_hash_table_remove_all (priv->context_hash);
 | 
					    g_hash_table_remove_all (priv->context_hash);
 | 
				
			||||||
@ -60,7 +63,7 @@ static void
 | 
				
			|||||||
eekboard_client_dispose (GObject *object)
 | 
					eekboard_client_dispose (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardClient *client = EEKBOARD_CLIENT(object);
 | 
					    EekboardClient *client = EEKBOARD_CLIENT(object);
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (client);
 | 
					    EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(client);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->context_hash) {
 | 
					    if (priv->context_hash) {
 | 
				
			||||||
        GHashTableIter iter;
 | 
					        GHashTableIter iter;
 | 
				
			||||||
@ -83,6 +86,9 @@ eekboard_client_class_init (EekboardClientClass *klass)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekboardClientPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    klass->destroyed = eekboard_client_real_destroyed;
 | 
					    klass->destroyed = eekboard_client_real_destroyed;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->dispose = eekboard_client_dispose;
 | 
					    gobject_class->dispose = eekboard_client_dispose;
 | 
				
			||||||
@ -109,9 +115,8 @@ eekboard_client_class_init (EekboardClientClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_client_init (EekboardClient *self)
 | 
					eekboard_client_init (EekboardClient *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (self);
 | 
					    self->priv = EEKBOARD_CLIENT_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					    self->priv->context_hash =
 | 
				
			||||||
    priv->context_hash =
 | 
					 | 
				
			||||||
        g_hash_table_new_full (g_str_hash,
 | 
					        g_hash_table_new_full (g_str_hash,
 | 
				
			||||||
                               g_str_equal,
 | 
					                               g_str_equal,
 | 
				
			||||||
                               (GDestroyNotify)g_free,
 | 
					                               (GDestroyNotify)g_free,
 | 
				
			||||||
@ -184,9 +189,7 @@ on_context_destroyed (EekboardContext *context,
 | 
				
			|||||||
                      gpointer         user_data)
 | 
					                      gpointer         user_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardClient *client = user_data;
 | 
					    EekboardClient *client = user_data;
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (client);
 | 
					    g_hash_table_remove (client->priv->context_hash,
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_hash_table_remove (priv->context_hash,
 | 
					 | 
				
			||||||
                         g_dbus_proxy_get_object_path (G_DBUS_PROXY(context)));
 | 
					                         g_dbus_proxy_get_object_path (G_DBUS_PROXY(context)));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -236,9 +239,7 @@ eekboard_client_create_context (EekboardClient *client,
 | 
				
			|||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (client);
 | 
					    g_hash_table_insert (client->priv->context_hash,
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_hash_table_insert (priv->context_hash,
 | 
					 | 
				
			||||||
                         g_strdup (object_path),
 | 
					                         g_strdup (object_path),
 | 
				
			||||||
                         g_object_ref (context));
 | 
					                         g_object_ref (context));
 | 
				
			||||||
    g_signal_connect (context, "destroyed",
 | 
					    g_signal_connect (context, "destroyed",
 | 
				
			||||||
@ -283,11 +284,9 @@ eekboard_client_push_context (EekboardClient  *client,
 | 
				
			|||||||
    g_return_if_fail (EEKBOARD_IS_CLIENT(client));
 | 
					    g_return_if_fail (EEKBOARD_IS_CLIENT(client));
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (client);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
 | 
					    object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    context = g_hash_table_lookup (priv->context_hash,
 | 
					    context = g_hash_table_lookup (client->priv->context_hash,
 | 
				
			||||||
                                   object_path);
 | 
					                                   object_path);
 | 
				
			||||||
    if (!context)
 | 
					    if (!context)
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
@ -395,10 +394,8 @@ eekboard_client_destroy_context (EekboardClient  *client,
 | 
				
			|||||||
    g_return_if_fail (EEKBOARD_IS_CLIENT(client));
 | 
					    g_return_if_fail (EEKBOARD_IS_CLIENT(client));
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardClientPrivate *priv = eekboard_client_get_instance_private (client);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
 | 
					    object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
 | 
				
			||||||
    g_hash_table_remove (priv->context_hash, object_path);
 | 
					    g_hash_table_remove (client->priv->context_hash, object_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    send_destroy_context (client, context, cancellable);
 | 
					    send_destroy_context (client, context, cancellable);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,22 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEKBOARD_TYPE_CLIENT (eekboard_client_get_type())
 | 
					#define EEKBOARD_TYPE_CLIENT (eekboard_client_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekboardClient, eekboard_client, EEKBOARD, CLIENT, GDBusProxy)
 | 
					#define EEKBOARD_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_CLIENT, EekboardClient))
 | 
				
			||||||
 | 
					#define EEKBOARD_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_CLIENT, EekboardClientClass))
 | 
				
			||||||
 | 
					#define EEKBOARD_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_CLIENT))
 | 
				
			||||||
 | 
					#define EEKBOARD_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_CLIENT))
 | 
				
			||||||
 | 
					#define EEKBOARD_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_CLIENT, EekboardClientClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekboardClient EekboardClient;
 | 
				
			||||||
 | 
					typedef struct _EekboardClientClass EekboardClientClass;
 | 
				
			||||||
 | 
					typedef struct _EekboardClientPrivate EekboardClientPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekboardClient {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GDBusProxy parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekboardClientPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct _EekboardClientClass {
 | 
					struct _EekboardClientClass {
 | 
				
			||||||
    /*< private >*/
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
				
			|||||||
@ -84,9 +84,7 @@ struct _EekboardContextServicePrivate {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
G_DEFINE_TYPE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT);
 | 
					G_DEFINE_TYPE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 0  // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-variable =====
 | 
					 | 
				
			||||||
static Display *display = NULL;
 | 
					static Display *display = NULL;
 | 
				
			||||||
#endif // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-variable =====
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static EekKeyboard *
 | 
					static EekKeyboard *
 | 
				
			||||||
eekboard_context_service_real_create_keyboard (EekboardContextService *self,
 | 
					eekboard_context_service_real_create_keyboard (EekboardContextService *self,
 | 
				
			||||||
@ -485,7 +483,6 @@ eekboard_context_service_init (EekboardContextService *self)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 0  // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-function =====
 | 
					 | 
				
			||||||
static gboolean on_repeat_timeout (EekboardContextService *context);
 | 
					static gboolean on_repeat_timeout (EekboardContextService *context);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static gboolean
 | 
					static gboolean
 | 
				
			||||||
@ -504,9 +501,7 @@ on_repeat_timeout (EekboardContextService *context)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return FALSE;
 | 
					    return FALSE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-function =====
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 0  // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-function =====
 | 
					 | 
				
			||||||
static gboolean
 | 
					static gboolean
 | 
				
			||||||
on_repeat_timeout_init (EekboardContextService *context)
 | 
					on_repeat_timeout_init (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -532,7 +527,6 @@ on_repeat_timeout_init (EekboardContextService *context)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return FALSE;
 | 
					    return FALSE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-function =====
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * eekboard_context_service_enable:
 | 
					 * eekboard_context_service_enable:
 | 
				
			||||||
@ -575,20 +569,16 @@ eekboard_context_service_show_keyboard (EekboardContextService *context)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!context->priv->visible) {
 | 
					 | 
				
			||||||
    EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context)->show_keyboard (context);
 | 
					    EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context)->show_keyboard (context);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
eekboard_context_service_hide_keyboard (EekboardContextService *context)
 | 
					eekboard_context_service_hide_keyboard (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (context->priv->visible) {
 | 
					 | 
				
			||||||
    EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context)->hide_keyboard (context);
 | 
					    EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context)->hide_keyboard (context);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * eekboard_context_service_destroy:
 | 
					 * eekboard_context_service_destroy:
 | 
				
			||||||
 | 
				
			|||||||
@ -49,15 +49,18 @@ enum {
 | 
				
			|||||||
    PROP_LAST
 | 
					    PROP_LAST
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekboardContextPrivate
 | 
					G_DEFINE_TYPE (EekboardContext, eekboard_context, G_TYPE_DBUS_PROXY);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define EEKBOARD_CONTEXT_GET_PRIVATE(obj)                               \
 | 
				
			||||||
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_CONTEXT, EekboardContextPrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekboardContextPrivate
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    gboolean visible;
 | 
					    gboolean visible;
 | 
				
			||||||
    gboolean enabled;
 | 
					    gboolean enabled;
 | 
				
			||||||
    gboolean fullscreen;
 | 
					    gboolean fullscreen;
 | 
				
			||||||
    gint group;
 | 
					    gint group;
 | 
				
			||||||
} EekboardContextPrivate;
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekboardContext, eekboard_context, G_TYPE_DBUS_PROXY)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_context_real_g_signal (GDBusProxy  *self,
 | 
					eekboard_context_real_g_signal (GDBusProxy  *self,
 | 
				
			||||||
@ -66,7 +69,6 @@ eekboard_context_real_g_signal (GDBusProxy  *self,
 | 
				
			|||||||
                                GVariant    *parameters)
 | 
					                                GVariant    *parameters)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardContext *context = EEKBOARD_CONTEXT (self);
 | 
					    EekboardContext *context = EEKBOARD_CONTEXT (self);
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (g_strcmp0 (signal_name, "Enabled") == 0) {
 | 
					    if (g_strcmp0 (signal_name, "Enabled") == 0) {
 | 
				
			||||||
        g_signal_emit (context, signals[ENABLED], 0);
 | 
					        g_signal_emit (context, signals[ENABLED], 0);
 | 
				
			||||||
@ -109,8 +111,8 @@ eekboard_context_real_g_signal (GDBusProxy  *self,
 | 
				
			|||||||
        gboolean visible = FALSE;
 | 
					        gboolean visible = FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        g_variant_get (parameters, "(b)", &visible);
 | 
					        g_variant_get (parameters, "(b)", &visible);
 | 
				
			||||||
        if (visible != priv->visible) {
 | 
					        if (visible != context->priv->visible) {
 | 
				
			||||||
            priv->visible = visible;
 | 
					            context->priv->visible = visible;
 | 
				
			||||||
            g_object_notify (G_OBJECT(context), "visible");
 | 
					            g_object_notify (G_OBJECT(context), "visible");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
@ -120,8 +122,8 @@ eekboard_context_real_g_signal (GDBusProxy  *self,
 | 
				
			|||||||
        gint group = 0;
 | 
					        gint group = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        g_variant_get (parameters, "(i)", &group);
 | 
					        g_variant_get (parameters, "(i)", &group);
 | 
				
			||||||
        if (group != priv->group) {
 | 
					        if (group != context->priv->group) {
 | 
				
			||||||
            priv->group = group;
 | 
					            context->priv->group = group;
 | 
				
			||||||
            /* g_object_notify (G_OBJECT(context), "group"); */
 | 
					            /* g_object_notify (G_OBJECT(context), "group"); */
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
@ -133,17 +135,13 @@ eekboard_context_real_g_signal (GDBusProxy  *self,
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_context_real_enabled (EekboardContext *self)
 | 
					eekboard_context_real_enabled (EekboardContext *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (self);
 | 
					    self->priv->enabled = TRUE;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->enabled = TRUE;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_context_real_disabled (EekboardContext *self)
 | 
					eekboard_context_real_disabled (EekboardContext *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (self);
 | 
					    self->priv->enabled = FALSE;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->enabled = FALSE;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
@ -166,11 +164,9 @@ eekboard_context_get_property (GObject    *object,
 | 
				
			|||||||
                               GParamSpec *pspec)
 | 
					                               GParamSpec *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardContext *context = EEKBOARD_CONTEXT(object);
 | 
					    EekboardContext *context = EEKBOARD_CONTEXT(object);
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_VISIBLE:
 | 
					    case PROP_VISIBLE:
 | 
				
			||||||
        g_value_set_boolean (value, priv->visible);
 | 
					        g_value_set_boolean (value, context->priv->visible);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -185,6 +181,9 @@ eekboard_context_class_init (EekboardContextClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec        *pspec;
 | 
					    GParamSpec        *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekboardContextPrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    klass->enabled = eekboard_context_real_enabled;
 | 
					    klass->enabled = eekboard_context_real_enabled;
 | 
				
			||||||
    klass->disabled = eekboard_context_real_disabled;
 | 
					    klass->disabled = eekboard_context_real_disabled;
 | 
				
			||||||
    klass->destroyed = eekboard_context_real_destroyed;
 | 
					    klass->destroyed = eekboard_context_real_destroyed;
 | 
				
			||||||
@ -289,7 +288,7 @@ eekboard_context_class_init (EekboardContextClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_context_init (EekboardContext *self)
 | 
					eekboard_context_init (EekboardContext *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /* void */
 | 
					    self->priv = EEKBOARD_CONTEXT_GET_PRIVATE(self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
@ -486,9 +485,7 @@ eekboard_context_set_group (EekboardContext *context,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					    if (context->priv->group != group) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->group != group) {
 | 
					 | 
				
			||||||
        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
					        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
				
			||||||
                           "SetGroup",
 | 
					                           "SetGroup",
 | 
				
			||||||
                           g_variant_new ("(i)", group),
 | 
					                           g_variant_new ("(i)", group),
 | 
				
			||||||
@ -512,10 +509,7 @@ eekboard_context_get_group (EekboardContext *context,
 | 
				
			|||||||
                            GCancellable    *cancellable)
 | 
					                            GCancellable    *cancellable)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEKBOARD_IS_CONTEXT(context), 0);
 | 
					    g_return_val_if_fail (EEKBOARD_IS_CONTEXT(context), 0);
 | 
				
			||||||
 | 
					    return context->priv->group;
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->group;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -532,9 +526,7 @@ eekboard_context_show_keyboard (EekboardContext *context,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					    if (context->priv->enabled) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->enabled) {
 | 
					 | 
				
			||||||
        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
					        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
				
			||||||
                           "ShowKeyboard",
 | 
					                           "ShowKeyboard",
 | 
				
			||||||
                           NULL,
 | 
					                           NULL,
 | 
				
			||||||
@ -559,9 +551,7 @@ eekboard_context_hide_keyboard (EekboardContext *context,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					    if (context->priv->enabled) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->enabled) {
 | 
					 | 
				
			||||||
        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
					        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
				
			||||||
                           "HideKeyboard",
 | 
					                           "HideKeyboard",
 | 
				
			||||||
                           NULL,
 | 
					                           NULL,
 | 
				
			||||||
@ -588,9 +578,7 @@ eekboard_context_press_keycode (EekboardContext *context,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					    if (context->priv->enabled) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->enabled) {
 | 
					 | 
				
			||||||
        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
					        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
				
			||||||
                           "PressKeycode",
 | 
					                           "PressKeycode",
 | 
				
			||||||
                           g_variant_new ("(u)", keycode),
 | 
					                           g_variant_new ("(u)", keycode),
 | 
				
			||||||
@ -617,9 +605,7 @@ eekboard_context_release_keycode (EekboardContext *context,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					    if (context->priv->enabled) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->enabled) {
 | 
					 | 
				
			||||||
        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
					        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
				
			||||||
                           "ReleaseKeycode",
 | 
					                           "ReleaseKeycode",
 | 
				
			||||||
                           g_variant_new ("(u)", keycode),
 | 
					                           g_variant_new ("(u)", keycode),
 | 
				
			||||||
@ -641,10 +627,7 @@ gboolean
 | 
				
			|||||||
eekboard_context_is_visible (EekboardContext *context)
 | 
					eekboard_context_is_visible (EekboardContext *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEKBOARD_IS_CONTEXT(context), FALSE);
 | 
					    g_return_val_if_fail (EEKBOARD_IS_CONTEXT(context), FALSE);
 | 
				
			||||||
 | 
					    return context->priv->enabled && context->priv->visible;
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->enabled && priv->visible;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -661,10 +644,7 @@ eekboard_context_set_enabled (EekboardContext *context,
 | 
				
			|||||||
                              gboolean         enabled)
 | 
					                              gboolean         enabled)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					    context->priv->enabled = enabled;
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    priv->enabled = enabled;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -677,10 +657,7 @@ gboolean
 | 
				
			|||||||
eekboard_context_is_enabled (EekboardContext *context)
 | 
					eekboard_context_is_enabled (EekboardContext *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_val_if_fail (EEKBOARD_IS_CONTEXT(context), FALSE);
 | 
					    g_return_val_if_fail (EEKBOARD_IS_CONTEXT(context), FALSE);
 | 
				
			||||||
 | 
					    return context->priv->enabled;
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return priv->enabled;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -697,10 +674,7 @@ eekboard_context_set_fullscreen (EekboardContext *context,
 | 
				
			|||||||
                                 GCancellable    *cancellable)
 | 
					                                 GCancellable    *cancellable)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
					    g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
 | 
				
			||||||
 | 
					    if (context->priv->fullscreen != fullscreen) {
 | 
				
			||||||
    EekboardContextPrivate *priv = eekboard_context_get_instance_private (context);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->fullscreen != fullscreen) {
 | 
					 | 
				
			||||||
        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
					        g_dbus_proxy_call (G_DBUS_PROXY(context),
 | 
				
			||||||
                           "SetFullscreen",
 | 
					                           "SetFullscreen",
 | 
				
			||||||
                           g_variant_new ("(b)", fullscreen),
 | 
					                           g_variant_new ("(b)", fullscreen),
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,28 @@
 | 
				
			|||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEKBOARD_TYPE_CONTEXT (eekboard_context_get_type())
 | 
					#define EEKBOARD_TYPE_CONTEXT (eekboard_context_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekboardContext, eekboard_context, EEKBOARD, CONTEXT, GDBusProxy)
 | 
					#define EEKBOARD_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_CONTEXT, EekboardContext))
 | 
				
			||||||
 | 
					#define EEKBOARD_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_CONTEXT, EekboardContextClass))
 | 
				
			||||||
 | 
					#define EEKBOARD_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_CONTEXT))
 | 
				
			||||||
 | 
					#define EEKBOARD_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_CONTEXT))
 | 
				
			||||||
 | 
					#define EEKBOARD_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_CONTEXT, EekboardContextClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekboardContext EekboardContext;
 | 
				
			||||||
 | 
					typedef struct _EekboardContextClass EekboardContextClass;
 | 
				
			||||||
 | 
					typedef struct _EekboardContextPrivate EekboardContextPrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekboardContext:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekboardContext structure contains only private data and
 | 
				
			||||||
 | 
					 * should only be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekboardContext {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GDBusProxy parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekboardContextPrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekboardContextClass:
 | 
					 * EekboardContextClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -50,8 +50,10 @@ enum {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static guint signals[LAST_SIGNAL] = { 0, };
 | 
					static guint signals[LAST_SIGNAL] = { 0, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _EekboardServicePrivate
 | 
					#define EEKBOARD_SERVICE_GET_PRIVATE(obj)                               \
 | 
				
			||||||
{
 | 
					    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_SERVICE, EekboardServicePrivate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _EekboardServicePrivate {
 | 
				
			||||||
    GDBusConnection *connection;
 | 
					    GDBusConnection *connection;
 | 
				
			||||||
    SmPuriOSK0 *dbus_interface;
 | 
					    SmPuriOSK0 *dbus_interface;
 | 
				
			||||||
    GDBusNodeInfo *introspection_data;
 | 
					    GDBusNodeInfo *introspection_data;
 | 
				
			||||||
@ -59,9 +61,9 @@ typedef struct _EekboardServicePrivate
 | 
				
			|||||||
    char *object_path;
 | 
					    char *object_path;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextService *context; // unowned reference
 | 
					    EekboardContextService *context; // unowned reference
 | 
				
			||||||
} EekboardServicePrivate;
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekboardService, eekboard_service, G_TYPE_OBJECT)
 | 
					G_DEFINE_TYPE (EekboardService, eekboard_service, G_TYPE_OBJECT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_service_set_property (GObject      *object,
 | 
					eekboard_service_set_property (GObject      *object,
 | 
				
			||||||
@ -70,20 +72,19 @@ eekboard_service_set_property (GObject      *object,
 | 
				
			|||||||
                               GParamSpec   *pspec)
 | 
					                               GParamSpec   *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
					    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					 | 
				
			||||||
    GDBusConnection *connection;
 | 
					    GDBusConnection *connection;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_OBJECT_PATH:
 | 
					    case PROP_OBJECT_PATH:
 | 
				
			||||||
        if (priv->object_path)
 | 
					        if (service->priv->object_path)
 | 
				
			||||||
            g_free (priv->object_path);
 | 
					            g_free (service->priv->object_path);
 | 
				
			||||||
        priv->object_path = g_value_dup_string (value);
 | 
					        service->priv->object_path = g_value_dup_string (value);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case PROP_CONNECTION:
 | 
					    case PROP_CONNECTION:
 | 
				
			||||||
        connection = g_value_get_object (value);
 | 
					        connection = g_value_get_object (value);
 | 
				
			||||||
        if (priv->connection)
 | 
					        if (service->priv->connection)
 | 
				
			||||||
            g_object_unref (priv->connection);
 | 
					            g_object_unref (service->priv->connection);
 | 
				
			||||||
        priv->connection = g_object_ref (connection);
 | 
					        service->priv->connection = g_object_ref (connection);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -98,14 +99,13 @@ eekboard_service_get_property (GObject    *object,
 | 
				
			|||||||
                               GParamSpec *pspec)
 | 
					                               GParamSpec *pspec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
					    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (prop_id) {
 | 
					    switch (prop_id) {
 | 
				
			||||||
    case PROP_OBJECT_PATH:
 | 
					    case PROP_OBJECT_PATH:
 | 
				
			||||||
        g_value_set_string (value, priv->object_path);
 | 
					        g_value_set_string (value, service->priv->object_path);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case PROP_CONNECTION:
 | 
					    case PROP_CONNECTION:
 | 
				
			||||||
        g_value_set_object (value, priv->connection);
 | 
					        g_value_set_object (value, service->priv->connection);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
					        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
				
			||||||
@ -117,22 +117,20 @@ static void
 | 
				
			|||||||
eekboard_service_dispose (GObject *object)
 | 
					eekboard_service_dispose (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
					    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					    if (service->priv->connection) {
 | 
				
			||||||
 | 
					        if (service->priv->registration_id > 0) {
 | 
				
			||||||
    if (priv->connection) {
 | 
					            g_dbus_connection_unregister_object (service->priv->connection,
 | 
				
			||||||
        if (priv->registration_id > 0) {
 | 
					                                                 service->priv->registration_id);
 | 
				
			||||||
            g_dbus_connection_unregister_object (priv->connection,
 | 
					            service->priv->registration_id = 0;
 | 
				
			||||||
                                                 priv->registration_id);
 | 
					 | 
				
			||||||
            priv->registration_id = 0;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        g_object_unref (priv->connection);
 | 
					        g_object_unref (service->priv->connection);
 | 
				
			||||||
        priv->connection = NULL;
 | 
					        service->priv->connection = NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->introspection_data) {
 | 
					    if (service->priv->introspection_data) {
 | 
				
			||||||
        g_dbus_node_info_unref (priv->introspection_data);
 | 
					        g_dbus_node_info_unref (service->priv->introspection_data);
 | 
				
			||||||
        priv->introspection_data = NULL;
 | 
					        service->priv->introspection_data = NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    G_OBJECT_CLASS (eekboard_service_parent_class)->dispose (object);
 | 
					    G_OBJECT_CLASS (eekboard_service_parent_class)->dispose (object);
 | 
				
			||||||
@ -142,9 +140,8 @@ static void
 | 
				
			|||||||
eekboard_service_finalize (GObject *object)
 | 
					eekboard_service_finalize (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
					    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_free (priv->object_path);
 | 
					    g_free (service->priv->object_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    G_OBJECT_CLASS (eekboard_service_parent_class)->finalize (object);
 | 
					    G_OBJECT_CLASS (eekboard_service_parent_class)->finalize (object);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -153,13 +150,11 @@ static gboolean
 | 
				
			|||||||
handle_set_visible(SmPuriOSK0 *object, GDBusMethodInvocation *invocation,
 | 
					handle_set_visible(SmPuriOSK0 *object, GDBusMethodInvocation *invocation,
 | 
				
			||||||
                   gboolean arg_visible, gpointer user_data) {
 | 
					                   gboolean arg_visible, gpointer user_data) {
 | 
				
			||||||
    EekboardService *service = user_data;
 | 
					    EekboardService *service = user_data;
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					    if (service->priv->context) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (priv->context) {
 | 
					 | 
				
			||||||
        if (arg_visible) {
 | 
					        if (arg_visible) {
 | 
				
			||||||
            eekboard_context_service_show_keyboard (priv->context);
 | 
					            eekboard_context_service_show_keyboard (service->priv->context);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            eekboard_context_service_hide_keyboard (priv->context);
 | 
					            eekboard_context_service_hide_keyboard (service->priv->context);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    sm_puri_osk0_complete_set_visible(object, invocation);
 | 
					    sm_puri_osk0_complete_set_visible(object, invocation);
 | 
				
			||||||
@ -170,19 +165,18 @@ static void
 | 
				
			|||||||
eekboard_service_constructed (GObject *object)
 | 
					eekboard_service_constructed (GObject *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
					    EekboardService *service = EEKBOARD_SERVICE(object);
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->dbus_interface = sm_puri_osk0_skeleton_new();
 | 
					    service->priv->dbus_interface = sm_puri_osk0_skeleton_new();
 | 
				
			||||||
    sm_puri_osk0_set_visible(priv->dbus_interface, FALSE); // TODO: use actual value
 | 
					    sm_puri_osk0_set_visible(service->priv->dbus_interface, FALSE); // TODO: use actual value
 | 
				
			||||||
    g_signal_connect(priv->dbus_interface, "handle-set-visible",
 | 
					    g_signal_connect(service->priv->dbus_interface, "handle-set-visible",
 | 
				
			||||||
                     G_CALLBACK(handle_set_visible), service);
 | 
					                     G_CALLBACK(handle_set_visible), service);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (priv->connection && priv->object_path) {
 | 
					    if (service->priv->connection && service->priv->object_path) {
 | 
				
			||||||
        GError *error = NULL;
 | 
					        GError *error = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(priv->dbus_interface),
 | 
					        if (!g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(service->priv->dbus_interface),
 | 
				
			||||||
                                              priv->connection,
 | 
					                                              service->priv->connection,
 | 
				
			||||||
                                              priv->object_path,
 | 
					                                              service->priv->object_path,
 | 
				
			||||||
                                              &error)) {
 | 
					                                              &error)) {
 | 
				
			||||||
            g_warning("Error registering dbus object: %s\n", error->message);
 | 
					            g_warning("Error registering dbus object: %s\n", error->message);
 | 
				
			||||||
            g_clear_error(&error);
 | 
					            g_clear_error(&error);
 | 
				
			||||||
@ -196,6 +190,9 @@ eekboard_service_class_init (EekboardServiceClass *klass)
 | 
				
			|||||||
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
					    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 | 
				
			||||||
    GParamSpec *pspec;
 | 
					    GParamSpec *pspec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    g_type_class_add_private (gobject_class,
 | 
				
			||||||
 | 
					                              sizeof (EekboardServicePrivate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    klass->create_context = NULL;
 | 
					    klass->create_context = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gobject_class->constructed = eekboard_service_constructed;
 | 
					    gobject_class->constructed = eekboard_service_constructed;
 | 
				
			||||||
@ -253,9 +250,8 @@ eekboard_service_class_init (EekboardServiceClass *klass)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
eekboard_service_init (EekboardService *self)
 | 
					eekboard_service_init (EekboardService *self)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (self);
 | 
					    self->priv = EEKBOARD_SERVICE_GET_PRIVATE(self);
 | 
				
			||||||
 | 
					    self->priv->context = NULL;
 | 
				
			||||||
    priv->context = NULL;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -275,9 +271,7 @@ eekboard_service_new (GDBusConnection *connection,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
eekboard_service_set_context(EekboardService *service,
 | 
					eekboard_service_set_context(EekboardService *service,
 | 
				
			||||||
                             EekboardContextService *context)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    EekboardServicePrivate *priv = eekboard_service_get_instance_private (service);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    priv->context = context;
 | 
					                             EekboardContextService *context) {
 | 
				
			||||||
 | 
					    service->priv->context = context;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,30 @@ G_BEGIN_DECLS
 | 
				
			|||||||
#define EEKBOARD_SERVICE_INTERFACE "sm.puri.OSK0"
 | 
					#define EEKBOARD_SERVICE_INTERFACE "sm.puri.OSK0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define EEKBOARD_TYPE_SERVICE (eekboard_service_get_type())
 | 
					#define EEKBOARD_TYPE_SERVICE (eekboard_service_get_type())
 | 
				
			||||||
G_DECLARE_DERIVABLE_TYPE (EekboardService, eekboard_service, EEKBOARD, SERVICE, GObject)
 | 
					#define EEKBOARD_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_SERVICE, EekboardService))
 | 
				
			||||||
 | 
					#define EEKBOARD_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_SERVICE, EekboardServiceClass))
 | 
				
			||||||
 | 
					#define EEKBOARD_IS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_SERVICE))
 | 
				
			||||||
 | 
					#define EEKBOARD_IS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_SERVICE))
 | 
				
			||||||
 | 
					#define EEKBOARD_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_SERVICE, EekboardServiceClass))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _EekboardService EekboardService;
 | 
				
			||||||
 | 
					typedef struct _EekboardServiceClass EekboardServiceClass;
 | 
				
			||||||
 | 
					typedef struct _EekboardServicePrivate EekboardServicePrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekboardService:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Manages DBus interaction.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekboardService structure contains only private data and
 | 
				
			||||||
 | 
					 * should only be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct _EekboardService {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EekboardServicePrivate *priv;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * EekboardServiceClass:
 | 
					 * EekboardServiceClass:
 | 
				
			||||||
 | 
				
			|||||||
@ -78,15 +78,12 @@ replace_keycode (SeatEmitter *emitter,
 | 
				
			|||||||
                 guint   keycode,
 | 
					                 guint   keycode,
 | 
				
			||||||
                 guint  *keysym)
 | 
					                 guint  *keysym)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#if 0  // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-variable =====
 | 
					 | 
				
			||||||
    GdkDisplay *display = gdk_display_get_default ();
 | 
					    GdkDisplay *display = gdk_display_get_default ();
 | 
				
			||||||
    //Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
 | 
					    //Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
 | 
				
			||||||
    guint old_keysym;
 | 
					    guint old_keysym;
 | 
				
			||||||
    int keysyms_per_keycode;
 | 
					    int keysyms_per_keycode;
 | 
				
			||||||
#endif // ===== REMOVAL NOTICE ==== expires by: 2019-08-20 -Wunused-variable =====
 | 
					    KeySym *syms;
 | 
				
			||||||
 | 
					 | 
				
			||||||
return TRUE; // FIXME: no xkb allocated at the moment, pretending all is fine
 | 
					return TRUE; // FIXME: no xkb allocated at the moment, pretending all is fine
 | 
				
			||||||
 | 
					 | 
				
			||||||
    g_return_val_if_fail (emitter->xkb->min_key_code <= keycode &&
 | 
					    g_return_val_if_fail (emitter->xkb->min_key_code <= keycode &&
 | 
				
			||||||
                          keycode <= emitter->xkb->max_key_code,
 | 
					                          keycode <= emitter->xkb->max_key_code,
 | 
				
			||||||
                          FALSE);
 | 
					                          FALSE);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										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
 | 
				
			||||||
							
								
								
									
										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
 | 
				
			||||||
@ -5,8 +5,8 @@
 | 
				
			|||||||
#include "eekboard/eekboard-context-service.h"
 | 
					#include "eekboard/eekboard-context-service.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void imservice_handle_text_change_cause(void *data, struct zwp_input_method_v2 *input_method, uint32_t cause) {}
 | 
					void imservice_handle_text_change_cause(void *data, struct zwp_input_method_v2 *input_method) {}
 | 
				
			||||||
void imservice_handle_content_type(void *data, struct zwp_input_method_v2 *input_method, uint32_t hint, uint32_t purpose) {}
 | 
					void imservice_handle_content_type(void *data, struct zwp_input_method_v2 *input_method) {}
 | 
				
			||||||
void imservice_handle_unavailable(void *data, struct zwp_input_method_v2 *input_method) {}
 | 
					void imservice_handle_unavailable(void *data, struct zwp_input_method_v2 *input_method) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
gnome = import('gnome')
 | 
					gnome = import('gnome')
 | 
				
			||||||
dbus_src = gnome.gdbus_codegen(
 | 
					dbus_src = gnome.gdbus_codegen(
 | 
				
			||||||
    'sm.puri.OSK0',
 | 
					    'sm.puri.OSK0',
 | 
				
			||||||
    join_paths(dbusdir, 'sm.puri.OSK0.xml')
 | 
					    join_paths(meson.source_root() / 'data' / 'dbus', 'sm.puri.OSK0.xml')
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sources = [
 | 
					sources = [
 | 
				
			||||||
 | 
				
			|||||||
@ -217,18 +217,16 @@ static void
 | 
				
			|||||||
set_geometry (ServerContextService *context)
 | 
					set_geometry (ServerContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    GdkScreen *screen;
 | 
					    GdkScreen *screen;
 | 
				
			||||||
    GdkDisplay *display;
 | 
					 | 
				
			||||||
    GdkWindow *root;
 | 
					    GdkWindow *root;
 | 
				
			||||||
    GdkMonitor *monitor;
 | 
					    gint monitor;
 | 
				
			||||||
    GdkRectangle rect;
 | 
					    GdkRectangle rect;
 | 
				
			||||||
    EekKeyboard *keyboard;
 | 
					    const EekKeyboard *keyboard;
 | 
				
			||||||
    EekBounds bounds;
 | 
					    EekBounds bounds;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    screen = gdk_screen_get_default ();
 | 
					    screen = gdk_screen_get_default ();
 | 
				
			||||||
    root = gdk_screen_get_root_window (screen);
 | 
					    root = gtk_widget_get_root_window (context->window);
 | 
				
			||||||
    display = gdk_display_get_default();
 | 
					    monitor = gdk_screen_get_monitor_at_window (screen, root);
 | 
				
			||||||
    monitor = gdk_display_get_monitor_at_window (display, root);
 | 
					    gdk_screen_get_monitor_geometry (screen, monitor, &rect);
 | 
				
			||||||
    gdk_monitor_get_geometry (monitor, &rect);
 | 
					 | 
				
			||||||
    keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context));
 | 
					    keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context));
 | 
				
			||||||
    eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
 | 
					    eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -375,7 +373,6 @@ server_context_service_real_hide_keyboard (EekboardContextService *_context)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    gtk_widget_hide (context->window);
 | 
					    gtk_widget_hide (context->window);
 | 
				
			||||||
    gtk_container_remove(GTK_CONTAINER(context->window), context->widget);
 | 
					    gtk_container_remove(GTK_CONTAINER(context->window), context->widget);
 | 
				
			||||||
    context->widget = NULL; // When GTK removes the widget, it doesn't just unlink it, but also frees it
 | 
					 | 
				
			||||||
    destroy_window (context);
 | 
					    destroy_window (context);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EEKBOARD_CONTEXT_SERVICE_CLASS (server_context_service_parent_class)->
 | 
					    EEKBOARD_CONTEXT_SERVICE_CLASS (server_context_service_parent_class)->
 | 
				
			||||||
 | 
				
			|||||||
@ -143,40 +143,6 @@ static const struct wl_registry_listener registry_listener = {
 | 
				
			|||||||
  registry_handle_global_remove
 | 
					  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
 | 
					int
 | 
				
			||||||
main (int argc, char **argv)
 | 
					main (int argc, char **argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -295,8 +261,6 @@ main (int argc, char **argv)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    session_register();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    GMainLoop *loop = g_main_loop_new (NULL, FALSE);
 | 
					    GMainLoop *loop = g_main_loop_new (NULL, FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    g_signal_connect (service, "destroyed", G_CALLBACK(on_destroyed), loop);
 | 
					    g_signal_connect (service, "destroyed", G_CALLBACK(on_destroyed), loop);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										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