wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl it's the final countdown
This commit is contained in:
parent
c31d9ef417
commit
6967a31450
147 changed files with 5388 additions and 2226 deletions
55
src/protocols/Viewporter.hpp
Normal file
55
src/protocols/Viewporter.hpp
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#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();
|
||||
void verify();
|
||||
WP<CWLSurfaceResource> surface;
|
||||
|
||||
private:
|
||||
SP<CWpViewport> resource;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue