aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-04-15 12:25:09 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-22 22:14:29 +0200
commit455a9bd0efe9e5b10cb2e9a962b5f62b2db474b0 (patch)
tree6038efbfb6dba7c93c3b396c473ff4256bb766e1 /include/wlr
parentf81aa6a17232e8cbd06c8587e67697de42d53aa8 (diff)
output_layout: improve docs
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_output_layout.h21
1 files changed, 16 insertions, 5 deletions
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);