wayland: Changes to 'upstream-experimental'
configure.ac | 2
doc/Wayland/.gitignore | 1
doc/Wayland/Makefile.am | 16 +-
doc/Wayland/doxygen-to-publican.xsl | 54 +++++-
doc/Wayland/en_US/Architecture.xml | 4
doc/doxygen/.gitignore | 1
doc/doxygen/wayland.doxygen.in | 19 --
protocol/Makefile.am | 10 -
protocol/protocol.xsl | 204 -------------------------
protocol/wayland-protocol.css | 41 -----
protocol/wayland.xml | 8 +
src/wayland-client.c | 134 +++++++++++++---
src/wayland-private.h | 2
tests/Makefile.am | 4
tests/queue-test.c | 286 ++++++++++++++++++++++++++++++++++++
15 files changed, 471 insertions(+), 315 deletions(-)
New commits:
commit 5006829041b202f73d051be016a41adf3662bfdc
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Nov 19 17:27:04 2012 -0500
configure.ac: Bump version to 1.0.1
diff --git a/configure.ac b/configure.ac
index f681fc9..aa7a62a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.64])
m4_define([wayland_major_version], [1])
m4_define([wayland_minor_version], [0])
-m4_define([wayland_micro_version], [0])
+m4_define([wayland_micro_version], [1])
m4_define([wayland_version],
[wayland_major_version.wayland_minor_version.wayland_micro_version])
commit edb0a1bef5e58f9db44116f62c34f481f990221c
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Nov 19 17:14:05 2012 -0500
doc: Fix out-of-source build so distcheck works again
The amount of generated files and hacks over hacks in the doc/ directory
is getting out of hand and we need a better solution. For now, just get
distcheck back to working.
diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am
index 2c41a49..53ad6ee 100644
--- a/doc/Wayland/Makefile.am
+++ b/doc/Wayland/Makefile.am
@@ -37,13 +37,13 @@ en-US/ProtocolInterfaces.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/proto
# the output methods.
en-US/WaylandClientAPI.xml: $(top_builddir)/doc/doxygen/xml/index.xml $(srcdir)/doxygen-to-publican.xsl
$(AM_V_GEN)$(MKDIR_P) en-US/images
- $(AM_V_GEN)mv $(top_srcdir)/doc/doxygen/xml/wayland-client_8h.xml \
- $(top_srcdir)/doc/doxygen/
- $(AM_V_GEN)$(XSLTPROC) $(top_srcdir)/doc/doxygen/xml/combine.xslt \
- $(top_srcdir)/doc/doxygen/xml/index.xml > \
- $(top_srcdir)/doc/doxygen/xml/clientAPI.xml
- $(AM_V_GEN)mv $(top_srcdir)/doc/doxygen/wayland-client_8h.xml \
- $(top_srcdir)/doc/doxygen/xml
+ $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml \
+ $(top_builddir)/doc/doxygen/
+ $(AM_V_GEN)$(XSLTPROC) $(top_builddir)/doc/doxygen/xml/combine.xslt \
+ $(top_builddir)/doc/doxygen/xml/index.xml > \
+ $(top_builddir)/doc/doxygen/xml/clientAPI.xml
+ $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/wayland-client_8h.xml \
+ $(top_builddir)/doc/doxygen/xml
$(AM_V_GEN)$(XSLTPROC) $(srcdir)/doxygen-to-publican.xsl \
$(top_builddir)/doc/doxygen/xml/clientAPI.xml > en-US/WaylandClientAPI.xml
commit 173e1606322675149c09443e6037737748dd72f7
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Nov 19 17:11:58 2012 -0500
Fix distcheck by adding back protocol/Makefile.am
5909dddc78573774bd3a93c280831a7d18d82994 removed protocol/Makefile.am
which meant protocol/wayland.xml no longer got included in the tarball.
Add back protocol/Makefile.am and configure.ac bits and add protocol to
subdirs in Makefile.am to fix this.
diff --git a/Makefile.am b/Makefile.am
index 7f35034..306d7b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ if BUILD_DOCS
doc_subdir = doc
endif
-SUBDIRS = src $(doc_subdir) tests cursor
+SUBDIRS = src protocol $(doc_subdir) tests cursor
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/configure.ac b/configure.ac
index a451948..f681fc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,5 +116,6 @@ AC_CONFIG_FILES([Makefile
src/wayland-server.pc
src/wayland-client.pc
src/wayland-version.h
+ protocol/Makefile
tests/Makefile])
AC_OUTPUT
diff --git a/protocol/Makefile.am b/protocol/Makefile.am
new file mode 100644
index 0000000..08690b3
--- /dev/null
+++ b/protocol/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = wayland.xml
commit 3a671b4d3db6dd03bcc6e266484d30b9f3f4fd8b
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Nov 19 15:44:14 2012 -0500
protocol: Fix copy and paste summary
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 0e51d83..ca3c56f 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -502,7 +502,7 @@
</interface>
<interface name="wl_data_device_manager" version="1">
- <description summary="desktop style meta data interface">
+ <description summary="data transfer interface">
The wl_data_device_manager is a a singleton global object that
provides access to inter-client data transfer mechanisms such as
copy and paste and drag and drop. These mechanisms are tied to
commit 94fd3d1dd475b49a63b954ac4584381fa151bbd0
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Nov 19 15:02:45 2012 -0500
protocol: Add summary description for wl_data_device_manager
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 6171670..0e51d83 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -502,6 +502,14 @@
</interface>
<interface name="wl_data_device_manager" version="1">
+ <description summary="desktop style meta data interface">
+ The wl_data_device_manager is a a singleton global object that
+ provides access to inter-client data transfer mechanisms such as
+ copy and paste and drag and drop. These mechanisms are tied to
+ a wl_seat and this interface lets a client get a wl_data_device
+ corresponding to a wl_seat.
+ </description>
+
<request name="create_data_source">
<arg name="id" type="new_id" interface="wl_data_source"/>
</request>
commit b46dab17f0912331b5687891d84361f67b16ec54
Author: Martin Olsson <martin@minimum.se>
Date: Wed Nov 14 13:58:31 2012 -0500
client: Fix source comment typos
diff --git a/src/wayland-client.c b/src/wayland-client.c
index d3a7970..5ab000c 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -1002,12 +1002,12 @@ wl_display_dispatch_pending(struct wl_display *display)
return dispatch_queue(display, &display->queue, 0);
}
-/** Retrieve the last error occured on a display
+/** Retrieve the last error occurred 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 occurred on \c display or 0 if no error occurred
*
- * Return the last error occured on the display. This may be an error sent
+ * Return the last error occurred 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
commit 73d845af941193c04c2451cea16f7500753e08b0
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date: Tue Nov 6 17:17:01 2012 -0200
doc: Fix incorrectly formatted section header
https://bugs.freedesktop.org/show_bug.cgi?id=56719
Reported-by: Petr Gladkikh <PetrGlad@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/doc/Wayland/en_US/Architecture.xml b/doc/Wayland/en_US/Architecture.xml
index d5488b8..4af91ea 100644
--- a/doc/Wayland/en_US/Architecture.xml
+++ b/doc/Wayland/en_US/Architecture.xml
@@ -263,8 +263,10 @@
that even if an application passes a new buffer to the
compositor, only a small part of the buffer may be
different, like a blinking cursor or a spinner.
- Hardware Enabling for Wayland
</para>
+ </section>
+ <section id="sect-Wayland-Architecture-wayland_hw_enabling">
+ <title>Hardware Enabling for Wayland</title>
<para>
Typically, hardware enabling includes modesetting/display
and EGL/GLES2. On top of that Wayland needs a way to share
commit 4a8395f1a8eb6f2ea5ac37fcf893760ea03f1ea1
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date: Fri Nov 9 20:28:51 2012 -0200
doc: Update .gitignore
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/doc/Wayland/.gitignore b/doc/Wayland/.gitignore
index e366f17..c1656e7 100644
--- a/doc/Wayland/.gitignore
+++ b/doc/Wayland/.gitignore
@@ -1,2 +1,3 @@
Wayland
en-US/
+publican-copy.cfg
diff --git a/doc/doxygen/.gitignore b/doc/doxygen/.gitignore
index 8343324..5f82598 100644
--- a/doc/doxygen/.gitignore
+++ b/doc/doxygen/.gitignore
@@ -1 +1,2 @@
wayland.doxygen
+xml/
commit 5afebc4cb191fb1e9cd44352800bd4e5a3caa42a
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date: Fri Nov 9 20:48:22 2012 -0200
doc: Set publican to quiet mode
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am
index 71ae9b8..2c41a49 100644
--- a/doc/Wayland/Makefile.am
+++ b/doc/Wayland/Makefile.am
@@ -62,7 +62,7 @@ Wayland: $(publican_targets)
$(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 \
+ $(AM_V_GEN)$(PUBLICAN) build --quiet --lang en-US --format html,pdf \
--config $(builddir)/publican-copy.cfg
@touch Wayland
commit 5909dddc78573774bd3a93c280831a7d18d82994
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date: Fri Nov 9 20:33:10 2012 -0200
doc: Remove unused css and xslt for the protocol
This was added previously (commit 015c42e1) when we didn't have docbook
formatted documentation. Now it became quite useless.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/Makefile.am b/Makefile.am
index 306d7b3..7f35034 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ if BUILD_DOCS
doc_subdir = doc
endif
-SUBDIRS = src protocol $(doc_subdir) tests cursor
+SUBDIRS = src $(doc_subdir) tests cursor
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/configure.ac b/configure.ac
index f681fc9..a451948 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,6 +116,5 @@ AC_CONFIG_FILES([Makefile
src/wayland-server.pc
src/wayland-client.pc
src/wayland-version.h
- protocol/Makefile
tests/Makefile])
AC_OUTPUT
diff --git a/protocol/Makefile.am b/protocol/Makefile.am
deleted file mode 100644
index 23554d1..0000000
--- a/protocol/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-if HAVE_XSLTPROC
-doc_DATA = wayland.html
-dist_doc_DATA = wayland-protocol.css wayland.xml protocol.xsl
-
-wayland.html: wayland.xml protocol.xsl
- $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol.xsl $(srcdir)/wayland.xml > $@
-
-CLEANFILES = wayland.html
-endif
diff --git a/protocol/protocol.xsl b/protocol/protocol.xsl
deleted file mode 100644
index 453b897..0000000
--- a/protocol/protocol.xsl
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" ?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" indent="yes" encoding="UTF-8"/>
-<xsl:preserve-space elements="copyright"/>
-<xsl:template match="/">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- <link href="wayland-protocol.css" rel="stylesheet" type="text/css" />
- <title>Wayland</title>
- </head>
- <body>
- <h1><img src="wayland.png" alt="Wayland logo" /></h1>
- <h1>Wayland Protocol Specification</h1>
-
- <!-- Copyright blurb -->
- <xsl:apply-templates select="protocol/copyright"/>
-
- <!-- TOC -->
- <xsl:apply-templates select="protocol" mode="toc" />
-
- <!-- Interface descriptions -->
- <xsl:apply-templates select="protocol/interface" mode="interface_description" />
-
- </body>
-</html>
-</xsl:template>
-
-<!-- Copyright blurb -->
-<xsl:template match="copyright">
- <div>
- <pre class="copyright">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </pre>
- </div>
-</xsl:template>
-
-<!-- TOC -->
-<xsl:template match="protocol" mode="toc">
- <div class="toc">
- <h2>Table of Contents</h2>
- <ul>
- <xsl:apply-templates select="interface" mode="toc" />
- </ul>
- </div>
-</xsl:template>
-
-<!-- interface in TOC -->
-<xsl:template match="interface" mode="toc">
- <li>
- <xsl:call-template name="link">
- <xsl:with-param name="which" select="'href'" />
- </xsl:call-template>
-
- <!-- request list -->
- <xsl:if test="request">
- <div>
- Requests:
- <ul>
- <xsl:apply-templates select="request" mode="toc"/>
- </ul>
- </div>
- </xsl:if>
-
- <!-- event list -->
- <xsl:if test="event">
- <div>
- Events:
- <ul>
- <xsl:apply-templates select="event" mode="toc"/>
- </ul>
- </div>
- </xsl:if>
-
- <!-- enum list -->
- <xsl:if test="enum">
- <div>
- Enums:
- <ul>
- <xsl:apply-templates select="enum" mode="toc"/>
- </ul>
- </div>
- </xsl:if>
- </li>
-</xsl:template>
-
-<!--
- Template to create a <a> tag in the form
- #<interfacename>-<request|event>-<request/event name>
- the '#' prefix is added if $which is 'href'
- $which decides which attribute name (href or name) of <a> to set
--->
-<xsl:template name="link" >
- <xsl:param name="which" />
- <a>
- <xsl:attribute name="{$which}">
- <xsl:if test="$which = 'href'">#</xsl:if>
- <xsl:value-of select="../@name"/>
- <xsl:text>-</xsl:text> <!-- xsl:text needed to avoid whitespace -->
- <xsl:value-of select="name()"/>
- <xsl:text>-</xsl:text> <!-- xsl:text needed to avoid whitespace -->
- <xsl:value-of select="@name"/></xsl:attribute>
- <!-- only display link text for href links -->
- <xsl:if test="$which = 'href'">
- <span class="mono"><xsl:value-of select="@name"/></span>
- <xsl:if test="description/@summary"> - <xsl:value-of select="description/@summary"/></xsl:if>
- </xsl:if>
- </a>
-</xsl:template>
-
-<!-- requests and events in TOC -->
-<xsl:template match="request|event|enum" mode="toc">
- <li>
- <xsl:call-template name="link">
- <xsl:with-param name="which" select="'href'" />
- </xsl:call-template>
- </li>
-</xsl:template>
-
-<!-- Interface descriptions -->
-<xsl:template match="protocol/interface" mode="interface_description">
- <div class="interface">
- <xsl:call-template name="link">
- <xsl:with-param name="which" select="'name'" />
- </xsl:call-template>
- <h1>
- <span class="mono"><xsl:value-of select="@name" /></span>
- <!-- only show summary if it exists -->
- <xsl:if test="description/@summary">
- - <xsl:value-of select="description/@summary" />
- </xsl:if>
- </h1>
- <p class="version">Version: <xsl:value-of select="@version" /></p>
- <p><xsl:value-of select="description"/></p>
- <xsl:if test="request">
- <div class="requests">
- <h2>Requests</h2>
- <!-- Request list -->
- <xsl:apply-templates select="request" mode="interface_description" />
- </div>
- </xsl:if>
-
- <xsl:if test="event">
- <div class="events">
- <h2>Events</h2>
- <!-- Event list -->
- <xsl:apply-templates select="event" mode="interface_description" />
- </div>
- </xsl:if>
-
- <xsl:if test="enum">
- <div class="enums">
- <h2>Enums</h2>
- <!-- enum list -->
- <xsl:apply-templates select="enum" mode="interface_description"/>
- </div>
- </xsl:if>
- </div>
-</xsl:template>
-
-<!-- table contents for request/event arguments or enum values -->
-<xsl:template match="arg|entry">
- <tr>
- <td class="arg_name"><xsl:value-of select="@name"/></td>
- <xsl:if test="name() = 'arg'" >
- <td class="arg_type"><xsl:value-of select="@type"/></td>
- </xsl:if>
- <xsl:if test="name() = 'entry'" >
- <td class="arg_value"><xsl:value-of select="@value"/></td>
- </xsl:if>
- <td class="arg_desc"><xsl:value-of select="@summary"/></td>
- </tr>
-</xsl:template>
-
-<!-- Request/event list -->
-<xsl:template match="request|event|enum" mode="interface_description">
- <div>
- <xsl:call-template name="link">
- <xsl:with-param name="which" select="'name'" />
- </xsl:call-template>
- <h3>
- <span class="mono"><xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /></span>
- <xsl:if test="description/@summary">
- - <xsl:value-of select="description/@summary" />
- </xsl:if>
- </h3>
- <p><xsl:value-of select="description"/></p>
- <xsl:if test="arg">
- Arguments:
- <table>
- <xsl:apply-templates select="arg"/>
- </table>
- </xsl:if>
- <xsl:if test="entry">
- Values:
- <table>
- <xsl:apply-templates select="entry"/>
- </table>
- </xsl:if>
- </div>
-</xsl:template>
-</xsl:stylesheet>
-
-<!-- vim: set expandtab shiftwidth=2: -->
diff --git a/protocol/wayland-protocol.css b/protocol/wayland-protocol.css
deleted file mode 100644
index 91f458a..0000000
--- a/protocol/wayland-protocol.css
+++ /dev/null
@@ -1,41 +0,0 @@
-body { padding: 0px 150px; }
-h1 { margin: 40px 0px; color: #aaa; }
-p { margin: 20px 0px; }
-h1 img { vertical-align: middle; border-width: 0px; }
-h2 { font-family: sans; color: #888; }
-h3 { font-family: sans; color: #888; font-style: italic; }
-a { color: #444; }
-a:hover { color: #888; }
-a:visited { color: #666; }
-li { margin: 10px 0px };
-table { border: 1px solid gray;}
-
-.version { font-size: small }
-div.interface { padding: 2% }
-
-div.requests div:nth-child(even) { background-color: #eeeeee; }
-div.requests div { margin-left: 2%; padding-left: 2%; }
-div.requests table { border: 0px; margin: 10px; }
-div.requests table th { padding: 5px }
-div.requests table td { padding: 5px }
-
-div.events div:nth-child(even) { background-color: #eeeeee; }
-div.events div { margin-left: 2%; padding-left: 2%; }
-div.events table { border: 0px; margin: 10px; }
-div.events table th { padding: 5px }
-div.events table td { padding: 5px }
-
-div.enums div:nth-child(even) { background-color: #eeeeee; }
-div.enums div { margin-left: 2%; padding-left: 2%; }
-div.enums table { border: 0px; margin: 10px; }
-div.enums table th { padding: 5px }
-div.enums table td { padding: 5px }
-
-.arg_name { font-family: monospace; padding:5px}
-.arg_type { font-family: monospace; color: #338833; padding:5px }
-.arg_value { font-family: monospace; color: #338833; padding:5px }
-.arg_desc { font-style: italic;padding:5px; }
-.mono { font-family: monospace; font-weight: bold; }
-
-div.toc span { font-size: 11pt; line-height: 150%; }
-div.toc li li { line-height: 100%; margin: 0%; }
commit c77ba6bebc181d88851d802907b0016fd4f810fc
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date: Fri Nov 9 20:14:31 2012 -0200
doc: Auto-generate API methods and classes documentation
There's work to do still for giving a prettier style on the documentation, for
instance splitting paragraphs correctly and printing the detailed description
of the methods as well.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am
index 4a7f2cd..71ae9b8 100644
--- a/doc/Wayland/Makefile.am
+++ b/doc/Wayland/Makefile.am
@@ -32,10 +32,20 @@ en-US/ProtocolInterfaces.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/proto
$(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
+# WaylandClientAPI.xml is generated after combining all xml in one single file
+# with the exception of wayland-client_8h.xml that is omitted to not duplicate
+# the output methods.
+en-US/WaylandClientAPI.xml: $(top_builddir)/doc/doxygen/xml/index.xml $(srcdir)/doxygen-to-publican.xsl
$(AM_V_GEN)$(MKDIR_P) en-US/images
+ $(AM_V_GEN)mv $(top_srcdir)/doc/doxygen/xml/wayland-client_8h.xml \
+ $(top_srcdir)/doc/doxygen/
+ $(AM_V_GEN)$(XSLTPROC) $(top_srcdir)/doc/doxygen/xml/combine.xslt \
+ $(top_srcdir)/doc/doxygen/xml/index.xml > \
+ $(top_srcdir)/doc/doxygen/xml/clientAPI.xml
+ $(AM_V_GEN)mv $(top_srcdir)/doc/doxygen/wayland-client_8h.xml \
+ $(top_srcdir)/doc/doxygen/xml
$(AM_V_GEN)$(XSLTPROC) $(srcdir)/doxygen-to-publican.xsl \
- $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml > en-US/WaylandClientAPI.xml
+ $(top_builddir)/doc/doxygen/xml/clientAPI.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
diff --git a/doc/Wayland/doxygen-to-publican.xsl b/doc/Wayland/doxygen-to-publican.xsl
index bd1f5a4..3ddcbd3 100644
--- a/doc/Wayland/doxygen-to-publican.xsl
+++ b/doc/Wayland/doxygen-to-publican.xsl
@@ -13,7 +13,7 @@
<section id="sect-Library-Client">
<title>Client API</title>
- <para>Following is the Wayland library interface for clients
+ <para>Following is the Wayland library classes for clients
(<emphasis>libwayland-client</emphasis>). Note that most of the
procedures are related with IPC, which is the main responsibility of
the library.
@@ -21,26 +21,52 @@
<para>
<variablelist>
+ <xsl:apply-templates select="/doxygen/compounddef" />
+ </variablelist>
+ </para>
+
+ <para>And methods for the respective classes.</para>
+
+ <para>
+ <variablelist>
<xsl:apply-templates select="/doxygen/compounddef/sectiondef/memberdef" />
</variablelist>
</para>
</section>
</xsl:template>
-<xsl:template match="memberdef" >
- <xsl:if test="@kind = 'function'">
- <varlistentry>
- <term>
- <xsl:value-of select="name" />
- </term>
- <listitem>
- <para>
- <xsl:value-of select="briefdescription" />
- </para>
- </listitem>
- </varlistentry>
- </xsl:if>
+<!-- methods -->
+<xsl:template match="memberdef" >
+ <xsl:if test="@kind = 'function' and @static = 'no'">
+ <varlistentry>
+ <term>
+ <xsl:value-of select="name" />
+ - <xsl:value-of select="briefdescription" />
+ </term>
+ <listitem>
+ <para></para>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
</xsl:template>
+<!-- classes -->
+<xsl:template match="compounddef" >
+ <xsl:if test="@kind = 'class' ">
+ <varlistentry>
+ <term>
+ <xsl:value-of select="compoundname" />
+ <xsl:if test="briefdescription">
+ - <xsl:value-of select="briefdescription" />
+ </xsl:if>
+ </term>
+
+ <!-- TODO: the output text is not splitting paragraphs correctly -->
+ <listitem>
+ <para><xsl:value-of select="detaileddescription"/></para>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+</xsl:template>
</xsl:stylesheet>
commit a95aba7fcae7c900c389faff16a7768fe2eb326a
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date: Mon Nov 12 16:07:16 2012 -0200
doc: doxygen: Interpret the first line comment as the brief
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/doc/doxygen/wayland.doxygen.in b/doc/doxygen/wayland.doxygen.in
index aff74d2..12d0817 100644
--- a/doc/doxygen/wayland.doxygen.in
+++ b/doc/doxygen/wayland.doxygen.in
@@ -151,7 +151,7 @@ SHORT_NAMES = NO
# comments will behave just like regular Qt-style comments
# (thus requiring an explicit @brief command for a brief description.)
-JAVADOC_AUTOBRIEF = NO
+JAVADOC_AUTOBRIEF = YES
# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
# interpret the first line (until the first dot) of a Qt-style
commit 2a8da76fb1b3afdb633a9551054ff9cecb89beca
Author: Jonas Ådahl <jadahl@gmail.com>
Date: Tue Nov 6 08:15:04 2012 +0100
tests: Add out of order delete_id queue tests
Verify that when receiving the first of two synchronization callback
events, destroying the second one doesn't cause any errors even if the
delete_id event is handled out of order.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/tests/queue-test.c b/tests/queue-test.c
index 8b0e02f..681ac24 100644
--- a/tests/queue-test.c
+++ b/tests/queue-test.c
@@ -66,6 +66,94 @@ static const struct wl_registry_listener registry_listener = {
NULL
};
+/* Test that destroying a proxy object doesn't result in any more
+ * callback being invoked, even though were many queued. */
+static int
+client_test_proxy_destroy(void)
+{
+ struct wl_display *display;
+ struct wl_registry *registry;
+ int counter = 0;
+
+ display = wl_display_connect(SOCKET_NAME);
+ client_assert(display);
+
+ registry = wl_display_get_registry(display);
+ wl_registry_add_listener(registry, ®istry_listener,
+ &counter);
+ wl_display_roundtrip(display);
+
+ client_assert(counter == 1);
+
+ wl_display_disconnect(display);
+
+ return 0;
+}
+
+struct multiple_queues_state {
+ struct wl_display *display;
+ struct wl_callback* callback2;
+ bool done;
+};
+
+static void
+sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
+{
+ struct multiple_queues_state *state = data;
+
+ state->done = true;
+ wl_callback_destroy(callback);
+
+ wl_display_dispatch_pending(state->display);
+
+ wl_callback_destroy(state->callback2);
+}
+
+static const struct wl_callback_listener sync_listener = {
+ sync_callback
+};
+
+/* Test that when receiving the first of two synchronization
+ * callback events, destroying the second one doesn't cause any
+ * errors even if the delete_id event is handled out of order. */
+static int
+client_test_multiple_queues(void)
+{
+ struct wl_event_queue *queue;
+ struct wl_callback *callback1;
+ struct multiple_queues_state state;
+ int ret = 0;
+
+ state.display = wl_display_connect(SOCKET_NAME);
+ client_assert(state.display);
+
+ /* Make the current thread the display thread. This is because
+ * wl_display_dispatch_queue() will only read the display fd if
+ * the main display thread has been set. */
+ wl_display_dispatch_pending(state.display);
+
+ queue = wl_display_create_queue(state.display);
+ client_assert(queue);
+
+ state.done = false;
+ callback1 = wl_display_sync(state.display);
+ wl_callback_add_listener(callback1, &sync_listener, &state);
+ wl_proxy_set_queue((struct wl_proxy *) callback1, queue);
+
+ state.callback2 = wl_display_sync(state.display);
+ wl_callback_add_listener(state.callback2, &sync_listener, NULL);
+ wl_proxy_set_queue((struct wl_proxy *) state.callback2, queue);
+
+ wl_display_flush(state.display);
+
+ while (!state.done && !ret)
+ ret = wl_display_dispatch_queue(state.display, queue);
+
+ wl_display_disconnect(state.display);
+
+ return ret == -1 ? -1 : 0;
+}
+
static void
client_alarm_handler(int sig)
{
@@ -83,9 +171,6 @@ client_sigsegv_handler(int sig)
static int
client_main(int fd)
{
- struct wl_display *display;
- struct wl_registry *registry;
- int counter = 0;
bool cont = false;
signal(SIGSEGV, client_sigsegv_handler);
@@ -101,16 +186,15 @@ client_main(int fd)
if (!cont)
return EXIT_FAILURE;
- display = wl_display_connect(SOCKET_NAME);
- client_assert(display);
-
- registry = wl_display_get_registry(display);
- wl_registry_add_listener(registry, ®istry_listener, &counter);
- wl_display_roundtrip(display);
-
- client_assert(counter == 1);
+ if (client_test_proxy_destroy() != 0) {
+ fprintf(stderr, "proxy destroy test failed\n");
+ return EXIT_FAILURE;
+ }
- wl_display_disconnect(display);
+ if (client_test_multiple_queues() != 0) {
+ fprintf(stderr, "multiple proxy test failed\n");
+ return EXIT_FAILURE;
+ }
return EXIT_SUCCESS;
}
commit 3d651dc2eecbfba8c1fc813eedcf615364d5a2ac
Author: Jonas Ådahl <jadahl@gmail.com>
Date: Tue Nov 6 08:15:03 2012 +0100
tests: Use a pipe for synchronization to avoid potential deadlock
Using signals in the previous way could potentially lead to dead locks
if the SIGCONT was signalled before a listener was registered.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/tests/queue-test.c b/tests/queue-test.c
index f66a25f..8b0e02f 100644
--- a/tests/queue-test.c
+++ b/tests/queue-test.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <stdbool.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -50,20 +51,6 @@ struct display {
int child_exit_status;
};
-static int
-sigchld_handler(int signal_number, void *data)
-{
- struct display *display = data;
- int status;
-
- waitpid(-1, &status, 0);
- display->child_exit_status = WEXITSTATUS(status);
-
- wl_display_terminate(display->display);
-
- return 0;
-}
-
static void
registry_handle_global(void *data, struct wl_registry *registry,
uint32_t id, const char *interface, uint32_t version)
@@ -82,25 +69,37 @@ static const struct wl_registry_listener registry_listener = {
static void
client_alarm_handler(int sig)
{
+ fprintf(stderr, "Received SIGALRM signal, aborting.\n");
exit(EXIT_FAILURE);
}
static void
-client_continue_handler(int sig)
+client_sigsegv_handler(int sig)
{
+ fprintf(stderr, "Received SIGSEGV signal, aborting.\n");
+ exit(EXIT_FAILURE);
}
static int
-client_main(void)
+client_main(int fd)
{
struct wl_display *display;
struct wl_registry *registry;
int counter = 0;
+ bool cont = false;
+ signal(SIGSEGV, client_sigsegv_handler);
signal(SIGALRM, client_alarm_handler);
- signal(SIGCONT, client_continue_handler);
- alarm(20);
- pause();
+ alarm(2);
+
+ if (read(fd, &cont, sizeof cont) != 1) {
+ close(fd);
+ return EXIT_FAILURE;
+ }
+ close(fd);
+
+ if (!cont)
+ return EXIT_FAILURE;
display = wl_display_connect(SOCKET_NAME);
client_assert(display);
@@ -122,7 +121,31 @@ dummy_bind(struct wl_client *client,
{
}
-TEST(queue_destroy_proxy)
+static int
+sigchld_handler(int signal_number, void *data)
+{
+ struct display *display = data;
+ int status;
+
+ waitpid(-1, &status, 0);
+ display->child_exit_status = WEXITSTATUS(status);
+
+ wl_display_terminate(display->display);
+
+ return 0;
+}
+
+static void
+signal_client(int fd, bool cont)
+{
+ int ret;
+
+ ret = write(fd, &cont, sizeof cont);
+ close(fd);
+ assert(ret == sizeof cont);
+}
+
+TEST(queue)
{
struct display display;
struct wl_event_loop *loop;
@@ -135,19 +158,28 @@ TEST(queue_destroy_proxy)
};
unsigned int i;
pid_t pid;
+ int fds[2];
int ret;
+ ret = pipe(fds);
+ assert(ret == 0);
+
pid = fork();
if (pid == -1) {
perror("fork");
exit(EXIT_FAILURE);
} else if (pid == 0) {
- exit(client_main());
+ close(fds[1]);
+ exit(client_main(fds[0]));
}
+ close(fds[0]);
Reply to: