wayland/screencopy: add screencopy

This commit is contained in:
outfoxxed 2025-01-14 04:43:05 -08:00
parent 918dd2392d
commit cd429142a4
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
37 changed files with 3149 additions and 3 deletions

View file

@ -0,0 +1,33 @@
#pragma once
#include <qobject.h>
#include <qtclasshelpermacros.h>
#include <qtmetamacros.h>
#include "../buffer/manager.hpp"
namespace qs::wayland::screencopy {
class ScreencopyContext: public QObject {
Q_OBJECT;
public:
[[nodiscard]] buffer::WlBufferSwapchain& swapchain() { return this->mSwapchain; }
virtual void captureFrame() = 0;
signals:
void frameCaptured();
void stopped();
protected:
ScreencopyContext() = default;
buffer::WlBufferSwapchain mSwapchain;
};
class ScreencopyManager {
public:
static ScreencopyContext* createContext(QObject* object, bool paintCursors);
};
} // namespace qs::wayland::screencopy