From 83e936f53d3129433edfdb229a2faf78e48687b1 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 24 Feb 2021 12:41:46 +0200 Subject: GmDocument: Media type flexibility Allow defining new inline media types. --- src/gmdocument.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gmdocument.h') diff --git a/src/gmdocument.h b/src/gmdocument.h index e2c7e10c..16127ea3 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h @@ -85,17 +85,24 @@ enum iGmRunFlags { wide_GmRunFlag = iBit(6), /* horizontally scrollable */ }; +enum iGmRunMediaType { + none_GmRunMediaType, + image_GmRunMediaType, + audio_GmRunMediaType, + download_GmRunMediaType, +}; + struct Impl_GmRun { iRangecc text; uint8_t font; uint8_t color; uint8_t flags; + uint8_t mediaType; iRect bounds; /* used for hit testing, may extend to edges */ iRect visBounds; /* actual visual bounds */ uint16_t preId; /* preformatted block ID (sequential) */ iGmLinkId linkId; /* zero for non-links */ - uint16_t imageId; /* zero if not an image */ - uint16_t audioId; /* zero if not audio */ + uint16_t mediaId; /* zero if not an image */ }; iDeclareType(GmRunRange) -- cgit v1.2.3