diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-03-28 12:56:39 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-03-28 12:56:39 +0000 |
commit | 270ef59a98d34fef418fb6cd27e46f3edc912948 (patch) | |
tree | 9d363b42d441640e1d2dbff3ba548a2cdf8d67a9 /render/textplain.h | |
parent | 21da4f5bdf74c6654730c32dfcc1c6b3d24da4b4 (diff) | |
download | netsurf-270ef59a98d34fef418fb6cd27e46f3edc912948.tar.gz netsurf-270ef59a98d34fef418fb6cd27e46f3edc912948.tar.bz2 |
Merge jmb/new-cache; r=dsilvers,rs=vince
svn path=/trunk/netsurf/; revision=10180
Diffstat (limited to 'render/textplain.h')
-rw-r--r-- | render/textplain.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/render/textplain.h b/render/textplain.h index 10609a71b..50e29c5be 100644 --- a/render/textplain.h +++ b/render/textplain.h @@ -28,6 +28,8 @@ #include <iconv.h> struct content; +struct hlcache_handle; +struct http_parameter; struct textplain_line { size_t start; @@ -46,8 +48,7 @@ struct content_textplain_data { int formatted_width; }; -bool textplain_create(struct content *c, struct content *parent, - const char *params[]); +bool textplain_create(struct content *c, const struct http_parameter *params); bool textplain_process_data(struct content *c, char *data, unsigned int size); bool textplain_convert(struct content *c, int width, int height); void textplain_reformat(struct content *c, int width, int height); @@ -58,16 +59,17 @@ bool textplain_redraw(struct content *c, int x, int y, float scale, colour background_colour); /* access to lines for text selection and searching */ -#define textplain_line_count(c) ((c)->data.textplain.physical_line_count) -#define textplain_size(c) ((c)->data.textplain.utf8_data_size) +unsigned long textplain_line_count(struct hlcache_handle *h); +size_t textplain_size(struct hlcache_handle *h); -size_t textplain_offset_from_coords(struct content *c, int x, int y, int dir); -void textplain_coords_from_range(struct content *c, +size_t textplain_offset_from_coords(struct hlcache_handle *h, int x, int y, + int dir); +void textplain_coords_from_range(struct hlcache_handle *h, unsigned start, unsigned end, struct rect *r); -char *textplain_get_line(struct content *c, unsigned lineno, +char *textplain_get_line(struct hlcache_handle *h, unsigned lineno, size_t *poffset, size_t *plen); -int textplain_find_line(struct content *c, unsigned offset); -char *textplain_get_raw_data(struct content *c, +int textplain_find_line(struct hlcache_handle *h, unsigned offset); +char *textplain_get_raw_data(struct hlcache_handle *h, unsigned start, unsigned end, size_t *plen); #endif |