diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2006-02-21 05:50:34 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2006-02-21 05:50:34 +0000 |
commit | a1a0dfa52a40cc99c48fb812fa1b3864c5f642b8 (patch) | |
tree | 178703096587ebc29a29963236b5e2d345506f35 /widget.c | |
parent | f2b964cb65e88fb238df3b562e8edfb0b9243489 (diff) | |
download | lcd4linux-a1a0dfa52a40cc99c48fb812fa1b3864c5f642b8.tar.gz |
[lcd4linux @ 2006-02-21 05:50:34 by reinelt]
keypad support from Cris Maj
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@641 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget.c')
-rw-r--r-- | widget.c | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: widget.c,v 1.22 2006/01/30 05:47:38 reinelt Exp $ +/* $Id: widget.c,v 1.23 2006/02/21 05:50:34 reinelt Exp $ * * generic widget handling * @@ -21,6 +21,9 @@ * * * $Log: widget.c,v $ + * Revision 1.23 2006/02/21 05:50:34 reinelt + * keypad support from Cris Maj + * * Revision 1.22 2006/01/30 05:47:38 reinelt * graphic subsystem changed to full-color RGBA * @@ -318,3 +321,21 @@ int widget_add(const char *name, const int type, const int layer, const int row, return 0; } + +/* return the found widget, or else NULL */ +WIDGET *widget_find(int type, void *needle) +{ + WIDGET *widget = NULL; + int i; + + for (i = 0; i < nWidgets; i++) { + widget = &(Widgets[i]); + if (widget->class->type == type) { + if (widget->class->find != NULL && widget->class->find(widget, needle) == 0) + break; + } + widget = NULL; + } + + return widget; +} |