2018-07-13 14:40:56 +02:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
2018-06-19 20:07:29 +02:00
|
|
|
#ifndef WLR_TYPES_WLR_SCREENCOPY_V1_H
|
|
|
|
#define WLR_TYPES_WLR_SCREENCOPY_V1_H
|
|
|
|
|
2018-09-17 15:07:08 +02:00
|
|
|
#include <stdbool.h>
|
2019-07-27 10:53:54 +02:00
|
|
|
#include <wayland-server-core.h>
|
2022-10-01 20:49:30 +02:00
|
|
|
#include <wlr/types/wlr_buffer.h>
|
2021-07-01 22:36:01 +02:00
|
|
|
#include <wlr/util/box.h>
|
2018-06-19 20:07:29 +02:00
|
|
|
|
|
|
|
struct wlr_screencopy_manager_v1 {
|
|
|
|
struct wl_global *global;
|
2022-05-24 18:46:59 +02:00
|
|
|
struct wl_list frames; // wlr_screencopy_frame_v1.link
|
2018-06-19 20:07:29 +02:00
|
|
|
|
|
|
|
struct wl_listener display_destroy;
|
|
|
|
|
2018-08-26 23:23:12 +02:00
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
|
|
|
} events;
|
|
|
|
|
2018-06-19 20:07:29 +02:00
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2019-10-19 16:46:43 +02:00
|
|
|
struct wlr_screencopy_v1_client {
|
|
|
|
int ref;
|
|
|
|
struct wlr_screencopy_manager_v1 *manager;
|
|
|
|
struct wl_list damages;
|
|
|
|
};
|
|
|
|
|
2018-06-19 20:07:29 +02:00
|
|
|
struct wlr_screencopy_frame_v1 {
|
|
|
|
struct wl_resource *resource;
|
2019-10-19 16:46:43 +02:00
|
|
|
struct wlr_screencopy_v1_client *client;
|
2022-05-24 18:46:59 +02:00
|
|
|
struct wl_list link; // wlr_screencopy_manager_v1.frames
|
2018-06-19 20:07:29 +02:00
|
|
|
|
2022-09-21 10:11:35 +02:00
|
|
|
uint32_t shm_format, dmabuf_format; // DRM format codes
|
2018-06-23 19:41:40 +02:00
|
|
|
struct wlr_box box;
|
2022-09-21 10:12:59 +02:00
|
|
|
int shm_stride;
|
2018-06-19 20:07:29 +02:00
|
|
|
|
2018-09-17 15:07:08 +02:00
|
|
|
bool overlay_cursor, cursor_locked;
|
|
|
|
|
2019-10-19 16:46:43 +02:00
|
|
|
bool with_damage;
|
|
|
|
|
2022-09-21 10:34:04 +02:00
|
|
|
enum wlr_buffer_cap buffer_cap;
|
|
|
|
struct wlr_buffer *buffer;
|
2018-06-19 20:07:29 +02:00
|
|
|
|
|
|
|
struct wlr_output *output;
|
2020-11-04 16:03:54 +01:00
|
|
|
struct wl_listener output_commit;
|
2019-07-28 01:31:37 +02:00
|
|
|
struct wl_listener output_destroy;
|
|
|
|
struct wl_listener output_enable;
|
2018-06-19 20:07:29 +02:00
|
|
|
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_screencopy_manager_v1 *wlr_screencopy_manager_v1_create(
|
|
|
|
struct wl_display *display);
|
|
|
|
|
|
|
|
#endif
|