summaryrefslogtreecommitdiff
path: root/gfx/record.c
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/record.c
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/record.c')
-rw-r--r--gfx/record.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gfx/record.c b/gfx/record.c
index 7bf09c1..1cad6ff 100644
--- a/gfx/record.c
+++ b/gfx/record.c
@@ -33,6 +33,8 @@ struct record_obj {
ro_text,
} type;
+ enum gfx_extra extra;
+
int x, y;
int color, fill_color;
union {
@@ -114,6 +116,7 @@ static struct record_obj *new_obj(struct record *rec, enum ro_type type,
this_layer:
new_obj = alloc_type(struct record_obj);
new_obj->type = type;
+ new_obj->extra = rec->extra;
new_obj->color = color;
new_obj->fill_color = fill_color;
new_obj->next = NULL;
@@ -253,6 +256,14 @@ void record_text(void *ctx, int x, int y, const char *s, unsigned size,
}
+void record_set_extra(void *ctx, enum gfx_extra extra)
+{
+ struct record *rec = ctx;
+
+ rec->extra = extra;
+}
+
+
/* ----- Initialization and cleanup ---------------------------------------- */