]>
Dogcows Code - chaz/openbox/blob - geom.h
89b69b12e5e1e559bce383dcbd96802e04c69102
9 #define POINT_SET(pt, nx, ny) {pt.x = nx; pt.y = ny;}
16 #define SIZE_SET(sz, w, h) {sz.width = w; sz.height = h;}
25 #define RECT_SET_POINT(r, nx, ny) \
27 #define RECT_SET_SIZE(r, w, h) \
28 {r.width = w; r.height = h;}
29 #define RECT_SET(r, nx, ny, w, h) \
30 {r.x = nx; r.y = ny; r.width = w; r.height = h;}
32 #define RECT_EQUAL(r1, r2) (r1.x == r2.x && r1.y == r2.y && \
33 r1.width == r2.width && r1.height == r2.height)
35 typedef struct Strut
{
42 #define STRUT_SET(s, l, t, r, b) \
43 {s.left = l; s.top = t; s.right = r; s.bottom = b; }
45 #define STRUT_ADD(s1, s2) \
46 {s1.left = MAX(s1.left, s2.left); s1.right = MAX(s1.right, s2.right); \
47 s1.top = MAX(s1.top, s2.top); s1.bottom = MAX(s1.bottom, s2.bottom); }
This page took 0.037046 seconds and 3 git commands to generate.