summaryrefslogtreecommitdiff
path: root/gfx/gfx.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-29 21:16:07 -0300
committerWerner Almesberger <werner@almesberger.net>2016-09-29 21:16:07 -0300
commitda054390b0b924be7e42da258524d86358491c55 (patch)
tree947f5701258a457b0a573f2a09b324cc82fe5f44 /gfx/gfx.h
parentdcf32638d8d05c7cd45ed41128c41e73ec6aa5b4 (diff)
downloadeeshow-da054390b0b924be7e42da258524d86358491c55.tar.gz
eeshow-da054390b0b924be7e42da258524d86358491c55.tar.bz2
eeshow-da054390b0b924be7e42da258524d86358491c55.zip
gfx/: add "extra" flags to gfx API, and preserve them in record.c (WIP)
This is in preparation of generalizing the "extra" system.
Diffstat (limited to 'gfx/gfx.h')
-rw-r--r--gfx/gfx.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gfx/gfx.h b/gfx/gfx.h
index 2930f5f..5aa1e82 100644
--- a/gfx/gfx.h
+++ b/gfx/gfx.h
@@ -19,6 +19,11 @@
#include "gfx/text.h"
+enum gfx_extra {
+ gfx_pin_type = 1 << 1,
+ gfx_footprint = 1 << 2,
+};
+
struct gfx;
struct gfx_ops {
@@ -45,6 +50,8 @@ struct gfx_ops {
unsigned (*text_width)(void *ctx, const char *s, unsigned size,
enum text_style style);
+ void (*set_extra)(void *ctx, enum gfx_extra extra);
+
void *(*init)(void);
bool (*args)(void *ctx, int argc, char *const *argv, const char *opts);
void (*sheet_name)(void *ctx, const char *name);
@@ -74,6 +81,8 @@ void gfx_tag(struct gfx *gfx, const char *s,
unsigned gfx_text_width(struct gfx *gfx, const char *s, unsigned size,
enum text_style style);
+enum gfx_extra gfx_set_extra(struct gfx *gfx, enum gfx_extra extra);
+
/* inititalization and termination */
struct gfx *gfx_init(const struct gfx_ops *ops);