root/lib/widget/rect.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 
   2 /** \file rect.h
   3  *  \brief Header: rectangular class
   4  */
   5 
   6 #ifndef MC__WIDGET_RECT_H
   7 #define MC__WIDGET_RECT_H
   8 
   9 /*** typedefs (not structures) and defined constants *********************************************/
  10 
  11 #define RECT(x) ((WRect *)(x))
  12 #define CONST_RECT(x) ((const WRect *)(x))
  13 
  14 /*** enums ***************************************************************************************/
  15 
  16 /*** structures declarations (and typedefs of structures) ****************************************/
  17 
  18 struct WRect;
  19 typedef struct WRect WRect;
  20 
  21 struct WRect
  22 {
  23     int y;
  24     int x;
  25     int lines;
  26     int cols;
  27 };
  28 
  29 /*** global variables defined in .c file *********************************************************/
  30 
  31 /*** declarations of public functions ************************************************************/
  32 
  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_intersect (WRect * r, const WRect * r1);
  38 void rect_union (WRect * r, const WRect * r1);
  39 gboolean rects_are_overlapped (const WRect * r1, const WRect * r2);
  40 gboolean rects_are_equal (const WRect * r1, const WRect * r2);
  41 
  42 /*** inline functions ****************************************************************************/
  43 
  44 #endif /* MC__WIDGET_RECT_H */

/* [previous][next][first][last][top][bottom][index][help]  */