aboutsummaryrefslogtreecommitdiff
path: root/draw.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-17 12:58:43 +0100
committerFederico Angelilli <code@fedang.net>2023-11-17 12:58:43 +0100
commita88d3a4c61f482ffeafba89910b896a92830f95f (patch)
tree06f1a5ad5db5563379ee0bb6156e2b9f91f7094d /draw.h
parentf28d0af32e28005a4b28857fa4fd4232d6849442 (diff)
Add `Drawable` struct with drawing related state
Diffstat (limited to 'draw.h')
-rw-r--r--draw.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/draw.h b/draw.h
index e352ad5..1d299ce 100644
--- a/draw.h
+++ b/draw.h
@@ -1,11 +1,27 @@
#ifndef COMET_DRAW_H
#define COMET_DRAW_H
+#include <pango/pango-font.h>
+#include <pango/pango-types.h>
+
#include "window.h"
-void draw_init(const char *font, int height, int x_padding, int y_padding);
+// TODO: Make opaque
+typedef struct {
+ Window *win;
+ PangoFontDescription *desc;
+ int height;
+ int left_pad;
+ int right_pad;
+ int top_pad;
+ double alpha;
+} Drawable;
+
+Drawable *draw_create(Window *win, const char *font, int height, int left_pad, int right_pad, int top_pad, double alpha);
+
+void draw_paint(Drawable *draw);
-void draw(Window *win);
+void draw_destroy(Drawable *draw);
#endif