fix issues in widget_create() in tight memory situations (Andre Guibert de Bruet)

This commit is contained in:
marschap
2008-12-14 09:33:01 +00:00
parent 064ed18866
commit 52f8121ba5
2 changed files with 84 additions and 29 deletions
+13 -10
View File
@@ -1,4 +1,5 @@
/** \file server/widget.h
* Public interface to the widget methods.
*/
/* This file is part of LCDd, the lcdproc server.
@@ -30,17 +31,19 @@ typedef enum WidgetType {
WID_NUM
} WidgetType;
/** Widget structure */
typedef struct Widget {
char *id;
WidgetType type;
Screen *screen; /* What screen is this widget in ? */
int x, y; /* Position */
int width, height; /* Visible size */
int left, top, right, bottom; /* bounding rectangle */
int length; /* size or direction */
int speed; /* For scroller... */
char *text; /* text or binary data */
struct Screen *frame_screen; /* frame widget get an associated screen */
char *id; /**< the widget's name */
WidgetType type; /**< the widget's type */
Screen *screen; /**< What screen is this widget in ? */
int x, y; /**< Position */
int width, height; /**< Visible size */
int left, top, right, bottom; /**< bounding rectangle */
int length; /**< size or direction */
int speed; /**< For scroller... */
char *text; /**< text or binary data */
struct Screen *frame_screen; /**< frame widget get an associated screen */
//LinkedList *kids; /* Frames can contain more widgets...*/
} Widget;