summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2012-02-19 17:32:00 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2012-02-19 17:32:00 +0100
commit9f81ad162fd382a4e6a969d20da929b9c5aded4b (patch)
treee893014b074c87c45fa28e1f238f0ade4d886771 /giscanner
parentddb5f1002447b7021b0a57ec02dcc191a17788e4 (diff)
downloadgobject-introspection-9f81ad162fd382a4e6a969d20da929b9c5aded4b.tar.gz
g-ir-doc-tool: Add param information to signal pages in Python
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/mallard-Python-signal.tmpl37
1 files changed, 37 insertions, 0 deletions
diff --git a/giscanner/mallard-Python-signal.tmpl b/giscanner/mallard-Python-signal.tmpl
index 41c211a7..263a4034 100644
--- a/giscanner/mallard-Python-signal.tmpl
+++ b/giscanner/mallard-Python-signal.tmpl
@@ -9,5 +9,42 @@
<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(\
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+${arg.argname}, \
+% endfor
+user_param1, ...)
+</code></synopsis>
${formatter.format(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(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.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
</page>