From bdf72c353af5b8a34ef5efdeddfff36d2089a158 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 14 Aug 2015 19:24:08 -0700 Subject: Merge to XFA: Add new public APIs to find the z-order for links and widgets. - Implement FPDFLink_GetLinkZOrderAtPoint(). - Implement FPDFPage_FormFieldZOrderAtPoint(). - Mark FPDPage_HasFormFieldAtPoint() as deprecated. - Modify CPDF_LinkList and CPDF_InterForm to support new APIs. - Clean up dead code in CPDF_LinkList and CPDF_InterForm. BUG=chromium:515837 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1278053004 . (cherry picked from commit 24fbf134d43a7ec4226de3db601f0a617bbe428b) Review URL: https://codereview.chromium.org/1295893005 . --- public/fpdf_doc.h | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) (limited to 'public/fpdf_doc.h') diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h index 9e3f0af6d1..ca16d26627 100644 --- a/public/fpdf_doc.h +++ b/public/fpdf_doc.h @@ -177,27 +177,52 @@ DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST dest); // Function: FPDFLink_GetLinkAtPoint -// Find a link at specified point on a document page. +// Find a link at specified point on a document page. // Parameters: -// page - Handle to the document page. -// x - The x coordinate of the point, specified in page -// coordinate system. -// y - The y coordinate of the point, specified in page -// coordinate system. +// page - Handle to the document page. +// x - The x coordinate of the point, specified in page +// coordinate system. +// y - The y coordinate of the point, specified in page +// coordinate system. // Return value: -// Handle to the link. NULL if no link found at that point. +// Handle to the link. NULL if no link found at that point. // Comments: -// The point coordinates are specified in page coordinate system. You -// can convert coordinates -// from screen system to page system using FPDF_DeviceToPage functions. +// The point coordinates are specified in page coordinate system. You can +// convert coordinates from screen system to page system using +// FPDF_DeviceToPage(). +// // Notes: -// The method can not support this feature for the document consists of -// dynamic XFA fields. +// The method can not support this feature for the document consists of +// dynamic XFA fields. // DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, double y); +// Function: FPDFLink_GetLinkZOrderAtPoint +// Find the z-order of a link at specified point on a document page. +// Parameters: +// page - Handle to the document page. +// x - The x coordinate of the point, specified in page +// coordinate system. +// y - The y coordinate of the point, specified in page +// coordinate system. +// Return value: +// Z-order of the link, or -1 if no link found at that point. +// Higher numbers are closer to the front. +// Comments: +// The point coordinates are specified in page coordinate system. You can +// convert coordinates from screen system to page system using +// FPDF_DeviceToPage(). +// +// Notes: +// The method can not support this feature for the document consists of +// dynamic XFA fields. +// +// +DLLEXPORT int STDCALL +FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page, double x, double y); + // Function: FPDFLink_GetDest // Get destination info of a link. // Parameters: -- cgit v1.2.3