[evince] ev-page-cache: Add method to check if a given page has been cached
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] ev-page-cache: Add method to check if a given page has been cached
- Date: Mon, 23 Jun 2014 16:40:54 +0000 (UTC)
commit a898d96d18fcb88e9ec2958d2fdde4af817ee7ec
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Jun 23 08:41:00 2014 -0400
ev-page-cache: Add method to check if a given page has been cached
The Accessibility code will expose child objects (links, images, form
fields) of the page, but can only do so after that page has been cached.
https://bugzilla.gnome.org/show_bug.cgi?id=728475
libview/ev-page-cache.c | 14 ++++++++++++++
libview/ev-page-cache.h | 2 ++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-page-cache.c b/libview/ev-page-cache.c
index eda5579..6d2312f 100644
--- a/libview/ev-page-cache.c
+++ b/libview/ev-page-cache.c
@@ -664,3 +664,17 @@ ev_page_cache_ensure_page (EvPageCache *cache,
ev_page_cache_schedule_job_if_needed (cache, page);
}
+
+gboolean
+ev_page_cache_is_page_cached (EvPageCache *cache,
+ gint page)
+{
+ EvPageCacheData *data;
+
+ g_return_val_if_fail (EV_IS_PAGE_CACHE (cache), FALSE);
+ g_return_val_if_fail (page >= 0 && page < cache->n_pages, FALSE);
+
+ data = &cache->page_list[page];
+
+ return data->done;
+}
diff --git a/libview/ev-page-cache.h b/libview/ev-page-cache.h
index 550ac28..904898c 100644
--- a/libview/ev-page-cache.h
+++ b/libview/ev-page-cache.h
@@ -76,6 +76,8 @@ gboolean ev_page_cache_get_text_log_attrs (EvPageCache *cach
gulong *n_attrs);
void ev_page_cache_ensure_page (EvPageCache *cache,
gint page);
+gboolean ev_page_cache_is_page_cached (EvPageCache *cache,
+ gint page);
G_END_DECLS
#endif /* EV_PAGE_CACHE_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]