diff -Nru wayland-0.95.0/Makefile.am wayland-1.0.0/Makefile.am --- wayland-0.95.0/Makefile.am 2012-05-22 19:20:13.000000000 +0000 +++ wayland-1.0.0/Makefile.am 2012-10-16 00:51:00.000000000 +0000 @@ -1,4 +1,8 @@ -SUBDIRS = src protocol doc tests cursor +if BUILD_DOCS +doc_subdir = doc +endif + +SUBDIRS = src protocol $(doc_subdir) tests cursor ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} diff -Nru wayland-0.95.0/Makefile.in wayland-1.0.0/Makefile.in --- wayland-0.95.0/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/Makefile.in 2012-10-22 18:55:22.000000000 +0000 @@ -126,7 +126,7 @@ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = src protocol doc tests cursor DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -184,6 +184,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -295,7 +296,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = src protocol doc tests cursor +@BUILD_DOCS_TRUE@doc_subdir = doc +SUBDIRS = src protocol $(doc_subdir) tests cursor ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} aclocaldir = $(datadir)/aclocal aclocal_DATA = wayland-scanner.m4 wayland-scanner.mk diff -Nru wayland-0.95.0/TODO wayland-1.0.0/TODO --- wayland-0.95.0/TODO 2012-07-22 19:50:26.000000000 +0000 +++ wayland-1.0.0/TODO 2012-10-22 00:50:58.000000000 +0000 @@ -1,24 +1,9 @@ Core wayland protocol - - Atomicity. Currently a lot of the atomicity in Wayland relies on - how we batch up all requests in a protocol buffer and only flushes - in the "blockhandler" in the client. Consensus was that we need - something more reliable and explicit. The suggestion is that we - make surface.attach a synchronization point such that everything - before that is batched and applied atomically when the - surface.attach request comes in. For cases where we need atomicity - beyond a surface.attach, we can add an atomic grouping mechanism, - that can group together multiple surface.attach requests into a - bigger atomic change. To be researched a bit. - - Maybe try to make remote wayland actually happen, to see if there is something in the protocol/architecture that makes it harder than it should be. - - Add timestamp to touch_cancel, add touch id to touch_cancel (?) - - - The output protocol needs to send all the ugly timing details for the modes. - ICCCM - mime-type guidelines for data_source (ie, both dnd and selection): @@ -53,8 +38,6 @@ EGL/gbm - - Don't wl_display_iterate in eglSwapBuffer, send an eventfd fd? - - Land Robert Braggs EGL extensions: frame age, swap with damage - Make it possible to share buffers from compositor to clients. @@ -71,6 +54,7 @@ allocate a scanout buffer now" event to the fullscreen-to-be client. + Misc - glyph cache @@ -101,6 +85,7 @@ switching away from. for minimized windows that we don't want live thumb nails for. etc. + Clients and ports - port gtk+ @@ -120,8 +105,6 @@ - SDL port, bnf has work in progress here: http://cgit.freedesktop.org/~bnf/sdl-wayland/ - - libva + eglimage + kms integration - Ideas diff -Nru wayland-0.95.0/configure wayland-1.0.0/configure --- wayland-0.95.0/configure 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/configure 2012-10-22 18:55:23.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for wayland 0.95.0. +# Generated by GNU Autoconf 2.69 for wayland 1.0.0. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='wayland' PACKAGE_TARNAME='wayland' -PACKAGE_VERSION='0.95.0' -PACKAGE_STRING='wayland 0.95.0' +PACKAGE_VERSION='1.0.0' +PACKAGE_STRING='wayland 1.0.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=wayland' PACKAGE_URL='http://wayland.freedesktop.org/' @@ -639,6 +639,9 @@ HAVE_PUBLICAN_FALSE HAVE_PUBLICAN_TRUE PUBLICAN +DOXYGEN +BUILD_DOCS_FALSE +BUILD_DOCS_TRUE HAVE_XSLTPROC_FALSE HAVE_XSLTPROC_TRUE XSLTPROC @@ -1339,7 +1342,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures wayland 0.95.0 to adapt to many kinds of systems. +\`configure' configures wayland 1.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1409,7 +1412,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of wayland 0.95.0:";; + short | recursive ) echo "Configuration of wayland 1.0.0:";; esac cat <<\_ACEOF @@ -1426,7 +1429,7 @@ --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --disable-scanner Disable compilation of wayland-scannner + --disable-scanner Disable compilation of wayland-scanner --disable-documentation Disable building the documentation Optional Packages: @@ -1524,7 +1527,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -wayland configure 0.95.0 +wayland configure 1.0.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1893,7 +1896,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by wayland $as_me 0.95.0, which was +It was created by wayland $as_me 1.0.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2242,13 +2245,13 @@ -WAYLAND_VERSION_MAJOR=0 +WAYLAND_VERSION_MAJOR=1 -WAYLAND_VERSION_MINOR=95 +WAYLAND_VERSION_MINOR=0 WAYLAND_VERSION_MICRO=0 -WAYLAND_VERSION=0.95.0 +WAYLAND_VERSION=1.0.0 ac_config_headers="$ac_config_headers config.h" @@ -2722,7 +2725,7 @@ # Define the identity of the package. PACKAGE='wayland' - VERSION='0.95.0' + VERSION='1.0.0' cat >>confdefs.h <<_ACEOF @@ -11758,7 +11761,60 @@ fi + if test x$enable_documentation = xyes; then + BUILD_DOCS_TRUE= + BUILD_DOCS_FALSE='#' +else + BUILD_DOCS_TRUE='#' + BUILD_DOCS_FALSE= +fi + if test "x$enable_documentation" = "xyes"; then + # Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "x$DOXYGEN" = "x"; then + as_fn_error $? "Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation" "$LINENO" 5 + fi + # Extract the first word of "publican", so it can be a program name with args. set dummy publican; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -11799,6 +11855,18 @@ fi + + if test "x$PUBLICAN" != "x"; then + PUBLICAN_VERSION=`$PUBLICAN -v | cut -d'=' -f2` + + if test 1 -eq `echo "${PUBLICAN_VERSION} < 2.8" | bc` ; then + as_fn_error $? "Publican version is not supported. Install publican >= 2.8 or disable the documentation using --disable-documentation" "$LINENO" 5 + fi + fi + + ac_config_files="$ac_config_files doc/doxygen/wayland.doxygen" + + fi if test "x$PUBLICAN" != "x"; then HAVE_PUBLICAN_TRUE= @@ -11809,7 +11877,7 @@ fi -ac_config_files="$ac_config_files Makefile wayland-scanner.m4 cursor/Makefile cursor/wayland-cursor.pc cursor/wayland-cursor-uninstalled.pc doc/Makefile doc/Wayland/Makefile src/Makefile src/wayland-server-uninstalled.pc src/wayland-client-uninstalled.pc src/wayland-server.pc src/wayland-client.pc src/wayland-version.h protocol/Makefile tests/Makefile" +ac_config_files="$ac_config_files Makefile wayland-scanner.m4 cursor/Makefile cursor/wayland-cursor.pc cursor/wayland-cursor-uninstalled.pc doc/Makefile doc/Wayland/Makefile doc/doxygen/Makefile doc/man/Makefile src/Makefile src/wayland-server-uninstalled.pc src/wayland-client-uninstalled.pc src/wayland-server.pc src/wayland-client.pc src/wayland-version.h protocol/Makefile tests/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -11944,6 +12012,10 @@ as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_PUBLICAN_TRUE}" && test -z "${HAVE_PUBLICAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_PUBLICAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -12345,7 +12417,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by wayland $as_me 0.95.0, which was +This file was extended by wayland $as_me 1.0.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12412,7 +12484,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -wayland config.status 0.95.0 +wayland config.status 1.0.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -12821,6 +12893,7 @@ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "doc/doxygen/wayland.doxygen") CONFIG_FILES="$CONFIG_FILES doc/doxygen/wayland.doxygen" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "wayland-scanner.m4") CONFIG_FILES="$CONFIG_FILES wayland-scanner.m4" ;; "cursor/Makefile") CONFIG_FILES="$CONFIG_FILES cursor/Makefile" ;; @@ -12828,6 +12901,8 @@ "cursor/wayland-cursor-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES cursor/wayland-cursor-uninstalled.pc" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Wayland/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Wayland/Makefile" ;; + "doc/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/Makefile" ;; + "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/wayland-server-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES src/wayland-server-uninstalled.pc" ;; "src/wayland-client-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES src/wayland-client-uninstalled.pc" ;; diff -Nru wayland-0.95.0/configure.ac wayland-1.0.0/configure.ac --- wayland-0.95.0/configure.ac 2012-07-24 19:44:44.000000000 +0000 +++ wayland-1.0.0/configure.ac 2012-10-22 18:54:46.000000000 +0000 @@ -1,7 +1,7 @@ AC_PREREQ([2.64]) -m4_define([wayland_major_version], [0]) -m4_define([wayland_minor_version], [95]) +m4_define([wayland_major_version], [1]) +m4_define([wayland_minor_version], [0]) m4_define([wayland_micro_version], [0]) m4_define([wayland_version], [wayland_major_version.wayland_minor_version.wayland_micro_version]) @@ -43,7 +43,7 @@ AC_ARG_ENABLE([scanner], [AC_HELP_STRING([--disable-scanner], - [Disable compilation of wayland-scannner])], + [Disable compilation of wayland-scanner])], [], [enable_scanner=yes]) @@ -76,8 +76,28 @@ AC_PATH_PROG(XSLTPROC, xsltproc) AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"]) +AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes]) if test "x$enable_documentation" = "xyes"; then + AC_PATH_PROG(DOXYGEN, doxygen) + + if test "x$DOXYGEN" = "x"; then + AC_MSG_ERROR([Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation]) + fi + AC_PATH_PROG(PUBLICAN, publican) + + if test "x$PUBLICAN" != "x"; then + PUBLICAN_VERSION=`$PUBLICAN -v | cut -d'=' -f2` + + if test [ 1 -eq `echo "${PUBLICAN_VERSION} < 2.8" | bc` ]; then + AC_MSG_ERROR([Publican version is not supported. Install publican >= 2.8 or disable the documentation using --disable-documentation]) + fi + fi + + AC_CONFIG_FILES([ + doc/doxygen/wayland.doxygen + ]) + fi AM_CONDITIONAL([HAVE_PUBLICAN], [test "x$PUBLICAN" != "x"]) @@ -88,6 +108,8 @@ cursor/wayland-cursor-uninstalled.pc doc/Makefile doc/Wayland/Makefile + doc/doxygen/Makefile + doc/man/Makefile src/Makefile src/wayland-server-uninstalled.pc src/wayland-client-uninstalled.pc diff -Nru wayland-0.95.0/cursor/Makefile.am wayland-1.0.0/cursor/Makefile.am --- wayland-0.95.0/cursor/Makefile.am 2012-07-10 18:08:59.000000000 +0000 +++ wayland-1.0.0/cursor/Makefile.am 2012-10-10 18:03:42.000000000 +0000 @@ -6,6 +6,7 @@ wayland-cursor.c \ os-compatibility.c \ os-compatibility.h \ + cursor-data.h \ xcursor.c \ xcursor.h libwayland_cursor_la_LIBADD = $(top_builddir)/src/libwayland-client.la diff -Nru wayland-0.95.0/cursor/Makefile.in wayland-1.0.0/cursor/Makefile.in --- wayland-0.95.0/cursor/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/cursor/Makefile.in 2012-10-22 18:55:20.000000000 +0000 @@ -162,6 +162,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -279,6 +280,7 @@ wayland-cursor.c \ os-compatibility.c \ os-compatibility.h \ + cursor-data.h \ xcursor.c \ xcursor.h diff -Nru wayland-0.95.0/cursor/cursor-data.h wayland-1.0.0/cursor/cursor-data.h --- wayland-0.95.0/cursor/cursor-data.h 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/cursor/cursor-data.h 2012-10-10 18:03:42.000000000 +0000 @@ -0,0 +1,548 @@ +/* +* Copyright 1999 SuSE, Inc. +* +* Permission to use, copy, modify, distribute, and sell this software and its +* documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or +* publicity pertaining to distribution of the software without specific, +* written prior permission. SuSE makes no representations about the +* suitability of this software for any purpose. It is provided "as is" +* without express or implied warranty. +* +* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE +* 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. +* +* Author: Keith Packard, SuSE, Inc. +*/ + +static uint32_t cursor_data[] = { + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0xff000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0xff000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xff000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, + 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, + 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0xffffffff, 0xff000000, 0xffffffff, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0x00000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0xff000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, + 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +}; + +static struct cursor_metadata { + char *name; + int width, height; + int hotspot_x, hotspot_y; + size_t offset; +} cursor_metadata[] = { + { "bottom_left_corner", 16, 16, 1, 14, 0 }, + { "bottom_right_corner", 16, 16, 14, 14, 256 }, + { "bottom_side", 15, 16, 7, 14, 512 }, + { "grabbing", 16, 16, 8, 8, 752 }, + { "left_ptr", 10, 16, 1, 1, 1008 }, + { "left_side", 16, 15, 1, 7, 1168 }, + { "right_side", 16, 15, 14, 7, 1408 }, + { "top_left_corner", 16, 16, 1, 1, 1648 }, + { "top_right_corner", 16, 16, 14, 1, 1904 }, + { "top_side", 15, 16, 7, 1, 2160 }, + { "xterm", 9, 16, 4, 8, 2400 }, + { "hand1", 13, 16, 12, 0, 2544 }, + { "watch", 16, 16, 15, 9, 2752 }, +}; diff -Nru wayland-0.95.0/cursor/wayland-cursor.c wayland-1.0.0/cursor/wayland-cursor.c --- wayland-0.95.0/cursor/wayland-cursor.c 2012-07-10 18:11:00.000000000 +0000 +++ wayland-1.0.0/cursor/wayland-cursor.c 2012-10-19 21:05:14.000000000 +0000 @@ -31,6 +31,8 @@ #include "os-compatibility.h" +#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) + struct shm_pool { struct wl_shm_pool *pool; int fd; @@ -181,6 +183,71 @@ free(cursor); } +#include "cursor-data.h" + +static struct wl_cursor * +wl_cursor_create_from_data(struct cursor_metadata *metadata, + struct wl_cursor_theme *theme) +{ + struct cursor *cursor; + struct cursor_image *image; + int size; + + cursor = malloc(sizeof *cursor); + if (!cursor) + return NULL; + + cursor->cursor.image_count = 1; + cursor->cursor.images = malloc(sizeof *cursor->cursor.images); + if (!cursor->cursor.images) { + free(cursor); + return NULL; + } + + cursor->cursor.name = strdup(metadata->name); + cursor->total_delay = 0; + + image = malloc(sizeof *image); + if (!image) { + free(cursor->cursor.name); + free(cursor->cursor.images); + free(cursor); + return NULL; + } + + cursor->cursor.images[0] = (struct wl_cursor_image *) image; + image->theme = theme; + image->buffer = NULL; + image->image.width = metadata->width; + image->image.height = metadata->height; + image->image.hotspot_x = metadata->hotspot_x; + image->image.hotspot_y = metadata->hotspot_y; + image->image.delay = 0; + + size = metadata->width * metadata->height * sizeof(uint32_t); + image->offset = shm_pool_allocate(theme->pool, size); + memcpy(theme->pool->data + image->offset, + cursor_data + metadata->offset, size); + + return &cursor->cursor; +} + +static void +load_default_theme(struct wl_cursor_theme *theme) +{ + uint32_t i; + + free(theme->name); + theme->name = strdup("default"); + + theme->cursor_count = ARRAY_LENGTH(cursor_metadata);; + theme->cursors = malloc(theme->cursor_count * sizeof(*theme->cursors)); + + for (i = 0; i < theme->cursor_count; ++i) + theme->cursors[i] = + wl_cursor_create_from_data(&cursor_metadata[i], theme); +} + static struct wl_cursor * wl_cursor_create_from_xcursor_images(XcursorImages *images, struct wl_cursor_theme *theme) @@ -261,7 +328,8 @@ * \param shm The compositor's shm interface. * * \return An object representing the theme that should be destroyed with - * wl_cursor_theme_destroy() or %NULL on error. + * wl_cursor_theme_destroy() or %NULL on error. If no theme with the given + * name exists, a default theme will be loaded. */ WL_EXPORT struct wl_cursor_theme * wl_cursor_theme_load(const char *name, int size, struct wl_shm *shm) @@ -290,6 +358,9 @@ xcursor_load_theme(name, size, load_callback, theme); + if (theme->cursor_count == 0) + load_default_theme(theme); + return theme; } diff -Nru wayland-0.95.0/cursor/xcursor.c wayland-1.0.0/cursor/xcursor.c --- wayland-0.95.0/cursor/xcursor.c 2012-06-19 15:36:30.000000000 +0000 +++ wayland-1.0.0/cursor/xcursor.c 2012-10-10 18:03:42.000000000 +0000 @@ -606,7 +606,7 @@ #endif #ifndef XCURSORPATH -#define XCURSORPATH "~/.icons:/usr/share/icons:/usr/share/pixmaps:"ICONDIR +#define XCURSORPATH "~/.icons:/usr/share/icons:/usr/share/pixmaps:~/.cursors:/usr/share/cursors/xorg-x11:"ICONDIR #endif static const char * @@ -757,7 +757,7 @@ if (*l != '=') continue; l++; while (*l == ' ') l++; - result = malloc (strlen (l)); + result = malloc (strlen (l) + 1); if (result) { r = result; @@ -870,7 +870,6 @@ if (!dir) return; - ent = readdir(dir); for(ent = readdir(dir); ent; ent = readdir(dir)) { #ifdef _DIRENT_HAVE_D_TYPE if (ent->d_type != DT_UNKNOWN && diff -Nru wayland-0.95.0/debian/changelog wayland-1.0.0/debian/changelog --- wayland-0.95.0/debian/changelog 2012-10-18 09:40:34.000000000 +0000 +++ wayland-1.0.0/debian/changelog 2012-11-20 16:36:41.000000000 +0000 @@ -1,8 +1,9 @@ -wayland (0.95.0-0ubuntu1~precise) precise; urgency=low +wayland (1.0.0-1ubuntu1~precise) precise; urgency=low - * Package for Precise + * New upstream release + * Required for Mesa 9.0.1 bugfix release from Intel Linux Graphics - -- Rodrigo Moya Thu, 18 Oct 2012 11:40:08 +0200 + -- Vivek Dasmohapatra Tue, 20 Nov 2012 13:31:37 +0000 wayland (0.95.0-0ubuntu1) quantal; urgency=low diff -Nru wayland-0.95.0/debian/control wayland-1.0.0/debian/control --- wayland-0.95.0/debian/control 2012-08-16 12:38:38.000000000 +0000 +++ wayland-1.0.0/debian/control 2012-11-20 14:01:41.000000000 +0000 @@ -1,7 +1,7 @@ Source: wayland Section: x11 Priority: optional -Maintainer: Ubuntu X-SWAT +Maintainer: Vivek Dasmohapatra XSBC-Original-Maintainer: Debian X Strike Force Uploaders: Cyril Brulebois Build-Depends: @@ -11,6 +11,7 @@ pkg-config, libexpat1-dev, libffi-dev, + doxygen Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-xorg/wayland/wayland Vcs-Browser: http://git.debian.org/?p=pkg-xorg/wayland/wayland.git diff -Nru wayland-0.95.0/doc/Makefile.am wayland-1.0.0/doc/Makefile.am --- wayland-0.95.0/doc/Makefile.am 2012-02-29 16:54:36.000000000 +0000 +++ wayland-1.0.0/doc/Makefile.am 2012-10-16 00:51:00.000000000 +0000 @@ -1 +1 @@ -SUBDIRS = Wayland +SUBDIRS = doxygen Wayland man diff -Nru wayland-0.95.0/doc/Makefile.in wayland-1.0.0/doc/Makefile.in --- wayland-0.95.0/doc/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/doc/Makefile.in 2012-10-22 18:55:21.000000000 +0000 @@ -134,6 +134,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -245,7 +246,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = Wayland +SUBDIRS = doxygen Wayland man all: all-recursive .SUFFIXES: diff -Nru wayland-0.95.0/doc/Wayland/Makefile.am wayland-1.0.0/doc/Wayland/Makefile.am --- wayland-0.95.0/doc/Wayland/Makefile.am 2012-07-24 19:00:36.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/Makefile.am 2012-10-16 00:51:00.000000000 +0000 @@ -5,6 +5,7 @@ $(srcdir)/en_US/Book_Info.xml \ $(srcdir)/en_US/Wayland.xml \ $(srcdir)/en_US/Protocol.xml \ + $(srcdir)/en_US/Library.xml \ $(srcdir)/en_US/Compositors.xml \ $(srcdir)/en_US/Overview.xml \ $(srcdir)/en_US/images/icon.svg \ @@ -17,7 +18,8 @@ pubdir = $(docdir)/Wayland/en-US publican_targets = $(publican_sources:$(srcdir)/en_US%=$(builddir)/en-US%) \ - en-US/ProtocolSpec.xml + en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml \ + en-US/WaylandClientAPI.xml # The Protocol.xml is purely generated and required before running publican en-US/ProtocolSpec.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-to-docbook.xsl @@ -25,24 +27,41 @@ $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-to-docbook.xsl \ $(top_srcdir)/protocol/wayland.xml > en-US/ProtocolSpec.xml +en-US/ProtocolInterfaces.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-interfaces-to-docbook.xsl + $(AM_V_GEN)$(MKDIR_P) en-US/images + $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-interfaces-to-docbook.xsl \ + $(top_srcdir)/protocol/wayland.xml > en-US/ProtocolInterfaces.xml + +en-US/WaylandClientAPI.xml: $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml $(srcdir)/doxygen-to-publican.xsl + $(AM_V_GEN)$(MKDIR_P) en-US/images + $(AM_V_GEN)$(XSLTPROC) $(srcdir)/doxygen-to-publican.xsl \ + $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml > en-US/WaylandClientAPI.xml + # Copy the en_US source files into en-US destination # This is required for out-of-source-tree build as publican does not allow us # to specify the location of the source code. -$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/ProtocolSpec.xml $(publican_sources) +$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml en-US/WaylandClientAPI.xml $(publican_sources) $(AM_V_GEN)cp -f $< $@ + $(AM_V_GEN)chmod a+w $@ # Run publican for the builddir on the generated (or copied) source -# The output formats are generated in the Wayland sub directory +# The output formats are generated in the Wayland sub directory. Also, we need +# to use a tmp publican.cfg cause 'publican rename' modifies the original. Wayland: $(publican_targets) + $(AM_V_GEN)cp -f $(srcdir)/publican.cfg $(builddir)/publican-copy.cfg + $(AM_V_GEN)$(PUBLICAN) rename --name Wayland \ + --version "$(WAYLAND_VERSION_MAJOR).$(WAYLAND_VERSION_MINOR)" \ + --config $(builddir)/publican-copy.cfg $(AM_V_GEN)$(PUBLICAN) build --lang en-US --format html,pdf \ - --config $(srcdir)/publican.cfg + --config $(builddir)/publican-copy.cfg @touch Wayland -CLEANFILES = en-US/ProtocolSpec.xml $(publican_targets) +CLEANFILES = en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml en-US/WaylandClientAPI.xml $(publican_targets) clean-local: - $(AM_V_at)rm -fr en-US - $(AM_V_at)rm -fr Wayland + $(AM_V_at)rm -fr $(builddir)/en-US + $(AM_V_at)rm -fr $(builddir)/Wayland + $(AM_V_at)rm -fr $(builddir)/publican-copy.cfg install-data-local: test -z "$(pubdir)/html/Common_Content/css" || $(mkdir_p) "$(DESTDIR)$(pubdir)/html/Common_Content/css" @@ -68,4 +87,4 @@ endif -EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl +EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl protocol-interfaces-to-docbook.xsl doxygen-to-publican.xsl diff -Nru wayland-0.95.0/doc/Wayland/Makefile.in wayland-1.0.0/doc/Wayland/Makefile.in --- wayland-0.95.0/doc/Wayland/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/Makefile.in 2012-10-22 18:55:21.000000000 +0000 @@ -96,6 +96,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -214,6 +215,7 @@ $(srcdir)/en_US/Book_Info.xml \ $(srcdir)/en_US/Wayland.xml \ $(srcdir)/en_US/Protocol.xml \ + $(srcdir)/en_US/Library.xml \ $(srcdir)/en_US/Compositors.xml \ $(srcdir)/en_US/Overview.xml \ $(srcdir)/en_US/images/icon.svg \ @@ -224,10 +226,11 @@ @HAVE_PUBLICAN_TRUE@noinst_DATA = Wayland $(publican_targets) @HAVE_PUBLICAN_TRUE@pubdir = $(docdir)/Wayland/en-US @HAVE_PUBLICAN_TRUE@publican_targets = $(publican_sources:$(srcdir)/en_US%=$(builddir)/en-US%) \ -@HAVE_PUBLICAN_TRUE@ en-US/ProtocolSpec.xml +@HAVE_PUBLICAN_TRUE@ en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml \ +@HAVE_PUBLICAN_TRUE@ en-US/WaylandClientAPI.xml -@HAVE_PUBLICAN_TRUE@CLEANFILES = en-US/ProtocolSpec.xml $(publican_targets) -EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl +@HAVE_PUBLICAN_TRUE@CLEANFILES = en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml en-US/WaylandClientAPI.xml $(publican_targets) +EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl protocol-interfaces-to-docbook.xsl doxygen-to-publican.xsl all: all-am .SUFFIXES: @@ -429,22 +432,39 @@ @HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-to-docbook.xsl \ @HAVE_PUBLICAN_TRUE@ $(top_srcdir)/protocol/wayland.xml > en-US/ProtocolSpec.xml +@HAVE_PUBLICAN_TRUE@en-US/ProtocolInterfaces.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-interfaces-to-docbook.xsl +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(MKDIR_P) en-US/images +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-interfaces-to-docbook.xsl \ +@HAVE_PUBLICAN_TRUE@ $(top_srcdir)/protocol/wayland.xml > en-US/ProtocolInterfaces.xml + +@HAVE_PUBLICAN_TRUE@en-US/WaylandClientAPI.xml: $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml $(srcdir)/doxygen-to-publican.xsl +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(MKDIR_P) en-US/images +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(srcdir)/doxygen-to-publican.xsl \ +@HAVE_PUBLICAN_TRUE@ $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml > en-US/WaylandClientAPI.xml + # Copy the en_US source files into en-US destination # This is required for out-of-source-tree build as publican does not allow us # to specify the location of the source code. -@HAVE_PUBLICAN_TRUE@$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/ProtocolSpec.xml $(publican_sources) +@HAVE_PUBLICAN_TRUE@$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml en-US/WaylandClientAPI.xml $(publican_sources) @HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)cp -f $< $@ +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)chmod a+w $@ # Run publican for the builddir on the generated (or copied) source -# The output formats are generated in the Wayland sub directory +# The output formats are generated in the Wayland sub directory. Also, we need +# to use a tmp publican.cfg cause 'publican rename' modifies the original. @HAVE_PUBLICAN_TRUE@Wayland: $(publican_targets) +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)cp -f $(srcdir)/publican.cfg $(builddir)/publican-copy.cfg +@HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(PUBLICAN) rename --name Wayland \ +@HAVE_PUBLICAN_TRUE@ --version "$(WAYLAND_VERSION_MAJOR).$(WAYLAND_VERSION_MINOR)" \ +@HAVE_PUBLICAN_TRUE@ --config $(builddir)/publican-copy.cfg @HAVE_PUBLICAN_TRUE@ $(AM_V_GEN)$(PUBLICAN) build --lang en-US --format html,pdf \ -@HAVE_PUBLICAN_TRUE@ --config $(srcdir)/publican.cfg +@HAVE_PUBLICAN_TRUE@ --config $(builddir)/publican-copy.cfg @HAVE_PUBLICAN_TRUE@ @touch Wayland @HAVE_PUBLICAN_TRUE@clean-local: -@HAVE_PUBLICAN_TRUE@ $(AM_V_at)rm -fr en-US -@HAVE_PUBLICAN_TRUE@ $(AM_V_at)rm -fr Wayland +@HAVE_PUBLICAN_TRUE@ $(AM_V_at)rm -fr $(builddir)/en-US +@HAVE_PUBLICAN_TRUE@ $(AM_V_at)rm -fr $(builddir)/Wayland +@HAVE_PUBLICAN_TRUE@ $(AM_V_at)rm -fr $(builddir)/publican-copy.cfg @HAVE_PUBLICAN_TRUE@install-data-local: @HAVE_PUBLICAN_TRUE@ test -z "$(pubdir)/html/Common_Content/css" || $(mkdir_p) "$(DESTDIR)$(pubdir)/html/Common_Content/css" diff -Nru wayland-0.95.0/doc/Wayland/doxygen-to-publican.xsl wayland-1.0.0/doc/Wayland/doxygen-to-publican.xsl --- wayland-0.95.0/doc/Wayland/doxygen-to-publican.xsl 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/doxygen-to-publican.xsl 2012-10-16 00:51:00.000000000 +0000 @@ -0,0 +1,46 @@ + + + + + + + +%BOOK_ENTITIES; +]> +]]> + +
+ Client API + Following is the Wayland library interface for clients + (libwayland-client). Note that most of the + procedures are related with IPC, which is the main responsibility of + the library. + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
diff -Nru wayland-0.95.0/doc/Wayland/en_US/Architecture.xml wayland-1.0.0/doc/Wayland/en_US/Architecture.xml --- wayland-0.95.0/doc/Wayland/en_US/Architecture.xml 2012-05-15 15:02:13.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/en_US/Architecture.xml 2012-08-13 15:00:28.000000000 +0000 @@ -255,7 +255,7 @@ In either case, the application must tell the compositor which area of the surface holds new contents. When the - application renders directly the to shared buffer, the + application renders directly to the shared buffer, the compositor needs to be noticed that there is new content. But also when exchanging buffers, the compositor doesn't assume anything changed, and needs a request from the diff -Nru wayland-0.95.0/doc/Wayland/en_US/Library.xml wayland-1.0.0/doc/Wayland/en_US/Library.xml --- wayland-0.95.0/doc/Wayland/en_US/Library.xml 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/en_US/Library.xml 2012-10-16 00:51:00.000000000 +0000 @@ -0,0 +1,9 @@ + + +%BOOK_ENTITIES; +]> + + Wayland Library + + diff -Nru wayland-0.95.0/doc/Wayland/en_US/Protocol.xml wayland-1.0.0/doc/Wayland/en_US/Protocol.xml --- wayland-0.95.0/doc/Wayland/en_US/Protocol.xml 2012-07-10 01:15:25.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/en_US/Protocol.xml 2012-10-16 00:51:00.000000000 +0000 @@ -59,9 +59,10 @@
Wire Format - The protocol is sent over a UNIX domain stream socket. Currently, the - endpoint is named \wayland, - but it is subject to change. The protocol is message-based. A + The protocol is sent over a UNIX domain stream socket, where the endpoint + usually is named wayland-0 + (although it can be changed via WAYLAND_DISPLAY + in the environment). The protocol is message-based. A message sent by a client to the server is called request. A message from the server to a client is called event. Every message is structured as 32-bit words, values are represented in the host's @@ -102,12 +103,23 @@ + fixed + + + Signed 24.8 decimal numbers. It is a signed decimal type which + offers a sign bit, 23 bits of integer precision and 8 bits of + decimal precision. This is exposed as an opaque struct with + conversion helpers to and from double and int on the C API side. + + + + string Starts with an unsigned 32-bit length, followed by the - string contents, including terminating NUL byte, then padding to a - 32-bit boundary. + string contents, including terminating null byte, then padding + to a 32-bit boundary. @@ -151,131 +163,7 @@
-
- Interfaces - - The protocol includes several interfaces which are used for - interacting with the server. Each interface provides requests, - events, and errors (which are really just special events) as described - above. Specific compositor implementations may have their own - interfaces provided as extensions, but there are several which are - always expected to be present. - - - Core interfaces: - - - wl_display - - - provides global functionality like object binding and - fatal error events - - - - - wl_callback - - - callback interface for done events - - - - - wl_compositor - - - core compositor interface, allows surface creation - - - - - wl_shm - - - buffer management interface with buffer creation and format - handling - - - - - wl_buffer - - - buffer handling interface for indicating damage and object - destruction, also provides buffer release events from the - server - - - - - wl_data_offer - - - for accepting and receiving specific mime types - - - - - wl_data_source - - - for offering specific mime types - - - - - wl_data_device - - - lets clients manage drag & drop, provides pointer enter/leave events and motion - - - - - wl_data_device_manager - - - for managing data sources and devices - - - - - wl_shell - - - shell surface handling - - - - - wl_shell_surface - - - shell surface handling and desktop-like events (e.g. set a - surface to fullscreen, display a popup, etc.) - - - - - wl_seat - - - cursor setting, motion, button, and key events, etc. - - - - - wl_output - - - events describing an attached output (subpixel orientation, - current mode & geometry, etc.) - - - - -
+
Connect Time @@ -453,232 +341,116 @@
-
- Shared Object Cache +
+ Data sharing between client (selection and drag and drop) - Cache for sharing glyphs, icons, cursors across clients. Lets clients - share identical objects. The cache is a global object, advertised at - connect time. - - Interface: cache - Requests: upload(key, visual, bo, stride, width, height) - Events: item(key, bo, x, y, stride) - retire(bo) - - - - - - - Upload by passing a visual, bo, stride, width, height to the - cache. - - - - - Upload returns a bo name, stride, and x, y location of object in - the buffer. Clients take a reference on the atlas bo. - - - - - Shared objects are refcounted, freed by client (when purging - glyphs from the local cache) or when a client exits. - - - - - Server can't delete individual items from an atlas, but it can - throw out an entire atlas bo if it becomes too sparse. The server - sends out an retire event when this happens, and clients - must throw away any objects from that bo and reupload. Between the - server dropping the atlas and the client receiving the retire event, - clients can still legally use the old atlas since they have a ref on - the bo. - - - - - cairo needs to hook into the glyph cache, and maybe also a way - to create a read-only surface based on an object form the cache - (icons). - cairo_wayland_create_cached_surface(surface-data) - - - - -
-
- Drag and Drop - - Multi-device aware. Orthogonal to rest of wayland, as it is its own - toplevel object. Since the compositor determines the drag target, it - works with transformed surfaces (dragging to a scaled down window in - expose mode, for example). + The Wayland 1.0 protocol provides its clients a mechanism for sharing + data that allows the implementation of selection and drag and drop. + The client providing the data creates a wl_data_source object and the + clients obtaining the data will see it as wl_data_offer object. This + interface allows the clients to agree on a mutually supported mime type + and transfer the data through an fd that is passed through the protocol. + + + The next section explains the negotiation between data source and data + offer objects. + explains how these objects are created and passed to different client + using the wl_data_device interface, that implements selection and drag + and drop support. See , - and - for + , + and + for protocol descriptions. - Issues: - - - - we can set the cursor image to the current cursor + dragged - object, which will last as long as the drag, but maybe an request to - attach an image to the cursor will be more convenient? - - - - - Should drag.send() destroy the object? There's nothing to do - after the data has been transferred. - - - - - How do we marshal several mime-types? We could make the drag - setup a multi-step operation: dnd.create, drag.offer(mime-type1), - drag.offer(mime-type2), drag.activate(). The drag object could send - multiple offer events on each motion event. Or we could just - implement an array type, but that's a pain to work with. - - - - - Middle-click drag to pop up menu? Ctrl/Shift/Alt drag? - - - - - Send a file descriptor over the protocol to let initiator and - source exchange data out of band? - - - - - Action? Specify action when creating the drag object? Ask - action? - - - - - - Sequence of events: - - - - The initiator surface receives a click (which grabs the input - device to that surface) and then enough motion to decide that a drag - is starting. Wayland has no subwindows, so it's entirely up to the - application to decide whether or not a draggable object within the - surface was clicked. - - - - - The initiator creates a drag object by calling the - create_drag method on the dnd global - object. As for any client created object, the client allocates - the id. The create_drag method also takes - the originating surface, the device that's dragging and the - mime-types supported. If the surface - has indeed grabbed the device passed in, the server will create an - active drag object for the device. If the grab was released in the - meantime, the drag object will be in-active, that is, the same state - as when the grab is released. In that case, the client will receive - a button up event, which will let it know that the drag finished. - To the client it will look like the drag was immediately cancelled - by the grab ending. - - - The special mime-type application/x-root-target indicates that the - initiator is looking for drag events to the root window as well. - - - - - To indicate the object being dragged, the initiator can replace - the pointer image with an larger image representing the data being - dragged with the cursor image overlaid. The pointer image will - remain in place as long as the grab is in effect, since the - initiating surface keeps pointer focus, and no other surface - receives enter events. - - - - - As long as the grab is active (or until the initiator cancels - the drag by destroying the drag object), the drag object will send - offer events to surfaces it moves across. As for motion - events, these events contain the surface local coordinates of the - device as well as the list of mime-types offered. When a device - leaves a surface, it will send an offer event with an empty - list of mime-types to indicate that the device left the surface. - - - - - If a surface receives an offer event and decides that it's in an - area that can accept a drag event, it should call the - accept method on the drag object in the event. The surface - passes a mime-type in the request, picked from the list in the offer - event, to indicate which of the types it wants. At this point, the - surface can update the appearance of the drop target to give - feedback to the user that the drag has a valid target. If the - offer event moves to a different drop target (the surface - decides the offer coordinates is outside the drop target) or leaves - the surface (the offer event has an empty list of mime-types) it - should revert the appearance of the drop target to the inactive - state. A surface can also decide to retract its drop target (if the - drop target disappears or moves, for example), by calling the accept - method with a NULL mime-type. - - - - - When a target surface sends an accept request, the drag - object will send a target event to the initiator surface. - This tells the initiator that the drag currently has a potential - target and which of the offered mime-types the target wants. The - initiator can change the pointer image or drag source appearance to - reflect this new state. If the target surface retracts its drop - target of if the surface disappears, a target event with a - NULL mime-type will be sent. - - - If the initiator listed application/x-root-target as a valid - mime-type, dragging into the root window will make the drag object - send a target event with the application/x-root-target - mime-type. - - - - - When the grab is released (indicated by the button release - event), if the drag has an active target, the initiator calls the - send method on the drag object to send the data to be - transferred by the drag operation, in the format requested by the - target. The initiator can then destroy the drag object by calling - the destroy method. - - - - - The drop target receives a data event from the drag - object with the requested data. - - - - - MIME is defined in RFC's 2045-2049. A registry of MIME types is maintained by the Internet Assigned Numbers Authority (IANA). +
+ Data negotiation + + A client providing data to other clients will create a wl_data_source + object and advertise the mime types for the formats it supports for + that data through the wl_data_source.offer + request. On the receiving end, the data offer object will generate one + wl_data_offer.offer event for each supported mime + type. + + + The actual data transfer happens when the receiving client sends a + wl_data_offer.receive request. This request takes + a mime type and an fd as arguments. This request will generate a + wl_data_source.send event on the sending client + with the same arguments, and the latter client is expected to write its + data to the given fd using the chosen mime type. + +
+
+ Data devices + + Data devices glue data sources and offers together. A data device is + associated with a wl_seat and is obtained by the clients using the + wl_data_device_manager factory object, which is also responsible for + creating data sources. + + + Clients are informed of new data offers through the + wl_data_device.data_offer event. After this + event is generated the data offer will advertise the available mime + types. New data offers are introduced prior to their use for + selection or drag and drop. + +
+ Selection + + Each data device has a selection data source. Clients create a data + source object using the device manager and may set it as the + current selection for a given data device. Whenever the current + selection changes, the client with keyboard focus receives a + wl_data_device.selection event. This event is + also generated on a client immediately before it receives keyboard + focus. + + + The data offer is introduced with + wl_data_device.data_offer event before the + selection event. + +
+
+ Drag and Drop + + A drag and drop operation is started using the + wl_data_device.start_drag request. This + requests causes a pointer grab that will generate enter, motion and + leave events on the data device. A data source is supplied as + argument to start_drag, and data offers associated with it are + supplied to clients surfaces under the pointer in the + wl_data_device.enter event. The data offer + is introduced to the client prior to the enter event with the + wl_data_device.data_offer event. + + + Clients are expected to provide feedback to the data sending client + by calling the wl_data_offer.accept request with + a mime type it accepts. If none of the advertised mime types is + supported by the receiving client, it should supply NULL to the + accept request. The accept request causes the sending client to + receive a wl_data_source.target event with the + chosen mime type. + + + When the drag ends, the receiving client receives a + wl_data_device.drop event at which it is expect + to trasnfer the data using the + wl_data_offer.receive request. + +
+
diff -Nru wayland-0.95.0/doc/Wayland/en_US/Wayland.xml wayland-1.0.0/doc/Wayland/en_US/Wayland.xml --- wayland-0.95.0/doc/Wayland/en_US/Wayland.xml 2012-03-29 03:05:45.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/en_US/Wayland.xml 2012-10-16 00:51:00.000000000 +0000 @@ -8,8 +8,8 @@ + - diff -Nru wayland-0.95.0/doc/Wayland/protocol-interfaces-to-docbook.xsl wayland-1.0.0/doc/Wayland/protocol-interfaces-to-docbook.xsl --- wayland-0.95.0/doc/Wayland/protocol-interfaces-to-docbook.xsl 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/protocol-interfaces-to-docbook.xsl 2012-10-10 18:03:42.000000000 +0000 @@ -0,0 +1,56 @@ + + + + + + + + +%BOOK_ENTITIES; +]> +]]> + +
+ Interfaces + + The protocol includes several interfaces which are used for + interacting with the server. Each interface provides requests, + events, and errors (which are really just special events) as described + above. Specific compositor implementations may have their own + interfaces provided as extensions, but there are several which are + always expected to be present. + + + + Core interfaces: + + + + +
+
+ + + + + protocol-summary-- + + + + + - + + + + + + + + + + + +
+ diff -Nru wayland-0.95.0/doc/Wayland/protocol-to-docbook.xsl wayland-1.0.0/doc/Wayland/protocol-to-docbook.xsl --- wayland-0.95.0/doc/Wayland/protocol-to-docbook.xsl 2012-03-29 03:05:32.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/protocol-to-docbook.xsl 2012-10-22 02:11:19.000000000 +0000 @@ -20,6 +20,25 @@ + + + + + + + + + + + + + + + + + + + @@ -41,9 +60,9 @@ - - - - + + +
Requests provided by <xsl:value-of select="@name" /> @@ -52,13 +71,13 @@
- Events provided by <xsl:value-of select="@name" /> events + Events provided by <xsl:value-of select="@name" />
- Enums provided by <xsl:value-of select="@name" /> enums + Enums provided by <xsl:value-of select="@name" />
@@ -93,7 +112,9 @@ - - + + + <xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> arguments diff -Nru wayland-0.95.0/doc/Wayland/publican.cfg wayland-1.0.0/doc/Wayland/publican.cfg --- wayland-0.95.0/doc/Wayland/publican.cfg 2012-02-29 16:54:36.000000000 +0000 +++ wayland-1.0.0/doc/Wayland/publican.cfg 2012-10-16 00:51:00.000000000 +0000 @@ -5,4 +5,4 @@ type: Book brand: common tmp_dir: Wayland - +toc_section_depth: 1 diff -Nru wayland-0.95.0/doc/doxygen/Makefile.am wayland-1.0.0/doc/doxygen/Makefile.am --- wayland-0.95.0/doc/doxygen/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/doxygen/Makefile.am 2012-10-19 20:50:38.000000000 +0000 @@ -0,0 +1,13 @@ + +noinst_DATA = xml/index.xml +dist_noinst_DATA = wayland.doxygen.in + +scanned_src_files = \ + $(top_srcdir)/src/wayland-client.c \ + $(top_srcdir)/src/wayland-client.h + +xml/index.xml: $(scanned_src_files) + doxygen wayland.doxygen + +clean-local: + rm -rf xml/ diff -Nru wayland-0.95.0/doc/doxygen/Makefile.in wayland-1.0.0/doc/doxygen/Makefile.in --- wayland-0.95.0/doc/doxygen/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/doxygen/Makefile.in 2012-10-22 18:55:21.000000000 +0000 @@ -0,0 +1,419 @@ +# Makefile.in generated by automake 1.11.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 = doc/doxygen +DIST_COMMON = $(dist_noinst_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/wayland.doxygen.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(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 = wayland.doxygen +CONFIG_CLEAN_VPATH_FILES = +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_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(dist_noinst_DATA) $(noinst_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +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@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPAT_LIBS = @EXPAT_LIBS@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ +FGREP = @FGREP@ +GCC_CFLAGS = @GCC_CFLAGS@ +GREP = @GREP@ +ICONDIR = @ICONDIR@ +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@ +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@ +PUBLICAN = @PUBLICAN@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WAYLAND_VERSION = @WAYLAND_VERSION@ +WAYLAND_VERSION_MAJOR = @WAYLAND_VERSION_MAJOR@ +WAYLAND_VERSION_MICRO = @WAYLAND_VERSION_MICRO@ +WAYLAND_VERSION_MINOR = @WAYLAND_VERSION_MINOR@ +XSLTPROC = @XSLTPROC@ +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@ +noinst_DATA = xml/index.xml +dist_noinst_DATA = wayland.doxygen.in +scanned_src_files = \ + $(top_srcdir)/src/wayland-client.c \ + $(top_srcdir)/src/wayland-client.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/doxygen/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/doxygen/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +wayland.doxygen: $(top_builddir)/config.status $(srcdir)/wayland.doxygen.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +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 $(DATA) +installdirs: +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-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +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 -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + 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-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + + +xml/index.xml: $(scanned_src_files) + doxygen wayland.doxygen + +clean-local: + rm -rf xml/ + +# 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 -Nru wayland-0.95.0/doc/doxygen/wayland.doxygen.in wayland-1.0.0/doc/doxygen/wayland.doxygen.in --- wayland-0.95.0/doc/doxygen/wayland.doxygen.in 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/doxygen/wayland.doxygen.in 2012-10-16 00:51:00.000000000 +0000 @@ -0,0 +1,1782 @@ +# Doxyfile 1.7.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "Wayland" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = @top_builddir@/doc/doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 0 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = @top_srcdir@/src/wayland-client.c \ + @top_srcdir@/src/wayland-client.h + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = NO + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = YES + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff -Nru wayland-0.95.0/doc/man/Makefile.am wayland-1.0.0/doc/man/Makefile.am --- wayland-0.95.0/doc/man/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/man/Makefile.am 2012-10-09 17:44:08.000000000 +0000 @@ -0,0 +1,49 @@ +# +# This generates man-pages out of the Docbook XML files. Simply add your files +# to the $MANPAGES array. If aliases are created, please add them to the +# MANPAGES_ALIASES array so they get installed correctly. +# + +MANPAGES = \ + wl_display_connect.3 +MANPAGES_ALIASES = \ + wl_display_connect_to_fd.3 + +XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}} +CLEANFILES = +EXTRA_DIST = +man_MANS = + +if HAVE_XSLTPROC + +CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) +EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES) +man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) + +XSLTPROC_FLAGS = \ + --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.output.quietly 1 + +XSLTPROC_PROCESS_MAN = \ + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \ + $(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES) + +%.1: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.3: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.5: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.7: %.xml + $(XSLTPROC_PROCESS_MAN) + +wl_display_connect_to_fd.3: wl_display_connect.3 + +endif # HAVE_XSLTPROC diff -Nru wayland-0.95.0/doc/man/Makefile.in wayland-1.0.0/doc/man/Makefile.in --- wayland-0.95.0/doc/man/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/man/Makefile.in 2012-10-22 18:55:21.000000000 +0000 @@ -0,0 +1,541 @@ +# Makefile.in generated by automake 1.11.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ + +# +# This generates man-pages out of the Docbook XML files. Simply add your files +# to the $MANPAGES array. If aliases are created, please add them to the +# MANPAGES_ALIASES array so they get installed correctly. +# +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@ +@HAVE_XSLTPROC_TRUE@am__append_1 = $(MANPAGES) $(MANPAGES_ALIASES) +@HAVE_XSLTPROC_TRUE@am__append_2 = $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES) +@HAVE_XSLTPROC_TRUE@am__append_3 = $(MANPAGES) $(MANPAGES_ALIASES) +subdir = doc/man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(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_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +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; }; \ + } +man3dir = $(mandir)/man3 +am__installdirs = "$(DESTDIR)$(man3dir)" +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +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@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPAT_LIBS = @EXPAT_LIBS@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ +FGREP = @FGREP@ +GCC_CFLAGS = @GCC_CFLAGS@ +GREP = @GREP@ +ICONDIR = @ICONDIR@ +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@ +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@ +PUBLICAN = @PUBLICAN@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WAYLAND_VERSION = @WAYLAND_VERSION@ +WAYLAND_VERSION_MAJOR = @WAYLAND_VERSION_MAJOR@ +WAYLAND_VERSION_MICRO = @WAYLAND_VERSION_MICRO@ +WAYLAND_VERSION_MINOR = @WAYLAND_VERSION_MINOR@ +XSLTPROC = @XSLTPROC@ +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@ +MANPAGES = \ + wl_display_connect.3 + +MANPAGES_ALIASES = \ + wl_display_connect_to_fd.3 + +XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}} + +CLEANFILES = $(am__append_1) +EXTRA_DIST = $(am__append_2) +man_MANS = $(am__append_3) +@HAVE_XSLTPROC_TRUE@XSLTPROC_FLAGS = \ +@HAVE_XSLTPROC_TRUE@ --stringparam man.authors.section.enabled 0 \ +@HAVE_XSLTPROC_TRUE@ --stringparam man.copyright.section.enabled 0 \ +@HAVE_XSLTPROC_TRUE@ --stringparam funcsynopsis.style ansi \ +@HAVE_XSLTPROC_TRUE@ --stringparam man.output.quietly 1 + +@HAVE_XSLTPROC_TRUE@XSLTPROC_PROCESS_MAN = \ +@HAVE_XSLTPROC_TRUE@ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ +@HAVE_XSLTPROC_TRUE@ $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \ +@HAVE_XSLTPROC_TRUE@ $(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES) + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/man/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/man/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man3: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + +uninstall-man3: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + @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 $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man3dir)"; 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: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +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-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man3 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man3 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool 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-man install-man3 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-man uninstall-man3 + + +@HAVE_XSLTPROC_TRUE@%.1: %.xml +@HAVE_XSLTPROC_TRUE@ $(XSLTPROC_PROCESS_MAN) + +@HAVE_XSLTPROC_TRUE@%.3: %.xml +@HAVE_XSLTPROC_TRUE@ $(XSLTPROC_PROCESS_MAN) + +@HAVE_XSLTPROC_TRUE@%.5: %.xml +@HAVE_XSLTPROC_TRUE@ $(XSLTPROC_PROCESS_MAN) + +@HAVE_XSLTPROC_TRUE@%.7: %.xml +@HAVE_XSLTPROC_TRUE@ $(XSLTPROC_PROCESS_MAN) + +@HAVE_XSLTPROC_TRUE@wl_display_connect_to_fd.3: wl_display_connect.3 + +# 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 -Nru wayland-0.95.0/doc/man/wl_display_connect.3 wayland-1.0.0/doc/man/wl_display_connect.3 --- wayland-0.95.0/doc/man/wl_display_connect.3 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/man/wl_display_connect.3 2012-10-20 03:12:31.000000000 +0000 @@ -0,0 +1,77 @@ +'\" t +.\" Title: wl_display_connect +.\" Author: David Herrmann +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: September 2012 +.\" Manual: wl_display_connect +.\" Source: wayland-client +.\" Language: English +.\" +.TH "WL_DISPLAY_CONNECT" "3" "September 2012" "wayland-client" "wl_display_connect" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +wl_display_connect, wl_display_connect_to_fd \- Connect to a wayland socket +.SH "SYNOPSIS" +.sp +.ft B +.nf +#include +.fi +.ft +.HP \w'struct\ wl_display\ *wl_display_connect('u +.BI "struct wl_display *wl_display_connect(const\ char\ *" "name" ");" +.HP \w'struct\ wl_display\ *wl_display_connect_to_fd('u +.BI "struct wl_display *wl_display_connect_to_fd(int\ " "fd" ");" +.SH "DESCRIPTION" +.PP +\fBwl_display_connect\fR +connects to a wayland socket that was previously opened by a wayland server\&. The server socket must be placed in +\fBXDG_RUNTIME_DIR\fR +for this function to find it\&. The +\fIname\fR +argument specifies the name of the socket or +\fBNULL\fR +to use the default (which is +\fB"wayland\-0"\fR)\&. The environment variable +\fBWAYLAND_DISPLAY\fR +replaces the default value\&. If +\fBWAYLAND_SOCKET\fR +is set, this function behaves like +\fBwl_display_connect_to_fd\fR +with the file\-descriptor number taken from the environment variable\&. +.PP +\fBwl_display_connect_to_fd\fR +connects to a wayland socket with an explicit file\-descriptor\&. The file\-descriptor is passed as argument +\fIfd\fR\&. +.SH "RETURN VALUE" +.PP +\fBwl_display_connect\fR +and +\fBwl_display_connect_to_fd\fR +return a new display context object or NULL on failure\&. +\fIerrno\fR +is set correspondingly\&. +.SH "SEE ALSO" +.PP + +\fBwayland-client\fR(7), +\fBwl_display_disconnect\fR(3), +\fBwl_display_iterate\fR(3) diff -Nru wayland-0.95.0/doc/man/wl_display_connect.xml wayland-1.0.0/doc/man/wl_display_connect.xml --- wayland-0.95.0/doc/man/wl_display_connect.xml 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/man/wl_display_connect.xml 2012-09-25 15:02:52.000000000 +0000 @@ -0,0 +1,88 @@ + + + + + + + + wl_display_connect + wayland-client + September 2012 + + + Developer + David + Herrmann + dh.herrmann@googlemail.com + + + + + + wl_display_connect + 3 + + + + wl_display_connect + wl_display_connect_to_fd + Connect to a wayland socket + + + + + + #include <wayland-client.h> + + + struct wl_display *wl_display_connect + const char *name + + + + struct wl_display *wl_display_connect_to_fd + int fd + + + + + + + Description + wl_display_connect connects to a wayland socket + that was previously opened by a wayland server. The server socket must + be placed in XDG_RUNTIME_DIR for this function to + find it. The name argument specifies the name of + the socket or NULL to use the default (which is + "wayland-0"). The environment variable + WAYLAND_DISPLAY replaces the default value. If + WAYLAND_SOCKET is set, this function behaves like + wl_display_connect_to_fd with the file-descriptor + number taken from the environment variable. + + wl_display_connect_to_fd connects to a wayland + socket with an explicit file-descriptor. The file-descriptor is passed + as argument fd. + + + + Return Value + wl_display_connect and + wl_display_connect_to_fd return a new display + context object or NULL on failure. errno is set + correspondingly. + + + + See Also + + wayland-client7, + wl_display_disconnect3, + wl_display_iterate3 + + + diff -Nru wayland-0.95.0/doc/man/wl_display_connect_to_fd.3 wayland-1.0.0/doc/man/wl_display_connect_to_fd.3 --- wayland-0.95.0/doc/man/wl_display_connect_to_fd.3 1970-01-01 00:00:00.000000000 +0000 +++ wayland-1.0.0/doc/man/wl_display_connect_to_fd.3 2012-10-20 03:12:31.000000000 +0000 @@ -0,0 +1 @@ +.so man3/man3/wl_display_connect.3 diff -Nru wayland-0.95.0/protocol/Makefile.in wayland-1.0.0/protocol/Makefile.in --- wayland-0.95.0/protocol/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/protocol/Makefile.in 2012-10-22 18:55:21.000000000 +0000 @@ -126,6 +126,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ diff -Nru wayland-0.95.0/protocol/wayland.xml wayland-1.0.0/protocol/wayland.xml --- wayland-0.95.0/protocol/wayland.xml 2012-07-22 19:45:04.000000000 +0000 +++ wayland-1.0.0/protocol/wayland.xml 2012-10-22 02:04:53.000000000 +0000 @@ -30,22 +30,12 @@ The core global object. This is a special singleton object. It - is used for internal wayland protocol features. + is used for internal Wayland protocol features. - - - Binds a new, client-created object to the server using @name as - the identifier. - - - - - - - The sync request asks the server to invoke the 'done' request + The sync request asks the server to emit the 'done' event on the provided wl_callback object. Since requests are handled in-order, this can be used as a barrier to ensure all previous requests have been handled. @@ -53,12 +43,26 @@ + + + This request creates a registry object that allows the client + to list and bind the global objects available from the + compositor. + + + + The error event is sent out when a fatal (non-recoverable) - error has occurred. + error has occurred. The @object_id argument is the object + where the error occurred, most often in response to a request + to that object. The @code identifies the error and is defined + by the object interface. As such, each interface defines its + own set of error codes. The @message is an brief description + of the error, for (debugging) convenience. - + @@ -76,16 +80,53 @@ summary="server is out of memory"/> + + + This event is used internally by the object ID management + logic. When a client deletes an object, the server will send + this event to acknowledge that it has seen the delete request. + When the client receive this event, it will know that it can + safely reuse the object ID + + + + + + + + The global registry object. The server has a number of global + objects that are available to all clients. These objects + typically represent an actual object in the server (for example, + an input device) or they are singleton objects that provides + extension functionality. + + When a client creates a registry object, the registry object + will emit a global event for each global currently in the + regitry. Globals come and go as a result of device hotplugs, + reconfiguration or other events, and the registry will send out + @global and @global_remove events to keep the client up to date + with the changes. To mark the end of the initial burst of + events, the client can use the wl_display.sync request + immediately after calling wl_display.get_registry. + + A client can 'bind' to a global object by using the bind + request. This creates a client side handle that lets the object + emit events to the client and lets the client invoke requests on + the object. + + + + + Binds a new, client-created object to the server using @name as + the identifier. + + + + + - Notify the client of global objects. These are objects that - are created by the server. Globals are published on the - initial client connection sequence, upon device hotplugs, - device disconnects, reconfiguration or other events. A client - can 'bind' to a global object by using the bind request. This - creates a client side handle that lets the object emit events - to the client and lets the client invoke requests on the - object. + Notify the client of global objects. @@ -94,17 +135,16 @@ - Notify the client of removed global objects. + Notify the client of removed global objects. This event + notifies the client that the global identifies by @name is no + longer available. If the client bound to the global using the + 'bind' request, the client should now destroy that object. + The object remains valid and requests to the object will be + ignored until the client destroys it, to avoid races between + the global going away and a client sending a request to it. - - - - Server has deleted the id and client can now reuse it. - - - @@ -138,7 +178,7 @@ The wl_shm_pool object encapsulates a piece of memory shared - between the compsitor and client. Through the wl_shm_pool + between the compositor and client. Through the wl_shm_pool object, the client can allocate shared memory wl_buffer objects. The objects will share the same underlying mapped memory. Reusing the mapped memory avoids the setup/teardown overhead and @@ -156,7 +196,7 @@ those advertised through the wl_shm.format event. A buffer will keep a reference to the pool it was created from - so it is valid to destroy the pool immediatedly after creating + so it is valid to destroy the pool immediately after creating a buffer from it. @@ -221,28 +261,51 @@ - A buffer provides the content for a wl_surface. Buffers are + A buffer provides the content for a wl_surface. Buffers are created through factory interfaces such as wl_drm, wl_shm or - similar. It has a width and a height and can be attached to a + similar. It has a width and a height and can be attached to a wl_surface, but the mechanism by which a client provides and - updates the contents is defined by the buffer factory interface + updates the contents is defined by the buffer factory interface. - Destroy a buffer. This will invalidate the object id. + Destroy a buffer. If and how you need to release the backing + storage is defined by the buffer factory interface. + + For possible side-effects to a surface, see wl_surface.attach. - Sent when an attached buffer is no longer used by the compositor. + Sent when this wl_buffer is no longer used by the compositor. + The client is now free to re-use or destroy this buffer and its + backing storage. + + If a client receives a release event before the frame callback + requested in the same wl_surface.commit that attaches this + wl_buffer to a surface, then the client is immediately free to + re-use the buffer and its backing storage, and does not need a + second buffer for the next surface content update. Typically + this is possible, when the compositor maintains a copy of the + wl_surface contents, e.g. as a GL texture. This is an important + optimization for GL(ES) compositors with wl_shm clients. + + A wl_data_offer represents a piece of data offered for transfer + by another client (the source client). It is used by the + copy-and-paste and drag-and-drop mechanisms. The offer + describes the different mime types that the data can be + converted to and provides the mechanism for transferring the + data directly from the source client. + + Indicate that the client can accept the given mime-type, or @@ -254,6 +317,16 @@ + + To transfer the offered data, the client issues this request + and indicates the mime-type it wants to receive. The transfer + happens through the passed fd (typically a pipe(7) file + descriptor). The source client writes the data in the + mime-type representation requested and then closes the fd. + The receiving client reads from the read end of the pipe until + EOF and the closes its end, at which point the transfer is + complete. + @@ -271,6 +344,13 @@ + + The wl_data_source object is the source side of a wl_data_offer. + It is created by the source client in a data transfer and + provides a way to describe the offered data and a way to respond + to requests to transfer the data. + + This request adds a mime-type to the set of mime-types @@ -307,7 +387,8 @@ - Another selection became active. + This data source has been replaced by another data source. + The client should clean up and destroy this data source. @@ -332,8 +413,15 @@ The icon surface is an optional (can be nil) surface that provides an icon to be moved around with the cursor. Initially, the top-left corner of the icon surface is placed at the cursor - hotspot, but subsequent surface.attach request can move the - relative position. + hotspot, but subsequent wl_surface.attach request can move the + relative position. Attach requests must be confirmed with + wl_surface.commit as usual. + + The current and pending input regions of the icon wl_surface are + cleared, and wl_surface.set_input_region is ignored until the + wl_surface is no longer used as the icon surface. When the use + as an icon ends, the the current and pending input regions + become undefined, and the wl_surface is unmapped. @@ -361,6 +449,13 @@ + + This event is sent when an active drag-and-drop pointer enters + a surface owned by the client. The position of the pointer at + enter time is provided by the @x an @y arguments, in surface + local coordinates. + + @@ -368,9 +463,21 @@ - + + + This event is sent when the drag-and-drop pointer leaves the + surface and the session ends. The client must destroy the + wl_data_offer introduced at enter time at this point. + + + + This event is sent when the drag-and-drop pointer moves within + the currently focused surface. The new position of the pointer + is provided by the @x an @y arguments, in surface local + coordinates. + @@ -597,7 +704,7 @@ The configure event asks the client to resize its surface. The size is a hint, in the sense that the client is free to ignore it if it doesn't resize, pick a smaller size (to - satisfy aspect ration or resize in steps of NxM pixels). The + satisfy aspect ratio or resize in steps of NxM pixels). The client is free to dismiss all but the last configure event it received. @@ -630,9 +737,39 @@ - Copy the contents of a buffer into this surface. The x and y - arguments specify the location of the new buffers upper left - corner, relative to the old buffers upper left corner. + Set the contents of a buffer into this surface. The x and y + arguments specify the location of the new pending buffer's upper + left corner, relative to the current buffer's upper left corner. In + other words, the x and y, and the width and height of the wl_buffer + together define in which directions the surface's size changes. + + Surface contents are double-buffered state, see wl_surface.commit. + + The initial surface contents are void; there is no content. + wl_surface.attach assigns the given wl_buffer as the pending wl_buffer. + wl_surface.commit applies the pending wl_buffer as the new + surface contents, and the size of the surface becomes the size of + the wl_buffer. The wl_buffer is also kept as pending, until + changed by wl_surface.attach or the wl_buffer is destroyed. + + Committing a pending wl_buffer allows the compositor to read the + pixels in the wl_buffer. The compositor may access the pixels at any + time after the wl_surface.commit request. When the compositor will + not access the pixels anymore, it will send the wl_buffer.release + event. Only after receiving wl_buffer.release, the client may re-use + the wl_buffer. A wl_buffer, that has been attached and then replaced + by another attach instead of committed, will not receive a release + event, and is not used by the compositor. + + Destroying the wl_buffer after wl_buffer.release does not change the + surface contents, even if the wl_buffer is still pending for the + next commit. In such case, the next commit does not change the + surface contents. However, if the client destroys the wl_buffer + before receiving wl_buffer.release, the surface contents become + undefined immediately. + + Only if wl_surface.attach is sent with a nil wl_buffer, the + following wl_surface.commit will remove the surface content. @@ -642,10 +779,21 @@ - After attaching a new buffer, this request is used to describe - the regions where the new buffer is different from the - previous buffer and needs to be repainted. Coordinates are - relative to the new buffer. + This request is used to describe the regions where the pending + buffer (or if pending buffer is none, the current buffer as updated + in-place) on the next wl_surface.commit will be different from the + current buffer, and needs to be repainted. The pending buffer can be + set by wl_surface.attach. The compositor ignores the parts of the + damage that fall outside of the surface. + + Damage is double-buffered state, see wl_surface.commit. + + The initial value for pending damage is empty: no damage. + wl_surface.damage adds pending damage: the new pending damage is the + union of old pending damage and the given rectangle. + wl_surface.commit assigns pending damage as the current damage, and + clears pending damage. The server will clear the current damage as + it repaints the surface. @@ -656,10 +804,20 @@ - Request notification when the next frame is displayed. Useful + Request notification when the next frame is displayed. Useful for throttling redrawing operations, and driving animations. + The frame request will take effect on the next wl_surface.commit. The notification will only be posted for one frame unless requested again. + + A server should avoid signalling the frame callbacks if the + surface is not visible in any way, e.g. the surface is off-screen, + or completely obscured by other opaque surfaces. + + A client can request a frame callback even without an attach, + damage, or any other state changes. wl_surface.commit triggers a + display update, so the callback event will arrive after the next + output refresh where the surface is visible. @@ -667,39 +825,77 @@ - This requests sets the region of the surface that contain + This request sets the region of the surface that contains opaque content. The opaque region is an optimization hint for the compositor that lets it optimize out redrawing of content behind opaque regions. Setting an opaque region is not required for correct behaviour, but marking transparent content as opaque will result in repaint artifacts. + The compositor ignores the parts of the opaque region that fall + outside of the surface. - The region will be clipped to the extents of the current - surface size. Setting the region has copy semantics, and the - region object can be destroyed immediately after setting the - opaque region. If a buffer of a different size is attached or - if a nil region is set, the opaque region will revert back to - default. The default opaque region is empty. + Opaque region is double-buffered state, see wl_surface.commit. + + wl_surface.set_opaque_region changes the pending opaque region. + wl_surface.commit copies the pending region to the current region. + Otherwise the pending and current regions are never changed. + + The initial value for opaque region is empty. Setting the pending + opaque region has copy semantics, and the wl_region object can be + destroyed immediately. A nil wl_region causes the pending opaque + region to be set to empty. - + - This requests sets the region of the surface that can receive - pointer and touch events. The region will be clipped to the - extents of the current surface size. Setting the region has - copy semantics, and the region object can be destroyed - immediately after setting the input region. If a buffer of a - different size is attached or if a nil region is passed, the - input region will revert back to default. The default input - region is the entire surface. + This request sets the region of the surface that can receive + pointer and touch events. Input events happening outside of + this region will try the next surface in the server surface + stack. The compositor ignores the parts of the input region that + fall outside of the surface. + + Input region is double-buffered state, see wl_surface.commit. + + wl_surface.set_input_region changes the pending input region. + wl_surface.commit copies the pending region to the current region. + Otherwise the pending and current regions are never changed, + except cursor and icon surfaces are special cases, see + wl_pointer.set_cursor and wl_data_device.start_drag. + + The initial value for input region is infinite. That means the whole + surface will accept input. Setting the pending input region has copy + semantics, and the wl_region object can be destroyed immediately. A + nil wl_region causes the input region to be set to infinite. + + + Surface state (input, opaque, and damage regions, attached buffers, + etc.) is double-buffered. Protocol requests modify the pending + state, as opposed to current state in use by the compositor. Commit + request atomically applies all pending state, replacing the current + state. After commit, the new pending state is as documented for each + related request. + + On commit, a pending wl_buffer is applied first, all other state + second. This means that all coordinates in double-buffered state are + relative to the new wl_buffer coming into use, except for + wl_surface.attach itself. If the pending wl_buffer is none, the + coordinates are relative to the current surface contents. + + All requests that need a commit to become effective are documented + to affect double-buffered state. + + Other interfaces may add further double-buffered surface state. + + + This is emitted whenever a surface's creation, movement, or resizing @@ -776,8 +972,8 @@ Set the pointer surface, i.e., the surface that contains the - pointer image. This request only takes effect if the pointer - focus for this device is one of the requesting client surfaces + pointer image (cursor). This request only takes effect if the pointer + focus for this device is one of the requesting client's surfaces or the surface parameter is the current pointer surface. If there was a previous surface set with this request it is replaced. If surface is NULL, the pointer image is hidden. @@ -789,11 +985,18 @@ On surface.attach requests to the pointer surface, hotspot_x and hotspot_y are decremented by the x and y parameters - passed to the request. + passed to the request. Attach must be confirmed by + wl_surface.commit as usual. - The hotspot can also be updated by passing the current set + The hotspot can also be updated by passing the currently set pointer surface to this request with new values for hotspot_x - and/or hotspot_y. + and hotspot_y. + + The current and pending input regions of the wl_surface are + cleared, and wl_surface.set_input_region is ignored until the + wl_surface is no longer used as the cursor. When the use as a + cursor ends, the current and pending input regions become + undefined, and the wl_surface is unmapped. @@ -864,6 +1067,21 @@ Scroll and other axis notifications. + + For scroll events (vertical and horizontal scroll axes), the + value parameter is the length of a vector along the specified + axis in a coordinate space identical to those of motion events, + representing a relative movement along the specified axis. + + For devices that support movements non-parallel to axes multiple + axis events will be emitted. + + When applicable, for example for touch pads, the server can + choose to emit scroll events where the motion vector is + equivalent to a motion event vector. + + When applicable, clients can transform its view relative to the + scroll distance. @@ -908,11 +1126,9 @@ Describes the physical state of a key which provoked the key event. - When a key repeats, the sequence is down -> repeat -> repeat -> up. - @@ -1008,7 +1224,7 @@ output device. The flipped values correspond to an initial flip around a - vertical axis followed by rotaion. + vertical axis followed by rotation. The purpose is mainly to allow clients render accordingly and tell the compositor, so that for fullscreen surfaces, the diff -Nru wayland-0.95.0/src/Makefile.in wayland-1.0.0/src/Makefile.in --- wayland-0.95.0/src/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/src/Makefile.in 2012-10-22 18:55:21.000000000 +0000 @@ -189,6 +189,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ diff -Nru wayland-0.95.0/src/connection.c wayland-1.0.0/src/connection.c --- wayland-0.95.0/src/connection.c 2012-07-24 00:17:10.000000000 +0000 +++ wayland-1.0.0/src/connection.c 2012-10-16 15:24:31.000000000 +0000 @@ -44,7 +44,7 @@ struct wl_buffer { char data[4096]; - int head, tail; + uint32_t head, tail; }; #define MASK(i) ((i) & 4095) @@ -56,10 +56,7 @@ struct wl_buffer in, out; struct wl_buffer fds_in, fds_out; int fd; - void *data; - wl_connection_update_func_t update; - struct wl_closure receive_closure, send_closure; - int write_signalled; + int want_flush; }; union wl_value { @@ -73,7 +70,7 @@ static void wl_buffer_put(struct wl_buffer *b, const void *data, size_t count) { - int head, size; + uint32_t head, size; head = MASK(b->head); if (head + count <= sizeof b->data) { @@ -90,7 +87,7 @@ static void wl_buffer_put_iov(struct wl_buffer *b, struct iovec *iov, int *count) { - int head, tail; + uint32_t head, tail; head = MASK(b->head); tail = MASK(b->tail); @@ -114,7 +111,7 @@ static void wl_buffer_get_iov(struct wl_buffer *b, struct iovec *iov, int *count) { - int head, tail; + uint32_t head, tail; head = MASK(b->head); tail = MASK(b->tail); @@ -138,7 +135,7 @@ static void wl_buffer_copy(struct wl_buffer *b, void *data, size_t count) { - int tail, size; + uint32_t tail, size; tail = MASK(b->tail); if (tail + count <= sizeof b->data) { @@ -150,16 +147,14 @@ } } -static int +static uint32_t wl_buffer_size(struct wl_buffer *b) { return b->head - b->tail; } struct wl_connection * -wl_connection_create(int fd, - wl_connection_update_func_t update, - void *data) +wl_connection_create(int fd) { struct wl_connection *connection; @@ -168,19 +163,34 @@ return NULL; memset(connection, 0, sizeof *connection); connection->fd = fd; - connection->update = update; - connection->data = data; - - connection->update(connection, - WL_CONNECTION_READABLE, - connection->data); return connection; } +static void +close_fds(struct wl_buffer *buffer, int max) +{ + int32_t fds[sizeof(buffer->data) / sizeof(int32_t)], i, count; + size_t size; + + size = buffer->head - buffer->tail; + if (size == 0) + return; + + wl_buffer_copy(buffer, fds, size); + count = size / sizeof fds[0]; + if (max > 0 && max < count) + count = max; + for (i = 0; i < count; i++) + close(fds[i]); + buffer->tail += size; +} + void wl_connection_destroy(struct wl_connection *connection) { + close_fds(&connection->fds_out, -1); + close_fds(&connection->fds_in, -1); close(connection->fd); free(connection); } @@ -204,6 +214,9 @@ size_t size; size = buffer->head - buffer->tail; + if (size > MAX_FDS_OUT * sizeof(int32_t)) + size = MAX_FDS_OUT * sizeof(int32_t); + if (size > 0) { cmsg = (struct cmsghdr *) data; cmsg->cmsg_level = SOL_SOCKET; @@ -216,48 +229,53 @@ } } -static void -close_fds(struct wl_buffer *buffer) -{ - int fds[MAX_FDS_OUT], i, count; - size_t size; - - size = buffer->head - buffer->tail; - if (size == 0) - return; - - wl_buffer_copy(buffer, fds, size); - count = size / sizeof fds[0]; - for (i = 0; i < count; i++) - close(fds[i]); - buffer->tail += size; -} - -static void +static int decode_cmsg(struct wl_buffer *buffer, struct msghdr *msg) { struct cmsghdr *cmsg; - size_t size; + size_t size, max, i; + int overflow = 0; for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) { - if (cmsg->cmsg_level == SOL_SOCKET && - cmsg->cmsg_type == SCM_RIGHTS) { - size = cmsg->cmsg_len - CMSG_LEN(0); + if (cmsg->cmsg_level != SOL_SOCKET || + cmsg->cmsg_type != SCM_RIGHTS) + continue; + + size = cmsg->cmsg_len - CMSG_LEN(0); + max = sizeof(buffer->data) - wl_buffer_size(buffer); + if (size > max || overflow) { + overflow = 1; + size /= sizeof(int32_t); + for (i = 0; i < size; ++i) + close(((int*)CMSG_DATA(cmsg))[i]); + } else { wl_buffer_put(buffer, CMSG_DATA(cmsg), size); } } + + if (overflow) { + errno = EOVERFLOW; + return -1; + } + + return 0; } int -wl_connection_data(struct wl_connection *connection, uint32_t mask) +wl_connection_flush(struct wl_connection *connection) { struct iovec iov[2]; struct msghdr msg; char cmsg[CLEN]; - int len, count, clen; + int len = 0, count, clen; + uint32_t tail; + + if (!connection->want_flush) + return 0; - if (mask & WL_CONNECTION_WRITABLE) { + tail = connection->out.tail; + while (connection->out.head - connection->out.tail > 0) { wl_buffer_get_iov(&connection->out, iov, &count); build_cmsg(&connection->fds_out, cmsg, &clen); @@ -273,58 +291,56 @@ do { len = sendmsg(connection->fd, &msg, MSG_NOSIGNAL | MSG_DONTWAIT); - } while (len < 0 && errno == EINTR); + } while (len == -1 && errno == EINTR); - if (len == -1 && errno == EPIPE) { + if (len == -1) return -1; - } else if (len < 0) { - fprintf(stderr, - "write error for connection %p, fd %d: %m\n", - connection, connection->fd); - return -1; - } - close_fds(&connection->fds_out); + close_fds(&connection->fds_out, MAX_FDS_OUT); connection->out.tail += len; - if (connection->out.tail == connection->out.head && - connection->write_signalled) { - connection->update(connection, - WL_CONNECTION_READABLE, - connection->data); - connection->write_signalled = 0; - } } - if (mask & WL_CONNECTION_READABLE) { - wl_buffer_put_iov(&connection->in, iov, &count); + connection->want_flush = 0; - msg.msg_name = NULL; - msg.msg_namelen = 0; - msg.msg_iov = iov; - msg.msg_iovlen = count; - msg.msg_control = cmsg; - msg.msg_controllen = sizeof cmsg; - msg.msg_flags = 0; + return connection->out.head - tail; +} - do { - len = wl_os_recvmsg_cloexec(connection->fd, &msg, 0); - } while (len < 0 && errno == EINTR); +int +wl_connection_read(struct wl_connection *connection) +{ + struct iovec iov[2]; + struct msghdr msg; + char cmsg[CLEN]; + int len, count, ret; - if (len < 0) { - fprintf(stderr, - "read error from connection %p: %m (%d)\n", - connection, errno); - return -1; - } else if (len == 0) { - /* FIXME: Handle this better? */ - return -1; - } + if (wl_buffer_size(&connection->in) >= sizeof(connection->in.data)) { + errno = EOVERFLOW; + return -1; + } - decode_cmsg(&connection->fds_in, &msg); + wl_buffer_put_iov(&connection->in, iov, &count); + + msg.msg_name = NULL; + msg.msg_namelen = 0; + msg.msg_iov = iov; + msg.msg_iovlen = count; + msg.msg_control = cmsg; + msg.msg_controllen = sizeof cmsg; + msg.msg_flags = 0; + + do { + len = wl_os_recvmsg_cloexec(connection->fd, &msg, 0); + } while (len < 0 && errno == EINTR); + + if (len <= 0) + return len; + + ret = decode_cmsg(&connection->fds_in, &msg); + if (ret) + return -1; - connection->in.head += len; - } + connection->in.head += len; return connection->in.head - connection->in.tail; } @@ -334,19 +350,14 @@ const void *data, size_t count) { if (connection->out.head - connection->out.tail + - count > ARRAY_LENGTH(connection->out.data)) - if (wl_connection_data(connection, WL_CONNECTION_WRITABLE)) + count > ARRAY_LENGTH(connection->out.data)) { + connection->want_flush = 1; + if (wl_connection_flush(connection) < 0) return -1; + } wl_buffer_put(&connection->out, data, count); - - if (!connection->write_signalled) { - connection->update(connection, - WL_CONNECTION_READABLE | - WL_CONNECTION_WRITABLE, - connection->data); - connection->write_signalled = 1; - } + connection->want_flush = 1; return 0; } @@ -356,9 +367,11 @@ const void *data, size_t count) { if (connection->out.head - connection->out.tail + - count > ARRAY_LENGTH(connection->out.data)) - if (wl_connection_data(connection, WL_CONNECTION_WRITABLE)) + count > ARRAY_LENGTH(connection->out.data)) { + connection->want_flush = 1; + if (wl_connection_flush(connection) < 0) return -1; + } wl_buffer_put(&connection->out, data, count); @@ -395,9 +408,11 @@ static int wl_connection_put_fd(struct wl_connection *connection, int32_t fd) { - if (wl_buffer_size(&connection->fds_out) == MAX_FDS_OUT * sizeof fd) - if (wl_connection_data(connection, WL_CONNECTION_WRITABLE)) + if (wl_buffer_size(&connection->fds_out) == MAX_FDS_OUT * sizeof fd) { + connection->want_flush = 1; + if (wl_connection_flush(connection) < 0) return -1; + } wl_buffer_put(&connection->fds_out, &fd, sizeof fd); @@ -436,7 +451,7 @@ { struct wl_closure *closure; struct wl_object **objectp, *object; - uint32_t length, *p, *start, size, *end; + uint32_t length, aligned, *p, *start, size, *end; int dup_fd; struct wl_array **arrayp, *array; const char **sp, *s; @@ -497,17 +512,19 @@ goto err_null; length = s ? strlen(s) + 1: 0; - if (p + DIV_ROUNDUP(length, sizeof *p) + 1 > end) + aligned = (length + 3) & ~3; + if (p + aligned / sizeof *p + 1 > end) goto err; *p++ = length; - if (length > 0) + if (length > 0) { + memcpy(p, s, length); *sp = (const char *) p; - else + } else *sp = NULL; - memcpy(p, s, length); - p += DIV_ROUNDUP(length, sizeof *p); + memset((char *) p + length, 0, aligned - length); + p += aligned / sizeof *p; break; case 'o': closure->types[i] = &ffi_type_pointer; @@ -610,6 +627,7 @@ printf("request too big to marshal, maximum size is %zu\n", sizeof closure->buffer); errno = ENOMEM; + free(closure); return NULL; @@ -635,7 +653,6 @@ unsigned int i, count, extra_space; const char *signature = message->signature; struct argument_details arg; - struct wl_object **object; struct wl_array **array; struct wl_closure *closure; @@ -719,38 +736,15 @@ break; case 'o': closure->types[i] = &ffi_type_pointer; - object = (struct wl_object **) extra; - extra += sizeof *object; - closure->args[i] = object; + id = (uint32_t **) extra; + extra += sizeof *id; + closure->args[i] = id; + *id = p; - if (*p == 0 && !arg.nullable) { - printf("NULL new ID received on non-nullable " + if (**id == 0 && !arg.nullable) { + printf("NULL object received on non-nullable " "type, message %s(%s)\n", message->name, message->signature); - *object = NULL; - errno = EINVAL; - goto err; - } - - *object = wl_map_lookup(objects, *p); - if (*object == WL_ZOMBIE_OBJECT) { - /* references object we've already - * destroyed client side */ - *object = NULL; - } else if (*object == NULL && *p != 0) { - printf("unknown object (%u), message %s(%s)\n", - *p, message->name, message->signature); - *object = NULL; - errno = EINVAL; - goto err; - } - - if (*object != NULL && message->types[i-2] != NULL && - (*object)->interface != message->types[i-2]) { - printf("invalid object (%u), type (%s), " - "message %s(%s)\n", - *p, (*object)->interface->name, - message->name, message->signature); errno = EINVAL; goto err; } @@ -764,7 +758,7 @@ closure->args[i] = id; *id = p; - if (*id == 0 && !arg.nullable) { + if (**id == 0 && !arg.nullable) { printf("NULL new ID received on non-nullable " "type, message %s(%s)\n", message->name, message->signature); @@ -841,6 +835,67 @@ return NULL; } +static int +interface_equal(const struct wl_interface *a, const struct wl_interface *b) +{ + /* In most cases the pointer equality test is sufficient. + * However, in some cases, depending on how things are split + * across shared objects, we can end up with multiple + * instances of the interface metadata constants. So if the + * pointers match, the interfaces are equal, if they don't + * match we have to compare the interface names. */ + + return a == b || strcmp(a->name, b->name) == 0; +} + +int +wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects) +{ + struct wl_object **object; + const struct wl_message *message; + const char *signature; + struct argument_details arg; + int i, count; + uint32_t id; + + message = closure->message; + signature = message->signature; + count = arg_count_for_signature(signature) + 2; + for (i = 2; i < count; i++) { + signature = get_next_argument(signature, &arg); + switch (arg.type) { + case 'o': + id = **(uint32_t **) closure->args[i]; + object = closure->args[i]; + *object = wl_map_lookup(objects, id); + if (*object == WL_ZOMBIE_OBJECT) { + /* references object we've already + * destroyed client side */ + *object = NULL; + } else if (*object == NULL && id != 0) { + printf("unknown object (%u), message %s(%s)\n", + id, message->name, message->signature); + *object = NULL; + errno = EINVAL; + return -1; + } + + if (*object != NULL && message->types[i-2] != NULL && + !interface_equal((*object)->interface, + message->types[i-2])) { + printf("invalid object (%u), type (%s), " + "message %s(%s)\n", + id, (*object)->interface->name, + message->name, message->signature); + errno = EINVAL; + return -1; + } + } + } + + return 0; +} + void wl_closure_invoke(struct wl_closure *closure, struct wl_object *target, void (*func)(void), void *data) @@ -963,8 +1018,7 @@ if (send && value->new_id != 0) fprintf(stderr, "%u", value->new_id); else if (!send && value->object != NULL) - fprintf(stderr, "%u", - *((uint32_t *)value->object)); + fprintf(stderr, "%u", value->object->id); else fprintf(stderr, "nil"); break; diff -Nru wayland-0.95.0/src/data-device.c wayland-1.0.0/src/data-device.c --- wayland-0.95.0/src/data-device.c 2012-07-22 15:29:33.000000000 +0000 +++ wayland-1.0.0/src/data-device.c 2012-10-20 02:58:21.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include "wayland-private.h" #include "wayland-server.h" static void @@ -228,16 +229,9 @@ static void data_device_end_drag_grab(struct wl_seat *seat) { - struct wl_resource *surface_resource; - struct wl_surface_interface *implementation; - if (seat->drag_surface) { - surface_resource = &seat->drag_surface->resource; - implementation = (struct wl_surface_interface *) - surface_resource->object.implementation; - - implementation->attach(surface_resource->client, - surface_resource, NULL, 0, 0); + seat->drag_surface = NULL; + wl_signal_emit(&seat->drag_icon_signal, NULL); wl_list_remove(&seat->drag_icon_listener.link); } @@ -247,7 +241,6 @@ wl_pointer_end_grab(seat->pointer); seat->drag_data_source = NULL; - seat->drag_surface = NULL; seat->drag_client = NULL; } diff -Nru wayland-0.95.0/src/event-loop.c wayland-1.0.0/src/event-loop.c --- wayland-0.95.0/src/event-loop.c 2012-05-08 14:38:40.000000000 +0000 +++ wayland-1.0.0/src/event-loop.c 2012-10-19 21:04:07.000000000 +0000 @@ -35,6 +35,7 @@ #include #include #include "wayland-server.h" +#include "wayland-private.h" #include "wayland-os.h" struct wl_event_loop { @@ -75,6 +76,10 @@ mask |= WL_EVENT_READABLE; if (ep->events & EPOLLOUT) mask |= WL_EVENT_WRITABLE; + if (ep->events & EPOLLHUP) + mask |= WL_EVENT_HANGUP; + if (ep->events & EPOLLERR) + mask |= WL_EVENT_ERROR; return fd_source->func(fd_source->fd, mask, source->data); } @@ -378,8 +383,8 @@ return n; } -static void -dispatch_idle_sources(struct wl_event_loop *loop) +WL_EXPORT void +wl_event_loop_dispatch_idle(struct wl_event_loop *loop) { struct wl_event_source_idle *source; @@ -398,16 +403,16 @@ struct wl_event_source *source; int i, count, n; - dispatch_idle_sources(loop); + wl_event_loop_dispatch_idle(loop); count = epoll_wait(loop->epoll_fd, ep, ARRAY_LENGTH(ep), timeout); if (count < 0) return -1; - n = 0; + for (i = 0; i < count; i++) { source = ep[i].data.ptr; if (source->fd != -1) - n += source->interface->dispatch(source, &ep[i]); + source->interface->dispatch(source, &ep[i]); } wl_event_loop_process_destroy_list(loop); diff -Nru wayland-0.95.0/src/scanner.c wayland-1.0.0/src/scanner.c --- wayland-0.95.0/src/scanner.c 2012-07-24 00:16:57.000000000 +0000 +++ wayland-1.0.0/src/scanner.c 2012-10-22 02:22:54.000000000 +0000 @@ -127,6 +127,18 @@ unsigned int character_data_length; }; +static int +list_length(struct wl_list *list) +{ + struct wl_list *l; + int i; + + for (i = 0, l = list->next; l != list; i++, l = l->next) + ; + + return i; +} + static char * uppercase_dup(const char *src) { @@ -158,15 +170,17 @@ } static void -desc_dump(const char *fmt, ...) +desc_dump(char *desc, const char *fmt, ...) __attribute__((format(printf,2,3))); + +static void +desc_dump(char *desc, const char *fmt, ...) { va_list ap; - char buf[128], *desc, hang; - int col, i, j, k, startcol; + char buf[128], hang; + int col, i, j, k, startcol, newlines; va_start(ap, fmt); vsnprintf(buf, sizeof buf, fmt, ap); - desc = va_arg(ap, char *); va_end(ap); for (i = 0, col = 0; buf[i] != '*'; i++) { @@ -192,8 +206,12 @@ for (i = 0; desc[i]; ) { k = i; - while (desc[i] && isspace(desc[i])) + newlines = 0; + while (desc[i] && isspace(desc[i])) { + if (desc[i] == '\n') + newlines++; i++; + } if (!desc[i]) break; @@ -201,7 +219,9 @@ while (desc[i] && !isspace(desc[i])) i++; - if (col + i - j > 72) { + if (newlines > 1) + printf("\n%s*", indent(startcol)); + if (newlines > 1 || col + i - j > 72) { printf("\n%s*%c", indent(startcol), hang); col = startcol; } @@ -348,6 +368,9 @@ ctx->message = message; } else if (strcmp(element_name, "arg") == 0) { + if (name == NULL) + fail(ctx, "no argument name given"); + arg = malloc(sizeof *arg); arg->name = strdup(name); @@ -374,9 +397,10 @@ switch (arg->type) { case NEW_ID: case OBJECT: - if (interface_name == NULL) - fail(ctx, "no interface name given"); - arg->interface_name = strdup(interface_name); + if (interface_name) + arg->interface_name = strdup(interface_name); + else + arg->interface_name = NULL; break; default: if (interface_name != NULL) @@ -433,10 +457,7 @@ fail(ctx, "description without summary"); description = malloc(sizeof *description); - if (summary) - description->summary = strdup(summary); - else - description->summary = NULL; + description->summary = strdup(summary); if (ctx->message) ctx->message->description = description; @@ -460,10 +481,9 @@ strndup(ctx->character_data, ctx->character_data_length); } else if (strcmp(name, "description") == 0) { - char *text = strndup(ctx->character_data, - ctx->character_data_length); - if (text) - ctx->description->text = text; + ctx->description->text = + strndup(ctx->character_data, + ctx->character_data_length); ctx->description = NULL; } else if (strcmp(name, "request") == 0 || strcmp(name, "event") == 0) { @@ -539,10 +559,6 @@ struct arg *a, *ret; int has_destructor, has_destroy; - /* We provide a hand written functions for the display object */ - if (strcmp(interface->name, "wl_display") == 0) - return; - printf("static inline void\n" "%s_set_user_data(struct %s *%s, void *user_data)\n" "{\n" @@ -575,7 +591,7 @@ exit(EXIT_FAILURE); } - if (!has_destructor) + if (!has_destructor && strcmp(interface->name, "wl_display") != 0) printf("static inline void\n" "%s_destroy(struct %s *%s)\n" "{\n" @@ -595,7 +611,9 @@ ret = a; } - if (ret) + if (ret && ret->interface_name == NULL) + printf("static inline void *\n"); + else if (ret) printf("static inline struct %s *\n", ret->interface_name); else @@ -606,7 +624,11 @@ interface->name, interface->name); wl_list_for_each(a, &m->arg_list, link) { - if (a->type == NEW_ID) + if (a->type == NEW_ID && a->interface_name == NULL) { + printf(", const struct wl_interface *interface" + ", uint32_t version"); + continue; + } else if (a->type == NEW_ID) continue; printf(", "); emit_type(a); @@ -615,17 +637,21 @@ printf(")\n" "{\n"); - if (ret) + if (ret) { printf("\tstruct wl_proxy *%s;\n\n" "\t%s = wl_proxy_create(" - "(struct wl_proxy *) %s,\n" - "\t\t\t &%s_interface);\n" - "\tif (!%s)\n" + "(struct wl_proxy *) %s,\n", + ret->name, ret->name, interface->name); + if (ret->interface_name == NULL) + printf("\t\t\t interface);\n"); + else + printf("\t\t\t &%s_interface);\n", + ret->interface_name); + + printf("\tif (!%s)\n" "\t\treturn NULL;\n\n", - ret->name, - ret->name, - interface->name, ret->interface_name, ret->name); + } printf("\twl_proxy_marshal((struct wl_proxy *) %s,\n" "\t\t\t %s_%s", @@ -634,8 +660,10 @@ m->uppercase_name); wl_list_for_each(a, &m->arg_list, link) { + if (a->type == NEW_ID && a->interface_name == NULL) + printf(", interface->name, version"); printf(", "); - printf("%s", a->name); + printf("%s", a->name); } printf(");\n"); @@ -644,7 +672,9 @@ "(struct wl_proxy *) %s);\n", interface->name); - if (ret) + if (ret && ret->interface_name == NULL) + printf("\n\treturn (void *) %s;\n", ret->name); + else if (ret) printf("\n\treturn (struct %s *) %s;\n", ret->interface_name, ret->name); @@ -709,18 +739,19 @@ if (desc) { printf("/**\n"); - desc_dump(" * %s_%s - ", - interface->name, e->name, desc->summary); + desc_dump(desc->summary, + " * %s_%s - ", + interface->name, e->name); wl_list_for_each(entry, &e->entry_list, link) { - desc_dump(" * @%s_%s_%s: ", + desc_dump(entry->summary, + " * @%s_%s_%s: ", interface->uppercase_name, e->uppercase_name, - entry->uppercase_name, - entry->summary); + entry->uppercase_name); } if (desc->text) { printf(" *\n"); - desc_dump(" * ", desc->text); + desc_dump(desc->text, " * "); } printf(" */\n"); } @@ -750,14 +781,15 @@ if (interface->description) { struct description *desc = interface->description; printf("/**\n"); - desc_dump(" * %s - ", interface->name, desc->summary); + desc_dump(desc->summary, " * %s - ", interface->name); wl_list_for_each(m, message_list, link) { struct description *mdesc = m->description; - desc_dump(" * @%s: ", - m->name, mdesc ? mdesc->summary : "(none)"); + desc_dump(mdesc ? mdesc->summary : "(none)", + " * @%s: ", + m->name); } printf(" *\n"); - desc_dump(" * ", desc->text); + desc_dump(desc->text, " * "); printf(" */\n"); } printf("struct %s_%s {\n", interface->name, @@ -767,15 +799,22 @@ struct description *mdesc = m->description; printf("\t/**\n"); - desc_dump("\t * %s - ", - m->name, mdesc ? mdesc->summary : "(none)"); + desc_dump(mdesc ? mdesc->summary : "(none)", + "\t * %s - ", m->name); wl_list_for_each(a, &m->arg_list, link) { - desc_dump("\t * @%s: ", - a->name, a->summary ? a->summary : "(none)"); + + if (is_interface && a->type == NEW_ID && + a->interface_name == NULL) + printf("\t * @interface: name of the objects interface\n" + "\t * @version: version of the objects interface\n"); + + + desc_dump(a->summary ? a->summary : "(none)", + "\t * @%s: ", a->name); } if (mdesc) { printf("\t *\n"); - desc_dump("\t * ", mdesc->text, 8, 0); + desc_dump(mdesc->text, "\t * "); } if (m->since > 1) { printf("\t * @since: %d\n", m->since); @@ -799,6 +838,11 @@ if (is_interface && a->type == OBJECT) printf("struct wl_resource *"); + else if (is_interface && a->type == NEW_ID && a->interface_name == NULL) + printf("const char *interface, uint32_t version, uint32_t "); + else if (!is_interface && a->type == OBJECT && a->interface_name == NULL) + printf("struct wl_object *"); + else if (!is_interface && a->type == NEW_ID) printf("struct %s *", a->interface_name); else @@ -925,6 +969,9 @@ switch (a->type) { case NEW_ID: case OBJECT: + if (!a->interface_name) + continue; + m->all_null = 0; printf("extern const struct wl_interface %s_interface;\n", a->interface_name); @@ -968,8 +1015,7 @@ switch (a->type) { case NEW_ID: case OBJECT: - if (strcmp(a->interface_name, - "wl_object") != 0) + if (a->interface_name) printf("\t&%s_interface,\n", a->interface_name); else @@ -1009,6 +1055,8 @@ printf("i"); break; case NEW_ID: + if (a->interface_name == NULL) + printf("su"); printf("n"); break; case UNSIGNED: @@ -1074,14 +1122,14 @@ i->name, i->name, i->version); if (!wl_list_empty(&i->request_list)) - printf("\tARRAY_LENGTH(%s_requests), %s_requests,\n", - i->name, i->name); + printf("\t%d, %s_requests,\n", + list_length(&i->request_list), i->name); else printf("\t0, NULL,\n"); if (!wl_list_empty(&i->event_list)) - printf("\tARRAY_LENGTH(%s_events), %s_events,\n", - i->name, i->name); + printf("\t%d, %s_events,\n", + list_length(&i->event_list), i->name); else printf("\t0, NULL,\n"); @@ -1103,6 +1151,7 @@ protocol.type_index = 0; protocol.null_run_length = 0; protocol.copyright = NULL; + memset(&ctx, 0, sizeof ctx); ctx.protocol = &protocol; ctx.filename = ""; diff -Nru wayland-0.95.0/src/wayland-client-protocol.h wayland-1.0.0/src/wayland-client-protocol.h --- wayland-0.95.0/src/wayland-client-protocol.h 2012-07-24 19:45:24.000000000 +0000 +++ wayland-1.0.0/src/wayland-client-protocol.h 2012-10-22 18:55:33.000000000 +0000 @@ -39,6 +39,7 @@ struct wl_resource; struct wl_display; +struct wl_registry; struct wl_callback; struct wl_compositor; struct wl_shm_pool; @@ -59,6 +60,7 @@ struct wl_region; extern const struct wl_interface wl_display_interface; +extern const struct wl_interface wl_registry_interface; extern const struct wl_interface wl_callback_interface; extern const struct wl_interface wl_compositor_interface; extern const struct wl_interface wl_shm_pool_interface; @@ -100,12 +102,10 @@ /** * wl_display - core global object * @error: fatal error event - * @global: announce global object - * @global_remove: announce removal of global object * @delete_id: acknowledge object id deletion * * The core global object. This is a special singleton object. It is used - * for internal wayland protocol features. + * for internal Wayland protocol features. */ struct wl_display_listener { /** @@ -115,7 +115,12 @@ * @message: (none) * * The error event is sent out when a fatal (non-recoverable) - * error has occurred. + * error has occurred. The @object_id argument is the object where + * the error occurred, most often in response to a request to that + * object. The @code identifies the error and is defined by the + * object interface. As such, each interface defines its own set of + * error codes. The @message is an brief description of the error, + * for (debugging) convenience. */ void (*error)(void *data, struct wl_display *wl_display, @@ -123,21 +128,108 @@ uint32_t code, const char *message); /** + * delete_id - acknowledge object id deletion + * @id: (none) + * + * This event is used internally by the object ID management + * logic. When a client deletes an object, the server will send + * this event to acknowledge that it has seen the delete request. + * When the client receive this event, it will know that it can + * safely reuse the object ID + */ + void (*delete_id)(void *data, + struct wl_display *wl_display, + uint32_t id); +}; + +static inline int +wl_display_add_listener(struct wl_display *wl_display, + const struct wl_display_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_display, + (void (**)(void)) listener, data); +} + +#define WL_DISPLAY_SYNC 0 +#define WL_DISPLAY_GET_REGISTRY 1 + +static inline void +wl_display_set_user_data(struct wl_display *wl_display, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data); +} + +static inline void * +wl_display_get_user_data(struct wl_display *wl_display) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_display); +} + +static inline struct wl_callback * +wl_display_sync(struct wl_display *wl_display) +{ + struct wl_proxy *callback; + + callback = wl_proxy_create((struct wl_proxy *) wl_display, + &wl_callback_interface); + if (!callback) + return NULL; + + wl_proxy_marshal((struct wl_proxy *) wl_display, + WL_DISPLAY_SYNC, callback); + + return (struct wl_callback *) callback; +} + +static inline struct wl_registry * +wl_display_get_registry(struct wl_display *wl_display) +{ + struct wl_proxy *callback; + + callback = wl_proxy_create((struct wl_proxy *) wl_display, + &wl_registry_interface); + if (!callback) + return NULL; + + wl_proxy_marshal((struct wl_proxy *) wl_display, + WL_DISPLAY_GET_REGISTRY, callback); + + return (struct wl_registry *) callback; +} + +/** + * wl_registry - global registry object + * @global: announce global object + * @global_remove: announce removal of global object + * + * The global registry object. The server has a number of global objects + * that are available to all clients. These objects typically represent an + * actual object in the server (for example, an input device) or they are + * singleton objects that provides extension functionality. + * + * When a client creates a registry object, the registry object will emit a + * global event for each global currently in the regitry. Globals come and + * go as a result of device hotplugs, reconfiguration or other events, and + * the registry will send out @global and @global_remove events to keep the + * client up to date with the changes. To mark the end of the initial burst + * of events, the client can use the wl_display.sync request immediately + * after calling wl_display.get_registry. + * + * A client can 'bind' to a global object by using the bind request. This + * creates a client side handle that lets the object emit events to the + * client and lets the client invoke requests on the object. + */ +struct wl_registry_listener { + /** * global - announce global object * @name: (none) * @interface: (none) * @version: (none) * - * Notify the client of global objects. These are objects that - * are created by the server. Globals are published on the initial - * client connection sequence, upon device hotplugs, device - * disconnects, reconfiguration or other events. A client can - * 'bind' to a global object by using the bind request. This - * creates a client side handle that lets the object emit events to - * the client and lets the client invoke requests on the object. + * Notify the client of global objects. */ void (*global)(void *data, - struct wl_display *wl_display, + struct wl_registry *wl_registry, uint32_t name, const char *interface, uint32_t version); @@ -145,32 +237,62 @@ * global_remove - announce removal of global object * @name: (none) * - * Notify the client of removed global objects. + * Notify the client of removed global objects. This event + * notifies the client that the global identifies by @name is no + * longer available. If the client bound to the global using the + * 'bind' request, the client should now destroy that object. The + * object remains valid and requests to the object will be ignored + * until the client destroys it, to avoid races between the global + * going away and a client sending a request to it. */ void (*global_remove)(void *data, - struct wl_display *wl_display, + struct wl_registry *wl_registry, uint32_t name); - /** - * delete_id - acknowledge object id deletion - * @id: (none) - * - * Server has deleted the id and client can now reuse it. - */ - void (*delete_id)(void *data, - struct wl_display *wl_display, - uint32_t id); }; static inline int -wl_display_add_listener(struct wl_display *wl_display, - const struct wl_display_listener *listener, void *data) +wl_registry_add_listener(struct wl_registry *wl_registry, + const struct wl_registry_listener *listener, void *data) { - return wl_proxy_add_listener((struct wl_proxy *) wl_display, + return wl_proxy_add_listener((struct wl_proxy *) wl_registry, (void (**)(void)) listener, data); } -#define WL_DISPLAY_BIND 0 -#define WL_DISPLAY_SYNC 1 +#define WL_REGISTRY_BIND 0 + +static inline void +wl_registry_set_user_data(struct wl_registry *wl_registry, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_registry, user_data); +} + +static inline void * +wl_registry_get_user_data(struct wl_registry *wl_registry) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_registry); +} + +static inline void +wl_registry_destroy(struct wl_registry *wl_registry) +{ + wl_proxy_destroy((struct wl_proxy *) wl_registry); +} + +static inline void * +wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const struct wl_interface *interface, uint32_t version) +{ + struct wl_proxy *id; + + id = wl_proxy_create((struct wl_proxy *) wl_registry, + interface); + if (!id) + return NULL; + + wl_proxy_marshal((struct wl_proxy *) wl_registry, + WL_REGISTRY_BIND, name, interface->name, version, id); + + return (void *) id; +} struct wl_callback_listener { /** @@ -394,14 +516,24 @@ * through factory interfaces such as wl_drm, wl_shm or similar. It has a * width and a height and can be attached to a wl_surface, but the * mechanism by which a client provides and updates the contents is defined - * by the buffer factory interface + * by the buffer factory interface. */ struct wl_buffer_listener { /** * release - compositor releases buffer * - * Sent when an attached buffer is no longer used by the - * compositor. + * Sent when this wl_buffer is no longer used by the compositor. + * The client is now free to re-use or destroy this buffer and its + * backing storage. + * + * If a client receives a release event before the frame callback + * requested in the same wl_surface.commit that attaches this + * wl_buffer to a surface, then the client is immediately free to + * re-use the buffer and its backing storage, and does not need a + * second buffer for the next surface content update. Typically + * this is possible, when the compositor maintains a copy of the + * wl_surface contents, e.g. as a GL texture. This is an important + * optimization for GL(ES) compositors with wl_shm clients. */ void (*release)(void *data, struct wl_buffer *wl_buffer); @@ -438,6 +570,16 @@ wl_proxy_destroy((struct wl_proxy *) wl_buffer); } +/** + * wl_data_offer - offer to transfer data + * @offer: advertise offered mime-type + * + * A wl_data_offer represents a piece of data offered for transfer by + * another client (the source client). It is used by the copy-and-paste and + * drag-and-drop mechanisms. The offer describes the different mime types + * that the data can be converted to and provides the mechanism for + * transferring the data directly from the source client. + */ struct wl_data_offer_listener { /** * offer - advertise offered mime-type @@ -498,6 +640,17 @@ wl_proxy_destroy((struct wl_proxy *) wl_data_offer); } +/** + * wl_data_source - offer to transfer data + * @target: a target accepts an offered mime-type + * @send: send the data + * @cancelled: selection was cancelled + * + * The wl_data_source object is the source side of a wl_data_offer. It is + * created by the source client in a data transfer and provides a way to + * describe the offered data and a way to respond to requests to transfer + * the data. + */ struct wl_data_source_listener { /** * target - a target accepts an offered mime-type @@ -524,7 +677,8 @@ /** * cancelled - selection was cancelled * - * Another selection became active. + * This data source has been replaced by another data source. The + * client should clean up and destroy this data source. */ void (*cancelled)(void *data, struct wl_data_source *wl_data_source); @@ -586,12 +740,17 @@ struct wl_data_device *wl_data_device, struct wl_data_offer *id); /** - * enter - (none) + * enter - initiate drag and drop session * @serial: (none) * @surface: (none) * @x: (none) * @y: (none) * @id: (none) + * + * This event is sent when an active drag-and-drop pointer enters + * a surface owned by the client. The position of the pointer at + * enter time is provided by the @x an @y arguments, in surface + * local coordinates. */ void (*enter)(void *data, struct wl_data_device *wl_data_device, @@ -601,15 +760,24 @@ wl_fixed_t y, struct wl_data_offer *id); /** - * leave - (none) + * leave - end drag and drop session + * + * This event is sent when the drag-and-drop pointer leaves the + * surface and the session ends. The client must destroy the + * wl_data_offer introduced at enter time at this point. */ void (*leave)(void *data, struct wl_data_device *wl_data_device); /** - * motion - (none) + * motion - drag and drop session motion * @time: (none) * @x: (none) * @y: (none) + * + * This event is sent when the drag-and-drop pointer moves within + * the currently focused surface. The new position of the pointer + * is provided by the @x an @y arguments, in surface local + * coordinates. */ void (*motion)(void *data, struct wl_data_device *wl_data_device, @@ -806,15 +974,22 @@ * * Hints to indicate compositor how to deal with a conflict between the * dimensions for the surface and the dimensions of the output. As a hint - * the compositor is free to ignore this parameter. "default" The client - * has no preference on fullscreen behavior, policies are determined by - * compositor. "scale" The client prefers scaling by the compositor. - * Scaling would always preserve surface's aspect ratio with surface - * centered on the output "driver" The client wants to switch video mode to - * the smallest mode that can fit the client buffer. If the sizes do not - * match the compositor must add black borders. "fill" The surface is - * centered on the output on the screen with no scaling. If the surface is - * of insufficient size the compositor must add black borders. + * the compositor is free to ignore this parameter. + * + * "default" The client has no preference on fullscreen behavior, policies + * are determined by compositor. + * + * "scale" The client prefers scaling by the compositor. Scaling would + * always preserve surface's aspect ratio with surface centered on the + * output + * + * "driver" The client wants to switch video mode to the smallest mode that + * can fit the client buffer. If the sizes do not match the compositor must + * add black borders. + * + * "fill" The surface is centered on the output on the screen with no + * scaling. If the surface is of insufficient size the compositor must add + * black borders. */ enum wl_shell_surface_fullscreen_method { WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, @@ -855,7 +1030,7 @@ * The configure event asks the client to resize its surface. The * size is a hint, in the sense that the client is free to ignore * it if it doesn't resize, pick a smaller size (to satisfy aspect - * ration or resize in steps of NxM pixels). The client is free to + * ratio or resize in steps of NxM pixels). The client is free to * dismiss all but the last configure event it received. */ void (*configure)(void *data, @@ -1028,6 +1203,7 @@ #define WL_SURFACE_FRAME 3 #define WL_SURFACE_SET_OPAQUE_REGION 4 #define WL_SURFACE_SET_INPUT_REGION 5 +#define WL_SURFACE_COMMIT 6 static inline void wl_surface_set_user_data(struct wl_surface *wl_surface, void *user_data) @@ -1094,6 +1270,13 @@ WL_SURFACE_SET_INPUT_REGION, region); } +static inline void +wl_surface_commit(struct wl_surface *wl_surface) +{ + wl_proxy_marshal((struct wl_proxy *) wl_surface, + WL_SURFACE_COMMIT); +} + #ifndef WL_SEAT_CAPABILITY_ENUM #define WL_SEAT_CAPABILITY_ENUM /** @@ -1312,6 +1495,21 @@ * @value: (none) * * Scroll and other axis notifications. + * + * For scroll events (vertical and horizontal scroll axes), the + * value parameter is the length of a vector along the specified + * axis in a coordinate space identical to those of motion events, + * representing a relative movement along the specified axis. + * + * For devices that support movements non-parallel to axes multiple + * axis events will be emitted. + * + * When applicable, for example for touch pads, the server can + * choose to emit scroll events where the motion vector is + * equivalent to a motion event vector. + * + * When applicable, clients can transform its view relative to the + * scroll distance. */ void (*axis)(void *data, struct wl_pointer *wl_pointer, @@ -1375,15 +1573,12 @@ * wl_keyboard_key_state - physical key state * @WL_KEYBOARD_KEY_STATE_RELEASED: key is not pressed * @WL_KEYBOARD_KEY_STATE_PRESSED: key is pressed - * @WL_KEYBOARD_KEY_STATE_REPEAT: key is pressed and repeating * * Describes the physical state of a key which provoked the key event. - * When a key repeats, the sequence is down -> repeat -> repeat -> up. */ enum wl_keyboard_key_state { WL_KEYBOARD_KEY_STATE_RELEASED = 0, WL_KEYBOARD_KEY_STATE_PRESSED = 1, - WL_KEYBOARD_KEY_STATE_REPEAT = 2, }; #endif /* WL_KEYBOARD_KEY_STATE_ENUM */ @@ -1615,12 +1810,14 @@ * @WL_OUTPUT_TRANSFORM_FLIPPED_270: (none) * * This describes the transform that a compositor will apply to a surface - * to compensate for the rotation or mirroring of an output device. The - * flipped values correspond to an initial flip around a vertical axis - * followed by rotaion. The purpose is mainly to allow clients render - * accordingly and tell the compositor, so that for fullscreen surfaces, - * the compositor will still be able to scan out directly from client - * surfaces. + * to compensate for the rotation or mirroring of an output device. + * + * The flipped values correspond to an initial flip around a vertical axis + * followed by rotation. + * + * The purpose is mainly to allow clients render accordingly and tell the + * compositor, so that for fullscreen surfaces, the compositor will still + * be able to scan out directly from client surfaces. */ enum wl_output_transform { WL_OUTPUT_TRANSFORM_NORMAL = 0, diff -Nru wayland-0.95.0/src/wayland-client.c wayland-1.0.0/src/wayland-client.c --- wayland-0.95.0/src/wayland-client.c 2012-07-24 00:17:10.000000000 +0000 +++ wayland-1.0.0/src/wayland-client.c 2012-10-19 20:50:29.000000000 +0000 @@ -1,5 +1,6 @@ /* - * Copyright © 2008 Kristian Høgsberg + * Copyright © 2008-2012 Kristian Høgsberg + * Copyright © 2010-2012 Intel Corporation * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -34,21 +35,21 @@ #include #include #include +#include #include "wayland-util.h" #include "wayland-os.h" #include "wayland-client.h" #include "wayland-private.h" -struct wl_global_listener { - wl_display_global_func_t handler; - void *data; - struct wl_list link; -}; + +/** \cond */ struct wl_proxy { struct wl_object object; struct wl_display *display; + struct wl_event_queue *queue; + int id_deleted; void *user_data; }; @@ -59,68 +60,148 @@ struct wl_list link; }; +struct wl_event_queue { + struct wl_list link; + struct wl_list event_list; + struct wl_display *display; + pthread_cond_t cond; +}; + struct wl_display { struct wl_proxy proxy; struct wl_connection *connection; + int last_error; int fd; - uint32_t mask; + pthread_t display_thread; struct wl_map objects; - struct wl_list global_listener_list; - struct wl_list global_list; - - wl_display_update_func_t update; - void *update_data; - - wl_display_global_func_t global_handler; - void *global_handler_data; + struct wl_event_queue queue; + struct wl_list event_queue_list; + pthread_mutex_t mutex; }; +/** \endcond */ + static int wl_debug = 0; -static int -connection_update(struct wl_connection *connection, - uint32_t mask, void *data) +static void +display_fatal_error(struct wl_display *display, int error) { - struct wl_display *display = data; + struct wl_event_queue *iter; + + if (display->last_error) + return; - display->mask = mask; - if (display->update) - return display->update(display->mask, - display->update_data); + if (!error) + error = 1; - return 0; + display->last_error = error; + close(display->fd); + display->fd = -1; + + wl_list_for_each(iter, &display->event_queue_list, link) + pthread_cond_broadcast(&iter->cond); } -WL_EXPORT struct wl_global_listener * -wl_display_add_global_listener(struct wl_display *display, - wl_display_global_func_t handler, void *data) +static void +wl_display_fatal_error(struct wl_display *display, int error) { - struct wl_global_listener *listener; - struct wl_global *global; + pthread_mutex_lock(&display->mutex); + display_fatal_error(display, error); + pthread_mutex_unlock(&display->mutex); +} - listener = malloc(sizeof *listener); - if (listener == NULL) - return NULL; +static void +wl_event_queue_init(struct wl_event_queue *queue, struct wl_display *display) +{ + wl_list_init(&queue->event_list); + pthread_cond_init(&queue->cond, NULL); + queue->display = display; +} - listener->handler = handler; - listener->data = data; - wl_list_insert(display->global_listener_list.prev, &listener->link); - - wl_list_for_each(global, &display->global_list, link) - (*listener->handler)(display, global->id, global->interface, - global->version, listener->data); +static void +wl_event_queue_release(struct wl_event_queue *queue) +{ + struct wl_closure *closure; - return listener; + while (!wl_list_empty(&queue->event_list)) { + closure = container_of(queue->event_list.next, + struct wl_closure, link); + wl_list_remove(&closure->link); + wl_closure_destroy(closure); + } + pthread_cond_destroy(&queue->cond); } +/** Destroy an event queue + * + * \param queue The event queue to be destroyed + * + * Destroy the given event queue. Any pending event on that queue is + * discarded. + * + * The \ref wl_display object used to create the queue should not be + * destroyed until all event queues created with it are destroyed with + * this function. + * + * \memberof wl_event_queue + */ WL_EXPORT void -wl_display_remove_global_listener(struct wl_display *display, - struct wl_global_listener *listener) +wl_event_queue_destroy(struct wl_event_queue *queue) +{ + struct wl_display *display = queue->display; + + pthread_mutex_lock(&display->mutex); + wl_list_remove(&queue->link); + wl_event_queue_release(queue); + free(queue); + pthread_mutex_unlock(&display->mutex); +} + +/** Create a new event queue for this display + * + * \param display The display context object + * \return A new event queue associated with this display or NULL on + * failure. + * + * \memberof wl_display + */ +WL_EXPORT struct wl_event_queue * +wl_display_create_queue(struct wl_display *display) { - wl_list_remove(&listener->link); - free(listener); + struct wl_event_queue *queue; + + queue = malloc(sizeof *queue); + if (queue == NULL) + return NULL; + + wl_event_queue_init(queue, display); + + pthread_mutex_lock(&display->mutex); + wl_list_insert(&display->event_queue_list, &queue->link); + pthread_mutex_unlock(&display->mutex); + + return queue; } +/** Create a proxy object with a given interface + * + * \param factory Factory proxy object + * \param interface Interface the proxy object should use + * \return A newly allocated proxy object or NULL on failure + * + * This function creates a new proxy object with the supplied interface. The + * proxy object will have an id assigned from the client id space. The id + * should be created on the compositor side by sending an appropriate request + * with \ref wl_proxy_marshal(). + * + * The proxy will inherit the display and event queue of the factory object. + * + * \note This should not normally be used by non-generated code. + * + * \sa wl_display, wl_event_queue, wl_proxy_marshal() + * + * \memberof wl_proxy + */ WL_EXPORT struct wl_proxy * wl_proxy_create(struct wl_proxy *factory, const struct wl_interface *interface) { @@ -133,14 +214,20 @@ proxy->object.interface = interface; proxy->object.implementation = NULL; + proxy->display = display; + proxy->queue = factory->queue; + proxy->id_deleted = 0; + + pthread_mutex_lock(&display->mutex); proxy->object.id = wl_map_insert_new(&display->objects, WL_MAP_CLIENT_SIDE, proxy); - proxy->display = display; + pthread_mutex_unlock(&display->mutex); return proxy; } -WL_EXPORT struct wl_proxy * +/* The caller should hold the display lock */ +static struct wl_proxy * wl_proxy_create_for_id(struct wl_proxy *factory, uint32_t id, const struct wl_interface *interface) { @@ -155,23 +242,56 @@ proxy->object.implementation = NULL; proxy->object.id = id; proxy->display = display; + proxy->queue = factory->queue; + proxy->id_deleted = 0; + wl_map_insert_at(&display->objects, id, proxy); return proxy; } +/** Destroy a proxy object + * + * \param proxy The proxy to be destroyed + * + * \memberof wl_proxy + */ WL_EXPORT void wl_proxy_destroy(struct wl_proxy *proxy) { - if (proxy->object.id < WL_SERVER_ID_START) + pthread_mutex_lock(&proxy->display->mutex); + + if (proxy->id_deleted) + wl_map_remove(&proxy->display->objects, proxy->object.id); + else if (proxy->object.id < WL_SERVER_ID_START) wl_map_insert_at(&proxy->display->objects, proxy->object.id, WL_ZOMBIE_OBJECT); else wl_map_insert_at(&proxy->display->objects, proxy->object.id, NULL); + + pthread_mutex_unlock(&proxy->display->mutex); + free(proxy); } +/** Set a proxy's listener + * + * \param proxy The proxy object + * \param implementation The listener to be added to proxy + * \param data User data to be associated with the proxy + * \return 0 on success or -1 on failure + * + * Set proxy's listener to \c implementation and its user data to + * \c data. Ifa listener has already been set, this functions + * fails and nothing is changed. + * + * \c implementation is a vector of function pointers. For an opcode + * \c n, \c implemention[n] should point to the handler of \c n for + * the given object. + * + * \memberof wl_proxy + */ WL_EXPORT int wl_proxy_add_listener(struct wl_proxy *proxy, void (**implementation)(void), void *data) @@ -187,12 +307,42 @@ return 0; } +/** Prepare a request to be sent to the compositor + * + * \param proxy The proxy object + * \param opcode Opcode of the request to be sent + * \param ... Extra arguments for the given request + * + * Translates the request given by opcode and the extra arguments into the + * wire format and write it to the connection buffer. + * + * The example below creates a proxy object with the wl_surface_interface + * using a wl_compositor factory interface and sends the + * \c compositor.create_surface request using \ref wl_proxy_marshal(). Note + * the \c id is the extra argument to the request as specified by the + * protocol. + * + * \code + * id = wl_proxy_create((struct wl_proxy *) wl_compositor, + * &wl_surface_interface); + * wl_proxy_marshal((struct wl_proxy *) wl_compositor, + * WL_COMPOSITOR_CREATE_SURFACE, id); + * \endcode + * + * \note This should not normally be used by non-generated code. + * + * \sa wl_proxy_create() + * + * \memberof wl_proxy + */ WL_EXPORT void wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) { struct wl_closure *closure; va_list ap; + pthread_mutex_lock(&proxy->display->mutex); + va_start(ap, opcode); closure = wl_closure_vmarshal(&proxy->object, opcode, ap, &proxy->object.interface->methods[opcode]); @@ -212,22 +362,8 @@ } wl_closure_destroy(closure); -} -/* Can't do this, there may be more than one instance of an - * interface... */ -WL_EXPORT uint32_t -wl_display_get_global(struct wl_display *display, - const char *interface, uint32_t version) -{ - struct wl_global *global; - - wl_list_for_each(global, &display->global_list, link) - if (strcmp(interface, global->interface) == 0 && - version <= global->version) - return global->id; - - return 0; + pthread_mutex_unlock(&proxy->display->mutex); } static void @@ -235,49 +371,25 @@ struct wl_display *display, struct wl_object *object, uint32_t code, const char *message) { - fprintf(stderr, "%s@%u: error %d: %s\n", - object->interface->name, object->id, code, message); - abort(); -} - -static void -display_handle_global(void *data, - struct wl_display *display, - uint32_t id, const char *interface, uint32_t version) -{ - struct wl_global_listener *listener; - struct wl_global *global; - - global = malloc(sizeof *global); - global->id = id; - global->interface = strdup(interface); - global->version = version; - wl_list_insert(display->global_list.prev, &global->link); - - wl_list_for_each(listener, &display->global_listener_list, link) - (*listener->handler)(display, - id, interface, version, listener->data); -} + int err; -static void -wl_global_destroy(struct wl_global *global) -{ - wl_list_remove(&global->link); - free(global->interface); - free(global); -} + wl_log("%s@%u: error %d: %s\n", + object->interface->name, object->id, code, message); -static void -display_handle_global_remove(void *data, - struct wl_display *display, uint32_t id) -{ - struct wl_global *global; + switch (code) { + case WL_DISPLAY_ERROR_INVALID_OBJECT: + case WL_DISPLAY_ERROR_INVALID_METHOD: + err = -EINVAL; + break; + case WL_DISPLAY_ERROR_NO_MEMORY: + err = -ENOMEM; + break; + default: + err = -EFAULT; + break; + } - wl_list_for_each(global, &display->global_list, link) - if (global->id == id) { - wl_global_destroy(global); - break; - } + wl_display_fatal_error(display, err); } static void @@ -285,27 +397,29 @@ { struct wl_proxy *proxy; + pthread_mutex_lock(&display->mutex); + proxy = wl_map_lookup(&display->objects, id); if (proxy != WL_ZOMBIE_OBJECT) - fprintf(stderr, "server sent delete_id for live object\n"); + proxy->id_deleted = 1; else wl_map_remove(&display->objects, id); + + pthread_mutex_unlock(&display->mutex); } static const struct wl_display_listener display_listener = { display_handle_error, - display_handle_global, - display_handle_global_remove, display_handle_delete_id }; static int -connect_to_socket(struct wl_display *display, const char *name) +connect_to_socket(const char *name) { struct sockaddr_un addr; socklen_t size; const char *runtime_dir; - int name_size; + int name_size, fd; runtime_dir = getenv("XDG_RUNTIME_DIR"); if (!runtime_dir) { @@ -323,8 +437,8 @@ if (name == NULL) name = "wayland-0"; - display->fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0); - if (display->fd < 0) + fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0); + if (fd < 0) return -1; memset(&addr, 0, sizeof addr); @@ -338,7 +452,7 @@ fprintf(stderr, "error: socket path \"%s/%s\" plus null terminator" " exceeds 108 bytes\n", runtime_dir, name); - close(display->fd); + close(fd); /* to prevent programs reporting * "failed to add socket: Success" */ errno = ENAMETOOLONG; @@ -347,50 +461,48 @@ size = offsetof (struct sockaddr_un, sun_path) + name_size; - if (connect(display->fd, (struct sockaddr *) &addr, size) < 0) { - close(display->fd); + if (connect(fd, (struct sockaddr *) &addr, size) < 0) { + close(fd); return -1; } - return 0; + return fd; } +/** Connect to Wayland display on an already open fd + * + * \param fd The fd to use for the connection + * \return A \ref wl_display object or \c NULL on failure + * + * The wl_display takes ownership of the fd and will close it when the + * display is destroyed. The fd will also be closed in case of + * failure. + * + * \memberof wl_display + */ WL_EXPORT struct wl_display * -wl_display_connect(const char *name) +wl_display_connect_to_fd(int fd) { struct wl_display *display; const char *debug; - char *connection, *end; - int flags; debug = getenv("WAYLAND_DEBUG"); if (debug) wl_debug = 1; display = malloc(sizeof *display); - if (display == NULL) + if (display == NULL) { + close(fd); return NULL; + } memset(display, 0, sizeof *display); - connection = getenv("WAYLAND_SOCKET"); - if (connection) { - display->fd = strtol(connection, &end, 0); - if (*end != '\0') { - free(display); - return NULL; - } - flags = fcntl(display->fd, F_GETFD); - if (flags != -1) - fcntl(display->fd, F_SETFD, flags | FD_CLOEXEC); - unsetenv("WAYLAND_SOCKET"); - } else if (connect_to_socket(display, name) < 0) { - free(display); - return NULL; - } + display->fd = fd; wl_map_init(&display->objects); - wl_list_init(&display->global_listener_list); - wl_list_init(&display->global_list); + wl_event_queue_init(&display->queue, display); + wl_list_init(&display->event_queue_list); + pthread_mutex_init(&display->mutex, NULL); wl_map_insert_new(&display->objects, WL_MAP_CLIENT_SIDE, NULL); @@ -401,9 +513,9 @@ display->proxy.display = display; display->proxy.object.implementation = (void(**)(void)) &display_listener; display->proxy.user_data = display; + display->proxy.queue = &display->queue; - display->connection = wl_connection_create(display->fd, - connection_update, display); + display->connection = wl_connection_create(display->fd); if (display->connection == NULL) { wl_map_release(&display->objects); close(display->fd); @@ -414,36 +526,77 @@ return display; } +/** Connect to a Wayland display + * + * \param name Name of the Wayland display to connect to + * \return A \ref wl_display object or \c NULL on failure + * + * Connect to the Wayland display named \c name. If \c name is \c NULL, + * its value will bee replaced with the WAYLAND_DISPLAY environment + * variable if it is set, otherwise display "wayland-0" will be used. + * + * \memberof wl_display + */ +WL_EXPORT struct wl_display * +wl_display_connect(const char *name) +{ + char *connection, *end; + int flags, fd; + + connection = getenv("WAYLAND_SOCKET"); + if (connection) { + fd = strtol(connection, &end, 0); + if (*end != '\0') + return NULL; + + flags = fcntl(fd, F_GETFD); + if (flags != -1) + fcntl(fd, F_SETFD, flags | FD_CLOEXEC); + unsetenv("WAYLAND_SOCKET"); + } else { + fd = connect_to_socket(name); + if (fd < 0) + return NULL; + } + + return wl_display_connect_to_fd(fd); +} + +/** Close a connection to a Wayland display + * + * \param display The display context object + * + * Close the connection to \c display and free all resources associated + * with it. + * + * \memberof wl_display + */ WL_EXPORT void wl_display_disconnect(struct wl_display *display) { - struct wl_global *global, *gnext; - struct wl_global_listener *listener, *lnext; - wl_connection_destroy(display->connection); wl_map_release(&display->objects); - wl_list_for_each_safe(global, gnext, - &display->global_list, link) - wl_global_destroy(global); - wl_list_for_each_safe(listener, lnext, - &display->global_listener_list, link) - free(listener); + wl_event_queue_release(&display->queue); + pthread_mutex_destroy(&display->mutex); + if (display->fd > 0) + close(display->fd); - close(display->fd); free(display); } +/** Get a display context's file descriptor + * + * \param display The display context object + * \return Display object file descriptor + * + * Return the file descriptor associated with a display so it can be + * integrated into the client's main loop. + * + * \memberof wl_display + */ WL_EXPORT int -wl_display_get_fd(struct wl_display *display, - wl_display_update_func_t update, void *data) +wl_display_get_fd(struct wl_display *display) { - display->update = update; - display->update_data = data; - - if (display->update) - display->update(display->mask, - display->update_data); - return display->fd; } @@ -460,22 +613,33 @@ sync_callback }; -WL_EXPORT void +/** Block until all pending request are processed by the server + * + * \param display The display context object + * \return The number of dispatched events on success or -1 on failure + * + * Blocks until the server process all currently issued requests and + * sends out pending events on all event queues. + * + * \memberof wl_display + */ +WL_EXPORT int wl_display_roundtrip(struct wl_display *display) { struct wl_callback *callback; - int done; + int done, ret = 0; done = 0; callback = wl_display_sync(display); wl_callback_add_listener(callback, &sync_listener, &done); - wl_display_flush(display); - while (!done) - wl_display_iterate(display, WL_DISPLAY_READABLE); + while (!done && !ret) + ret = wl_display_dispatch(display); + + return ret; } static int -create_proxies(struct wl_display *display, struct wl_closure *closure) +create_proxies(struct wl_proxy *sender, struct wl_closure *closure) { struct wl_proxy *proxy; const char *signature; @@ -495,7 +659,7 @@ *(void **) closure->args[i] = NULL; break; } - proxy = wl_proxy_create_for_id(&display->proxy, id, + proxy = wl_proxy_create_for_id(sender, id, closure->message->types[i - 2]); if (proxy == NULL) return -1; @@ -509,135 +673,368 @@ return 0; } -static void -handle_event(struct wl_display *display, - uint32_t id, uint32_t opcode, uint32_t size) +static int +queue_event(struct wl_display *display, int len) { + uint32_t p[2], id; + int opcode, size; struct wl_proxy *proxy; struct wl_closure *closure; const struct wl_message *message; - proxy = wl_map_lookup(&display->objects, id); + wl_connection_copy(display->connection, p, sizeof p); + id = p[0]; + opcode = p[1] & 0xffff; + size = p[1] >> 16; + if (len < size) + return 0; + proxy = wl_map_lookup(&display->objects, id); if (proxy == WL_ZOMBIE_OBJECT) { wl_connection_consume(display->connection, size); - return; - } else if (proxy == NULL || proxy->object.implementation == NULL) { + return size; + } else if (proxy == NULL) { wl_connection_consume(display->connection, size); - return; + return size; } message = &proxy->object.interface->events[opcode]; closure = wl_connection_demarshal(display->connection, size, &display->objects, message); + if (!closure) + return -1; - if (wl_debug) - wl_closure_print(closure, &proxy->object, false); - - if (closure == NULL || create_proxies(display, closure) < 0) { - fprintf(stderr, "Error demarshalling event\n"); - abort(); + if (create_proxies(proxy, closure) < 0) { + wl_closure_destroy(closure); + return -1; } - wl_closure_invoke(closure, &proxy->object, - proxy->object.implementation[opcode], - proxy->user_data); + if (wl_list_empty(&proxy->queue->event_list)) + pthread_cond_signal(&proxy->queue->cond); + wl_list_insert(proxy->queue->event_list.prev, &closure->link); - wl_closure_destroy(closure); + return size; } -WL_EXPORT void -wl_display_iterate(struct wl_display *display, uint32_t mask) +static void +dispatch_event(struct wl_display *display, struct wl_event_queue *queue) { - uint32_t p[2], object; - int len, opcode, size; + struct wl_closure *closure; + struct wl_proxy *proxy; + uint32_t id; + int opcode, ret; - mask &= display->mask; - if (mask == 0) { - fprintf(stderr, - "wl_display_iterate called with unsolicited flags\n"); - return; + closure = container_of(queue->event_list.next, + struct wl_closure, link); + wl_list_remove(&closure->link); + id = closure->buffer[0]; + opcode = closure->buffer[1] & 0xffff; + + /* Verify that the receiving object is still valid and look up + * proxies for any arguments. We have to do this just before + * calling the handler, since preceeding events may have + * destroyed either the proxy or the proxy args since the + * event was queued. */ + proxy = wl_map_lookup(&display->objects, id); + ret = wl_closure_lookup_objects(closure, &display->objects); + + pthread_mutex_unlock(&display->mutex); + + if (proxy != WL_ZOMBIE_OBJECT && + proxy->object.implementation && ret == 0) { + if (wl_debug) + wl_closure_print(closure, &proxy->object, false); + + wl_closure_invoke(closure, &proxy->object, + proxy->object.implementation[opcode], + proxy->user_data); } - len = wl_connection_data(display->connection, mask); + wl_closure_destroy(closure); - while (len > 0) { - if ((size_t) len < sizeof p) - break; - - wl_connection_copy(display->connection, p, sizeof p); - object = p[0]; - opcode = p[1] & 0xffff; - size = p[1] >> 16; - if (len < size) - break; + pthread_mutex_lock(&display->mutex); +} + +static int +dispatch_queue(struct wl_display *display, + struct wl_event_queue *queue, int block) +{ + int len, size, count, ret; + + pthread_mutex_lock(&display->mutex); + + if (display->last_error) + goto err_unlock; + + ret = wl_connection_flush(display->connection); + if (ret < 0 && errno != EAGAIN) { + display_fatal_error(display, errno); + goto err_unlock; + } - handle_event(display, object, opcode, size); - len -= size; + if (block && wl_list_empty(&queue->event_list) && + pthread_equal(display->display_thread, pthread_self())) { + len = wl_connection_read(display->connection); + if (len == -1) { + display_fatal_error(display, errno); + goto err_unlock; + } else if (len == 0) { + display_fatal_error(display, EPIPE); + goto err_unlock; + } + while (len >= 8) { + size = queue_event(display, len); + if (size == -1) { + display_fatal_error(display, errno); + goto err_unlock; + } else if (size == 0) { + break; + } + len -= size; + } + } else if (block && wl_list_empty(&queue->event_list)) { + pthread_cond_wait(&queue->cond, &display->mutex); + if (display->last_error) + goto err_unlock; } - if (len < 0) { - fprintf(stderr, "read error: %m\n"); - exit(EXIT_FAILURE); + for (count = 0; !wl_list_empty(&queue->event_list); count++) { + dispatch_event(display, queue); + if (display->last_error) + goto err_unlock; } + + pthread_mutex_unlock(&display->mutex); + + return count; + +err_unlock: + errno = display->last_error; + pthread_mutex_unlock(&display->mutex); + + return -1; } -WL_EXPORT void -wl_display_flush(struct wl_display *display) +/** Dispatch events in an event queue + * + * \param display The display context object + * \param queue The event queue to dispatch + * \return The number of dispatched events on success or -1 on failure + * + * Dispatch all incoming events for objects assigned to the given + * event queue. On failure -1 is returned and errno set appropriately. + * + * This function blocks if there are no events to dispatch. If calling from + * the main thread, it will block reading data from the display fd. For other + * threads this will block until the main thread queues events on the queue + * passed as argument. + * + * \memberof wl_display + */ +WL_EXPORT int +wl_display_dispatch_queue(struct wl_display *display, + struct wl_event_queue *queue) { - while (display->mask & WL_DISPLAY_WRITABLE) - wl_display_iterate (display, WL_DISPLAY_WRITABLE); + return dispatch_queue(display, queue, 1); } -WL_EXPORT void * -wl_display_bind(struct wl_display *display, - uint32_t name, const struct wl_interface *interface) +/** Process incoming events + * + * \param display The display context object + * \return The number of dispatched events on success or -1 on failure + * + * Dispatch the display's main event queue. + * + * If the main event queue is empty, this function blocks until there are + * events to be read from the display fd. Events are read and queued on + * the appropriate event queues. Finally, events on the main event queue + * are dispatched. + * + * \note It is not possible to check if there are events on the main queue + * or not. For dispatching main queue events without blocking, see \ref + * wl_display_dispatch_pending(). + * + * \note Calling this makes the current thread the main one. + * + * \sa wl_display_dispatch_pending(), wl_display_dispatch_queue() + * + * \memberof wl_display + */ +WL_EXPORT int +wl_display_dispatch(struct wl_display *display) { - struct wl_proxy *proxy; + display->display_thread = pthread_self(); - proxy = wl_proxy_create(&display->proxy, interface); - if (proxy == NULL) - return NULL; + return dispatch_queue(display, &display->queue, 1); +} - wl_proxy_marshal(&display->proxy, WL_DISPLAY_BIND, - name, interface->name, interface->version, proxy); +/** Dispatch main queue events without reading from the display fd + * + * \param display The display context object + * \return The number of dispatched events or -1 on failure + * + * This function dispatches events on the main event queue. It does not + * attempt to read the display fd and simply returns zero if the main + * queue is empty, i.e., it doesn't block. + * + * This is necessary when a client's main loop wakes up on some fd other + * than the display fd (network socket, timer fd, etc) and calls \ref + * wl_display_dispatch_queue() from that callback. This may queue up + * events in the main queue while reading all data from the display fd. + * When the main thread returns to the main loop to block, the display fd + * no longer has data, causing a call to \em poll(2) (or similar + * functions) to block indefinitely, even though there are events ready + * to dispatch. + * + * To proper integrate the wayland display fd into a main loop, the + * client should always call \ref wl_display_dispatch_pending() and then + * \ref wl_display_flush() prior to going back to sleep. At that point, + * the fd typically doesn't have data so attempting I/O could block, but + * events queued up on the main queue should be dispatched. + * + * A real-world example is a main loop that wakes up on a timerfd (or a + * sound card fd becoming writable, for example in a video player), which + * then triggers GL rendering and eventually eglSwapBuffers(). + * eglSwapBuffers() may call wl_display_dispatch_queue() if it didn't + * receive the frame event for the previous frame, and as such queue + * events in the main queue. + * + * \note Calling this makes the current thread the main one. + * + * \sa wl_display_dispatch(), wl_display_dispatch_queue(), + * wl_display_flush() + * + * \memberof wl_display + */ +WL_EXPORT int +wl_display_dispatch_pending(struct wl_display *display) +{ + display->display_thread = pthread_self(); - return proxy; + return dispatch_queue(display, &display->queue, 0); } -WL_EXPORT struct wl_callback * -wl_display_sync(struct wl_display *display) +/** Retrieve the last error occured on a display + * + * \param display The display context object + * \return The last error occured on \c display or 0 if no error occured + * + * Return the last error occured on the display. This may be an error sent + * by the server or caused by the local client. + * + * \note Errors are \b fatal. If this function returns non-zero the display + * can no longer be used. + * + * \memberof wl_display + */ +WL_EXPORT int +wl_display_get_error(struct wl_display *display) { - struct wl_proxy *proxy; + int ret; - proxy = wl_proxy_create(&display->proxy, &wl_callback_interface); + pthread_mutex_lock(&display->mutex); - if (!proxy) - return NULL; + ret = display->last_error; - wl_proxy_marshal(&display->proxy, WL_DISPLAY_SYNC, proxy); + pthread_mutex_unlock(&display->mutex); - return (struct wl_callback *) proxy; + return ret; } +/** Send all buffered request on the display to the server + * + * \param display The display context object + * \return The number of bytes send on success or -1 on failure + * + * Send all buffered data on the client side to the server. Clients + * should call this function before blocking. On success, the number + * of bytes sent to the server is returned. On failure, this + * function returns -1 and errno is set appropriately. + * + * \memberof wl_display + */ +WL_EXPORT int +wl_display_flush(struct wl_display *display) +{ + int ret; + + pthread_mutex_lock(&display->mutex); + + if (display->last_error) { + errno = display->last_error; + ret = -1; + } else { + ret = wl_connection_flush(display->connection); + if (ret < 0 && errno != EAGAIN) + display_fatal_error(display, errno); + } + + pthread_mutex_unlock(&display->mutex); + + return ret; +} + +/** Set the user data associated with a proxy + * + * \param proxy The proxy object + * \param user_data The data to be associated with proxy + * + * Set the user data associated with \c proxy. When events for this + * proxy are received, \c user_data will be supplied to its listener. + * + * \memberof wl_proxy + */ WL_EXPORT void wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data) { proxy->user_data = user_data; } +/** Get the user data associated with a proxy + * + * \param proxy The proxy object + * \return The user data associated with proxy + * + * \memberof wl_proxy + */ WL_EXPORT void * wl_proxy_get_user_data(struct wl_proxy *proxy) { return proxy->user_data; } +/** Get the id of a proxy object + * + * \param proxy The proxy object + * \return The id the object associated with the proxy + * + * \memberof wl_proxy + */ WL_EXPORT uint32_t wl_proxy_get_id(struct wl_proxy *proxy) { return proxy->object.id; } + +/** Assign a proxy to an event queue + * + * \param proxy The proxy object + * \param queue The event queue that will handle this proxy + * + * Assign proxy to event queue. Events coming from \c proxy will be + * queued in \c queue instead of the display's main queue. + * + * \sa wl_display_dispatch_queue() + * + * \memberof wl_proxy + */ +WL_EXPORT void +wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue) +{ + proxy->queue = queue; +} + WL_EXPORT void wl_log_set_handler_client(wl_log_func_t handler) { diff -Nru wayland-0.95.0/src/wayland-client.h wayland-1.0.0/src/wayland-client.h --- wayland-0.95.0/src/wayland-client.h 2012-07-02 02:53:33.000000000 +0000 +++ wayland-1.0.0/src/wayland-client.h 2012-10-19 20:50:29.000000000 +0000 @@ -30,15 +30,100 @@ extern "C" { #endif +/** \class wl_proxy + * + * \brief Represents a protocol object on the client side. + * + * A wl_proxy acts as a client side proxy to an object existing in the + * compositor. The proxy is responsible for converting requests made by the + * clients with \ref wl_proxy_marshal() into Wayland's wire format. Events + * coming from the compositor are also handled by the proxy, which will in + * turn call the handler set with \ref wl_proxy_add_listener(). + * + * \note With the exception of function \ref wl_proxy_set_queue(), functions + * accessing a \ref wl_proxy are not normally used by client code. Clients + * should normally use the higher level interface generated by the scanner to + * interact with compositor objects. + * + */ struct wl_proxy; + +/** \class wl_display + * + * \brief Represents a connection to the compositor and acts as a proxy to + * the wl_display singleton object. + * + * A \ref wl_display object represents a client connection to a Wayland + * compositor. It is created with either \ref wl_display_connect() or + * \ref wl_display_connect_to_fd(). A connection is terminated using + * \ref wl_display_disconnect(). + * + * A \ref wl_display is also used as the \ref wl_proxy for the \ref wl_display + * singleton object on the compositor side. + * + * A \ref wl_display object handles all the data sent from and to the + * compositor. When a \ref wl_proxy marshals a request, it will write its wire + * representation to the display's write buffer. The data is sent to the + * compositor when the client calls \ref wl_display_flush(). + * + * Incoming data is handled in two steps: queueing and dispatching. In the + * queue step, the data coming from the display fd is interpreted and + * added to a queue. On the dispatch step, the handler for the incoming + * event set by the client on the corresponding \ref wl_proxy is called. + * + * A \ref wl_display has at least one event queue, called the main + * queue. Clients can create additional event queues with \ref + * wl_display_create_queue() and assign \ref wl_proxy's to it. Events + * occurring in a particular proxy are always queued in its assigned queue. + * A client can ensure that a certain assumption, such as holding a lock + * or running from a given thread, is true when a proxy event handler is + * called by assigning that proxy to an event queue and making sure that + * this queue is only dispatched when the assumption holds. + * + * The main queue is dispatched by calling \ref wl_display_dispatch(). + * This will dispatch any events queued on the main queue and attempt + * to read from the display fd if its empty. Events read are then queued + * on the appropriate queues according to the proxy assignment. Calling + * that function makes the calling thread the main thread. + * + * A user created queue is dispatched with \ref wl_display_dispatch_queue(). + * If there are no events to dispatch this function will block. If this + * is called by the main thread, this will attempt to read data from the + * display fd and queue any events on the appropriate queues. If calling + * from any other thread, the function will block until the main thread + * queues an event on the queue being dispatched. + * + * A real world example of event queue usage is Mesa's implementation of + * eglSwapBuffers() for the Wayland platform. This function might need + * to block until a frame callback is received, but dispatching the main + * queue could cause an event handler on the client to start drawing + * again. This problem is solved using another event queue, so that only + * the events handled by the EGL code are dispatched during the block. + * + * This creates a problem where the main thread dispatches a non-main + * queue, reading all the data from the display fd. If the application + * would call \em poll(2) after that it would block, even though there + * might be events queued on the main queue. Those events should be + * dispatched with \ref wl_display_dispatch_pending() before + * flushing and blocking. + */ struct wl_display; +/** \class wl_event_queue + * + * \brief A queue for \ref wl_proxy object events. + * + * Event queues allows the events on a display to be handled in a thread-safe + * manner. See \ref wl_display for details. + * + */ +struct wl_event_queue; + +void wl_event_queue_destroy(struct wl_event_queue *queue); + void wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...); struct wl_proxy *wl_proxy_create(struct wl_proxy *factory, const struct wl_interface *interface); -struct wl_proxy *wl_proxy_create_for_id(struct wl_proxy *factory, - uint32_t id, - const struct wl_interface *interface); void wl_proxy_destroy(struct wl_proxy *proxy); int wl_proxy_add_listener(struct wl_proxy *proxy, @@ -46,55 +131,26 @@ void wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data); void *wl_proxy_get_user_data(struct wl_proxy *proxy); uint32_t wl_proxy_get_id(struct wl_proxy *proxy); - -void *wl_display_bind(struct wl_display *display, - uint32_t name, const struct wl_interface *interface); - -static inline void -wl_display_set_user_data(struct wl_display *display, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) display, user_data); -} - -static inline void * -wl_display_get_user_data(struct wl_display *display) -{ - return wl_proxy_get_user_data((struct wl_proxy *) display); -} - -struct wl_callback *wl_display_sync(struct wl_display *display); +void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue); #include "wayland-client-protocol.h" -#define WL_DISPLAY_READABLE 0x01 -#define WL_DISPLAY_WRITABLE 0x02 - typedef int (*wl_display_update_func_t)(uint32_t mask, void *data); typedef void (*wl_callback_func_t)(void *data, uint32_t time); struct wl_display *wl_display_connect(const char *name); +struct wl_display *wl_display_connect_to_fd(int fd); void wl_display_disconnect(struct wl_display *display); -int wl_display_get_fd(struct wl_display *display, - wl_display_update_func_t update, void *data); -void wl_display_iterate(struct wl_display *display, uint32_t mask); -void wl_display_flush(struct wl_display *display); -void wl_display_roundtrip(struct wl_display *display); - -struct wl_global_listener; -typedef void (*wl_display_global_func_t)(struct wl_display *display, - uint32_t id, - const char *interface, - uint32_t version, - void *data); -void -wl_display_remove_global_listener(struct wl_display *display, - struct wl_global_listener *listener); -struct wl_global_listener * -wl_display_add_global_listener(struct wl_display *display, - wl_display_global_func_t handler, void *data); -uint32_t -wl_display_get_global(struct wl_display *display, - const char *interface, uint32_t version); +int wl_display_get_fd(struct wl_display *display); +int wl_display_dispatch(struct wl_display *display); +int wl_display_dispatch_queue(struct wl_display *display, + struct wl_event_queue *queue); +int wl_display_dispatch_pending(struct wl_display *display); +int wl_display_get_error(struct wl_display *display); + +int wl_display_flush(struct wl_display *display); +int wl_display_roundtrip(struct wl_display *display); +struct wl_event_queue *wl_display_create_queue(struct wl_display *display); void wl_log_set_handler_client(wl_log_func_t handler); diff -Nru wayland-0.95.0/src/wayland-egl.h wayland-1.0.0/src/wayland-egl.h --- wayland-0.95.0/src/wayland-egl.h 2011-10-17 02:29:37.000000000 +0000 +++ wayland-1.0.0/src/wayland-egl.h 2012-10-16 17:52:23.000000000 +0000 @@ -33,7 +33,6 @@ #define WL_EGL_PLATFORM 1 struct wl_egl_window; -struct wl_egl_pixmap; struct wl_egl_window * wl_egl_window_create(struct wl_surface *surface, @@ -51,14 +50,6 @@ wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, int *width, int *height); -struct wl_egl_pixmap * -wl_egl_pixmap_create(int width, int height, uint32_t flags); -void -wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap); - -struct wl_buffer * -wl_egl_pixmap_create_buffer(struct wl_egl_pixmap *egl_pixmap); - #ifdef __cplusplus } #endif diff -Nru wayland-0.95.0/src/wayland-private.h wayland-1.0.0/src/wayland-private.h --- wayland-0.95.0/src/wayland-private.h 2012-07-24 00:15:28.000000000 +0000 +++ wayland-1.0.0/src/wayland-private.h 2012-10-20 02:58:03.000000000 +0000 @@ -28,6 +28,12 @@ #include #include "wayland-util.h" +#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) + +#define container_of(ptr, type, member) ({ \ + const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + #define WL_ZOMBIE_OBJECT ((void *) 2) #define WL_MAP_SERVER_SIDE 0 @@ -54,19 +60,14 @@ struct wl_connection; struct wl_closure; -#define WL_CONNECTION_READABLE 0x01 -#define WL_CONNECTION_WRITABLE 0x02 - -typedef int (*wl_connection_update_func_t)(struct wl_connection *connection, - uint32_t mask, void *data); - -struct wl_connection *wl_connection_create(int fd, - wl_connection_update_func_t update, - void *data); +struct wl_connection *wl_connection_create(int fd); void wl_connection_destroy(struct wl_connection *connection); void wl_connection_copy(struct wl_connection *connection, void *data, size_t size); void wl_connection_consume(struct wl_connection *connection, size_t size); -int wl_connection_data(struct wl_connection *connection, uint32_t mask); + +int wl_connection_flush(struct wl_connection *connection); +int wl_connection_read(struct wl_connection *connection); + int wl_connection_write(struct wl_connection *connection, const void *data, size_t count); int wl_connection_queue(struct wl_connection *connection, const void *data, size_t count); @@ -78,6 +79,7 @@ ffi_cif cif; void *args[20]; uint32_t *start; + struct wl_list link; uint32_t buffer[0]; }; @@ -103,6 +105,9 @@ struct wl_map *objects, const struct wl_message *message); +int +wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects); + void wl_closure_invoke(struct wl_closure *closure, struct wl_object *target, void (*func)(void), void *data); diff -Nru wayland-0.95.0/src/wayland-protocol.c wayland-1.0.0/src/wayland-protocol.c --- wayland-0.95.0/src/wayland-protocol.c 2012-07-24 19:45:24.000000000 +0000 +++ wayland-1.0.0/src/wayland-protocol.c 2012-10-22 18:55:33.000000000 +0000 @@ -28,9 +28,8 @@ #include #include "wayland-util.h" -extern const struct wl_interface wl_object_interface; extern const struct wl_interface wl_callback_interface; -extern const struct wl_interface wl_object_interface; +extern const struct wl_interface wl_registry_interface; extern const struct wl_interface wl_surface_interface; extern const struct wl_interface wl_region_interface; extern const struct wl_interface wl_buffer_interface; @@ -80,14 +79,8 @@ NULL, NULL, NULL, - NULL, - NULL, - NULL, - NULL, &wl_callback_interface, - NULL, - NULL, - NULL, + &wl_registry_interface, &wl_surface_interface, &wl_region_interface, &wl_buffer_interface, @@ -171,21 +164,34 @@ }; static const struct wl_message wl_display_requests[] = { - { "bind", "usun", types + 8 }, - { "sync", "n", types + 12 }, + { "sync", "n", types + 8 }, + { "get_registry", "n", types + 9 }, }; static const struct wl_message wl_display_events[] = { - { "error", "ous", types + 13 }, - { "global", "usu", types + 0 }, - { "global_remove", "u", types + 0 }, + { "error", "ous", types + 0 }, { "delete_id", "u", types + 0 }, }; WL_EXPORT const struct wl_interface wl_display_interface = { "wl_display", 1, - ARRAY_LENGTH(wl_display_requests), wl_display_requests, - ARRAY_LENGTH(wl_display_events), wl_display_events, + 2, wl_display_requests, + 2, wl_display_events, +}; + +static const struct wl_message wl_registry_requests[] = { + { "bind", "usun", types + 0 }, +}; + +static const struct wl_message wl_registry_events[] = { + { "global", "usu", types + 0 }, + { "global_remove", "u", types + 0 }, +}; + +WL_EXPORT const struct wl_interface wl_registry_interface = { + "wl_registry", 1, + 1, wl_registry_requests, + 2, wl_registry_events, }; static const struct wl_message wl_callback_events[] = { @@ -195,34 +201,34 @@ WL_EXPORT const struct wl_interface wl_callback_interface = { "wl_callback", 1, 0, NULL, - ARRAY_LENGTH(wl_callback_events), wl_callback_events, + 1, wl_callback_events, }; static const struct wl_message wl_compositor_requests[] = { - { "create_surface", "n", types + 16 }, - { "create_region", "n", types + 17 }, + { "create_surface", "n", types + 10 }, + { "create_region", "n", types + 11 }, }; WL_EXPORT const struct wl_interface wl_compositor_interface = { "wl_compositor", 1, - ARRAY_LENGTH(wl_compositor_requests), wl_compositor_requests, + 2, wl_compositor_requests, 0, NULL, }; static const struct wl_message wl_shm_pool_requests[] = { - { "create_buffer", "niiiiu", types + 18 }, + { "create_buffer", "niiiiu", types + 12 }, { "destroy", "", types + 0 }, { "resize", "i", types + 0 }, }; WL_EXPORT const struct wl_interface wl_shm_pool_interface = { "wl_shm_pool", 1, - ARRAY_LENGTH(wl_shm_pool_requests), wl_shm_pool_requests, + 3, wl_shm_pool_requests, 0, NULL, }; static const struct wl_message wl_shm_requests[] = { - { "create_pool", "nhi", types + 24 }, + { "create_pool", "nhi", types + 18 }, }; static const struct wl_message wl_shm_events[] = { @@ -231,8 +237,8 @@ WL_EXPORT const struct wl_interface wl_shm_interface = { "wl_shm", 1, - ARRAY_LENGTH(wl_shm_requests), wl_shm_requests, - ARRAY_LENGTH(wl_shm_events), wl_shm_events, + 1, wl_shm_requests, + 1, wl_shm_events, }; static const struct wl_message wl_buffer_requests[] = { @@ -245,8 +251,8 @@ WL_EXPORT const struct wl_interface wl_buffer_interface = { "wl_buffer", 1, - ARRAY_LENGTH(wl_buffer_requests), wl_buffer_requests, - ARRAY_LENGTH(wl_buffer_events), wl_buffer_events, + 1, wl_buffer_requests, + 1, wl_buffer_events, }; static const struct wl_message wl_data_offer_requests[] = { @@ -261,8 +267,8 @@ WL_EXPORT const struct wl_interface wl_data_offer_interface = { "wl_data_offer", 1, - ARRAY_LENGTH(wl_data_offer_requests), wl_data_offer_requests, - ARRAY_LENGTH(wl_data_offer_events), wl_data_offer_events, + 3, wl_data_offer_requests, + 1, wl_data_offer_events, }; static const struct wl_message wl_data_source_requests[] = { @@ -278,60 +284,60 @@ WL_EXPORT const struct wl_interface wl_data_source_interface = { "wl_data_source", 1, - ARRAY_LENGTH(wl_data_source_requests), wl_data_source_requests, - ARRAY_LENGTH(wl_data_source_events), wl_data_source_events, + 2, wl_data_source_requests, + 3, wl_data_source_events, }; static const struct wl_message wl_data_device_requests[] = { - { "start_drag", "?oo?ou", types + 27 }, - { "set_selection", "?ou", types + 31 }, + { "start_drag", "?oo?ou", types + 21 }, + { "set_selection", "?ou", types + 25 }, }; static const struct wl_message wl_data_device_events[] = { - { "data_offer", "n", types + 33 }, - { "enter", "uoff?o", types + 34 }, + { "data_offer", "n", types + 27 }, + { "enter", "uoff?o", types + 28 }, { "leave", "", types + 0 }, { "motion", "uff", types + 0 }, { "drop", "", types + 0 }, - { "selection", "?o", types + 39 }, + { "selection", "?o", types + 33 }, }; WL_EXPORT const struct wl_interface wl_data_device_interface = { "wl_data_device", 1, - ARRAY_LENGTH(wl_data_device_requests), wl_data_device_requests, - ARRAY_LENGTH(wl_data_device_events), wl_data_device_events, + 2, wl_data_device_requests, + 6, wl_data_device_events, }; static const struct wl_message wl_data_device_manager_requests[] = { - { "create_data_source", "n", types + 40 }, - { "get_data_device", "no", types + 41 }, + { "create_data_source", "n", types + 34 }, + { "get_data_device", "no", types + 35 }, }; WL_EXPORT const struct wl_interface wl_data_device_manager_interface = { "wl_data_device_manager", 1, - ARRAY_LENGTH(wl_data_device_manager_requests), wl_data_device_manager_requests, + 2, wl_data_device_manager_requests, 0, NULL, }; static const struct wl_message wl_shell_requests[] = { - { "get_shell_surface", "no", types + 43 }, + { "get_shell_surface", "no", types + 37 }, }; WL_EXPORT const struct wl_interface wl_shell_interface = { "wl_shell", 1, - ARRAY_LENGTH(wl_shell_requests), wl_shell_requests, + 1, wl_shell_requests, 0, NULL, }; static const struct wl_message wl_shell_surface_requests[] = { { "pong", "u", types + 0 }, - { "move", "ou", types + 45 }, - { "resize", "ouu", types + 47 }, + { "move", "ou", types + 39 }, + { "resize", "ouu", types + 41 }, { "set_toplevel", "", types + 0 }, - { "set_transient", "oiiu", types + 50 }, - { "set_fullscreen", "uu?o", types + 54 }, - { "set_popup", "ouoiiu", types + 57 }, - { "set_maximized", "?o", types + 63 }, + { "set_transient", "oiiu", types + 44 }, + { "set_fullscreen", "uu?o", types + 48 }, + { "set_popup", "ouoiiu", types + 51 }, + { "set_maximized", "?o", types + 57 }, { "set_title", "s", types + 0 }, { "set_class", "s", types + 0 }, }; @@ -344,34 +350,35 @@ WL_EXPORT const struct wl_interface wl_shell_surface_interface = { "wl_shell_surface", 1, - ARRAY_LENGTH(wl_shell_surface_requests), wl_shell_surface_requests, - ARRAY_LENGTH(wl_shell_surface_events), wl_shell_surface_events, + 10, wl_shell_surface_requests, + 3, wl_shell_surface_events, }; static const struct wl_message wl_surface_requests[] = { { "destroy", "", types + 0 }, - { "attach", "?oii", types + 64 }, + { "attach", "?oii", types + 58 }, { "damage", "iiii", types + 0 }, - { "frame", "n", types + 67 }, - { "set_opaque_region", "o", types + 68 }, - { "set_input_region", "?o", types + 69 }, + { "frame", "n", types + 61 }, + { "set_opaque_region", "?o", types + 62 }, + { "set_input_region", "?o", types + 63 }, + { "commit", "", types + 0 }, }; static const struct wl_message wl_surface_events[] = { - { "enter", "o", types + 70 }, - { "leave", "o", types + 71 }, + { "enter", "o", types + 64 }, + { "leave", "o", types + 65 }, }; WL_EXPORT const struct wl_interface wl_surface_interface = { "wl_surface", 1, - ARRAY_LENGTH(wl_surface_requests), wl_surface_requests, - ARRAY_LENGTH(wl_surface_events), wl_surface_events, + 7, wl_surface_requests, + 2, wl_surface_events, }; static const struct wl_message wl_seat_requests[] = { - { "get_pointer", "n", types + 72 }, - { "get_keyboard", "n", types + 73 }, - { "get_touch", "n", types + 74 }, + { "get_pointer", "n", types + 66 }, + { "get_keyboard", "n", types + 67 }, + { "get_touch", "n", types + 68 }, }; static const struct wl_message wl_seat_events[] = { @@ -380,17 +387,17 @@ WL_EXPORT const struct wl_interface wl_seat_interface = { "wl_seat", 1, - ARRAY_LENGTH(wl_seat_requests), wl_seat_requests, - ARRAY_LENGTH(wl_seat_events), wl_seat_events, + 3, wl_seat_requests, + 1, wl_seat_events, }; static const struct wl_message wl_pointer_requests[] = { - { "set_cursor", "u?oii", types + 75 }, + { "set_cursor", "u?oii", types + 69 }, }; static const struct wl_message wl_pointer_events[] = { - { "enter", "uoff", types + 79 }, - { "leave", "uo", types + 83 }, + { "enter", "uoff", types + 73 }, + { "leave", "uo", types + 77 }, { "motion", "uff", types + 0 }, { "button", "uuuu", types + 0 }, { "axis", "uuf", types + 0 }, @@ -398,14 +405,14 @@ WL_EXPORT const struct wl_interface wl_pointer_interface = { "wl_pointer", 1, - ARRAY_LENGTH(wl_pointer_requests), wl_pointer_requests, - ARRAY_LENGTH(wl_pointer_events), wl_pointer_events, + 1, wl_pointer_requests, + 5, wl_pointer_events, }; static const struct wl_message wl_keyboard_events[] = { { "keymap", "uhu", types + 0 }, - { "enter", "uoa", types + 85 }, - { "leave", "uo", types + 88 }, + { "enter", "uoa", types + 79 }, + { "leave", "uo", types + 82 }, { "key", "uuuu", types + 0 }, { "modifiers", "uuuuu", types + 0 }, }; @@ -413,11 +420,11 @@ WL_EXPORT const struct wl_interface wl_keyboard_interface = { "wl_keyboard", 1, 0, NULL, - ARRAY_LENGTH(wl_keyboard_events), wl_keyboard_events, + 5, wl_keyboard_events, }; static const struct wl_message wl_touch_events[] = { - { "down", "uuoiff", types + 90 }, + { "down", "uuoiff", types + 84 }, { "up", "uui", types + 0 }, { "motion", "uiff", types + 0 }, { "frame", "", types + 0 }, @@ -427,7 +434,7 @@ WL_EXPORT const struct wl_interface wl_touch_interface = { "wl_touch", 1, 0, NULL, - ARRAY_LENGTH(wl_touch_events), wl_touch_events, + 5, wl_touch_events, }; static const struct wl_message wl_output_events[] = { @@ -438,7 +445,7 @@ WL_EXPORT const struct wl_interface wl_output_interface = { "wl_output", 1, 0, NULL, - ARRAY_LENGTH(wl_output_events), wl_output_events, + 2, wl_output_events, }; static const struct wl_message wl_region_requests[] = { @@ -449,7 +456,7 @@ WL_EXPORT const struct wl_interface wl_region_interface = { "wl_region", 1, - ARRAY_LENGTH(wl_region_requests), wl_region_requests, + 3, wl_region_requests, 0, NULL, }; diff -Nru wayland-0.95.0/src/wayland-server-protocol.h wayland-1.0.0/src/wayland-server-protocol.h --- wayland-0.95.0/src/wayland-server-protocol.h 2012-07-24 19:45:23.000000000 +0000 +++ wayland-1.0.0/src/wayland-server-protocol.h 2012-10-22 18:55:33.000000000 +0000 @@ -39,6 +39,7 @@ struct wl_resource; struct wl_display; +struct wl_registry; struct wl_callback; struct wl_compositor; struct wl_shm_pool; @@ -59,6 +60,7 @@ struct wl_region; extern const struct wl_interface wl_display_interface; +extern const struct wl_interface wl_registry_interface; extern const struct wl_interface wl_callback_interface; extern const struct wl_interface wl_compositor_interface; extern const struct wl_interface wl_shm_pool_interface; @@ -99,47 +101,93 @@ /** * wl_display - core global object - * @bind: bind an object to the display * @sync: asynchronous roundtrip + * @get_registry: get global registry object * * The core global object. This is a special singleton object. It is used - * for internal wayland protocol features. + * for internal Wayland protocol features. */ struct wl_display_interface { /** - * bind - bind an object to the display - * @name: unique number id for object - * @interface: (none) - * @version: (none) - * @id: (none) - * - * Binds a new, client-created object to the server using @name - * as the identifier. - */ - void (*bind)(struct wl_client *client, - struct wl_resource *resource, - uint32_t name, - const char *interface, - uint32_t version, - uint32_t id); - /** * sync - asynchronous roundtrip * @callback: (none) * - * The sync request asks the server to invoke the 'done' request - * on the provided wl_callback object. Since requests are handled + * The sync request asks the server to emit the 'done' event on + * the provided wl_callback object. Since requests are handled * in-order, this can be used as a barrier to ensure all previous * requests have been handled. */ void (*sync)(struct wl_client *client, struct wl_resource *resource, uint32_t callback); + /** + * get_registry - get global registry object + * @callback: (none) + * + * This request creates a registry object that allows the client + * to list and bind the global objects available from the + * compositor. + */ + void (*get_registry)(struct wl_client *client, + struct wl_resource *resource, + uint32_t callback); }; #define WL_DISPLAY_ERROR 0 -#define WL_DISPLAY_GLOBAL 1 -#define WL_DISPLAY_GLOBAL_REMOVE 2 -#define WL_DISPLAY_DELETE_ID 3 +#define WL_DISPLAY_DELETE_ID 1 + +/** + * wl_registry - global registry object + * @bind: bind an object to the display + * + * The global registry object. The server has a number of global objects + * that are available to all clients. These objects typically represent an + * actual object in the server (for example, an input device) or they are + * singleton objects that provides extension functionality. + * + * When a client creates a registry object, the registry object will emit a + * global event for each global currently in the regitry. Globals come and + * go as a result of device hotplugs, reconfiguration or other events, and + * the registry will send out @global and @global_remove events to keep the + * client up to date with the changes. To mark the end of the initial burst + * of events, the client can use the wl_display.sync request immediately + * after calling wl_display.get_registry. + * + * A client can 'bind' to a global object by using the bind request. This + * creates a client side handle that lets the object emit events to the + * client and lets the client invoke requests on the object. + */ +struct wl_registry_interface { + /** + * bind - bind an object to the display + * @name: unique number id for object + * @interface: name of the objects interface + * @version: version of the objects interface + * @id: (none) + * + * Binds a new, client-created object to the server using @name + * as the identifier. + */ + void (*bind)(struct wl_client *client, + struct wl_resource *resource, + uint32_t name, + const char *interface, uint32_t version, uint32_t id); +}; + +#define WL_REGISTRY_GLOBAL 0 +#define WL_REGISTRY_GLOBAL_REMOVE 1 + +static inline void +wl_registry_send_global(struct wl_resource *resource_, uint32_t name, const char *interface, uint32_t version) +{ + wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL, name, interface, version); +} + +static inline void +wl_registry_send_global_remove(struct wl_resource *resource_, uint32_t name) +{ + wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL_REMOVE, name); +} #define WL_CALLBACK_DONE 0 @@ -186,8 +234,8 @@ * @resize: change the size of the pool mapping * * The wl_shm_pool object encapsulates a piece of memory shared between - * the compsitor and client. Through the wl_shm_pool object, the client can - * allocate shared memory wl_buffer objects. The objects will share the + * the compositor and client. Through the wl_shm_pool object, the client + * can allocate shared memory wl_buffer objects. The objects will share the * same underlying mapped memory. Reusing the mapped memory avoids the * setup/teardown overhead and is useful when interactively resizing a * surface or for many small buffers. @@ -207,10 +255,11 @@ * specified. The stride arguments specifies the number of bytes * from beginning of one row to the beginning of the next. The * format is the pixel format of the buffer and must be one of - * those advertised through the wl_shm.format event. A buffer will - * keep a reference to the pool it was created from so it is valid - * to destroy the pool immediatedly after creating a buffer from - * it. + * those advertised through the wl_shm.format event. + * + * A buffer will keep a reference to the pool it was created from + * so it is valid to destroy the pool immediately after creating a + * buffer from it. */ void (*create_buffer)(struct wl_client *client, struct wl_resource *resource, @@ -297,13 +346,16 @@ * through factory interfaces such as wl_drm, wl_shm or similar. It has a * width and a height and can be attached to a wl_surface, but the * mechanism by which a client provides and updates the contents is defined - * by the buffer factory interface + * by the buffer factory interface. */ struct wl_buffer_interface { /** * destroy - destroy a buffer * - * Destroy a buffer. This will invalidate the object id. + * Destroy a buffer. If and how you need to release the backing + * storage is defined by the buffer factory interface. + * + * For possible side-effects to a surface, see wl_surface.attach. */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); @@ -317,6 +369,18 @@ wl_resource_post_event(resource_, WL_BUFFER_RELEASE); } +/** + * wl_data_offer - offer to transfer data + * @accept: accept one of the offered mime-types + * @receive: request that the data is transferred + * @destroy: (none) + * + * A wl_data_offer represents a piece of data offered for transfer by + * another client (the source client). It is used by the copy-and-paste and + * drag-and-drop mechanisms. The offer describes the different mime types + * that the data can be converted to and provides the mechanism for + * transferring the data directly from the source client. + */ struct wl_data_offer_interface { /** * accept - accept one of the offered mime-types @@ -331,9 +395,17 @@ uint32_t serial, const char *type); /** - * receive - (none) + * receive - request that the data is transferred * @mime_type: (none) * @fd: (none) + * + * To transfer the offered data, the client issues this request + * and indicates the mime-type it wants to receive. The transfer + * happens through the passed fd (typically a pipe(7) file + * descriptor). The source client writes the data in the mime-type + * representation requested and then closes the fd. The receiving + * client reads from the read end of the pipe until EOF and the + * closes its end, at which point the transfer is complete. */ void (*receive)(struct wl_client *client, struct wl_resource *resource, @@ -354,6 +426,16 @@ wl_resource_post_event(resource_, WL_DATA_OFFER_OFFER, type); } +/** + * wl_data_source - offer to transfer data + * @offer: add an offered mime type + * @destroy: destroy the data source + * + * The wl_data_source object is the source side of a wl_data_offer. It is + * created by the source client in a data transfer and provides a way to + * describe the offered data and a way to respond to requests to transfer + * the data. + */ struct wl_data_source_interface { /** * offer - add an offered mime type @@ -406,18 +488,30 @@ * @serial: (none) * * This request asks the compositor to start a drag and drop - * operation on behalf of the client. The source argument is the - * data source that provides the data for the eventual data - * transfer. If source is NULL, enter, leave and motion events are - * sent only to the client that initiated the drag and the client - * is expected to handle the data passing internally. The origin - * surface is the surface where the drag originates and the client - * must have an active implicit grab that matches the serial. The - * icon surface is an optional (can be nil) surface that provides - * an icon to be moved around with the cursor. Initially, the - * top-left corner of the icon surface is placed at the cursor - * hotspot, but subsequent surface.attach request can move the - * relative position. + * operation on behalf of the client. + * + * The source argument is the data source that provides the data + * for the eventual data transfer. If source is NULL, enter, leave + * and motion events are sent only to the client that initiated the + * drag and the client is expected to handle the data passing + * internally. + * + * The origin surface is the surface where the drag originates and + * the client must have an active implicit grab that matches the + * serial. + * + * The icon surface is an optional (can be nil) surface that + * provides an icon to be moved around with the cursor. Initially, + * the top-left corner of the icon surface is placed at the cursor + * hotspot, but subsequent wl_surface.attach request can move the + * relative position. Attach requests must be confirmed with + * wl_surface.commit as usual. + * + * The current and pending input regions of the icon wl_surface are + * cleared, and wl_surface.set_input_region is ignored until the + * wl_surface is no longer used as the icon surface. When the use + * as an icon ends, the the current and pending input regions + * become undefined, and the wl_surface is unmapped. */ void (*start_drag)(struct wl_client *client, struct wl_resource *resource, @@ -544,15 +638,22 @@ * * Hints to indicate compositor how to deal with a conflict between the * dimensions for the surface and the dimensions of the output. As a hint - * the compositor is free to ignore this parameter. "default" The client - * has no preference on fullscreen behavior, policies are determined by - * compositor. "scale" The client prefers scaling by the compositor. - * Scaling would always preserve surface's aspect ratio with surface - * centered on the output "driver" The client wants to switch video mode to - * the smallest mode that can fit the client buffer. If the sizes do not - * match the compositor must add black borders. "fill" The surface is - * centered on the output on the screen with no scaling. If the surface is - * of insufficient size the compositor must add black borders. + * the compositor is free to ignore this parameter. + * + * "default" The client has no preference on fullscreen behavior, policies + * are determined by compositor. + * + * "scale" The client prefers scaling by the compositor. Scaling would + * always preserve surface's aspect ratio with surface centered on the + * output + * + * "driver" The client wants to switch video mode to the smallest mode that + * can fit the client buffer. If the sizes do not match the compositor must + * add black borders. + * + * "fill" The surface is centered on the output on the screen with no + * scaling. If the surface is of insufficient size the compositor must add + * black borders. */ enum wl_shell_surface_fullscreen_method { WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, @@ -650,16 +751,21 @@ * parameter is given then the surface will be made fullscreen on * that output. If the client does not specify the output then the * compositor will apply its policy - usually choosing the output - * on which the surface has the biggest surface area. The client - * may specify a method to resolve a size conflict between the - * output size and the surface size - this is provided through the - * fullscreen_method parameter. The framerate parameter is used - * only when the fullscreen_method is set to "driver", to indicate - * the preferred framerate. framerate=0 indicates that the app does - * not care about framerate. The framerate is specified in mHz, - * that is framerate of 60000 is 60Hz. The compositor must reply to - * this request with a configure event with the dimensions for the - * output on which the surface will be made fullscreen. + * on which the surface has the biggest surface area. + * + * The client may specify a method to resolve a size conflict + * between the output size and the surface size - this is provided + * through the fullscreen_method parameter. + * + * The framerate parameter is used only when the fullscreen_method + * is set to "driver", to indicate the preferred framerate. + * framerate=0 indicates that the app does not care about + * framerate. The framerate is specified in mHz, that is framerate + * of 60000 is 60Hz. + * + * The compositor must reply to this request with a configure event + * with the dimensions for the output on which the surface will be + * made fullscreen. */ void (*set_fullscreen)(struct wl_client *client, struct wl_resource *resource, @@ -682,6 +788,7 @@ * is pressed in any other clients window. A click in any of the * clients surfaces is reported as normal, however, clicks in other * clients surfaces will be discarded and trigger the callback. + * * TODO: Grab keyboard too, maybe just terminate on any click * inside or outside the surface? */ @@ -761,6 +868,7 @@ * @frame: request repaint feedback * @set_opaque_region: set opaque region * @set_input_region: set input region + * @commit: commit pending surface state * * A surface. This is an image that is displayed on the screen. It has a * location, size and pixel contents. @@ -779,9 +887,43 @@ * @x: (none) * @y: (none) * - * Copy the contents of a buffer into this surface. The x and y - * arguments specify the location of the new buffers upper left - * corner, relative to the old buffers upper left corner. + * Set the contents of a buffer into this surface. The x and y + * arguments specify the location of the new pending buffer's upper + * left corner, relative to the current buffer's upper left corner. + * In other words, the x and y, and the width and height of the + * wl_buffer together define in which directions the surface's size + * changes. + * + * Surface contents are double-buffered state, see + * wl_surface.commit. + * + * The initial surface contents are void; there is no content. + * wl_surface.attach assigns the given wl_buffer as the pending + * wl_buffer. wl_surface.commit applies the pending wl_buffer as + * the new surface contents, and the size of the surface becomes + * the size of the wl_buffer. The wl_buffer is also kept as + * pending, until changed by wl_surface.attach or the wl_buffer is + * destroyed. + * + * Committing a pending wl_buffer allows the compositor to read the + * pixels in the wl_buffer. The compositor may access the pixels at + * any time after the wl_surface.commit request. When the + * compositor will not access the pixels anymore, it will send the + * wl_buffer.release event. Only after receiving wl_buffer.release, + * the client may re-use the wl_buffer. A wl_buffer, that has been + * attached and then replaced by another attach instead of + * committed, will not receive a release event, and is not used by + * the compositor. + * + * Destroying the wl_buffer after wl_buffer.release does not change + * the surface contents, even if the wl_buffer is still pending for + * the next commit. In such case, the next commit does not change + * the surface contents. However, if the client destroys the + * wl_buffer before receiving wl_buffer.release, the surface + * contents become undefined immediately. + * + * Only if wl_surface.attach is sent with a nil wl_buffer, the + * following wl_surface.commit will remove the surface content. */ void (*attach)(struct wl_client *client, struct wl_resource *resource, @@ -795,10 +937,22 @@ * @width: (none) * @height: (none) * - * After attaching a new buffer, this request is used to describe - * the regions where the new buffer is different from the previous - * buffer and needs to be repainted. Coordinates are relative to - * the new buffer. + * This request is used to describe the regions where the pending + * buffer (or if pending buffer is none, the current buffer as + * updated in-place) on the next wl_surface.commit will be + * different from the current buffer, and needs to be repainted. + * The pending buffer can be set by wl_surface.attach. The + * compositor ignores the parts of the damage that fall outside of + * the surface. + * + * Damage is double-buffered state, see wl_surface.commit. + * + * The initial value for pending damage is empty: no damage. + * wl_surface.damage adds pending damage: the new pending damage is + * the union of old pending damage and the given rectangle. + * wl_surface.commit assigns pending damage as the current damage, + * and clears pending damage. The server will clear the current + * damage as it repaints the surface. */ void (*damage)(struct wl_client *client, struct wl_resource *resource, @@ -812,8 +966,18 @@ * * Request notification when the next frame is displayed. Useful * for throttling redrawing operations, and driving animations. The - * notification will only be posted for one frame unless requested - * again. + * frame request will take effect on the next wl_surface.commit. + * The notification will only be posted for one frame unless + * requested again. + * + * A server should avoid signalling the frame callbacks if the + * surface is not visible in any way, e.g. the surface is + * off-screen, or completely obscured by other opaque surfaces. + * + * A client can request a frame callback even without an attach, + * damage, or any other state changes. wl_surface.commit triggers a + * display update, so the callback event will arrive after the next + * output refresh where the surface is visible. */ void (*frame)(struct wl_client *client, struct wl_resource *resource, @@ -822,18 +986,25 @@ * set_opaque_region - set opaque region * @region: (none) * - * This requests sets the region of the surface that contain + * This request sets the region of the surface that contains * opaque content. The opaque region is an optimization hint for * the compositor that lets it optimize out redrawing of content * behind opaque regions. Setting an opaque region is not required * for correct behaviour, but marking transparent content as opaque - * will result in repaint artifacts. The region will be clipped to - * the extents of the current surface size. Setting the region has - * copy semantics, and the region object can be destroyed - * immediately after setting the opaque region. If a buffer of a - * different size is attached or if a nil region is set, the opaque - * region will revert back to default. The default opaque region is - * empty. + * will result in repaint artifacts. The compositor ignores the + * parts of the opaque region that fall outside of the surface. + * + * Opaque region is double-buffered state, see wl_surface.commit. + * + * wl_surface.set_opaque_region changes the pending opaque region. + * wl_surface.commit copies the pending region to the current + * region. Otherwise the pending and current regions are never + * changed. + * + * The initial value for opaque region is empty. Setting the + * pending opaque region has copy semantics, and the wl_region + * object can be destroyed immediately. A nil wl_region causes the + * pending opaque region to be set to empty. */ void (*set_opaque_region)(struct wl_client *client, struct wl_resource *resource, @@ -842,18 +1013,52 @@ * set_input_region - set input region * @region: (none) * - * This requests sets the region of the surface that can receive - * pointer and touch events. The region will be clipped to the - * extents of the current surface size. Setting the region has copy - * semantics, and the region object can be destroyed immediately - * after setting the input region. If a buffer of a different size - * is attached or if a nil region is passed, the input region will - * revert back to default. The default input region is the entire - * surface. + * This request sets the region of the surface that can receive + * pointer and touch events. Input events happening outside of this + * region will try the next surface in the server surface stack. + * The compositor ignores the parts of the input region that fall + * outside of the surface. + * + * Input region is double-buffered state, see wl_surface.commit. + * + * wl_surface.set_input_region changes the pending input region. + * wl_surface.commit copies the pending region to the current + * region. Otherwise the pending and current regions are never + * changed, except cursor and icon surfaces are special cases, see + * wl_pointer.set_cursor and wl_data_device.start_drag. + * + * The initial value for input region is infinite. That means the + * whole surface will accept input. Setting the pending input + * region has copy semantics, and the wl_region object can be + * destroyed immediately. A nil wl_region causes the input region + * to be set to infinite. */ void (*set_input_region)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region); + /** + * commit - commit pending surface state + * + * Surface state (input, opaque, and damage regions, attached + * buffers, etc.) is double-buffered. Protocol requests modify the + * pending state, as opposed to current state in use by the + * compositor. Commit request atomically applies all pending state, + * replacing the current state. After commit, the new pending state + * is as documented for each related request. + * + * On commit, a pending wl_buffer is applied first, all other state + * second. This means that all coordinates in double-buffered state + * are relative to the new wl_buffer coming into use, except for + * wl_surface.attach itself. If the pending wl_buffer is none, the + * coordinates are relative to the current surface contents. + * + * All requests that need a commit to become effective are + * documented to affect double-buffered state. + * + * Other interfaces may add further double-buffered surface state. + */ + void (*commit)(struct wl_client *client, + struct wl_resource *resource); }; #define WL_SURFACE_ENTER 0 @@ -981,20 +1186,31 @@ * @hotspot_y: (none) * * Set the pointer surface, i.e., the surface that contains the - * pointer image. This request only takes effect if the pointer - * focus for this device is one of the requesting client surfaces - * or the surface parameter is the current pointer surface. If - * there was a previous surface set with this request it is - * replaced. If surface is NULL, the pointer image is hidden. The - * parameters hotspot_x and hotspot_y define the position of the - * pointer surface relative to the pointer location. Its top-left - * corner is always at (x, y) - (hotspot_x, hotspot_y), where (x, - * y) are the coordinates of the pointer location. On - * surface.attach requests to the pointer surface, hotspot_x and + * pointer image (cursor). This request only takes effect if the + * pointer focus for this device is one of the requesting client's + * surfaces or the surface parameter is the current pointer + * surface. If there was a previous surface set with this request + * it is replaced. If surface is NULL, the pointer image is hidden. + * + * The parameters hotspot_x and hotspot_y define the position of + * the pointer surface relative to the pointer location. Its + * top-left corner is always at (x, y) - (hotspot_x, hotspot_y), + * where (x, y) are the coordinates of the pointer location. + * + * On surface.attach requests to the pointer surface, hotspot_x and * hotspot_y are decremented by the x and y parameters passed to - * the request. The hotspot can also be updated by passing the - * current set pointer surface to this request with new values for - * hotspot_x and/or hotspot_y. + * the request. Attach must be confirmed by wl_surface.commit as + * usual. + * + * The hotspot can also be updated by passing the currently set + * pointer surface to this request with new values for hotspot_x + * and hotspot_y. + * + * The current and pending input regions of the wl_surface are + * cleared, and wl_surface.set_input_region is ignored until the + * wl_surface is no longer used as the cursor. When the use as a + * cursor ends, the current and pending input regions become + * undefined, and the wl_surface is unmapped. */ void (*set_cursor)(struct wl_client *client, struct wl_resource *resource, @@ -1060,15 +1276,12 @@ * wl_keyboard_key_state - physical key state * @WL_KEYBOARD_KEY_STATE_RELEASED: key is not pressed * @WL_KEYBOARD_KEY_STATE_PRESSED: key is pressed - * @WL_KEYBOARD_KEY_STATE_REPEAT: key is pressed and repeating * * Describes the physical state of a key which provoked the key event. - * When a key repeats, the sequence is down -> repeat -> repeat -> up. */ enum wl_keyboard_key_state { WL_KEYBOARD_KEY_STATE_RELEASED = 0, WL_KEYBOARD_KEY_STATE_PRESSED = 1, - WL_KEYBOARD_KEY_STATE_REPEAT = 2, }; #endif /* WL_KEYBOARD_KEY_STATE_ENUM */ @@ -1170,12 +1383,14 @@ * @WL_OUTPUT_TRANSFORM_FLIPPED_270: (none) * * This describes the transform that a compositor will apply to a surface - * to compensate for the rotation or mirroring of an output device. The - * flipped values correspond to an initial flip around a vertical axis - * followed by rotaion. The purpose is mainly to allow clients render - * accordingly and tell the compositor, so that for fullscreen surfaces, - * the compositor will still be able to scan out directly from client - * surfaces. + * to compensate for the rotation or mirroring of an output device. + * + * The flipped values correspond to an initial flip around a vertical axis + * followed by rotation. + * + * The purpose is mainly to allow clients render accordingly and tell the + * compositor, so that for fullscreen surfaces, the compositor will still + * be able to scan out directly from client surfaces. */ enum wl_output_transform { WL_OUTPUT_TRANSFORM_NORMAL = 0, diff -Nru wayland-0.95.0/src/wayland-server.c wayland-1.0.0/src/wayland-server.c --- wayland-0.95.0/src/wayland-server.c 2012-07-24 00:17:10.000000000 +0000 +++ wayland-1.0.0/src/wayland-server.c 2012-10-17 20:46:15.000000000 +0000 @@ -86,6 +86,7 @@ uint32_t id; uint32_t serial; + struct wl_list registry_resource_list; struct wl_list global_list; struct wl_list socket_list; struct wl_list client_list; @@ -205,8 +206,6 @@ } } - - static int wl_client_connection_data(int fd, uint32_t mask, void *data) { @@ -218,20 +217,33 @@ const struct wl_message *message; uint32_t p[2]; int opcode, size; - uint32_t cmask = 0; int len; - if (mask & WL_EVENT_READABLE) - cmask |= WL_CONNECTION_READABLE; - if (mask & WL_EVENT_WRITABLE) - cmask |= WL_CONNECTION_WRITABLE; - - len = wl_connection_data(connection, cmask); - if (len < 0) { + if (mask & (WL_EVENT_ERROR | WL_EVENT_HANGUP)) { wl_client_destroy(client); return 1; } + if (mask & WL_EVENT_WRITABLE) { + len = wl_connection_flush(connection); + if (len < 0 && errno != EAGAIN) { + wl_client_destroy(client); + return 1; + } else if (len >= 0) { + wl_event_source_fd_update(client->source, + WL_EVENT_READABLE); + } + } + + len = 0; + if (mask & WL_EVENT_READABLE) { + len = wl_connection_read(connection); + if (len < 0 && errno != EAGAIN) { + wl_client_destroy(client); + return 1; + } + } + while ((size_t) len >= sizeof p) { wl_connection_copy(connection, p, sizeof p); opcode = p[1] & 0xffff; @@ -263,10 +275,8 @@ &client->objects, message); len -= size; - if (wl_debug) - wl_closure_print(closure, object, false); - - if (closure == NULL && errno == EINVAL) { + if ((closure == NULL && errno == EINVAL) || + wl_closure_lookup_objects(closure, &client->objects) < 0) { wl_resource_post_error(client->display_resource, WL_DISPLAY_ERROR_INVALID_METHOD, "invalid arguments for %s@%u.%s", @@ -279,6 +289,9 @@ break; } + if (wl_debug) + wl_closure_print(closure, object, false); + deref_new_objects(closure); wl_closure_invoke(closure, object, @@ -296,27 +309,10 @@ return 1; } -static int -wl_client_connection_update(struct wl_connection *connection, - uint32_t mask, void *data) -{ - struct wl_client *client = data; - uint32_t emask = 0; - - client->mask = mask; - if (mask & WL_CONNECTION_READABLE) - emask |= WL_EVENT_READABLE; - if (mask & WL_CONNECTION_WRITABLE) - emask |= WL_EVENT_WRITABLE; - - return wl_event_source_fd_update(client->source, emask); -} - WL_EXPORT void wl_client_flush(struct wl_client *client) { - if (client->mask & WL_CONNECTION_WRITABLE) - wl_connection_data(client->connection, WL_CONNECTION_WRITABLE); + wl_connection_flush(client->connection); } WL_EXPORT struct wl_display * @@ -345,34 +341,41 @@ WL_EVENT_READABLE, wl_client_connection_data, client); + if (!client->source) + goto err_client; + len = sizeof client->ucred; if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, - &client->ucred, &len) < 0) { - free(client); - return NULL; - } + &client->ucred, &len) < 0) + goto err_source; - client->connection = - wl_connection_create(fd, wl_client_connection_update, client); - if (client->connection == NULL) { - free(client); - return NULL; - } + client->connection = wl_connection_create(fd); + if (client->connection == NULL) + goto err_source; wl_map_init(&client->objects); - if (wl_map_insert_at(&client->objects, 0, NULL) < 0) { - wl_map_release(&client->objects); - free(client); - return NULL; - } + if (wl_map_insert_at(&client->objects, 0, NULL) < 0) + goto err_map; wl_signal_init(&client->destroy_signal); bind_display(client, display, 1, 1); + if (!client->display_resource) + goto err_map; + wl_list_insert(display->client_list.prev, &client->link); return client; + +err_map: + wl_map_release(&client->objects); + wl_connection_destroy(client->connection); +err_source: + wl_event_source_remove(client->source); +err_client: + free(client); + return NULL; } WL_EXPORT void @@ -387,23 +390,27 @@ *gid = client->ucred.gid; } -WL_EXPORT void +WL_EXPORT uint32_t wl_client_add_resource(struct wl_client *client, struct wl_resource *resource) { - if (resource->object.id == 0) + if (resource->object.id == 0) { resource->object.id = wl_map_insert_new(&client->objects, WL_MAP_SERVER_SIDE, resource); - else if (wl_map_insert_at(&client->objects, - resource->object.id, resource) < 0) + } else if (wl_map_insert_at(&client->objects, + resource->object.id, resource) < 0) { wl_resource_post_error(client->display_resource, WL_DISPLAY_ERROR_INVALID_OBJECT, "invalid new id %d", resource->object.id); + return 0; + } resource->client = client; wl_signal_init(&resource->destroy_signal); + + return resource->object.id; } WL_EXPORT struct wl_resource * @@ -560,6 +567,55 @@ default_grab_button }; +static void default_grab_touch_down(struct wl_touch_grab *grab, + uint32_t time, + int touch_id, + wl_fixed_t sx, + wl_fixed_t sy) +{ + struct wl_touch *touch = grab->touch; + uint32_t serial; + + if (touch->focus_resource && touch->focus) { + serial = wl_display_next_serial(touch->focus_resource->client->display); + wl_touch_send_down(touch->focus_resource, serial, time, + &touch->focus->resource, touch_id, sx, sy); + } +} + +static void default_grab_touch_up(struct wl_touch_grab *grab, + uint32_t time, + int touch_id) +{ + struct wl_touch *touch = grab->touch; + uint32_t serial; + + if (touch->focus_resource) { + serial = wl_display_next_serial(touch->focus_resource->client->display); + wl_touch_send_up(touch->focus_resource, serial, time, touch_id); + } +} + +static void default_grab_touch_motion(struct wl_touch_grab *grab, + uint32_t time, + int touch_id, + wl_fixed_t sx, + wl_fixed_t sy) +{ + struct wl_touch *touch = grab->touch; + + if (touch->focus_resource) { + wl_touch_send_motion(touch->focus_resource, time, + touch_id, sx, sy); + } +} + +static const struct wl_touch_grab_interface default_touch_grab_interface = { + default_grab_touch_down, + default_grab_touch_up, + default_grab_touch_motion +}; + static void default_grab_key(struct wl_keyboard_grab *grab, uint32_t time, uint32_t key, uint32_t state) @@ -679,6 +735,10 @@ memset(touch, 0, sizeof *touch); wl_list_init(&touch->resource_list); touch->focus_listener.notify = lose_touch_focus; + touch->default_grab.interface = &default_touch_grab_interface; + touch->default_grab.touch = touch; + touch->grab = &touch->default_grab; + wl_signal_init(&touch->focus_signal); } WL_EXPORT void @@ -903,10 +963,23 @@ pointer->current_x, pointer->current_y); } +WL_EXPORT void +wl_touch_start_grab(struct wl_touch *touch, struct wl_touch_grab *grab) +{ + touch->grab = grab; + grab->touch = touch; +} + +WL_EXPORT void +wl_touch_end_grab(struct wl_touch *touch) +{ + touch->grab = &touch->default_grab; +} + static void -display_bind(struct wl_client *client, - struct wl_resource *resource, uint32_t name, - const char *interface, uint32_t version, uint32_t id) +registry_bind(struct wl_client *client, + struct wl_resource *resource, uint32_t name, + const char *interface, uint32_t version, uint32_t id) { struct wl_global *global; struct wl_display *display = resource->data; @@ -923,6 +996,10 @@ global->bind(client, global->data, version, id); } +static const struct wl_registry_interface registry_interface = { + registry_bind +}; + static void display_sync(struct wl_client *client, struct wl_resource *resource, uint32_t id) @@ -937,9 +1014,40 @@ wl_resource_destroy(callback); } -struct wl_display_interface display_interface = { - display_bind, +static void +unbind_resource(struct wl_resource *resource) +{ + wl_list_remove(&resource->link); + free(resource); +} + +static void +display_get_registry(struct wl_client *client, + struct wl_resource *resource, uint32_t id) +{ + struct wl_display *display = resource->data; + struct wl_resource *registry_resource; + struct wl_global *global; + + registry_resource = + wl_client_add_object(client, &wl_registry_interface, + ®istry_interface, id, display); + registry_resource->destroy = unbind_resource; + + wl_list_insert(&display->registry_resource_list, + ®istry_resource->link); + + wl_list_for_each(global, &display->global_list, link) + wl_resource_post_event(registry_resource, + WL_REGISTRY_GLOBAL, + global->name, + global->interface->name, + global->interface->version); +} + +static const struct wl_display_interface display_interface = { display_sync, + display_get_registry }; static void @@ -954,19 +1062,13 @@ void *data, uint32_t version, uint32_t id) { struct wl_display *display = data; - struct wl_global *global; client->display_resource = wl_client_add_object(client, &wl_display_interface, &display_interface, id, display); - client->display_resource->destroy = destroy_client_display_resource; - wl_list_for_each(global, &display->global_list, link) - wl_resource_post_event(client->display_resource, - WL_DISPLAY_GLOBAL, - global->name, - global->interface->name, - global->interface->version); + if(client->display_resource) + client->display_resource->destroy = destroy_client_display_resource; } WL_EXPORT struct wl_display * @@ -992,6 +1094,7 @@ wl_list_init(&display->global_list); wl_list_init(&display->socket_list); wl_list_init(&display->client_list); + wl_list_init(&display->registry_resource_list); display->id = 1; display->serial = 0; @@ -1034,7 +1137,7 @@ void *data, wl_global_bind_func_t bind) { struct wl_global *global; - struct wl_client *client; + struct wl_resource *resource; global = malloc(sizeof *global); if (global == NULL) @@ -1046,9 +1149,9 @@ global->bind = bind; wl_list_insert(display->global_list.prev, &global->link); - wl_list_for_each(client, &display->client_list, link) - wl_resource_post_event(client->display_resource, - WL_DISPLAY_GLOBAL, + wl_list_for_each(resource, &display->registry_resource_list, link) + wl_resource_post_event(resource, + WL_REGISTRY_GLOBAL, global->name, global->interface->name, global->interface->version); @@ -1059,11 +1162,11 @@ WL_EXPORT void wl_display_remove_global(struct wl_display *display, struct wl_global *global) { - struct wl_client *client; + struct wl_resource *resource; - wl_list_for_each(client, &display->client_list, link) - wl_resource_post_event(client->display_resource, - WL_DISPLAY_GLOBAL_REMOVE, global->name); + wl_list_for_each(resource, &display->registry_resource_list, link) + wl_resource_post_event(resource, WL_REGISTRY_GLOBAL_REMOVE, + global->name); wl_list_remove(&global->link); free(global); } @@ -1099,8 +1202,28 @@ { display->run = 1; - while (display->run) + while (display->run) { + wl_display_flush_clients(display); wl_event_loop_dispatch(display->loop, -1); + } +} + +WL_EXPORT void +wl_display_flush_clients(struct wl_display *display) +{ + struct wl_client *client, *next; + int ret; + + wl_list_for_each_safe(client, next, &display->client_list, link) { + ret = wl_connection_flush(client->connection); + if (ret < 0 && errno == EAGAIN) { + wl_event_source_fd_update(client->source, + WL_EVENT_WRITABLE | + WL_EVENT_READABLE); + } else if (ret < 0) { + wl_client_destroy(client); + } + } } static int @@ -1117,7 +1240,8 @@ if (client_fd < 0) wl_log("failed to accept: %m\n"); else - wl_client_create(display, client_fd); + if (!wl_client_create(display, client_fd)) + close(client_fd); return 1; } diff -Nru wayland-0.95.0/src/wayland-server.h wayland-1.0.0/src/wayland-server.h --- wayland-0.95.0/src/wayland-server.h 2012-07-22 15:29:33.000000000 +0000 +++ wayland-1.0.0/src/wayland-server.h 2012-10-16 00:51:00.000000000 +0000 @@ -34,7 +34,9 @@ enum { WL_EVENT_READABLE = 0x01, - WL_EVENT_WRITABLE = 0x02 + WL_EVENT_WRITABLE = 0x02, + WL_EVENT_HANGUP = 0x04, + WL_EVENT_ERROR = 0x08 }; struct wl_event_loop; @@ -67,6 +69,7 @@ int wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout); +void wl_event_loop_dispatch_idle(struct wl_event_loop *loop); struct wl_event_source *wl_event_loop_add_idle(struct wl_event_loop *loop, wl_event_loop_idle_func_t func, void *data); @@ -87,6 +90,7 @@ int wl_display_add_socket(struct wl_display *display, const char *name); void wl_display_terminate(struct wl_display *display); void wl_display_run(struct wl_display *display); +void wl_display_flush_clients(struct wl_display *display); typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data, uint32_t version, uint32_t id); @@ -222,6 +226,29 @@ uint32_t key; }; +struct wl_touch_grab; +struct wl_touch_grab_interface { + void (*down)(struct wl_touch_grab *grab, + uint32_t time, + int touch_id, + wl_fixed_t sx, + wl_fixed_t sy); + void (*up)(struct wl_touch_grab *grab, + uint32_t time, + int touch_id); + void (*motion)(struct wl_touch_grab *grab, + uint32_t time, + int touch_id, + wl_fixed_t sx, + wl_fixed_t sy); +}; + +struct wl_touch_grab { + const struct wl_touch_grab_interface *interface; + struct wl_touch *touch; + struct wl_surface *focus; +}; + struct wl_data_offer { struct wl_resource resource; struct wl_data_source *source; @@ -297,6 +324,13 @@ struct wl_resource *focus_resource; struct wl_listener focus_listener; uint32_t focus_serial; + struct wl_signal focus_signal; + + struct wl_touch_grab *grab; + struct wl_touch_grab default_grab; + wl_fixed_t grab_x, grab_y; + uint32_t grab_serial; + uint32_t grab_time; }; struct wl_seat { @@ -354,7 +388,7 @@ #include "wayland-server-protocol.h" -void +uint32_t wl_client_add_resource(struct wl_client *client, struct wl_resource *resource); @@ -406,6 +440,11 @@ wl_touch_init(struct wl_touch *touch); void wl_touch_release(struct wl_touch *touch); +void +wl_touch_start_grab(struct wl_touch *device, + struct wl_touch_grab *grab); +void +wl_touch_end_grab(struct wl_touch *touch); void wl_data_device_set_keyboard_focus(struct wl_seat *seat); @@ -440,6 +479,11 @@ int wl_display_init_shm(struct wl_display *display); +struct wl_buffer * +wl_shm_buffer_create(struct wl_client *client, + uint32_t id, int32_t width, int32_t height, + int32_t stride, uint32_t format); + void wl_log_set_handler_server(wl_log_func_t handler); #ifdef __cplusplus diff -Nru wayland-0.95.0/src/wayland-shm.c wayland-1.0.0/src/wayland-shm.c --- wayland-0.95.0/src/wayland-shm.c 2012-07-20 16:28:52.000000000 +0000 +++ wayland-1.0.0/src/wayland-shm.c 2012-10-20 02:58:30.000000000 +0000 @@ -33,6 +33,7 @@ #include #include +#include "wayland-private.h" #include "wayland-server.h" struct wl_shm_pool { @@ -255,6 +256,47 @@ return 0; } +WL_EXPORT struct wl_buffer * +wl_shm_buffer_create(struct wl_client *client, + uint32_t id, int32_t width, int32_t height, + int32_t stride, uint32_t format) +{ + struct wl_shm_buffer *buffer; + + switch (format) { + case WL_SHM_FORMAT_ARGB8888: + case WL_SHM_FORMAT_XRGB8888: + break; + default: + return NULL; + } + + buffer = malloc(sizeof *buffer + stride * height); + if (buffer == NULL) + return NULL; + + buffer->buffer.width = width; + buffer->buffer.height = height; + buffer->buffer.busy_count = 0; + buffer->format = format; + buffer->stride = stride; + buffer->offset = 0; + buffer->pool = NULL; + + buffer->buffer.resource.object.id = id; + buffer->buffer.resource.object.interface = &wl_buffer_interface; + buffer->buffer.resource.object.implementation = (void (**)(void)) + &shm_buffer_interface; + + buffer->buffer.resource.data = buffer; + buffer->buffer.resource.client = client; + buffer->buffer.resource.destroy = destroy_buffer; + + wl_client_add_resource(client, &buffer->buffer.resource); + + return &buffer->buffer; +} + WL_EXPORT int wl_buffer_is_shm(struct wl_buffer *buffer) { @@ -281,7 +323,10 @@ if (!wl_buffer_is_shm(buffer_base)) return NULL; - return buffer->pool->data + buffer->offset; + if (buffer->pool) + return buffer->pool->data + buffer->offset; + else + return buffer + 1; } WL_EXPORT uint32_t diff -Nru wayland-0.95.0/src/wayland-util.c wayland-1.0.0/src/wayland-util.c --- wayland-0.95.0/src/wayland-util.c 2012-07-22 18:09:48.000000000 +0000 +++ wayland-1.0.0/src/wayland-util.c 2012-10-16 00:51:00.000000000 +0000 @@ -132,12 +132,18 @@ return p; } -WL_EXPORT void +WL_EXPORT int wl_array_copy(struct wl_array *array, struct wl_array *source) { - array->size = 0; - wl_array_add(array, source->size); + if (array->size < source->size) { + if (!wl_array_add(array, source->size - array->size)) + return -1; + } else { + array->size = source->size; + } + memcpy(array->data, source->data, source->size); + return 0; } union map_entry { @@ -179,6 +185,8 @@ map->free_list = entry->next; } else { entry = wl_array_add(entries, sizeof *entry); + if (!entry) + return 0; start = entries->data; } diff -Nru wayland-0.95.0/src/wayland-util.h wayland-1.0.0/src/wayland-util.h --- wayland-0.95.0/src/wayland-util.h 2012-07-10 01:15:25.000000000 +0000 +++ wayland-1.0.0/src/wayland-util.h 2012-10-20 03:12:11.000000000 +0000 @@ -39,12 +39,6 @@ #define WL_EXPORT #endif -#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) - -#define container_of(ptr, type, member) ({ \ - const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) - struct wl_message { const char *name; const char *signature; @@ -116,40 +110,40 @@ void wl_list_insert_list(struct wl_list *list, struct wl_list *other); #ifdef __GNUC__ -#define __wl_container_of(ptr, sample, member) \ +#define wl_container_of(ptr, sample, member) \ (__typeof__(sample))((char *)(ptr) - \ ((char *)&(sample)->member - (char *)(sample))) #else -#define __wl_container_of(ptr, sample, member) \ +#define wl_container_of(ptr, sample, member) \ (void *)((char *)(ptr) - \ ((char *)&(sample)->member - (char *)(sample))) #endif #define wl_list_for_each(pos, head, member) \ - for (pos = 0, pos = __wl_container_of((head)->next, pos, member); \ + for (pos = 0, pos = wl_container_of((head)->next, pos, member); \ &pos->member != (head); \ - pos = __wl_container_of(pos->member.next, pos, member)) + pos = wl_container_of(pos->member.next, pos, member)) #define wl_list_for_each_safe(pos, tmp, head, member) \ for (pos = 0, tmp = 0, \ - pos = __wl_container_of((head)->next, pos, member), \ - tmp = __wl_container_of((pos)->member.next, tmp, member); \ + pos = wl_container_of((head)->next, pos, member), \ + tmp = wl_container_of((pos)->member.next, tmp, member); \ &pos->member != (head); \ pos = tmp, \ - tmp = __wl_container_of(pos->member.next, tmp, member)) + tmp = wl_container_of(pos->member.next, tmp, member)) #define wl_list_for_each_reverse(pos, head, member) \ - for (pos = 0, pos = __wl_container_of((head)->prev, pos, member); \ + for (pos = 0, pos = wl_container_of((head)->prev, pos, member); \ &pos->member != (head); \ - pos = __wl_container_of(pos->member.prev, pos, member)) + pos = wl_container_of(pos->member.prev, pos, member)) #define wl_list_for_each_reverse_safe(pos, tmp, head, member) \ for (pos = 0, tmp = 0, \ - pos = __wl_container_of((head)->prev, pos, member), \ - tmp = __wl_container_of((pos)->member.prev, tmp, member); \ + pos = wl_container_of((head)->prev, pos, member), \ + tmp = wl_container_of((pos)->member.prev, tmp, member); \ &pos->member != (head); \ pos = tmp, \ - tmp = __wl_container_of(pos->member.prev, tmp, member)) + tmp = wl_container_of(pos->member.prev, tmp, member)) struct wl_array { size_t size; @@ -165,7 +159,7 @@ void wl_array_init(struct wl_array *array); void wl_array_release(struct wl_array *array); void *wl_array_add(struct wl_array *array, size_t size); -void wl_array_copy(struct wl_array *array, struct wl_array *source); +int wl_array_copy(struct wl_array *array, struct wl_array *source); typedef int32_t wl_fixed_t; diff -Nru wayland-0.95.0/src/wayland-version.h wayland-1.0.0/src/wayland-version.h --- wayland-0.95.0/src/wayland-version.h 2012-07-24 19:45:21.000000000 +0000 +++ wayland-1.0.0/src/wayland-version.h 2012-10-22 18:55:31.000000000 +0000 @@ -23,9 +23,9 @@ #ifndef WAYLAND_VERSION_H #define WAYLAND_VERSION_H -#define WAYLAND_VERSION_MAJOR 0 -#define WAYLAND_VERSION_MINOR 95 +#define WAYLAND_VERSION_MAJOR 1 +#define WAYLAND_VERSION_MINOR 0 #define WAYLAND_VERSION_MICRO 0 -#define WAYLAND_VERSION "0.95.0" +#define WAYLAND_VERSION "1.0.0" #endif diff -Nru wayland-0.95.0/tests/Makefile.in wayland-1.0.0/tests/Makefile.in --- wayland-0.95.0/tests/Makefile.in 2012-07-24 19:45:09.000000000 +0000 +++ wayland-1.0.0/tests/Makefile.in 2012-10-22 18:55:22.000000000 +0000 @@ -221,6 +221,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ diff -Nru wayland-0.95.0/tests/client-test.c wayland-1.0.0/tests/client-test.c --- wayland-0.95.0/tests/client-test.c 2012-07-02 02:55:13.000000000 +0000 +++ wayland-1.0.0/tests/client-test.c 2012-10-21 14:03:41.000000000 +0000 @@ -32,6 +32,7 @@ #include #include "wayland-server.h" +#include "wayland-private.h" #include "test-runner.h" struct client_destroy_listener { diff -Nru wayland-0.95.0/tests/connection-test.c wayland-1.0.0/tests/connection-test.c --- wayland-0.95.0/tests/connection-test.c 2012-07-24 00:17:10.000000000 +0000 +++ wayland-1.0.0/tests/connection-test.c 2012-10-16 00:51:00.000000000 +0000 @@ -37,26 +37,15 @@ static const char message[] = "Hello, world"; -static int -update_func(struct wl_connection *connection, uint32_t mask, void *data) -{ - uint32_t *m = data; - - *m = mask; - - return 0; -} - static struct wl_connection * -setup(int *s, uint32_t *mask) +setup(int *s) { struct wl_connection *connection; assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0); - connection = wl_connection_create(s[0], update_func, mask); + connection = wl_connection_create(s[0]); assert(connection); - assert(*mask == WL_CONNECTION_READABLE); return connection; } @@ -65,9 +54,8 @@ { struct wl_connection *connection; int s[2]; - uint32_t mask; - connection = setup(s, &mask); + connection = setup(s); wl_connection_destroy(connection); close(s[1]); } @@ -76,15 +64,12 @@ { struct wl_connection *connection; int s[2]; - uint32_t mask; char buffer[64]; - connection = setup(s, &mask); + connection = setup(s); assert(wl_connection_write(connection, message, sizeof message) == 0); - assert(mask == (WL_CONNECTION_WRITABLE | WL_CONNECTION_READABLE)); - assert(wl_connection_data(connection, WL_CONNECTION_WRITABLE) == 0); - assert(mask == WL_CONNECTION_READABLE); + assert(wl_connection_flush(connection) == sizeof message); assert(read(s[1], buffer, sizeof buffer) == sizeof message); assert(memcmp(message, buffer, sizeof message) == 0); @@ -96,15 +81,12 @@ { struct wl_connection *connection; int s[2]; - uint32_t mask; char buffer[64]; - connection = setup(s, &mask); + connection = setup(s); assert(write(s[1], message, sizeof message) == sizeof message); - assert(mask == WL_CONNECTION_READABLE); - assert(wl_connection_data(connection, WL_CONNECTION_READABLE) == - sizeof message); + assert(wl_connection_read(connection) == sizeof message); wl_connection_copy(connection, buffer, sizeof message); assert(memcmp(message, buffer, sizeof message) == 0); wl_connection_consume(connection, sizeof message); @@ -117,23 +99,19 @@ { struct wl_connection *connection; int s[2]; - uint32_t mask; char buffer[64]; - connection = setup(s, &mask); + connection = setup(s); /* Test that wl_connection_queue() puts data in the output - * buffer without asking for WL_CONNECTION_WRITABLE. Verify - * that the data did get in the buffer by writing another - * message and making sure that we receive the two messages on - * the other fd. */ + * buffer without flush it. Verify that the data did get in + * the buffer by writing another message and making sure that + * we receive the two messages on the other fd. */ assert(wl_connection_queue(connection, message, sizeof message) == 0); - assert(mask == WL_CONNECTION_READABLE); + assert(wl_connection_flush(connection) == 0); assert(wl_connection_write(connection, message, sizeof message) == 0); - assert(mask == (WL_CONNECTION_WRITABLE | WL_CONNECTION_READABLE)); - assert(wl_connection_data(connection, WL_CONNECTION_WRITABLE) == 0); - assert(mask == WL_CONNECTION_READABLE); + assert(wl_connection_flush(connection) == 2 * sizeof message); assert(read(s[1], buffer, sizeof buffer) == 2 * sizeof message); assert(memcmp(message, buffer, sizeof message) == 0); assert(memcmp(message, buffer + sizeof message, sizeof message) == 0); @@ -146,8 +124,6 @@ struct wl_connection *read_connection; struct wl_connection *write_connection; int s[2]; - uint32_t read_mask; - uint32_t write_mask; uint32_t buffer[10]; union { uint32_t u; @@ -162,18 +138,10 @@ { assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0); - - data->read_connection = - wl_connection_create(data->s[0], - update_func, &data->read_mask); + data->read_connection = wl_connection_create(data->s[0]); assert(data->read_connection); - assert(data->read_mask == WL_CONNECTION_READABLE); - - data->write_connection = - wl_connection_create(data->s[1], - update_func, &data->write_mask); + data->write_connection = wl_connection_create(data->s[1]); assert(data->write_connection); - assert(data->write_mask == WL_CONNECTION_READABLE); } static void @@ -199,11 +167,7 @@ assert(closure); assert(wl_closure_send(closure, data->write_connection) == 0); wl_closure_destroy(closure); - assert(data->write_mask == - (WL_CONNECTION_WRITABLE | WL_CONNECTION_READABLE)); - assert(wl_connection_data(data->write_connection, - WL_CONNECTION_WRITABLE) == 0); - assert(data->write_mask == WL_CONNECTION_READABLE); + assert(wl_connection_flush(data->write_connection) == size); assert(read(data->s[0], data->buffer, sizeof data->buffer) == size); assert(data->buffer[0] == sender.id); @@ -367,8 +331,7 @@ int size = msg[1]; assert(write(data->s[1], msg, size) == size); - assert(wl_connection_data(data->read_connection, - WL_CONNECTION_READABLE) == size); + assert(wl_connection_read(data->read_connection) == size); wl_map_init(&objects); object.id = msg[0]; @@ -447,14 +410,9 @@ assert(closure); assert(wl_closure_send(closure, data->write_connection) == 0); wl_closure_destroy(closure); - assert(data->write_mask == - (WL_CONNECTION_WRITABLE | WL_CONNECTION_READABLE)); - assert(wl_connection_data(data->write_connection, - WL_CONNECTION_WRITABLE) == 0); - assert(data->write_mask == WL_CONNECTION_READABLE); + assert(wl_connection_flush(data->write_connection) == size); - assert(wl_connection_data(data->read_connection, - WL_CONNECTION_READABLE) == size); + assert(wl_connection_read(data->read_connection) == size); wl_map_init(&objects); object.id = msg[0]; diff -Nru wayland-0.95.0/tests/os-wrappers-test.c wayland-1.0.0/tests/os-wrappers-test.c --- wayland-0.95.0/tests/os-wrappers-test.c 2012-07-02 02:55:13.000000000 +0000 +++ wayland-1.0.0/tests/os-wrappers-test.c 2012-10-16 00:51:00.000000000 +0000 @@ -211,33 +211,17 @@ int wrapped_calls; }; -static int -update_func(struct wl_connection *connection, uint32_t mask, void *data) -{ - uint32_t *m = data; - - *m = mask; - - return 0; -} - static void setup_marshal_data(struct marshal_data *data) { assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0); - data->read_connection = - wl_connection_create(data->s[0], - update_func, &data->read_mask); + data->read_connection = wl_connection_create(data->s[0]); assert(data->read_connection); - assert(data->read_mask == WL_CONNECTION_READABLE); - data->write_connection = - wl_connection_create(data->s[1], - update_func, &data->write_mask); + data->write_connection = wl_connection_create(data->s[1]); assert(data->write_connection); - assert(data->write_mask == WL_CONNECTION_READABLE); } static void @@ -260,14 +244,9 @@ assert(closure); assert(wl_closure_send(closure, data->write_connection) == 0); wl_closure_destroy(closure); - assert(data->write_mask == - (WL_CONNECTION_WRITABLE | WL_CONNECTION_READABLE)); - assert(wl_connection_data(data->write_connection, - WL_CONNECTION_WRITABLE) == 0); - assert(data->write_mask == WL_CONNECTION_READABLE); + assert(wl_connection_flush(data->write_connection) == size); - assert(wl_connection_data(data->read_connection, - WL_CONNECTION_READABLE) == size); + assert(wl_connection_read(data->read_connection) == size); wl_map_init(&objects); object.id = msg[0]; diff -Nru wayland-0.95.0/tests/sanity-test.c wayland-1.0.0/tests/sanity-test.c --- wayland-0.95.0/tests/sanity-test.c 2012-07-02 02:55:13.000000000 +0000 +++ wayland-1.0.0/tests/sanity-test.c 2012-08-29 18:10:24.000000000 +0000 @@ -29,6 +29,8 @@ #include "test-runner.h" #include "wayland-util.h" +extern int leak_check_enabled; + TEST(empty) { } @@ -68,6 +70,8 @@ { void *p; + assert(leak_check_enabled); + p = malloc(10); /* memory leak */ assert(p); /* assert that we got memory, also prevents * the malloc from getting optimized away. */ @@ -78,6 +82,8 @@ { struct wl_array array; + assert(leak_check_enabled); + wl_array_init(&array); /* call into library that calls malloc */ @@ -90,6 +96,8 @@ { int fd[2]; + assert(leak_check_enabled); + /* leak 2 file descriptors */ if (pipe(fd) < 0) exit(EXIT_SUCCESS); /* failed to fail */ diff -Nru wayland-0.95.0/tests/socket-test.c wayland-1.0.0/tests/socket-test.c --- wayland-0.95.0/tests/socket-test.c 2012-07-02 02:55:13.000000000 +0000 +++ wayland-1.0.0/tests/socket-test.c 2012-10-06 00:19:16.000000000 +0000 @@ -36,17 +36,21 @@ #define TOO_LONG (1 + sizeof example_sockaddr_un.sun_path) +/* Ensure the connection doesn't fail due to lack of XDG_RUNTIME_DIR. */ +static void +require_xdg_runtime_dir(void) +{ + char *val = getenv("XDG_RUNTIME_DIR"); + if (!val) + assert(0 && "set $XDG_RUNTIME_DIR to run this test"); +} + TEST(socket_path_overflow_client_connect) { char path[TOO_LONG]; struct wl_display *d; - int ret; - /* Ensure the connection doesn't fail due to lack of - XDG_RUNTIME_DIR. Don't use setenv(), as that allocates - memory and creates a spurious memory leak failure. */ - ret = putenv("XDG_RUNTIME_DIR=."); - assert(ret == 0); + require_xdg_runtime_dir(); memset(path, 'a', sizeof path); path[sizeof path - 1] = '\0'; @@ -62,11 +66,7 @@ struct wl_display *d; int ret; - /* Ensure the connection doesn't fail due to lack of - XDG_RUNTIME_DIR. Don't use setenv(), as that allocates - memory and creates a spurious memory leak failure. */ - ret = putenv("XDG_RUNTIME_DIR=."); - assert(ret == 0); + require_xdg_runtime_dir(); memset(path, 'a', sizeof path); path[sizeof path - 1] = '\0'; diff -Nru wayland-0.95.0/tests/test-runner.c wayland-1.0.0/tests/test-runner.c --- wayland-0.95.0/tests/test-runner.c 2012-07-24 19:00:02.000000000 +0000 +++ wayland-1.0.0/tests/test-runner.c 2012-08-29 18:10:24.000000000 +0000 @@ -39,6 +39,8 @@ static void* (*sys_realloc)(void*, size_t); static void* (*sys_calloc)(size_t, size_t); +int leak_check_enabled; + extern const struct test __start_test_section, __stop_test_section; __attribute__ ((visibility("default"))) void * @@ -95,8 +97,10 @@ cur_fds = count_open_fds(); t->run(); - assert(cur_alloc == num_alloc && "memory leak detected in test."); - assert(cur_fds == count_open_fds() && "fd leak detected"); + if (leak_check_enabled) { + assert(cur_alloc == num_alloc && "memory leak detected in test."); + assert(cur_fds == count_open_fds() && "fd leak detected"); + } exit(EXIT_SUCCESS); } @@ -113,6 +117,8 @@ sys_malloc = dlsym(RTLD_NEXT, "malloc"); sys_free = dlsym(RTLD_NEXT, "free"); + leak_check_enabled = !getenv("NO_ASSERT_LEAK_CHECK"); + if (argc == 2) { t = find_test(argv[1]); if (t == NULL) {