protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709)
Implements the new screencopy protocols
This commit is contained in:
parent
93dbf88426
commit
b4ee4674f9
37 changed files with 2585 additions and 1078 deletions
|
|
@ -60,10 +60,34 @@ class CPointerManager {
|
|||
|
||||
//
|
||||
Vector2D position();
|
||||
Vector2D hotspot();
|
||||
Vector2D cursorSizeLogical();
|
||||
|
||||
void recheckEnteredOutputs();
|
||||
|
||||
// returns the thing in global coords
|
||||
CBox getCursorBoxGlobal();
|
||||
|
||||
struct SCursorImage {
|
||||
SP<Aquamarine::IBuffer> pBuffer;
|
||||
SP<CTexture> bufferTex;
|
||||
WP<Desktop::View::CWLSurface> surface;
|
||||
|
||||
Vector2D hotspot;
|
||||
Vector2D size;
|
||||
float scale = 1.F;
|
||||
|
||||
CHyprSignalListener destroySurface;
|
||||
CHyprSignalListener commitSurface;
|
||||
};
|
||||
|
||||
const SCursorImage& currentCursorImage();
|
||||
SP<CTexture> getCurrentCursorTexture();
|
||||
|
||||
struct {
|
||||
CSignalT<> cursorChanged;
|
||||
} m_events;
|
||||
|
||||
private:
|
||||
void recheckPointerPosition();
|
||||
void onMonitorLayoutChange();
|
||||
|
|
@ -79,13 +103,9 @@ class CPointerManager {
|
|||
// returns the thing in device coordinates. Is NOT offset by the hotspot, relies on set_cursor with hotspot.
|
||||
Vector2D getCursorPosForMonitor(PHLMONITOR pMonitor);
|
||||
// returns the thing in logical coordinates of the monitor
|
||||
CBox getCursorBoxLogicalForMonitor(PHLMONITOR pMonitor);
|
||||
// returns the thing in global coords
|
||||
CBox getCursorBoxGlobal();
|
||||
CBox getCursorBoxLogicalForMonitor(PHLMONITOR pMonitor);
|
||||
|
||||
Vector2D transformedHotspot(PHLMONITOR pMonitor);
|
||||
|
||||
SP<CTexture> getCurrentCursorTexture();
|
||||
Vector2D transformedHotspot(PHLMONITOR pMonitor);
|
||||
|
||||
struct SPointerListener {
|
||||
CHyprSignalListener destroy;
|
||||
|
|
@ -137,20 +157,9 @@ class CPointerManager {
|
|||
std::vector<CBox> monitorBoxes;
|
||||
} m_currentMonitorLayout;
|
||||
|
||||
struct {
|
||||
SP<Aquamarine::IBuffer> pBuffer;
|
||||
SP<CTexture> bufferTex;
|
||||
WP<Desktop::View::CWLSurface> surface;
|
||||
SCursorImage m_currentCursorImage; // TODO: support various sizes per-output so we can have pixel-perfect cursors
|
||||
|
||||
Vector2D hotspot;
|
||||
Vector2D size;
|
||||
float scale = 1.F;
|
||||
|
||||
CHyprSignalListener destroySurface;
|
||||
CHyprSignalListener commitSurface;
|
||||
} m_currentCursorImage; // TODO: support various sizes per-output so we can have pixel-perfect cursors
|
||||
|
||||
Vector2D m_pointerPos = {0, 0};
|
||||
Vector2D m_pointerPos = {0, 0};
|
||||
|
||||
struct SMonitorPointerState {
|
||||
SMonitorPointerState(const PHLMONITOR& m) : monitor(m) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue