2017-09-23 10:26:01 +02:00
|
|
|
#ifndef WLR_TYPES_WLR_BOX_H
|
|
|
|
#define WLR_TYPES_WLR_BOX_H
|
|
|
|
|
2017-08-29 18:08:49 +02:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
struct wlr_box {
|
|
|
|
int x, y;
|
|
|
|
int width, height;
|
|
|
|
};
|
|
|
|
|
|
|
|
void wlr_box_closest_point(struct wlr_box *box, double x, double y,
|
|
|
|
double *dest_x, double *dest_y);
|
|
|
|
|
|
|
|
bool wlr_box_intersection(struct wlr_box *box_a,
|
|
|
|
struct wlr_box *box_b, struct wlr_box **dest);
|
|
|
|
|
|
|
|
bool wlr_box_contains_point(struct wlr_box *box, double x, double y);
|
|
|
|
|
|
|
|
bool wlr_box_empty(struct wlr_box *box);
|
|
|
|
|
|
|
|
#endif
|