From a37989fe53097e4a0b6e87eb6ba01def1e13b675 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 17 Oct 2018 20:32:41 +0000 Subject: Add FORM_OnLButtonDoubleClick(). The code for this already exists, but is not hooked up to a public API. Hook it up and add a test case. Change-Id: I2ebc8492d8b7347849ff06f664155c6d72ecf76f Reviewed-on: https://pdfium-review.googlesource.com/c/44130 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- public/fpdf_formfill.h | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'public') diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h index bd8ab3c91a..ed7db273dc 100644 --- a/public/fpdf_formfill.h +++ b/public/fpdf_formfill.h @@ -1281,17 +1281,17 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnFocus(FPDF_FORMHANDLE hHandle, /** * Function: FORM_OnLButtonDown * You can call this member function when the user presses the left - *mouse button. + * mouse button. * Parameters: * hHandle - Handle to the form fill module. Returned by - *FPDFDOC_InitFormFillEnvironment. + * FPDFDOC_InitFormFillEnvironment(). * page - Handle to the page. Returned by FPDF_LoadPage - *function. - * modifier - Indicates whether various virtual keys are down. + * function. + * modifier - Indicates whether various virtual keys are down. * page_x - Specifies the x-coordinate of the cursor in PDF user - *space. + * space. * page_y - Specifies the y-coordinate of the cursor in PDF user - *space. + * space. * Return Value: * TRUE indicates success; otherwise false. **/ @@ -1304,10 +1304,10 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle, /** * Function: FORM_OnLButtonUp * You can call this member function when the user releases the left - *mouse button. + * mouse button. * Parameters: * hHandle - Handle to the form fill module. Returned by - *FPDFDOC_InitFormFillEnvironment. + * FPDFDOC_InitFormFillEnvironment(). * page - Handle to the page. Returned by FPDF_LoadPage *function. * modifier - Indicates whether various virtual keys are down. @@ -1322,6 +1322,30 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle, double page_x, double page_y); +/** + * Function: FORM_OnLButtonDoubleClick + * You can call this member function when the user double clicks the + * left mouse button. + * Parameters: + * hHandle - Handle to the form fill module. Returned by + * FPDFDOC_InitFormFillEnvironment(). + * page - Handle to the page. Returned by FPDF_LoadPage + * function. + * modifier - Indicates whether various virtual keys are down. + * page_x - Specifies the x-coordinate of the cursor in PDF user + * space. + * page_y - Specifies the y-coordinate of the cursor in PDF user + * space. + * Return Value: + * TRUE indicates success; otherwise false. + **/ +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FORM_OnLButtonDoubleClick(FPDF_FORMHANDLE hHandle, + FPDF_PAGE page, + int modifier, + double page_x, + double page_y); + #ifdef PDF_ENABLE_XFA FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle, FPDF_PAGE page, -- cgit v1.2.3