/usr/include/mupdf/pdf/annot.h is in libmupdf-dev 1.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #ifndef MUPDF_PDF_ANNOT_H
#define MUPDF_PDF_ANNOT_H
/*
pdf_first_annot: Return the first annotation on a page.
Does not throw exceptions.
*/
pdf_annot *pdf_first_annot(pdf_document *doc, pdf_page *page);
/*
pdf_next_annot: Return the next annotation on a page.
Does not throw exceptions.
*/
pdf_annot *pdf_next_annot(pdf_document *doc, pdf_annot *annot);
/*
pdf_bound_annot: Return the rectangle for an annotation on a page.
Does not throw exceptions.
*/
fz_rect *pdf_bound_annot(pdf_document *doc, pdf_annot *annot, fz_rect *rect);
/*
pdf_annot_type: Return the type of an annotation
*/
fz_annot_type pdf_annot_type(pdf_annot *annot);
/*
pdf_run_annot: Interpret an annotation and render it on a device.
page: A page loaded by pdf_load_page.
annot: an annotation.
dev: Device used for rendering, obtained from fz_new_*_device.
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 *doc, pdf_page *page, pdf_annot *annot, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie);
struct pdf_annot_s
{
pdf_page *page;
pdf_obj *obj;
fz_rect rect;
fz_rect pagerect;
pdf_xobject *ap;
int ap_iteration;
fz_matrix matrix;
pdf_annot *next;
pdf_annot *next_changed;
int annot_type;
int widget_type;
};
fz_link_dest pdf_parse_link_dest(pdf_document *doc, pdf_obj *dest);
fz_link_dest pdf_parse_action(pdf_document *doc, pdf_obj *action);
pdf_obj *pdf_lookup_dest(pdf_document *doc, pdf_obj *needle);
pdf_obj *pdf_lookup_name(pdf_document *doc, char *which, pdf_obj *needle);
pdf_obj *pdf_load_name_tree(pdf_document *doc, char *which);
fz_link *pdf_load_link_annots(pdf_document *, pdf_obj *annots, const fz_matrix *page_ctm);
pdf_annot *pdf_load_annots(pdf_document *, pdf_obj *annots, pdf_page *page);
void pdf_update_annot(pdf_document *, pdf_annot *annot);
void pdf_free_annot(fz_context *ctx, pdf_annot *link);
/*
pdf_create_annot: create a new annotation of the specified type on the
specified page. The returned pdf_annot structure is owned by the page
and does not need to be freed.
*/
pdf_annot *pdf_create_annot(pdf_document *doc, pdf_page *page, fz_annot_type type);
/*
pdf_delete_annot: delete an annotation
*/
void pdf_delete_annot(pdf_document *doc, pdf_page *page, pdf_annot *annot);
/*
pdf_set_markup_annot_quadpoints: set the quadpoints for a text-markup annotation.
*/
void pdf_set_markup_annot_quadpoints(pdf_document *doc, pdf_annot *annot, fz_point *qp, int n);
/*
fz_set_ink_annot_list: set the details of an ink annotation. All the points of the multiple arcs
are carried in a single array, with the counts for each arc held in a secondary array.
*/
void pdf_set_ink_annot_list(pdf_document *doc, pdf_annot *annot, fz_point *pts, int *counts, int ncount, float color[3], float thickness);
fz_annot_type pdf_annot_obj_type(pdf_obj *obj);
/*
pdf_poll_changed_annot: enumerate the changed annotations recoreded
by a call to pdf_update_page.
*/
pdf_annot *pdf_poll_changed_annot(pdf_document *idoc, pdf_page *page);
#endif
|