some events

This commit is contained in:
vaxerski 2022-03-17 18:25:16 +01:00
parent a4ef84d987
commit 6e1819b3dc
5 changed files with 138 additions and 18 deletions

View file

@ -1,6 +1,8 @@
#pragma once
#include "../defines.hpp"
#include <deque>
#include "WLClasses.hpp"
struct SMonitor {
Vector2D vecPosition = Vector2D(0,0);
@ -14,4 +16,12 @@ struct SMonitor {
Vector2D vecReservedTopLeft = Vector2D(0,0);
Vector2D vecReservedBottomRight = Vector2D(0,0);
// WLR stuff
wlr_output* output = nullptr;
std::deque<SLayerSurface> m_dLayerSurfaces;
DYNLISTENER(monitorFrame);
DYNLISTENER(monitorDestroy);
};

18
src/helpers/WLClasses.hpp Normal file
View file

@ -0,0 +1,18 @@
#pragma once
#include "../events/Events.hpp"
#include "../defines.hpp"
#include "../../wlr-layer-shell-unstable-v1-protocol.h"
struct SLayerSurface {
wlr_layer_surface_v1* layerSurface;
wl_list link;
DYNLISTENER(destroyLayerSurface);
DYNLISTENER(mapLayerSurface);
DYNLISTENER(unmapLayerSurface);
DYNLISTENER(commitLayerSurface);
wlr_box geometry;
zwlr_layer_shell_v1_layer layer;
};