From 2fba2249eed773b0092f20f9b71bd5dd19220268 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 7 Apr 2010 18:50:18 +0000 Subject: Add function to test whether hlcache_handle's content is locked. svn path=/trunk/netsurf/; revision=10287 --- content/content.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 9e01171ea..1a1fc9927 100644 --- a/content/content.c +++ b/content/content.c @@ -1301,6 +1301,23 @@ struct bitmap *content__get_bitmap(struct content *c) return c->bitmap; } +/** + * Return whether a content is currently locked + * + * \param c Content to test + * \return true iff locked, else false + */ + +bool content_is_locked(hlcache_handle *h) +{ + return content__is_locked(hlcache_handle_get_content(h)); +} + +bool content__is_locked(struct content *c) +{ + return c->locked; +} + /** * Retrieve the low-level cache handle for a content * -- cgit v1.2.3