diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-23 10:34:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-23 10:34:21 +0300 |
commit | 0e0441b8293d4ec865ca6f7a7c69cb8cbfa463af (patch) | |
tree | d9cee693ecf7dc866780809846044cb2801016f3 /src/gmdocument.h | |
parent | e5fb4e8854d5926ca21e4eba62d36a714ddb1bc1 (diff) |
Visualize links; open URL when clicked
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r-- | src/gmdocument.h | 7 |
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 | ||
8 | iDeclareType(GmRun) | 8 | iDeclareType(GmRun) |
9 | 9 | ||
10 | typedef uint16_t iGmLinkId; | ||
11 | |||
10 | struct Impl_GmRun { | 12 | struct 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 | ||
18 | iDeclareType(GmDocument) | 20 | iDeclareType(GmDocument) |
@@ -27,3 +29,6 @@ typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); | |||
27 | 29 | ||
28 | void render_GmDocument (const iGmDocument *, iRangei visRangeY, iGmDocumentRenderFunc render, void *); | 30 | void render_GmDocument (const iGmDocument *, iRangei visRangeY, iGmDocumentRenderFunc render, void *); |
29 | iInt2 size_GmDocument (const iGmDocument *); | 31 | iInt2 size_GmDocument (const iGmDocument *); |
32 | |||
33 | const iGmRun * findRun_GmDocument (const iGmDocument *, iInt2 pos); | ||
34 | const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId); | ||