diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-27 21:48:02 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-27 21:48:02 +0300 |
commit | 6f18be186a4861a758023ceba92f098273b2dc5c (patch) | |
tree | 4fe629e0fa54de8eea5eb2b117efae277287f86b /src/gmdocument.h | |
parent | d3b5fe0d8d05d8e76d3f4646f02b0fa78561b1db (diff) |
Visualizing links
Show which links are to the same site, and which are HTTP/S, Gopher, or files.
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r-- | src/gmdocument.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h index f392a9f2..ebe0ed50 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h | |||
@@ -9,6 +9,13 @@ iDeclareType(GmRun) | |||
9 | 9 | ||
10 | typedef uint16_t iGmLinkId; | 10 | typedef uint16_t iGmLinkId; |
11 | 11 | ||
12 | enum iGmLinkFlags { | ||
13 | remote_GmLinkFlag = 0x1, | ||
14 | http_GmLinkFlag = 0x2, | ||
15 | gopher_GmLinkFlag = 0x4, | ||
16 | file_GmLinkFlag = 0x8, | ||
17 | }; | ||
18 | |||
12 | struct Impl_GmRun { | 19 | struct Impl_GmRun { |
13 | iRangecc text; | 20 | iRangecc text; |
14 | iRect bounds; /* used for hit testing, extends to edge */ | 21 | iRect bounds; /* used for hit testing, extends to edge */ |
@@ -24,6 +31,7 @@ iDeclareClass(GmDocument) | |||
24 | iDeclareObjectConstruction(GmDocument) | 31 | iDeclareObjectConstruction(GmDocument) |
25 | 32 | ||
26 | void setWidth_GmDocument (iGmDocument *, int width); | 33 | void setWidth_GmDocument (iGmDocument *, int width); |
34 | void setHost_GmDocument (iGmDocument *, const iString *host); /* local host name */ | ||
27 | void setSource_GmDocument (iGmDocument *, const iString *source, int width); | 35 | void setSource_GmDocument (iGmDocument *, const iString *source, int width); |
28 | 36 | ||
29 | typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); | 37 | typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); |
@@ -38,4 +46,6 @@ const iGmRun * findRun_GmDocument (const iGmDocument *, iInt2 pos); | |||
38 | const char * findLoc_GmDocument (const iGmDocument *, iInt2 pos); | 46 | const char * findLoc_GmDocument (const iGmDocument *, iInt2 pos); |
39 | const iGmRun * findRunAtLoc_GmDocument (const iGmDocument *, const char *loc); | 47 | const iGmRun * findRunAtLoc_GmDocument (const iGmDocument *, const char *loc); |
40 | const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId); | 48 | const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId); |
49 | int linkFlags_GmDocument (const iGmDocument *, iGmLinkId linkId); | ||
50 | enum iColorId linkColor_GmDocument (const iGmDocument *, iGmLinkId linkId); | ||
41 | const iString * title_GmDocument (const iGmDocument *); | 51 | const iString * title_GmDocument (const iGmDocument *); |