forked from Alexays/Waybar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GTK4. Migration. backlight, slider, backend_common
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
- Loading branch information
1 parent
0721fd5
commit 69648ab
Showing
14 changed files
with
59 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,22 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include <optional> | ||
#include <string> | ||
#include <string_view> | ||
#include <vector> | ||
|
||
#include "ALabel.hpp" | ||
#include "util/backlight_backend.hpp" | ||
#include "util/json.hpp" | ||
|
||
struct udev; | ||
struct udev_device; | ||
|
||
namespace waybar::modules { | ||
|
||
class Backlight : public ALabel { | ||
class Backlight final : public ALabel { | ||
public: | ||
Backlight(const std::string &, const Json::Value &); | ||
virtual ~Backlight() = default; | ||
auto update() -> void override; | ||
|
||
bool handleScroll(GdkEventScroll *e) override; | ||
|
||
private: | ||
const std::string preferred_device_; | ||
|
||
std::string previous_format_; | ||
|
||
util::BacklightBackend backend; | ||
|
||
bool handleScroll(double dx, double dy) override; | ||
}; | ||
|
||
} // namespace waybar::modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#pragma once | ||
|
||
#include "AModule.hpp" | ||
|
||
namespace waybar::util { | ||
|
||
const static auto NOOP = []() {}; | ||
enum class ChangeType : char { Increase, Decrease }; | ||
|
||
} // namespace waybar::util | ||
} // namespace waybar::util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.