summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fsdk_define.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-24 09:50:51 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-24 09:50:51 -0800
commit50d12ada784ad3ba3f9ed6935d59f1ce828695e5 (patch)
tree27caed4654213e5433256147a7c6b1b085692a32 /fpdfsdk/include/fsdk_define.h
parenta2167107bbcef6a3e3687d49a5b1e62503391316 (diff)
downloadpdfium-50d12ada784ad3ba3f9ed6935d59f1ce828695e5.tar.xz
Introduce "underlying types" to abstract XFA differences.
See the comment in fsdk_define.h. Also tidy up a bit, and remove dead DeletePages(). This should help us match master more closely (given corresponding changes on the master side). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1473503002 .
Diffstat (limited to 'fpdfsdk/include/fsdk_define.h')
-rw-r--r--fpdfsdk/include/fsdk_define.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index 389e8e5098..89c8f6ca6a 100644
--- a/fpdfsdk/include/fsdk_define.h
+++ b/fpdfsdk/include/fsdk_define.h
@@ -22,6 +22,8 @@
#include "core/include/fpdfdoc/fpdf_vt.h"
#include "core/include/fxge/fx_ge.h"
#include "core/include/fxge/fx_ge_win32.h"
+#include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h"
+#include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h"
#include "public/fpdfview.h"
#ifdef _WIN32
@@ -87,6 +89,18 @@ class CFPDF_FileStream : public IFX_FileStream {
FX_FILESIZE m_nCurPos;
};
+// Object types for public FPDF_ types; these correspond to next layer down
+// from fpdfsdk. For master, these are CPDF_ types, but for XFA, these are
+// CPDFXFA_ types.
+using UnderlyingDocumentType = CPDFXFA_Document;
+using UnderlyingPageType = CPDFXFA_Page;
+
+// Conversions to/from underlying types.
+UnderlyingDocumentType* UnderlyingFromFPDFDocument(FPDF_DOCUMENT doc);
+FPDF_DOCUMENT FPDFDocumentFromUnderlying(UnderlyingDocumentType* doc);
+
+UnderlyingPageType* UnderlyingFromFPDFPage(FPDF_PAGE page);
+
// Conversions to/from FPDF_ types.
CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc);
FPDF_DOCUMENT FPDFDocumentFromCPDFDocument(CPDF_Document* doc);