diff options
author | Lei Zhang <thestig@chromium.org> | 2015-08-14 19:02:30 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-08-14 19:02:30 -0700 |
commit | 24fbf134d43a7ec4226de3db601f0a617bbe428b (patch) | |
tree | b4313e784666623df89c635a3f9841a7cc7e817a /public/fpdf_doc.h | |
parent | cb62e7657b3a9a04142028a4e6614029a08e894b (diff) | |
download | pdfium-24fbf134d43a7ec4226de3db601f0a617bbe428b.tar.xz |
Add new public APIs to find the z-order for links and widgets.chromium/2485chromium/2484
- 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 .
Diffstat (limited to 'public/fpdf_doc.h')
-rw-r--r-- | public/fpdf_doc.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h index ed05aed4d9..e537d2b6c1 100644 --- a/public/fpdf_doc.h +++ b/public/fpdf_doc.h @@ -177,24 +177,43 @@ 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(). // 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(). +// +DLLEXPORT int STDCALL +FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page, double x, double y); + // Function: FPDFLink_GetDest // Get destination info of a link. // Parameters: |