Louvre
v2.13.0-1
C++ library for Wayland compositors
|
Request to capture an LOutput frame. More...
Public Member Functions | |
LClient * | client () const noexcept |
Client requesting to take the screenshot. More... | |
const LRect & | rect () const noexcept |
Rect within the output requested to be captured. More... | |
void | accept (bool accept) noexcept |
Respond to the screenshot request. More... | |
Protocols::ScreenCopy::RScreenCopyFrame & | resource () const noexcept |
Wayland resource associated with the screenshot request. More... | |
Request to capture an LOutput frame.
Clients using the Wlr Screencopy protocol can request to capture a specific region of an LOutput.
The LScreenshotRequest class represents a single frame wanted to be captured, and must be handled within an LOutput::paintGL() event.
This means that for screencasting, clients make a new LScreenshotRequest for each paintGL event.
If a request is accepted within a paintGL event, Louvre later copies the rendered frame to the client's buffer.
Within a paintGL event, the LOutput::screenshotRequests() vector contains the requests made for the current frame being rendered, which can be more than one if multiple clients are requesting to capture it.
xdg-desktop-portal-wlr
.
|
noexcept |
Client requesting to take the screenshot.
|
noexcept |
Rect within the output requested to be captured.
Coordinates are in surface coordinates relative to the output's position.
|
noexcept |
Respond to the screenshot request.
accept | Boolean value indicating whether to allow the capture (true ) or deny it (false ). It can be called multiple times with different responses, but only the last one before LOutput::paintGL() finishes is considered. If never called within LOutput::paintGL() , the capture is denied. |
LOutput::paintGL()
event.
|
inlinenoexcept |
Wayland resource associated with the screenshot request.