summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/doctemplates')
-rw-r--r--giscanner/doctemplates/C/class.tmpl2
-rw-r--r--giscanner/doctemplates/C/constructor.tmpl1
-rw-r--r--giscanner/doctemplates/C/default.tmpl1
-rw-r--r--giscanner/doctemplates/C/enum.tmpl2
-rw-r--r--giscanner/doctemplates/C/function.tmpl61
-rw-r--r--giscanner/doctemplates/C/method.tmpl1
-rw-r--r--giscanner/doctemplates/C/namespace.tmpl1
-rw-r--r--giscanner/doctemplates/C/property.tmpl5
-rw-r--r--giscanner/doctemplates/C/record.tmpl1
-rw-r--r--giscanner/doctemplates/C/signal.tmpl5
-rw-r--r--giscanner/doctemplates/C/vfunc.tmpl4
-rw-r--r--giscanner/doctemplates/Gjs/class.tmpl18
-rw-r--r--giscanner/doctemplates/Gjs/constructor.tmpl1
-rw-r--r--giscanner/doctemplates/Gjs/default.tmpl1
-rw-r--r--giscanner/doctemplates/Gjs/enum.tmpl13
-rw-r--r--giscanner/doctemplates/Gjs/function.tmpl48
-rw-r--r--giscanner/doctemplates/Gjs/method.tmpl1
-rw-r--r--giscanner/doctemplates/Gjs/namespace.tmpl2
-rw-r--r--giscanner/doctemplates/Gjs/property.tmpl10
-rw-r--r--giscanner/doctemplates/Gjs/record.tmpl2
-rw-r--r--giscanner/doctemplates/Gjs/signal.tmpl37
-rw-r--r--giscanner/doctemplates/Gjs/vfunc.tmpl27
-rw-r--r--giscanner/doctemplates/Python/class.tmpl17
-rw-r--r--giscanner/doctemplates/Python/constructor.tmpl1
-rw-r--r--giscanner/doctemplates/Python/default.tmpl1
-rw-r--r--giscanner/doctemplates/Python/enum.tmpl13
-rw-r--r--giscanner/doctemplates/Python/function.tmpl53
-rw-r--r--giscanner/doctemplates/Python/method.tmpl1
-rw-r--r--giscanner/doctemplates/Python/namespace.tmpl2
-rw-r--r--giscanner/doctemplates/Python/property.tmpl10
-rw-r--r--giscanner/doctemplates/Python/record.tmpl2
-rw-r--r--giscanner/doctemplates/Python/signal.tmpl42
-rw-r--r--giscanner/doctemplates/Python/vfunc.tmpl33
-rw-r--r--giscanner/doctemplates/base.tmpl29
-rw-r--r--giscanner/doctemplates/class.tmpl40
-rw-r--r--giscanner/doctemplates/namespace.tmpl19
36 files changed, 507 insertions, 0 deletions
diff --git a/giscanner/doctemplates/C/class.tmpl b/giscanner/doctemplates/C/class.tmpl
new file mode 100644
index 00000000..3f18b021
--- /dev/null
+++ b/giscanner/doctemplates/C/class.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/class.tmpl"/>
diff --git a/giscanner/doctemplates/C/constructor.tmpl b/giscanner/doctemplates/C/constructor.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/C/constructor.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/C/default.tmpl b/giscanner/doctemplates/C/default.tmpl
new file mode 100644
index 00000000..b66ae926
--- /dev/null
+++ b/giscanner/doctemplates/C/default.tmpl
@@ -0,0 +1 @@
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/C/enum.tmpl b/giscanner/doctemplates/C/enum.tmpl
new file mode 100644
index 00000000..1523e0df
--- /dev/null
+++ b/giscanner/doctemplates/C/enum.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/C/function.tmpl b/giscanner/doctemplates/C/function.tmpl
new file mode 100644
index 00000000..8d669438
--- /dev/null
+++ b/giscanner/doctemplates/C/function.tmpl
@@ -0,0 +1,61 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <api:function>
+ <api:returns>
+ <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+ </api:returns>
+ <api:name>${formatter.format_function_name(node)}</api:name>
+% for arg in formatter.get_parameters(node):
+% if arg.type.ctype == '<varargs>':
+ <api:varargs/>
+% else:
+ <api:arg>
+ <api:type>${formatter.format_type(arg.type) | x}</api:type>
+ <api:name>${formatter.format_parameter_name(node, arg)}</api:name>
+ </api:arg>
+% endif
+% endfor
+ </api:function>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-csrc">
+${node.retval.type.ctype} ${formatter.format_function_name(node)} (\
+% if not formatter.get_parameters(node):
+void\
+% else:
+% for ix, arg in enumerate(formatter.get_parameters(node)):
+% if ix != 0:
+${' ' * (len(formatter.format_type(node.retval.type)) + len(formatter.format_function_name(node)) + 3)}\
+% endif
+% if arg.type.ctype == '<varargs>':
+...\
+% else:
+${formatter.format_type(arg.type) | x} ${arg.argname}\
+% endif
+% if ix != len(formatter.get_parameters(node)) - 1:
+,
+% endif
+% endfor
+% endif
+);
+</code></synopsis>
+</%block>
+<%block name="details">
+% if formatter.get_parameters(node) or node.retval:
+<terms>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval:
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/C/method.tmpl b/giscanner/doctemplates/C/method.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/C/method.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/C/namespace.tmpl b/giscanner/doctemplates/C/namespace.tmpl
new file mode 100644
index 00000000..cb8195da
--- /dev/null
+++ b/giscanner/doctemplates/C/namespace.tmpl
@@ -0,0 +1 @@
+<%inherit file="/namespace.tmpl"/>
diff --git a/giscanner/doctemplates/C/property.tmpl b/giscanner/doctemplates/C/property.tmpl
new file mode 100644
index 00000000..6ec9e8e1
--- /dev/null
+++ b/giscanner/doctemplates/C/property.tmpl
@@ -0,0 +1,5 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
diff --git a/giscanner/doctemplates/C/record.tmpl b/giscanner/doctemplates/C/record.tmpl
new file mode 100644
index 00000000..b66ae926
--- /dev/null
+++ b/giscanner/doctemplates/C/record.tmpl
@@ -0,0 +1 @@
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/C/signal.tmpl b/giscanner/doctemplates/C/signal.tmpl
new file mode 100644
index 00000000..28c0b740
--- /dev/null
+++ b/giscanner/doctemplates/C/signal.tmpl
@@ -0,0 +1,5 @@
+<%inherit file="./function.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
diff --git a/giscanner/doctemplates/C/vfunc.tmpl b/giscanner/doctemplates/C/vfunc.tmpl
new file mode 100644
index 00000000..aa0394f4
--- /dev/null
+++ b/giscanner/doctemplates/C/vfunc.tmpl
@@ -0,0 +1,4 @@
+<%inherit file="./function.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+</%block>
diff --git a/giscanner/doctemplates/Gjs/class.tmpl b/giscanner/doctemplates/Gjs/class.tmpl
new file mode 100644
index 00000000..887c646b
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/class.tmpl
@@ -0,0 +1,18 @@
+<%inherit file="/class.tmpl"/>
+<%block name="synopsis">
+ <synopsis><code>
+const ${namespace.name} = imports.gi.${namespace.name};
+
+let ${formatter.to_underscores(node.name).lower()} = new ${namespace.name}.${node.name}(\
+% if len(node.properties) > 0:
+{
+% for ix, property_ in enumerate(node.properties):
+% if property_.construct or property_.construct_only or property_.writable:
+ <link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>: value,
+% endif
+% endfor
+}\
+% endif
+);
+ </code></synopsis>
+</%block>
diff --git a/giscanner/doctemplates/Gjs/constructor.tmpl b/giscanner/doctemplates/Gjs/constructor.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/constructor.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/Gjs/default.tmpl b/giscanner/doctemplates/Gjs/default.tmpl
new file mode 100644
index 00000000..b66ae926
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/default.tmpl
@@ -0,0 +1 @@
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/Gjs/enum.tmpl b/giscanner/doctemplates/Gjs/enum.tmpl
new file mode 100644
index 00000000..35cdd439
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/enum.tmpl
@@ -0,0 +1,13 @@
+<%inherit file="/base.tmpl"/>
+<%block name="details">
+% if node.members:
+<terms>
+% for member in node.members:
+<item>
+<title><code>${node.name}.${member.name.upper()}</code></title>
+${formatter.format(node, member.doc)}
+</item>
+% endfor
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/Gjs/function.tmpl b/giscanner/doctemplates/Gjs/function.tmpl
new file mode 100644
index 00000000..e0fd9612
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/function.tmpl
@@ -0,0 +1,48 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <api:function>
+ <api:returns>
+ <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+ </api:returns>
+ <api:name>${node.symbol}</api:name>
+% for arg in formatter.get_parameters(node):
+% if arg.type.ctype == '<varargs>':
+ <api:varargs/>
+% else:
+ <api:arg>
+ <api:type>${formatter.format_type(arg.type) | x}</api:type>
+ <api:name>${formatter.format_parameter_name(node, arg)}</api:name>
+ </api:arg>
+% endif
+% endfor
+ </api:function>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-gjs">
+function \
+${node.name}(\
+${', '.join('%s:%s' % (arg.argname, formatter.format_type(arg.type)) for arg in formatter.get_parameters(node))}\
+):${formatter.format_type(node.retval.type)} {
+ // Gjs wrapper for ${node.symbol}()
+}
+</code></synopsis>
+</%block>
+<%block name="details">
+% if formatter.get_parameters(node) or node.retval:
+<terms>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/Gjs/method.tmpl b/giscanner/doctemplates/Gjs/method.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/method.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/Gjs/namespace.tmpl b/giscanner/doctemplates/Gjs/namespace.tmpl
new file mode 100644
index 00000000..4d80c2a5
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/namespace.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/namespace.tmpl"/>
diff --git a/giscanner/doctemplates/Gjs/property.tmpl b/giscanner/doctemplates/Gjs/property.tmpl
new file mode 100644
index 00000000..3316a00c
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/property.tmpl
@@ -0,0 +1,10 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-python">
+"${node.name}" ${formatter.format_type(node.type)} : ${formatter.format_property_flags(node)}
+</code></synopsis>
+</%block>
diff --git a/giscanner/doctemplates/Gjs/record.tmpl b/giscanner/doctemplates/Gjs/record.tmpl
new file mode 100644
index 00000000..1523e0df
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/record.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/Gjs/signal.tmpl b/giscanner/doctemplates/Gjs/signal.tmpl
new file mode 100644
index 00000000..084d9743
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/signal.tmpl
@@ -0,0 +1,37 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-python">
+function callback(${formatter.to_underscores(node.parent.name).lower()}, \
+% for arg in formatter.get_parameters(node):
+${arg.argname}:${formatter.format_type(arg.type)}, \
+% endfor
+):${formatter.format_type(node.retval.type)};
+</code></synopsis>
+</%block>
+<%block name="details">
+<terms>
+<item>
+<title><code>${formatter.to_underscores(node.parent.name).lower()}</code></title>
+<p>instance of ${formatter.format_xref(node.parent)} that is emitting the signal</p>
+</item>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval and \
+ node.retval.type.ctype != 'void' and \
+ node.retval.type.ctype is not None:
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+</%block>
+
diff --git a/giscanner/doctemplates/Gjs/vfunc.tmpl b/giscanner/doctemplates/Gjs/vfunc.tmpl
new file mode 100644
index 00000000..1cbe511c
--- /dev/null
+++ b/giscanner/doctemplates/Gjs/vfunc.tmpl
@@ -0,0 +1,27 @@
+<%inherit file="/base.tmpl"/>
+<%block name="synopsis">
+<synopsis><code mime="text/x-gjs">
+function vfunc_${node.name}(\
+${', '.join('%s:%s' % (arg.argname, formatter.format_type(arg.type)) for arg in formatter.get_parameters(node))}\
+):${formatter.format_type(node.retval.type)} {
+}
+</code></synopsis>
+</%block>
+<%block name="details">
+% if formatter.get_parameters(node) or node.retval:
+<terms>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/Python/class.tmpl b/giscanner/doctemplates/Python/class.tmpl
new file mode 100644
index 00000000..435b31a5
--- /dev/null
+++ b/giscanner/doctemplates/Python/class.tmpl
@@ -0,0 +1,17 @@
+<%inherit file="/class.tmpl"/>
+<%block name="synopsis">
+ <synopsis><code>
+from gi.repository import ${namespace.name}
+
+${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
+% for ix, property_ in enumerate(node.properties):
+% if property_.construct or property_.construct_only or property_.writable:
+<link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>=value\
+% if ix != len(node.properties) - 1:
+, \
+% endif
+% endif
+% endfor
+)\
+ </code></synopsis>
+</%block>
diff --git a/giscanner/doctemplates/Python/constructor.tmpl b/giscanner/doctemplates/Python/constructor.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/Python/constructor.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/Python/default.tmpl b/giscanner/doctemplates/Python/default.tmpl
new file mode 100644
index 00000000..b66ae926
--- /dev/null
+++ b/giscanner/doctemplates/Python/default.tmpl
@@ -0,0 +1 @@
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/Python/enum.tmpl b/giscanner/doctemplates/Python/enum.tmpl
new file mode 100644
index 00000000..35cdd439
--- /dev/null
+++ b/giscanner/doctemplates/Python/enum.tmpl
@@ -0,0 +1,13 @@
+<%inherit file="/base.tmpl"/>
+<%block name="details">
+% if node.members:
+<terms>
+% for member in node.members:
+<item>
+<title><code>${node.name}.${member.name.upper()}</code></title>
+${formatter.format(node, member.doc)}
+</item>
+% endfor
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/Python/function.tmpl b/giscanner/doctemplates/Python/function.tmpl
new file mode 100644
index 00000000..072a1185
--- /dev/null
+++ b/giscanner/doctemplates/Python/function.tmpl
@@ -0,0 +1,53 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <api:function>
+ <api:returns>
+ <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+ </api:returns>
+ <api:name>${node.symbol}</api:name>
+% for arg in formatter.get_parameters(node):
+% if arg.type.ctype == '<varargs>':
+ <api:varargs/>
+% else:
+ <api:arg>
+ <api:type>${formatter.format_type(arg.type) | x}</api:type>
+ <api:name>${formatter.format_parameter_name(node, arg)}</api:name>
+ </api:arg>
+% endif
+% endfor
+ </api:function>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-python">
+% if formatter.get_parameters(node):
+@accepts(\
+${', '.join((formatter.format_type(arg.type) for arg in formatter.get_parameters(node)))}\
+)
+% endif
+@returns(${formatter.format_type(node.retval.type) | x})
+def \
+${node.name}(\
+${', '.join((formatter.format_parameter_name(node, arg) for arg in formatter.get_parameters(node)))}\
+):
+ # Python wrapper for ${node.symbol}()
+</code></synopsis>
+</%block>
+<%block name="details">
+% if formatter.get_parameters(node) or node.retval:
+<terms>
+% for ix, arg in enumerate(formatter.get_parameters(node)):
+<item>
+<title><code>${formatter.format_parameter_name(node, arg)}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<item>
+<title><code>Returns</code></title>
+{formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/Python/method.tmpl b/giscanner/doctemplates/Python/method.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/Python/method.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/Python/namespace.tmpl b/giscanner/doctemplates/Python/namespace.tmpl
new file mode 100644
index 00000000..4d80c2a5
--- /dev/null
+++ b/giscanner/doctemplates/Python/namespace.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/namespace.tmpl"/>
diff --git a/giscanner/doctemplates/Python/property.tmpl b/giscanner/doctemplates/Python/property.tmpl
new file mode 100644
index 00000000..3316a00c
--- /dev/null
+++ b/giscanner/doctemplates/Python/property.tmpl
@@ -0,0 +1,10 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-python">
+"${node.name}" ${formatter.format_type(node.type)} : ${formatter.format_property_flags(node)}
+</code></synopsis>
+</%block>
diff --git a/giscanner/doctemplates/Python/record.tmpl b/giscanner/doctemplates/Python/record.tmpl
new file mode 100644
index 00000000..1523e0df
--- /dev/null
+++ b/giscanner/doctemplates/Python/record.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/Python/signal.tmpl b/giscanner/doctemplates/Python/signal.tmpl
new file mode 100644
index 00000000..dc931107
--- /dev/null
+++ b/giscanner/doctemplates/Python/signal.tmpl
@@ -0,0 +1,42 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-python">
+def callback(${formatter.to_underscores(node.parent.name).lower()}, \
+% for arg in formatter.get_parameters(node):
+${arg.argname}, \
+% endfor
+user_param1, ...)
+</code></synopsis>
+</%block>
+<%block name="details">
+<terms>
+<item>
+<title><code>${formatter.to_underscores(node.parent.name).lower()}</code></title>
+<p>instance of ${formatter.format_xref(node.parent)} that is emitting the signal</p>
+</item>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+<title><code>user_param1</code></title>
+<p>first user parameter (if any) specified with the connect() method</p>
+<item>
+<title><code>...</code></title>
+<p>additional user parameters (if any)</p>
+</item>
+% if node.retval and \
+ node.retval.type.ctype != 'void' and \
+ node.retval.type.ctype is not None:
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+</%block>
diff --git a/giscanner/doctemplates/Python/vfunc.tmpl b/giscanner/doctemplates/Python/vfunc.tmpl
new file mode 100644
index 00000000..98a30932
--- /dev/null
+++ b/giscanner/doctemplates/Python/vfunc.tmpl
@@ -0,0 +1,33 @@
+<%inherit file="/base.tmpl"/>
+<%block name="synopsis">
+<synopsis><code mime="text/x-python">
+% if formatter.get_parameters(node):
+@accepts(\
+${', '.join((formatter.format_type(arg.type) for arg in formatter.get_parameters(node)))}\
+)
+% endif
+@returns(${formatter.format_type(node.retval.type) | x})
+def \
+do_${node.name}(\
+${', '.join((arg.argname for arg in formatter.get_parameters(node)))}\
+):
+</code></synopsis>
+</%block>
+<%block name="details">
+% if formatter.get_parameters(node) or node.retval:
+<terms>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/base.tmpl b/giscanner/doctemplates/base.tmpl
new file mode 100644
index 00000000..78980773
--- /dev/null
+++ b/giscanner/doctemplates/base.tmpl
@@ -0,0 +1,29 @@
+<%! page_type="topic" %>\
+<?xml version="1.0"?>
+<page id="${page_id}"
+ type="${self.attr.page_type}"
+ style="${page_kind}"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ </%block>
+ </info>
+ <title><%block name="title">${formatter.format_page_name(node)}</%block></title>
+ <%block name="synopsis">
+ </%block>
+ <%block name="doc">
+ ${formatter.format(node, node.doc)}
+ </%block>
+ <%block name="since_version">
+ % if node.version:
+ <p>Since ${node.version}</p>
+ % endif
+ </%block>
+ <%block name="details">
+ </%block>
+ <%block name="links">
+ </%block>
+</page>
diff --git a/giscanner/doctemplates/class.tmpl b/giscanner/doctemplates/class.tmpl
new file mode 100644
index 00000000..7f8b6869
--- /dev/null
+++ b/giscanner/doctemplates/class.tmpl
@@ -0,0 +1,40 @@
+<%! page_type="guide" %>\
+<%inherit file="/base.tmpl"/>
+<%block name="details">
+ <synopsis>
+ <title>Hierarchy</title>
+ <tree>
+% for class_ in formatter.get_class_hierarchy(node):
+ <item>
+ <code>${class_.namespace.name}.${class_.name}</code>
+% endfor
+% for class_ in formatter.get_class_hierarchy(node):
+ </item>
+% endfor
+ </tree>
+ </synopsis>
+</%block>
+<%block name="links">
+ <links type="topic" ui:expanded="true"
+ api:type="function" api:mime="${formatter.mime_type}"
+ groups="method" style="linklist">
+ <title>Methods</title>
+ </links>
+ <links type="topic" ui:expanded="true"
+ api:type="function" api:mime="${formatter.mime_type}"
+ groups="function" style="linklist">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="true" groups="property" style="linklist">
+ <title>Properties</title>
+ </links>
+ <links type="topic" ui:expanded="true" groups="signal" style="linklist">
+ <title>Signals</title>
+ </links>
+ <links type="topic" ui:expanded="true" groups="vfunc" style="linklist">
+ <title>Virtual functions</title>
+ </links>
+ <links type="topic" ui:expanded="true" groups="#first #default #last" style="linklist">
+ <title>Other</title>
+ </links>
+</%block>
diff --git a/giscanner/doctemplates/namespace.tmpl b/giscanner/doctemplates/namespace.tmpl
new file mode 100644
index 00000000..bb58bb16
--- /dev/null
+++ b/giscanner/doctemplates/namespace.tmpl
@@ -0,0 +1,19 @@
+<%! page_type="guide" %>\
+<%inherit file="/base.tmpl"/>
+<%block name="doc">
+</%block>
+<%block name="info">
+</%block>
+<%block name="links">
+ <links type="topic" ui:expanded="true" groups="class" style="linklist">
+ <title>Classes</title>
+ </links>
+ <links type="topic" ui:expanded="true" groups="function" style="linklist">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="true" groups="#first #default #last" style="linklist">
+ <title>Other</title>
+ </links>
+</%block>
+<%block name="since_version">
+</%block>