1 /* Copyright (C) 2001-2002 Ghostgum Software Pty Ltd.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under licence and may not be copied,
7   modified or distributed except as expressly authorised under the terms
8   of the licence contained in the file LICENCE in this distribution.
9 */
10 
11 /* $Id: cpagec.h,v 1.1 2002/04/17 11:39:07 ghostgum Exp $ */
12 /* Page cache header */
13 
14 /* Public */
15 void pt_to_pixel(PAGESPEC *ps, double *x, double *y);
16 void pixel_to_pt(PAGESPEC *ps, double *x, double *y);
17 
18 PAGECACHE *pagecache_new(GSview *app, GSREQ *req, IMAGE *img, PDFLINK *pdflinks);
19 PAGECACHE * pagecache_find(GSview *app, PAGESPEC *ps);
20 int pagecache_unref(GSview *app, PAGECACHE *page);
21 int pagecache_unref_all(GSview *app) ;
22 
23 
24 /****************************************************/
25 /* Private */
26 #ifdef DEFINE_CPAGEC
27 
28 /* page cache */
29 struct PAGECACHE_s {
30     PAGECACHE *next;	    /* linked list */
31     int refcount;	    /* number of views using this image */
32     PAGESPEC pagespec;
33     /* changes to img must be protected by app_lock */
34     IMAGE img;
35     PDFLINK *pdflink;
36 };
37 
38 
39 #endif /* DEFINE_CPAGEC */
40