mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
ext-image-copy-capture-v1: new protocol implementation
Co-authored-by: Andri Yngvason <andri@yngvason.is>
This commit is contained in:
parent
6712e774d4
commit
4e4155ccbe
4 changed files with 650 additions and 0 deletions
57
include/wlr/types/wlr_ext_image_copy_capture_v1.h
Normal file
57
include/wlr/types/wlr_ext_image_copy_capture_v1.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* This an unstable interface of wlroots. No guarantees are made regarding the
|
||||
* future consistency of this API.
|
||||
*/
|
||||
#ifndef WLR_USE_UNSTABLE
|
||||
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
||||
#endif
|
||||
|
||||
#ifndef WLR_TYPES_WLR_EXT_IMAGE_COPY_CAPTURE_V1_H
|
||||
#define WLR_TYPES_WLR_EXT_IMAGE_COPY_CAPTURE_V1_H
|
||||
|
||||
#include <wayland-server.h>
|
||||
#include <time.h>
|
||||
#include "ext-image-copy-capture-v1-protocol.h"
|
||||
|
||||
struct wlr_ext_image_copy_capture_manager_v1 {
|
||||
struct wl_global *global;
|
||||
|
||||
struct {
|
||||
struct wl_listener display_destroy;
|
||||
} WLR_PRIVATE;
|
||||
};
|
||||
|
||||
struct wlr_ext_image_copy_capture_frame_v1 {
|
||||
struct wl_resource *resource;
|
||||
bool capturing;
|
||||
struct wlr_buffer *buffer;
|
||||
pixman_region32_t buffer_damage;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
struct {
|
||||
struct wlr_ext_image_copy_capture_session_v1 *session;
|
||||
} WLR_PRIVATE;
|
||||
};
|
||||
|
||||
struct wlr_ext_image_copy_capture_manager_v1 *wlr_ext_image_copy_capture_manager_v1_create(
|
||||
struct wl_display *display, uint32_t version);
|
||||
|
||||
/**
|
||||
* Notify the client that the frame is ready.
|
||||
*
|
||||
* This function destroys the frame.
|
||||
*/
|
||||
void wlr_ext_image_copy_capture_frame_v1_ready(struct wlr_ext_image_copy_capture_frame_v1 *frame,
|
||||
enum wl_output_transform transform, const struct timespec *presentation_time);
|
||||
/**
|
||||
* Notify the client that the frame has failed.
|
||||
*
|
||||
* This function destroys the frame.
|
||||
*/
|
||||
void wlr_ext_image_copy_capture_frame_v1_fail(struct wlr_ext_image_copy_capture_frame_v1 *frame,
|
||||
enum ext_image_copy_capture_frame_v1_failure_reason reason);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue