Implement PDF link annotations: both internal hyperlinks within the
[sgt/halibut] / paper.h
diff --git a/paper.h b/paper.h
index 3b4a944..4ba0908 100644 (file)
--- a/paper.h
+++ b/paper.h
@@ -17,6 +17,8 @@ typedef struct line_data_Tag line_data;
 typedef struct page_data_Tag page_data;
 typedef struct subfont_map_entry_Tag subfont_map_entry;
 typedef struct text_fragment_Tag text_fragment;
+typedef struct xref_Tag xref;
+typedef struct xref_dest_Tag xref_dest;
 
 /*
  * This data structure represents the overall document, in the form
@@ -215,6 +217,11 @@ struct page_data_Tag {
     text_fragment *first_text;
     text_fragment *last_text;
     /*
+     * Cross-references.
+     */
+    xref *first_xref;
+    xref *last_xref;
+    /*
      * This spare pointer field is for use by the client backends.
      */
     void *spare;
@@ -228,6 +235,18 @@ struct text_fragment_Tag {
     char *text;
 };
 
+struct xref_dest_Tag {
+    enum { NONE, PAGE, URL } type;
+    page_data *page;
+    char *url;
+};
+
+struct xref_Tag {
+    xref *next;
+    int lx, rx, ty, by;
+    xref_dest dest;
+};
+
 /*
  * Functions and data exported from psdata.c.
  */