summaryrefslogtreecommitdiff
path: root/dist/xcb-util/keysyms
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-05-23 14:38:22 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-05-23 14:38:22 +0000
commit86bb951017acff65627eb198fe1fa4c73b46aad4 (patch)
tree18afd632e81d724b548b60373016d1459dfce5f3 /dist/xcb-util/keysyms
parent013b4a3065ff281c23c32277f08a521fd7922c23 (diff)
import xcb-util 0.3.4
Diffstat (limited to 'dist/xcb-util/keysyms')
-rw-r--r--dist/xcb-util/keysyms/Makefile.am17
-rw-r--r--dist/xcb-util/keysyms/Makefile.in554
-rw-r--r--dist/xcb-util/keysyms/keysyms.c487
-rw-r--r--dist/xcb-util/keysyms/xcb-keysyms.pc.in11
-rw-r--r--dist/xcb-util/keysyms/xcb_keysyms.h71
5 files changed, 1140 insertions, 0 deletions
diff --git a/dist/xcb-util/keysyms/Makefile.am b/dist/xcb-util/keysyms/Makefile.am
new file mode 100644
index 000000000..f7965ab73
--- /dev/null
+++ b/dist/xcb-util/keysyms/Makefile.am
@@ -0,0 +1,17 @@
+
+MAINTAINERCLEANFILES = Makefile.in
+
+lib_LTLIBRARIES = libxcb-keysyms.la
+
+xcbinclude_HEADERS = xcb_keysyms.h
+
+AM_CFLAGS = $(CWARNFLAGS)
+
+libxcb_keysyms_la_SOURCES = keysyms.c
+libxcb_keysyms_la_CPPFLAGS = $(XCB_CFLAGS)
+libxcb_keysyms_la_LIBADD = $(XCB_LIBS)
+libxcb_keysyms_la_LDFLAGS = -version-info 1:0:0
+
+pkgconfig_DATA = xcb-keysyms.pc
+
+EXTRA_DIST=xcb-keysyms.pc.in
diff --git a/dist/xcb-util/keysyms/Makefile.in b/dist/xcb-util/keysyms/Makefile.in
new file mode 100644
index 000000000..f6cfad80e
--- /dev/null
+++ b/dist/xcb-util/keysyms/Makefile.in
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = keysyms
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/xcb-keysyms.pc.in $(xcbinclude_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = xcb-keysyms.pc
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
+ "$(DESTDIR)$(xcbincludedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libxcb_keysyms_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libxcb_keysyms_la_OBJECTS = libxcb_keysyms_la-keysyms.lo
+libxcb_keysyms_la_OBJECTS = $(am_libxcb_keysyms_la_OBJECTS)
+libxcb_keysyms_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libxcb_keysyms_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libxcb_keysyms_la_SOURCES)
+DIST_SOURCES = $(libxcb_keysyms_la_SOURCES)
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+xcbincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(xcbinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GPERF = @GPERF@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+M4 = @M4@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XCB_ATOM_CFLAGS = @XCB_ATOM_CFLAGS@
+XCB_ATOM_LIBS = @XCB_ATOM_LIBS@
+XCB_AUX_CFLAGS = @XCB_AUX_CFLAGS@
+XCB_AUX_LIBS = @XCB_AUX_LIBS@
+XCB_CFLAGS = @XCB_CFLAGS@
+XCB_EVENT_CFLAGS = @XCB_EVENT_CFLAGS@
+XCB_EVENT_LIBS = @XCB_EVENT_LIBS@
+XCB_ICCCM_CFLAGS = @XCB_ICCCM_CFLAGS@
+XCB_ICCCM_LIBS = @XCB_ICCCM_LIBS@
+XCB_LIBS = @XCB_LIBS@
+XCB_PROPERTY_CFLAGS = @XCB_PROPERTY_CFLAGS@
+XCB_PROPERTY_LIBS = @XCB_PROPERTY_LIBS@
+XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
+XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
+XCB_SHM_CFLAGS = @XCB_SHM_CFLAGS@
+XCB_SHM_LIBS = @XCB_SHM_LIBS@
+XPROTO_CFLAGS = @XPROTO_CFLAGS@
+XPROTO_LIBS = @XPROTO_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+xcbincludedir = @xcbincludedir@
+MAINTAINERCLEANFILES = Makefile.in
+lib_LTLIBRARIES = libxcb-keysyms.la
+xcbinclude_HEADERS = xcb_keysyms.h
+AM_CFLAGS = $(CWARNFLAGS)
+libxcb_keysyms_la_SOURCES = keysyms.c
+libxcb_keysyms_la_CPPFLAGS = $(XCB_CFLAGS)
+libxcb_keysyms_la_LIBADD = $(XCB_LIBS)
+libxcb_keysyms_la_LDFLAGS = -version-info 1:0:0
+pkgconfig_DATA = xcb-keysyms.pc
+EXTRA_DIST = xcb-keysyms.pc.in
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign keysyms/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign keysyms/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+xcb-keysyms.pc: $(top_builddir)/config.status $(srcdir)/xcb-keysyms.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libxcb-keysyms.la: $(libxcb_keysyms_la_OBJECTS) $(libxcb_keysyms_la_DEPENDENCIES)
+ $(libxcb_keysyms_la_LINK) -rpath $(libdir) $(libxcb_keysyms_la_OBJECTS) $(libxcb_keysyms_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxcb_keysyms_la-keysyms.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libxcb_keysyms_la-keysyms.lo: keysyms.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxcb_keysyms_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libxcb_keysyms_la-keysyms.lo -MD -MP -MF $(DEPDIR)/libxcb_keysyms_la-keysyms.Tpo -c -o libxcb_keysyms_la-keysyms.lo `test -f 'keysyms.c' || echo '$(srcdir)/'`keysyms.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libxcb_keysyms_la-keysyms.Tpo $(DEPDIR)/libxcb_keysyms_la-keysyms.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keysyms.c' object='libxcb_keysyms_la-keysyms.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxcb_keysyms_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libxcb_keysyms_la-keysyms.lo `test -f 'keysyms.c' || echo '$(srcdir)/'`keysyms.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+install-xcbincludeHEADERS: $(xcbinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xcbincludedir)" || $(MKDIR_P) "$(DESTDIR)$(xcbincludedir)"
+ @list='$(xcbinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(xcbincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xcbincludedir)/$$f'"; \
+ $(xcbincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xcbincludedir)/$$f"; \
+ done
+
+uninstall-xcbincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xcbinclude_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(xcbincludedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(xcbincludedir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xcbincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgconfigDATA install-xcbincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+ uninstall-xcbincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-pkgconfigDATA install-ps install-ps-am install-strip \
+ install-xcbincludeHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+ uninstall-xcbincludeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dist/xcb-util/keysyms/keysyms.c b/dist/xcb-util/keysyms/keysyms.c
new file mode 100644
index 000000000..c3e7f2e49
--- /dev/null
+++ b/dist/xcb-util/keysyms/keysyms.c
@@ -0,0 +1,487 @@
+/*
+ * Copyright © 2008 Ian Osgood <iano@quirkster.com>
+ * Copyright © 2008 Jamey Sharp <jamey@minilop.net>
+ * Copyright © 2008 Josh Triplett <josh@freedesktop.org>
+ * Copyright © 2008 Ulrich Eckhardt <doomster@knuut.de>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the names of the authors or
+ * their institutions shall not be used in advertising or otherwise to
+ * promote the sale, use or other dealings in this Software without
+ * prior written authorization from the authors.
+ */
+
+#include <stdlib.h>
+
+#include <xcb/xcb.h>
+#define XK_MISCELLANY
+#define XK_XKB_KEYS
+#define XK_LATIN1
+#define XK_LATIN2
+#define XK_LATIN3
+#define XK_LATIN4
+#define XK_CYRILLIC
+#define XK_GREEK
+#define XK_ARMENIAN
+#include <X11/keysymdef.h>
+
+#include "xcb_keysyms.h"
+
+/* Private declaration */
+enum tag_t {
+ TAG_COOKIE,
+ TAG_VALUE
+};
+
+struct _XCBKeySymbols
+{
+ xcb_connection_t *c;
+ enum tag_t tag;
+ union {
+ xcb_get_keyboard_mapping_cookie_t cookie;
+ xcb_get_keyboard_mapping_reply_t *reply;
+ } u;
+};
+
+static void xcb_convert_case(xcb_keysym_t sym,
+ xcb_keysym_t *lower,
+ xcb_keysym_t *upper);
+
+static void xcb_key_symbols_get_reply (xcb_key_symbols_t *syms,
+ xcb_generic_error_t **e);
+
+/* public implementation */
+
+xcb_key_symbols_t *
+xcb_key_symbols_alloc (xcb_connection_t *c)
+{
+ xcb_key_symbols_t *syms;
+ xcb_keycode_t min_keycode;
+ xcb_keycode_t max_keycode;
+
+ if (!c)
+ return NULL;
+
+ syms = malloc (sizeof (xcb_key_symbols_t));
+
+ syms->c = c;
+ syms->tag = TAG_COOKIE;
+
+ min_keycode = xcb_get_setup (c)->min_keycode;
+ max_keycode = xcb_get_setup (c)->max_keycode;
+
+ syms->u.cookie = xcb_get_keyboard_mapping(c,
+ min_keycode,
+ max_keycode - min_keycode + 1);
+
+ return syms;
+}
+
+void
+xcb_key_symbols_free (xcb_key_symbols_t *syms)
+{
+ if (syms)
+ {
+ if (syms->tag == TAG_VALUE)
+ free (syms->u.reply);
+ free (syms);
+ syms = NULL;
+ }
+}
+
+/* Use of the 'col' parameter:
+
+A list of KeySyms is associated with each KeyCode. The list is intended
+to convey the set of symbols on the corresponding key. If the list
+(ignoring trailing NoSymbol entries) is a single KeySym ``K'', then the
+list is treated as if it were the list ``K NoSymbol K NoSymbol''. If the
+list (ignoring trailing NoSymbol entries) is a pair of KeySyms ``K1
+K2'', then the list is treated as if it were the list ``K1 K2 K1 K2''.
+If the list (ignoring trailing NoSymbol entries) is a triple of KeySyms
+``K1 K2 K3'', then the list is treated as if it were the list ``K1 K2 K3
+NoSymbol''. When an explicit ``void'' element is desired in the list,
+the value VoidSymbol can be used.
+
+The first four elements of the list are split into two groups of
+KeySyms. Group 1 contains the first and second KeySyms; Group 2 contains
+the third and fourth KeySyms. Within each group, if the second element
+of the group is NoSymbol , then the group should be treated as if the
+second element were the same as the first element, except when the first
+element is an alphabetic KeySym ``K'' for which both lowercase and
+uppercase forms are defined. In that case, the group should be treated
+as if the first element were the lowercase form of ``K'' and the second
+element were the uppercase form of ``K.''
+
+The standard rules for obtaining a KeySym from a KeyPress event make use
+of only the Group 1 and Group 2 KeySyms; no interpretation of other
+KeySyms in the list is given. Which group to use is determined by the
+modifier state. Switching between groups is controlled by the KeySym
+named MODE SWITCH, by attaching that KeySym to some KeyCode and
+attaching that KeyCode to any one of the modifiers Mod1 through Mod5.
+This modifier is called the group modifier. For any KeyCode, Group 1 is
+used when the group modifier is off, and Group 2 is used when the group
+modifier is on.
+
+The Lock modifier is interpreted as CapsLock when the KeySym named
+XK_Caps_Lock is attached to some KeyCode and that KeyCode is attached to
+the Lock modifier. The Lock modifier is interpreted as ShiftLock when
+the KeySym named XK_Shift_Lock is attached to some KeyCode and that
+KeyCode is attached to the Lock modifier. If the Lock modifier could be
+interpreted as both CapsLock and ShiftLock, the CapsLock interpretation
+is used.
+
+The operation of keypad keys is controlled by the KeySym named
+XK_Num_Lock, by attaching that KeySym to some KeyCode and attaching that
+KeyCode to any one of the modifiers Mod1 through Mod5 . This modifier is
+called the numlock modifier. The standard KeySyms with the prefix
+``XK_KP_'' in their name are called keypad KeySyms; these are KeySyms
+with numeric value in the hexadecimal range 0xFF80 to 0xFFBD inclusive.
+In addition, vendor-specific KeySyms in the hexadecimal range 0x11000000
+to 0x1100FFFF are also keypad KeySyms.
+
+Within a group, the choice of KeySym is determined by applying the first
+rule that is satisfied from the following list:
+
+* The numlock modifier is on and the second KeySym is a keypad KeySym. In
+ this case, if the Shift modifier is on, or if the Lock modifier is on
+ and is interpreted as ShiftLock, then the first KeySym is used,
+ otherwise the second KeySym is used.
+
+* The Shift and Lock modifiers are both off. In this case, the first
+ KeySym is used.
+
+* The Shift modifier is off, and the Lock modifier is on and is
+ interpreted as CapsLock. In this case, the first KeySym is used, but
+ if that KeySym is lowercase alphabetic, then the corresponding
+ uppercase KeySym is used instead.
+
+* The Shift modifier is on, and the Lock modifier is on and is
+ interpreted as CapsLock. In this case, the second KeySym is used, but
+ if that KeySym is lowercase alphabetic, then the corresponding
+ uppercase KeySym is used instead.
+
+* The Shift modifier is on, or the Lock modifier is on and is
+ interpreted as ShiftLock, or both. In this case, the second KeySym is
+ used.
+
+*/
+
+xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms,
+ xcb_keycode_t keycode,
+ int col)
+{
+ xcb_keysym_t *keysyms;
+ xcb_keysym_t keysym_null = { XCB_NO_SYMBOL };
+ xcb_keysym_t lsym;
+ xcb_keysym_t usym;
+ xcb_keycode_t min_keycode;
+ xcb_keycode_t max_keycode;
+ int per;
+
+ if (!syms)
+ return keysym_null;
+
+ xcb_key_symbols_get_reply (syms, NULL);
+
+ keysyms = xcb_get_keyboard_mapping_keysyms (syms->u.reply);
+ min_keycode = xcb_get_setup (syms->c)->min_keycode;
+ max_keycode = xcb_get_setup (syms->c)->max_keycode;
+
+ per = syms->u.reply->keysyms_per_keycode;
+ if ((col < 0) || ((col >= per) && (col > 3)) ||
+ (keycode < min_keycode) ||
+ (keycode > max_keycode))
+ return keysym_null;
+
+ keysyms = &keysyms[(keycode - min_keycode) * per];
+ if (col < 4)
+ {
+ if (col > 1)
+ {
+ while ((per > 2) && (keysyms[per - 1] == XCB_NO_SYMBOL))
+ per--;
+ if (per < 3)
+ col -= 2;
+ }
+ if ((per <= (col|1)) || (keysyms[col|1] == XCB_NO_SYMBOL))
+ {
+ xcb_convert_case(keysyms[col&~1], &lsym, &usym);
+ if (!(col & 1))
+ return lsym;
+ else if (usym == lsym)
+ return keysym_null;
+ else
+ return usym;
+ }
+ }
+ return keysyms[col];
+}
+
+xcb_keycode_t *
+xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms,
+ xcb_keysym_t keysym)
+{
+ xcb_keysym_t ks;
+ int j, nresult = 0;
+ xcb_keycode_t i, min, max, *result = NULL;
+
+ if(syms)
+ {
+ xcb_key_symbols_get_reply (syms, NULL);
+ min = xcb_get_setup(syms->c)->min_keycode;
+ max = xcb_get_setup(syms->c)->max_keycode;
+
+ for(j = 0; j < syms->u.reply->keysyms_per_keycode; j++)
+ for(i = min; i && i <= max; i++)
+ {
+ ks = xcb_key_symbols_get_keysym(syms, i, j);
+ if(ks == keysym)
+ {
+ nresult++;
+ result = realloc(result, sizeof(xcb_keycode_t) * (nresult + 1));
+ result[nresult - 1] = i;
+ result[nresult] = XCB_NO_SYMBOL;
+ }
+ }
+ }
+
+ return result;
+}
+
+xcb_keysym_t
+xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms,
+ xcb_key_press_event_t *event,
+ int col)
+{
+ return xcb_key_symbols_get_keysym (syms, event->detail, col);
+}
+
+xcb_keysym_t
+xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms,
+ xcb_key_release_event_t *event,
+ int col)
+{
+ return xcb_key_symbols_get_keysym (syms, event->detail, col);
+}
+
+int
+xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms,
+ xcb_mapping_notify_event_t *event)
+{
+ if (event->request == XCB_MAPPING_KEYBOARD && syms) {
+ if (syms->tag == TAG_VALUE) {
+ xcb_keycode_t min_keycode;
+ xcb_keycode_t max_keycode;
+
+ if (syms->u.reply) {
+ free (syms->u.reply);
+ syms->u.reply = NULL;
+ }
+ syms->tag = TAG_COOKIE;
+ min_keycode = xcb_get_setup (syms->c)->min_keycode;
+ max_keycode = xcb_get_setup (syms->c)->max_keycode;
+
+ syms->u.cookie = xcb_get_keyboard_mapping(syms->c,
+ min_keycode,
+ max_keycode - min_keycode + 1);
+
+ }
+ return 1;
+ }
+ return 0;
+}
+
+
+/* Tests for classes of symbols */
+
+int
+xcb_is_keypad_key (xcb_keysym_t keysym)
+{
+ return ((keysym >= XK_KP_Space) && (keysym <= XK_KP_Equal));
+}
+
+int
+xcb_is_private_keypad_key (xcb_keysym_t keysym)
+{
+ return ((keysym >= 0x11000000) && (keysym <= 0x1100FFFF));
+}
+
+int
+xcb_is_cursor_key (xcb_keysym_t keysym)
+{
+ return ((keysym >= XK_Home) && (keysym <= XK_Select));
+}
+
+int
+xcb_is_pf_key (xcb_keysym_t keysym)
+{
+ return ((keysym >= XK_KP_F1) && (keysym <= XK_KP_F4));
+}
+
+int
+xcb_is_function_key (xcb_keysym_t keysym)
+{
+ return ((keysym >= XK_F1) && (keysym <= XK_F35));
+}
+
+int
+xcb_is_misc_function_key (xcb_keysym_t keysym)
+{
+ return ((keysym >= XK_Select) && (keysym <= XK_Break));
+}
+
+int
+xcb_is_modifier_key (xcb_keysym_t keysym)
+{
+ return (((keysym >= XK_Shift_L) && (keysym <= XK_Hyper_R)) ||
+ ((keysym >= XK_ISO_Lock) && (keysym <= XK_ISO_Last_Group_Lock)) ||
+ (keysym == XK_Mode_switch) ||
+ (keysym == XK_Num_Lock));
+}
+
+/* private functions */
+
+void
+xcb_convert_case(xcb_keysym_t sym,
+ xcb_keysym_t *lower,
+ xcb_keysym_t *upper)
+{
+ *lower = sym;
+ *upper = sym;
+
+ switch(sym >> 8)
+ {
+ case 0: /* Latin 1 */
+ if ((sym >= XK_A) && (sym <= XK_Z))
+ *lower += (XK_a - XK_A);
+ else if ((sym >= XK_a) && (sym <= XK_z))
+ *upper -= (XK_a - XK_A);
+ else if ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis))
+ *lower += (XK_agrave - XK_Agrave);
+ else if ((sym >= XK_agrave) && (sym <= XK_odiaeresis))
+ *upper -= (XK_agrave - XK_Agrave);
+ else if ((sym >= XK_Ooblique) && (sym <= XK_Thorn))
+ *lower += (XK_oslash - XK_Ooblique);
+ else if ((sym >= XK_oslash) && (sym <= XK_thorn))
+ *upper -= (XK_oslash - XK_Ooblique);
+ break;
+ case 1: /* Latin 2 */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym == XK_Aogonek)
+ *lower = XK_aogonek;
+ else if (sym >= XK_Lstroke && sym <= XK_Sacute)
+ *lower += (XK_lstroke - XK_Lstroke);
+ else if (sym >= XK_Scaron && sym <= XK_Zacute)
+ *lower += (XK_scaron - XK_Scaron);
+ else if (sym >= XK_Zcaron && sym <= XK_Zabovedot)
+ *lower += (XK_zcaron - XK_Zcaron);
+ else if (sym == XK_aogonek)
+ *upper = XK_Aogonek;
+ else if (sym >= XK_lstroke && sym <= XK_sacute)
+ *upper -= (XK_lstroke - XK_Lstroke);
+ else if (sym >= XK_scaron && sym <= XK_zacute)
+ *upper -= (XK_scaron - XK_Scaron);
+ else if (sym >= XK_zcaron && sym <= XK_zabovedot)
+ *upper -= (XK_zcaron - XK_Zcaron);
+ else if (sym >= XK_Racute && sym <= XK_Tcedilla)
+ *lower += (XK_racute - XK_Racute);
+ else if (sym >= XK_racute && sym <= XK_tcedilla)
+ *upper -= (XK_racute - XK_Racute);
+ break;
+ case 2: /* Latin 3 */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XK_Hstroke && sym <= XK_Hcircumflex)
+ *lower += (XK_hstroke - XK_Hstroke);
+ else if (sym >= XK_Gbreve && sym <= XK_Jcircumflex)
+ *lower += (XK_gbreve - XK_Gbreve);
+ else if (sym >= XK_hstroke && sym <= XK_hcircumflex)
+ *upper -= (XK_hstroke - XK_Hstroke);
+ else if (sym >= XK_gbreve && sym <= XK_jcircumflex)
+ *upper -= (XK_gbreve - XK_Gbreve);
+ else if (sym >= XK_Cabovedot && sym <= XK_Scircumflex)
+ *lower += (XK_cabovedot - XK_Cabovedot);
+ else if (sym >= XK_cabovedot && sym <= XK_scircumflex)
+ *upper -= (XK_cabovedot - XK_Cabovedot);
+ break;
+ case 3: /* Latin 4 */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XK_Rcedilla && sym <= XK_Tslash)
+ *lower += (XK_rcedilla - XK_Rcedilla);
+ else if (sym >= XK_rcedilla && sym <= XK_tslash)
+ *upper -= (XK_rcedilla - XK_Rcedilla);
+ else if (sym == XK_ENG)
+ *lower = XK_eng;
+ else if (sym == XK_eng)
+ *upper = XK_ENG;
+ else if (sym >= XK_Amacron && sym <= XK_Umacron)
+ *lower += (XK_amacron - XK_Amacron);
+ else if (sym >= XK_amacron && sym <= XK_umacron)
+ *upper -= (XK_amacron - XK_Amacron);
+ break;
+ case 6: /* Cyrillic */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XK_Serbian_DJE && sym <= XK_Serbian_DZE)
+ *lower -= (XK_Serbian_DJE - XK_Serbian_dje);
+ else if (sym >= XK_Serbian_dje && sym <= XK_Serbian_dze)
+ *upper += (XK_Serbian_DJE - XK_Serbian_dje);
+ else if (sym >= XK_Cyrillic_YU && sym <= XK_Cyrillic_HARDSIGN)
+ *lower -= (XK_Cyrillic_YU - XK_Cyrillic_yu);
+ else if (sym >= XK_Cyrillic_yu && sym <= XK_Cyrillic_hardsign)
+ *upper += (XK_Cyrillic_YU - XK_Cyrillic_yu);
+ break;
+ case 7: /* Greek */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XK_Greek_ALPHAaccent && sym <= XK_Greek_OMEGAaccent)
+ *lower += (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent);
+ else if (sym >= XK_Greek_alphaaccent && sym <= XK_Greek_omegaaccent &&
+ sym != XK_Greek_iotaaccentdieresis &&
+ sym != XK_Greek_upsilonaccentdieresis)
+ *upper -= (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent);
+ else if (sym >= XK_Greek_ALPHA && sym <= XK_Greek_OMEGA)
+ *lower += (XK_Greek_alpha - XK_Greek_ALPHA);
+ else if (sym >= XK_Greek_alpha && sym <= XK_Greek_omega &&
+ sym != XK_Greek_finalsmallsigma)
+ *upper -= (XK_Greek_alpha - XK_Greek_ALPHA);
+ break;
+ case 0x14: /* Armenian */
+ if (sym >= XK_Armenian_AYB && sym <= XK_Armenian_fe) {
+ *lower = sym | 1;
+ *upper = sym & ~1;
+ }
+ break;
+ }
+}
+
+void
+xcb_key_symbols_get_reply (xcb_key_symbols_t *syms,
+ xcb_generic_error_t **e)
+{
+ if (!syms)
+ return;
+
+ if (syms->tag == TAG_COOKIE)
+ {
+ syms->tag = TAG_VALUE;
+ syms->u.reply = xcb_get_keyboard_mapping_reply(syms->c,
+ syms->u.cookie,
+ e);
+ }
+}
diff --git a/dist/xcb-util/keysyms/xcb-keysyms.pc.in b/dist/xcb-util/keysyms/xcb-keysyms.pc.in
new file mode 100644
index 000000000..249fdc041
--- /dev/null
+++ b/dist/xcb-util/keysyms/xcb-keysyms.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XCB Keysyms library
+Description: XCB Keysyms
+Version: @PACKAGE_VERSION@
+Requires: xcb
+Libs: -L${libdir} -lxcb-keysyms @LIBS@
+Cflags: -I${includedir}
diff --git a/dist/xcb-util/keysyms/xcb_keysyms.h b/dist/xcb-util/keysyms/xcb_keysyms.h
new file mode 100644
index 000000000..9d34a50ad
--- /dev/null
+++ b/dist/xcb-util/keysyms/xcb_keysyms.h
@@ -0,0 +1,71 @@
+#ifndef __XCB_KEYSYMS_H__
+#define __XCB_KEYSYMS_H__
+
+#include <xcb/xcb.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+typedef struct _XCBKeySymbols xcb_key_symbols_t;
+
+xcb_key_symbols_t *xcb_key_symbols_alloc (xcb_connection_t *c);
+
+void xcb_key_symbols_free (xcb_key_symbols_t *syms);
+
+xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms,
+ xcb_keycode_t keycode,
+ int col);
+
+/**
+ * @brief Get the keycodes attached to a keysyms.
+ * There can be several value, so what is returned is an array of keycode
+ * terminated by XCB_NO_SYMBOL. You are responsible to free it.
+ * Be aware that this function can be slow. It will convert all
+ * combinations of all available keycodes to keysyms to find the ones that
+ * match.
+ * @param syms Key symbols.
+ * @param keysym The keysym to look for.
+ * @return A XCB_NO_SYMBOL terminated array of keycode, or NULL if nothing is found.
+ */
+xcb_keycode_t * xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms,
+ xcb_keysym_t keysym);
+
+xcb_keysym_t xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms,
+ xcb_key_press_event_t *event,
+ int col);
+
+xcb_keysym_t xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms,
+ xcb_key_release_event_t *event,
+ int col);
+
+int xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms,
+ xcb_mapping_notify_event_t *event);
+
+/* TODO: need XLookupString equivalent */
+
+/* Tests for classes of symbols */
+
+int xcb_is_keypad_key (xcb_keysym_t keysym);
+
+int xcb_is_private_keypad_key (xcb_keysym_t keysym);
+
+int xcb_is_cursor_key (xcb_keysym_t keysym);
+
+int xcb_is_pf_key (xcb_keysym_t keysym);
+
+int xcb_is_function_key (xcb_keysym_t keysym);
+
+int xcb_is_misc_function_key (xcb_keysym_t keysym);
+
+int xcb_is_modifier_key (xcb_keysym_t keysym);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_KEYSYMS_H__ */