Files
lcdproc/server/widget.h
T
ppokorny 5d6406feb1 When changing from a widget-based storage (that was, in retrospect a
horrible hack) to a screen data item, I neglected to fix the code that
doles out key events to screens and clients.  This meant screens didn't
get keys.  It's now fixed.
2001-05-25 15:22:34 +00:00

43 lines
953 B
C

#ifndef WIDGET_H
#define WIDGET_H
#include "screen.h"
typedef struct widget {
char *id;
int type;
// some sort of data here...
int x, y; // Position
int wid, hgt; // Size
int left, top, right, bottom; // bounding rectangle
int length; // size or direction
int speed; // For scroller...
char *text; // text or binary data
LL *kids; // Frames can contain more widgets...
} widget;
// These correspond to the index into the "types" array...
#define WID_NONE 0
#define WID_STRING 1
#define WID_HBAR 2
#define WID_VBAR 3
#define WID_ICON 4
#define WID_TITLE 5
#define WID_SCROLLER 6
#define WID_FRAME 7
#define WID_NUM 8
#define WID_MAX_DIR 4
extern char *types[];
widget *widget_create ();
int widget_destroy (widget * w);
widget *widget_find (screen * s, char *id);
int widget_add (screen * s, char *id, char *type, char *in, int sock);
int widget_remove (screen * s, char *id, int sock);
#endif