Drop -Werror
[pmc.git] / bg_widget.c
blobcda21c2ade2d310b714ff87ddadd6c2821724365
1 #include <widget.h>
3 #define BG_MAGIC 0x10101343
5 struct bar_graph_info {
6 int magic;
7 attr_t f_attr;
8 short f_color;
9 attr_t e_attr;
10 short e_color;
11 int curr;
12 int max;
15 widget_t *
16 wid_bg_new(WINDOW *win, attr_t f_attr, short f_color, attr_t e_attr, short e_color)
20 void
21 wid_bg_set(widget_t *wid, int curr, int max)
26 void
27 wid_bg_redraw(widget_t *wid)
29 struct bar_graph_info *b = (struct bar_graph_info *)wid->pdata;
30 attr_t attr;
31 short color;
33 if (!wid || wid->magic != WIDGET_MAGIC)
34 return;
35 if (!b || b->magic != BG_MAGIC)
36 return;
38 /* Save for later */
39 wattr_get(wid->window, &attr, &color, NULL);