#ifndef COMET_DRAW_H #define COMET_DRAW_H #include #include #include #include "window.h" typedef struct { double r, g, b, a; } Color; // The one who draws ('o')7 typedef struct { PangoFontDescription *desc; int height; int left_pad; int right_pad; int top_pad; int line_w; Color background; GList *layouts; } Drawer; typedef struct { struct Button *btn; int x, y; int width, height; int text_w, text_h; PangoLayout *pl; } Layout; Drawer *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad, int line_w); void draw_compute_layout(Drawer *draw, Window *win, GList *btns); void draw_paint(Drawer *draw, Window *win); void draw_set_background(Drawer *draw, Color background); void draw_destroy(Drawer *draw); #endif // vim: ts=4 sw=4 et