wmii/liblitz/blitz.h

62 lines
1.6 KiB
C
Raw Normal View History

2005-11-18 18:54:58 +03:00
/*
* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
#include <X11/Xlib.h>
#define BLITZ_FONT "fixed"
#define BLITZ_SEL_FG_COLOR "#eeeeee"
#define BLITZ_SEL_BG_COLOR "#506070"
#define BLITZ_SEL_BORDER_COLOR "#708090"
#define BLITZ_NORM_FG_COLOR "#bbbbbb"
#define BLITZ_NORM_BG_COLOR "#222222"
#define BLITZ_NORM_BORDER_COLOR "#000000"
typedef enum {
CENTER, WEST, NWEST, NORTH, NEAST, EAST,
SEAST, SOUTH, SWEST
2005-12-05 01:45:59 +03:00
} Align;
2005-11-18 18:54:58 +03:00
typedef struct Draw Draw;
struct Draw {
2005-12-05 01:45:59 +03:00
Drawable drawable;
GC gc;
unsigned long bg;
unsigned long fg;
unsigned long border;
Align align;
XFontStruct *font;
XRectangle rect; /* relative rect */
XRectangle *notch; /* relative notch rect */
char *data;
2005-11-18 18:54:58 +03:00
};
/* draw.c */
2005-12-05 01:45:59 +03:00
XFontStruct *blitz_getfont(Display * dpy, char *fontstr);
unsigned long blitz_loadcolor(Display * dpy, int mon, char *colstr);
void blitz_drawlabel(Display * dpy, Draw * r);
void blitz_drawmeter(Display * dpy, Draw * r);
void blitz_drawlabelnoborder(Display * dpy, Draw * r);
2005-11-18 18:54:58 +03:00
/* geometry.c */
int blitz_strtorect(XRectangle * root, XRectangle * r, char *val);
2005-12-05 01:45:59 +03:00
int blitz_ispointinrect(int x, int y, XRectangle * r);
int blitz_distance(XRectangle * origin, XRectangle * target);
void
2005-11-18 18:54:58 +03:00
blitz_getbasegeometry(void **items, unsigned int *size,
2005-12-05 01:45:59 +03:00
unsigned int *cols, unsigned int *rows);
2005-11-18 18:54:58 +03:00
/* mouse.c */
2005-12-05 01:45:59 +03:00
char *blitz_buttontostr(unsigned int button);
unsigned int blitz_strtobutton(char *val);
2005-11-18 18:54:58 +03:00
/* kb.c */
2005-12-05 01:45:59 +03:00
char *blitz_modtostr(unsigned long mod);
unsigned long blitz_strtomod(char *val);
2005-11-18 18:54:58 +03:00
/* util.c */
2005-12-05 01:45:59 +03:00
long long
_strtonum(const char *numstr, long long minval, long long maxval);