Updated years in version info.
[reactos.git] / rosapps / dflat32 / rect.h
1 /* ----------- rect.h ------------ */
2 #ifndef RECT_H
3 #define RECT_H
4
5 typedef struct {
6 int lf,tp,rt,bt;
7 } DFRECT;
8 #define within(p,v1,v2) ((p)>=(v1)&&(p)<=(v2))
9 #define RectTop(r) (r.tp)
10 #define RectBottom(r) (r.bt)
11 #define RectLeft(r) (r.lf)
12 #define RectRight(r) (r.rt)
13 #define InsideRect(x,y,r) (within((x),RectLeft(r),RectRight(r))\
14 && \
15 within((y),RectTop(r),RectBottom(r)))
16 #define ValidRect(r) (RectRight(r) || RectLeft(r) || \
17 RectTop(r) || RectBottom(r))
18 #define RectWidth(r) (RectRight(r)-RectLeft(r)+1)
19 #define RectHeight(r) (RectBottom(r)-RectTop(r)+1)
20 DFRECT subRectangle(DFRECT, DFRECT);
21 DFRECT ClientRect(void *);
22 DFRECT RelativeWindowRect(void *, DFRECT);
23 DFRECT ClipRectangle(void *, DFRECT);
24 #endif