Commit 9cfd75b3 authored by Emmanuele Bassi's avatar Emmanuele Bassi
Browse files

generate: Show metadata in the templates

Expose stability, availability, and possible deprecation notices.

We also expose the free-form annotations; in the future we might want to
use them to influence the documentation's output as well.
parent 60971f48
Pipeline #253734 passed with stage
in 4 minutes and 36 seconds
......@@ -87,6 +87,27 @@
<div class="docblock">
{{ class.description|safe }}
</div>
<div class="docblock">
<table>
<tr><td>Stability:</td><td>{{ class.stability }}</td></tr>
<tr><td>Available since:</td><td>{{ class.available_since }}</td></tr>
{% if class.deprecated_since %}
<tr><td>Deprecated since:</td><td>{{ class.deprecated_since[0] }}</td></tr>
<tr><td colspan="2">{{ class.deprecated_since[1] }}</td></tr>
{% endif %}
</table>
</div>
{% if class.annotations %}
<div class="docblock">
<table>
{% for (key, value) in class.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
</summary>
......
......@@ -44,6 +44,35 @@
<div class="docblock">
{{ constant.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ constant.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ constant.available_since }}</td>
</tr>
{% if constant.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ constant.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ constant.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if constant.annotations %}
<div class="docblock">
<table>
{% for (key, value) in constant.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
</section>
......
......@@ -55,15 +55,44 @@
<div class="description toggle-wrapper">
<h4><a name="description">Description</a></h4>
<div class="content">
<div class="docblock">
{{ enum.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ enum.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ enum.available_since }}</td>
</tr>
{% if enum.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ enum.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ enum.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if enum.annotations %}
<div class="docblock">
<table>
{% for (key, value) in enum.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
<div class="members toggle-wrapper">
<h4><a name="members">Members</a></h4>
<div class="content">
<div class="docblock">
<table>
{% for member in enum.members %}
<tr>
......
......@@ -38,6 +38,35 @@
<div class="docblock">
{{ func.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ func.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ func.available_since }}</td>
</tr>
{% if func.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ func.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ func.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if func.annotations %}
<div class="docblock">
<table>
{% for (key, value) in func.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
{% if func.arguments|length != 0 %}
......
......@@ -79,6 +79,27 @@
<div class="docblock">
{{ interface.description|safe }}
</div>
<div class="docblock">
<table>
<tr><td>Stability:</td><td>{{ interface.stability }}</td></tr>
<tr><td>Available since:</td><td>{{ interface.available_since }}</td></tr>
{% if interface.deprecated_since %}
<tr><td>Deprecated since:</td><td>{{ interface.deprecated_since[0] }}</td></tr>
<tr><td colspan="2">{{ interface.deprecated_since[1] }}</td></tr>
{% endif %}
</table>
</div>
{% if interface.annotations %}
<div class="docblock">
<table>
{% for (key, value) in interface.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
</summary>
......
......@@ -84,6 +84,35 @@
<div class="docblock">
{{ method.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ method.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ method.available_since }}</td>
</tr>
{% if method.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ method.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ method.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if method.annotations %}
<div class="docblock">
<table>
{% for (key, value) in method.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
{% if method.arguments|length != 0 %}
......
......@@ -44,7 +44,7 @@
<p>{{ CONFIG.description|escape }}</p>
</div>
<div class="meta">
<div class="meta info">
<table>
<tr><td><em>Authors</em></td><td>{{ CONFIG.authors }}</td></tr>
<tr><td><em>License</em></td><td>{{ CONFIG.license }}</td></tr>
......@@ -52,6 +52,17 @@
<tr><td><em>Browse code</em></td><td><a href="{{ CONFIG.browse_url }}" class="external">{{ CONFIG.browse_url }}</a></td></tr>
</table>
</div>
<div class="meta build toggle-wrapper">
<h5>Build</h5>
<div class="docblock default-hide">
<table>
<tr><td>C headers</td><td><code>{{ repository.c_includes|join(', ') }}</code></td></tr>
<tr><td>pkg-config files</td><td><code>{{ repository.packages|join(', ') }}</code></td></tr>
</table>
</div>
</div>
</header>
{% if CONFIG.dependencies|length > 0 %}
......
......@@ -84,6 +84,35 @@
<div class="docblock">
{{ property.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ property.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ property.available_since }}</td>
</tr>
{% if property.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ property.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ property.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if property.annotations %}
<div class="docblock">
<table>
{% for (key, value) in property.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
<div class="flags toggle-wrapper">
......
......@@ -74,12 +74,8 @@
<h4><a name="declaration">Declaration</a></h4>
<div class="docblock">
<pre><code>{% if signal.return_value %}{{ signal.return_value.type_cname }}{% else %}void{% endif %}
{{ signal.name }} (
{{ class.type_cname }}* self{% if signal.arguments|length != 0 %},{% endif %}
{% for arg in signal.arguments %}{{ arg.type_cname }} {{ arg.name }}{% if not loop.last %},{% endif %}{% endfor %}
gpointer user_data
)</code></pre>
<pre><code>{{ signal.c_decl }}</code></pre>
</div>
</div>
<div class="description toggle-wrapper">
......@@ -88,6 +84,35 @@
<div class="docblock">
{{ signal.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ signal.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ signal.available_since }}</td>
</tr>
{% if signal.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ signal.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ signal.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if signal.annotations %}
<div class="docblock">
<table>
{% for (key, value) in signal.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
{% if signal.arguments|length != 0 %}
......
......@@ -96,6 +96,27 @@
</div>
</div>
{% endif %}
<div class="docblock">
<table>
<tr><td>Stability:</td><td>{{ struct.stability }}</td></tr>
<tr><td>Available since:</td><td>{{ struct.available_since }}</td></tr>
{% if struct.deprecated_since %}
<tr><td>Deprecated since:</td><td>{{ struct.deprecated_since[0] }}</td></tr>
<tr><td colspan="2">{{ struct.deprecated_since[1] }}</td></tr>
{% endif %}
</table>
</div>
{% if struct.annotations %}
<div class="docblock">
<table>
{% for (key, value) in struct.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
</summary>
......
......@@ -84,6 +84,35 @@
<div class="docblock">
{{ type_func.description|safe }}
</div>
<div class="docblock">
<table>
<tr>
<td>Stability:</td><td>{{ type_func.stability }}</td>
</tr>
<tr>
<td>Available since:</td><td>{{ type_func.available_since }}</td>
</tr>
{% if type_func.deprecated_since %}
<tr>
<td>Deprecated since:</td><td>{{ type_func.deprecated_since[0] }}</td>
</tr>
<tr>
<td colspan="2">{{ type_func.deprecated_since[1] }}</td>
</tr>
{% endif %}
</table>
</div>
{% if type_func.annotations %}
<div class="docblock">
<table>
{% for (key, value) in type_func.annotations %}
<tr><td>{{ key|escape }}</td><td>{{ value|escape }}</td></tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
{% if type_func.arguments|length != 0 %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment