|
@ -12,8 +12,8 @@ typedef struct Fnt { |
|
|
struct Fnt *next; |
|
|
struct Fnt *next; |
|
|
} Fnt; |
|
|
} Fnt; |
|
|
|
|
|
|
|
|
enum { ColFg, ColBg, ColCount }; /* Scm index */ |
|
|
|
|
|
typedef XftColor *Scm; |
|
|
|
|
|
|
|
|
enum { ColFg, ColBg }; /* Clr scheme index */ |
|
|
|
|
|
typedef XftColor Clr; |
|
|
|
|
|
|
|
|
typedef struct { |
|
|
typedef struct { |
|
|
unsigned int w, h; |
|
|
unsigned int w, h; |
|
@ -22,7 +22,7 @@ typedef struct { |
|
|
Window root; |
|
|
Window root; |
|
|
Drawable drawable; |
|
|
Drawable drawable; |
|
|
GC gc; |
|
|
GC gc; |
|
|
Scm scheme; |
|
|
|
|
|
|
|
|
Clr *scheme; |
|
|
Fnt *fonts; |
|
|
Fnt *fonts; |
|
|
} Drw; |
|
|
} Drw; |
|
|
|
|
|
|
|
@ -38,8 +38,8 @@ unsigned int drw_fontset_getwidth(Drw *drw, const char *text); |
|
|
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); |
|
|
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); |
|
|
|
|
|
|
|
|
/* Colorscheme abstraction */ |
|
|
/* Colorscheme abstraction */ |
|
|
void drw_clr_create(Drw *drw, XftColor *dest, const char *clrname); |
|
|
|
|
|
Scm drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount); |
|
|
|
|
|
|
|
|
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); |
|
|
|
|
|
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount); |
|
|
|
|
|
|
|
|
/* Cursor abstraction */ |
|
|
/* Cursor abstraction */ |
|
|
Cur *drw_cur_create(Drw *drw, int shape); |
|
|
Cur *drw_cur_create(Drw *drw, int shape); |
|
@ -47,7 +47,7 @@ void drw_cur_free(Drw *drw, Cur *cursor); |
|
|
|
|
|
|
|
|
/* Drawing context manipulation */ |
|
|
/* Drawing context manipulation */ |
|
|
void drw_setfontset(Drw *drw, Fnt *set); |
|
|
void drw_setfontset(Drw *drw, Fnt *set); |
|
|
void drw_setscheme(Drw *drw, Scm scm); |
|
|
|
|
|
|
|
|
void drw_setscheme(Drw *drw, Clr *scm); |
|
|
|
|
|
|
|
|
/* Drawing functions */ |
|
|
/* Drawing functions */ |
|
|
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); |
|
|
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); |
|
|