diff options
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r-- | src/gmdocument.h | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h index 9d906006..9a7a70df 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h | |||
@@ -65,28 +65,36 @@ iBool isDark_GmDocumentTheme(enum iGmDocumentTheme); | |||
65 | 65 | ||
66 | typedef uint16_t iGmLinkId; | 66 | typedef uint16_t iGmLinkId; |
67 | 67 | ||
68 | enum iGmLinkScheme { | ||
69 | gemini_GmLinkScheme = 1, | ||
70 | titan_GmLinkScheme, | ||
71 | gopher_GmLinkScheme, | ||
72 | finger_GmLinkScheme, | ||
73 | http_GmLinkScheme, | ||
74 | file_GmLinkScheme, | ||
75 | data_GmLinkScheme, | ||
76 | about_GmLinkScheme, | ||
77 | mailto_GmLinkScheme, | ||
78 | }; | ||
79 | |||
68 | enum iGmLinkFlag { | 80 | enum iGmLinkFlag { |
69 | gemini_GmLinkFlag = iBit(1), | 81 | supportedScheme_GmLinkFlag = 0x3f, /* mask of bits 1...6 */ |
70 | gopher_GmLinkFlag = iBit(2), | 82 | remote_GmLinkFlag = iBit(7), |
71 | finger_GmLinkFlag = iBit(3), | 83 | humanReadable_GmLinkFlag = iBit(8), /* link has a human-readable description */ |
72 | http_GmLinkFlag = iBit(4), | 84 | imageFileExtension_GmLinkFlag = iBit(9), |
73 | file_GmLinkFlag = iBit(5), | 85 | audioFileExtension_GmLinkFlag = iBit(10), |
74 | data_GmLinkFlag = iBit(6), | 86 | content_GmLinkFlag = iBit(11), /* content visible below */ |
75 | about_GmLinkFlag = iBit(7), | 87 | visited_GmLinkFlag = iBit(12), /* in the history */ |
76 | mailto_GmLinkFlag = iBit(8), | 88 | permanent_GmLinkFlag = iBit(13), /* content cannot be dismissed; media link */ |
77 | supportedProtocol_GmLinkFlag = 0xff, | 89 | query_GmLinkFlag = iBit(14), /* Gopher query link */ |
78 | remote_GmLinkFlag = iBit(9), | 90 | iconFromLabel_GmLinkFlag = iBit(15), /* use an Emoji/special character from label */ |
79 | humanReadable_GmLinkFlag = iBit(10), /* link has a human-readable description */ | 91 | isOpen_GmLinkFlag = iBit(16), /* currently open in a tab */ |
80 | imageFileExtension_GmLinkFlag = iBit(11), | ||
81 | audioFileExtension_GmLinkFlag = iBit(12), | ||
82 | content_GmLinkFlag = iBit(13), /* content visible below */ | ||
83 | visited_GmLinkFlag = iBit(14), /* in the history */ | ||
84 | permanent_GmLinkFlag = iBit(15), /* content cannot be dismissed; media link */ | ||
85 | query_GmLinkFlag = iBit(16), /* Gopher query link */ | ||
86 | iconFromLabel_GmLinkFlag = iBit(17), /* use an Emoji/special character from label */ | ||
87 | isOpen_GmLinkFlag = iBit(18), /* currently open in a tab */ | ||
88 | }; | 92 | }; |
89 | 93 | ||
94 | iLocalDef enum iGmLinkScheme scheme_GmLinkFlag(int flags) { | ||
95 | return flags & supportedScheme_GmLinkFlag; | ||
96 | } | ||
97 | |||
90 | struct Impl_GmHeading { | 98 | struct Impl_GmHeading { |
91 | iRangecc text; | 99 | iRangecc text; |
92 | int level; /* 0, 1, 2 */ | 100 | int level; /* 0, 1, 2 */ |