diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-02-19 18:00:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 18:00:32 -0500 |
commit | 09cfa39392bd049225b1be7590cd099131472bf2 (patch) | |
tree | dd6fcec000f0e25d15944ce0c59a762414ba8c33 /include | |
parent | 868ad5af69583646ba71d6e73e362818c7416941 (diff) | |
parent | c951000198ecdbe974a89cab4ca9e394fddf565e (diff) |
Merge pull request #632 from acrisci/output-layout-adjacent
add wlr_output_layout_adjacent_output
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_output_layout.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h index 7dd2b16a..4d10720e 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -96,4 +96,19 @@ void wlr_output_layout_add_auto(struct wlr_output_layout *layout, struct wlr_output *wlr_output_layout_get_center_output( struct wlr_output_layout *layout); +enum wlr_direction { + WLR_DIRECTION_UP = 0, + WLR_DIRECTION_DOWN = 1, + WLR_DIRECTION_LEFT = 2, + WLR_DIRECTION_RIGHT = 4, +}; + +/** + * Get the closest adjacent output to the reference output from the reference + * point in the given direction. + */ +struct wlr_output *wlr_output_layout_adjacent_output( + struct wlr_output_layout *layout, enum wlr_direction direction, + struct wlr_output *reference, double ref_x, double ref_y); + #endif |