mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
rework popups completely
This commit is contained in:
50
src/helpers/SubsurfaceTree.hpp
Normal file
50
src/helpers/SubsurfaceTree.hpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "../defines.hpp"
|
||||
#include <list>
|
||||
|
||||
struct SSubsurface;
|
||||
|
||||
typedef void (*applyGlobalOffsetFn)(void *, int *, int *);
|
||||
|
||||
struct SSurfaceTreeNode {
|
||||
wlr_surface* pSurface = nullptr;
|
||||
|
||||
DYNMULTILISTENER(newSubsurface);
|
||||
DYNMULTILISTENER(commit);
|
||||
DYNMULTILISTENER(destroy);
|
||||
|
||||
SSurfaceTreeNode* pParent = nullptr;
|
||||
SSubsurface* pSubsurface = nullptr;
|
||||
|
||||
std::list<SSubsurface> childSubsurfaces;
|
||||
|
||||
applyGlobalOffsetFn offsetfn;
|
||||
void *globalOffsetData;
|
||||
|
||||
bool operator==(const SSurfaceTreeNode& rhs) {
|
||||
return pSurface == rhs.pSurface;
|
||||
}
|
||||
};
|
||||
|
||||
struct SSubsurface {
|
||||
wlr_subsurface* pSubsurface = nullptr;
|
||||
|
||||
SSurfaceTreeNode* pParent = nullptr;
|
||||
SSurfaceTreeNode* pChild = nullptr;
|
||||
|
||||
DYNMULTILISTENER(map);
|
||||
DYNMULTILISTENER(unmap);
|
||||
DYNMULTILISTENER(destroy);
|
||||
|
||||
bool operator==(const SSubsurface& rhs) {
|
||||
return pSubsurface == rhs.pSubsurface;
|
||||
}
|
||||
};
|
||||
|
||||
namespace SubsurfaceTree {
|
||||
SSurfaceTreeNode* createTreeRoot(wlr_surface*, applyGlobalOffsetFn, void*);
|
||||
void destroySurfaceTree(SSurfaceTreeNode*);
|
||||
|
||||
inline std::list<SSurfaceTreeNode> surfaceTreeNodes;
|
||||
};
|
Reference in New Issue
Block a user