summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-24 12:41:46 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-24 12:41:46 +0200
commit83e936f53d3129433edfdb229a2faf78e48687b1 (patch)
tree4af84e84b7ba5faccac71522fd665bfb63491acf /src/gmdocument.h
parent740c95a2b0eda0297865b739d780474cea13e75c (diff)
GmDocument: Media type flexibility
Allow defining new inline media types.
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r--src/gmdocument.h11
1 files changed, 9 insertions, 2 deletions
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 {
85 wide_GmRunFlag = iBit(6), /* horizontally scrollable */ 85 wide_GmRunFlag = iBit(6), /* horizontally scrollable */
86}; 86};
87 87
88enum iGmRunMediaType {
89 none_GmRunMediaType,
90 image_GmRunMediaType,
91 audio_GmRunMediaType,
92 download_GmRunMediaType,
93};
94
88struct Impl_GmRun { 95struct Impl_GmRun {
89 iRangecc text; 96 iRangecc text;
90 uint8_t font; 97 uint8_t font;
91 uint8_t color; 98 uint8_t color;
92 uint8_t flags; 99 uint8_t flags;
100 uint8_t mediaType;
93 iRect bounds; /* used for hit testing, may extend to edges */ 101 iRect bounds; /* used for hit testing, may extend to edges */
94 iRect visBounds; /* actual visual bounds */ 102 iRect visBounds; /* actual visual bounds */
95 uint16_t preId; /* preformatted block ID (sequential) */ 103 uint16_t preId; /* preformatted block ID (sequential) */
96 iGmLinkId linkId; /* zero for non-links */ 104 iGmLinkId linkId; /* zero for non-links */
97 uint16_t imageId; /* zero if not an image */ 105 uint16_t mediaId; /* zero if not an image */
98 uint16_t audioId; /* zero if not audio */
99}; 106};
100 107
101iDeclareType(GmRunRange) 108iDeclareType(GmRunRange)