mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
d25278f710
In file included from src/modules/upower/upower.cpp:1: include/modules/upower/upower.hpp:25:16: error: no template named 'unordered_map' in namespace 'std' typedef std::unordered_map<std::string, UpDevice *> Devices; ~~~~~^ In file included from src/modules/upower/upower_tooltip.cpp:1: include/modules/upower/upower_tooltip.hpp:13:16: error: no template named 'unordered_map' in namespace 'std' typedef std::unordered_map<std::string, UpDevice*> Devices; ~~~~~^
33 lines
637 B
C++
33 lines
637 B
C++
#pragma once
|
|
|
|
#include <libupower-glib/upower.h>
|
|
|
|
#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);
|
|
|
|
Gtk::Box* contentBox;
|
|
|
|
uint iconSize;
|
|
uint tooltipSpacing;
|
|
uint tooltipPadding;
|
|
|
|
public:
|
|
UPowerTooltip(uint iconSize, uint tooltipSpacing, uint tooltipPadding);
|
|
~UPowerTooltip();
|
|
|
|
uint updateTooltip(Devices& devices);
|
|
};
|
|
|
|
} // namespace waybar::modules::upower
|