From 6f18be186a4861a758023ceba92f098273b2dc5c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 27 Jul 2020 21:48:02 +0300 Subject: Visualizing links Show which links are to the same site, and which are HTTP/S, Gopher, or files. --- src/gmdocument.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gmdocument.h') 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) typedef uint16_t iGmLinkId; +enum iGmLinkFlags { + remote_GmLinkFlag = 0x1, + http_GmLinkFlag = 0x2, + gopher_GmLinkFlag = 0x4, + file_GmLinkFlag = 0x8, +}; + struct Impl_GmRun { iRangecc text; iRect bounds; /* used for hit testing, extends to edge */ @@ -24,6 +31,7 @@ iDeclareClass(GmDocument) iDeclareObjectConstruction(GmDocument) void setWidth_GmDocument (iGmDocument *, int width); +void setHost_GmDocument (iGmDocument *, const iString *host); /* local host name */ void setSource_GmDocument (iGmDocument *, const iString *source, int width); typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); @@ -38,4 +46,6 @@ const iGmRun * findRun_GmDocument (const iGmDocument *, iInt2 pos); const char * findLoc_GmDocument (const iGmDocument *, iInt2 pos); const iGmRun * findRunAtLoc_GmDocument (const iGmDocument *, const char *loc); const iString * linkUrl_GmDocument (const iGmDocument *, iGmLinkId linkId); +int linkFlags_GmDocument (const iGmDocument *, iGmLinkId linkId); +enum iColorId linkColor_GmDocument (const iGmDocument *, iGmLinkId linkId); const iString * title_GmDocument (const iGmDocument *); -- cgit v1.2.3