From 455a9bd0efe9e5b10cb2e9a962b5f62b2db474b0 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 15 Apr 2020 12:25:09 +0200 Subject: output_layout: improve docs --- include/wlr/types/wlr_output_layout.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h index 77e560c6..cdbc446f 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -16,6 +16,14 @@ struct wlr_output_layout_state; +/** + * Helper to arrange outputs in a 2D coordinate space. The output effective + * resolution is used, see wlr_output_effective_resolution. + * + * Outputs added to the output layout are automatically exposed to clients (see + * wlr_output_create_global). They are no longer exposed when removed from the + * layout. + */ struct wlr_output_layout { struct wl_list outputs; struct wlr_output_layout_state *state; @@ -42,11 +50,6 @@ struct wlr_output_layout_output { } events; }; -/** - * Creates a wlr_output_layout, which can be used to describing outputs in - * physical space relative to one another, and perform various useful operations - * on that state. - */ struct wlr_output_layout *wlr_output_layout_create(void); void wlr_output_layout_destroy(struct wlr_output_layout *layout); @@ -54,9 +57,17 @@ void wlr_output_layout_destroy(struct wlr_output_layout *layout); struct wlr_output_layout_output *wlr_output_layout_get( struct wlr_output_layout *layout, struct wlr_output *reference); +/** + * Get the output at the specified layout coordinates. Returns NULL if no + * output matches the coordinates. + */ struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout, double lx, double ly); +/** + * Add the output to the layout at the specified coordinates. If the output is + * already part of the output layout, this moves the output. + */ void wlr_output_layout_add(struct wlr_output_layout *layout, struct wlr_output *output, int lx, int ly); -- cgit v1.2.3