diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-06-24 22:03:54 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-25 10:11:18 +0100 |
commit | 997902cd2a0d46404ff4fe09a7380410d1499c5a (patch) | |
tree | ded41aa535d7445807aea17a364f993fb8603729 /include | |
parent | 07dd8540ae72b0e7be64d04c38d8c19b83d184b6 (diff) | |
download | mupdf-997902cd2a0d46404ff4fe09a7380410d1499c5a.tar.xz |
Rid the world of "pdf_document *xref".
For historical reasons lots of the code uses "xref" when talking about
a pdf document. Now pdf_xref is a separate type this has become
confusing, so replace 'xref' with 'doc' for clarity.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/pdf/annot.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/document.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/object.h | 8 | ||||
-rw-r--r-- | include/mupdf/pdf/output-pdf.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/page.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/resource.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/xref.h | 10 |
7 files changed, 14 insertions, 14 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 74a68ae0..77066569 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -39,7 +39,7 @@ fz_annot_type pdf_annot_type(pdf_annot *annot); ctm: A transformation matrix applied to the objects on the page, e.g. to scale or rotate the page contents as desired. */ -void pdf_run_annot(pdf_document *xref, pdf_page *page, pdf_annot *annot, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); +void pdf_run_annot(pdf_document *doc, pdf_page *page, pdf_annot *annot, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); struct pdf_annot_s { diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h index a491e1de..5071f4d3 100644 --- a/include/mupdf/pdf/document.h +++ b/include/mupdf/pdf/document.h @@ -201,7 +201,7 @@ struct pdf_document_s pdf_js *js; int recalculating; int dirty; - void (*update_appearance)(pdf_document *xref, pdf_annot *annot); + void (*update_appearance)(pdf_document *doc, pdf_annot *annot); pdf_doc_event_cb *event_cb; void *event_cb_data; diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h index c1648b9a..522ce411 100644 --- a/include/mupdf/pdf/object.h +++ b/include/mupdf/pdf/object.h @@ -91,10 +91,10 @@ void pdf_print_obj(pdf_obj *obj); void pdf_print_ref(pdf_obj *obj); #endif -char *pdf_to_utf8(pdf_document *xref, pdf_obj *src); -unsigned short *pdf_to_ucs2(pdf_document *xref, pdf_obj *src); -pdf_obj *pdf_to_utf8_name(pdf_document *xref, pdf_obj *src); -char *pdf_from_ucs2(pdf_document *xref, unsigned short *str); +char *pdf_to_utf8(pdf_document *doc, pdf_obj *src); +unsigned short *pdf_to_ucs2(pdf_document *doc, pdf_obj *src); +pdf_obj *pdf_to_utf8_name(pdf_document *doc, pdf_obj *src); +char *pdf_from_ucs2(pdf_document *doc, unsigned short *str); void pdf_to_ucs2_buf(unsigned short *buffer, pdf_obj *src); fz_rect *pdf_to_rect(fz_context *ctx, pdf_obj *array, fz_rect *rect); diff --git a/include/mupdf/pdf/output-pdf.h b/include/mupdf/pdf/output-pdf.h index 0a5c7a46..fe7e4b5a 100644 --- a/include/mupdf/pdf/output-pdf.h +++ b/include/mupdf/pdf/output-pdf.h @@ -13,6 +13,6 @@ fz_device *pdf_new_pdf_device(pdf_document *doc, pdf_obj *contents, pdf_obj *res */ void pdf_write_document(pdf_document *doc, char *filename, fz_write_options *opts); -void pdf_localise_page_resources(pdf_document *xref); +void pdf_localise_page_resources(pdf_document *doc); #endif diff --git a/include/mupdf/pdf/page.h b/include/mupdf/pdf/page.h index f60a8836..7eaa93d9 100644 --- a/include/mupdf/pdf/page.h +++ b/include/mupdf/pdf/page.h @@ -62,7 +62,7 @@ void pdf_run_page_with_usage(pdf_document *doc, pdf_page *page, fz_device *dev, ctm: A transformation matrix applied to the objects on the page, e.g. to scale or rotate the page contents as desired. */ -void pdf_run_page_contents(pdf_document *xref, pdf_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); +void pdf_run_page_contents(pdf_document *doc, pdf_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); /* Presentation interface. diff --git a/include/mupdf/pdf/resource.h b/include/mupdf/pdf/resource.h index ff2f5218..fb088a3d 100644 --- a/include/mupdf/pdf/resource.h +++ b/include/mupdf/pdf/resource.h @@ -70,7 +70,7 @@ pdf_xobject *pdf_load_xobject(pdf_document *doc, pdf_obj *obj); pdf_obj *pdf_new_xobject(pdf_document *doc, const fz_rect *bbox, const fz_matrix *mat); pdf_xobject *pdf_keep_xobject(fz_context *ctx, pdf_xobject *xobj); void pdf_drop_xobject(fz_context *ctx, pdf_xobject *xobj); -void pdf_update_xobject_contents(pdf_document *xref, pdf_xobject *form, fz_buffer *buffer); +void pdf_update_xobject_contents(pdf_document *doc, pdf_xobject *form, fz_buffer *buffer); void pdf_update_appearance(pdf_document *doc, pdf_annot *annot); diff --git a/include/mupdf/pdf/xref.h b/include/mupdf/pdf/xref.h index d4317bad..ca9bfafe 100644 --- a/include/mupdf/pdf/xref.h +++ b/include/mupdf/pdf/xref.h @@ -4,17 +4,17 @@ /* pdf_create_object: Allocate a slot in the xref table and return a fresh unused object number. */ -int pdf_create_object(pdf_document *xref); +int pdf_create_object(pdf_document *doc); /* pdf_delete_object: Remove object from xref table, marking the slot as free. */ -void pdf_delete_object(pdf_document *xref, int num); +void pdf_delete_object(pdf_document *doc, int num); /* pdf_update_object: Replace object in xref table with the passed in object. */ -void pdf_update_object(pdf_document *xref, int num, pdf_obj *obj); +void pdf_update_object(pdf_document *doc, int num, pdf_obj *obj); /* pdf_update_stream: Replace stream contents for object in xref table with the passed in buffer. @@ -24,7 +24,7 @@ void pdf_update_object(pdf_document *xref, int num, pdf_obj *obj); the stream dictionary. If storing deflated data, make sure to set the /Filter value to /FlateDecode. */ -void pdf_update_stream(pdf_document *xref, int num, fz_buffer *buf); +void pdf_update_stream(pdf_document *doc, int num, fz_buffer *buf); /* * xref and object / stream api @@ -64,7 +64,7 @@ fz_stream *pdf_open_inline_stream(pdf_document *doc, pdf_obj *stmobj, int length fz_compressed_buffer *pdf_load_compressed_stream(pdf_document *doc, int num, int gen); fz_stream *pdf_open_stream_with_offset(pdf_document *doc, int num, int gen, pdf_obj *dict, int stm_ofs); fz_stream *pdf_open_compressed_stream(fz_context *ctx, fz_compressed_buffer *); -fz_stream *pdf_open_contents_stream(pdf_document *xref, pdf_obj *obj); +fz_stream *pdf_open_contents_stream(pdf_document *doc, pdf_obj *obj); fz_buffer *pdf_load_raw_renumbered_stream(pdf_document *doc, int num, int gen, int orig_num, int orig_gen); fz_buffer *pdf_load_renumbered_stream(pdf_document *doc, int num, int gen, int orig_num, int orig_gen, int *truncated); fz_stream *pdf_open_raw_renumbered_stream(pdf_document *doc, int num, int gen, int orig_num, int orig_gen); |