mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 20:05:57 +01:00
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
|
#pragma once
|
||
|
|
||
|
#include <memory>
|
||
|
#include <vector>
|
||
|
#include <cstdint>
|
||
|
#include "WaylandProtocol.hpp"
|
||
|
#include "kde-server-decoration.hpp"
|
||
|
|
||
|
class CServerDecorationKDE {
|
||
|
public:
|
||
|
CServerDecorationKDE(SP<COrgKdeKwinServerDecoration> resource_, wlr_surface* surf);
|
||
|
|
||
|
bool good();
|
||
|
|
||
|
private:
|
||
|
SP<COrgKdeKwinServerDecoration> resource;
|
||
|
};
|
||
|
|
||
|
class CServerDecorationKDEProtocol : public IWaylandProtocol {
|
||
|
public:
|
||
|
CServerDecorationKDEProtocol(const wl_interface* iface, const int& ver, const std::string& name);
|
||
|
|
||
|
virtual void bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id);
|
||
|
|
||
|
private:
|
||
|
void onManagerResourceDestroy(wl_resource* res);
|
||
|
void destroyResource(CServerDecorationKDE* deco);
|
||
|
|
||
|
void createDecoration(COrgKdeKwinServerDecorationManager* pMgr, uint32_t id, wl_resource* surf);
|
||
|
|
||
|
//
|
||
|
std::vector<UP<COrgKdeKwinServerDecorationManager>> m_vManagers;
|
||
|
std::vector<UP<CServerDecorationKDE>> m_vDecos;
|
||
|
|
||
|
friend class CServerDecorationKDE;
|
||
|
};
|
||
|
|
||
|
namespace PROTO {
|
||
|
inline UP<CServerDecorationKDEProtocol> serverDecorationKDE;
|
||
|
};
|