3 * \brief Header: rectangular class
6 #ifndef MC__WIDGET_RECT_H
7 #define MC__WIDGET_RECT_H
9 /*** typedefs (not structures) and defined constants *********************************************/
11 #define RECT(x) ((WRect *)(x))
12 #define CONST_RECT(x) ((const WRect *)(x))
14 /*** enums ***************************************************************************************/
16 /*** structures declarations (and typedefs of structures) ****************************************/
19 typedef struct WRect WRect
;
29 /*** global variables defined in .c file *********************************************************/
31 /*** declarations of public functions ************************************************************/
33 WRect
*rect_new (int y
, int x
, int lines
, int cols
);
34 void rect_init (WRect
* r
, int y
, int x
, int lines
, int cols
);
35 void rect_move (WRect
* r
, int dy
, int dx
);
36 void rect_resize (WRect
* r
, int dl
, int dc
);
37 void rect_grow (WRect
* r
, int dl
, int dc
);
38 void rect_intersect (WRect
* r
, const WRect
* r1
);
39 void rect_union (WRect
* r
, const WRect
* r1
);
40 gboolean
rects_are_overlapped (const WRect
* r1
, const WRect
* r2
);
41 gboolean
rects_are_equal (const WRect
* r1
, const WRect
* r2
);
43 /*** inline functions ****************************************************************************/
45 #endif /* MC__WIDGET_RECT_H */