2022-03-17 18:25:16 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../events/Events.hpp"
|
|
|
|
#include "../defines.hpp"
|
|
|
|
#include "../../wlr-layer-shell-unstable-v1-protocol.h"
|
2022-03-20 14:00:46 +01:00
|
|
|
#include "../Window.hpp"
|
2022-03-17 18:25:16 +01:00
|
|
|
|
|
|
|
struct SLayerSurface {
|
|
|
|
wlr_layer_surface_v1* layerSurface;
|
|
|
|
wl_list link;
|
|
|
|
|
|
|
|
DYNLISTENER(destroyLayerSurface);
|
|
|
|
DYNLISTENER(mapLayerSurface);
|
|
|
|
DYNLISTENER(unmapLayerSurface);
|
|
|
|
DYNLISTENER(commitLayerSurface);
|
2022-03-20 12:11:57 +01:00
|
|
|
DYNLISTENER(newPopup);
|
2022-03-21 16:13:43 +01:00
|
|
|
DYNLISTENER(newSubsurface);
|
2022-03-17 18:25:16 +01:00
|
|
|
|
|
|
|
wlr_box geometry;
|
|
|
|
zwlr_layer_shell_v1_layer layer;
|
2022-03-18 22:35:51 +01:00
|
|
|
|
|
|
|
int monitorID = -1;
|
|
|
|
|
|
|
|
|
|
|
|
// For the list lookup
|
|
|
|
bool operator==(const SLayerSurface& rhs) {
|
|
|
|
return layerSurface == rhs.layerSurface && monitorID == rhs.monitorID;
|
|
|
|
}
|
2022-03-17 20:22:29 +01:00
|
|
|
};
|
|
|
|
|
2022-03-21 16:13:43 +01:00
|
|
|
struct SSubsurface {
|
|
|
|
wlr_subsurface* subsurface = nullptr;
|
|
|
|
SLayerSurface* pParentSurface = nullptr;
|
|
|
|
|
|
|
|
DYNLISTENER(mapSubsurface);
|
|
|
|
DYNLISTENER(unmapSubsurface);
|
|
|
|
DYNLISTENER(destroySubsurface);
|
|
|
|
DYNLISTENER(commitSubsurface);
|
|
|
|
DYNLISTENER(newSubsurface);
|
|
|
|
|
|
|
|
// For the list lookup
|
|
|
|
bool operator==(const SSubsurface& rhs) {
|
|
|
|
return subsurface == rhs.subsurface && pParentSurface == rhs.pParentSurface;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-03-17 20:22:29 +01:00
|
|
|
struct SRenderData {
|
|
|
|
wlr_output* output;
|
|
|
|
timespec* when;
|
2022-03-21 16:13:43 +01:00
|
|
|
int x, y;
|
|
|
|
|
|
|
|
// for iters
|
|
|
|
void* data = nullptr;
|
|
|
|
wlr_surface* surface = nullptr;
|
|
|
|
int w, h;
|
2022-03-17 20:22:29 +01:00
|
|
|
};
|
2022-03-17 20:55:04 +01:00
|
|
|
|
|
|
|
struct SKeyboard {
|
|
|
|
wlr_input_device* keyboard;
|
|
|
|
|
|
|
|
DYNLISTENER(keyboardMod);
|
|
|
|
DYNLISTENER(keyboardKey);
|
|
|
|
DYNLISTENER(keyboardDestroy);
|
2022-03-18 23:25:26 +01:00
|
|
|
|
|
|
|
// For the list lookup
|
|
|
|
bool operator==(const SKeyboard& rhs) {
|
|
|
|
return keyboard == rhs.keyboard;
|
|
|
|
}
|
2022-03-20 12:11:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SLayerPopup {
|
|
|
|
wlr_xdg_popup* popup = nullptr;
|
|
|
|
SLayerSurface* parentSurface = nullptr;
|
|
|
|
wlr_xdg_popup* parentPopup = nullptr;
|
|
|
|
|
|
|
|
DYNLISTENER(mapPopup);
|
|
|
|
DYNLISTENER(destroyPopup);
|
|
|
|
DYNLISTENER(unmapPopup);
|
|
|
|
DYNLISTENER(commitPopup);
|
|
|
|
DYNLISTENER(newPopupFromPopup);
|
|
|
|
|
|
|
|
// For the list lookup
|
|
|
|
bool operator==(const SLayerPopup& rhs) {
|
|
|
|
return popup == rhs.popup;
|
|
|
|
}
|
2022-03-20 14:00:46 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SXDGPopup {
|
|
|
|
CWindow* parentWindow = nullptr;
|
|
|
|
wlr_xdg_popup* parentPopup = nullptr;
|
|
|
|
wlr_xdg_popup* popup = nullptr;
|
|
|
|
|
|
|
|
DYNLISTENER(newPopupFromPopupXDG);
|
|
|
|
DYNLISTENER(destroyPopupXDG);
|
|
|
|
DYNLISTENER(mapPopupXDG);
|
|
|
|
DYNLISTENER(unmapPopupXDG);
|
|
|
|
|
|
|
|
// For the list lookup
|
|
|
|
bool operator==(const SXDGPopup& rhs) {
|
|
|
|
return popup == rhs.popup;
|
|
|
|
}
|
2022-03-22 18:29:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SSeat {
|
|
|
|
wlr_seat* seat = nullptr;
|
|
|
|
wl_client* exclusiveClient = nullptr;
|
2022-03-17 20:55:04 +01:00
|
|
|
};
|