diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-01-05 14:21:46 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-01-05 14:47:37 +0100 |
commit | 041a2c827efbf2ed0931426129e38aef9412177f (patch) | |
tree | 0cd5e492fddb901a52825ce7d7e7382ff50b3f67 /include | |
parent | d521de5ffad2dcc6c151e25373dd8a26a84440eb (diff) | |
download | mupdf-041a2c827efbf2ed0931426129e38aef9412177f.tar.xz |
Separate pdf_drop_annots (that drops lists) and fz_drop_annot.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/annotation.h | 7 | ||||
-rw-r--r-- | include/mupdf/fitz/document.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/annot.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/include/mupdf/fitz/annotation.h b/include/mupdf/fitz/annotation.h index 82a902e6..a3120858 100644 --- a/include/mupdf/fitz/annotation.h +++ b/include/mupdf/fitz/annotation.h @@ -36,9 +36,12 @@ typedef enum } fz_annot_type; /* - fz_get_annot_type: return the type of an annotation + fz_new_annot: Create and initialize an annotation struct. */ -fz_annot_type fz_get_annot_type(fz_context *ctx, fz_annot *annot); +void *fz_new_annot(fz_context *ctx, int size); + +fz_annot *fz_keep_annot(fz_context *ctx, fz_annot *annot); +void fz_drop_annot(fz_context *ctx, fz_annot *annot); /* fz_first_annot: Return a pointer to the first annotation on a page. diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h index f8e67668..1964e41c 100644 --- a/include/mupdf/fitz/document.h +++ b/include/mupdf/fitz/document.h @@ -49,6 +49,7 @@ typedef int (fz_page_separation_disabled_fn)(fz_context *ctx, fz_page *page, int typedef int (fz_page_count_separations_fn)(fz_context *ctx, fz_page *page); typedef const char *(fz_page_get_separation_fn)(fz_context *ctx, fz_page *page, int separation, uint32_t *rgb, uint32_t *cmyk); +typedef void (fz_annot_drop_imp_fn)(fz_context *ctx, fz_annot *annot); typedef fz_annot *(fz_annot_next_fn)(fz_context *ctx, fz_annot *annot); typedef fz_rect *(fz_annot_bound_fn)(fz_context *ctx, fz_annot *annot, fz_rect *rect); typedef void (fz_annot_run_fn)(fz_context *ctx, fz_annot *annot, fz_device *dev, const fz_matrix *transform, fz_cookie *cookie); @@ -56,6 +57,7 @@ typedef void (fz_annot_run_fn)(fz_context *ctx, fz_annot *annot, fz_device *dev, struct fz_annot_s { int refs; + fz_annot_drop_imp_fn *drop_annot_imp; fz_annot_bound_fn *bound_annot; fz_annot_run_fn *run_annot; fz_annot_next_fn *next_annot; diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 7328be4d..e25ec5db 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -83,7 +83,7 @@ fz_link *pdf_load_link_annots(fz_context *ctx, pdf_document *, pdf_obj *annots, void pdf_transform_annot(fz_context *ctx, pdf_annot *annot); void pdf_load_annots(fz_context *ctx, pdf_document *, pdf_page *page, pdf_obj *annots); void pdf_update_annot(fz_context *ctx, pdf_document *, pdf_annot *annot); -void pdf_drop_annot(fz_context *ctx, pdf_annot *link); +void pdf_drop_annots(fz_context *ctx, pdf_annot *annot_list); /* pdf_create_annot: create a new annotation of the specified type on the |