Files
Waybar/include/modules/river/layout.hpp
T

35 lines
960 B
C++
Raw Normal View History

2023-01-31 16:34:38 +11:00
#pragma once
#include <wayland-client.h>
#include "ALabel.hpp"
#include "bar.hpp"
#include "river-status-unstable-v1-client-protocol.h"
namespace waybar::modules::river {
class Layout : public waybar::ALabel {
public:
2026-02-04 09:24:14 +01:00
Layout(const std::string&, const waybar::Bar&, const Json::Value&);
2023-03-02 16:57:07 +03:00
virtual ~Layout();
2023-01-31 16:34:38 +11:00
// Handlers for wayland events
2026-02-04 09:24:14 +01:00
void handle_name(const char* name);
2023-01-31 16:34:38 +11:00
void handle_clear();
2026-02-04 09:24:14 +01:00
void handle_focused_output(struct wl_output* output);
void handle_unfocused_output(struct wl_output* output);
2023-01-31 16:34:38 +11:00
2026-02-04 09:24:14 +01:00
struct zriver_status_manager_v1* status_manager_;
struct wl_seat* seat_;
2023-01-31 16:34:38 +11:00
private:
2026-02-04 09:24:14 +01:00
const waybar::Bar& bar_;
2025-04-26 13:10:42 +02:00
std::string name_;
2026-02-04 09:24:14 +01:00
struct wl_output* output_; // stores the output this module belongs to
struct wl_output* focused_output_; // stores the currently focused output
struct zriver_output_status_v1* output_status_;
struct zriver_seat_status_v1* seat_status_;
2023-01-31 16:34:38 +11:00
};
} /* namespace waybar::modules::river */