summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-23 10:34:21 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-23 10:34:21 +0300
commit0e0441b8293d4ec865ca6f7a7c69cb8cbfa463af (patch)
treed9cee693ecf7dc866780809846044cb2801016f3 /src/gmdocument.h
parente5fb4e8854d5926ca21e4eba62d36a714ddb1bc1 (diff)
Visualize links; open URL when clicked
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r--src/gmdocument.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h
index 70e912df..b5102044 100644
--- a/src/gmdocument.h
+++ b/src/gmdocument.h
@@ -7,12 +7,14 @@
7 7
8iDeclareType(GmRun) 8iDeclareType(GmRun)
9 9
10typedef uint16_t iGmLinkId;
11
10struct Impl_GmRun { 12struct Impl_GmRun {
11 iRangecc text; 13 iRangecc text;
12 iRect bounds; /* advance metrics */ 14 iRect bounds; /* advance metrics */
13 uint8_t font; 15 uint8_t font;
14 uint8_t color; 16 uint8_t color;
15 uint16_t linkId; 17 iGmLinkId linkId; /* zero for non-links */
16}; 18};
17 19
18iDeclareType(GmDocument) 20iDeclareType(GmDocument)
@@ -27,3 +29,6 @@ typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *);
27 29
28void render_GmDocument (const iGmDocument *, iRangei visRangeY, iGmDocumentRenderFunc render, void *); 30void render_GmDocument (const iGmDocument *, iRangei visRangeY, iGmDocumentRenderFunc render, void *);
29iInt2 size_GmDocument (const iGmDocument *); 31iInt2 size_GmDocument (const iGmDocument *);
32
33const iGmRun * findRun_GmDocument (const iGmDocument *, iInt2 pos);
34const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId);