mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-16 05:46:01 +01:00
016da234d0
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>
41 lines
No EOL
1.4 KiB
C++
41 lines
No EOL
1.4 KiB
C++
#pragma once
|
|
|
|
#include "../defines.hpp"
|
|
#include "hyprland-toplevel-export-v1-protocol.h"
|
|
#include "Screencopy.hpp"
|
|
|
|
#include <list>
|
|
#include <vector>
|
|
|
|
class CMonitor;
|
|
class CWindow;
|
|
|
|
class CToplevelExportProtocolManager {
|
|
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, PHLWINDOW handle);
|
|
void removeClient(CScreencopyClient* client, bool force = false);
|
|
void removeFrame(SScreencopyFrame* frame, bool force = false);
|
|
void copyFrame(wl_client* client, wl_resource* resource, wl_resource* buffer, int32_t ignore_damage);
|
|
void displayDestroy();
|
|
void onWindowUnmap(PHLWINDOW pWindow);
|
|
void onOutputCommit(CMonitor* pMonitor);
|
|
|
|
private:
|
|
wl_global* m_pGlobal = nullptr;
|
|
std::list<SScreencopyFrame> m_lFrames;
|
|
std::list<CScreencopyClient> m_lClients;
|
|
|
|
wl_listener m_liDisplayDestroy;
|
|
|
|
std::vector<SScreencopyFrame*> m_vFramesAwaitingWrite;
|
|
|
|
void shareFrame(SScreencopyFrame* frame);
|
|
bool copyFrameDmabuf(SScreencopyFrame* frame, timespec* now);
|
|
bool copyFrameShm(SScreencopyFrame* frame, timespec* now);
|
|
void sendDamage(SScreencopyFrame* frame);
|
|
|
|
friend class CScreencopyClient;
|
|
}; |