path: root/gfx/gfx.h
diff options
authorWerner Almesberger <>2016-09-03 15:11:50 -0300
committerWerner Almesberger <>2016-09-03 19:52:24 -0300
commitcd197d8d8b34e3770ec49dfdc808427b2e1f0963 (patch)
tree6d113a0a97979d52309e463554c2209fc8151ae0 /gfx/gfx.h
parent487c2ed78ba10bdd089009fe88f21fbc276ee3b2 (diff)
gfx/gfx.c: we now pass a combined option string to drivers
Further changes implied by this: - drivers can no longer receive arguments, only options - drivers have to ignore options they don't recognize
Diffstat (limited to 'gfx/gfx.h')
1 files changed, 5 insertions, 2 deletions
diff --git a/gfx/gfx.h b/gfx/gfx.h
index da28b6b..2930f5f 100644
--- a/gfx/gfx.h
+++ b/gfx/gfx.h
@@ -24,6 +24,8 @@ struct gfx;
struct gfx_ops {
const char *const *ext;
int n_ext;
+ const char *opts;
void (*line)(void *ctx, int sx, int sy, int ex, int ey,
int color, unsigned layer);
void (*rect)(void *ctx, int sx, int sy, int ex, int ey,
@@ -42,8 +44,9 @@ struct gfx_ops {
int points, const int x[points], const int y[points]);
unsigned (*text_width)(void *ctx, const char *s, unsigned size,
enum text_style style);
void *(*init)(void);
- bool (*args)(void *ctx, int argc, char *const *argv);
+ bool (*args)(void *ctx, int argc, char *const *argv, const char *opts);
void (*sheet_name)(void *ctx, const char *name);
void (*new_sheet)(void *ctx);
int (*end)(void *ctx);
@@ -74,7 +77,7 @@ unsigned gfx_text_width(struct gfx *gfx, const char *s, unsigned size,
/* inititalization and termination */
struct gfx *gfx_init(const struct gfx_ops *ops);
-bool gfx_args(struct gfx *gfx, int argc, char *const *argv);
+bool gfx_args(struct gfx *gfx, int argc, char *const *argv, const char *opts);
void gfx_sheet_name(struct gfx *gfx, const char *name);
void gfx_new_sheet(struct gfx *gfx);