summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/C
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/doctemplates/C')
-rw-r--r--giscanner/doctemplates/C/class.tmpl2
-rw-r--r--giscanner/doctemplates/C/constructor.tmpl1
-rw-r--r--giscanner/doctemplates/C/default.tmpl1
-rw-r--r--giscanner/doctemplates/C/enum.tmpl2
-rw-r--r--giscanner/doctemplates/C/function.tmpl61
-rw-r--r--giscanner/doctemplates/C/method.tmpl1
-rw-r--r--giscanner/doctemplates/C/namespace.tmpl1
-rw-r--r--giscanner/doctemplates/C/property.tmpl5
-rw-r--r--giscanner/doctemplates/C/record.tmpl1
-rw-r--r--giscanner/doctemplates/C/signal.tmpl5
-rw-r--r--giscanner/doctemplates/C/vfunc.tmpl4
11 files changed, 84 insertions, 0 deletions
diff --git a/giscanner/doctemplates/C/class.tmpl b/giscanner/doctemplates/C/class.tmpl
new file mode 100644
index 00000000..3f18b021
--- /dev/null
+++ b/giscanner/doctemplates/C/class.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/class.tmpl"/>
diff --git a/giscanner/doctemplates/C/constructor.tmpl b/giscanner/doctemplates/C/constructor.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/C/constructor.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/C/default.tmpl b/giscanner/doctemplates/C/default.tmpl
new file mode 100644
index 00000000..b66ae926
--- /dev/null
+++ b/giscanner/doctemplates/C/default.tmpl
@@ -0,0 +1 @@
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/C/enum.tmpl b/giscanner/doctemplates/C/enum.tmpl
new file mode 100644
index 00000000..1523e0df
--- /dev/null
+++ b/giscanner/doctemplates/C/enum.tmpl
@@ -0,0 +1,2 @@
+<%! page_type="guide" %>\
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/C/function.tmpl b/giscanner/doctemplates/C/function.tmpl
new file mode 100644
index 00000000..8d669438
--- /dev/null
+++ b/giscanner/doctemplates/C/function.tmpl
@@ -0,0 +1,61 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <api:function>
+ <api:returns>
+ <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+ </api:returns>
+ <api:name>${formatter.format_function_name(node)}</api:name>
+% for arg in formatter.get_parameters(node):
+% if arg.type.ctype == '<varargs>':
+ <api:varargs/>
+% else:
+ <api:arg>
+ <api:type>${formatter.format_type(arg.type) | x}</api:type>
+ <api:name>${formatter.format_parameter_name(node, arg)}</api:name>
+ </api:arg>
+% endif
+% endfor
+ </api:function>
+</%block>
+<%block name="synopsis">
+<synopsis><code mime="text/x-csrc">
+${node.retval.type.ctype} ${formatter.format_function_name(node)} (\
+% if not formatter.get_parameters(node):
+void\
+% else:
+% for ix, arg in enumerate(formatter.get_parameters(node)):
+% if ix != 0:
+${' ' * (len(formatter.format_type(node.retval.type)) + len(formatter.format_function_name(node)) + 3)}\
+% endif
+% if arg.type.ctype == '<varargs>':
+...\
+% else:
+${formatter.format_type(arg.type) | x} ${arg.argname}\
+% endif
+% if ix != len(formatter.get_parameters(node)) - 1:
+,
+% endif
+% endfor
+% endif
+);
+</code></synopsis>
+</%block>
+<%block name="details">
+% if formatter.get_parameters(node) or node.retval:
+<terms>
+% for arg in formatter.get_parameters(node):
+<item>
+<title><code>${arg.argname}</code></title>
+${formatter.format(node, arg.doc)}
+</item>
+% endfor
+% if node.retval:
+<item>
+<title><code>Returns</code></title>
+${formatter.format(node, node.retval.doc)}
+</item>
+% endif
+</terms>
+% endif
+</%block>
diff --git a/giscanner/doctemplates/C/method.tmpl b/giscanner/doctemplates/C/method.tmpl
new file mode 100644
index 00000000..a03d2825
--- /dev/null
+++ b/giscanner/doctemplates/C/method.tmpl
@@ -0,0 +1 @@
+<%inherit file="./function.tmpl"/>
diff --git a/giscanner/doctemplates/C/namespace.tmpl b/giscanner/doctemplates/C/namespace.tmpl
new file mode 100644
index 00000000..cb8195da
--- /dev/null
+++ b/giscanner/doctemplates/C/namespace.tmpl
@@ -0,0 +1 @@
+<%inherit file="/namespace.tmpl"/>
diff --git a/giscanner/doctemplates/C/property.tmpl b/giscanner/doctemplates/C/property.tmpl
new file mode 100644
index 00000000..6ec9e8e1
--- /dev/null
+++ b/giscanner/doctemplates/C/property.tmpl
@@ -0,0 +1,5 @@
+<%inherit file="/base.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
diff --git a/giscanner/doctemplates/C/record.tmpl b/giscanner/doctemplates/C/record.tmpl
new file mode 100644
index 00000000..b66ae926
--- /dev/null
+++ b/giscanner/doctemplates/C/record.tmpl
@@ -0,0 +1 @@
+<%inherit file="/base.tmpl"/>
diff --git a/giscanner/doctemplates/C/signal.tmpl b/giscanner/doctemplates/C/signal.tmpl
new file mode 100644
index 00000000..28c0b740
--- /dev/null
+++ b/giscanner/doctemplates/C/signal.tmpl
@@ -0,0 +1,5 @@
+<%inherit file="./function.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+ <title type="link" role="topic">${node.name}</title>
+</%block>
diff --git a/giscanner/doctemplates/C/vfunc.tmpl b/giscanner/doctemplates/C/vfunc.tmpl
new file mode 100644
index 00000000..aa0394f4
--- /dev/null
+++ b/giscanner/doctemplates/C/vfunc.tmpl
@@ -0,0 +1,4 @@
+<%inherit file="./function.tmpl"/>
+<%block name="info">
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
+</%block>