summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-19 20:55:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-19 20:55:54 +0000
commitee96772e0878fa385b9a4a736a2fc109e19fd01e (patch)
treedef5fed9024c0aef25d7d1f81729b6f0a6687179 /public
parentc84ea8eda5a53229cf1faaed7cb54013b9ea18c3 (diff)
downloadpdfium-ee96772e0878fa385b9a4a736a2fc109e19fd01e.tar.xz
Add public APIs for undo / redo in forms.
Add FORM_CanUndo(), FORM_CanRedo(), FORM_Undo(), and FORM_Redo(). BUG=chromium:764260 Change-Id: I1d9ea67152d9b35d9b8e1d7ef7d019706fdfa30a Reviewed-on: https://pdfium-review.googlesource.com/30872 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_formfill.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index ff87d99ab5..73964b2a93 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -1452,6 +1452,64 @@ FPDF_EXPORT void FPDF_CALLCONV FORM_ReplaceSelection(FPDF_FORMHANDLE hHandle,
FPDF_WIDESTRING wsText);
/**
+ * Function: FORM_CanUndo
+ * Find out if it is possible for the current focused widget in a given
+ * form to perform an undo operation.
+ * Parameters:
+ * hHandle - Handle to the form fill module. Returned by
+ * FPDFDOC_InitFormFillEnvironment.
+ * page - Handle to the page. Returned by FPDF_LoadPage
+ * function.
+ * Return Value:
+ * True if it is possible to undo.
+ **/
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_CanUndo(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page);
+
+/**
+ * Function: FORM_CanRedo
+ * Find out if it is possible for the current focused widget in a given
+ * form to perform a redo operation.
+ * Parameters:
+ * hHandle - Handle to the form fill module. Returned by
+ * FPDFDOC_InitFormFillEnvironment.
+ * page - Handle to the page. Returned by FPDF_LoadPage
+ * function.
+ * Return Value:
+ * True if it is possible to redo.
+ **/
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_CanRedo(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page);
+
+/**
+ * Function: FORM_Undo
+ * Make the current focussed widget perform an undo operation.
+ * Parameters:
+ * hHandle - Handle to the form fill module. Returned by
+ * FPDFDOC_InitFormFillEnvironment.
+ * page - Handle to the page. Returned by FPDF_LoadPage
+ * function.
+ * Return Value:
+ * True if the undo operation succeeded.
+ **/
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_Undo(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page);
+
+/**
+ * Function: FORM_Redo
+ * Make the current focussed widget perform a redo operation.
+ * Parameters:
+ * hHandle - Handle to the form fill module. Returned by
+ * FPDFDOC_InitFormFillEnvironment.
+ * page - Handle to the page. Returned by FPDF_LoadPage
+ * function.
+ * Return Value:
+ * True if the redo operation succeeded.
+ **/
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_Redo(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page);
+
+/**
* Function: FORM_ForceToKillFocus.
* You can call this member function to force to kill the focus of the
*form field which got focus.