Waybar/include/modules/pulseaudio.hpp

28 lines
558 B
C++
Raw Normal View History

2018-08-09 21:55:38 +00:00
#pragma once
#include <fmt/format.h>
2022-04-06 06:37:19 +00:00
2018-08-13 20:33:07 +00:00
#include <algorithm>
#include <array>
#include <memory>
2022-04-06 06:37:19 +00:00
2022-11-24 11:28:52 +00:00
#include "ALabel.hpp"
#include "util/audio_backend.hpp"
2018-08-09 21:55:38 +00:00
namespace waybar::modules {
2022-11-24 11:28:52 +00:00
class Pulseaudio : public ALabel {
2019-04-18 15:52:00 +00:00
public:
Pulseaudio(const std::string&, const Json::Value&);
virtual ~Pulseaudio() = default;
2023-03-02 13:57:07 +00:00
auto update() -> void override;
2018-08-16 12:29:41 +00:00
2019-04-18 15:52:00 +00:00
private:
2023-03-02 13:57:07 +00:00
bool handleScroll(GdkEventScroll* e) override;
2021-07-15 06:52:02 +00:00
const std::vector<std::string> getPulseIcon() const;
2019-04-18 15:52:00 +00:00
std::shared_ptr<util::AudioBackend> backend = nullptr;
2018-08-16 12:29:41 +00:00
};
2018-08-09 21:55:38 +00:00
} // namespace waybar::modules