feat(Pulseadio): port icons

This commit is contained in:
Alexis
2018-08-29 23:50:41 +02:00
parent d0933ab50f
commit 6dd9b5ccc4
5 changed files with 54 additions and 9 deletions

View File

@ -10,7 +10,7 @@ class ALabel : public IModule {
ALabel(const Json::Value&, const std::string format);
virtual ~ALabel() = default;
virtual auto update() -> void;
virtual std::string getIcon(uint16_t percentage);
virtual std::string getIcon(uint16_t, const std::string& alt = "");
virtual operator Gtk::Widget &();
protected:
Gtk::EventBox event_box_;

View File

@ -19,12 +19,15 @@ class Pulseaudio : public ALabel {
static void sinkInfoCb(pa_context*, const pa_sink_info*, int, void*);
static void serverInfoCb(pa_context*, const pa_server_info*, void*);
const std::string getPortIcon() const;
pa_threaded_mainloop* mainloop_;
pa_mainloop_api* mainloop_api_;
pa_context* context_;
uint32_t sink_idx_{0};
uint16_t volume_;
bool muted_;
std::string port_name_;
std::string desc_;
};