/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <fredde at shapeshifter dot se> wrote this file. As long as you retain this
 * notice you can do whatever you want with this stuff. If we meet some day,
 * and you think this stuff is worth it, you can buy me a beer in return.
 * Fredrik Lindberg
 * ----------------------------------------------------------------------------
 */

#define VERSION		"0.1.2"

#define DEF_FONT	"fixed"
#define DEF_TC		"white"
#define DEF_BC		"white"
#define DEF_SC		"black"

#define DEF_X		10	
#define DEF_Y		10	
#define DEF_WIDTH	250	
#define DEF_HEIGHT	17
#define DEF_BMAX	155	

#define DEF_INTERVAL	3
#define DEF_MEASURE	1

#define PIX_OFFSET	2
#define SHW_OFFSET	1

struct xw_t {
	char 	*display;
        Display	*disp;
        Window	win;
        GC	winGC;
        int	screen;
        Font	font;
	XFontStruct *xfs;
	u_int	f_height;

        XColor	c_bar;
        XColor	c_text;
        XColor	c_shadow;
	u_char	opt_shadow;

	u_char	bmax;
	u_char	opt_dyn;
	u_int	interval;
	u_int	opt_measure;

        int	x;
        int	y;
        u_int	width;
        u_int	height;
};

struct opt_t {
        int     x;
        int     y;
        unsigned int width;
        unsigned int height;
        char    *fname;
        char    *tcolor;
        char    *bcolor;
        char    *scolor;
	char	*dispn;
	char	*bmax;
	u_char	dynamic;
	char	*interval;
	char	*measure;
};


void main_loop(struct xw_t *, char *);
void set_flg();
void usage(char *);

int init_win(struct xw_t *);
void close_win(struct xw_t *);
XColor get_color(struct xw_t *, char *);
void redraw(struct xw_t *, int, int);
void clear_win(struct xw_t *);

void * _malloc(size_t);

int get_strength(char *, u_int opt);


syntax highlighted by Code2HTML, v. 0.9.1