summaryrefslogtreecommitdiff
path: root/gui/over.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-18 14:44:06 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-18 17:06:11 -0300
commitad532966aabbd2fc697ae8f713232a251ef82ea5 (patch)
tree9bbc91d6cccda35bbbc923c72b04c8784a4df451 /gui/over.h
parent5b77cf69eee04d62b5106db680e779dbb71ea6a6 (diff)
downloadeeshow-ad532966aabbd2fc697ae8f713232a251ef82ea5.tar.gz
eeshow-ad532966aabbd2fc697ae8f713232a251ef82ea5.tar.bz2
eeshow-ad532966aabbd2fc697ae8f713232a251ef82ea5.zip
eeshow/gui/over.c (overlay_size, _all): calculate height and width of overlay
Diffstat (limited to 'gui/over.h')
-rw-r--r--gui/over.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/over.h b/gui/over.h
index 498405e..01c807e 100644
--- a/gui/over.h
+++ b/gui/over.h
@@ -17,6 +17,8 @@
#include <stdint.h>
#include <cairo/cairo.h>
+#include <pango/pangocairo.h>
+
#include "gui/aoi.h"
@@ -46,11 +48,18 @@ void overlay_draw_all_d(struct overlay *overlays, cairo_t *cr,
unsigned x, unsigned y, int dx, int dy);
void overlay_draw_all(struct overlay *overlays, cairo_t *cr, int x, int y);
+void overlay_size(const struct overlay *over, PangoContext *pango_context,
+ int *w, int *h);
+void overlay_size_all(const struct overlay *overlays,
+ PangoContext *pango_context, bool dx, bool dy, int *w, int *h);
+
struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois,
bool (*hover)(void *user, bool on), void (*click)(void *user), void *user);
+
void overlay_text_raw(struct overlay *over, const char *s);
void overlay_text(struct overlay *over, const char *fmt, ...);
void overlay_style(struct overlay *over, const struct overlay_style *style);
+
void overlay_remove(struct overlay **overlays, struct overlay *over);
void overlay_remove_all(struct overlay **overlays);