diff options
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r-- | src/gmdocument.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h index 574f0acf..1e54a16a 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h | |||
@@ -125,12 +125,12 @@ enum iGmRunMediaType { | |||
125 | 125 | ||
126 | struct Impl_GmRun { | 126 | struct Impl_GmRun { |
127 | iRangecc text; | 127 | iRangecc text; |
128 | iRect bounds; /* used for hit testing, may extend to edges */ | ||
129 | iRect visBounds; /* actual visual bounds */ | ||
128 | uint8_t font; | 130 | uint8_t font; |
129 | uint8_t color; | 131 | uint8_t color; |
130 | uint8_t flags; | 132 | uint8_t flags; |
131 | uint8_t mediaType; | 133 | uint8_t mediaType; |
132 | iRect bounds; /* used for hit testing, may extend to edges */ | ||
133 | iRect visBounds; /* actual visual bounds */ | ||
134 | uint16_t preId; /* preformatted block ID (sequential) */ | 134 | uint16_t preId; /* preformatted block ID (sequential) */ |
135 | iGmLinkId linkId; /* zero for non-links */ | 135 | iGmLinkId linkId; /* zero for non-links */ |
136 | uint16_t mediaId; /* zero if not an image */ | 136 | uint16_t mediaId; /* zero if not an image */ |
@@ -160,6 +160,11 @@ enum iGmDocumentBanner { | |||
160 | certificateWarning_GmDocumentBanner, | 160 | certificateWarning_GmDocumentBanner, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | enum iGmDocumentUpdate { | ||
164 | partial_GmDocumentUpdate, /* appending more content */ | ||
165 | final_GmDocumentUpdate, /* process all lines, including the last one if not terminated */ | ||
166 | }; | ||
167 | |||
163 | void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed); | 168 | void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed); |
164 | void setFormat_GmDocument (iGmDocument *, enum iGmDocumentFormat format); | 169 | void setFormat_GmDocument (iGmDocument *, enum iGmDocumentFormat format); |
165 | void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type); | 170 | void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type); |
@@ -167,10 +172,11 @@ void setWidth_GmDocument (iGmDocument *, int width); | |||
167 | void redoLayout_GmDocument (iGmDocument *); | 172 | void redoLayout_GmDocument (iGmDocument *); |
168 | iBool updateOpenURLs_GmDocument(iGmDocument *); | 173 | iBool updateOpenURLs_GmDocument(iGmDocument *); |
169 | void setUrl_GmDocument (iGmDocument *, const iString *url); | 174 | void setUrl_GmDocument (iGmDocument *, const iString *url); |
170 | void setSource_GmDocument (iGmDocument *, const iString *source, int width); | 175 | void setSource_GmDocument (iGmDocument *, const iString *source, int width, |
176 | enum iGmDocumentUpdate updateType); | ||
171 | void foldPre_GmDocument (iGmDocument *, uint16_t preId); | 177 | void foldPre_GmDocument (iGmDocument *, uint16_t preId); |
172 | 178 | ||
173 | void reset_GmDocument (iGmDocument *); /* free images */ | 179 | //void reset_GmDocument (iGmDocument *); /* free images */ |
174 | 180 | ||
175 | typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); | 181 | typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); |
176 | 182 | ||
@@ -190,6 +196,7 @@ enum iGmDocumentBanner bannerType_GmDocument(const iGmDocument *); | |||
190 | const iString * bannerText_GmDocument (const iGmDocument *); | 196 | const iString * bannerText_GmDocument (const iGmDocument *); |
191 | const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ | 197 | const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ |
192 | const iString * source_GmDocument (const iGmDocument *); | 198 | const iString * source_GmDocument (const iGmDocument *); |
199 | size_t memorySize_GmDocument (const iGmDocument *); /* bytes */ | ||
193 | 200 | ||
194 | iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start); | 201 | iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start); |
195 | iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before); | 202 | iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before); |