summaryrefslogtreecommitdiff
path: root/gfx/gfx.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-24 18:08:15 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-24 18:08:15 -0300
commit71d2312487fed19d2500357cb644c3801179f600 (patch)
tree70510dcfbc9abb3376306492b89845333fc2865b /gfx/gfx.c
parent279ddbdb4fb11dbffb487db05b74787b5275b4d9 (diff)
downloadeeshow-71d2312487fed19d2500357cb644c3801179f600.tar.gz
eeshow-71d2312487fed19d2500357cb644c3801179f600.tar.bz2
eeshow-71d2312487fed19d2500357cb644c3801179f600.zip
separate argument list from gfx_init; related API changes
Diffstat (limited to 'gfx/gfx.c')
-rw-r--r--gfx/gfx.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gfx/gfx.c b/gfx/gfx.c
index 0324cfd..4d79851 100644
--- a/gfx/gfx.c
+++ b/gfx/gfx.c
@@ -100,18 +100,23 @@ unsigned gfx_text_width(struct gfx *gfx, const char *s, unsigned size)
}
-struct gfx *gfx_init(const struct gfx_ops *ops,
- int argc, char *const *argv)
+struct gfx *gfx_init(const struct gfx_ops *ops)
{
struct gfx *new;
new = alloc_type(struct gfx);
- new->user = ops->init(argc, argv);
+ new->user = ops->init();
new->ops = ops;
return new;
}
+bool gfx_args(struct gfx *gfx, int argc, char *const *argv)
+{
+ return gfx->ops->args && gfx->ops->args(gfx->user, argc, argv);
+}
+
+
void gfx_sheet_name(struct gfx *gfx, const char *name)
{
if (gfx->ops->sheet_name)