diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-07-16 20:49:56 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-16 20:49:56 +0000 |
commit | c30b4e16885c8fd5f59965f48b61ec033ae4691a (patch) | |
tree | d15118e1f461ef5654f94c6d63e8acb96275800f /public | |
parent | 4cf61e07625888a3b56c4de97719c87cf514fb7f (diff) | |
download | pdfium-c30b4e16885c8fd5f59965f48b61ec033ae4691a.tar.xz |
Alert embedder when attempting to save XFA form
This CL adds an experimental callback to the form fill API that
allows PDFium to signal to the embedder that an attempt call save
occurred. The embedder is responsible for showing an appropriate
UI when this occurs. When PDF saving is implemented the API can
be removed.
BUG=pdfium:953
Change-Id: Iba30f4d0547fe773b793e499995be426626092a0
Reviewed-on: https://pdfium-review.googlesource.com/35870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdf_formfill.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h index 0bc08ec54b..68ffcda56d 100644 --- a/public/fpdf_formfill.h +++ b/public/fpdf_formfill.h @@ -1113,6 +1113,26 @@ FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document, FPDF_EXPORT void FPDF_CALLCONV FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle); +typedef void (*FORM_SAVECALLED)(FPDF_FORMFILLINFO*); +/** + * Experimental API + * Function: FORM_SetSaveCallback + * This method is used to set a callback handler for when Save is + * attempted by a PDF. Should be invoked after user successfully + * loaded a PDF page, and method FPDFDOC_InitFormFillEnvironment had + * been invoked. + * Parameters: + * callback - Function pointer to the callback to be called when a + * Save is attempted. If NULL then no function will be + * invoked.. + * hHandle - Handle to the form fill module. Returned by + * FPDFDOC_InitFormFillEnvironment. + * Return Value: + * NONE. + **/ +FPDF_EXPORT void FPDF_CALLCONV FORM_SetSaveCallback(FORM_SAVECALLED callback, + FPDF_FORMHANDLE hHandle); + /** * Function: FORM_OnAfterLoadPage * This method is required for implementing all the form related |