mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make EventManager portable
So far, we need to bypass application object for modules to emit a event. This make EventManager portable and easy to pass event emitter. This brings modules less coupled with application object.
This commit is contained in:
@@ -147,7 +147,7 @@ Sphinx core events
|
||||
------------------
|
||||
|
||||
These events are known to the core. The arguments shown are given to the
|
||||
registered event handlers. Use :meth:`.connect` in an extension's ``setup``
|
||||
registered event handlers. Use :meth:`.Sphinx.connect` in an extension's ``setup``
|
||||
function (note that ``conf.py`` can also have a ``setup`` function) to connect
|
||||
handlers to the events. Example:
|
||||
|
||||
|
||||
@@ -38,3 +38,8 @@ Builder API
|
||||
.. automethod:: write_doc
|
||||
.. automethod:: finish
|
||||
|
||||
**Attributes**
|
||||
|
||||
.. attribute:: events
|
||||
|
||||
An :class:`.EventManager` object.
|
||||
|
||||
@@ -27,6 +27,10 @@ Build environment API
|
||||
|
||||
Directory for storing pickled doctrees.
|
||||
|
||||
.. attribute:: events
|
||||
|
||||
An :class:`.EventManager` object.
|
||||
|
||||
.. attribute:: found_docs
|
||||
|
||||
A set of all existing docnames.
|
||||
|
||||
@@ -29,3 +29,9 @@ components (e.g. :class:`.Config`, :class:`.BuildEnvironment` and so on) easily.
|
||||
|
||||
.. autoclass:: sphinx.transforms.post_transforms.images.ImageConverter
|
||||
:members:
|
||||
|
||||
Utility components
|
||||
------------------
|
||||
|
||||
.. autoclass:: sphinx.events.EventManager
|
||||
:members:
|
||||
|
||||
Reference in New Issue
Block a user