Waybar/include/modules/backlight.hpp

33 lines
620 B
C++
Raw Normal View History

#pragma once
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
2022-11-24 11:28:52 +00:00
#include "ALabel.hpp"
#include "util/backlight_backend.hpp"
#include "util/json.hpp"
struct udev;
struct udev_device;
namespace waybar::modules {
2022-11-24 11:28:52 +00:00
class Backlight : public ALabel {
2019-04-18 15:52:00 +00:00
public:
Backlight(const std::string &, const Json::Value &);
virtual ~Backlight() = default;
2023-03-02 13:57:07 +00:00
auto update() -> void override;
2023-03-02 13:57:07 +00:00
bool handleScroll(GdkEventScroll *e) override;
2022-04-06 06:37:19 +00:00
const std::string preferred_device_;
2022-04-06 06:37:19 +00:00
std::string previous_format_;
util::BacklightBackend backend;
};
2019-04-18 15:52:00 +00:00
} // namespace waybar::modules