mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
MR 3421 fix: wlr_mirror_v1 -> wlr_mirror
This commit is contained in:
parent
392dde7bed
commit
a6c38f82c4
5 changed files with 93 additions and 93 deletions
|
|
@ -6,8 +6,8 @@
|
|||
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
||||
#endif
|
||||
|
||||
#ifndef WLR_TYPES_wlr_mirror_v1_V1_H
|
||||
#define WLR_TYPES_wlr_mirror_v1_V1_H
|
||||
#ifndef WLR_TYPES_WLR_MIRROR_H
|
||||
#define WLR_TYPES_WLR_MIRROR_H
|
||||
|
||||
#include <wayland-client-protocol.h>
|
||||
#include <wayland-server-core.h>
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
* Allows mirroring: rendering some contents of one output (the src) on another
|
||||
* output (the dst). dst is fixed for the duration of the session, src may vary.
|
||||
*
|
||||
* On output_srcs precommit, wlr_mirror_v1::ready is emitted. The compositor may
|
||||
* call wlr_mirror_v1_request_ to request to render a frame on dst.
|
||||
* On output_srcs precommit, wlr_mirror::ready is emitted. The compositor may
|
||||
* call wlr_mirror_request_ to request to render a frame on dst.
|
||||
*
|
||||
* Compositor must not render on dst for the duration of the session.
|
||||
*
|
||||
|
|
@ -26,32 +26,32 @@
|
|||
*
|
||||
* Session will end:
|
||||
* disable/destroy of dst or all srcs
|
||||
* wlr_mirror_v1_request_box called with box outside of src
|
||||
* wlr_mirror_v1_destroy
|
||||
* wlr_mirror_request_box called with box outside of src
|
||||
* wlr_mirror_destroy
|
||||
*/
|
||||
|
||||
enum wlr_mirror_v1_scale {
|
||||
enum wlr_mirror_scale {
|
||||
/**
|
||||
* src will be stretched to cover dst, distorting if necessary.
|
||||
*/
|
||||
WLR_MIRROR_V1_SCALE_FULL,
|
||||
WLR_MIRROR_SCALE_FULL,
|
||||
/**
|
||||
* src will be stretched to the width or the height of dst, preserving the
|
||||
* aspect ratio.
|
||||
*/
|
||||
WLR_MIRROR_V1_SCALE_ASPECT,
|
||||
WLR_MIRROR_SCALE_ASPECT,
|
||||
/**
|
||||
* src will be rendered 1:1 at the center of dst. Content may be lost.
|
||||
*/
|
||||
WLR_MIRROR_V1_SCALE_CENTER,
|
||||
WLR_MIRROR_SCALE_CENTER,
|
||||
};
|
||||
|
||||
/**
|
||||
* Immutable over session.
|
||||
*/
|
||||
struct wlr_mirror_v1_params {
|
||||
struct wlr_mirror_params {
|
||||
|
||||
enum wlr_mirror_v1_scale scale;
|
||||
enum wlr_mirror_scale scale;
|
||||
|
||||
/**
|
||||
* Render the src cursor on dst.
|
||||
|
|
@ -59,7 +59,7 @@ struct wlr_mirror_v1_params {
|
|||
bool overlay_cursor;
|
||||
|
||||
/**
|
||||
* srcs to send wlr_mirror_v1::events::ready
|
||||
* srcs to send wlr_mirror::events::ready
|
||||
*/
|
||||
struct wl_array output_srcs;
|
||||
|
||||
|
|
@ -69,12 +69,12 @@ struct wlr_mirror_v1_params {
|
|||
struct wlr_output *output_dst;
|
||||
};
|
||||
|
||||
struct wlr_mirror_v1_state;
|
||||
struct wlr_mirror_v1 {
|
||||
struct wlr_mirror_state;
|
||||
struct wlr_mirror {
|
||||
|
||||
struct {
|
||||
/**
|
||||
* Ready to render a frame. Handler should call wlr_mirror_v1_request_
|
||||
* Ready to render a frame. Handler should call wlr_mirror_request_
|
||||
* Emitted at precommit, passes potential src.
|
||||
*/
|
||||
struct wl_signal ready;
|
||||
|
|
@ -86,7 +86,7 @@ struct wlr_mirror_v1 {
|
|||
} events;
|
||||
|
||||
// private state
|
||||
struct wlr_mirror_v1_state *state;
|
||||
struct wlr_mirror_state *state;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -94,29 +94,29 @@ struct wlr_mirror_v1 {
|
|||
*
|
||||
* Compositor must stop rendering on dst immediately after this.
|
||||
*/
|
||||
struct wlr_mirror_v1 *wlr_mirror_v1_create(struct wlr_mirror_v1_params *params);
|
||||
struct wlr_mirror *wlr_mirror_create(struct wlr_mirror_params *params);
|
||||
|
||||
/**
|
||||
* Destroy a mirror session.
|
||||
*
|
||||
* Compositor may resume rendering on dst.
|
||||
*/
|
||||
void wlr_mirror_v1_destroy(struct wlr_mirror_v1 *mirror);
|
||||
void wlr_mirror_destroy(struct wlr_mirror *mirror);
|
||||
|
||||
/**
|
||||
* Request a blank frame on dst.
|
||||
*
|
||||
* Should be invoked during the wlr_mirror_v1::events::ready handler.
|
||||
* Should be invoked during the wlr_mirror::events::ready handler.
|
||||
*/
|
||||
void wlr_mirror_v1_request_blank(struct wlr_mirror_v1 *mirror);
|
||||
void wlr_mirror_request_blank(struct wlr_mirror *mirror);
|
||||
|
||||
/**
|
||||
* Request a frame to render a box within src on dst. box is in output local
|
||||
* coordinates, with respect to its transformation.
|
||||
*
|
||||
* Should be invoked during the wlr_mirror_v1::events::ready handler.
|
||||
* Should be invoked during the wlr_mirror::events::ready handler.
|
||||
*/
|
||||
void wlr_mirror_v1_request_box(struct wlr_mirror_v1 *mirror,
|
||||
void wlr_mirror_request_box(struct wlr_mirror *mirror,
|
||||
struct wlr_output *output_src, struct wlr_box box);
|
||||
|
||||
#endif
|
||||
|
|
@ -151,7 +151,7 @@ struct wlr_output {
|
|||
// Commit sequence number. Incremented on each commit, may overflow.
|
||||
uint32_t commit_seq;
|
||||
|
||||
// dst for an active wlr_mirror_v1 session
|
||||
// dst for an active wlr_mirror session
|
||||
bool mirror_dst;
|
||||
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue