summaryrefslogtreecommitdiff
path: root/src/protocols/ToplevelExport.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2022-12-16 17:17:31 +0000
committerGitHub <noreply@github.com>2022-12-16 17:17:31 +0000
commit98a4fa2b0d79298fa29b048a3ba15c3bf5aed8cd (patch)
tree64e78342cf08e5f9ad87bd5f6ea36233133be7bb /src/protocols/ToplevelExport.hpp
parent7c33c7fc64203c17b4f3625a16ae6b4774992c0e (diff)
Added clang format (#1239)
* clang-format stuff and format files
Diffstat (limited to 'src/protocols/ToplevelExport.hpp')
-rw-r--r--src/protocols/ToplevelExport.hpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/protocols/ToplevelExport.hpp b/src/protocols/ToplevelExport.hpp
index eee0e97d..30c2d33f 100644
--- a/src/protocols/ToplevelExport.hpp
+++ b/src/protocols/ToplevelExport.hpp
@@ -11,60 +11,60 @@ class CMonitor;
class CWindow;
struct SToplevelClient {
- int ref = 0;
+ int ref = 0;
wl_resource* resource = nullptr;
- bool operator==(const SToplevelClient& other) {
+ bool operator==(const SToplevelClient& other) {
return resource == other.resource;
}
};
struct SToplevelFrame {
- wl_resource* resource = nullptr;
- SToplevelClient* client = nullptr;
+ wl_resource* resource = nullptr;
+ SToplevelClient* client = nullptr;
- uint32_t shmFormat = 0;
- uint32_t dmabufFormat = 0;
- wlr_box box = { 0 };
- int shmStride = 0;
+ uint32_t shmFormat = 0;
+ uint32_t dmabufFormat = 0;
+ wlr_box box = {0};
+ int shmStride = 0;
- bool overlayCursor = false;
+ bool overlayCursor = false;
- wlr_buffer_cap bufferCap = WLR_BUFFER_CAP_SHM;
+ wlr_buffer_cap bufferCap = WLR_BUFFER_CAP_SHM;
- wlr_buffer* buffer = nullptr;
+ wlr_buffer* buffer = nullptr;
- CWindow* pWindow = nullptr;
+ CWindow* pWindow = nullptr;
- bool operator==(const SToplevelFrame& other) {
+ bool operator==(const SToplevelFrame& other) {
return resource == other.resource && client == other.client;
}
};
class CToplevelExportProtocolManager {
-public:
+ public:
CToplevelExportProtocolManager();
- void bindManager(wl_client* client, void* data, uint32_t version, uint32_t id);
- void captureToplevel(wl_client* client, wl_resource* resource, uint32_t frame, int32_t overlay_cursor, CWindow* handle);
- void removeClient(SToplevelClient* client, bool force = false);
- void removeFrame(SToplevelFrame* frame, bool force = false);
- void copyFrame(wl_client* client, wl_resource* resource, wl_resource* buffer, int32_t ignore_damage);
+ void bindManager(wl_client* client, void* data, uint32_t version, uint32_t id);
+ void captureToplevel(wl_client* client, wl_resource* resource, uint32_t frame, int32_t overlay_cursor, CWindow* handle);
+ void removeClient(SToplevelClient* client, bool force = false);
+ void removeFrame(SToplevelFrame* frame, bool force = false);
+ void copyFrame(wl_client* client, wl_resource* resource, wl_resource* buffer, int32_t ignore_damage);
- void onMonitorRender(CMonitor* pMonitor);
- void displayDestroy();
- void onWindowUnmap(CWindow* pWindow);
+ void onMonitorRender(CMonitor* pMonitor);
+ void displayDestroy();
+ void onWindowUnmap(CWindow* pWindow);
-private:
- wl_global* m_pGlobal = nullptr;
- std::list<SToplevelFrame> m_lFrames;
- std::list<SToplevelClient> m_lClients;
+ private:
+ wl_global* m_pGlobal = nullptr;
+ std::list<SToplevelFrame> m_lFrames;
+ std::list<SToplevelClient> m_lClients;
- wl_listener m_liDisplayDestroy;
+ wl_listener m_liDisplayDestroy;
std::vector<SToplevelFrame*> m_vFramesAwaitingWrite;
- void shareFrame(SToplevelFrame* frame);
- bool copyFrameDmabuf(SToplevelFrame* frame);
- bool copyFrameShm(SToplevelFrame* frame, timespec* now);
+ void shareFrame(SToplevelFrame* frame);
+ bool copyFrameDmabuf(SToplevelFrame* frame);
+ bool copyFrameShm(SToplevelFrame* frame, timespec* now);
}; \ No newline at end of file