somebar/src/bar.hpp

23 lines
601 B
C++
Raw Normal View History

2021-10-20 20:20:27 +02:00
// somebar - dwl bar
// See LICENSE file for copyright and license details.
#pragma once
2021-10-20 20:45:23 +02:00
#include <optional>
2021-10-20 20:20:27 +02:00
#include <wayland-client.h>
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
#include "common.hpp"
#include "shm_buffer.hpp"
class Bar {
2021-10-20 20:45:23 +02:00
static const zwlr_layer_surface_v1_listener _layerSurfaceListener;
2021-10-20 20:20:27 +02:00
wl_surface *_surface {nullptr};
zwlr_layer_surface_v1 *_layerSurface {nullptr};
2021-10-20 20:45:23 +02:00
std::optional<ShmBuffer> _bufs;
void layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height);
2021-10-20 20:20:27 +02:00
public:
2021-10-20 20:45:23 +02:00
explicit Bar(const wl_output *output);
~Bar();
2021-10-20 20:20:27 +02:00
};