add bar class

This commit is contained in:
Raphael Robatsch 2021-10-20 20:45:23 +02:00
commit be9f2f9903
5 changed files with 59 additions and 44 deletions

View file

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