From 1d59691fe77c20ecb010ea8589a940c4ea6ac356 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 2 Apr 2010 12:30:48 +0000 Subject: Updated to following packages: pixman-0.18.0 xorg-server-1.8.0 --- xorg-server/hw/dmx/examples/Makefile.am | 8 +- xorg-server/hw/dmx/examples/Makefile.in | 78 ++++++----- xorg-server/hw/dmx/examples/dmxinfo.c | 239 ++++++++++++++++++++++++++++++++ xorg-server/hw/dmx/examples/xdmx.c | 239 -------------------------------- 4 files changed, 283 insertions(+), 281 deletions(-) create mode 100644 xorg-server/hw/dmx/examples/dmxinfo.c delete mode 100644 xorg-server/hw/dmx/examples/xdmx.c (limited to 'xorg-server/hw/dmx/examples') diff --git a/xorg-server/hw/dmx/examples/Makefile.am b/xorg-server/hw/dmx/examples/Makefile.am index d814339fc..229bb57fc 100644 --- a/xorg-server/hw/dmx/examples/Makefile.am +++ b/xorg-server/hw/dmx/examples/Makefile.am @@ -4,14 +4,14 @@ EV_PROG = ev endif bin_PROGRAMS = \ - xdmx dmxwininfo dmxreconfig dmxresize \ + dmxinfo dmxwininfo dmxreconfig dmxresize \ dmxaddscreen dmxrmscreen \ dmxaddinput dmxrminput noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG) -xdmx_SOURCES = xdmx.c -xdmx_LDADD = @DMXEXAMPLES_DEP_LIBS@ -xdmx_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxinfo_SOURCES = dmxinfo.c +dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@ +dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ dmxwininfo_SOURCES = dmxwininfo.c dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@ diff --git a/xorg-server/hw/dmx/examples/Makefile.in b/xorg-server/hw/dmx/examples/Makefile.in index b97173c09..1ff61a70d 100644 --- a/xorg-server/hw/dmx/examples/Makefile.in +++ b/xorg-server/hw/dmx/examples/Makefile.in @@ -34,9 +34,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = xdmx$(EXEEXT) dmxwininfo$(EXEEXT) dmxreconfig$(EXEEXT) \ - dmxresize$(EXEEXT) dmxaddscreen$(EXEEXT) dmxrmscreen$(EXEEXT) \ - dmxaddinput$(EXEEXT) dmxrminput$(EXEEXT) +bin_PROGRAMS = dmxinfo$(EXEEXT) dmxwininfo$(EXEEXT) \ + dmxreconfig$(EXEEXT) dmxresize$(EXEEXT) dmxaddscreen$(EXEEXT) \ + dmxrmscreen$(EXEEXT) dmxaddinput$(EXEEXT) dmxrminput$(EXEEXT) noinst_PROGRAMS = xinput$(EXEEXT) xtest$(EXEEXT) evi$(EXEEXT) \ res$(EXEEXT) xled$(EXEEXT) xbell$(EXEEXT) $(am__EXEEXT_1) subdir = hw/dmx/examples @@ -78,6 +78,12 @@ dmxaddscreen_DEPENDENCIES = dmxaddscreen_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxaddscreen_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_dmxinfo_OBJECTS = dmxinfo-dmxinfo.$(OBJEXT) +dmxinfo_OBJECTS = $(am_dmxinfo_OBJECTS) +dmxinfo_DEPENDENCIES = +dmxinfo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxinfo_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_dmxreconfig_OBJECTS = dmxreconfig-dmxreconfig.$(OBJEXT) dmxreconfig_OBJECTS = $(am_dmxreconfig_OBJECTS) dmxreconfig_DEPENDENCIES = @@ -132,12 +138,6 @@ xbell_DEPENDENCIES = xbell_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xbell_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_xdmx_OBJECTS = xdmx-xdmx.$(OBJEXT) -xdmx_OBJECTS = $(am_xdmx_OBJECTS) -xdmx_DEPENDENCIES = -xdmx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xdmx_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_xinput_OBJECTS = xinput-xinput.$(OBJEXT) xinput_OBJECTS = $(am_xinput_OBJECTS) xinput_DEPENDENCIES = @@ -179,17 +179,17 @@ AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(dmxaddinput_SOURCES) $(dmxaddscreen_SOURCES) \ - $(dmxreconfig_SOURCES) $(dmxresize_SOURCES) \ + $(dmxinfo_SOURCES) $(dmxreconfig_SOURCES) $(dmxresize_SOURCES) \ $(dmxrminput_SOURCES) $(dmxrmscreen_SOURCES) \ $(dmxwininfo_SOURCES) $(ev_SOURCES) $(evi_SOURCES) \ - $(res_SOURCES) $(xbell_SOURCES) $(xdmx_SOURCES) \ - $(xinput_SOURCES) $(xled_SOURCES) $(xtest_SOURCES) + $(res_SOURCES) $(xbell_SOURCES) $(xinput_SOURCES) \ + $(xled_SOURCES) $(xtest_SOURCES) DIST_SOURCES = $(dmxaddinput_SOURCES) $(dmxaddscreen_SOURCES) \ - $(dmxreconfig_SOURCES) $(dmxresize_SOURCES) \ + $(dmxinfo_SOURCES) $(dmxreconfig_SOURCES) $(dmxresize_SOURCES) \ $(dmxrminput_SOURCES) $(dmxrmscreen_SOURCES) \ $(dmxwininfo_SOURCES) $(ev_SOURCES) $(evi_SOURCES) \ - $(res_SOURCES) $(xbell_SOURCES) $(xdmx_SOURCES) \ - $(xinput_SOURCES) $(xled_SOURCES) $(xtest_SOURCES) + $(res_SOURCES) $(xbell_SOURCES) $(xinput_SOURCES) \ + $(xled_SOURCES) $(xtest_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -204,6 +204,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -391,6 +392,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ @@ -500,9 +502,9 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Requires @DMX_BUILD_USB_TRUE@EV_PROG = ev -xdmx_SOURCES = xdmx.c -xdmx_LDADD = @DMXEXAMPLES_DEP_LIBS@ -xdmx_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxinfo_SOURCES = dmxinfo.c +dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@ +dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ dmxwininfo_SOURCES = dmxwininfo.c dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@ dmxwininfo_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ @@ -637,6 +639,9 @@ dmxaddinput$(EXEEXT): $(dmxaddinput_OBJECTS) $(dmxaddinput_DEPENDENCIES) dmxaddscreen$(EXEEXT): $(dmxaddscreen_OBJECTS) $(dmxaddscreen_DEPENDENCIES) @rm -f dmxaddscreen$(EXEEXT) $(AM_V_CCLD)$(dmxaddscreen_LINK) $(dmxaddscreen_OBJECTS) $(dmxaddscreen_LDADD) $(LIBS) +dmxinfo$(EXEEXT): $(dmxinfo_OBJECTS) $(dmxinfo_DEPENDENCIES) + @rm -f dmxinfo$(EXEEXT) + $(AM_V_CCLD)$(dmxinfo_LINK) $(dmxinfo_OBJECTS) $(dmxinfo_LDADD) $(LIBS) dmxreconfig$(EXEEXT): $(dmxreconfig_OBJECTS) $(dmxreconfig_DEPENDENCIES) @rm -f dmxreconfig$(EXEEXT) $(AM_V_CCLD)$(dmxreconfig_LINK) $(dmxreconfig_OBJECTS) $(dmxreconfig_LDADD) $(LIBS) @@ -664,9 +669,6 @@ res$(EXEEXT): $(res_OBJECTS) $(res_DEPENDENCIES) xbell$(EXEEXT): $(xbell_OBJECTS) $(xbell_DEPENDENCIES) @rm -f xbell$(EXEEXT) $(AM_V_CCLD)$(xbell_LINK) $(xbell_OBJECTS) $(xbell_LDADD) $(LIBS) -xdmx$(EXEEXT): $(xdmx_OBJECTS) $(xdmx_DEPENDENCIES) - @rm -f xdmx$(EXEEXT) - $(AM_V_CCLD)$(xdmx_LINK) $(xdmx_OBJECTS) $(xdmx_LDADD) $(LIBS) xinput$(EXEEXT): $(xinput_OBJECTS) $(xinput_DEPENDENCIES) @rm -f xinput$(EXEEXT) $(AM_V_CCLD)$(xinput_LINK) $(xinput_OBJECTS) $(xinput_LDADD) $(LIBS) @@ -685,6 +687,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxaddinput-dmxaddinput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxaddscreen-dmxaddscreen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinfo-dmxinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxreconfig-dmxreconfig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxresize-dmxresize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxrminput-dmxrminput.Po@am__quote@ @@ -694,7 +697,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evi-evi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/res-res.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xbell-xbell.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmx-xdmx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xinput-xinput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xled-xled.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest-xtest.Po@am__quote@ @@ -755,6 +757,22 @@ dmxaddscreen-dmxaddscreen.obj: dmxaddscreen.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddscreen_CFLAGS) $(CFLAGS) -c -o dmxaddscreen-dmxaddscreen.obj `if test -f 'dmxaddscreen.c'; then $(CYGPATH_W) 'dmxaddscreen.c'; else $(CYGPATH_W) '$(srcdir)/dmxaddscreen.c'; fi` +dmxinfo-dmxinfo.o: dmxinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -MT dmxinfo-dmxinfo.o -MD -MP -MF $(DEPDIR)/dmxinfo-dmxinfo.Tpo -c -o dmxinfo-dmxinfo.o `test -f 'dmxinfo.c' || echo '$(srcdir)/'`dmxinfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dmxinfo-dmxinfo.Tpo $(DEPDIR)/dmxinfo-dmxinfo.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmxinfo.c' object='dmxinfo-dmxinfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -c -o dmxinfo-dmxinfo.o `test -f 'dmxinfo.c' || echo '$(srcdir)/'`dmxinfo.c + +dmxinfo-dmxinfo.obj: dmxinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -MT dmxinfo-dmxinfo.obj -MD -MP -MF $(DEPDIR)/dmxinfo-dmxinfo.Tpo -c -o dmxinfo-dmxinfo.obj `if test -f 'dmxinfo.c'; then $(CYGPATH_W) 'dmxinfo.c'; else $(CYGPATH_W) '$(srcdir)/dmxinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dmxinfo-dmxinfo.Tpo $(DEPDIR)/dmxinfo-dmxinfo.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmxinfo.c' object='dmxinfo-dmxinfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -c -o dmxinfo-dmxinfo.obj `if test -f 'dmxinfo.c'; then $(CYGPATH_W) 'dmxinfo.c'; else $(CYGPATH_W) '$(srcdir)/dmxinfo.c'; fi` + dmxreconfig-dmxreconfig.o: dmxreconfig.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxreconfig_CFLAGS) $(CFLAGS) -MT dmxreconfig-dmxreconfig.o -MD -MP -MF $(DEPDIR)/dmxreconfig-dmxreconfig.Tpo -c -o dmxreconfig-dmxreconfig.o `test -f 'dmxreconfig.c' || echo '$(srcdir)/'`dmxreconfig.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dmxreconfig-dmxreconfig.Tpo $(DEPDIR)/dmxreconfig-dmxreconfig.Po @@ -899,22 +917,6 @@ xbell-xbell.obj: xbell.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xbell_CFLAGS) $(CFLAGS) -c -o xbell-xbell.obj `if test -f 'xbell.c'; then $(CYGPATH_W) 'xbell.c'; else $(CYGPATH_W) '$(srcdir)/xbell.c'; fi` -xdmx-xdmx.o: xdmx.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmx_CFLAGS) $(CFLAGS) -MT xdmx-xdmx.o -MD -MP -MF $(DEPDIR)/xdmx-xdmx.Tpo -c -o xdmx-xdmx.o `test -f 'xdmx.c' || echo '$(srcdir)/'`xdmx.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmx-xdmx.Tpo $(DEPDIR)/xdmx-xdmx.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdmx.c' object='xdmx-xdmx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmx_CFLAGS) $(CFLAGS) -c -o xdmx-xdmx.o `test -f 'xdmx.c' || echo '$(srcdir)/'`xdmx.c - -xdmx-xdmx.obj: xdmx.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmx_CFLAGS) $(CFLAGS) -MT xdmx-xdmx.obj -MD -MP -MF $(DEPDIR)/xdmx-xdmx.Tpo -c -o xdmx-xdmx.obj `if test -f 'xdmx.c'; then $(CYGPATH_W) 'xdmx.c'; else $(CYGPATH_W) '$(srcdir)/xdmx.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmx-xdmx.Tpo $(DEPDIR)/xdmx-xdmx.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdmx.c' object='xdmx-xdmx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmx_CFLAGS) $(CFLAGS) -c -o xdmx-xdmx.obj `if test -f 'xdmx.c'; then $(CYGPATH_W) 'xdmx.c'; else $(CYGPATH_W) '$(srcdir)/xdmx.c'; fi` - xinput-xinput.o: xinput.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xinput_CFLAGS) $(CFLAGS) -MT xinput-xinput.o -MD -MP -MF $(DEPDIR)/xinput-xinput.Tpo -c -o xinput-xinput.o `test -f 'xinput.c' || echo '$(srcdir)/'`xinput.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xinput-xinput.Tpo $(DEPDIR)/xinput-xinput.Po diff --git a/xorg-server/hw/dmx/examples/dmxinfo.c b/xorg-server/hw/dmx/examples/dmxinfo.c new file mode 100644 index 000000000..dedce6e8d --- /dev/null +++ b/xorg-server/hw/dmx/examples/dmxinfo.c @@ -0,0 +1,239 @@ +/* + * Copyright 2001,2002 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 + * + */ + +#include +#include +#include +#include + +static void indent(int level) +{ + int i; + for (i = 0; i < level; i++) printf(" "); +} + +static void print_window_id(const char *displayName, Display *display, + Window window, int level, int child) +{ + char *name; + + if (!XFetchName(display, window, &name)) name = NULL; + indent(level); + if (child) printf("(%d) ", child); + printf("%s window 0x%08lx: %s%s\n", + displayName, + (long unsigned)window, + name ? name : "", + (window == DefaultRootWindow(display)) + ? " (DMX root window)" : ""); + if (name) XFree(name); +} + +static void print_info(Display *display, Window window, int level, int child) +{ + DMXWindowAttributes winfo[128]; + int count; + int i; + + if (!DMXGetWindowAttributes(display, window, &count, 128, winfo)) { + printf("Could not get window information for 0x%08lx\n", + (long unsigned)window); + exit(-2); + } + printf("\n"); + print_window_id("DMX", display, window, level, child); + for (i = 0; i < count; i++) { + DMXScreenAttributes sinfo; + Display *backend; + + /* This could also be cached -- the information doesn't change. */ + if (!DMXGetScreenAttributes(display, winfo[i].screen, &sinfo)) { + printf("Could not get screen information for screen %d\n", i); + exit(-2); + } + if (!(backend = XOpenDisplay(sinfo.displayName))) { + printf("Cannot open backend display %s\n", sinfo.displayName); + exit(-2); + } + XCloseDisplay(backend); + + indent(level+1); + printf("%s window 0x%08lx: %dx%d%+d%+d", + sinfo.displayName, + (long unsigned)winfo[i].window, + winfo[i].pos.width, winfo[i].pos.height, + winfo[i].pos.x, winfo[i].pos.y); + if (!winfo[i].vis.width + && !winfo[i].vis.height + && !winfo[i].vis.x + && !winfo[i].vis.y) printf(" not visible\n"); + else if (winfo[i].vis.width == winfo[i].pos.width + && winfo[i].vis.height == winfo[i].pos.height) { + printf( " %+d%+d\n", winfo[i].vis.x, winfo[i].vis.y); + } else { + printf( " %dx%d%+d%+d\n", + winfo[i].vis.width, winfo[i].vis.height, + winfo[i].vis.x, winfo[i].vis.y); + } + } +} + +static void print_tree(Display *display, Window window, int level, int child) +{ + Window root, parent; + Window *list; + unsigned int count; + unsigned int i; + + print_info(display, window, level, child); + + if (!XQueryTree(display, window, &root, &parent, &list, &count)) { + printf("Cannot query window tree for 0x%08lx\n", + (long unsigned)window); + exit(-3); + } + + if (count) { + indent(level+1); + printf("%d child%s:\n", count, count > 1 ? "ren" : ""); + for (i = 0; i < count; i++) { + print_tree(display, list[i], level+1, i+1); + } + } +} + +static const char *core(DMXInputAttributes *iinfo) +{ + if (iinfo->isCore) return "core"; + else if (iinfo->sendsCore) return "extension (sends core)"; + else return "extension"; +} + +int main(int argc, char **argv) +{ + Display *display = NULL; + Window window = 0; + int event_base; + int error_base; + int major_version, minor_version, patch_version; + DMXScreenAttributes sinfo; + DMXInputAttributes iinfo; + int count; + int i; + + if (argc == 2 || argc == 3) { + if (!(display = XOpenDisplay(argv[1]))) { + printf("Cannot open display %s\n", argv[1]); + return -1; + } + if (argc == 3) window = strtol(argv[2], NULL, 0); + } else { + printf("Usage: %s display [windowid]\n", argv[0]); + return -1; + } + + if (!display && !(display = XOpenDisplay(NULL))) { + printf("Cannot open default display\n"); + return -1; + } + + if (!DMXQueryExtension(display, &event_base, &error_base)) { + printf("DMX extension not present\n"); + return -1; + } + printf("DMX extension present: event_base = %d, error_base = %d\n", + event_base, error_base); + + if (!DMXQueryVersion(display, + &major_version, &minor_version, &patch_version)) { + printf("Could not get extension version\n"); + return -1; + } + printf("Extension version: %d.%d patch %d\n", + major_version, minor_version, patch_version); + + if (!DMXGetScreenCount(display, &count)) { + printf("Could not get screen count\n"); + return -1; + } + printf("Screen count = %d\n", count); + + for (i = 0; i < count; i++) { + if (!DMXGetScreenAttributes(display, i, &sinfo)) { + printf("Could not get screen information for %d\n", i); + return -1; + } + printf("%d: %s %ux%u+%d+%d %d @%dx%d (root: %dx%d%+d%+d)\n", + i, sinfo.displayName, + sinfo.screenWindowWidth, sinfo.screenWindowHeight, + sinfo.screenWindowXoffset, sinfo.screenWindowYoffset, + sinfo.logicalScreen, + sinfo.rootWindowXorigin, sinfo.rootWindowYorigin, + sinfo.rootWindowWidth, sinfo.rootWindowHeight, + sinfo.rootWindowXoffset, sinfo.rootWindowYoffset); + } + + if (major_version == 1 && minor_version >= 1) { + if (!DMXGetInputCount(display, &count)) { + printf("Could not get input count\n"); + return -1; + } + printf("Input count = %d\n", count); + for (i = 0; i < count; i++) { + if (!DMXGetInputAttributes(display, i, &iinfo)) { + printf("Could not get input information for id %d\n", i); + return -1; + } + switch (iinfo.inputType) { + case DMXLocalInputType: + printf(" %2d local %-20.20s %s\n", i, "", core(&iinfo)); + break; + case DMXConsoleInputType: + printf(" %2d console %-20.20s %s\n", + i, iinfo.name, core(&iinfo)); + break; + case DMXBackendInputType: + printf(" %2d backend %-20.20s id=%2d screen=%2d %s\n", + i, iinfo.name, iinfo.physicalId, iinfo.physicalScreen, + core(&iinfo)); + break; + } + } + } + + if (window) print_info(display, window, 0, 0); + else print_tree(display, DefaultRootWindow(display), 0, 0); + + XCloseDisplay(display); + return 0; +} diff --git a/xorg-server/hw/dmx/examples/xdmx.c b/xorg-server/hw/dmx/examples/xdmx.c deleted file mode 100644 index dedce6e8d..000000000 --- a/xorg-server/hw/dmx/examples/xdmx.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright 2001,2002 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 - * - */ - -#include -#include -#include -#include - -static void indent(int level) -{ - int i; - for (i = 0; i < level; i++) printf(" "); -} - -static void print_window_id(const char *displayName, Display *display, - Window window, int level, int child) -{ - char *name; - - if (!XFetchName(display, window, &name)) name = NULL; - indent(level); - if (child) printf("(%d) ", child); - printf("%s window 0x%08lx: %s%s\n", - displayName, - (long unsigned)window, - name ? name : "", - (window == DefaultRootWindow(display)) - ? " (DMX root window)" : ""); - if (name) XFree(name); -} - -static void print_info(Display *display, Window window, int level, int child) -{ - DMXWindowAttributes winfo[128]; - int count; - int i; - - if (!DMXGetWindowAttributes(display, window, &count, 128, winfo)) { - printf("Could not get window information for 0x%08lx\n", - (long unsigned)window); - exit(-2); - } - printf("\n"); - print_window_id("DMX", display, window, level, child); - for (i = 0; i < count; i++) { - DMXScreenAttributes sinfo; - Display *backend; - - /* This could also be cached -- the information doesn't change. */ - if (!DMXGetScreenAttributes(display, winfo[i].screen, &sinfo)) { - printf("Could not get screen information for screen %d\n", i); - exit(-2); - } - if (!(backend = XOpenDisplay(sinfo.displayName))) { - printf("Cannot open backend display %s\n", sinfo.displayName); - exit(-2); - } - XCloseDisplay(backend); - - indent(level+1); - printf("%s window 0x%08lx: %dx%d%+d%+d", - sinfo.displayName, - (long unsigned)winfo[i].window, - winfo[i].pos.width, winfo[i].pos.height, - winfo[i].pos.x, winfo[i].pos.y); - if (!winfo[i].vis.width - && !winfo[i].vis.height - && !winfo[i].vis.x - && !winfo[i].vis.y) printf(" not visible\n"); - else if (winfo[i].vis.width == winfo[i].pos.width - && winfo[i].vis.height == winfo[i].pos.height) { - printf( " %+d%+d\n", winfo[i].vis.x, winfo[i].vis.y); - } else { - printf( " %dx%d%+d%+d\n", - winfo[i].vis.width, winfo[i].vis.height, - winfo[i].vis.x, winfo[i].vis.y); - } - } -} - -static void print_tree(Display *display, Window window, int level, int child) -{ - Window root, parent; - Window *list; - unsigned int count; - unsigned int i; - - print_info(display, window, level, child); - - if (!XQueryTree(display, window, &root, &parent, &list, &count)) { - printf("Cannot query window tree for 0x%08lx\n", - (long unsigned)window); - exit(-3); - } - - if (count) { - indent(level+1); - printf("%d child%s:\n", count, count > 1 ? "ren" : ""); - for (i = 0; i < count; i++) { - print_tree(display, list[i], level+1, i+1); - } - } -} - -static const char *core(DMXInputAttributes *iinfo) -{ - if (iinfo->isCore) return "core"; - else if (iinfo->sendsCore) return "extension (sends core)"; - else return "extension"; -} - -int main(int argc, char **argv) -{ - Display *display = NULL; - Window window = 0; - int event_base; - int error_base; - int major_version, minor_version, patch_version; - DMXScreenAttributes sinfo; - DMXInputAttributes iinfo; - int count; - int i; - - if (argc == 2 || argc == 3) { - if (!(display = XOpenDisplay(argv[1]))) { - printf("Cannot open display %s\n", argv[1]); - return -1; - } - if (argc == 3) window = strtol(argv[2], NULL, 0); - } else { - printf("Usage: %s display [windowid]\n", argv[0]); - return -1; - } - - if (!display && !(display = XOpenDisplay(NULL))) { - printf("Cannot open default display\n"); - return -1; - } - - if (!DMXQueryExtension(display, &event_base, &error_base)) { - printf("DMX extension not present\n"); - return -1; - } - printf("DMX extension present: event_base = %d, error_base = %d\n", - event_base, error_base); - - if (!DMXQueryVersion(display, - &major_version, &minor_version, &patch_version)) { - printf("Could not get extension version\n"); - return -1; - } - printf("Extension version: %d.%d patch %d\n", - major_version, minor_version, patch_version); - - if (!DMXGetScreenCount(display, &count)) { - printf("Could not get screen count\n"); - return -1; - } - printf("Screen count = %d\n", count); - - for (i = 0; i < count; i++) { - if (!DMXGetScreenAttributes(display, i, &sinfo)) { - printf("Could not get screen information for %d\n", i); - return -1; - } - printf("%d: %s %ux%u+%d+%d %d @%dx%d (root: %dx%d%+d%+d)\n", - i, sinfo.displayName, - sinfo.screenWindowWidth, sinfo.screenWindowHeight, - sinfo.screenWindowXoffset, sinfo.screenWindowYoffset, - sinfo.logicalScreen, - sinfo.rootWindowXorigin, sinfo.rootWindowYorigin, - sinfo.rootWindowWidth, sinfo.rootWindowHeight, - sinfo.rootWindowXoffset, sinfo.rootWindowYoffset); - } - - if (major_version == 1 && minor_version >= 1) { - if (!DMXGetInputCount(display, &count)) { - printf("Could not get input count\n"); - return -1; - } - printf("Input count = %d\n", count); - for (i = 0; i < count; i++) { - if (!DMXGetInputAttributes(display, i, &iinfo)) { - printf("Could not get input information for id %d\n", i); - return -1; - } - switch (iinfo.inputType) { - case DMXLocalInputType: - printf(" %2d local %-20.20s %s\n", i, "", core(&iinfo)); - break; - case DMXConsoleInputType: - printf(" %2d console %-20.20s %s\n", - i, iinfo.name, core(&iinfo)); - break; - case DMXBackendInputType: - printf(" %2d backend %-20.20s id=%2d screen=%2d %s\n", - i, iinfo.name, iinfo.physicalId, iinfo.physicalScreen, - core(&iinfo)); - break; - } - } - } - - if (window) print_info(display, window, 0, 0); - else print_tree(display, DefaultRootWindow(display), 0, 0); - - XCloseDisplay(display); - return 0; -} -- cgit v1.2.3