internal: Protocol C++ Wraps + XDGOutput impl (#2733)
move to our own xdgoutput impl instead of wlr's
This commit is contained in:
parent
629e61c7a5
commit
8370a7fcc4
14 changed files with 284 additions and 88 deletions
31
src/protocols/XDGOutput.hpp
Normal file
31
src/protocols/XDGOutput.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include "WaylandProtocol.hpp"
|
||||
|
||||
class CMonitor;
|
||||
|
||||
struct SXDGOutput {
|
||||
CMonitor* monitor = nullptr;
|
||||
std::unique_ptr<CWaylandResource> resource;
|
||||
|
||||
wl_client* client = nullptr;
|
||||
bool isXWayland = false;
|
||||
};
|
||||
|
||||
class CXDGOutputProtocol : public IWaylandProtocol {
|
||||
public:
|
||||
CXDGOutputProtocol(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);
|
||||
|
||||
void onManagerResourceDestroy(wl_resource* res);
|
||||
void onOutputResourceDestroy(wl_resource* res);
|
||||
void onManagerGetXDGOutput(wl_client* client, wl_resource* resource, uint32_t id, wl_resource* outputResource);
|
||||
|
||||
private:
|
||||
void updateOutputDetails(SXDGOutput* pOutput);
|
||||
void updateAllOutputs();
|
||||
|
||||
std::vector<std::unique_ptr<CWaylandResource>> m_vManagerResources;
|
||||
std::vector<std::unique_ptr<SXDGOutput>> m_vXDGOutputs;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue