File: Rectangles.h

package info (click to toggle)
fvwm3 1.0.6a%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,408 kB
  • sloc: ansic: 141,349; perl: 4,891; sh: 4,568; makefile: 785; yacc: 688; lex: 187; sed: 11
file content (42 lines) | stat: -rw-r--r-- 1,400 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* -*-c-*- */

/*
 *  Convinence functions for manipulating rectangles, segments, regions ...etc.
 */

#ifndef FVWMLIB_RECTANGLES_H
#define FVWMLIB_RECTANGLES_H

/* ---------------------------- included header files ---------------------- */
#include "fvwm_x11.h"

/* ---------------------------- global definitions ------------------------- */

/* ---------------------------- global macros ------------------------------ */

/* ---------------------------- type definitions --------------------------- */

/* ---------------------------- forward declarations ----------------------- */

/* ---------------------------- exported variables (globals) --------------- */

/* ---------------------------- interface functions ------------------------ */

/* If the two rectangles [x1, y1, w1, h2] and [x2, x2, w2, h2] have a
 * non emtpy interstection this function return True and the
 * XRectangle *r is set to the intersection (if not NULL). If the two
 * rectangles have an emty intersection False is returned and r is not
 * modified.  */
Bool frect_get_intersection(
	int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2,
	XRectangle *r);

/* as above but the input are XRectangles */
Bool frect_get_rect_intersection(
	XRectangle a, XRectangle b, XRectangle *r);

/* as above for two segments */
Bool frect_get_seg_intersection(
	int x1, int w1, int x2, int w2, int *x, int *w);

#endif