From ceb6fc010ee9f4fadbcbf3e3cdc481ec505cdc32 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 20 Jan 2007 06:37:35 +0000 Subject: dynamic properties for bars; new 'property_valid()' helper git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@749 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- widget_bar.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'widget_bar.h') diff --git a/widget_bar.h b/widget_bar.h index 62eda00..692c673 100644 --- a/widget_bar.h +++ b/widget_bar.h @@ -28,18 +28,16 @@ #ifndef _WIDGET_BAR_H_ #define _WIDGET_BAR_H_ +#include "property.h" + typedef enum { DIR_EAST = 1, DIR_WEST = 2, DIR_NORTH = 4, DIR_SOUTH = 8 } DIRECTION; typedef enum { STYLE_HOLLOW = 1, STYLE_FIRST = 2, STYLE_LAST = 4 } STYLE; typedef struct WIDGET_BAR { - char *expression1; /* expression that delivers the value */ - char *expression2; /* expression that delivers the value */ - char *expr_min; /* expression that delivers the minimum value */ - char *expr_max; /* expression that delivers the maximum value */ - void *tree1; /* pre-compiled expression that delivers the value */ - void *tree2; /* pre-compiled expression that delivers the value */ - void *tree_min; /* pre-compiled expression that delivers the minimum value */ - void *tree_max; /* pre-compiled expression that delivers the maximum value */ + PROPERTY expression1; /* value (length) of upper half */ + PROPERTY expression2; /* value (length) of lower half */ + PROPERTY expr_min; /* explicit minimum value */ + PROPERTY expr_max; /* explicit maximum value */ DIRECTION direction; /* bar direction */ STYLE style; /* bar style (hollow) */ int length; /* bar length */ -- cgit v1.2.3