diff options
| author | Federico Angelilli <code@fedang.net> | 2024-07-08 15:22:41 +0200 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-07-08 15:22:41 +0200 |
| commit | 5d170a634ead0119f6e5a9f63c23b2b064126f75 (patch) | |
| tree | 0447d2dbb0da6358d184a4c62d5557d4d22f5e8d /src/draw.h | |
| parent | 92feb3c130966202c7caa6d9bf3a3800c97ca7a1 (diff) | |
Remove old files
Diffstat (limited to 'src/draw.h')
| -rw-r--r-- | src/draw.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/draw.h b/src/draw.h deleted file mode 100644 index 6d0119f..0000000 --- a/src/draw.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef COMET_DRAW_H -#define COMET_DRAW_H - -#include <glib.h> -#include <pango/pango-font.h> -#include <pango/pangocairo.h> - -#include "window.h" - -typedef struct { - double r, g, b, a; -} Color; - -// The one who draws ('o')7 - -typedef struct { - PangoFontDescription *desc; - PangoContext *context; - int height; - int width; - int left_pad; - int right_pad; - int top_pad; - int sep; - Color background; - GList *layouts; - // Calculated by draw_compute_layout - GList *layout_end[3]; - int layout_bx[3]; - int layout_width[3]; -} Drawer; - -typedef struct { - struct Button *btn; - int x, y; - int width, height; - int text_w, text_h; - int x_pad, y_pad; - int line_w; - PangoLayout *pl; - GList *children; -} Layout; - -Drawer *draw_create(); - -void draw_paint(Drawer *draw, Window *win); - -void layout_destroy(Layout *layout); - -// TODO: Rework the api so that we don't need to pass the window -void draw_compute_layout(Drawer *draw, Window *win, GList *btns); - -void draw_compute_text_size(Drawer *draw, const char *text, int *text_w, int *text_h); - -void draw_set_background(Drawer *draw, Color background); - -void draw_set_separator(Drawer *draw, int sep); - -void draw_set_font(Drawer *draw, const char *font); - -void draw_set_context(Drawer *draw, PangoContext *context); - -void draw_set_size(Drawer *draw, int height, int left_pad, int right_pad, int top_pad); - -void draw_destroy(Drawer *draw); - -#endif - -// vim: ts=4 sw=4 et |
