1 /* See LICENSE file for copyright and license details. */
41 /* Drawable abstraction */
42 Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
43 void drw_resize(Drw *drw, unsigned int w, unsigned int h);
44 void drw_free(Drw *drw);
47 Fnt *drw_font_create(Display *dpy, const char *fontname);
48 void drw_font_free(Display *dpy, Fnt *font);
49 void drw_font_getexts(Fnt *font, const char *text, unsigned int len, Extnts *extnts);
50 unsigned int drw_font_getexts_width(Fnt *font, const char *text, unsigned int len);
52 /* Colour abstraction */
53 Clr *drw_clr_create(Drw *drw, const char *clrname);
54 void drw_clr_free(Clr *clr);
56 /* Cursor abstraction */
57 Cur *drw_cur_create(Drw *drw, int shape);
58 void drw_cur_free(Drw *drw, Cur *cursor);
60 /* Drawing context manipulation */
61 void drw_setfont(Drw *drw, Fnt *font);
62 void drw_settheme(Drw *drw, Theme *theme);
64 /* Drawing functions */
65 void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int empty, int invert);
66 void drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *text, int invert);
69 void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);