Waybar/include/modules/dwl/window.hpp

39 lines
854 B
C++
Raw Permalink Normal View History

2024-03-14 20:07:45 +00:00
#pragma once
#include <fmt/format.h>
#include <string>
#include "AAppIconLabel.hpp"
#include "bar.hpp"
#include "dwl-ipc-unstable-v2-client-protocol.h"
2024-03-22 22:21:57 +00:00
#include "util/json.hpp"
2024-03-14 20:07:45 +00:00
namespace waybar::modules::dwl {
class Window : public AAppIconLabel, public sigc::trackable {
public:
2024-03-22 22:21:57 +00:00
Window(const std::string &, const waybar::Bar &, const Json::Value &);
2024-03-14 20:07:45 +00:00
virtual ~Window() = default;
void handle_layout(const uint32_t layout);
void handle_title(const char *title);
void handle_appid(const char *ppid);
void handle_layout_symbol(const char *layout_symbol);
void handle_frame();
struct zdwl_ipc_manager_v2 *status_manager_;
2024-03-22 22:21:57 +00:00
2024-03-14 20:07:45 +00:00
private:
2024-03-22 22:21:57 +00:00
const Bar &bar_;
2024-03-14 20:07:45 +00:00
std::string title_;
std::string appid_;
std::string layout_symbol_;
uint32_t layout_;
struct zdwl_ipc_output_v2 *output_status_;
};
} // namespace waybar::modules::dwl