summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrockon999 <rockon999@users.noreply.github.com>2018-05-29 20:23:41 -0400
committerrockon999 <rockon999@users.noreply.github.com>2018-08-06 21:04:32 -0500
commit5e6266e576d94ad298202c493d045c57cfe4f87f (patch)
tree86f67bd3d97b21d96b85dc86b7633789ec598567
parentf0434e06d4e201be7740a5b4d3c33e26183e8d8e (diff)
downloadgobject-introspection-5e6266e576d94ad298202c493d045c57cfe4f87f.tar.gz
Only output introspectable methods.
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/_doc.tmpl6
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/_index.tmpl10
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/_method.tmpl21
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/_properties.tmpl2
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/_signals.tmpl2
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/method.tmpl1
6 files changed, 33 insertions, 9 deletions
diff --git a/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl b/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
index d645df17..dbdb8259 100644
--- a/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
+++ b/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
@@ -29,3 +29,9 @@
deprecated
% endif
</%def>
+
+<%def name="introspectable(node)">
+ % if getattr(node, "introspectable", True):
+ ${caller.body()}
+ % endif
+</%def>
diff --git a/giscanner/doctemplates/devdocs/Gjs/_index.tmpl b/giscanner/doctemplates/devdocs/Gjs/_index.tmpl
index f9847cdc..f3d588ae 100644
--- a/giscanner/doctemplates/devdocs/Gjs/_index.tmpl
+++ b/giscanner/doctemplates/devdocs/Gjs/_index.tmpl
@@ -67,6 +67,7 @@
<table class="index">
<tbody>
% for m in methods:
+ <%doc:introspectable node="${m}">
<tr>
% if m in static_methods:
<td class="static-method-indicator">static</td>
@@ -75,6 +76,7 @@
% endif
${format_function_cell(m)}
</tr>
+ </%doc:introspectable>
% endfor
</tbody>
</table>
@@ -88,9 +90,11 @@
<table>
<tbody>
% for m in node.virtual_methods:
+ <%doc:introspectable node="${m}">
<tr>
${format_function_cell(m)}
</tr>
+ </%doc:introspectable>
% endfor
</tbody>
</table>
@@ -111,6 +115,7 @@
</thead>
<tbody>
% for p in node.properties:
+ <%doc:introspectable node="${p}">
<tr>
<td class="${doc.deprecated_class(p)}">
<a href="#${formatter.make_anchor(p)}">${p.name}</a>
@@ -118,6 +123,7 @@
<td>${formatter.format_type(p.type)}</td>
<td>${formatter.format_property_flags(p, abbrev=True)}</td>
</tr>
+ </%doc:introspectable>
% endfor
</tbody>
</table>
@@ -131,12 +137,14 @@
<table>
<tbody>
% for s in node.signals:
+ <%doc:introspectable node="${s}">
<tr>
<td class="${doc.deprecated_class(s)}">
<a href="#${formatter.make_anchor(s)}">${s.name}</a><!-- no space
-->(${formatter.format_in_parameters(s)})
</td>
</tr>
+ </%doc:introspectable>
% endfor
</tbody>
</table>
@@ -158,6 +166,7 @@
</thead>
<tbody>
% for f in non_private_fields:
+ <%doc:introspectable node="${f}">
<tr>
<td class="${doc.deprecated_class(f)}">
<span class="entry" href="#${formatter.make_anchor(f)}">
@@ -174,6 +183,7 @@
% endif
</td>
</tr>
+ </%doc:introspectable>
% endfor
</tbody>
</table>
diff --git a/giscanner/doctemplates/devdocs/Gjs/_method.tmpl b/giscanner/doctemplates/devdocs/Gjs/_method.tmpl
index 6619eb9e..57520465 100644
--- a/giscanner/doctemplates/devdocs/Gjs/_method.tmpl
+++ b/giscanner/doctemplates/devdocs/Gjs/_method.tmpl
@@ -55,14 +55,17 @@
</%def>
<%def name="method(m, static=False, virtual=False)">
- <% invocation = ", ".join(map(lambda p: p.argname, m.parameters)) %>
- <h3>
- <span class="entry ${get_node_kind(m)} ${doc.deprecated_class(m)}"
+ <%doc:introspectable node="${m}">
+ <% invocation = ", ".join(map(lambda p: p.argname, m.parameters)) %>
+
+ <h3>
+ <span class="entry ${get_node_kind(m)} ${doc.deprecated_class(m)}"
id="${formatter.make_anchor(m)}">
- ${formatter.format_function_name(m)}<!-- no space
- --></span><!-- no space
- -->(${formatter.format_in_parameters(m)})
- </h3>
- ${describe_parameters(m, static, virtual)}
- ${doc.format_documentation(m)}
+ ${formatter.format_function_name(m)}<!-- no space
+ --></span><!-- no space
+ -->(${formatter.format_in_parameters(m)})
+ </h3>
+ ${describe_parameters(m, static, virtual)}
+ ${doc.format_documentation(m)}
+ </%doc:introspectable>
</%def>
diff --git a/giscanner/doctemplates/devdocs/Gjs/_properties.tmpl b/giscanner/doctemplates/devdocs/Gjs/_properties.tmpl
index b67d75ae..a7054727 100644
--- a/giscanner/doctemplates/devdocs/Gjs/_properties.tmpl
+++ b/giscanner/doctemplates/devdocs/Gjs/_properties.tmpl
@@ -10,6 +10,7 @@
% if getattr(node, 'properties', []):
<h2>Property Details</h2>
% for p in node.properties:
+ <%doc:introspectable node="${p}">
<h3 class="entry property ${doc.deprecated_class(p)}"
id="${formatter.make_anchor(p)}">
${p.name | dash_to_underscore}
@@ -32,5 +33,6 @@
% if p.doc:
${doc.format_documentation(p)}
% endif
+ </%doc:introspectable>
% endfor
% endif
diff --git a/giscanner/doctemplates/devdocs/Gjs/_signals.tmpl b/giscanner/doctemplates/devdocs/Gjs/_signals.tmpl
index 7b39d5fc..cda46bd5 100644
--- a/giscanner/doctemplates/devdocs/Gjs/_signals.tmpl
+++ b/giscanner/doctemplates/devdocs/Gjs/_signals.tmpl
@@ -3,6 +3,7 @@
% if getattr(node, 'signals', []):
<h2>Signal Details</h2>
% for s in node.signals:
+ <%doc:introspectable node="${s}">
<h3>
<span class="entry signal ${doc.deprecated_class(s)}"
id="${formatter.make_anchor(s)}">
@@ -16,5 +17,6 @@
${method.describe_parameters(s)}
</dl>
${doc.format_documentation(s)}
+ </%doc:introspectable>
% endfor
% endif
diff --git a/giscanner/doctemplates/devdocs/Gjs/method.tmpl b/giscanner/doctemplates/devdocs/Gjs/method.tmpl
new file mode 100644
index 00000000..2c997c09
--- /dev/null
+++ b/giscanner/doctemplates/devdocs/Gjs/method.tmpl
@@ -0,0 +1 @@
+<%inherit file="function.tmpl"/> \ No newline at end of file