Files
RedBear-OS/recipes/wip/files/mc/source/lib/widget/rect.h
T
vasilito facf0c92e0 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

46 lines
1.4 KiB
C

/** \file rect.h
* \brief Header: rectangular class
*/
#ifndef MC__WIDGET_RECT_H
#define MC__WIDGET_RECT_H
/*** typedefs (not structures) and defined constants *********************************************/
#define RECT(x) ((WRect *)(x))
#define CONST_RECT(x) ((const WRect *)(x))
/*** enums ***************************************************************************************/
/*** structures declarations (and typedefs of structures) ****************************************/
struct WRect;
typedef struct WRect WRect;
struct WRect
{
int y;
int x;
int lines;
int cols;
};
/*** global variables defined in .c file *********************************************************/
/*** declarations of public functions ************************************************************/
WRect *rect_new (int y, int x, int lines, int cols);
void rect_init (WRect * r, int y, int x, int lines, int cols);
void rect_move (WRect * r, int dy, int dx);
void rect_resize (WRect * r, int dl, int dc);
void rect_grow (WRect * r, int dl, int dc);
void rect_intersect (WRect * r, const WRect * r1);
void rect_union (WRect * r, const WRect * r1);
gboolean rects_are_overlapped (const WRect * r1, const WRect * r2);
gboolean rects_are_equal (const WRect * r1, const WRect * r2);
/*** inline functions ****************************************************************************/
#endif /* MC__WIDGET_RECT_H */