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 XFA_FXFA_APP_XFA_FFAPP_H_ | 7 #ifndef XFA_INCLUDE_FXFA_XFA_FFAPP_H_ |
8 #define XFA_FXFA_APP_XFA_FFAPP_H_ | 8 #define XFA_INCLUDE_FXFA_XFA_FFAPP_H_ |
9 | 9 |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" |
11 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" | 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" |
12 #include "xfa/fgas/font/fgas_font.h" | 12 #include "xfa/fgas/font/fgas_font.h" |
13 #include "xfa/fwl/core/fwl_sdadapterimp.h" | 13 #include "xfa/fwl/core/fwl_sdadapterimp.h" |
14 #include "xfa/fwl/core/ifwl_adapternative.h" | 14 #include "xfa/fwl/core/ifwl_adapternative.h" |
15 #include "xfa/fwl/core/ifwl_app.h" | 15 #include "xfa/fwl/core/ifwl_app.h" |
16 #include "xfa/include/fxfa/fxfa.h" | 16 #include "xfa/include/fxfa/fxfa.h" |
17 | 17 |
| 18 class CXFA_DefFontMgr; |
18 class CXFA_FWLAdapterWidgetMgr; | 19 class CXFA_FWLAdapterWidgetMgr; |
19 class CXFA_FWLTheme; | 20 class CXFA_FWLTheme; |
20 class CXFA_FFDocHandler; | 21 class CXFA_FFDocHandler; |
21 class CXFA_FFMenuHandler; | 22 class CXFA_FFMenuHandler; |
22 class CXFA_FontMgr; | 23 class CXFA_FontMgr; |
23 | 24 |
24 class CXFA_FileRead : public IFX_FileRead { | 25 class CXFA_FileRead : public IFX_FileRead { |
25 public: | 26 public: |
26 explicit CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams); | 27 explicit CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams); |
27 | 28 |
28 virtual FX_FILESIZE GetSize(); | 29 virtual FX_FILESIZE GetSize(); |
29 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size); | 30 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size); |
30 | 31 |
31 virtual void Release() { delete this; } | 32 virtual void Release() { delete this; } |
32 | 33 |
33 protected: | 34 protected: |
34 CFX_ObjectArray<CPDF_StreamAcc> m_Data; | 35 CFX_ObjectArray<CPDF_StreamAcc> m_Data; |
35 }; | 36 }; |
36 | 37 |
37 class CXFA_FFApp : public IXFA_App, public IFWL_AdapterNative { | 38 class CXFA_FFApp : public IFWL_AdapterNative { |
38 public: | 39 public: |
39 CXFA_FFApp(IXFA_AppProvider* pProvider); | 40 CXFA_FFApp(IXFA_AppProvider* pProvider); |
40 ~CXFA_FFApp() override; | 41 ~CXFA_FFApp() override; |
41 | 42 |
42 // IFXFA_App: | 43 CXFA_FFDocHandler* GetDocHandler(); |
43 IXFA_DocHandler* GetDocHandler() override; | 44 CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, |
44 IXFA_Doc* CreateDoc(IXFA_DocProvider* pProvider, | 45 IFX_FileRead* pStream, |
45 IFX_FileRead* pStream, | 46 FX_BOOL bTakeOverFile); |
46 FX_BOOL bTakeOverFile) override; | 47 CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc); |
47 IXFA_Doc* CreateDoc(IXFA_DocProvider* pProvider, | 48 IXFA_AppProvider* GetAppProvider() { return m_pProvider; } |
48 CPDF_Document* pPDFDoc) override; | 49 void SetDefaultFontMgr(CXFA_DefFontMgr* pFontMgr); |
49 IXFA_AppProvider* GetAppProvider() override { return m_pProvider; } | 50 CXFA_FFMenuHandler* GetMenuHandler(); |
50 void SetDefaultFontMgr(IXFA_FontMgr* pFontMgr) override; | |
51 IXFA_MenuHandler* GetMenuHandler() override; | |
52 | 51 |
53 // IFWL_AdapterNative: | 52 // IFWL_AdapterNative: |
54 IFWL_AdapterWidgetMgr* GetWidgetMgr( | 53 IFWL_AdapterWidgetMgr* GetWidgetMgr( |
55 IFWL_WidgetMgrDelegate* pDelegate) override; | 54 IFWL_WidgetMgrDelegate* pDelegate) override; |
56 IFWL_AdapterThreadMgr* GetThreadMgr() override; | 55 IFWL_AdapterThreadMgr* GetThreadMgr() override; |
57 IFWL_AdapterTimerMgr* GetTimerMgr() override; | 56 IFWL_AdapterTimerMgr* GetTimerMgr() override; |
58 | 57 |
59 CXFA_FontMgr* GetXFAFontMgr(); | 58 CXFA_FontMgr* GetXFAFontMgr(); |
60 IFX_FontMgr* GetFDEFontMgr(); | 59 IFX_FontMgr* GetFDEFontMgr(); |
61 CXFA_FWLTheme* GetFWLTheme(); | 60 CXFA_FWLTheme* GetFWLTheme(); |
(...skipping 10 matching lines...) Expand all Loading... |
72 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 71 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
73 IFX_FontSourceEnum* m_pFontSource; | 72 IFX_FontSourceEnum* m_pFontSource; |
74 #endif | 73 #endif |
75 CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr; | 74 CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr; |
76 IFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; | 75 IFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; |
77 IFX_FontMgr* m_pFDEFontMgr; | 76 IFX_FontMgr* m_pFDEFontMgr; |
78 CXFA_FFMenuHandler* m_pMenuHandler; | 77 CXFA_FFMenuHandler* m_pMenuHandler; |
79 CFWL_SDAdapterThreadMgr* m_pAdapterThreadMgr; | 78 CFWL_SDAdapterThreadMgr* m_pAdapterThreadMgr; |
80 }; | 79 }; |
81 | 80 |
82 #endif // XFA_FXFA_APP_XFA_FFAPP_H_ | 81 #endif // XFA_INCLUDE_FXFA_XFA_FFAPP_H_ |
OLD | NEW |