diff options
author | Simon Ser <contact@emersion.fr> | 2023-05-03 12:32:44 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-11-23 11:03:57 +0100 |
commit | 9e702e9cfe73f5aae665b5847cf470e66714e64a (patch) | |
tree | 30050050a24db3fb9f3ed97a72ad351149bbabe4 /include/wlr | |
parent | a3d22dbe972770f84ae71f7080fb7bc676c2ba7a (diff) |
util/transform: move over wl_output_transform helpers
These aren't really tied to wlr_output.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_output.h | 15 | ||||
-rw-r--r-- | include/wlr/util/transform.h | 28 |
2 files changed, 28 insertions, 15 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 28a5ebcb..47c7672e 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -729,19 +729,4 @@ bool wlr_output_configure_primary_swapchain(struct wlr_output *output, struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output, struct wlr_output_state *state, int *buffer_age, struct wlr_render_timer *timer); - -/** - * Returns the transform that, when composed with `tr`, gives - * `WL_OUTPUT_TRANSFORM_NORMAL`. - */ -enum wl_output_transform wlr_output_transform_invert( - enum wl_output_transform tr); - -/** - * Returns a transform that, when applied, has the same effect as applying - * sequentially `tr_a` and `tr_b`. - */ -enum wl_output_transform wlr_output_transform_compose( - enum wl_output_transform tr_a, enum wl_output_transform tr_b); - #endif diff --git a/include/wlr/util/transform.h b/include/wlr/util/transform.h new file mode 100644 index 00000000..d0ec5f53 --- /dev/null +++ b/include/wlr/util/transform.h @@ -0,0 +1,28 @@ +/* + * 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 + +#ifndef WLR_UTIL_TRANSFORM_H +#define WLR_UTIL_TRANSFORM_H + +#include <wayland-server-protocol.h> + +/** + * Returns the transform that, when composed with `tr`, gives + * `WL_OUTPUT_TRANSFORM_NORMAL`. + */ +enum wl_output_transform wlr_output_transform_invert( + enum wl_output_transform tr); + +/** + * Returns a transform that, when applied, has the same effect as applying + * sequentially `tr_a` and `tr_b`. + */ +enum wl_output_transform wlr_output_transform_compose( + enum wl_output_transform tr_a, enum wl_output_transform tr_b); + +#endif |