2017-08-25 19:26:13 +02:00
|
|
|
#ifndef _WLR_TYPES_GEOMETRY_H
|
|
|
|
#define _WLR_TYPES_GEOMETRY_H
|
2017-08-26 17:55:24 +02:00
|
|
|
#include <stdbool.h>
|
2017-08-25 19:26:13 +02:00
|
|
|
|
|
|
|
struct wlr_geometry {
|
|
|
|
int x, y;
|
|
|
|
int width, height;
|
|
|
|
};
|
|
|
|
|
|
|
|
void wlr_geometry_closest_boundary(struct wlr_geometry *geo, double x, double y,
|
|
|
|
int *dest_x, int *dest_y, double *distance);
|
|
|
|
|
2017-08-26 17:55:24 +02:00
|
|
|
bool wlr_geometry_intersection(struct wlr_geometry *geo_a,
|
|
|
|
struct wlr_geometry *geo_b, struct wlr_geometry **dest);
|
|
|
|
|
|
|
|
bool wlr_geometry_contains_point(struct wlr_geometry *geo, int x, int y);
|
|
|
|
|
2017-08-27 23:35:12 +02:00
|
|
|
bool wlr_geometry_empty(struct wlr_geometry *geo);
|
|
|
|
|
2017-08-25 19:26:13 +02:00
|
|
|
#endif
|