summaryrefslogtreecommitdiff
path: root/pdf/mupdf.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-12-23 12:59:24 +0000
committerRobin Watts <robin.watts@artifex.com>2011-12-23 13:18:42 +0000
commit73e548cdd564c6c2099ceafaa4019a7dbb188a30 (patch)
treee2d0b498abf0f0057d7d565d6b465226e6491d60 /pdf/mupdf.h
parentcc4dd0f8358d3de1594cc530b8f2691bccf194f0 (diff)
downloadmupdf-73e548cdd564c6c2099ceafaa4019a7dbb188a30.tar.xz
Generalise pdf_links to be fz_links.
Move to a non-pdf specific type for links. PDF specific parsing is done in pdf_annots.c as before, but the essential type (and handling functions for that type) are in a new file fitz/base_link.c. The new type is more expressive than before; specifically all the possible PDF modes are expressable in it. Hopefully this should allow XPS links to be represented too.
Diffstat (limited to 'pdf/mupdf.h')
-rw-r--r--pdf/mupdf.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/pdf/mupdf.h b/pdf/mupdf.h
index 7db1ca36..ca173b12 100644
--- a/pdf/mupdf.h
+++ b/pdf/mupdf.h
@@ -409,26 +409,8 @@ void pdf_debug_font(pdf_font_desc *fontdesc);
* Interactive features
*/
-typedef struct pdf_link_s pdf_link;
typedef struct pdf_annot_s pdf_annot;
-typedef enum pdf_link_kind_e
-{
- PDF_LINK_GOTO = 0,
- PDF_LINK_URI,
- PDF_LINK_LAUNCH,
- PDF_LINK_NAMED,
- PDF_LINK_ACTION,
-} pdf_link_kind;
-
-struct pdf_link_s
-{
- pdf_link_kind kind;
- fz_rect rect;
- fz_obj *dest;
- pdf_link *next;
-};
-
struct pdf_annot_s
{
fz_obj *obj;
@@ -438,15 +420,16 @@ struct pdf_annot_s
pdf_annot *next;
};
+fz_link_dest pdf_parse_link_dest(pdf_xref *xref, fz_obj *dest);
+
fz_obj *pdf_lookup_dest(pdf_xref *xref, fz_obj *needle);
fz_obj *pdf_lookup_name(pdf_xref *xref, char *which, fz_obj *needle);
fz_obj *pdf_load_name_tree(pdf_xref *xref, char *which);
fz_outline *pdf_load_outline(pdf_xref *xref);
-pdf_link *pdf_load_link(pdf_xref *xref, fz_obj *dict);
-void pdf_load_links(pdf_link **, pdf_xref *, fz_obj *annots);
-void pdf_free_link(fz_context *ctx, pdf_link *link);
+fz_link *pdf_load_link(pdf_xref *xref, fz_obj *dict);
+void pdf_load_links(fz_link **, pdf_xref *, fz_obj *annots);
void pdf_load_annots(pdf_annot **, pdf_xref *, fz_obj *annots);
void pdf_free_annot(fz_context *ctx, pdf_annot *link);
@@ -464,7 +447,7 @@ struct pdf_page_s
int transparency;
fz_obj *resources;
fz_buffer *contents;
- pdf_link *links;
+ fz_link *links;
pdf_annot *annots;
};