annotate wlr-output-layout coord variables

This commit is contained in:
Tony Crisci 2018-04-01 00:17:27 -04:00
parent 0c7968d093
commit 5a47da1ea6
2 changed files with 44 additions and 43 deletions

View file

@ -40,41 +40,42 @@ struct wlr_output_layout_output *wlr_output_layout_get(
struct wlr_output_layout *layout, struct wlr_output *reference);
struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout,
double x, double y);
double lx, double ly);
void wlr_output_layout_add(struct wlr_output_layout *layout,
struct wlr_output *output, int x, int y);
struct wlr_output *output, int lx, int ly);
void wlr_output_layout_move(struct wlr_output_layout *layout,
struct wlr_output *output, int x, int y);
struct wlr_output *output, int lx, int ly);
void wlr_output_layout_remove(struct wlr_output_layout *layout,
struct wlr_output *output);
/**
* Given x and y as pointers to global coordinates, adjusts them to local output
* Given x and y in layout coordinates, adjusts them to local output
* coordinates relative to the given reference output.
*/
void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
struct wlr_output *reference, double *x, double *y);
struct wlr_output *reference, double *lx, double *ly);
bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
struct wlr_output *reference, int x, int y);
struct wlr_output *reference, int lx, int ly);
bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
struct wlr_output *reference, const struct wlr_box *target_box);
struct wlr_output *reference, const struct wlr_box *target_lbox);
/**
* Get the closest point on this layout from the given point from the reference
* output. If reference is NULL, gets the closest point from the entire layout.
*/
void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
struct wlr_output *reference, double x, double y, double *dest_x,
double *dest_y);
struct wlr_output *reference, double lx, double ly, double *dest_lx,
double *dest_ly);
/**
* Get the box of the layout for the given reference output. If `reference`
* is NULL, the box will be for the extents of the entire layout.
* Get the box of the layout for the given reference output in layout
* coordinates. If `reference` is NULL, the box will be for the extents of the
* entire layout.
*/
struct wlr_box *wlr_output_layout_get_box(
struct wlr_output_layout *layout, struct wlr_output *reference);
@ -109,6 +110,6 @@ enum wlr_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);
struct wlr_output *reference, double ref_lx, double ref_ly);
#endif