summaryrefslogtreecommitdiff
path: root/lib/libdmx/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-09-05 09:26:48 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-09-05 09:26:48 +0000
commitba4ae4ba868d0904d05c6c41f91f863395e76953 (patch)
tree345ad93942bbbd69aa6e292b4655784e920ee07d /lib/libdmx/src
parent8bb98b2d12669a413456b6ebe28b8379840b23e2 (diff)
Remove libdmx sources.
Diffstat (limited to 'lib/libdmx/src')
-rw-r--r--lib/libdmx/src/Makefile.am19
-rw-r--r--lib/libdmx/src/Makefile.in660
-rw-r--r--lib/libdmx/src/dmx.c852
3 files changed, 0 insertions, 1531 deletions
diff --git a/lib/libdmx/src/Makefile.am b/lib/libdmx/src/Makefile.am
deleted file mode 100644
index 95f790894..000000000
--- a/lib/libdmx/src/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-lib_LTLIBRARIES = libdmx.la
-
-libdmx_la_SOURCES = \
- dmx.c
-
-libdmx_la_LIBADD = $(DMX_LIBS)
-
-libdmx_la_LDFLAGS = -version-number 1:0:0 -no-undefined
-
-AM_CFLAGS = -I$(top_srcdir)/include \
- -I$(top_srcdir)/include/X11 \
- -I$(top_srcdir)/include/X11/extensions \
- $(DMX_CFLAGS) \
- $(MALLOC_ZERO_CFLAGS) \
- $(CWARNFLAGS)
-
-libdmxincludedir = $(includedir)/X11/extensions
-libdmxinclude_HEADERS = $(top_srcdir)/include/X11/extensions/dmxext.h
-
diff --git a/lib/libdmx/src/Makefile.in b/lib/libdmx/src/Makefile.in
deleted file mode 100644
index 69babedfa..000000000
--- a/lib/libdmx/src/Makefile.in
+++ /dev/null
@@ -1,660 +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 = $(libdmxinclude_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)$(libdmxincludedir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-libdmx_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libdmx_la_OBJECTS = dmx.lo
-libdmx_la_OBJECTS = $(am_libdmx_la_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
-libdmx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libdmx_la_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-am__v_CC_1 =
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-am__v_CCLD_1 =
-SOURCES = $(libdmx_la_SOURCES)
-DIST_SOURCES = $(libdmx_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 = $(libdmxinclude_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DMX_CFLAGS = @DMX_CFLAGS@
-DMX_LIBS = @DMX_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-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@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-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@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
-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 = libdmx.la
-libdmx_la_SOURCES = \
- dmx.c
-
-libdmx_la_LIBADD = $(DMX_LIBS)
-libdmx_la_LDFLAGS = -version-number 1:0:0 -no-undefined
-AM_CFLAGS = -I$(top_srcdir)/include \
- -I$(top_srcdir)/include/X11 \
- -I$(top_srcdir)/include/X11/extensions \
- $(DMX_CFLAGS) \
- $(MALLOC_ZERO_CFLAGS) \
- $(CWARNFLAGS)
-
-libdmxincludedir = $(includedir)/X11/extensions
-libdmxinclude_HEADERS = $(top_srcdir)/include/X11/extensions/dmxext.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) --foreign src/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign 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}; \
- }
-libdmx.la: $(libdmx_la_OBJECTS) $(libdmx_la_DEPENDENCIES) $(EXTRA_libdmx_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libdmx_la_LINK) -rpath $(libdir) $(libdmx_la_OBJECTS) $(libdmx_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-libdmxincludeHEADERS: $(libdmxinclude_HEADERS)
- @$(NORMAL_INSTALL)
- @list='$(libdmxinclude_HEADERS)'; test -n "$(libdmxincludedir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(libdmxincludedir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(libdmxincludedir)" || 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)$(libdmxincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(libdmxincludedir)" || exit $$?; \
- done
-
-uninstall-libdmxincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(libdmxinclude_HEADERS)'; test -n "$(libdmxincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(libdmxincludedir)'; $(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)$(libdmxincludedir)"; 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-libdmxincludeHEADERS
-
-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-libdmxincludeHEADERS
-
-.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-libdmxincludeHEADERS \
- 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-libdmxincludeHEADERS
-
-
-# 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/libdmx/src/dmx.c b/lib/libdmx/src/dmx.c
deleted file mode 100644
index 7e1f9535e..000000000
--- a/lib/libdmx/src/dmx.c
+++ /dev/null
@@ -1,852 +0,0 @@
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * 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 on 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 (including the
- * next paragraph) 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/* THIS IS NOT AN X CONSORTIUM STANDARD */
-
-/** \file
- * This file implements the client-side part of the DMX protocol. It
- * can be included in client applications by linking with the libdmx.a
- * library. */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <X11/Xlibint.h>
-#include <X11/extensions/Xext.h>
-#define EXTENSION_PROC_ARGS void *
-#include <X11/extensions/extutil.h>
-#include <X11/extensions/dmxproto.h>
-#include <X11/extensions/dmxext.h>
-#include <limits.h>
-
-static XExtensionInfo dmx_extension_info_data;
-static XExtensionInfo *dmx_extension_info = &dmx_extension_info_data;
-static const char *dmx_extension_name = DMX_EXTENSION_NAME;
-
-#define DMXCheckExtension(dpy,i,val) \
- XextCheckExtension(dpy, i, dmx_extension_name, val)
-#define DMXSimpleCheckExtension(dpy,i) \
- XextSimpleCheckExtension(dpy, i, dmx_extension_name)
-
-/*****************************************************************************
- * *
- * private utility routines *
- * *
- *****************************************************************************/
-
-static int close_display(Display *dpy, XExtCodes *extCodes);
-static /* const */ XExtensionHooks dmx_extension_hooks = {
- NULL, /* create_gc */
- NULL, /* copy_gc */
- NULL, /* flush_gc */
- NULL, /* free_gc */
- NULL, /* create_font */
- NULL, /* free_font */
- close_display, /* close_display */
- NULL, /* wire_to_event */
- NULL, /* event_to_wire */
- NULL, /* error */
- NULL, /* error_string */
-};
-
-static XEXT_GENERATE_FIND_DISPLAY(find_display, dmx_extension_info,
- dmx_extension_name,
- &dmx_extension_hooks,
- 0, NULL)
-
-static XEXT_GENERATE_CLOSE_DISPLAY(close_display, dmx_extension_info)
-
-
-/*****************************************************************************
- * *
- * public DMX Extension routines *
- * *
- *****************************************************************************/
-
-/** If the server has the DMX extension, the event and error bases will
- * be placed in \a event_basep and \a error_basep, and True will be
- * returned. Otherwise, False will be returned.
- *
- * Available in DMX Protocol Version 1.0 */
-Bool DMXQueryExtension(Display *dpy, int *event_basep, int *error_basep)
-{
- XExtDisplayInfo *info = find_display(dpy);
-
- if (XextHasExtension(info)) {
- *event_basep = info->codes->first_event;
- *error_basep = info->codes->first_error;
- return True;
- } else {
- return False;
- }
-}
-
-/** If the DMXQueryVersion protocol request returns version information
- * from the server, \a majorVersion, \a minorVersion, and \a
- * patchVersion are filled in with the appropriate information and True
- * is returned. Otherwise, False will be returned.
- *
- * Available in DMX Protocol Version 1.0 */
-Bool DMXQueryVersion(Display *dpy,
- int *majorVersion, int *minorVersion, int *patchVersion)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXQueryVersionReply rep;
- xDMXQueryVersionReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXQueryVersion, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXQueryVersion;
- if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- *majorVersion = rep.majorVersion;
- *minorVersion = rep.minorVersion;
- *patchVersion = rep.patchVersion;
- UnlockDisplay(dpy);
- SyncHandle();
- return True;
-}
-
-/** Flush all pending dmxSync requests in DMX server.
- *
- * Available in DMX Protocol Version 1.5 */
-Bool DMXSync(Display *dpy)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXSyncReply rep;
- xDMXSyncReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXSync, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXSync;
- if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status == Success ? True : False;
-}
-
-/** The creation of the specified \a window will be forced.
- *
- * Available in DMX Protocol Version 1.2
- * Reply added in DMX Protocol Version 2.0 */
-Bool DMXForceWindowCreation(Display *dpy, Window window)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXForceWindowCreationReq *req;
- xDMXForceWindowCreationReply rep;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXForceWindowCreation, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXForceWindowCreation;
- req->window = window;
- if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status == Success ? True : False;
-}
-
-/** If the DMXGetScreenCount protocol request returns the screen count,
- * the value will be placed in \a screen_count, and True will be
- * returned. Otherwise, False will be returned.
- *
- * Available in DMX Protocol Version 1.0 */
-Bool DMXGetScreenCount(Display *dpy, int *screen_count)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetScreenCountReply rep;
- xDMXGetScreenCountReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXGetScreenCount, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXGetScreenCount;
- if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- *screen_count = rep.screenCount;
- UnlockDisplay(dpy);
- SyncHandle();
- return True;
-}
-
-/** If the DMXGetScreenAttributes protocol request returns information
- * for the specified \a physical_screen, information about the screen
- * will be placed in \a attr, and True will be returned. Otherwise,
- * False will be returned.
- *
- * Available in DMX Protocol Version 1.0; Modified in Version 2.0 */
-Bool DMXGetScreenAttributes(Display *dpy, int physical_screen,
- DMXScreenAttributes *attr)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetScreenAttributesReply rep;
- xDMXGetScreenAttributesReq *req;
- Bool ret = False;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXGetScreenAttributes, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXGetScreenAttributes;
- req->physicalScreen = physical_screen;
- if (!_XReply(dpy, (xReply *)&rep,
- (SIZEOF(xDMXGetScreenAttributesReply) - 32) >> 2, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
-
- if (rep.displayNameLength < 1024)
- attr->displayName = Xmalloc(rep.displayNameLength + 1 + 4 /* for pad */);
- else
- attr->displayName = NULL; /* name length is unbelievable, reject */
- if (attr->displayName == NULL) {
- _XEatDataWords(dpy, rep.length);
- goto end;
- }
- _XReadPad(dpy, attr->displayName, rep.displayNameLength);
- attr->displayName[rep.displayNameLength] = '\0';
- attr->logicalScreen = rep.logicalScreen;
-
- attr->screenWindowWidth = rep.screenWindowWidth;
- attr->screenWindowHeight = rep.screenWindowHeight;
- attr->screenWindowXoffset = rep.screenWindowXoffset;
- attr->screenWindowYoffset = rep.screenWindowYoffset;
-
- attr->rootWindowWidth = rep.rootWindowWidth;
- attr->rootWindowHeight = rep.rootWindowHeight;
- attr->rootWindowXoffset = rep.rootWindowXoffset;
- attr->rootWindowYoffset = rep.rootWindowYoffset;
- attr->rootWindowXorigin = rep.rootWindowXorigin;
- attr->rootWindowYorigin = rep.rootWindowYorigin;
-
- ret = True;
-
- end:
- UnlockDisplay(dpy);
- SyncHandle();
- return ret;
-}
-
-static CARD32 _DMXGetScreenAttribute(int bit, DMXScreenAttributes *attr)
-{
- switch (1 << bit) {
- case DMXScreenWindowWidth: return attr->screenWindowWidth;
- case DMXScreenWindowHeight: return attr->screenWindowHeight;
- case DMXScreenWindowXoffset: return attr->screenWindowXoffset;
- case DMXScreenWindowYoffset: return attr->screenWindowYoffset;
- case DMXRootWindowWidth: return attr->rootWindowWidth;
- case DMXRootWindowHeight: return attr->rootWindowHeight;
- case DMXRootWindowXoffset: return attr->rootWindowXoffset;
- case DMXRootWindowYoffset: return attr->rootWindowYoffset;
- case DMXRootWindowXorigin: return attr->rootWindowXorigin;
- case DMXRootWindowYorigin: return attr->rootWindowYorigin;
- default: return 0;
- }
-}
-
-static int _DMXDumpScreenAttributes(Display *dpy,
- unsigned long mask,
- DMXScreenAttributes *attr)
-{
- int i;
- unsigned long value_list[32];
- unsigned long *value = value_list;
- int count = 0;
-
- for (i = 0; i < 32; i++) {
- if (mask & (1 << i)) {
- *value++ = _DMXGetScreenAttribute(i, attr);
- ++count;
- }
- }
- Data32(dpy, value_list, count * sizeof(CARD32));
- return count;
-}
-
-static CARD32 _DMXGetInputAttribute(int bit, DMXInputAttributes *attr)
-{
- switch (1 << bit) {
- case DMXInputType:
- switch (attr->inputType) {
- case DMXLocalInputType: return 0;
- case DMXConsoleInputType: return 1;
- case DMXBackendInputType: return 2;
- }
- return attr->inputType;
- case DMXInputPhysicalScreen: return attr->physicalScreen;
- case DMXInputSendsCore: return attr->sendsCore;
- default: return 0;
- }
-}
-
-static int _DMXDumpInputAttributes(Display *dpy,
- unsigned long mask,
- DMXInputAttributes *attr)
-{
- int i;
- unsigned long value_list[32];
- unsigned long *value = value_list;
- int count = 0;
-
- for (i = 0; i < 32; i++) {
- if (mask & (1 << i)) {
- *value++ = _DMXGetInputAttribute(i, attr);
- ++count;
- }
- }
- Data32(dpy, value_list, count * sizeof(CARD32));
- return count;
-}
-
-/** Change geometries and positions of the DMX screen and root windows
- * on the back-end X server. */
-int DMXChangeScreensAttributes(Display *dpy,
- int screen_count,
- int *screens,
- int mask_count,
- unsigned int *masks,
- DMXScreenAttributes *attrs, /* vector */
- int *error_screen)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXChangeScreensAttributesReply rep;
- xDMXChangeScreensAttributesReq *req;
- int i;
- unsigned int mask = 0;
- CARD32 *screen_list;
- CARD32 *mask_list;
-
- DMXCheckExtension(dpy, info, False);
-
- if (screen_count < 1 || mask_count < 1) return DmxBadValue;
-
- LockDisplay(dpy);
- GetReq(DMXChangeScreensAttributes, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXChangeScreensAttributes;
- req->screenCount = screen_count;
- req->maskCount = mask_count;
- req->length += screen_count + mask_count;
-
- screen_list = (CARD32 *)Xmalloc(sizeof(*screen_list) * screen_count);
- for (i = 0; i < screen_count; i++) screen_list[i] = screens[i];
- Data32(dpy, screen_list, screen_count * sizeof(CARD32));
- Xfree(screen_list);
-
- mask_list = (CARD32 *)Xmalloc(sizeof(*mask_list) * mask_count);
- for (i = 0; i < mask_count; i++) mask_list[i] = masks[i];
- Data32(dpy, mask_list, mask_count * sizeof(CARD32));
- Xfree(mask_list);
-
- for (i = 0; i < screen_count; i++) {
- if (i < mask_count) mask = masks[i];
- req->length += _DMXDumpScreenAttributes(dpy, mask, attrs + i);
- }
-
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return DmxBadReply;
- }
- if (error_screen) *error_screen = rep.errorScreen;
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status;
-}
-
-/** Add a screen. */
-Bool DMXAddScreen(Display *dpy, const char *displayName, unsigned int mask,
- DMXScreenAttributes *attr, int *screen)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXAddScreenReply rep;
- xDMXAddScreenReq *req;
- int length;
- int paddedLength;
-
- if (!screen)
- return False;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXAddScreen, req);
- length = displayName ? strlen(displayName) : 0;
- paddedLength = (length + 3) & ~3;
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXAddScreen;
- req->displayNameLength = length;
- req->physicalScreen = *screen;
- req->valueMask = mask;
- req->length += paddedLength/4;
- req->length += _DMXDumpScreenAttributes(dpy, mask, attr);
-
- if (length) {
- char *buffer = Xcalloc(paddedLength, 1);
- memcpy(buffer, displayName, length);
- Data32(dpy, buffer, paddedLength);
- Xfree(buffer);
- }
-
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- if (screen) *screen = rep.physicalScreen;
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status == Success ? True : False;
-}
-
-/** Remove a screen. */
-Bool DMXRemoveScreen(Display *dpy, int screen)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXRemoveScreenReply rep;
- xDMXRemoveScreenReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXRemoveScreen, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXRemoveScreen;
- req->physicalScreen = screen;
-
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status == Success ? True : False;
-}
-
-/** If the DMXGetWindowAttributes protocol request returns information
- * about the specified \a window, the number of screens for which
- * information is available will be returned in \a screen_count and
- * information about the first \a available_count of those screens will
- * be placed in \a inf. Because this call transports a great deal of
- * information over the wire, please call #DMXGetScreenCount first, and
- * make sure \a inf is that large.
- *
- * Note that if the specified \a window has not yet been mapped when
- * #DMXGetWindowAttributes is called, then a subsequent XMapWindow call
- * might be buffered in xlib while requests directly to the back-end X
- * servers are processed. This race condition can be solved by calling
- * #DMXSync before talking directly to the back-end X servers.
- *
- * Available in DMX Protocol Version 1.0, but not working correctly
- * until DMX Protocol Version 1.4 */
-Bool DMXGetWindowAttributes(Display *dpy, Window window,
- int *screen_count, int available_count,
- DMXWindowAttributes *inf)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetWindowAttributesReply rep;
- xDMXGetWindowAttributesReq *req;
- unsigned long current;
- CARD32 *screens; /* Must match protocol size */
- CARD32 *windows; /* Must match protocol size */
- XRectangle *pos; /* Must match protocol size */
- XRectangle *vis; /* Must match protocol size */
- Bool ret = False;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXGetWindowAttributes, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXGetWindowAttributes;
- req->window = window;
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
-
- /*
- * rep.screenCount is a CARD32 so could be as large as 2^32
- * The X11 protocol limits the total screen size to 64k x 64k,
- * and no screen can be smaller than a pixel. While technically
- * that means we could theoretically reach 2^32 screens, and that's
- * not even taking overlap into account, 64k seems far larger than
- * any reasonable configuration, so we limit to that to prevent both
- * integer overflow in the size calculations, and bad X server
- * responses causing massive memory allocation.
- */
- if (rep.screenCount < 65536) {
- screens = Xmalloc(rep.screenCount * sizeof(*screens));
- windows = Xmalloc(rep.screenCount * sizeof(*windows));
- pos = Xmalloc(rep.screenCount * sizeof(*pos));
- vis = Xmalloc(rep.screenCount * sizeof(*vis));
- } else {
- screens = windows = NULL;
- pos = vis = NULL;
- }
-
- if (!screens || !windows || !pos || !vis) {
- _XEatDataWords(dpy, rep.length);
- goto end;
- }
-
- _XRead(dpy, (char *)screens, rep.screenCount * sizeof(*screens));
- _XRead(dpy, (char *)windows, rep.screenCount * sizeof(*windows));
- _XRead(dpy, (char *)pos, rep.screenCount * sizeof(*pos));
- _XRead(dpy, (char *)vis, rep.screenCount * sizeof(*vis));
-
- *screen_count = rep.screenCount;
- for (current = 0;
- current < rep.screenCount && current < (unsigned)available_count;
- current++, inf++) {
- inf->screen = screens[current];
- inf->window = windows[current];
- inf->pos = pos[current];
- inf->vis = vis[current];
- }
- ret = True;
-
- end:
- Xfree(vis);
- Xfree(pos);
- Xfree(windows);
- Xfree(screens);
-
- UnlockDisplay(dpy);
- SyncHandle();
- return ret;
-}
-
-/** If the DMXGetDesktopAttributes protocol request returns information
- * correctly, the information will be placed in \a attr, and True will
- * be returned. Otherwise, False will be returned.
- *
- * Available in DMX Protocol Version 2.0 */
-Bool DMXGetDesktopAttributes(Display *dpy, DMXDesktopAttributes *attr)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetDesktopAttributesReply rep;
- xDMXGetDesktopAttributesReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXGetDesktopAttributes, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXGetDesktopAttributes;
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- attr->width = rep.width;
- attr->height = rep.height;
- attr->shiftX = rep.shiftX;
- attr->shiftY = rep.shiftY;
-
- UnlockDisplay(dpy);
- SyncHandle();
- return True;
-}
-
-static CARD32 _DMXGetDesktopAttribute(int bit, DMXDesktopAttributes *attr)
-{
- switch (1 << bit) {
- case DMXDesktopWidth: return attr->width;
- case DMXDesktopHeight: return attr->height;
- case DMXDesktopShiftX: return attr->shiftX;
- case DMXDesktopShiftY: return attr->shiftY;
- default: return 0;
- }
-}
-
-static int _DMXDumpDesktopAttributes(Display *dpy,
- unsigned long mask,
- DMXDesktopAttributes *attr)
-{
- int i;
- unsigned long value_list[32];
- unsigned long *value = value_list;
- int count = 0;
-
- for (i = 0; i < 32; i++) {
- if (mask & (1 << i)) {
- *value++ = _DMXGetDesktopAttribute(i, attr);
- ++count;
- }
- }
- Data32(dpy, value_list, count * sizeof(CARD32));
- return count;
-}
-
-/** Change the global bounding box and origin offset.
- *
- * Available in DMX Protocol Version 2.0 */
-int DMXChangeDesktopAttributes(Display *dpy,
- unsigned int mask,
- DMXDesktopAttributes *attr)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXChangeDesktopAttributesReply rep;
- xDMXChangeDesktopAttributesReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXChangeDesktopAttributes, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXChangeDesktopAttributes;
- req->valueMask = mask;
- req->length +=_DMXDumpDesktopAttributes(dpy, mask, attr);
-
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return DmxBadReply;
- }
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status;
-}
-
-/** If the DMXGetInputCount protocol request returns the input count,
- * the value will be placed in \a input_count, and True will be
- * returned. Otherwise, False will be returned.
- *
- * Available in DMX Protocol Version 1.1 */
-Bool DMXGetInputCount(Display *dpy, int *input_count)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetInputCountReply rep;
- xDMXGetInputCountReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXGetInputCount, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXGetInputCount;
- if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- *input_count = rep.inputCount;
- UnlockDisplay(dpy);
- SyncHandle();
- return True;
-}
-
-/** If the DMXGetInputAttributes protocol request returns information
- * about the input device with the specified \a id, information about
- * the input device will be placed in \a inf, and True will be returned.
- * Otherwise, False will be returned.
- *
- * Available in DMX Protocol Version 1.1 */
-Bool DMXGetInputAttributes(Display *dpy, int id, DMXInputAttributes *inf)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXGetInputAttributesReply rep;
- xDMXGetInputAttributesReq *req;
- char *buffer;
- Bool ret = False;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXGetInputAttributes, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXGetInputAttributes;
- req->deviceId = id;
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
-
- if (rep.nameLength < 1024)
- buffer = Xmalloc(rep.nameLength + 1 + 4 /* for pad */);
- else
- buffer = NULL; /* name length is unbelievable, reject */
-
- if (buffer == NULL) {
- _XEatDataWords(dpy, rep.length);
- goto end;
- }
-
- switch (rep.inputType) {
- case 0: inf->inputType = DMXLocalInputType; break;
- case 1: inf->inputType = DMXConsoleInputType; break;
- case 2: inf->inputType = DMXBackendInputType; break;
- }
-
- inf->physicalScreen = rep.physicalScreen;
- inf->physicalId = rep.physicalId;
- inf->isCore = rep.isCore;
- inf->sendsCore = rep.sendsCore;
- inf->detached = rep.detached;
- _XReadPad(dpy, buffer, rep.nameLength);
- buffer[rep.nameLength] = '\0';
- inf->name = buffer;
- ret = True;
- end:
- UnlockDisplay(dpy);
- SyncHandle();
- return ret;
-}
-
-/** Add input. */
-Bool DMXAddInput(Display *dpy, unsigned int mask, DMXInputAttributes *attr,
- int *id)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXAddInputReply rep;
- xDMXAddInputReq *req;
- int length;
- int paddedLength;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXAddInput, req);
- length = attr->name ? strlen(attr->name) : 0;
- paddedLength = (length + 3) & ~3;
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXAddInput;
- req->displayNameLength = length;
- req->valueMask = mask;
- req->length += paddedLength/4;
- req->length += _DMXDumpInputAttributes(dpy, mask, attr);
-
- if (length) {
- char *buffer = Xcalloc(paddedLength, 1);
- memcpy(buffer, attr->name, paddedLength);
- Data32(dpy, buffer, paddedLength);
- Xfree(buffer);
- }
-
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- if (id) *id = rep.physicalId;
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status == Success ? True : False;
-}
-
-/** Add backend input (a helper function that calls #DMXAddInput). */
-Bool DMXAddBackendInput(Display *dpy, int screen, int sendsCore, int *newId)
-{
- DMXInputAttributes attr;
- unsigned int mask = (DMXInputType
- | DMXInputPhysicalScreen
- | DMXInputSendsCore);
-
- attr.inputType = DMXBackendInputType;
- attr.physicalScreen = screen;
- attr.sendsCore = sendsCore;
- attr.name = NULL;
- return DMXAddInput(dpy, mask, &attr, newId);
-}
-
-/** Add console input (a helper function that calls #DMXAddInput). */
-Bool DMXAddConsoleInput(Display *dpy, const char *name, int sendsCore,
- int *newId)
-{
- DMXInputAttributes attr;
- unsigned int mask = (DMXInputType
- | DMXInputSendsCore);
-
- attr.inputType = DMXConsoleInputType;
- attr.physicalScreen = 0;
- attr.sendsCore = sendsCore;
- attr.name = name;
- return DMXAddInput(dpy, mask, &attr, newId);
-}
-
-/** Remove an input. */
-Bool DMXRemoveInput(Display *dpy, int id)
-{
- XExtDisplayInfo *info = find_display(dpy);
- xDMXRemoveInputReply rep;
- xDMXRemoveInputReq *req;
-
- DMXCheckExtension(dpy, info, False);
-
- LockDisplay(dpy);
- GetReq(DMXRemoveInput, req);
- req->reqType = info->codes->major_opcode;
- req->dmxReqType = X_DMXRemoveInput;
- req->physicalId = id;
-
- if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return False;
- }
- UnlockDisplay(dpy);
- SyncHandle();
- return rep.status == Success ? True : False;
-}