summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/doctemplates')
-rw-r--r--giscanner/doctemplates/C/mallard-C-class.tmpl48
-rw-r--r--giscanner/doctemplates/C/mallard-C-default.tmpl11
-rw-r--r--giscanner/doctemplates/C/mallard-C-enum.tmpl12
-rw-r--r--giscanner/doctemplates/C/mallard-C-function.tmpl95
-rw-r--r--giscanner/doctemplates/C/mallard-C-namespace.tmpl19
-rw-r--r--giscanner/doctemplates/C/mallard-C-property.tmpl13
-rw-r--r--giscanner/doctemplates/C/mallard-C-record.tmpl12
-rw-r--r--giscanner/doctemplates/C/mallard-C-signal.tmpl13
-rw-r--r--giscanner/doctemplates/C/mallard-C-vfunc.tmpl35
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-class.tmpl66
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-default.tmpl11
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-enum.tmpl23
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-function.tmpl82
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-namespace.tmpl19
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-property.tmpl16
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-record.tmpl12
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-signal.tmpl52
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl46
18 files changed, 585 insertions, 0 deletions
diff --git a/giscanner/doctemplates/C/mallard-C-class.tmpl b/giscanner/doctemplates/C/mallard-C-class.tmpl
new file mode 100644
index 00000000..b0f703f9
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-class.tmpl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+ type="guide"
+ 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"/>
+ </info>
+ <title>${node.ctype}</title>
+${formatter.format(node, node.doc)}
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+ <synopsis ui:expanded="no">
+ <title>Hierarchy</title>
+ <tree>
+ <item>
+ <code>GObjectObject</code>
+ </item>
+ </tree>
+ </synopsis>
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-csrc"
+ groups="constructor" style="linklist">
+ <title>Constructors</title>
+ </links>
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-csrc"
+ groups="method" style="linklist">
+ <title>Methods</title>
+ </links>
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-csrc"
+ groups="function" style="linklist">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+ <title>Properties</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+ <title>Signals</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+ <title>Other</title>
+ </links>
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-default.tmpl b/giscanner/doctemplates/C/mallard-C-default.tmpl
new file mode 100644
index 00000000..8326343e
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-default.tmpl
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.name}"
+ type="topic"
+ style=""
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ </info>
+ <title>${namespace.name}.${node.name}</title>
+${formatter.format(node, node.doc)}
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-enum.tmpl b/giscanner/doctemplates/C/mallard-C-enum.tmpl
new file mode 100644
index 00000000..b59f27e6
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-enum.tmpl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+ type="guide"
+ style="enum"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="index"/>
+ </info>
+ <title>${node.namespace.name}.${node.name}</title>
+${formatter.format(node, node.doc)}
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-function.tmpl b/giscanner/doctemplates/C/mallard-C-function.tmpl
new file mode 100644
index 00000000..051fb0b0
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-function.tmpl
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<%
+page_style = 'function'
+if node.is_constructor:
+ page_style = 'constructor'
+elif node.is_method:
+ page_style = 'method'
+%>
+<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>
+% if node.parent is not None:
+ <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_style}"/>
+% else:
+ <link type="guide" xref="index" group="${page_style}"/>
+% endif
+ <api:function>
+ <api:returns>
+ <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+ </api:returns>
+ <api:name>${node.symbol}</api:name>
+% if node.is_method:
+ <api:arg>
+ <api:type>${node.parent.ctype} *</api:type>
+ <api:name>self</api:name>
+ </api:arg>
+% endif
+% for arg in node.parameters:
+% if arg.type.ctype == '<varargs>':
+ <api:varargs/>
+% else:
+ <api:arg>
+ <api:type>${formatter.format_type(arg.type) | x}</api:type>
+ <api:name>${arg.argname}</api:name>
+ </api:arg>
+% endif
+% endfor
+ </api:function>
+ </info>
+ <title>${node.symbol}</title>
+<synopsis><code mime="text/x-csrc">
+${node.retval.type.ctype} ${node.symbol} (\
+% if node.is_method:
+${node.parent.ctype} *self\
+%endif
+% if len(node.parameters) == 0:
+% if not node.is_method:
+void\
+%endif
+);
+% elif node.is_method:
+,
+% endif
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+% if ix != 0:
+${' ' * (len(formatter.format_type(node.retval.type)) + len(node.symbol) + 3)}\
+% endif
+% if arg.type.ctype == '<varargs>':
+...\
+% else:
+${formatter.format_type(arg.type) | x} ${arg.argname}\
+% endif
+% if ix == len(node.parameters) - 1:
+);
+% else:
+,
+%endif
+% endfor
+</code></synopsis>
+${formatter.format(node, node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(node, arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval:
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node, node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-namespace.tmpl b/giscanner/doctemplates/C/mallard-C-namespace.tmpl
new file mode 100644
index 00000000..284ba238
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-namespace.tmpl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<page id="index"
+ type="guide"
+ style="namespace"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ </info>
+ <title>${node.name} Documentation</title>
+ <links type="topic" ui:expanded="yes" groups="class" style="linklist">
+ <title>Classes</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="function" style="linklist">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+ <title>Other</title>
+ </links>
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-property.tmpl b/giscanner/doctemplates/C/mallard-C-property.tmpl
new file mode 100644
index 00000000..a4719952
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-property.tmpl
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.name}"
+ type="topic"
+ style="property"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+ <title type="link" role="topic">${node.name}</title>
+ </info>
+ <title>${node.parent.ctype}:${node.name}</title>
+${formatter.format(node, node.doc)}
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-record.tmpl b/giscanner/doctemplates/C/mallard-C-record.tmpl
new file mode 100644
index 00000000..1c7223a8
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-record.tmpl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+ type="guide"
+ style="record"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="index"/>
+ </info>
+ <title>${node.namespace.name}${node.name}</title>
+${formatter.format(node, node.doc)}
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-signal.tmpl b/giscanner/doctemplates/C/mallard-C-signal.tmpl
new file mode 100644
index 00000000..69ecaad4
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-signal.tmpl
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.name}"
+ type="topic"
+ style="signal"
+ 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"/>
+ <title type="link" role="topic">${node.name}</title>
+ </info>
+ <title>${node.parent.ctype}::${node.name}</title>
+${formatter.format(node, node.doc)}
+</page>
diff --git a/giscanner/doctemplates/C/mallard-C-vfunc.tmpl b/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
new file mode 100644
index 00000000..a35c7b52
--- /dev/null
+++ b/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<page id="${page_id}"
+ type="topic"
+ style="vfunc"
+ 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"/>
+ </info>
+ <title>${node.name}</title>
+<synopsis><code mime="text/x-csrc">
+</code></synopsis>
+${formatter.format(node, node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(node, arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval:
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node, node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-class.tmpl b/giscanner/doctemplates/Python/mallard-Python-class.tmpl
new file mode 100644
index 00000000..6edf25db
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-class.tmpl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+ type="guide"
+ 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"/>
+ </info>
+ <title>${namespace.name}.${node.name}</title>
+${formatter.format(node, node.doc)}
+
+ <synopsis><code>
+from gi.repository import ${namespace.name}
+
+${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
+% for property_, ix in zip(node.properties, range(len(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>
+
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+ <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>
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-python"
+ groups="method" style="linklist">
+ <title>Methods</title>
+ </links>
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-python"
+ groups="function" style="linklist">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+ <title>Properties</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+ <title>Signals</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="vfunc" style="linklist">
+ <title>Virtual functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+ <title>Other</title>
+ </links>
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-default.tmpl b/giscanner/doctemplates/Python/mallard-Python-default.tmpl
new file mode 100644
index 00000000..87791059
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-default.tmpl
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<page id="${page_id}"
+ type="topic"
+ style=""
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ </info>
+ <title>${namespace.name}.${node.name}</title>
+${formatter.format(node, node.doc)}
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-enum.tmpl b/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
new file mode 100644
index 00000000..9e44ede9
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+ type="guide"
+ style="enum"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="index"/>
+ </info>
+ <title>${node.namespace.name}.${node.name}</title>
+ ${formatter.format(node, node.doc)}
+% if node.members:
+<table>
+% for member, ix in zip(node.members, range(len(node.members))):
+<tr>
+<td><p>${node.name}.${member.name.upper()} :</p></td>
+<td>${formatter.format(node, member.doc)}</td>
+</tr>
+% endfor
+</table>
+% endif
+
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-function.tmpl b/giscanner/doctemplates/Python/mallard-Python-function.tmpl
new file mode 100644
index 00000000..5ccc800a
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-function.tmpl
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<%
+page_style = 'function'
+if node.is_constructor:
+ page_style = 'constructor'
+elif node.is_method:
+ page_style = 'method'
+%>
+<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>
+% if node.parent is not None:
+ <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_style}"/>
+% else:
+ <link type="guide" xref="index" group="${page_style}"/>
+% endif
+ <api:function>
+ <api:returns>
+ <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+ </api:returns>
+ <api:name>${node.symbol}</api:name>
+% if node.is_method:
+ <api:arg>
+ <api:type>${node.parent.ctype} *</api:type>
+ <api:name>self</api:name>
+ </api:arg>
+% endif
+% for arg in node.parameters:
+% if arg.type.ctype == '<varargs>':
+ <api:varargs/>
+% else:
+ <api:arg>
+ <api:type>${formatter.format_type(arg.type) | x}</api:type>
+ <api:name>${arg.argname}</api:name>
+ </api:arg>
+% endif
+% endfor
+ </api:function>
+ </info>
+ <title>${node.name}</title>
+<synopsis><code mime="text/x-python">
+% if len(node.parameters) != 0:
+@accepts(\
+${', '.join((formatter.format_type(arg.type) for arg in node.parameters))}\
+)
+% endif
+@returns(${formatter.format_type(node.retval.type) | x})
+def \
+${node.name}(\
+% if node.is_method:
+self, \
+% endif
+${', '.join((arg.argname for arg in node.parameters))}\
+):
+ # Python wrapper for ${node.symbol}()
+</code></synopsis>
+${formatter.format(node, node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(node, arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node, node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl b/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
new file mode 100644
index 00000000..935cd440
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<page id="index"
+ type="guide"
+ style="namespace"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ </info>
+ <title>${node.name} Documentation</title>
+ <links type="topic" ui:expanded="yes" groups="class">
+ <title>Classes</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="function">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="#first #default #last">
+ <title>Other</title>
+ </links>
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-property.tmpl b/giscanner/doctemplates/Python/mallard-Python-property.tmpl
new file mode 100644
index 00000000..7ef72ccb
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-property.tmpl
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.parent.name}-${node.name}"
+ type="topic"
+ style="property"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+ <title type="link" role="topic">${node.name}</title>
+ </info>
+ <title>${namespace.name}.${node.parent.name}:${node.name}</title>
+<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>
diff --git a/giscanner/doctemplates/Python/mallard-Python-record.tmpl b/giscanner/doctemplates/Python/mallard-Python-record.tmpl
new file mode 100644
index 00000000..1b00e3be
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-record.tmpl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+ type="guide"
+ style="record"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="index"/>
+ </info>
+ <title>${node.namespace.name}${node.name}</title>
+ <p>${node.doc}</p>
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-signal.tmpl b/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
new file mode 100644
index 00000000..f26934fb
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.parent.name}-${node.name}"
+ type="topic"
+ style="signal"
+ 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"/>
+ <title type="link" role="topic">${node.name}</title>
+ </info>
+ <title>${namespace.name}.${node.parent.name}::${node.name}</title>
+<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))):
+${arg.argname}, \
+% endfor
+user_param1, ...)
+</code></synopsis>
+${formatter.format(node, node.doc)}
+
+<table>
+<tr>
+<td><p>${formatter.to_underscores(node.parent.name).lower()} :</p></td>
+<td><p>instance of ${namespace.name}.${node.parent.name} that is emitting the signal</p></td>
+</tr>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(node, arg.doc)}</td>
+</tr>
+% endfor
+<tr>
+<td><p>user_param1 :</p></td>
+<td><p>first user parameter (if any) specified with the connect() method</p></td>
+</tr>
+<tr>
+<td><p>... :</p></td>
+<td><p>additional user parameters (if any)</p></td>
+</tr>
+% if node.retval and \
+ node.retval.type.ctype != 'void' and \
+ node.retval.type.ctype is not None:
+<tr>
+<td><p>Returns :</p></td>
+<td>${node.retval.type.ctype} ${formatter.format(node, node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl b/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
new file mode 100644
index 00000000..0c93abbc
--- /dev/null
+++ b/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<page id="${page_id}"
+ type="topic"
+ style="vfunc"
+ 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>${namespace.name}.${node.parent.name}.${node.name}</title>
+<synopsis><code mime="text/x-python">
+% if len(node.parameters) != 0:
+@accepts(\
+${', '.join((formatter.format_type(arg.type) for arg in node.parameters))}\
+)
+% endif
+@returns(${formatter.format_type(node.retval.type) | x})
+def \
+do_${node.name}(self, \
+${', '.join((arg.argname for arg in node.parameters))}\
+):
+</code></synopsis>
+${formatter.format(node, node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(node, arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node, node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>