File: box.h

package info (click to toggle)
slurp 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: ansic: 1,377; xml: 240; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _BOX_H
#define _BOX_H

#include <stdbool.h>
#include <stdint.h>
#include <wayland-client.h>

struct slurp_box {
	int32_t x, y;
	int32_t width, height;
	char *label;
	struct wl_list link;
};

bool box_intersect(const struct slurp_box *a, const struct slurp_box *b);

bool in_box(const struct slurp_box *box, int32_t x, int32_t y);

int32_t box_size(const struct slurp_box *box);

#endif