mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
docs: newapi.xsl: Generate docs on generic typedefs
We have plenty of generic typedefs (that basically just alias a struct, or our popular virXXXPtr). Because we do not generate HTML docs for it, the documentation is placed at random places, e.g.: comment from virDomainPtr typedef ("a virDomainPtr is pointer to a virDomain private structure ...") ends up after virDomainProcessSignal enum block. There are some less weird occurrences of this problem (e.g. virBlkioParameterPtr), but yet - the typedef appears in TOC. Therefore, generate a block for each typedef and put its description there. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
96c8d39af0
commit
1fa7443dc7
@ -258,7 +258,7 @@
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<a id="{$name}"><xsl:value-of select="$name"/></a>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
@ -324,6 +324,26 @@
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="typedef">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:variable name="type" select="string(@type)"/>
|
||||
<h3><a id="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<div class="api">
|
||||
<pre>
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$type"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>;</xsl:text>
|
||||
</pre>
|
||||
</div>
|
||||
<div class="description">
|
||||
<xsl:call-template name="formattext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct" mode="toc">
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<span class="type"><xsl:value-of select="@type"/></span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user