Added FPDFAnnot_GetLinkedAnnot()

Added FPDFAnnot_GetLinkedAnnot() to retrieve annotations linked to other
annotations through a specified key.

Bug=pdfium:863,pdfium:737

Change-Id: If81f41178fb4c40f6561bd392215c709722c4000
Reviewed-on: https://pdfium-review.googlesource.com/11491
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h
index 6cd06dd..6a89ff9 100644
--- a/public/fpdf_annot.h
+++ b/public/fpdf_annot.h
@@ -385,6 +385,19 @@
                          unsigned long buflen);
 
 // Experimental API.
+// Get the annotation corresponding to |key| in |annot|'s dictionary. Common
+// keys for linking annotations include "IRT" and "Popup". Must call
+// FPDFPage_CloseAnnot() when the annotation returned by this function is no
+// longer needed.
+//
+//   annot  - handle to an annotation.
+//   key    - the key to the requested dictionary entry.
+//
+// Returns a handle to the linked annotation object, or NULL on failure.
+FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV
+FPDFAnnot_GetLinkedAnnot(FPDF_ANNOTATION annot, FPDF_WIDESTRING key);
+
+// Experimental API.
 // Get the annotation flags of |annot|.
 //
 //   annot    - handle to an annotation.