Fix compiler warnings.
[fvwm.git] / libs / fvwmrect.h
blob2966e7d91a6bffc42971a70508fd5f1722cde981
1 /* -*-c-*- */
2 /* Copyright (C) 2001 Dominik Vogt */
4 #ifndef FVWMRECT_H
5 #define FVWMRECT_H
7 /* ---------------------------- included header files ---------------------- */
9 /* ---------------------------- global definitions ------------------------- */
11 /* ---------------------------- global macros ------------------------------ */
13 /* ---------------------------- type definitions --------------------------- */
15 typedef struct
17 int x;
18 int y;
19 int width;
20 int height;
21 } rectangle;
23 typedef struct
25 int x;
26 int y;
27 } position;
29 typedef struct
31 int width;
32 int height;
33 } size_rect;
35 typedef struct
37 size_rect top_left;
38 size_rect bottom_right;
39 size_rect total_size;
40 } size_borders;
42 /* ---------------------------- exported variables (globals) --------------- */
44 /* ---------------------------- interface functions ------------------------ */
46 /* Returns 1 if the given rectangles intersect and 0 otherwise */
47 int fvwmrect_do_rectangles_intersect(rectangle *r, rectangle *s);
48 /* Subtracts the values in s2_ from the ones in s1_g and stores the result in
49 * diff_g. */
50 void fvwmrect_subtract_rectangles(
51 rectangle *rdiff, rectangle *r1, rectangle *r2);
52 /* Returns 1 is the rectangles are identical and 0 if not */
53 int fvwmrect_rectangles_equal(
54 rectangle *r1, rectangle *r2);
55 int fvwmrect_move_into_rectangle(
56 rectangle *move_rec, rectangle *target_rec);
57 int fvwmrect_intersect_xrectangles(
58 XRectangle *r1, XRectangle *r2);
60 #endif /* FVWMRECT_H */