summaryrefslogtreecommitdiff
path: root/giscanner/mallard-Python-signal.tmpl
blob: fed0659fee2c7aecb5f4ebb865e19c64779d58b6 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0"?>
<page id="${namespace.name}.${node.parent.name}-${node.name}"
      type="topic"
      style="signal"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:ui="http://projectmallard.org/experimental/ui/">
  <info>
    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
    <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(${formatter.to_underscores(node.parent.name).lower()}, \
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
${arg.argname}, \
% endfor
user_param1, ...)
</code></synopsis>
${formatter.format(node.doc)}

<table>
<tr>
<td><p>${formatter.to_underscores(node.parent.name).lower()} :</p></td>
<td><p>instance of ${namespace.name}.${node.parent.name} that is emitting the signal</p></td>
</tr>
% 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>
% if node.version:
<p>Since ${node.version}</p>
% endif
</page>