summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-15 17:30:24 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-15 17:32:02 (GMT)
commit41ee777fb5d88b523636ec52ba04ffb0a843d06d (patch)
treebf0d37302681da334ff7f6174a76a398f60ef32e /gui
parent838de96c89a0ceddc5b41dc47624ccc699a2c6d1 (diff)
downloadeeshow-41ee777fb5d88b523636ec52ba04ffb0a843d06d.zip
eeshow-41ee777fb5d88b523636ec52ba04ffb0a843d06d.tar.gz
eeshow-41ee777fb5d88b523636ec52ba04ffb0a843d06d.tar.bz2
gui/over.c, over.h (overlay_vtext): vprintf-style variant of overlay_text
Diffstat (limited to 'gui')
-rw-r--r--gui/over.c8
-rw-r--r--gui/over.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/gui/over.c b/gui/over.c
index b779aee..b321368 100644
--- a/gui/over.c
+++ b/gui/over.c
@@ -471,12 +471,18 @@ void overlay_text_raw(struct overlay *over, const char *s)
}
+void overlay_vtext(struct overlay *over, const char *fmt, va_list ap)
+{
+ overlay_text_raw(over, vfmt_pango(fmt, ap));
+}
+
+
void overlay_text(struct overlay *over, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
- overlay_text_raw(over, vfmt_pango(fmt, ap));
+ overlay_vtext(over, fmt, ap);
va_end(ap);
}
diff --git a/gui/over.h b/gui/over.h
index 64166eb..15a2cf7 100644
--- a/gui/over.h
+++ b/gui/over.h
@@ -13,6 +13,7 @@
#ifndef GUI_OVER_H
#define GUI_OVER_H
+#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
@@ -60,6 +61,7 @@ struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois,
void (*click)(void *user), void *user);
void overlay_text_raw(struct overlay *over, const char *s);
+void overlay_vtext(struct overlay *over, const char *fmt, va_list ap);
void overlay_text(struct overlay *over, const char *fmt, ...);
void overlay_icon(struct overlay *over, cairo_surface_t *icon);
void overlay_style(struct overlay *over, const struct overlay_style *style);