summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile-giscanner.am1
-rw-r--r--giscanner/doctemplates/C/mallard-C-class.tmpl22
-rw-r--r--giscanner/doctemplates/C/mallard-C-default.tmpl12
-rw-r--r--giscanner/doctemplates/C/mallard-C-enum.tmpl14
-rw-r--r--giscanner/doctemplates/C/mallard-C-function.tmpl23
-rw-r--r--giscanner/doctemplates/C/mallard-C-namespace.tmpl14
-rw-r--r--giscanner/doctemplates/C/mallard-C-property.tmpl14
-rw-r--r--giscanner/doctemplates/C/mallard-C-record.tmpl13
-rw-r--r--giscanner/doctemplates/C/mallard-C-signal.tmpl16
-rw-r--r--giscanner/doctemplates/C/mallard-C-vfunc.tmpl23
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-class.tmpl22
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-default.tmpl12
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-enum.tmpl15
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-function.tmpl22
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-namespace.tmpl20
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-property.tmpl17
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-record.tmpl14
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-signal.tmpl20
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl22
-rw-r--r--giscanner/doctemplates/mallard-base.tmpl23
-rw-r--r--giscanner/mallardwriter.py5
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Callback.page9
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Enum.page10
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page10
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page12
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page12
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page14
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page10
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page15
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.static_method.page12
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page12
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.array_function.page12
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/DocExamples.callback_function.page12
-rw-r--r--tests/doctool/DocExamples-1.0-C-expected/index.page7
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Callback.page9
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Enum.page9
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page10
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page10
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page16
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page13
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page18
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page11
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page11
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page11
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/index.page13
45 files changed, 335 insertions, 287 deletions
diff --git a/Makefile-giscanner.am b/Makefile-giscanner.am
index 9865eced..35eac1d6 100644
--- a/Makefile-giscanner.am
+++ b/Makefile-giscanner.am
@@ -54,6 +54,7 @@ pkgpyexec_PYTHON = \
templatedir = $(pkglibdir)
nobase_template_DATA = \
+ giscanner/doctemplates/mallard-base.tmpl \
giscanner/doctemplates/C/mallard-C-class.tmpl \
giscanner/doctemplates/C/mallard-C-constructor.tmpl \
giscanner/doctemplates/C/mallard-C-default.tmpl \
diff --git a/giscanner/doctemplates/C/mallard-C-class.tmpl b/giscanner/doctemplates/C/mallard-C-class.tmpl
index 3a208447..b1be35e4 100644
--- a/giscanner/doctemplates/C/mallard-C-class.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-class.tmpl
@@ -1,18 +1,8 @@
-<?xml version="1.0"?>
-<page id="${node.namespace.name}.${node.name}"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:api="http://projectmallard.org/experimental/api/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index" group="class"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
+<%! page_type="guide" %>\
+<%inherit file="mallard-base.tmpl"/>
+<%block name="content">
+${parent.content()}
+${self.since_version()}
<synopsis ui:expanded="no">
<title>Hierarchy</title>
<tree>
@@ -45,4 +35,4 @@ ${formatter.format(node, node.doc)}
<links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
-</page>
+</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-default.tmpl b/giscanner/doctemplates/C/mallard-C-default.tmpl
index d2c41056..991f29be 100644
--- a/giscanner/doctemplates/C/mallard-C-default.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-default.tmpl
@@ -1,11 +1 @@
-<?xml version="1.0"?>
-<page id="${namespace.name}.${node.name}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-</page>
+<%inherit file="mallard-base.tmpl"/>
diff --git a/giscanner/doctemplates/C/mallard-C-enum.tmpl b/giscanner/doctemplates/C/mallard-C-enum.tmpl
index 7283366d..cfe71c15 100644
--- a/giscanner/doctemplates/C/mallard-C-enum.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-enum.tmpl
@@ -1,12 +1,2 @@
-<?xml version="1.0"?>
-<page id="${node.namespace.name}.${node.name}"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-</page>
+<%! page_type="guide" %>\
+<%inherit file="mallard-base.tmpl"/>
diff --git a/giscanner/doctemplates/C/mallard-C-function.tmpl b/giscanner/doctemplates/C/mallard-C-function.tmpl
index d433aa56..f93fc31d 100644
--- a/giscanner/doctemplates/C/mallard-C-function.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-function.tmpl
@@ -1,11 +1,5 @@
-<?xml version="1.0"?>
-<page id="${page_id}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:api="http://projectmallard.org/experimental/api/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
% if node.parent is not None:
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_style}"/>
% else:
@@ -33,8 +27,8 @@
% endif
% endfor
</api:function>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+</%block>
+<%block name="content">
<synopsis><code mime="text/x-csrc">
${node.retval.type.ctype} ${node.symbol} (\
% if node.is_method:
@@ -64,8 +58,7 @@ ${formatter.format_type(arg.type) | x} ${arg.argname}\
%endif
% endfor
</code></synopsis>
-${formatter.format(node, node.doc)}
-
+${parent.content()}
% if node.parameters or node.retval:
<table>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -82,7 +75,5 @@ ${formatter.format(node, node.doc)}
% endif
</table>
% endif
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
-</page>
+${self.since_version()}
+</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-namespace.tmpl b/giscanner/doctemplates/C/mallard-C-namespace.tmpl
index 39d02619..372cd33f 100644
--- a/giscanner/doctemplates/C/mallard-C-namespace.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-namespace.tmpl
@@ -1,12 +1,6 @@
-<?xml version="1.0"?>
-<page id="index"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+<%! page_type="guide" %>\
+<%inherit file="mallard-base.tmpl"/>
+<%block name="content">
<links type="topic" ui:expanded="yes" groups="class" style="linklist">
<title>Classes</title>
</links>
@@ -16,4 +10,4 @@
<links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
-</page>
+</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-property.tmpl b/giscanner/doctemplates/C/mallard-C-property.tmpl
index a253160d..cceb62de 100644
--- a/giscanner/doctemplates/C/mallard-C-property.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-property.tmpl
@@ -1,13 +1,5 @@
-<?xml version="1.0"?>
-<page id="${namespace.name}.${node.name}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
<title type="link" role="topic">${node.name}</title>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-</page>
+</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-record.tmpl b/giscanner/doctemplates/C/mallard-C-record.tmpl
index 7283366d..991f29be 100644
--- a/giscanner/doctemplates/C/mallard-C-record.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-record.tmpl
@@ -1,12 +1 @@
-<?xml version="1.0"?>
-<page id="${node.namespace.name}.${node.name}"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-</page>
+<%inherit file="mallard-base.tmpl"/>
diff --git a/giscanner/doctemplates/C/mallard-C-signal.tmpl b/giscanner/doctemplates/C/mallard-C-signal.tmpl
index 49ee9852..cceb62de 100644
--- a/giscanner/doctemplates/C/mallard-C-signal.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-signal.tmpl
@@ -1,13 +1,5 @@
-<?xml version="1.0"?>
-<page id="${namespace.name}.${node.name}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
+ <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
<title type="link" role="topic">${node.name}</title>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-</page>
+</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-vfunc.tmpl b/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
index 3363ea8c..b27b2cef 100644
--- a/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
@@ -1,18 +1,11 @@
-<?xml version="1.0"?>
-<page id="${page_id}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:api="http://projectmallard.org/experimental/api/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="vfunc"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+</%block>
+<%block name="content">
<synopsis><code mime="text/x-csrc">
</code></synopsis>
-${formatter.format(node, node.doc)}
-
+${parent.content()}
% if node.parameters or node.retval:
<table>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -29,7 +22,5 @@ ${formatter.format(node, node.doc)}
% endif
</table>
% endif
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
-</page>
+${self.since_version()}
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-class.tmpl b/giscanner/doctemplates/Python/mallard-Python-class.tmpl
index 800d241f..3f0d67a1 100644
--- a/giscanner/doctemplates/Python/mallard-Python-class.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-class.tmpl
@@ -1,16 +1,6 @@
-<?xml version="1.0"?>
-<page id="${node.namespace.name}.${node.name}"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:api="http://projectmallard.org/experimental/api/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index" group="class"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-
+<%inherit file="mallard-base.tmpl"/>
+<%block name="content">
+ ${parent.content()}
<synopsis><code>
from gi.repository import ${namespace.name}
@@ -26,9 +16,7 @@ ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(
)\
</code></synopsis>
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
+ ${self.since_version()}
<synopsis>
<title>Hierarchy</title>
<tree>
@@ -63,4 +51,4 @@ ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(
<links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
-</page>
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-default.tmpl b/giscanner/doctemplates/Python/mallard-Python-default.tmpl
index 1d202109..991f29be 100644
--- a/giscanner/doctemplates/Python/mallard-Python-default.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-default.tmpl
@@ -1,11 +1 @@
-<?xml version="1.0"?>
-<page id="${page_id}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- </info>
- <title>${formatter.format_page_name(node)}</title>
-${formatter.format(node, node.doc)}
-</page>
+<%inherit file="mallard-base.tmpl"/>
diff --git a/giscanner/doctemplates/Python/mallard-Python-enum.tmpl b/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
index c1a4d8c5..09f4d9a8 100644
--- a/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
@@ -1,13 +1,5 @@
-<?xml version="1.0"?>
-<page id="${node.namespace.name}.${node.name}"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="content">
${formatter.format(node, node.doc)}
% if node.members:
<table>
@@ -19,5 +11,4 @@
% endfor
</table>
% endif
-
-</page>
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-function.tmpl b/giscanner/doctemplates/Python/mallard-Python-function.tmpl
index 1976a1ca..683ca835 100644
--- a/giscanner/doctemplates/Python/mallard-Python-function.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-function.tmpl
@@ -1,11 +1,5 @@
-<?xml version="1.0"?>
-<page id="${page_id}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:api="http://projectmallard.org/experimental/api/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
% if node.parent is not None:
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_style}"/>
% else:
@@ -33,8 +27,8 @@
% endif
% endfor
</api:function>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+</%block>
+<%block name="content">
<synopsis><code mime="text/x-python">
% if len(node.parameters) != 0:
@accepts(\
@@ -51,7 +45,7 @@ ${', '.join((arg.argname for arg in node.parameters))}\
):
# Python wrapper for ${node.symbol}()
</code></synopsis>
-${formatter.format(node, node.doc)}
+${parent.content()}
% if node.parameters or node.retval:
<table>
@@ -69,7 +63,5 @@ ${formatter.format(node, node.doc)}
% endif
</table>
% endif
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
-</page>
+${self.since_version()}
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl b/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
index 97bd7132..372cd33f 100644
--- a/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
@@ -1,19 +1,13 @@
-<?xml version="1.0"?>
-<page id="index"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- </info>
- <title>${formatter.format_page_name(node)}</title>
- <links type="topic" ui:expanded="yes" groups="class">
+<%! page_type="guide" %>\
+<%inherit file="mallard-base.tmpl"/>
+<%block name="content">
+ <links type="topic" ui:expanded="yes" groups="class" style="linklist">
<title>Classes</title>
</links>
- <links type="topic" ui:expanded="yes" groups="function">
+ <links type="topic" ui:expanded="yes" groups="function" style="linklist">
<title>Functions</title>
</links>
- <links type="topic" ui:expanded="yes" groups="#first #default #last">
+ <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
-</page>
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-property.tmpl b/giscanner/doctemplates/Python/mallard-Python-property.tmpl
index 7f4138cd..db78f2b9 100644
--- a/giscanner/doctemplates/Python/mallard-Python-property.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-property.tmpl
@@ -1,16 +1,11 @@
-<?xml version="1.0"?>
-<page id="${namespace.name}.${node.parent.name}-${node.name}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
<title type="link" role="topic">${node.name}</title>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+</%block>
+<%block name="content">
<synopsis><code mime="text/x-python">
"${node.name}" ${formatter.format_type(node.type)} : ${formatter.format_property_flags(node)}
</code></synopsis>
-${formatter.format(node, node.doc)}
-</page>
+${parent.content()}
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-record.tmpl b/giscanner/doctemplates/Python/mallard-Python-record.tmpl
index 43bea043..cfe71c15 100644
--- a/giscanner/doctemplates/Python/mallard-Python-record.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-record.tmpl
@@ -1,12 +1,2 @@
-<?xml version="1.0"?>
-<page id="${node.namespace.name}.${node.name}"
- type="guide"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index"/>
- </info>
- <title>${formatter.format_page_name(node)}</title>
- <p>${node.doc}</p>
-</page>
+<%! page_type="guide" %>\
+<%inherit file="mallard-base.tmpl"/>
diff --git a/giscanner/doctemplates/Python/mallard-Python-signal.tmpl b/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
index 8dda89be..a430d9b9 100644
--- a/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
@@ -1,14 +1,9 @@
-<?xml version="1.0"?>
-<page id="${namespace.name}.${node.parent.name}-${node.name}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="info">
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
<title type="link" role="topic">${node.name}</title>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+</%block>
+<%block name="content">
<synopsis><code mime="text/x-python">
def callback(${formatter.to_underscores(node.parent.name).lower()}, \
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -46,7 +41,6 @@ ${formatter.format(node, node.doc)}
</tr>
% endif
</table>
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
-</page>
+${self.since_version()}
+</%block>
+
diff --git a/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl b/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
index 86dc685b..65af0058 100644
--- a/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
@@ -1,15 +1,5 @@
-<?xml version="1.0"?>
-<page id="${page_id}"
- type="topic"
- style="${page_style}"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:api="http://projectmallard.org/experimental/api/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="vfunc"/>
- <title type="link" role="topic">${node.name}</title>
- </info>
- <title>${formatter.format_page_name(node)}</title>
+<%inherit file="mallard-base.tmpl"/>
+<%block name="content">
<synopsis><code mime="text/x-python">
% if len(node.parameters) != 0:
@accepts(\
@@ -22,7 +12,7 @@ do_${node.name}(self, \
${', '.join((arg.argname for arg in node.parameters))}\
):
</code></synopsis>
-${formatter.format(node, node.doc)}
+${parent.content()}
% if node.parameters or node.retval:
<table>
@@ -40,7 +30,5 @@ ${formatter.format(node, node.doc)}
% endif
</table>
% endif
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
-</page>
+${self.since_version()}
+</%block>
diff --git a/giscanner/doctemplates/mallard-base.tmpl b/giscanner/doctemplates/mallard-base.tmpl
new file mode 100644
index 00000000..07eb4468
--- /dev/null
+++ b/giscanner/doctemplates/mallard-base.tmpl
@@ -0,0 +1,23 @@
+<%! page_type="topic" %>\
+<?xml version="1.0"?>
+<page id="${page_id}"
+ type="${self.attr.page_type}"
+ style="${page_style}"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <%block name="info">
+ <link type="guide" xref="index"/>
+ </%block>
+ </info>
+ <title><%block name="title">${formatter.format_page_name(node)}</%block></title>
+ <%block name="content">
+ ${formatter.format(node, node.doc)}
+ </%block>
+ <%def name="since_version()">
+ % if node.version:
+ <p>Since ${node.version}</p>
+ % endif
+ </%def>
+</page>
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index ccd65f0d..f40bf881 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -462,9 +462,10 @@ class MallardWriter(object):
else:
srcdir = os.path.dirname(__file__)
- template_dir = os.path.join(srcdir, 'doctemplates', self._language)
+ template_dir = os.path.join(srcdir, 'doctemplates')
+ language_dir = os.path.join(template_dir, self._language)
- return TemplateLookup(directories=[template_dir],
+ return TemplateLookup(directories=[template_dir, language_dir],
module_directory=tempfile.mkdtemp(),
output_encoding='utf-8')
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Callback.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Callback.page
index b79b93aa..c2c171b3 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Callback.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Callback.page
@@ -3,9 +3,16 @@
type="topic"
style="default"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Callback</title>
-
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Enum.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Enum.page
index 56ebc4bb..06fec31b 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Enum.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Enum.page
@@ -3,10 +3,16 @@
type="guide"
style="enum"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="index"/>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Enum</title>
-<p>This is an example to document an enumeration.</p>
+
+ <p>This is an example to document an enumeration.</p>
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page
index fde0ffb4..465c018f 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page
@@ -1,13 +1,19 @@
<?xml version="1.0"?>
-<page id="DocExamples.property-example"
+<page id="DocExamples.Obj-property-example"
type="topic"
style="property"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="property"/>
<title type="link" role="topic">property-example</title>
+
</info>
<title>DocExamples.Obj:property-example</title>
-<p>This is an example of how to document a property.</p>
+
+ <p>This is an example of how to document a property.</p>
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page
index 7f63fa40..7d40713a 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page
@@ -1,13 +1,19 @@
<?xml version="1.0"?>
-<page id="DocExamples.signal-example"
+<page id="DocExamples.Obj-signal-example"
type="topic"
style="signal"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="DocExamples.Obj" group="signal"/>
+
+ <link type="guide" xref="DocExamples.Obj" group="property"/>
<title type="link" role="topic">signal-example</title>
+
</info>
<title>DocExamples.Obj::signal-example</title>
-<p>This is an example of how to document a signal.</p>
+
+ <p>This is an example of how to document a signal.</p>
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page
index c9b47666..23a7c654 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page
@@ -6,13 +6,17 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="vfunc"/>
+
</info>
<title>DocExamples.Obj::vfunc</title>
+
<synopsis><code mime="text/x-csrc">
</code></synopsis>
-<p>This is an example of how to document a vfunc.</p>
+ <p>This is an example of how to document a vfunc.</p>
+
<table>
<tr>
<td><p>first_arg :</p></td>
@@ -23,5 +27,9 @@
<td></td>
</tr>
</table>
-<p>Since 0.99</p>
+
+ <p>Since 0.99</p>
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page
index 2015098f..4d2f6cd3 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="method"/>
<api:function>
<api:returns>
@@ -37,8 +38,10 @@
<api:name>string</api:name>
</api:arg>
</api:function>
+
</info>
<title>doc_examples_obj_method</title>
+
<synopsis><code mime="text/x-csrc">
gboolean doc_examples_obj_method (DocExamplesObj *self,
gint first_arg,
@@ -47,9 +50,10 @@ gint first_arg,
gpointer pointer_arg,
gchar* string);
</code></synopsis>
-<p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj">DocExamples.Obj</link> that was
-created with <link xref="DocExamples.Obj.new">doc_examples_obj_new</link>.</p><p>This should be a %FALSEALARM.</p>
+ <p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj">DocExamples.Obj</link> that was
+created with <link xref="DocExamples.Obj.new">doc_examples_obj_new</link>.</p><p>This should be a %FALSEALARM.</p>
+
<table>
<tr>
<td><p>first_arg :</p></td>
@@ -76,5 +80,9 @@ created with <link xref="DocExamples.Obj.new">doc_examples_obj_new</link>.</p><p
<td><p>Either <code>FALSE</code> or something <code>FALSE</code>-y.</p></td>
</tr>
</table>
-<p>Since 0.99</p>
+
+ <p>Since 0.99</p>
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page
index 0e010cf3..0f8c297a 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="constructor"/>
<api:function>
<api:returns>
@@ -13,17 +14,24 @@
</api:returns>
<api:name>doc_examples_obj_new</api:name>
</api:function>
+
</info>
<title>doc_examples_obj_new</title>
+
<synopsis><code mime="text/x-csrc">
DocExamplesObj* doc_examples_obj_new (void);
</code></synopsis>
-
+
+
<table>
<tr>
<td><p>Returns :</p></td>
<td></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page
index 6014906c..9937b79b 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page
@@ -6,11 +6,18 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="index" group="class"/>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Obj</title>
-<p>This is an example of how to document a class</p><p>This class has a signal: <link xref="DocExamples.Obj-signal-example">DocExamples.Obj::signal-example</link>.</p><p>And also has a property: <link xref="DocExamples.Obj-property-example">DocExamples.Obj:property-example</link>.</p>
-<p>Since 0.99</p>
+
+
+ <p>This is an example of how to document a class</p><p>This class has a signal: <link xref="DocExamples.Obj-signal-example">DocExamples.Obj::signal-example</link>.</p><p>And also has a property: <link xref="DocExamples.Obj-property-example">DocExamples.Obj:property-example</link>.</p>
+
+
+ <p>Since 0.99</p>
+
<synopsis ui:expanded="no">
<title>Hierarchy</title>
<tree>
@@ -43,4 +50,6 @@
<links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.static_method.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.static_method.page
index ebf23d55..358a220c 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.static_method.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.static_method.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="function"/>
<api:function>
<api:returns>
@@ -17,14 +18,17 @@
<api:name>out_arg</api:name>
</api:arg>
</api:function>
+
</info>
<title>doc_examples_obj_static_method</title>
+
<synopsis><code mime="text/x-csrc">
gboolean doc_examples_obj_static_method (gint* out_arg);
</code></synopsis>
-<p>This is an example of a function with an out argument
-and a return value.</p>
+ <p>This is an example of a function with an out argument
+and a return value.</p>
+
<table>
<tr>
<td><p>out_arg :</p></td>
@@ -35,4 +39,8 @@ and a return value.</p>
<td><p><code>TRUE</code> if <code>out_arg</code> is valid, <code>FALSE</code> otherwise</p></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page
index c8e43755..cd8021ba 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page
@@ -1,12 +1,18 @@
<?xml version="1.0"?>
<page id="DocExamples.ObjClass"
- type="guide"
+ type="topic"
style="record"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="index"/>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.ObjClass</title>
-
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.array_function.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.array_function.page
index 2b19e8d0..f24da60e 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.array_function.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.array_function.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="index" group="function"/>
<api:function>
<api:returns>
@@ -17,14 +18,17 @@
<api:name>out_len</api:name>
</api:arg>
</api:function>
+
</info>
<title>doc_examples_array_function</title>
+
<synopsis><code mime="text/x-csrc">
gint* doc_examples_array_function (gint* out_len);
</code></synopsis>
-<p>This function returns an array with an explicit length,
-and the length should be invisible in most introspected bindings.</p>
+ <p>This function returns an array with an explicit length,
+and the length should be invisible in most introspected bindings.</p>
+
<table>
<tr>
<td><p>out_len :</p></td>
@@ -35,4 +39,8 @@ and the length should be invisible in most introspected bindings.</p>
<td><p>an array of numbers.</p></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.callback_function.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.callback_function.page
index 89e00a65..2af93305 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.callback_function.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.callback_function.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="index" group="function"/>
<api:function>
<api:returns>
@@ -25,17 +26,20 @@
<api:name>destroy_notify</api:name>
</api:arg>
</api:function>
+
</info>
<title>doc_examples_callback_function</title>
+
<synopsis><code mime="text/x-csrc">
DocExamplesEnum doc_examples_callback_function (DocExamplesCallback callback,
gpointer user_data,
GDestroyNotify destroy_notify);
</code></synopsis>
-<p>This is a function that takes a callback. Different languages
+
+ <p>This is a function that takes a callback. Different languages
will expose this in different ways (e.g. Python keeps the
<code>user_data</code> parameter, while JS doesn't)</p>
-
+
<table>
<tr>
<td><p>callback :</p></td>
@@ -54,4 +58,8 @@ will expose this in different ways (e.g. Python keeps the
<td><p><link xref="DocExamples.Enum">DocExamples.Enum</link>.foo sometimes, <link xref="DocExamples.Enum">DocExamples.Enum</link>.bar other times.</p></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/index.page b/tests/doctool/DocExamples-1.0-C-expected/index.page
index c87a104b..5143b432 100644
--- a/tests/doctool/DocExamples-1.0-C-expected/index.page
+++ b/tests/doctool/DocExamples-1.0-C-expected/index.page
@@ -3,10 +3,15 @@
type="guide"
style="namespace"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>Index</title>
+
<links type="topic" ui:expanded="yes" groups="class" style="linklist">
<title>Classes</title>
</links>
@@ -16,4 +21,6 @@
<links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Callback.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Callback.page
index b79b93aa..c2c171b3 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Callback.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Callback.page
@@ -3,9 +3,16 @@
type="topic"
style="default"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Callback</title>
-
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Enum.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Enum.page
index 0f496063..614b855e 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Enum.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Enum.page
@@ -1,13 +1,17 @@
<?xml version="1.0"?>
<page id="DocExamples.Enum"
- type="guide"
+ type="topic"
style="enum"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="index"/>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Enum</title>
+
<p>This is an example to document an enumeration.</p>
<table>
<tr>
@@ -20,4 +24,5 @@
</tr>
</table>
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page
index 43f4b560..3b791bd0 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page
@@ -3,14 +3,22 @@
type="topic"
style="property"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="property"/>
<title type="link" role="topic">property-example</title>
+
</info>
<title>DocExamples.Obj:property-example</title>
+
<synopsis><code mime="text/x-python">
"property-example" {unicode: gint8} : Read / Write
</code></synopsis>
-<p>This is an example of how to document a property.</p>
+
+ <p>This is an example of how to document a property.</p>
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page
index 0304b135..8cac161f 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page
@@ -3,12 +3,16 @@
type="topic"
style="signal"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="signal"/>
<title type="link" role="topic">signal-example</title>
+
</info>
<title>DocExamples.Obj::signal-example</title>
+
<synopsis><code mime="text/x-python">
def callback(obj, int_param, float_param, pointer_param, user_param1, ...)
</code></synopsis>
@@ -40,5 +44,9 @@ def callback(obj, int_param, float_param, pointer_param, user_param1, ...)
<td><p>additional user parameters (if any)</p></td>
</tr>
</table>
-<p>Since 0.99</p>
+
+ <p>Since 0.99</p>
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page
index 8a02f616..11d693f3 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page
@@ -6,16 +6,20 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="DocExamples.Obj" group="vfunc"/>
- <title type="link" role="topic">vfunc</title>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Obj::vfunc</title>
+
<synopsis><code mime="text/x-python">
@accepts(int)
@returns(none)
def do_vfunc(self, first_arg):
</code></synopsis>
-<p>This is an example of how to document a vfunc.</p>
+
+ <p>This is an example of how to document a vfunc.</p>
+
<table>
<tr>
@@ -23,5 +27,9 @@ def do_vfunc(self, first_arg):
<td><p>first argument</p></td>
</tr>
</table>
-<p>Since 0.99</p>
+
+ <p>Since 0.99</p>
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page
index 2477e451..89f73d08 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="method"/>
<api:function>
<api:returns>
@@ -37,16 +38,20 @@
<api:name>string</api:name>
</api:arg>
</api:function>
+
</info>
<title>Obj.method</title>
+
<synopsis><code mime="text/x-python">
@accepts(int, float, bool, gpointer, unicode)
@returns(bool)
def method(self, first_arg, second_arg, boolean_arg, pointer_arg, string):
# Python wrapper for doc_examples_obj_method()
</code></synopsis>
-<p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj">DocExamples.Obj</link> that was
+
+ <p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj">DocExamples.Obj</link> that was
created with <link xref="DocExamples.Obj.new">Obj.new</link>.</p><p>This should be a %FALSEALARM.</p>
+
<table>
<tr>
@@ -74,5 +79,9 @@ created with <link xref="DocExamples.Obj.new">Obj.new</link>.</p><p>This should
<td><p>Either <code>False</code> or something <code>False</code>-y.</p></td>
</tr>
</table>
-<p>Since 0.99</p>
+
+ <p>Since 0.99</p>
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
index 071abf1a..6278c649 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
@@ -1,22 +1,28 @@
<?xml version="1.0"?>
<page id="DocExamples.Obj"
- type="guide"
+ type="topic"
style="class"
xmlns="http://projectmallard.org/1.0/"
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
- <link type="guide" xref="index" group="class"/>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>DocExamples.Obj</title>
-<p>This is an example of how to document a class</p><p>This class has a signal: <link xref="DocExamples.Obj-signal-example">DocExamples.Obj::signal-example</link>.</p><p>And also has a property: <link xref="DocExamples.Obj-property-example">DocExamples.Obj:property-example</link>.</p>
-
+
+
+ <p>This is an example of how to document a class</p><p>This class has a signal: <link xref="DocExamples.Obj-signal-example">DocExamples.Obj::signal-example</link>.</p><p>And also has a property: <link xref="DocExamples.Obj-property-example">DocExamples.Obj:property-example</link>.</p>
+
<synopsis><code>
from gi.repository import DocExamples
obj = DocExamples.Obj(<link xref='DocExamples.Obj-property-example'>property_example</link>=value) </code></synopsis>
-<p>Since 0.99</p>
+
+ <p>Since 0.99</p>
+
<synopsis>
<title>Hierarchy</title>
<tree>
@@ -50,4 +56,6 @@ obj = DocExamples.Obj(<link xref='DocExamples.Obj-property-example'>property_exa
<links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page
index e040414f..3bc402b2 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="DocExamples.Obj" group="function"/>
<api:function>
<api:returns>
@@ -17,16 +18,20 @@
<api:name>out_arg</api:name>
</api:arg>
</api:function>
+
</info>
<title>Obj.static_method</title>
+
<synopsis><code mime="text/x-python">
@accepts(int)
@returns(bool)
def static_method(out_arg):
# Python wrapper for doc_examples_obj_static_method()
</code></synopsis>
-<p>This is an example of a function with an out argument
+
+ <p>This is an example of a function with an out argument
and a return value.</p>
+
<table>
<tr>
@@ -38,4 +43,8 @@ and a return value.</p>
<td><p><code>True</code> if <code>out_arg</code> is valid, <code>False</code> otherwise</p></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page
index 3c8e86cd..6dd79093 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="index" group="function"/>
<api:function>
<api:returns>
@@ -17,16 +18,20 @@
<api:name>out_len</api:name>
</api:arg>
</api:function>
+
</info>
<title>array_function</title>
+
<synopsis><code mime="text/x-python">
@accepts(int)
@returns([int])
def array_function(out_len):
# Python wrapper for doc_examples_array_function()
</code></synopsis>
-<p>This function returns an array with an explicit length,
+
+ <p>This function returns an array with an explicit length,
and the length should be invisible in most introspected bindings.</p>
+
<table>
<tr>
@@ -38,4 +43,8 @@ and the length should be invisible in most introspected bindings.</p>
<td><p>an array of numbers.</p></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page
index 58323eba..7c15a0c9 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page
@@ -6,6 +6,7 @@
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
<link type="guide" xref="index" group="function"/>
<api:function>
<api:returns>
@@ -25,17 +26,21 @@
<api:name>destroy_notify</api:name>
</api:arg>
</api:function>
+
</info>
<title>callback_function</title>
+
<synopsis><code mime="text/x-python">
@accepts(DocExamples.Callback, gpointer, GLib.DestroyNotify)
@returns(DocExamples.Enum)
def callback_function(callback, user_data, destroy_notify):
# Python wrapper for doc_examples_callback_function()
</code></synopsis>
-<p>This is a function that takes a callback. Different languages
+
+ <p>This is a function that takes a callback. Different languages
will expose this in different ways (e.g. Python keeps the
<code>user_data</code> parameter, while JS doesn't)</p>
+
<table>
<tr>
@@ -55,4 +60,8 @@ will expose this in different ways (e.g. Python keeps the
<td><p><link xref="DocExamples.Enum">DocExamples.Enum</link>.foo sometimes, <link xref="DocExamples.Enum">DocExamples.Enum</link>.bar other times.</p></td>
</tr>
</table>
+
+
+
+
</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/index.page b/tests/doctool/DocExamples-1.0-Python-expected/index.page
index bbf9d2d7..5143b432 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/index.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/index.page
@@ -3,17 +3,24 @@
type="guide"
style="namespace"
xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/">
<info>
+
+ <link type="guide" xref="index"/>
+
</info>
<title>Index</title>
- <links type="topic" ui:expanded="yes" groups="class">
+
+ <links type="topic" ui:expanded="yes" groups="class" style="linklist">
<title>Classes</title>
</links>
- <links type="topic" ui:expanded="yes" groups="function">
+ <links type="topic" ui:expanded="yes" groups="function" style="linklist">
<title>Functions</title>
</links>
- <links type="topic" ui:expanded="yes" groups="#first #default #last">
+ <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
<title>Other</title>
</links>
+
+
</page>