summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/Python/vfunc.tmpl
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-31 18:44:09 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-01 19:47:41 -0500
commit44dea29977be349304a905e01b3ec89f7bdc6168 (patch)
treeb81a817f9642a788813e7f28d80f3bef4ac6f30c /giscanner/doctemplates/Python/vfunc.tmpl
parent217916ca496827aa494d956787e2700b21c66aaa (diff)
downloadgobject-introspection-44dea29977be349304a905e01b3ec89f7bdc6168.tar.gz
doctool: Rename templates to exclude mallard/the language
As templates are in their own directory and segregated into language already, this is sort of repeating the issue. At the same time, always explicitly use relative ("./") or absolute ("/") lookups for templates. We want to eventually have base templates to share between languages, so to do so without namespace clashes makes sense.
Diffstat (limited to 'giscanner/doctemplates/Python/vfunc.tmpl')
-rw-r--r--giscanner/doctemplates/Python/vfunc.tmpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/giscanner/doctemplates/Python/vfunc.tmpl b/giscanner/doctemplates/Python/vfunc.tmpl
new file mode 100644
index 00000000..65f856a5
--- /dev/null
+++ b/giscanner/doctemplates/Python/vfunc.tmpl
@@ -0,0 +1,29 @@
+<%inherit file="/base.tmpl"/>
+<%block name="synopsis">
+<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>
+</%block>
+<%block name="details">
+% if node.parameters or node.retval:
+<dl>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<dt><p>${arg.argname} :</p></dt>
+<dd>${formatter.format(node, arg.doc)}</dd>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<dt><p>Returns :</p></dt>
+<dd>${formatter.format(node, node.retval.doc)}</dd>
+% endif
+</dl>
+% endif
+</%block>