mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 16:25:59 +01:00
016da234d0
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
#include "WaylandProtocol.hpp"
|
|
#include "wayland-drm.hpp"
|
|
#include "types/Buffer.hpp"
|
|
#include "types/DMABuffer.hpp"
|
|
|
|
class CMesaDRMBufferResource {
|
|
public:
|
|
CMesaDRMBufferResource(uint32_t id, wl_client* client, Aquamarine::SDMABUFAttrs attrs);
|
|
~CMesaDRMBufferResource();
|
|
|
|
bool good();
|
|
|
|
private:
|
|
SP<CDMABuffer> buffer;
|
|
|
|
struct {
|
|
CHyprSignalListener bufferResourceDestroy;
|
|
} listeners;
|
|
|
|
friend class CMesaDRMResource;
|
|
};
|
|
|
|
class CMesaDRMResource {
|
|
public:
|
|
CMesaDRMResource(SP<CWlDrm> resource_);
|
|
|
|
bool good();
|
|
|
|
private:
|
|
SP<CWlDrm> resource;
|
|
};
|
|
|
|
class CMesaDRMProtocol : public IWaylandProtocol {
|
|
public:
|
|
CMesaDRMProtocol(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 destroyResource(CMesaDRMResource* resource);
|
|
void destroyResource(CMesaDRMBufferResource* resource);
|
|
|
|
//
|
|
std::vector<SP<CMesaDRMResource>> m_vManagers;
|
|
std::vector<SP<CMesaDRMBufferResource>> m_vBuffers;
|
|
|
|
std::string nodeName = "";
|
|
|
|
friend class CMesaDRMResource;
|
|
friend class CMesaDRMBufferResource;
|
|
};
|
|
|
|
namespace PROTO {
|
|
inline UP<CMesaDRMProtocol> mesaDRM;
|
|
};
|