* FvwmTheme/FvwmTheme.1: Language check, general edits,
[fvwm.git] / libs / fvwmrect.h
blob0bf9a158bd3970f2db74015a1cc4470dc6f364da
1 /* Copyright (C) 2001 Dominik Vogt
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #ifndef FVWMRECT_H
19 #define FVWMRECT_H
21 /* ---------------------------- included header files ----------------------- */
23 /* ---------------------------- global definitions -------------------------- */
25 /* ---------------------------- global macros ------------------------------- */
27 /* ---------------------------- type definitions ---------------------------- */
29 typedef struct
31 int x;
32 int y;
33 int width;
34 int height;
35 } rectangle;
37 typedef struct
39 int x;
40 int y;
41 } position;
43 typedef struct
45 int width;
46 int height;
47 } size_rect;
49 typedef struct
51 size_rect top_left;
52 size_rect bottom_right;
53 size_rect total_size;
54 } size_borders;
56 /* ---------------------------- exported variables (globals) ---------------- */
58 /* ---------------------------- interface functions ------------------------- */
60 /* Returns 1 if the given rectangles intersect and 0 otherwise */
61 int fvwmrect_do_rectangles_intersect(rectangle *r, rectangle *s);
62 /* Subtracts the values in s2_ from the ones in s1_g and stores the result in
63 * diff_g. */
64 void fvwmrect_subtract_rectangles(
65 rectangle *rdiff, rectangle *r1, rectangle *r2);
66 /* Returns 1 is the rectangles are identical and 0 if not */
67 int fvwmrect_rectangles_equal(
68 rectangle *r1, rectangle *r2);
69 int fvwmrect_move_into_rectangle(
70 rectangle *move_rec, rectangle *target_rec);
71 int fvwmrect_intersect_xrectangles(
72 XRectangle *r1, XRectangle *r2);
74 #endif /* FVWMRECT_H */