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>
58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
#include "WaylandProtocol.hpp"
|
|
#include "viewporter.hpp"
|
|
#include "../helpers/signal/Signal.hpp"
|
|
|
|
class CWLSurfaceResource;
|
|
|
|
class CViewportResource {
|
|
public:
|
|
CViewportResource(SP<CWpViewport> resource_, SP<CWLSurfaceResource> surface_);
|
|
~CViewportResource();
|
|
|
|
bool good();
|
|
WP<CWLSurfaceResource> surface;
|
|
|
|
private:
|
|
SP<CWpViewport> resource;
|
|
|
|
struct {
|
|
CHyprSignalListener surfacePrecommit;
|
|
} listeners;
|
|
};
|
|
|
|
class CViewporterResource {
|
|
public:
|
|
CViewporterResource(SP<CWpViewporter> resource_);
|
|
|
|
bool good();
|
|
|
|
private:
|
|
SP<CWpViewporter> resource;
|
|
};
|
|
|
|
class CViewporterProtocol : public IWaylandProtocol {
|
|
public:
|
|
CViewporterProtocol(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(CViewporterResource* resource);
|
|
void destroyResource(CViewportResource* resource);
|
|
|
|
//
|
|
std::vector<SP<CViewporterResource>> m_vManagers;
|
|
std::vector<SP<CViewportResource>> m_vViewports;
|
|
|
|
friend class CViewporterResource;
|
|
friend class CViewportResource;
|
|
};
|
|
|
|
namespace PROTO {
|
|
inline UP<CViewporterProtocol> viewport;
|
|
};
|