summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r--src/gmdocument.h15
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
126struct Impl_GmRun { 126struct 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
163enum iGmDocumentUpdate {
164 partial_GmDocumentUpdate, /* appending more content */
165 final_GmDocumentUpdate, /* process all lines, including the last one if not terminated */
166};
167
163void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed); 168void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed);
164void setFormat_GmDocument (iGmDocument *, enum iGmDocumentFormat format); 169void setFormat_GmDocument (iGmDocument *, enum iGmDocumentFormat format);
165void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type); 170void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type);
@@ -167,10 +172,11 @@ void setWidth_GmDocument (iGmDocument *, int width);
167void redoLayout_GmDocument (iGmDocument *); 172void redoLayout_GmDocument (iGmDocument *);
168iBool updateOpenURLs_GmDocument(iGmDocument *); 173iBool updateOpenURLs_GmDocument(iGmDocument *);
169void setUrl_GmDocument (iGmDocument *, const iString *url); 174void setUrl_GmDocument (iGmDocument *, const iString *url);
170void setSource_GmDocument (iGmDocument *, const iString *source, int width); 175void setSource_GmDocument (iGmDocument *, const iString *source, int width,
176 enum iGmDocumentUpdate updateType);
171void foldPre_GmDocument (iGmDocument *, uint16_t preId); 177void foldPre_GmDocument (iGmDocument *, uint16_t preId);
172 178
173void reset_GmDocument (iGmDocument *); /* free images */ 179//void reset_GmDocument (iGmDocument *); /* free images */
174 180
175typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *); 181typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *);
176 182
@@ -190,6 +196,7 @@ enum iGmDocumentBanner bannerType_GmDocument(const iGmDocument *);
190const iString * bannerText_GmDocument (const iGmDocument *); 196const iString * bannerText_GmDocument (const iGmDocument *);
191const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ 197const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */
192const iString * source_GmDocument (const iGmDocument *); 198const iString * source_GmDocument (const iGmDocument *);
199size_t memorySize_GmDocument (const iGmDocument *); /* bytes */
193 200
194iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start); 201iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start);
195iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before); 202iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before);