Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: public/fpdf_formfill.h

Issue 1480403002: Allow building non-XFA (master) on the XFA branch. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: warning Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdfium.gyp ('k') | public/fpdfview.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/fpdf_formfill.h
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index 297bd4af556c5cd17d106b49e20e9e5f76db967e..b3bbb9280c0e4d82ee0cd120761c29b4d5e28f86 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -11,9 +11,11 @@
typedef void* FPDF_FORMHANDLE;
+#ifdef PDF_ENABLE_XFA
#define DOCTYPE_PDF 0 // Normal pdf Document
#define DOCTYPE_DYNAMIC_XFA 1 // Dynamic xfa Document Type
#define DOCTYPE_STATIC_XFA 2 // Static xfa Document Type
+#endif // PDF_ENABLE_XFA
// Exported Functions
#ifdef __cplusplus
@@ -50,7 +52,6 @@ typedef struct _IPDF_JsPlatform {
* 2-Question;
* 3-Status.
* 4-Asterisk
-
* Return Value:
* The return value could be the folowing type:
* 1-OK;
@@ -339,6 +340,7 @@ typedef struct _FPDF_SYSTEMTIME {
unsigned short wMilliseconds; /* milliseconds after the second - [0,999] */
} FPDF_SYSTEMTIME;
+#ifdef PDF_ENABLE_XFA
// XFA
/**
* @name Pageview event flags
@@ -371,29 +373,31 @@ typedef struct _FPDF_SYSTEMTIME {
#define FXFA_SAVEAS_XML 1
#define FXFA_SAVEAS_XDP 2
/*@}*/
+#endif // PDF_ENABLE_XFA
typedef struct _FPDF_FORMFILLINFO {
/**
- * Version number of the interface. Currently must be 2 (with XFA module).
+ * Version number of the interface. Currently must be 1 (when PDFium is built
+ * without the XFA module) or must be 2 (when built with the XFA module).
**/
int version;
+ /* Version 1. */
/**
-*Method: Release
-* Give implementation a chance to release any data after the interface
-* is no longer used
-*Interface Version:
-* 1
-*Implementation Required:
-* No
-*Comments:
-* Called by Foxit SDK during the final cleanup process.
-*Parameters:
-* pThis - Pointer to the interface structure itself
-*Return Value:
-* None
-*/
-
+ *Method: Release
+ * Give implementation a chance to release any data after the
+ * interface is no longer used
+ *Interface Version:
+ * 1
+ *Implementation Required:
+ * No
+ *Comments:
+ * Called by Foxit SDK during the final cleanup process.
+ *Parameters:
+ * pThis - Pointer to the interface structure itself
+ *Return Value:
+ * None
+ */
void (*Release)(struct _FPDF_FORMFILLINFO* pThis);
/**
@@ -699,6 +703,8 @@ typedef struct _FPDF_FORMFILLINFO {
**/
IPDF_JSPLATFORM* m_pJsPlatform;
+#ifdef PDF_ENABLE_XFA
+ /* Version 2. */
/**
* Method: FFI_DisplayCaret
* This method will show the caret at specified position.
@@ -728,6 +734,7 @@ typedef struct _FPDF_FORMFILLINFO {
double top,
double right,
double bottom);
+
/**
* Method: FFI_GetCurrentPageIndex
* This method will get the current page index.
@@ -744,6 +751,7 @@ typedef struct _FPDF_FORMFILLINFO {
**/
int (*FFI_GetCurrentPageIndex)(struct _FPDF_FORMFILLINFO* pThis,
FPDF_DOCUMENT document);
+
/**
* Method: FFI_SetCurrentPage
* This method will set the current page.
@@ -762,6 +770,7 @@ typedef struct _FPDF_FORMFILLINFO {
void (*FFI_SetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis,
FPDF_DOCUMENT document,
int iCurPage);
+
/**
* Method: FFI_GotoURL
* This method will link to the specified URL.
@@ -780,6 +789,7 @@ typedef struct _FPDF_FORMFILLINFO {
void (*FFI_GotoURL)(struct _FPDF_FORMFILLINFO* pThis,
FPDF_DOCUMENT document,
FPDF_WIDESTRING wsURL);
+
/**
* Method: FFI_GetPageViewRect
* This method will get the current page view rectangle.
@@ -830,6 +840,7 @@ typedef struct _FPDF_FORMFILLINFO {
* TRUE indicates success; otherwise false.
**/
FPDF_BOOL (*FFI_PopupMenu)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_WIDGET hWidget, int menuFlag, float x, float y);
+
/**
* Method: FFI_OpenFile
* This method will open the specified file with the specified mode.
@@ -851,6 +862,7 @@ typedef struct _FPDF_FORMFILLINFO {
int fileFlag,
FPDF_WIDESTRING wsURL,
const char* mode);
+
/**
* Method: FFI_EmailTo
* This method will email the specified file stream to the specified
@@ -881,6 +893,7 @@ typedef struct _FPDF_FORMFILLINFO {
FPDF_WIDESTRING pCC,
FPDF_WIDESTRING pBcc,
FPDF_WIDESTRING pMsg);
+
/**
* Method: FFI_UploadTo
* This method will get upload the specified file stream to the
@@ -922,6 +935,7 @@ typedef struct _FPDF_FORMFILLINFO {
int (*FFI_GetPlatform)(struct _FPDF_FORMFILLINFO* pThis,
void* platform,
int length);
+
/**
* Method: FFI_GetLanguage
* This method will get the current language.
@@ -941,6 +955,7 @@ typedef struct _FPDF_FORMFILLINFO {
int (*FFI_GetLanguage)(struct _FPDF_FORMFILLINFO* pThis,
void* language,
int length);
+
/**
* Method: FFI_DownloadFromURL
* This method will download the specified file from the URL.
@@ -978,6 +993,7 @@ typedef struct _FPDF_FORMFILLINFO {
* TRUE indicates success, otherwise FALSE.
**/
FPDF_BOOL (*FFI_PostRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTRING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone);
+
/**
* Method: FFI_PutRequestURL
* This method will put the request to the server URL.
@@ -995,6 +1011,7 @@ typedef struct _FPDF_FORMFILLINFO {
* TRUE indicates success, otherwise FALSE.
**/
FPDF_BOOL (*FFI_PutRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode);
+#endif // PDF_ENABLE_XFA
} FPDF_FORMFILLINFO;
@@ -1212,6 +1229,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,
double page_x,
double page_y);
+#ifdef PDF_ENABLE_XFA
DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle,
FPDF_PAGE page,
int modifier,
@@ -1222,6 +1240,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle,
int modifier,
double page_x,
double page_y);
+#endif // PDF_ENABLE_XFA
/**
* Function: FORM_OnKeyDown
@@ -1303,7 +1322,9 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle);
#define FPDF_FORMFIELD_COMBOBOX 4 // combo box type.
#define FPDF_FORMFIELD_LISTBOX 5 // list box type.
#define FPDF_FORMFIELD_TEXTFIELD 6 // text field type.
+#ifdef PDF_ENABLE_XFA
#define FPDF_FORMFIELD_XFA 7 // text field type.
+#endif // PDF_ENABLE_XFA
/**
* Function: FPDFPage_HasFormFieldAtPoint
@@ -1451,6 +1472,8 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
int size_y,
int rotate,
int flags);
+
+#ifdef PDF_ENABLE_XFA
/**
* Function: FPDF_HasXFAField
* This method is designed to check whether a pdf document
@@ -1663,6 +1686,7 @@ DLLEXPORT FPDF_BOOL STDCALL
FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle,
FPDF_BYTESTRING bsText,
FPDF_DWORD size);
+#endif // PDF_ENABLE_XFA
#ifdef __cplusplus
}
« no previous file with comments | « pdfium.gyp ('k') | public/fpdfview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698