aboutsummaryrefslogtreecommitdiffstats
path: root/widget.h
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-10 20:22:33 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-10 20:22:33 +0000
commita390d8386961109a8e182897753080538dce8625 (patch)
treecc950b0ce0cb241f374de0671aa2bc2cacae8140 /widget.h
parent76ffcfa4c6fb4cf45126bfd97c3ab0affe1e8e0d (diff)
downloadlcd4linux-a390d8386961109a8e182897753080538dce8625.tar.gz
[lcd4linux @ 2004-01-10 20:22:33 by reinelt]
added new function 'cfg_list()' (not finished yet) added layout.c (will replace processor.c someday) added widget_text.c (will be the first and most important widget) modified lcd4linux.c so that old-style configs should work, too git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@304 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget.h')
-rw-r--r--widget.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/widget.h b/widget.h
index 05999e6..2ff0c8d 100644
--- a/widget.h
+++ b/widget.h
@@ -1,4 +1,4 @@
-/* $Id: widget.h,v 1.3 2004/01/10 17:34:40 reinelt Exp $
+/* $Id: widget.h,v 1.4 2004/01/10 20:22:33 reinelt Exp $
*
* generic widget handling
*
@@ -23,6 +23,12 @@
*
*
* $Log: widget.h,v $
+ * Revision 1.4 2004/01/10 20:22:33 reinelt
+ * added new function 'cfg_list()' (not finished yet)
+ * added layout.c (will replace processor.c someday)
+ * added widget_text.c (will be the first and most important widget)
+ * modified lcd4linux.c so that old-style configs should work, too
+ *
* Revision 1.3 2004/01/10 17:34:40 reinelt
* further matrixOrbital changes
* widgets initialized
@@ -39,6 +45,27 @@
#ifndef _WIDGET_H_
#define _WIDGET_H_
-int widget_register (void);
+
+struct WIDGET; // forward declaration
+
+typedef struct WIDGET_CLASS {
+ char *name;
+ int (*init) (struct WIDGET *Self);
+ int (*update) (struct WIDGET *Self);
+ int (*render) (struct WIDGET *Self);
+ int (*quit) (struct WIDGET *Self);
+} WIDGET_CLASS;
+
+typedef struct WIDGET{
+ char *name;
+ WIDGET_CLASS *class;
+} WIDGET;
+
+
+int widget_register (WIDGET_CLASS *widget);
+
+
+// some basic widgets
+WIDGET_CLASS Widget_Text;
#endif