summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libxkbui/include/X11/extensions/XKBui.h194
-rw-r--r--lib/libxkbui/src/Makefile.am17
-rw-r--r--lib/libxkbui/src/Makefile.in610
-rw-r--r--lib/libxkbui/src/XKBui.c663
-rw-r--r--lib/libxkbui/src/XKBuiPriv.h71
5 files changed, 0 insertions, 1555 deletions
diff --git a/lib/libxkbui/include/X11/extensions/XKBui.h b/lib/libxkbui/include/X11/extensions/XKBui.h
deleted file mode 100644
index 36c66df59..000000000
--- a/lib/libxkbui/include/X11/extensions/XKBui.h
+++ /dev/null
@@ -1,194 +0,0 @@
-#ifndef XKBUI_H
-#define XKBUI_H 1
-/* $XConsortium: XKBui.h /main/2 1995/12/07 21:18:19 kaleb $ */
-/************************************************************
- Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-/* $XFree86$ */
-
-#include <X11/Xlib.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBgeom.h>
-
-typedef struct _XkbUI_View *XkbUI_ViewPtr;
-
-typedef struct _XkbUI_ViewOpts {
- unsigned int present;
- unsigned int fg;
- unsigned int bg;
- unsigned int label_mode;
- unsigned int color_mode;
- XRectangle viewport;
- unsigned int margin_width;
- unsigned int margin_height;
- Colormap cmap;
-} XkbUI_ViewOptsRec,*XkbUI_ViewOptsPtr;
-
- /*
- * legal values for present field of a view options
- */
-#define XkbUI_BackgroundMask (1<<0)
-#define XkbUI_ForegroundMask (1<<1)
-#define XkbUI_LabelModeMask (1<<2)
-#define XkbUI_ColorModeMask (1<<3)
-#define XkbUI_WidthMask (1<<4)
-#define XkbUI_HeightMask (1<<5)
-#define XkbUI_XOffsetMask (1<<6)
-#define XkbUI_YOffsetMask (1<<7)
-#define XkbUI_ColormapMask (1<<8)
-#define XkbUI_MarginWidthMask (1<<9)
-#define XkbUI_MarginHeightMask (1<<10)
-
-#define XkbUI_SizeMask (XkbUI_WidthMask|XkbUI_HeightMask)
-#define XkbUI_OffsetMask (XkbUI_XOffsetMask|XkbUI_YOffsetMask)
-#define XkbUI_MarginMask (XkbUI_MarginWidthMask|XkbUI_MarginHeightMask)
-#define XkbUI_AllViewOptsMask (0x7ff)
-
- /*
- * legal values for the label_mode of a view options
- */
-#define XkbUI_NoLabels 0
-#define XkbUI_KeyCodes 1
-#define XkbUI_KeyNames 2
-#define XkbUI_StateSyms 3
-#define XkbUI_MultiSyms 4
-
-typedef struct _XkbUI_Select {
- unsigned type;
- XkbSectionPtr section;
- XkbKeyPtr key;
- XkbDoodadPtr doodad;
-} XkbUI_SelectRec,*XkbUI_SelectPtr;
-
- /*
- * legal values for 'type' field of a selection report
- */
-
-#define XkbUI_Keys 0
-#define XkbUI_Indicators 1
-#define XkbUI_TextLabels 2
-#define XkbUI_SolidShapes 3
-#define XkbUI_Outlines 4
-#define XkbUI_Logos 5
-#define XkbUI_Sections 6
-
- /*
- * legal values for 'which' field of a select call
- */
-#define XkbUI_KeysMask (1<<0)
-#define XkbUI_IndicatorsMask (1<<1)
-#define XkbUI_TextLabelsMask (1<<2)
-#define XkbUI_SolidShapesMask (1<<3)
-#define XkbUI_OutlinesMask (1<<4)
-#define XkbUI_LogosMask (1<<5)
-#define XkbUI_SectionsMask (1<<6)
-
- /*
- * legal values for key appearance flag
- */
-#define XkbUI_KeyDown (1<<0)
-#define XkbUI_Highlight (1<<1)
-
-_XFUNCPROTOBEGIN
-
-extern XkbUI_ViewPtr XkbUI_SimpleInit(
- Display * /* dpy */,
- Window /* win */,
- int /* width */,
- int /* height */
-);
-
-extern XkbUI_ViewPtr XkbUI_Init(
- Display * /* dpy */,
- Window /* win */,
- int /* width */,
- int /* height */,
- XkbDescPtr /* xkb */,
- XkbUI_ViewOptsPtr /* view */
-);
-
-extern Status XkbUI_SetViewOpts(
- XkbUI_ViewPtr /* view */,
- XkbUI_ViewOptsPtr /* opts */
-);
-
-extern Status XbUI_GetViewOpts(
- XkbUI_ViewPtr /* view */,
- XkbUI_ViewOptsPtr /* opts_rtrn */
-);
-
-extern Status XkbUI_SetCanvasSize(
- XkbUI_ViewPtr /* view */,
- int /* width */,
- int /* height */
-);
-
-extern Status XkbUI_GetCanvasSize(
- XkbUI_ViewPtr /* view */,
- int * /* width_rtrn */,
- int * /* height_rtrn */
-);
-
-extern Bool XkbUI_SetKeyAppearance(
- XkbUI_ViewPtr /* view */,
- KeyCode /* kc */,
- unsigned /* flags */
-);
-
-extern Bool XkbUI_SetKeyAppearanceByName(
- XkbUI_ViewPtr /* view */,
- XkbKeyNamePtr /* name */,
- unsigned /* flags */
-);
-
-extern Bool XkbUI_ResetKeyAppearance(
- XkbUI_ViewPtr /* view */,
- unsigned int /* mask */,
- unsigned int /* values */
-);
-
-extern Bool XkbUI_DrawRegion(
- XkbUI_ViewPtr /* view */,
- XRectangle * /* viewport */
-);
-
-extern Bool XkbUI_DrawChanged(
- XkbUI_ViewPtr /* view */,
- XRectangle * /* viewport */,
- XkbChangesPtr /* changes */,
- int /* num_keys */,
- XkbKeyNamePtr /* keys */
-);
-
-extern Bool XkbUI_Select(
- XkbUI_ViewPtr /* view */,
- XPoint * /* coord */,
- unsigned int /* which */,
- XkbSectionPtr /* section */
-);
-
-_XFUNCPROTOEND
-
-#endif /* XKBUI_H */
diff --git a/lib/libxkbui/src/Makefile.am b/lib/libxkbui/src/Makefile.am
deleted file mode 100644
index f51a0d795..000000000
--- a/lib/libxkbui/src/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-lib_LTLIBRARIES = libxkbui.la
-
-libxkbui_la_SOURCES = \
- XKBui.c \
- XKBuiPriv.h
-
-INCLUDES = -I$(top_srcdir)/include/X11/extensions
-
-AM_CFLAGS = @XKBUI_CFLAGS@
-
-libxkbui_la_LIBADD = @XKBUI_LIBS@
-
-libxkbui_la_LDFLAGS = -version-number 1:0:0 -no-undefined
-
-libxkbuiincludedir = $(includedir)/X11/extensions
-libxkbuiinclude_HEADERS = \
- $(top_srcdir)/include/X11/extensions/XKBui.h
diff --git a/lib/libxkbui/src/Makefile.in b/lib/libxkbui/src/Makefile.in
deleted file mode 100644
index 4c3cf71cc..000000000
--- a/lib/libxkbui/src/Makefile.in
+++ /dev/null
@@ -1,610 +0,0 @@
-# Makefile.in generated by automake 1.12.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 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@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@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 = src
-DIST_COMMON = $(libxkbuiinclude_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-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_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
-am__installdirs = "$(DESTDIR)$(libdir)" \
- "$(DESTDIR)$(libxkbuiincludedir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libxkbui_la_DEPENDENCIES =
-am_libxkbui_la_OBJECTS = XKBui.lo
-libxkbui_la_OBJECTS = $(am_libxkbui_la_OBJECTS)
-libxkbui_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libxkbui_la_LDFLAGS) $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-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 = $(libxkbui_la_SOURCES)
-DIST_SOURCES = $(libxkbui_la_SOURCES)
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(libxkbuiinclude_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@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-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@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-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_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XKBUI_CFLAGS = @XKBUI_CFLAGS@
-XKBUI_LIBS = @XKBUI_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-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@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-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@
-lib_LTLIBRARIES = libxkbui.la
-libxkbui_la_SOURCES = \
- XKBui.c \
- XKBuiPriv.h
-
-INCLUDES = -I$(top_srcdir)/include/X11/extensions
-AM_CFLAGS = @XKBUI_CFLAGS@
-libxkbui_la_LIBADD = @XKBUI_LIBS@
-libxkbui_la_LDFLAGS = -version-number 1:0:0 -no-undefined
-libxkbuiincludedir = $(includedir)/X11/extensions
-libxkbuiinclude_HEADERS = \
- $(top_srcdir)/include/X11/extensions/XKBui.h
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu src/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- }
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-libxkbui.la: $(libxkbui_la_OBJECTS) $(libxkbui_la_DEPENDENCIES) $(EXTRA_libxkbui_la_DEPENDENCIES)
- $(libxkbui_la_LINK) -rpath $(libdir) $(libxkbui_la_OBJECTS) $(libxkbui_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XKBui.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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 $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-libxkbuiincludeHEADERS: $(libxkbuiinclude_HEADERS)
- @$(NORMAL_INSTALL)
- @list='$(libxkbuiinclude_HEADERS)'; test -n "$(libxkbuiincludedir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(libxkbuiincludedir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(libxkbuiincludedir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libxkbuiincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(libxkbuiincludedir)" || exit $$?; \
- done
-
-uninstall-libxkbuiincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(libxkbuiinclude_HEADERS)'; test -n "$(libxkbuiincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(libxkbuiincludedir)'; $(am__uninstall_files_from_dir)
-
-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)
- set x; \
- 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; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- 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)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-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 "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$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) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libxkbuiincludedir)"; 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:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-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
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-libxkbuiincludeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-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-libxkbuiincludeHEADERS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool cscopelist 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-libxkbuiincludeHEADERS \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip 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-libxkbuiincludeHEADERS
-
-
-# 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/lib/libxkbui/src/XKBui.c b/lib/libxkbui/src/XKBui.c
deleted file mode 100644
index 381bec143..000000000
--- a/lib/libxkbui/src/XKBui.c
+++ /dev/null
@@ -1,663 +0,0 @@
-/* $XConsortium: XKBui.c /main/2 1995/12/07 21:18:19 kaleb $ */
-/************************************************************
- Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-/* $XFree86: xc/lib/xkbui/XKBui.c,v 3.6 1999/06/20 07:14:08 dawes Exp $ */
-
-#include <X11/Xos.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#if defined(SVR4) && defined(i386) && !defined(_XOPEN_SOURCE)
-# define _XOPEN_SOURCE
-# include <math.h>
-# undef _XOPEN_SOURCE
-#else
-# include <math.h>
-#endif /* _XOPEN_SOURCE */
-
-#include <X11/Xfuncs.h>
-#include "XKBuiPriv.h"
-#include <X11/extensions/XKBfile.h>
-
-#ifndef M_PI
-# define M_PI 3.141592653589793238462
-#endif
-
-static XkbUI_ViewOptsRec dfltOpts = {
- XkbUI_AllViewOptsMask /* present */,
- 1 /* fg */,
- 0 /* bg */,
- XkbUI_KeyNames /* label_mode */,
- 0 /* color_mode */,
- {
- 0 /* viewport.x */,
- 0 /* viewport.y */,
- 640 /* viewport.width */,
- 480 /* viewport.height */
- },
- 10, 10, /* margin_width, margin_height */
- None
-};
-
-XkbUI_ViewPtr
-XkbUI_SimpleInit(Display *dpy,Window win,int width,int height)
-{
-XkbDescPtr xkb;
-
- if ((!dpy)||(win==None)||(width<1)||(height<1))
- return NULL;
- xkb= XkbGetKeyboard(dpy,XkbGBN_AllComponentsMask,XkbUseCoreKbd);
- if (!xkb)
- return NULL;
- return XkbUI_Init(dpy,win,width,height,xkb,NULL);
-}
-
-static void
-_XkbUI_AllocateColors(XkbUI_ViewPtr view)
-{
-register int i;
-Display * dpy;
-XColor sdef,xdef;
-XkbDescPtr xkb;
-
- dpy= view->dpy;
- xkb= view->xkb;
- if (view->opts.cmap==None)
- view->opts.cmap= DefaultColormap(dpy,DefaultScreen(dpy));
- for (i=0;i<xkb->geom->num_colors;i++) {
- char *spec;
- Bool found;
-
- spec= xkb->geom->colors[i].spec;
- found= False;
- if (XAllocNamedColor(view->dpy,view->opts.cmap,spec,&sdef,&xdef)) {
- xkb->geom->colors[i].pixel= sdef.pixel;
-#ifdef DEBUG
- fprintf(stderr,"got pixel %d for \"%s\"\n",sdef.pixel,spec);
-#endif
- found= True;
- }
- if ((!found)&&(XkbLookupCanonicalRGBColor(spec,&sdef))) {
- char buf[20];
- sprintf(buf,"#%02x%02x%02x",(sdef.red>>8)&0xff,
- (sdef.green>>8)&0xff,
- (sdef.blue>>8)&&0xff);
- if (XAllocNamedColor(view->dpy,view->opts.cmap,buf,&sdef,&xdef)) {
- xkb->geom->colors[i].pixel= sdef.pixel;
-#ifdef DEBUG
- fprintf(stderr,"got pixel %d for \"%s\"\n",sdef.pixel,spec);
-#endif
- found= True;
- }
- }
- if (!found) {
- xkb->geom->colors[i].pixel= view->opts.fg;
- fprintf(stderr,"Couldn't allocate color \"%s\"\n",spec);
- }
- }
- return;
-}
-
-XkbUI_ViewPtr
-XkbUI_Init( Display * dpy,
- Window win,
- int width,
- int height,
- XkbDescPtr xkb,
- XkbUI_ViewOptsPtr opts)
-{
-XGCValues xgcv;
-XkbUI_ViewPtr view;
-int scrn;
-
- if ((!dpy)||(!xkb)||(!xkb->geom)||(win==None)||(width<1)||(height<1))
- return NULL;
- view= _XkbTypedCalloc(1,XkbUI_ViewRec);
- if (!view)
- return NULL;
- scrn= DefaultScreen(dpy);
- view->dpy= dpy;
- view->xkb= xkb;
- view->win= win;
- view->opts= dfltOpts;
- view->opts.fg= WhitePixel(dpy,scrn);
- view->opts.bg= BlackPixel(dpy,scrn);
- view->opts.viewport.x= 0;
- view->opts.viewport.y= 0;
- view->opts.viewport.width= width;
- view->opts.viewport.height= height;
- if ((opts)&&(opts->present)) {
- if (opts->present&XkbUI_BackgroundMask)
- view->opts.bg= opts->bg;
- if (opts->present&XkbUI_ForegroundMask)
- view->opts.fg= opts->fg;
- if (opts->present&XkbUI_LabelModeMask)
- view->opts.label_mode= opts->label_mode;
- if (opts->present&XkbUI_ColorModeMask)
- view->opts.color_mode= opts->color_mode;
- if (opts->present&XkbUI_WidthMask)
- view->opts.viewport.width= opts->viewport.width;
- if (opts->present&XkbUI_HeightMask)
- view->opts.viewport.height= opts->viewport.height;
- if (opts->present&XkbUI_XOffsetMask)
- view->opts.viewport.x= opts->viewport.x;
- if (opts->present&XkbUI_YOffsetMask)
- view->opts.viewport.y= opts->viewport.y;
- if (opts->present&XkbUI_MarginWidthMask)
- view->opts.margin_width= opts->margin_width;
- if (opts->present&XkbUI_MarginHeightMask)
- view->opts.margin_height= opts->margin_height;
- if (opts->present&XkbUI_ColormapMask)
- view->opts.cmap= opts->cmap;
- }
- view->canvas_width= width+(2*view->opts.margin_width);
- view->canvas_height= height+(2*view->opts.margin_height);
- if (view->opts.viewport.width>view->canvas_width) {
- int tmp;
- tmp= (view->opts.viewport.width-view->canvas_width)/2;
- view->opts.margin_width+= tmp;
- }
- if (view->opts.viewport.height>view->canvas_height) {
- int tmp;
- tmp= (view->opts.viewport.height-view->canvas_height)/2;
- view->opts.margin_height+= tmp;
- }
- bzero(view->state,XkbMaxLegalKeyCode+1);
-
- xgcv.foreground= view->opts.fg;
- xgcv.background= view->opts.bg;
- view->gc= XCreateGC(view->dpy,view->win,GCForeground|GCBackground,&xgcv);
- view->xscale= ((double)width)/((double)xkb->geom->width_mm);
- view->yscale= ((double)height)/((double)xkb->geom->height_mm);
-
- _XkbUI_AllocateColors(view);
- return view;
-}
-
-Status
-XkbUI_SetViewOpts(XkbUI_ViewPtr view,XkbUI_ViewOptsPtr opts)
-{
- if ((!view)||(!opts))
- return BadValue;
- if (opts->present==0)
- return Success;
- if (opts->present&XkbUI_BackgroundMask)
- view->opts.bg= opts->bg;
- if (opts->present&XkbUI_ForegroundMask)
- view->opts.fg= opts->fg;
- if (opts->present&XkbUI_LabelModeMask)
- view->opts.label_mode= opts->label_mode;
- if (opts->present&XkbUI_ColorModeMask)
- view->opts.color_mode= opts->color_mode;
- if (opts->present&XkbUI_WidthMask)
- view->opts.viewport.width= opts->viewport.width;
- if (opts->present&XkbUI_HeightMask)
- view->opts.viewport.height= opts->viewport.height;
- if (opts->present&XkbUI_XOffsetMask)
- view->opts.viewport.x= opts->viewport.x;
- if (opts->present&XkbUI_YOffsetMask)
- view->opts.viewport.y= opts->viewport.y;
- if (opts->present&XkbUI_MarginWidthMask)
- view->opts.margin_width= opts->margin_width;
- if (opts->present&XkbUI_MarginHeightMask)
- view->opts.margin_height= opts->margin_height;
- if (opts->present&XkbUI_ColormapMask) {
- view->opts.cmap= opts->cmap;
- _XkbUI_AllocateColors(view);
- }
- return Success;
-}
-
-Status
-XbUI_GetViewOpts(XkbUI_ViewPtr view,XkbUI_ViewOptsPtr opts_rtrn)
-{
- if ((!view)||(!opts_rtrn))
- return BadValue;
- *opts_rtrn= view->opts;
- return Success;
-}
-
-Status
-XkbUI_SetCanvasSize(XkbUI_ViewPtr view,int width,int height)
-{
- if ((!view)||(!view->xkb)||(!view->xkb->geom))
- return BadValue;
- view->canvas_width= width;
- view->canvas_height= height;
- view->xscale= ((double)width)/((double)view->xkb->geom->width_mm);
- view->yscale= ((double)height)/((double)view->xkb->geom->height_mm);
- return Success;
-}
-
-Status
-XkbUI_GetCanvasSize(XkbUI_ViewPtr view,int *width_rtrn,int *height_rtrn)
-{
- if (!view)
- return BadValue;
- if (width_rtrn) *width_rtrn= view->canvas_width;
- if (height_rtrn) *height_rtrn= view->canvas_height;
- return Success;
-}
-
-/***====================================================================***/
-
-static void
-_RotatePoints( double rangle,
- int corner_x,
- int corner_y,
- int nPts,
- XkbUI_PointPtr pts)
-{
-register int i;
-double rr,rx,ry,rt;
-
- for (i=0;i<nPts;i++,pts++) {
- rx= pts->x-corner_x; ry= pts->y-corner_y; /* translate */
- rr= hypot(rx,ry);
- rt= atan2(ry,rx)+rangle;
- rx= rr*cos(rt);
- ry= rr*sin(rt);
- pts->x= rx+corner_x; pts->y= ry+corner_y;
- }
- return;
-}
-
-static void
-_DrawPoints(XkbUI_ViewPtr view,int nPts,XkbUI_PointPtr pts,XPoint *xpts)
-{
-register int i;
-
- for (i=0;i<nPts;i++) {
- if (pts[i].x>=0.0) xpts[i].x= pts[i].x*view->xscale+0.5;
- else xpts[i].x= pts[i].x*view->xscale-0.5;
- xpts[i].x+= view->opts.viewport.x;
- if (pts[i].y>=0.0) xpts[i].y= pts[i].y*view->yscale+0.5;
- else xpts[i].x= pts[i].y*view->yscale-0.5;
- xpts[i].y+= view->opts.viewport.y;
- }
- if ((xpts[nPts-1].x!=xpts[0].x)||(xpts[nPts-1].y!=xpts[0].y))
- xpts[nPts++]= xpts[0]; /* close the shape, if necessary */
- XDrawLines(view->dpy,view->win,view->gc,xpts,nPts,CoordModeOrigin);
-XFlush(view->dpy);
- return;
-}
-
-static void
-_DrawSolidPoints(XkbUI_ViewPtr view,int nPts,XkbUI_PointPtr pts,XPoint *xpts)
-{
-register int i;
-
- for (i=0;i<nPts;i++) {
- if (pts[i].x>=0.0) xpts[i].x= pts[i].x*view->xscale+0.5;
- else xpts[i].x= pts[i].x*view->xscale-0.5;
- xpts[i].x+= view->opts.viewport.x;
- if (pts[i].y>=0.0) xpts[i].y= pts[i].y*view->yscale+0.5;
- else xpts[i].x= pts[i].y*view->yscale-0.5;
- xpts[i].y+= view->opts.viewport.y;
- }
- if ((xpts[nPts-1].x!=xpts[0].x)||(xpts[nPts-1].y!=xpts[0].y))
- xpts[nPts++]= xpts[0]; /* close the shape, if necessary */
- XFillPolygon(view->dpy,view->win,view->gc,xpts,nPts,Nonconvex,
- CoordModeOrigin);
-XFlush(view->dpy);
- return;
-}
-
-static void
-_DrawShape( XkbUI_ViewPtr view,
- double rangle,
- int xoff,
- int yoff,
- int rotx,
- int roty,
- XkbShapePtr shape,
- Bool key)
-{
-XkbOutlinePtr ol;
-register int o;
-int maxPts;
-XkbUI_PointPtr uipts;
-XPoint * xpts;
-
- for (maxPts=4,o=0,ol=shape->outlines;o<shape->num_outlines;o++,ol++) {
- if ((shape->num_outlines>1)&&(ol==shape->approx))
- continue;
- if (ol->num_points>maxPts)
- maxPts= ol->num_points;
- }
- uipts= _XkbTypedCalloc(maxPts,XkbUI_PointRec);
- xpts= _XkbTypedCalloc(maxPts+1,XPoint);
- XSetForeground(view->dpy,view->gc,view->xkb->geom->label_color->pixel);
- for (o=0,ol=shape->outlines;o<shape->num_outlines;o++,ol++) {
- XkbPointPtr gpts;
- register int p;
- if ((shape->num_outlines>1)&&(ol==shape->approx))
- continue;
- gpts= ol->points;
- if (ol->num_points==1) {
- uipts[0].x= xoff; uipts[0].y= yoff;
- uipts[1].x= xoff+gpts[0].x; uipts[1].y= yoff;
- uipts[2].x= xoff+gpts[0].x; uipts[2].y= yoff+gpts[0].y;
- uipts[3].x= xoff; uipts[3].y= yoff+gpts[0].y;
- p= 4;
- }
- else if (ol->num_points==2) {
- uipts[0].x= xoff+gpts[0].x; uipts[0].y= yoff+gpts[0].y;
- uipts[1].x= xoff+gpts[1].x; uipts[1].y= yoff+gpts[0].y;
- uipts[2].x= xoff+gpts[1].x; uipts[2].y= yoff+gpts[1].y;
- uipts[3].x= xoff+gpts[0].x; uipts[3].y= yoff+gpts[1].y;
- p= 4;
- }
- else {
- for (p=0;p<ol->num_points;p++) {
- uipts[p].x= xoff+gpts[p].x;
- uipts[p].y= yoff+gpts[p].y;
- }
- p= ol->num_points;
- }
- if (rangle!=0.0)
- _RotatePoints(rangle,rotx,roty,p,uipts);
- if (key) {
- if (o==0) {
- XSetForeground(view->dpy,view->gc,
- view->xkb->geom->base_color->pixel);
- _DrawSolidPoints(view,p,uipts,xpts);
- XSetForeground(view->dpy,view->gc,
- view->xkb->geom->label_color->pixel);
- }
- _DrawPoints(view,p,uipts,xpts);
- }
- else {
- _DrawPoints(view,p,uipts,xpts);
- }
- }
- _XkbFree(uipts);
- _XkbFree(xpts);
- return;
-}
-
-static void
-_DrawRect( XkbUI_ViewPtr view,
- double rangle,
- int x1,
- int y1,
- int x2,
- int y2,
- Bool key)
-{
-XkbUI_PointRec uipts[4];
-XPoint xpts[4];
-
- XSetForeground(view->dpy,view->gc,view->xkb->geom->label_color->pixel);
- uipts[0].x= x1; uipts[0].y= y1;
- uipts[1].x= x2; uipts[1].y= y1;
- uipts[2].x= x2; uipts[2].y= y2;
- uipts[3].x= x1; uipts[3].y= y2;
- if (rangle!=0.0)
- _RotatePoints(rangle,0,0,4,uipts);
- if (key) {
- XSetForeground(view->dpy,view->gc,view->xkb->geom->base_color->pixel);
- _DrawSolidPoints(view,4,uipts,xpts);
- XSetForeground(view->dpy,view->gc,view->xkb->geom->label_color->pixel);
- _DrawPoints(view,4,uipts,xpts);
- }
- else {
- _DrawPoints(view,4,uipts,xpts);
- }
- return;
-}
-
-static void
-_DrawDoodad( XkbUI_ViewPtr view,
- double rangle,
- int xoff,
- int yoff,
- XkbDoodadPtr doodad)
-{
-int x;
-int y;
-XkbShapePtr shape;
-Bool solid;
-
- x= doodad->any.left+xoff;
- y= doodad->any.top+yoff;
- shape= NULL;
- solid= False;
- switch (doodad->any.type) {
- case XkbOutlineDoodad:
- shape= XkbShapeDoodadShape(view->xkb->geom,(&doodad->shape));
- break;
- case XkbSolidDoodad:
- shape= XkbShapeDoodadShape(view->xkb->geom,(&doodad->shape));
- solid= True;
- break;
- case XkbTextDoodad:
- break;
- case XkbIndicatorDoodad:
- shape= XkbIndicatorDoodadShape(view->xkb->geom,&doodad->indicator);
- solid= True;
- break;
- case XkbLogoDoodad:
- shape= XkbLogoDoodadShape(view->xkb->geom,&doodad->logo);
- solid= True;
- break;
- }
- if (shape)
- _DrawShape(view,rangle,x,y,x,y,shape,solid);
- return;
-}
-
-static void
-_DrawRow( XkbUI_ViewPtr view,
- double rangle,
- int xoff,
- int yoff,
- XkbRowPtr row)
-{
-register int k,x,y;
-XkbKeyPtr key;
-
- x= xoff+row->left; y= yoff+row->top;
- for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
- XkbShapePtr shape;
- shape= XkbKeyShape(view->xkb->geom,key);
- if (row->vertical) {
- y+= key->gap;
- _DrawShape(view,rangle,x,y,xoff,yoff,shape,True);
- y+= shape->bounds.y2;
- }
- else {
- x+= key->gap;
- _DrawShape(view,rangle,x,y,xoff,yoff,shape,True);
- x+= shape->bounds.x2;
- }
- }
- return;
-}
-
-static void
-_DrawSection(XkbUI_ViewPtr view,XkbSectionPtr section)
-{
-double rangle;
-
- rangle= ((((double)(section->angle%3600))/3600.0)*(2.0*M_PI));
- if (section->doodads) {
- XkbDrawablePtr first,draw;
- first= XkbGetOrderedDrawables(NULL,section);
- if (first) {
- for (draw=first;draw!=NULL;draw=draw->next) {
- _DrawDoodad(view,rangle,section->left,section->top,draw->u.doodad);
- }
- XkbFreeOrderedDrawables(first);
- }
- }
- if (section->rows) {
- register int r;
- XkbRowPtr row;
- for (r=0,row=section->rows;r<section->num_rows;r++,row++) {
- _DrawRow(view,rangle,section->left,section->top,row);
- }
- }
- return;
-}
-
-static void
-_DrawAll(XkbUI_ViewPtr view)
-{
-XkbGeometryPtr geom;
-XkbDrawablePtr first,draw;
-Bool dfltBorder;
-
- geom= view->xkb->geom;
- first= XkbGetOrderedDrawables(geom,NULL);
- if (first) {
- dfltBorder= True;
- for (draw=first;draw!=NULL;draw=draw->next) {
- char *name;
- if ((draw->type!=XkbDW_Doodad)||
- ((draw->u.doodad->any.type!=XkbOutlineDoodad)&&
- (draw->u.doodad->any.type!=XkbSolidDoodad))) {
- continue;
- }
- name= XkbAtomGetString(view->dpy,draw->u.doodad->any.name);
- if (name != NULL) {
- if (strcmp(name, "edges") == 0) {
- _XkbFree(name);
- dfltBorder= False;
- break;
- }
- _XkbFree(name);
- }
- }
- if (dfltBorder)
- _DrawRect(view,0.0,0,0,geom->width_mm,geom->height_mm,True);
- for (draw=first;draw!=NULL;draw=draw->next) {
- switch (draw->type) {
- case XkbDW_Section:
- _DrawSection(view,draw->u.section);
- break;
- case XkbDW_Doodad:
- _DrawDoodad(view,0.0,0,0,draw->u.doodad);
- break;
- }
- }
- XkbFreeOrderedDrawables(first);
- }
- XFlush(view->dpy);
- return;
-}
-
-static void
-_RedrawKey(XkbUI_ViewPtr view,KeyCode kc)
-{
-/* _DrawAll(view);*/
- return;
-}
-
-/***====================================================================***/
-
-Bool
-XkbUI_SetKeyAppearance(XkbUI_ViewPtr view,KeyCode kc,unsigned int flags)
-{
-XkbDescPtr xkb;
-unsigned old;
-
- if ((!view)||(!view->xkb))
- return False;
- xkb= view->xkb;
- if ((kc<xkb->min_key_code)||(kc>xkb->max_key_code))
- return False;
- old= view->state[kc];
- view->state[kc]= (flags&(~XkbUI_Obscured));
- if (old&XkbUI_Obscured)
- view->state[kc]|= XkbUI_Obscured;
- else if (old!=view->state[kc])
- _RedrawKey(view,kc);
- return True;
-}
-
-Bool
-XkbUI_SetKeyAppearanceByName( XkbUI_ViewPtr view,
- XkbKeyNamePtr name,
- unsigned int flags)
-{
-KeyCode kc;
-
- if ((!view)||(!view->xkb)||(!name))
- return False;
- kc= XkbFindKeycodeByName(view->xkb,name->name,True);
- if (!kc)
- return False;
- return XkbUI_SetKeyAppearance(view,kc,flags);
-}
-
-Bool
-XkbUI_ResetKeyAppearance( XkbUI_ViewPtr view,
- unsigned int mask,
- unsigned int values)
-{
-register int i;
-unsigned new_val;
-
- if ((!view)||(!view->xkb))
- return False;
- if (!mask)
- return True;
- for (i=view->xkb->min_key_code;i<=view->xkb->max_key_code;i++) {
- new_val= (view->state[i]&(~mask));
- new_val|= (mask&values);
- XkbUI_SetKeyAppearance(view,i,new_val);
- }
- return True;
-}
-
-Bool
-XkbUI_DrawRegion(XkbUI_ViewPtr view,XRectangle *viewport)
-{
- if (!view)
- return False;
- _DrawAll(view);
- return True;
-}
-
-Bool
-XkbUI_DrawChanged( XkbUI_ViewPtr view,
- XRectangle * viewport,
- XkbChangesPtr changes,
- int num_keys,
- XkbKeyNamePtr keys)
-{
- return False;
-}
-
-Bool
-XkbUI_Select( XkbUI_ViewPtr view,
- XPoint * coord,
- unsigned int which,
- XkbSectionPtr section)
-{
- return False;
-}
diff --git a/lib/libxkbui/src/XKBuiPriv.h b/lib/libxkbui/src/XKBuiPriv.h
deleted file mode 100644
index c78b08e5c..000000000
--- a/lib/libxkbui/src/XKBuiPriv.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef XKBUIPRIV_H
-#define XKBUIPRIV_H 1
-/* $XConsortium: XKBuiPriv.h /main/2 1995/12/07 21:18:19 kaleb $ */
-/************************************************************
- Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-
-#include "XKBui.h"
-
-typedef struct _XkbUI_Point {
- double x;
- double y;
-} XkbUI_PointRec,*XkbUI_PointPtr;
-
-typedef struct _XkbUI_View {
- Display * dpy;
- XkbDescPtr xkb;
- Window win;
- GC gc;
- XkbUI_ViewOptsRec opts;
- unsigned int canvas_width;
- unsigned int canvas_height;
- unsigned char state[XkbMaxLegalKeyCode];
-
- double xscale;
- double yscale;
-} XkbUI_ViewRec;
-
-#define _XkbAlloc(s) malloc((s))
-#define _XkbCalloc(n,s) calloc((n),(s))
-#define _XkbRealloc(o,s) realloc((o),(s))
-#define _XkbTypedAlloc(t) ((t *)malloc(sizeof(t)))
-#define _XkbTypedCalloc(n,t) ((t *)calloc((n),sizeof(t)))
-#define _XkbTypedRealloc(o,n,t) \
- ((o)?(t *)realloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
-#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
-#define _XkbFree(p) free(p)
-
- /*
- * private values for key appearance flags
- * must not conflict with values from XKBui.h
- */
-#define XkbUI_Obscured (1<<7)
-
-_XFUNCPROTOBEGIN
-
-_XFUNCPROTOEND
-
-#endif /* XKBUIPRIV_H */