summaryrefslogtreecommitdiff
path: root/doc/ext/appapi.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-01-14 22:28:03 +0100
committerGeorg Brandl <georg@python.org>2010-01-14 22:28:03 +0100
commit2936c97ec0ff8b2690b97a7f3e8cc59912d191b8 (patch)
treeea9722c34ecbb9f86c583a21229b84a919d330bd /doc/ext/appapi.rst
parentba163db555f11be32904acf421bae901f24a5cff (diff)
downloadsphinx-2936c97ec0ff8b2690b97a7f3e8cc59912d191b8.tar.gz
Document three new appapi functions.
Diffstat (limited to 'doc/ext/appapi.rst')
-rw-r--r--doc/ext/appapi.rst27
1 files changed, 25 insertions, 2 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst
index 77ced4ef..12d004a1 100644
--- a/doc/ext/appapi.rst
+++ b/doc/ext/appapi.rst
@@ -43,6 +43,15 @@ the following public API:
``'env'``) to a string. However, booleans are still accepted and
converted internally.
+.. method:: Sphinx.add_domain(domain)
+
+ Make the given *domain* (which must be a subclass of
+ :class:`sphinx.domains.Domain`) known to Sphinx.
+
+ .. XXX where is Domain documented?
+
+ .. versionadded:: 1.0
+
.. method:: Sphinx.add_event(name)
Register an event called *name*.
@@ -81,10 +90,10 @@ the following public API:
Register a Docutils directive. *name* must be the prospective directive
name. There are two possible ways to write a directive:
- * In the docutils 0.4 style, *func* is the directive function. *content*,
+ * In the docutils 0.4 style, *obj* is the directive function. *content*,
*arguments* and *options* are set as attributes on the function and
determine whether the directive has content, arguments and options,
- respectively.
+ respectively. **This style is deprecated.**
* In the docutils 0.5 style, *directiveclass* is the directive class. It
must already have attributes named *has_content*, *required_arguments*,
@@ -114,12 +123,26 @@ the following public API:
.. versionchanged:: 0.6
Docutils 0.5-style directive classes are now supported.
+.. method:: Sphinx.add_directive_to_domain(domain, name, func, content, arguments, **options)
+ Sphinx.add_directive_to_domain(domain, name, directiveclass)
+
+ Like :meth:`add_directive`, but the directive is added to the domain named
+ *domain*.
+
+ .. versionadded:: 1.0
+
.. method:: Sphinx.add_role(name, role)
Register a Docutils role. *name* must be the role name that occurs in the
source, *role* the role function (see the `Docutils documentation
<http://docutils.sourceforge.net/docs/howto/rst-roles.html>`_ on details).
+.. method:: Sphinx.add_role_to_domain(domain, name, role)
+
+ Like :meth:`add_role`, but the role is added to the domain named *domain*.
+
+ .. versionadded:: 1.0
+
.. method:: Sphinx.add_generic_role(name, nodeclass)
Register a Docutils role that does nothing but wrap its contents in the