summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-29 11:00:54 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-29 11:00:54 +0300
commit67750111c420fcf97e31289bb4770cb7f69c426e (patch)
treec2a7d522cfd6f64fa9ceab481875c9f79ce055c0 /src/gmdocument.h
parent4d8e45d99f13f0bff476b999708f793b41fd2927 (diff)
DocumentWidget: Improved link presentation
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r--src/gmdocument.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h
index 584efb5a..c353c733 100644
--- a/src/gmdocument.h
+++ b/src/gmdocument.h
@@ -12,14 +12,14 @@ iDeclareType(GmRun)
12typedef uint16_t iGmLinkId; 12typedef uint16_t iGmLinkId;
13 13
14enum iGmLinkFlags { 14enum iGmLinkFlags {
15 userFriendly_GmLinkFlag = 0x1, 15 userFriendly_GmLinkFlag = iBit(1),
16 remote_GmLinkFlag = 0x2, 16 remote_GmLinkFlag = iBit(2),
17 http_GmLinkFlag = 0x4, 17 http_GmLinkFlag = iBit(3),
18 gopher_GmLinkFlag = 0x8, 18 gopher_GmLinkFlag = iBit(4),
19 file_GmLinkFlag = 0x10, 19 file_GmLinkFlag = iBit(5),
20 imageFileExtension_GmLinkFlag = 0x20, 20 imageFileExtension_GmLinkFlag = iBit(6),
21 audioFileExtension_GmLinkFlag = 0x40, 21 audioFileExtension_GmLinkFlag = iBit(7),
22 content_GmLinkFlag = 0x80, /* content visible below */ 22 content_GmLinkFlag = iBit(8), /* content visible below */
23}; 23};
24 24
25iDeclareType(GmImageInfo) 25iDeclareType(GmImageInfo)
@@ -30,10 +30,16 @@ struct Impl_GmImageInfo {
30 const char *mime; 30 const char *mime;
31}; 31};
32 32
33enum iGmRunFlags {
34 startOfLine_GmRunFlag = iBit(1),
35 endOfLine_GmRunFlag = iBit(2),
36};
37
33struct Impl_GmRun { 38struct Impl_GmRun {
34 iRangecc text; 39 iRangecc text;
35 uint8_t font; 40 uint8_t font;
36 uint8_t color; 41 uint8_t color;
42 uint8_t flags;
37 iRect bounds; /* used for hit testing, may extend to edges */ 43 iRect bounds; /* used for hit testing, may extend to edges */
38 iRect visBounds; /* actual visual bounds */ 44 iRect visBounds; /* actual visual bounds */
39 iGmLinkId linkId; /* zero for non-links */ 45 iGmLinkId linkId; /* zero for non-links */