aboutsummaryrefslogtreecommitdiffstats
path: root/widget.h
diff options
context:
space:
mode:
authorvolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-03-23 17:22:24 +0000
committervolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-03-23 17:22:24 +0000
commit33422af5b63a50e337da8817ad02639a33f6ea5e (patch)
treecf463a8f292bfb52757c5413a8b8e628ac5f7605 /widget.h
parent14e0be7a792ccf87e2e377501fa6e0de8836c1d5 (diff)
downloadlcd4linux-33422af5b63a50e337da8817ad02639a33f6ea5e.tar.gz
test intersection of (displayable) widgets
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@996 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget.h')
-rw-r--r--widget.h9
1 files changed, 9 insertions, 0 deletions
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