summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--secret-service/html/style.css27
-rw-r--r--secret-service/params-html.xsl2
-rw-r--r--secret-service/tools/spec-to-docbook.xsl174
3 files changed, 142 insertions, 61 deletions
diff --git a/secret-service/html/style.css b/secret-service/html/style.css
index 6566fc0..f8a03b0 100644
--- a/secret-service/html/style.css
+++ b/secret-service/html/style.css
@@ -78,10 +78,35 @@ div.informalexample pre {
font-size: 2em;
}
-div.funcsynopsis {
+div.funcsynopsis, code.fieldsynopsis,
+div.refsect2 div.refsynopsisdiv {
padding: 0.5em;
background-color: #F4F4F4;
border: 1px solid gray;
+ display: block;
+ width: 80%;
+}
+
+div.refsynopsisdiv code.fieldsynopsis {
+ padding: 0;
+ border: 0;
+}
+
+code.fieldsynopsis span.modifier {
+ min-width: 8em;
+ display: inline-block;
+}
+
+code.fieldsynopsis span.type {
+ min-width: 11em;
+ display: inline-block;
+}
+
+code.fieldsynopsis span.varname {
+ min-width: 11em;
+ display: inline-block;
+ font-size: 1.1em;
+ font-weight: bold;
}
div.funcprototype-spacer {
diff --git a/secret-service/params-html.xsl b/secret-service/params-html.xsl
index cc73eee..bca2223 100644
--- a/secret-service/params-html.xsl
+++ b/secret-service/params-html.xsl
@@ -31,5 +31,7 @@
<xsl:param name="html.stylesheet">style.css</xsl:param>
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<xsl:param name="funcsynopsis.decoration">1</xsl:param>
+ <xsl:param name="refentry.generate.name">0</xsl:param>
+ <xsl:param name="refentry.generate.title">1</xsl:param>
</xsl:stylesheet>
diff --git a/secret-service/tools/spec-to-docbook.xsl b/secret-service/tools/spec-to-docbook.xsl
index 8b6c223..d320d61 100644
--- a/secret-service/tools/spec-to-docbook.xsl
+++ b/secret-service/tools/spec-to-docbook.xsl
@@ -288,7 +288,7 @@
</refmeta>
<refnamediv>
- <refdescriptor>D-Bus Interface</refdescriptor>
+ <refdescriptor><xsl:value-of select="@name"/></refdescriptor>
<refname><xsl:value-of select="@name"/></refname>
<refpurpose><xsl:apply-templates select="tp:docstring" mode="nopara"/></refpurpose>
</refnamediv>
@@ -357,6 +357,15 @@
</funcsynopsis>
</refsect2>
</xsl:if>
+ <xsl:if test="property">
+ <refsect2>
+ <title>Properties</title>
+ <refsynopsisdiv>
+ <title> </title>
+ <xsl:apply-templates select="property" mode="fieldsynopsislinked"/>
+ </refsynopsisdiv>
+ </refsect2>
+ </xsl:if>
</refsynopsisdiv>
<xsl:if test="method">
@@ -394,9 +403,7 @@
<para>
Accessed using the org.freedesktop.DBus.Properties interface.
</para>
- <glosslist>
- <xsl:apply-templates select="property" mode="detail"/>
- </glosslist>
+ <xsl:apply-templates select="property" mode="detail"/>
</refsection>
</xsl:if>
@@ -526,6 +533,88 @@
</section>
</xsl:template>
+ <xsl:template match="property" mode="fieldsynopsis">
+
+ <fieldsynopsis>
+ <xsl:attribute name="xml:id">
+ <xsl:value-of select="concat(../@name, '.', @name)"/>
+ </xsl:attribute>
+ <modifier>
+ <xsl:choose>
+ <xsl:when test="@access = 'read'">
+ <xsl:text>READ</xsl:text>
+ </xsl:when>
+ <xsl:when test="@access = 'write'">
+ <xsl:text>WRITE</xsl:text>
+ </xsl:when>
+ <xsl:when test="@access = 'readwrite'">
+ <xsl:text>READWRITE</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>ERR: unknown or missing value for </xsl:text>
+ <xsl:text>@access on property </xsl:text>
+ <xsl:value-of select="concat(../@name, '.', @name)"/>
+ <xsl:text>: '</xsl:text>
+ <xsl:value-of select="@access"/>
+ <xsl:text>'&#10;</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </modifier>
+ <type>
+ <xsl:call-template name="ResolveType">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </type>
+ <varname>
+ <xsl:value-of select="@name"/>
+ </varname>
+ </fieldsynopsis>
+
+ </xsl:template>
+
+ <xsl:template match="property" mode="fieldsynopsislinked">
+
+ <fieldsynopsis>
+ <modifier>
+ <xsl:choose>
+ <xsl:when test="@access = 'read'">
+ <xsl:text>READ</xsl:text>
+ </xsl:when>
+ <xsl:when test="@access = 'write'">
+ <xsl:text>WRITE</xsl:text>
+ </xsl:when>
+ <xsl:when test="@access = 'readwrite'">
+ <xsl:text>READWRITE</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>ERR: unknown or missing value for </xsl:text>
+ <xsl:text>@access on property </xsl:text>
+ <xsl:value-of select="concat(../@name, '.', @name)"/>
+ <xsl:text>: '</xsl:text>
+ <xsl:value-of select="@access"/>
+ <xsl:text>'&#10;</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </modifier>
+ <type>
+ <xsl:call-template name="ResolveType">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </type>
+ <varname>
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="concat('#', ../@name, '.', @name)"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </varname>
+ </fieldsynopsis>
+
+ </xsl:template>
+
<xsl:template match="property" mode="detail">
<xsl:if test="not(parent::interface)">
@@ -554,47 +643,12 @@
</xsl:message>
</xsl:if>
- <glossentry>
- <glossterm>
- <xsl:attribute name="xml:id">
- <xsl:value-of select="concat(../@name, '.', @name)"/>
- </xsl:attribute>
- <property><xsl:value-of select="@name"/></property> -
- <type>
- <xsl:call-template name="ResolveType">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- </type>
- <xsl:text>, </xsl:text>
- <xsl:choose>
- <xsl:when test="@access = 'read'">
- <xsl:text>read-only</xsl:text>
- </xsl:when>
- <xsl:when test="@access = 'write'">
- <xsl:text>write-only</xsl:text>
- </xsl:when>
- <xsl:when test="@access = 'readwrite'">
- <xsl:text>read/write</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">
- <xsl:text>ERR: unknown or missing value for </xsl:text>
- <xsl:text>@access on property </xsl:text>
- <xsl:value-of select="concat(../@name, '.', @name)"/>
- <xsl:text>: '</xsl:text>
- <xsl:value-of select="@access"/>
- <xsl:text>'&#10;</xsl:text>
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </glossterm>
- <glossdef>
- <xsl:apply-templates select="tp:docstring"/>
- <xsl:apply-templates select="tp:added"/>
- <xsl:apply-templates select="tp:changed"/>
- <xsl:apply-templates select="tp:deprecated"/>
- </glossdef>
- </glossentry>
+ <xsl:apply-templates select="." mode="fieldsynopsis"/>
+
+ <xsl:apply-templates select="tp:docstring"/>
+ <xsl:apply-templates select="tp:added"/>
+ <xsl:apply-templates select="tp:changed"/>
+ <xsl:apply-templates select="tp:deprecated"/>
</xsl:template>
<xsl:template match="tp:property" mode="detail">
@@ -803,21 +857,21 @@
</xsl:template>
<xsl:template match="method|signal" mode="funcsynopsislinked">
- <funcprototype>
- <funcdef>
- <function linkend="{concat(parent::interface//@name, '.', @name)}">
- <xsl:value-of select="@name"/>
- </function>
- </funcdef>
- <xsl:choose>
- <xsl:when test="arg">
- <xsl:apply-templates select="arg" mode="paramdef"/>
- </xsl:when>
- <xsl:otherwise>
- <void/>
- </xsl:otherwise>
- </xsl:choose>
- </funcprototype>
+ <funcprototype>
+ <funcdef>
+ <function linkend="{concat(parent::interface//@name, '.', @name)}">
+ <xsl:value-of select="@name"/>
+ </function>
+ </funcdef>
+ <xsl:choose>
+ <xsl:when test="arg">
+ <xsl:apply-templates select="arg" mode="paramdef"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <void/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </funcprototype>
</xsl:template>
<xsl:template match="method" mode="detail">