summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-27 21:48:02 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-27 21:48:02 +0300
commit6f18be186a4861a758023ceba92f098273b2dc5c (patch)
tree4fe629e0fa54de8eea5eb2b117efae277287f86b /src/gmdocument.h
parentd3b5fe0d8d05d8e76d3f4646f02b0fa78561b1db (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.h10
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
10typedef uint16_t iGmLinkId; 10typedef uint16_t iGmLinkId;
11 11
12enum iGmLinkFlags {
13 remote_GmLinkFlag = 0x1,
14 http_GmLinkFlag = 0x2,
15 gopher_GmLinkFlag = 0x4,
16 file_GmLinkFlag = 0x8,
17};
18
12struct Impl_GmRun { 19struct 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)
24iDeclareObjectConstruction(GmDocument) 31iDeclareObjectConstruction(GmDocument)
25 32
26void setWidth_GmDocument (iGmDocument *, int width); 33void setWidth_GmDocument (iGmDocument *, int width);
34void setHost_GmDocument (iGmDocument *, const iString *host); /* local host name */
27void setSource_GmDocument (iGmDocument *, const iString *source, int width); 35void setSource_GmDocument (iGmDocument *, const iString *source, int width);
28 36
29typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); 37typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *);
@@ -38,4 +46,6 @@ const iGmRun * findRun_GmDocument (const iGmDocument *, iInt2 pos);
38const char * findLoc_GmDocument (const iGmDocument *, iInt2 pos); 46const char * findLoc_GmDocument (const iGmDocument *, iInt2 pos);
39const iGmRun * findRunAtLoc_GmDocument (const iGmDocument *, const char *loc); 47const iGmRun * findRunAtLoc_GmDocument (const iGmDocument *, const char *loc);
40const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId); 48const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId);
49int linkFlags_GmDocument (const iGmDocument *, iGmLinkId linkId);
50enum iColorId linkColor_GmDocument (const iGmDocument *, iGmLinkId linkId);
41const iString * title_GmDocument (const iGmDocument *); 51const iString * title_GmDocument (const iGmDocument *);