source: npl/mediabox/lcdproc_edwin/src/server/widget.h @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 972 bytes
Line 
1#ifndef WIDGET_H
2#define WIDGET_H
3
4#include "screen.h"
5
6typedef struct widget
7{
8      char *id;
9      int type;
10      // some sort of data here...
11      int x, y;     // Position
12      int wid, hgt; // Size
13      int left, top, right, bottom; // bounding rectangle
14      int length;   // size or direction
15      int speed;    // For scroller...
16      char *text;   // text or binary data
17      LL *kids;     // Frames can contain more widgets...
18} widget;
19
20// These correspond to the index into the "types" array...
21#define WID_NONE 0
22#define WID_STRING 1
23#define WID_HBAR 2
24#define WID_VBAR 3
25#define WID_ICON 4
26#define WID_TITLE 5
27#define WID_SCROLLER 6
28#define WID_FRAME 7
29#define WID_NUM 8
30
31#define WID_MAX_DIR 4
32
33extern char *types[];
34
35
36widget * widget_create();
37int widget_destroy(widget *w);
38
39widget * widget_find(screen *s, char *id);
40
41int widget_add(screen *s, char *id, char *type, char *in, int sock);
42int widget_remove(screen *s, char *id, int sock);
43
44
45#endif
Note: See TracBrowser for help on using the repository browser.