diff options
Diffstat (limited to 'giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl')
-rw-r--r-- | giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl | 46 |
1 files changed, 46 insertions, 0 deletions
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> |