mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
screencopy-v1: add basic implementation
This commit is contained in:
parent
02dfa9101e
commit
73755ad348
9 changed files with 655 additions and 1 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include <wlr/types/wlr_list.h>
|
||||
#include <wlr/types/wlr_idle.h>
|
||||
#include <wlr/types/wlr_idle_inhibit_v1.h>
|
||||
#include <wlr/types/wlr_screencopy_v1.h>
|
||||
#include "rootston/view.h"
|
||||
#include "rootston/config.h"
|
||||
#include "rootston/output.h"
|
||||
|
|
@ -54,6 +55,7 @@ struct roots_desktop {
|
|||
struct wlr_linux_dmabuf *linux_dmabuf;
|
||||
struct wlr_layer_shell *layer_shell;
|
||||
struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard;
|
||||
struct wlr_screencopy_manager_v1 *screencopy;
|
||||
|
||||
struct wl_listener new_output;
|
||||
struct wl_listener layout_change;
|
||||
|
|
|
|||
36
include/wlr/types/wlr_screencopy_v1.h
Normal file
36
include/wlr/types/wlr_screencopy_v1.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef WLR_TYPES_WLR_SCREENCOPY_V1_H
|
||||
#define WLR_TYPES_WLR_SCREENCOPY_V1_H
|
||||
|
||||
#include <wayland-server.h>
|
||||
|
||||
struct wlr_screencopy_manager_v1 {
|
||||
struct wl_global *global;
|
||||
struct wl_list resources; // wl_resource
|
||||
struct wl_list frames; // wlr_screencopy_frame_v1::link
|
||||
|
||||
struct wl_listener display_destroy;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_screencopy_frame_v1 {
|
||||
struct wl_resource *resource;
|
||||
struct wlr_screencopy_manager_v1 *manager;
|
||||
struct wl_list link;
|
||||
|
||||
int32_t width, height;
|
||||
|
||||
struct wl_shm_buffer *buffer;
|
||||
|
||||
struct wlr_output *output;
|
||||
struct wl_listener output_swap_buffers;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_screencopy_manager_v1 *wlr_screencopy_manager_v1_create(
|
||||
struct wl_display *display);
|
||||
void wlr_screencopy_manager_v1_destroy(
|
||||
struct wlr_screencopy_manager_v1 *screencopy);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue