Waybar/include/bar.hpp

30 lines
705 B
C++
Raw Normal View History

2018-08-08 21:54:58 +00:00
#pragma once
#include <gtkmm.h>
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
namespace waybar {
struct Client;
struct Bar {
Bar(Client& client, std::unique_ptr<struct wl_output *>&& output);
Bar(const Bar&) = delete;
Client& client;
Gtk::Window window;
struct wl_surface *surface;
2018-08-09 08:50:16 +00:00
struct zwlr_layer_surface_v1 *layerSurface;
2018-08-08 21:54:58 +00:00
std::unique_ptr<struct wl_output *> output;
bool visible = true;
2018-08-09 08:50:16 +00:00
auto setWidth(int) -> void;
2018-08-08 21:54:58 +00:00
auto toggle() -> void;
private:
2018-08-09 08:50:16 +00:00
auto _setupWidgets() -> void;
auto _setupCss() -> void;
int _width = 10;
Glib::RefPtr<Gtk::StyleContext> _styleContext;
Glib::RefPtr<Gtk::CssProvider> _cssProvider;
2018-08-08 21:54:58 +00:00
};
}