summaryrefslogtreecommitdiff
path: root/giscanner/mallard-C-function.tmpl
blob: fd87a83a6476cad9bfaef30a9ecd3a8f389d4f46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0"?>
<page id="${namespace.name}.${node.name}"
      type="topic"
      style="function"
      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="function"/>
    <api:function>
      <api:name>${node.symbol}</api:name>
    </api:function>
  </info>
  <title>${node.symbol}</title>
<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>