summaryrefslogtreecommitdiff
path: root/giscanner/mallard-C-function.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/mallard-C-function.tmpl')
-rw-r--r--giscanner/mallard-C-function.tmpl24
1 files changed, 23 insertions, 1 deletions
diff --git a/giscanner/mallard-C-function.tmpl b/giscanner/mallard-C-function.tmpl
index 8fcd30a4..fd87a83a 100644
--- a/giscanner/mallard-C-function.tmpl
+++ b/giscanner/mallard-C-function.tmpl
@@ -12,4 +12,26 @@
</api:function>
</info>
<title>${node.symbol}</title>
-${format(node.doc)}</page>
+<synopsis><code>
+${formatter.format_type(node.retval.type)} ${node.symbol} (\
+% if len(node.parameters) == 0:
+);
+% 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)} ${arg.argname}\
+% endif
+% if ix == len(node.parameters) - 1:
+);
+% else:
+,
+%endif
+% endfor
+</code></synopsis>
+${formatter.format(node.doc)}
+</page>