forked from quickshell/quickshell
wayland/screencopy: add screencopy
This commit is contained in:
parent
918dd2392d
commit
cd429142a4
37 changed files with 3149 additions and 3 deletions
33
src/wayland/screencopy/manager.hpp
Normal file
33
src/wayland/screencopy/manager.hpp
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue