parent
d975f35bba
commit
e192d87731
@ -1,42 +1,7 @@
|
||||
/*
|
||||
* 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_TYPES_WLR_BOX_H
|
||||
#define WLR_TYPES_WLR_BOX_H
|
||||
|
||||
#include <pixman.h>
|
||||
#include <stdbool.h>
|
||||
#include <wayland-server-protocol.h>
|
||||
|
||||
struct wlr_box {
|
||||
int x, y;
|
||||
int width, height;
|
||||
};
|
||||
|
||||
struct wlr_fbox {
|
||||
double x, y;
|
||||
double width, height;
|
||||
};
|
||||
|
||||
void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
|
||||
double *dest_x, double *dest_y);
|
||||
|
||||
bool wlr_box_intersection(struct wlr_box *dest, const struct wlr_box *box_a,
|
||||
const struct wlr_box *box_b);
|
||||
|
||||
bool wlr_box_contains_point(const struct wlr_box *box, double x, double y);
|
||||
|
||||
bool wlr_box_empty(const struct wlr_box *box);
|
||||
|
||||
/**
|
||||
* Transforms a box inside a `width` x `height` box.
|
||||
*/
|
||||
void wlr_box_transform(struct wlr_box *dest, const struct wlr_box *box,
|
||||
enum wl_output_transform transform, int width, int height);
|
||||
#warning "wlr_box has been moved to wlr/util/box.h"
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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_TYPES_WLR_BOX_H
|
||||
#define WLR_TYPES_WLR_BOX_H
|
||||
|
||||
#include <pixman.h>
|
||||
#include <stdbool.h>
|
||||
#include <wayland-server-protocol.h>
|
||||
|
||||
struct wlr_box {
|
||||
int x, y;
|
||||
int width, height;
|
||||
};
|
||||
|
||||
struct wlr_fbox {
|
||||
double x, y;
|
||||
double width, height;
|
||||
};
|
||||
|
||||
void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
|
||||
double *dest_x, double *dest_y);
|
||||
|
||||
bool wlr_box_intersection(struct wlr_box *dest, const struct wlr_box *box_a,
|
||||
const struct wlr_box *box_b);
|
||||
|
||||
bool wlr_box_contains_point(const struct wlr_box *box, double x, double y);
|
||||
|
||||
bool wlr_box_empty(const struct wlr_box *box);
|
||||
|
||||
/**
|
||||
* Transforms a box inside a `width` x `height` box.
|
||||
*/
|
||||
void wlr_box_transform(struct wlr_box *dest, const struct wlr_box *box,
|
||||
enum wl_output_transform transform, int width, int height);
|
||||
|
||||
#endif
|
Loading…
Reference in new issue