summaryrefslogtreecommitdiff
path: root/include/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'include/fitz')
-rw-r--r--include/fitz/cmap.h1
-rw-r--r--include/fitz/colorspace.h3
-rw-r--r--include/fitz/font.h2
-rw-r--r--include/fitz/image.h2
-rw-r--r--include/fitz/object.h2
-rw-r--r--include/fitz/tree.h2
6 files changed, 9 insertions, 3 deletions
diff --git a/include/fitz/cmap.h b/include/fitz/cmap.h
index b076d749..768d896a 100644
--- a/include/fitz/cmap.h
+++ b/include/fitz/cmap.h
@@ -2,6 +2,7 @@ typedef struct fz_cmap_s fz_cmap;
fz_error *fz_newcmap(fz_cmap **cmapp);
void fz_debugcmap(fz_cmap *cmap);
+fz_cmap *fz_keepcmap(fz_cmap *cmap);
void fz_dropcmap(fz_cmap *cmap);
char *fz_getcmapname(fz_cmap *cmap);
diff --git a/include/fitz/colorspace.h b/include/fitz/colorspace.h
index 9b5a5dbb..ec4d019c 100644
--- a/include/fitz/colorspace.h
+++ b/include/fitz/colorspace.h
@@ -6,8 +6,8 @@ typedef struct fz_colorcube4_s fz_colorcube4;
struct fz_colorspace_s
{
+ int nrefs;
char name[16];
- int frozen;
int n;
void (*toxyz)(fz_colorspace *, float *src, float *xyz);
void (*fromxyz)(fz_colorspace *, float *xyz, float *dst);
@@ -25,6 +25,7 @@ struct fz_colorcube_s
void **subcube; /* dst->n * colorcube(src->n) */
};
+fz_colorspace *fz_keepcolorspace(fz_colorspace *cs);
void fz_dropcolorspace(fz_colorspace *cs);
void fz_convertcolor(fz_colorspace *srcs, float *srcv, fz_colorspace *dsts, float *dstv);
diff --git a/include/fitz/font.h b/include/fitz/font.h
index a3caec7f..fb29e1c2 100644
--- a/include/fitz/font.h
+++ b/include/fitz/font.h
@@ -22,6 +22,7 @@ struct fz_vmtx_s
struct fz_font_s
{
+ int nrefs;
char name[32];
fz_error* (*render)(fz_glyph*, fz_font*, int, fz_matrix);
@@ -46,6 +47,7 @@ struct fz_glyph_s
};
void fz_initfont(fz_font *font, char *name);
+fz_font *fz_keepfont(fz_font *font);
void fz_dropfont(fz_font *font);
void fz_debugfont(fz_font *font);
void fz_setfontwmode(fz_font *font, int wmode);
diff --git a/include/fitz/image.h b/include/fitz/image.h
index cfbba169..6debfaa5 100644
--- a/include/fitz/image.h
+++ b/include/fitz/image.h
@@ -4,11 +4,13 @@ typedef struct fz_image_s fz_image;
struct fz_image_s
{
+ int nrefs;
fz_error* (*loadtile)(fz_image*,fz_pixmap*);
void (*drop)(fz_image*);
fz_colorspace *cs;
int w, h, n, a;
};
+fz_image *fz_keepimage(fz_image *img);
void fz_dropimage(fz_image *img);
diff --git a/include/fitz/object.h b/include/fitz/object.h
index d24b8a7a..014dc33d 100644
--- a/include/fitz/object.h
+++ b/include/fitz/object.h
@@ -71,7 +71,7 @@ fz_error *fz_deepcopyarray(fz_obj **op, fz_obj *array);
fz_error *fz_deepcopydict(fz_obj **op, fz_obj *dict);
fz_obj *fz_keepobj(fz_obj *obj);
-fz_obj *fz_dropobj(fz_obj *obj);
+void fz_dropobj(fz_obj *obj);
/* type queries */
int fz_isnull(fz_obj *obj);
diff --git a/include/fitz/tree.h b/include/fitz/tree.h
index a14de20d..af9fc36c 100644
--- a/include/fitz/tree.h
+++ b/include/fitz/tree.h
@@ -3,7 +3,7 @@ typedef struct fz_node_s fz_node;
struct fz_tree_s
{
- int refcount;
+ int nrefs;
fz_node *root;
fz_node *head;
};