Soundux/src/core/global/globals.hpp

39 lines
1.3 KiB
C++
Raw Normal View History

2021-01-27 12:38:03 +01:00
#pragma once
2021-04-13 20:31:51 +02:00
#include <helper/audio/audio.hpp>
#if defined(__linux__)
#include <helper/audio/linux/backend.hpp>
#endif
2021-04-13 20:31:51 +02:00
#include <core/config/config.hpp>
#include <core/hotkeys/hotkeys.hpp>
#include <core/objects/data.hpp>
#include <core/objects/objects.hpp>
#include <core/objects/settings.hpp>
2021-04-13 20:31:51 +02:00
#include <helper/icons/icons.hpp>
#include <helper/queue/queue.hpp>
2021-04-13 20:31:51 +02:00
#include <helper/ytdl/youtube-dl.hpp>
2021-01-27 12:38:03 +01:00
#include <memory>
2021-04-13 20:31:51 +02:00
#include <ui/ui.hpp>
2021-05-21 20:23:24 +02:00
#include <var_guard.hpp>
2021-01-27 12:38:03 +01:00
namespace Soundux
{
namespace Globals
{
inline Objects::Data gData;
inline Objects::Audio gAudio;
#if defined(__linux__)
inline std::optional<Objects::IconFetcher> gIcons;
inline std::shared_ptr<Objects::AudioBackend> gAudioBackend;
#endif
inline Objects::Queue gQueue;
2021-01-27 12:38:03 +01:00
inline Objects::Config gConfig;
2021-03-18 20:52:30 +01:00
inline Objects::YoutubeDl gYtdl;
inline Objects::Hotkeys gHotKeys;
2021-01-27 12:38:03 +01:00
inline Objects::Settings gSettings;
inline std::unique_ptr<Objects::Window> gGui;
2021-01-27 12:38:03 +01:00
/* Allows for fast & easy sound access, is populated on start up */
2021-05-21 20:23:24 +02:00
inline sxl::var_guard<std::map<std::uint32_t, std::reference_wrapper<Objects::Sound>>> gSounds;
inline sxl::var_guard<std::map<std::uint32_t, std::reference_wrapper<Objects::Sound>>> gFavorites;
2021-01-27 12:38:03 +01:00
} // namespace Globals
} // namespace Soundux