OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FXFA_SRC_APP_XFA_FFDOC_H_ | 7 #ifndef FXFA_SRC_APP_XFA_FFDOC_H_ |
8 #define FXFA_SRC_APP_XFA_FFDOC_H_ | 8 #define FXFA_SRC_APP_XFA_FFDOC_H_ |
9 | 9 |
10 #include "../../../../include/fxfa/fxfa.h" | 10 #include "../../../../include/fxfa/fxfa.h" |
11 | 11 |
12 class CXFA_FFApp; | 12 class CXFA_FFApp; |
13 class CXFA_FFNotify; | 13 class CXFA_FFNotify; |
14 class CXFA_FFDocView; | 14 class CXFA_FFDocView; |
15 class IXFA_Locale; | 15 class IXFA_Locale; |
16 | 16 |
17 typedef struct _FX_IMAGEDIB_AND_DPI { | 17 typedef struct _FX_IMAGEDIB_AND_DPI { |
18 CFX_DIBSource* pDibSource; | 18 CFX_DIBSource* pDibSource; |
19 FX_INT32» iImageXDpi; | 19 int32_t» iImageXDpi; |
20 FX_INT32» iImageYDpi; | 20 int32_t» iImageYDpi; |
21 } FX_IMAGEDIB_AND_DPI; | 21 } FX_IMAGEDIB_AND_DPI; |
22 | 22 |
23 class CXFA_FFDoc : public IXFA_Doc | 23 class CXFA_FFDoc : public IXFA_Doc |
24 { | 24 { |
25 public: | 25 public: |
26 CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocProvider* pDocProvider); | 26 CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocProvider* pDocProvider); |
27 ~CXFA_FFDoc(); | 27 ~CXFA_FFDoc(); |
28 IXFA_DocProvider* GetDocProvider() | 28 IXFA_DocProvider* GetDocProvider() |
29 { | 29 { |
30 return m_pDocProvider; | 30 return m_pDocProvider; |
31 } | 31 } |
32 FX_DWORD GetDocType(); | 32 FX_DWORD GetDocType(); |
33 FX_INT32» » » » StartLoad(); | 33 int32_t» » » » StartLoad(); |
34 FX_INT32» » » » DoLoad(IFX_Pause *pPause = NULL); | 34 int32_t» » » » DoLoad(IFX_Pause *pPause = NULL); |
35 void StopLoad(); | 35 void StopLoad(); |
36 IXFA_DocView* CreateDocView(FX_DWORD dwView = 0); | 36 IXFA_DocView* CreateDocView(FX_DWORD dwView = 0); |
37 FX_BOOL OpenDoc(IFX_FileRead* pStream, F
X_BOOL bTakeOverFile); | 37 FX_BOOL OpenDoc(IFX_FileRead* pStream, F
X_BOOL bTakeOverFile); |
38 FX_BOOL OpenDoc(CPDF_Document* pPDFDoc); | 38 FX_BOOL OpenDoc(CPDF_Document* pPDFDoc); |
39 FX_BOOL CloseDoc(); | 39 FX_BOOL CloseDoc(); |
40 void SetDocType(FX_DWORD dwType); | 40 void SetDocType(FX_DWORD dwType); |
41 CXFA_Document* GetXFADoc() | 41 CXFA_Document* GetXFADoc() |
42 { | 42 { |
43 return m_pDocument; | 43 return m_pDocument; |
44 } | 44 } |
45 CXFA_FFApp* GetApp() | 45 CXFA_FFApp* GetApp() |
46 { | 46 { |
47 return m_pApp; | 47 return m_pApp; |
48 } | 48 } |
49 CXFA_FFDocView* GetDocView(IXFA_DocLayout* pLayout); | 49 CXFA_FFDocView* GetDocView(IXFA_DocLayout* pLayout); |
50 CXFA_FFDocView* GetDocView(); | 50 CXFA_FFDocView* GetDocView(); |
51 CPDF_Document* GetPDFDoc(); | 51 CPDF_Document* GetPDFDoc(); |
52 CFX_DIBitmap*» » » GetPDFNamedImage(FX_WSTR wsName, FX_INT3
2 &iImageXDpi, FX_INT32 &iImageYDpi); | 52 CFX_DIBitmap*» » » GetPDFNamedImage(FX_WSTR wsName, int32_t
&iImageXDpi, int32_t &iImageYDpi); |
53 IFDE_XMLElement* GetPackageData(FX_WSTR wsPackage); | 53 IFDE_XMLElement* GetPackageData(FX_WSTR wsPackage); |
54 FX_BOOL SavePackage(FX_WSTR wsPackage, I
FX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL); | 54 FX_BOOL SavePackage(FX_WSTR wsPackage, I
FX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL); |
55 FX_BOOL ImportData(IFX_FileRead* pStream
, FX_BOOL bXDP = TRUE); | 55 FX_BOOL ImportData(IFX_FileRead* pStream
, FX_BOOL bXDP = TRUE); |
56 protected: | 56 protected: |
57 IXFA_DocProvider* m_pDocProvider; | 57 IXFA_DocProvider* m_pDocProvider; |
58 CXFA_Document* m_pDocument; | 58 CXFA_Document* m_pDocument; |
59 IFX_FileRead* m_pStream; | 59 IFX_FileRead* m_pStream; |
60 CXFA_FFApp* m_pApp; | 60 CXFA_FFApp* m_pApp; |
61 CXFA_FFNotify* m_pNotify; | 61 CXFA_FFNotify* m_pNotify; |
62 CPDF_Document* m_pPDFDoc; | 62 CPDF_Document* m_pPDFDoc; |
63 CFX_MapPtrToPtr m_mapNamedImages; | 63 CFX_MapPtrToPtr m_mapNamedImages; |
64 CFX_MapPtrToPtr m_mapTypeToDocView; | 64 CFX_MapPtrToPtr m_mapTypeToDocView; |
65 FX_DWORD m_dwDocType; | 65 FX_DWORD m_dwDocType; |
66 FX_BOOL m_bOwnStream; | 66 FX_BOOL m_bOwnStream; |
67 }; | 67 }; |
68 | 68 |
69 #endif // FXFA_SRC_APP_XFA_FFDOC_H_ | 69 #endif // FXFA_SRC_APP_XFA_FFDOC_H_ |
OLD | NEW |