aboutsummaryrefslogtreecommitdiff
path: root/src/effect.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-09-12 01:29:32 +0200
committerFederico Angelilli <code@fedang.net>2024-09-12 01:29:32 +0200
commitbd8dbe03ead6c73f28df517f8873675108277bf5 (patch)
tree3a63ef377a599d7b9cddc4e2e3184f8defe29756 /src/effect.h
parent2907d743760f74a01a77dca91c4f74ac849517b5 (diff)
Add effects
Diffstat (limited to 'src/effect.h')
-rw-r--r--src/effect.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/effect.h b/src/effect.h
new file mode 100644
index 0000000..b6c6282
--- /dev/null
+++ b/src/effect.h
@@ -0,0 +1,29 @@
+#ifndef COMET_EFFECT_H
+#define COMET_EFFECT_H
+
+#include <cairo.h>
+
+#include "util.h"
+#include "layout.h"
+
+typedef enum {
+ EFFECT_PULSE,
+} effect_type_t;
+
+typedef struct effect effect_t;
+
+typedef void (*effect_render_t)(effect_t *effect, layout_t *layout, cairo_t *cr);
+
+struct effect {
+ effect_type_t type;
+ struct timespec start;
+ struct timespec duration;
+ effect_render_t pre;
+ effect_render_t post;
+};
+
+effect_t *effect_pulse(struct timespec duration);
+
+void effect_free(effect_t *effect);
+
+#endif