Audacity 3.2.0
AppEvents.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-2.0-or-later
3 * SPDX-FileName: AppEvents.h
4 * SPDX-FileContributor: Dmitry Vedenko
5 */
6
7#pragma once
8
9#include <functional>
10
11#include "Observer.h"
12
13namespace AppEvents
14{
20UTILITY_API void OnAppInitialized(std::function<void()> callback);
21
22
27UTILITY_API void OnAppClosing(std::function<void()> callback);
28
33UTILITY_API Observer::Subscription OnAppIdle(std::function<void()> callback);
34
41class UTILITY_API ProviderBase /* not final */
42{
43protected:
44 virtual ~ProviderBase() = default;
45
46 void HandleAppInitialized();
47 void HandleAppIdle();
48 void HandleAppClosing();
49};
50
51} // namespace AppEvents
virtual ~ProviderBase()=default
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
void OnAppClosing(std::function< void()> callback)
Definition: AppEvents.cpp:57
Observer::Subscription OnAppIdle(std::function< void()> callback)
Definition: AppEvents.cpp:72
void OnAppInitialized(std::function< void()> callback)
Definition: AppEvents.cpp:42