Soundux/src/helper/icons/icons.hpp
Curve 48132d86b9
refactor: audiobackend code, ui.hpp, iconfetcher, structure
- Changed Structure (Moved Settings, Data and Enums into own header files)
- Changed how AudioBackend is created to fix issues (fixes #208)
- Made AudioBackend switch to pipewire when pipewire-pulse was detected as server in pulseaudio
- Refactored Code for IconFetcher and moved getPpid from misc into IconFetcher
- Removed unused code in proccessingqueue, renamed processingqueue to queue.
2021-05-22 16:41:36 +02:00

30 lines
661 B
C++

#if defined(__linux__)
#pragma once
#include "forward.hpp"
#include <map>
#include <memory>
#include <optional>
#include <string>
namespace Soundux
{
namespace Objects
{
class IconFetcher
{
LibWnck::Screen *screen;
std::map<int, std::string> cache;
private:
IconFetcher() = default;
bool setup();
std::optional<int> getPpid(int pid);
public:
static std::optional<IconFetcher> createInstance();
std::optional<std::string> getIcon(int pid, bool recursive = true);
};
} // namespace Objects
} // namespace Soundux
#endif