summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-24 23:52:10 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-24 23:52:10 +0100
commit9729febf7245431e80f4fe0acfba212db08e770d (patch)
tree4b7ee30ff155c1c7c1f720e7071bb47d3c122ca2 /content/content.h
parent921f15bb7d543390cfbd19cea9e30b527e7f6c28 (diff)
parent75d3fdc42e4b92f73efa93271c4bb37b1be6a650 (diff)
downloadnetsurf-9729febf7245431e80f4fe0acfba212db08e770d.tar.gz
netsurf-9729febf7245431e80f4fe0acfba212db08e770d.tar.bz2
Merge branch 'thumbnail-rework'
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/content/content.h b/content/content.h
index f0761d748..6c05df9c5 100644
--- a/content/content.h
+++ b/content/content.h
@@ -270,6 +270,27 @@ void content_mouse_action(struct hlcache_handle *h, struct browser_window *bw,
bool content_keypress(struct hlcache_handle *h, uint32_t key);
bool content_redraw(struct hlcache_handle *h, struct content_redraw_data *data,
const struct rect *clip, const struct redraw_context *ctx);
+
+
+/**
+ * Redraw a content with scale set for horizontal fit.
+ *
+ * Redraws the content at a specified width and height with the
+ * content drawing scaled to fit within the area.
+ *
+ * \param content The content to redraw
+ * \param width The target width
+ * \param height The target height
+ * \param ctx current redraw context
+ * \return true if successful, false otherwise
+ *
+ * The thumbnail is guaranteed to be filled to its width/height extents, so
+ * there is no need to render a solid background first.
+ *
+ * Units for width and height are pixels.
+ */
+bool content_scaled_redraw(struct hlcache_handle *content, int width, int height, const struct redraw_context *ctx);
+
void content_open(struct hlcache_handle *h, struct browser_window *bw,
struct content *page, struct object_params *params);
void content_close(struct hlcache_handle *h);