From 33422af5b63a50e337da8817ad02639a33f6ea5e Mon Sep 17 00:00:00 2001 From: volker Date: Mon, 23 Mar 2009 17:22:24 +0000 Subject: test intersection of (displayable) widgets git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@996 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- widget.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'widget.h') diff --git a/widget.h b/widget.h index 4f943b2..2fe7088 100644 --- a/widget.h +++ b/widget.h @@ -56,6 +56,8 @@ typedef struct WIDGET { int row; int col; void *data; + int x2; /* x of opposite corner, -1 for no display widget */ + int y2; /* y of opposite corner, -1 for no display widget */ } WIDGET; @@ -68,8 +70,15 @@ typedef struct WIDGET { int widget_register(WIDGET_CLASS * widget); void widget_unregister(void); +int intersect(WIDGET * w1, WIDGET * w2); int widget_add(const char *name, const int type, const int layer, const int row, const int col); WIDGET *widget_find(int type, void *needle); int widget_color(const char *section, const char *name, const char *key, RGBA * C); +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#undef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#define NOCOORD (-1) + #endif -- cgit v1.2.3