protocols: add support for xdg-system-bell-v1
This commit is contained in:
parent
465e3d979d
commit
23ecce0e7a
5 changed files with 105 additions and 1 deletions
34
src/protocols/XDGBell.hpp
Normal file
34
src/protocols/XDGBell.hpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "WaylandProtocol.hpp"
|
||||
#include "xdg-system-bell-v1.hpp"
|
||||
|
||||
class CXDGSystemBellManagerResource {
|
||||
public:
|
||||
CXDGSystemBellManagerResource(UP<CXdgSystemBellV1>&& resource);
|
||||
|
||||
bool good();
|
||||
|
||||
private:
|
||||
UP<CXdgSystemBellV1> m_resource;
|
||||
};
|
||||
|
||||
class CXDGSystemBellProtocol : public IWaylandProtocol {
|
||||
public:
|
||||
CXDGSystemBellProtocol(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(CXDGSystemBellManagerResource* res);
|
||||
|
||||
//
|
||||
std::vector<UP<CXDGSystemBellManagerResource>> m_vManagers;
|
||||
|
||||
friend class CXDGSystemBellManagerResource;
|
||||
};
|
||||
|
||||
namespace PROTO {
|
||||
inline UP<CXDGSystemBellProtocol> xdgBell;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue