Waybar/include/modules/upower/upower_tooltip.hpp

34 lines
679 B
C++
Raw Permalink Normal View History

#pragma once
#include <libupower-glib/upower.h>
#include <memory>
#include <unordered_map>
#include "gtkmm/box.h"
#include "gtkmm/label.h"
#include "gtkmm/window.h"
namespace waybar::modules::upower {
class UPowerTooltip : public Gtk::Window {
private:
typedef std::unordered_map<std::string, UpDevice*> Devices;
const std::string getDeviceIcon(UpDeviceKind& kind);
std::unique_ptr<Gtk::Box> contentBox;
uint iconSize;
uint tooltipSpacing;
2022-03-21 12:50:46 +00:00
uint tooltipPadding;
public:
2022-03-21 12:50:46 +00:00
UPowerTooltip(uint iconSize, uint tooltipSpacing, uint tooltipPadding);
2023-03-02 13:57:07 +00:00
virtual ~UPowerTooltip();
uint updateTooltip(Devices& devices);
};
} // namespace waybar::modules::upower