Receives callbacks when a MessageManager is starting or stopping.
Listeners are process-lifetime: they remain registered across MessageManager restart (for example a plugin reload). They are not unregistered automatically when the manager is deleted.
If you register after the current manager has already been created you will not receive messageManagerStarting() for that instance. Check getInstanceWithoutCreating() in your constructor if you need to catch up.
Public Member Functions | |
| LifetimeListener () | |
| Default constructor. | |
| virtual | ~LifetimeListener () |
| Destructor. | |
| virtual void | messageManagerStarting ()=0 |
| Called after a new MessageManager has been constructed and its platform message queue is ready, and before the dispatch loop is pumping. | |
| virtual void | messageManagerStopping ()=0 |
| Called after the manager has stopped accepting new messages, and before DeletedAtShutdown objects and the MessageManager itself are destroyed. | |
| juce::MessageManager::LifetimeListener::LifetimeListener | ( | ) |
Default constructor.
Referenced by messageManagerStopping().
|
virtual |
Destructor.
|
pure virtual |
Called after a new MessageManager has been constructed and its platform message queue is ready, and before the dispatch loop is pumping.
This runs on the message thread. Posted callbacks will not run until the message loop starts (or the host pumps it). Do not wait for a posted message here; the loop is not pumping yet so that would deadlock.
|
pure virtual |
Called after the manager has stopped accepting new messages, and before DeletedAtShutdown objects and the MessageManager itself are destroyed.
The MessageManager instance is still available. Do not post messages; they will be discarded.
References LifetimeListener().